(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-05b11c9e"],{"49f49":function(t,e,i){},"4b6b":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i("d4ec"),a=i("bee2"),n=i("8f33"),r=i("262e"),c=i("c0e9"),o=function(t){function e(){return Object(s["a"])(this,e),Object(n["a"])(this,e,arguments)}return Object(r["a"])(e,t),Object(a["a"])(e,null,[{key:"build",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new this(this.resource,null,t)}}])}(c["a"]);o.resource="/api/v1/practical_test_teachers"},"710d":function(t,e,i){"use strict";i.r(e);i("99af"),i("4de4"),i("b0c0"),i("d3b7");var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"vx-row mt-2 mb-4"},[t._m(0),t.praticalTestName?e("div",{staticClass:"vx-col sm:w-1/1 w-full mb-2"},[t._v(" "+t._s(t.praticalTestName)+" ")]):t._e()]),e("Grid",{key:t.key,ref:"grid",attrs:{hide_actions:"true",hide_searchbar:"true",service:t.praticalTestService,route_name:"practical_tests",fetchOnMounted:!1,route_grid_path:"".concat(t.id,"/teachers/").concat(t.teacherId,"/students/grid")},on:{"grid-UPDATED":t.gridLoaded},scopedSlots:t._u([{key:"gridThead",fn:function(){return[e("vs-th",{key:"id",attrs:{"sort-key":"id"}},[t._v("ID")]),e("vs-th",{key:"name",attrs:{"sort-key":"name"}},[t._v(t._s(t.$t("practical_test.student.name")))]),e("vs-th",{key:"identifier",attrs:{"sort-key":"identifier"}},[t._v(t._s(t.$t("practical_test.student.identifier")))]),e("vs-th",[e("div",{staticClass:"grid grid-cols-3 justify-items-center flex w-full"},[e("div",{staticClass:"flex justify-center"},[e("vs-chip",{staticClass:"text-base",attrs:{transparent:"",color:"success"}},[t._v("Não iniciada")])],1),e("div",{staticClass:"flex justify-center"},[e("vs-chip",{staticClass:"text-base",attrs:{transparent:"",color:"warning"}},[t._v("Iniciada")])],1),e("div",{staticClass:"flex justify-center"},[e("vs-chip",{staticClass:"text-base",attrs:{transparent:"",color:"primary"}},[t._v("Finalizada")])],1)])])]},proxy:!0},{key:"gridData",fn:function(i){return t._l(i.data,(function(i,s){return e("vs-tr",{key:s,attrs:{data:i}},[e("vs-td",{key:"id",staticClass:"break-all p-1 pl-4",attrs:{width:"5%"}},[e("div",[t._v(" "+t._s(i.id)+" ")])]),e("vs-td",{key:"name",staticClass:"break-all p-1 pl-4",attrs:{width:"25%"}},[e("div",[t._v(" "+t._s(i.data.name))])]),e("vs-td",{key:"identifier",staticClass:"break-all p-1 pl-4",attrs:{width:"15%"}},[e("div",[t._v(" "+t._s(i.data.identifier))])]),e("vs-td",{attrs:{width:"60%"}},[e("vs-table",{attrs:{data:t.sections},scopedSlots:t._u([{key:"default",fn:function(s){var a=s.data;return t._l(a,(function(s,n){return e("vs-tr",{key:a[n],class:t.classSection(s,i.data),staticStyle:{"border-bottom":"thin solid"}},[e("vs-td",{attrs:{width:"70%"}},[e("div",{directives:[{name:"html-safe",rawName:"v-html-safe",value:s.data.title,expression:"trSection.data.title"}]})]),e("vs-td",{attrs:{width:"30%"}},[e("div",{staticClass:"grid grid-cols-2"},[e("div",{staticClass:"flex"},[e("feather-icon",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:{content:"Iniciar avaliação",delay:{show:500,hide:500}},expression:"{content: 'Iniciar avaliação', delay: {show: 500,hide: 500}}",modifiers:{auto:!0}}],attrs:{icon:"PlayIcon",svgClasses:"h-7 w-7 mb-1 mr-3 stroke-current cursor-pointer"},on:{click:function(){return t.openPraticalTest(i,s.id)}}})],1),e("div",{staticClass:"justify-center items-center space-y-1 p-1",class:t.getStatisticsClass(t.getStatisticsAnalyticTotalQuestion(s,i.data),t.getStatisticsAnalyticTotalQuestionAnswered(s,i.data))},[e("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:{content:"Total de Itens",delay:{show:500,hide:500}},expression:"{ content: 'Total de Itens', delay: {show: 500, hide: 500}}",modifiers:{auto:!0}}],staticClass:"flex"},[e("feather-icon",{attrs:{icon:"ListIcon",svgClasses:"h-5 w-5"}}),e("span",{staticClass:"ml-1"},[t._v(t._s(t.getStatisticsAnalyticTotalQuestion(s,i.data)))])],1),e("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:{content:"Total de Itens Avaliados",delay:{show:500,hide:500}},expression:"{ content: 'Total de Itens Avaliados', delay: {show: 500, hide: 500}}",modifiers:{auto:!0}}],staticClass:"flex"},[e("feather-icon",{attrs:{icon:"CheckIcon",svgClasses:"h-5 w-5"}}),e("span",{staticClass:"ml-1"},[t._v(t._s(t.getStatisticsAnalyticTotalQuestionAnswered(s,i.data)))])],1)])])])],1)}))}}],null,!0)})],1)],1)}))}}])},[e("template",{slot:"filter"},[e("div",{staticClass:"flex"},[e("vs-input",{attrs:{id:"student_identifier",label:t.$t("practical_test.student.identifier")},model:{value:t.identifier,callback:function(e){t.identifier=e},expression:"identifier"}}),e("vs-button",{staticClass:"ml-4",staticStyle:{"margin-top":"20px !important"},attrs:{type:"border",disabled:""===t.identifier},on:{click:t.filter}},[t._v("Pesquisar")]),e("vs-button",{staticClass:"ml-3",staticStyle:{"margin-top":"20px !important"},attrs:{type:"border"},on:{click:t.goBack}},[t._v(" "+t._s(t.$t("common.back"))+" ")])],1)])],2)],1)},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"vx-col sm:w-1/1 w-full mb-2"},[e("b",[t._v("Prova Prática:")])])}],n=(i("14d9"),i("a9e3"),i("b64b"),i("80f6")),r=i("c6aa"),c=i("4b6b"),o={props:{id:{default:null,type:Number},teacherId:{default:null,type:Number},identifier:{default:"",type:String}},data:function(){return{service:null,praticalTestService:null,practicalTestTeacherService:null,sections:[],praticalTestName:null}},methods:{goBack:function(){this.$router.push("/practical_tests/tests")},openPraticalTest:function(t,e){var i=t.id;this.$router.history.push({name:"practical_test_teacher_student",query:{identifier:this.identifier}}),this.$router.push("/form_practical/".concat(i,"/").concat(e))},gridLoaded:function(t){this.sections=this._.get(t,"sections"),0===t.model.total&&this.notifyWarning(this.$vs,this.$t("nenhum-registro-encontrado"),4e3)},filter:function(){this.$refs["grid"].fillCustomFilters([{key:"identifier",value:this.identifier}]),this.$refs["grid"].fetchGridData(),this.updateRouteInFilter()},classSection:function(t,e){var i=this.getSectionAnalytic(e,t);return null!==i?i.finished_at&&null!==i.finished_at?"section-finished":null!==i.started_at?"section-started":"section-not-started":"section-not-started"},getStatisticsAnalyticTotalQuestion:function(t){return t&&t.qtyQuestion?t.qtyQuestion:0},getStatisticsAnalyticTotalQuestionAnswered:function(t,e){var i=this.getSectionAnalytic(e,t);return i&&i.answered_questions?i.answered_questions.length:0},getStatisticsClass:function(t,e){return t!=e?"vs-chip-danger con-color bg-chip-transparent rounded shadow":""},getSectionAnalytic:function(t,e){var i=JSON.parse(t.analytic);if(!i)return null;var s=i.sections.filter((function(t){return t.id===e.id})).shift();return s},updateRouteInFilter:function(){}},mounted:function(){var t=this,e=this._.get(this.$router.history.current.query,"identifier");""!==this.identifier?this.filter():e&&""!==e&&(this.identifier=e,this.filter()),this.practicalTestTeacherService.read(this.teacherId).then((function(e){t.praticalTestName=t._.get(e,"practical_test.questionnaire_name")}))},beforeMount:function(){this.service=n["a"].build(this.$vs),this.praticalTestService=r["a"].build(this.$vs),this.practicalTestTeacherService=c["a"].build(this.$vs)}},l=o,u=(i("9af4"),i("2877")),d=Object(u["a"])(l,s,a,!1,null,null,null);e["default"]=d.exports},"80f6":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i("d4ec"),a=i("bee2"),n=i("8f33"),r=i("262e"),c=i("c0e9"),o=function(t){function e(){return Object(s["a"])(this,e),Object(n["a"])(this,e,arguments)}return Object(r["a"])(e,t),Object(a["a"])(e,null,[{key:"build",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new this(this.resource,null,t)}}])}(c["a"]);o.resource="/api/v1/practical_test_students"},"9af4":function(t,e,i){"use strict";i("49f49")},c6aa:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i("d4ec"),a=i("bee2"),n=i("8f33"),r=i("262e"),c=i("c0e9"),o=function(t){function e(){return Object(s["a"])(this,e),Object(n["a"])(this,e,arguments)}return Object(r["a"])(e,t),Object(a["a"])(e,[{key:"addParticipants",value:function(t,e){return this.post("".concat(t,"/students"),e).then((function(t){return t}))}},{key:"removeParticipant",value:function(t,e){return this.put("".concat(t,"/students/remove"),{participants:e})}},{key:"addTeachers",value:function(t,e){return this.post("".concat(t,"/teachers"),e).then((function(t){return t}))}},{key:"removeTeacher",value:function(t,e){return this.put("".concat(t,"/teachers/remove"),{participants:e})}}],[{key:"build",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new this(this.resource,null,t)}}])}(c["a"]);o.resource="/api/v1/practical_tests"}}]);