(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c0ace"],{4392:function(s,t,e){"use strict";e.r(t);var a=function(){var s=this,t=s._self._c;return t("Exams")},r=[],c=function(){var s=this,t=s._self._c;return t("div",{staticClass:"row px-3"},[0==s.products.length?t("div",{staticClass:"col-12"},[t("div",{staticClass:"text-center py-5"},[t("strong",[s._v(s._s(s.$t("message.not_purchased_a_course")))])])]):[t("div",{staticClass:"col-12 col-sm-4 order-2 order-md-1"},[t("div",s._l(s.products,(function(e){return t("div",{key:e.id},[t("div",{staticClass:"card py-1",on:{click:function(t){return s.examList(e)}}},[t("div",{staticClass:"row"},[t("div",{staticClass:"col-4 mx-auto text-center d-flex align-items-center"},[t("img",{staticClass:"img-thumbnail",attrs:{src:e.portada_url}})]),t("div",{staticClass:"col-8 px-1"},[t("div",{staticClass:"card-body pl-0"},[t("p",{staticClass:"card-title"},[t("strong",[s._v(s._s(e.nombre))])])])])])])])})),0)]),t("div",{staticClass:"col-12 col-sm-8 order-1 order-md-2"},[s.waitSelection?t("div",[t("div",{staticClass:"text-center py-10"},[t("strong",[s._v(s._s(s.$t("message.select_a_course")))])])]):t("div",[t("div",{staticClass:"pb-4"},[t("strong",{staticClass:"pb-4"},[s._v(s._s(s.productSelected.nombre))]),"empty"!=s.exam_progress?t("p",[t("strong",[s._v(s._s(s.$t("message.current_progress"))+": ")]),s._v(s._s(s.exam_progress)+"%")]):t("p",[t("strong",[s._v(s._s(s.$t("message.current_progress"))+": ")]),s._v("0%")]),t("v-progress-linear",{attrs:{color:"amber"},model:{value:s.exam_progress,callback:function(t){s.exam_progress=t},expression:"exam_progress"}})],1),t("div",[t("p",[t("strong",[s._v(s._s(s.$t("message.list_exam")))])]),"empty"==s.exam_progress?t("div",[s._v(" "+s._s(s.$t("message.there_are_this_course"))+" ")]):t("div",[t("div",{staticClass:"py-2"},[t("table",{staticClass:"table"},[t("thead",[t("tr",[t("th",[s._v(s._s(s.$t("message.exam")))]),t("th",[s._v(s._s(s.$t("message.status_action")))])])]),t("tbody",[s._l(s.exams_class,(function(e){return t("tr",{key:e.id},[e.exist?[t("td",[s._v(s._s(e.name))]),e.approved?t("td",{staticClass:"text-success"},[s._v(" "+s._s(s.$t("message.passed_exam"))+" ")]):t("td",[t("button",{staticClass:"btn btn-primary",on:{click:function(t){return s.Testing(e)}}},[s._v(s._s(s.$t("message.take_exam")))])])]:s._e()],2)})),s._l(s.exams_module,(function(e){return t("tr",{key:e.id},[e.exist?[t("td",[s._v(s._s(e.name))]),e.approved?t("td",{staticClass:"text-success"},[s._v(" "+s._s(s.$t("message.passed_exam"))+" ")]):t("td",[t("button",{staticClass:"btn btn-primary",on:{click:function(t){return s.Testing(e)}}},[s._v(s._s(s.$t("message.take_exam")))])])]:s._e()],2)})),t("tr",{},[s.exam_course.exist?[t("td",[s._v(s._s(s.exam_course.nombre))]),s.exam_course.approved?t("td",{staticClass:"text-success"},[s._v(" "+s._s(s.$t("message.passed_exam"))+" ")]):t("td",[t("button",{staticClass:"btn btn-primary",on:{click:function(t){return s.Testing(s.exam_course)}}},[s._v(s._s(s.$t("message.take_exam")))])])]:s._e()],2)],2)])])])])])])]],2)},i=[],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 s=localStorage.getItem("id_user");const{data:t}=await this.$axios.get(`/user/${s}/purchased-products`);this.products=t,this.loading=!1}catch(s){window.location.reload()}},async examList(s){this.productSelected=s,await this.$axios.get("/course/exam/list?slug="+s.slug_product).then(s=>{this.exam_course=s.data.exam_course,this.exams_class=s.data.exams_class,this.exams_module=s.data.exams_module,this.exams_data=s.data,this.exam_progress=s.data.exam_progress,this.waitSelection=!1})},Testing(s){this.$router.push({name:"test",params:{id:s.exam_id,slug:s.slug}})}},mounted(){this.getcourses()}}),n=o,_=e("2877"),l=Object(_["a"])(n,c,i,!1,null,null,null),d=l.exports,m={components:{Exams:d}},u=m,p=Object(_["a"])(u,a,r,!1,null,null,null);t["default"]=p.exports}}]);
//# sourceMappingURL=chunk-2d0c0ace.c4c20aea.js.map