(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c0ace"],{4392:function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t._self._c;return s("Exams")},r=[],i=function(){var t=this,s=t._self._c;return s("div",{staticClass:"row px-3"},[0==t.products.length?s("div",{staticClass:"col-12"},[t._m(0)]):[s("div",{staticClass:"col-12 col-sm-4 order-2 order-md-1"},[s("div",t._l(t.products,(function(e){return s("div",{key:e.id},[s("div",{staticClass:"card py-1",on:{click:function(s){return t.examList(e)}}},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-4 mx-auto text-center d-flex align-items-center"},[s("img",{staticClass:"img-thumbnail",attrs:{src:e.portada_url}})]),s("div",{staticClass:"col-8 px-1"},[s("div",{staticClass:"card-body pl-0"},[s("p",{staticClass:"card-title"},[s("strong",[t._v(t._s(e.nombre))])])])])])])])})),0)]),s("div",{staticClass:"col-12 col-sm-8 order-1 order-md-2"},[t.waitSelection?s("div",[t._m(1)]):s("div",[s("div",{staticClass:"pb-4"},[s("strong",{staticClass:"pb-4"},[t._v(t._s(t.productSelected.nombre))]),"empty"!=t.exam_progress?s("p",[s("strong",[t._v("Progreso actual: ")]),t._v(t._s(t.exam_progress)+"%")]):s("p",[s("strong",[t._v("Progreso actual: ")]),t._v("0%")]),s("v-progress-linear",{attrs:{color:"amber"},model:{value:t.exam_progress,callback:function(s){t.exam_progress=s},expression:"exam_progress"}})],1),s("div",[t._m(2),"empty"==t.exam_progress?s("div",[t._v(" No hay exámenes para este curso ")]):s("div",[s("div",{staticClass:"py-2"},[s("table",{staticClass:"table"},[t._m(3),s("tbody",[t._l(t.exams_class,(function(e){return s("tr",{key:e.id},[e.exist?[s("td",[t._v(t._s(e.name))]),e.approved?s("td",{staticClass:"text-success"},[t._v(" Examen aprobado ")]):s("td",[s("button",{staticClass:"btn btn-warning",on:{click:function(s){return t.Testing(e)}}},[t._v("Realizar examen")])])]:t._e()],2)})),t._l(t.exams_module,(function(e){return s("tr",{key:e.id},[e.exist?[s("td",[t._v(t._s(e.name))]),e.approved?s("td",{staticClass:"text-success"},[t._v(" Examen aprobado ")]):s("td",[s("button",{staticClass:"btn btn-warning",on:{click:function(s){return t.Testing(e)}}},[t._v("Realizar examen")])])]:t._e()],2)})),s("tr",{},[t.exam_course.exist?[s("td",[t._v(t._s(t.exam_course.nombre))]),t.exam_course.approved?s("td",{staticClass:"text-success"},[t._v(" Examen aprobado ")]):s("td",[s("button",{staticClass:"btn btn-warning",on:{click:function(s){return t.Testing(t.exam_course)}}},[t._v("Realizar examen")])])]:t._e()],2)],2)])])])])])])]],2)},c=[function(){var t=this,s=t._self._c;return s("div",{staticClass:"text-center py-5"},[s("strong",[t._v("Aún no ha adquirido un curso")])])},function(){var t=this,s=t._self._c;return s("div",{staticClass:"text-center py-10"},[s("strong",[t._v("Seleccione un curso")])])},function(){var t=this,s=t._self._c;return s("p",[s("strong",[t._v("Lista de exámenes")])])},function(){var t=this,s=t._self._c;return s("thead",[s("tr",[s("th",[t._v("Examen")]),s("th",[t._v("Estado/Acción")])])])}],o=(e("14d9"),{data(){return{products:[],waitSelection:!0,exam_course:[],exams_class:[],exams_module:[],exams_data:[],exam_progress:0,productSelected:[]}},methods:{async getcourses(){try{let t=localStorage.getItem("id_user");const{data:s}=await this.$axios.get(`/user/${t}/purchased-products`);this.products=s,this.loading=!1}catch(t){window.location.reload()}},async examList(t){this.productSelected=t,await this.$axios.get("/course/exam/list?slug="+t.slug_product).then(t=>{this.exam_course=t.data.exam_course,this.exams_class=t.data.exams_class,this.exams_module=t.data.exams_module,this.exams_data=t.data,this.exam_progress=t.data.exam_progress,this.waitSelection=!1})},Testing(t){this.$router.push({name:"test",params:{id:t.exam_id,slug:t.slug}})}},mounted(){this.getcourses()}}),n=o,l=e("2877"),d=Object(l["a"])(n,i,c,!1,null,null,null),u=d.exports,_={components:{Exams:u}},m=_,x=Object(l["a"])(m,a,r,!1,null,null,null);s["default"]=x.exports}}]);
//# sourceMappingURL=chunk-2d0c0ace.adfe70ea.js.map