(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0bf0e603"],{"033a":function(t,e,n){},1420:function(t,e,n){"use strict";var s=function(){var t=this,e=t._self._c;return e("vs-prompt",{staticClass:"eventprompt",attrs:{"accept-text":t.acceptText,active:t.signaturePromptActive,"cancel-text":null,"change-status-text":t.$t("lnSignature"),color:"green","is-valid":!0,title:t.$t("lnSignature")},on:{"update:active":function(e){t.signaturePromptActive=e},accept:t.onEntityActorSigned,close:t.onClose}},[e("div",{staticClass:"text-align-center p-4"},[e("span",[t._v(" "+t._s(t.subTitle)+" ")])]),e("div",{staticClass:"vx-row mt-2 p-2"},[e("div",{staticClass:"vx-col w-full"},[e("SignatureCanvas")],1)])])},r=[],o=n("bb36"),i=n("81f6"),a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"con-signature"},[e("div",{staticClass:"wrapper",attrs:{id:"signature-canvas-wrapper"}},[e("canvas",{ref:"signature_pad_canvas",staticClass:"signature-pad",attrs:{id:"signature-pad",height:"200",width:"400"},on:{mouseleave:t.onMouseleaveWrapper,touchend:t.onMouseleaveWrapper}})]),e("div",{staticClass:"vx-row mt-2 p-2"},[e("div",{staticClass:"vx-col w-1/2 mt-3"},[e("vs-button",{attrs:{id:"undo"},on:{click:function(e){return e.stopPropagation(),t.onUndo.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("Undo"))+" ")])],1),e("div",{staticClass:"vx-col w-1/2 mt-3"},[e("vs-button",{attrs:{id:"clear"},on:{click:function(e){return e.stopPropagation(),t.onClear.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("Clear"))+" ")])],1)])])},c=[],l=n("90e2"),u={name:"SignatureCanvas",props:{imageFormat:{type:String,default:"png",required:!1}},data:function(){return{signaturePad:null}},mounted:function(){var t=this.$refs.signature_pad_canvas;this.signaturePad=new l["a"](t,{backgroundColor:"rgb(255, 255, 255)"}),window.addEventListener("resize",this.resizeCanvas),this.open&&this.toggleContent()},beforeDestroy:function(){window.removeEventListener("resize",this.resizeCanvas)},methods:{resizeCanvas:function(){var t=this.$refs.signature_pad_canvas,e=Math.max(window.devicePixelRatio||1,1);t.width=t.offsetWidth*e,t.height=t.offsetHeight*e,t.getContext("2d").scale(e,e)},onMouseleaveWrapper:function(){if(this.signaturePad.isEmpty())return null;var t=this.signaturePad.toDataURL("image/"+this.imageFormat);i["a"].$emit("currentSignature",t)},onClear:function(){this.signaturePad.clear();var t=this.signaturePad.toDataURL("image/"+this.imageFormat);i["a"].$emit("currentSignature",t)},onUndo:function(){var t=this.signaturePad.toData();if(t){t.pop(),this.signaturePad.fromData(t);var e=this.signaturePad.toDataURL("image/"+this.imageFormat);i["a"].$emit("currentSignature",e)}}}},d=u,f=(n("2639"),n("2877")),h=Object(f["a"])(d,a,c,!1,null,"e67a0d58",null),v=h.exports;function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,s)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){b(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t,e,n){return e=g(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){var e=_(t,"string");return"symbol"===p(e)?e:String(e)}function _(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!==p(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var S={name:"SignatureHandlerPrompt",components:{SignatureCanvas:v},props:{activeSignatureHandlerPrompt:{type:Boolean,required:!1},entity:{type:Object,default:function(){}},idSchoolDocument:{type:Number,default:0},learnerIdActor:{type:Number,default:0},idActor:{type:Number,default:0}},data:function(){return{signaturePromptActive:!1,status:0,cancelreason:null,dataImage:null,school_id:localStorage.getItem("school_id")}},computed:{subTitle:function(){var t,e,n;return"document"===(null===(t=this.entity)||void 0===t?void 0:t.type)?this.$t("tcMayYouSignTheDocument")+" :":"appeal"===(null===(e=this.entity)||void 0===e?void 0:e.type)?this.$t("tcMayYouSignTheCallSheet")+" :":"questionnaire"===(null===(n=this.entity)||void 0===n?void 0:n.type)?this.$t("MayYouSignTheQuestionnaire"):""},acceptText:function(){var t,e,n;return"document"===(null===(t=this.entity)||void 0===t?void 0:t.type)?this.$t("tcPromiseIHaveReadTheDocument"):"appeal"===(null===(e=this.entity)||void 0===e?void 0:e.type)?this.$t("tcISignThisCallSheet"):"questionnaire"===(null===(n=this.entity)||void 0===n?void 0:n.type)?this.$t("ISignThisQuestionnaire"):""}},watch:{activeSignatureHandlerPrompt:{immediatly:!1,handler:function(t){this.signaturePromptActive=t}}},created:function(){i["a"].$on("currentSignature",this.currentSignature)},beforeDestroy:function(){i["a"].$off("currentSignature",this.currentSignature)},methods:{onEntityActorSigned:function(){var t,e,n=this;0!==this.idActor&&0!==this.idSchoolDocument&&null!==this.idActor&&null!==this.idSchoolDocument?o["a"].post("api/signature/learning-booklet/save/"+this.school_id,{id_school_document:this.idSchoolDocument,learner_id_actor:this.learnerIdActor,id_actor:this.idActor,sign_pad_base64:this.dataImage}).then((function(){i["a"].$emit("docIsSign"),n.$vs.notify({title:n.$t("tcSignatureSuccesfullySaved"),text:"",color:"primary",iconPack:"feather",icon:"CheckSquareIcon"}),n.dataImage=null,n.onClose()})).catch((function(){n.$vs.notify({title:n.$t("NotifyUpdateFailed"),text:"",color:"danger",iconPack:"feather",icon:"CheckSquareIcon"})})):null!==(t=this.entity)&&void 0!==t&&t.type&&null!==(e=this.entity)&&void 0!==e&&e.id?o["a"].post("api/signature/save/"+this.school_id+"/"+this.entity.type+"/"+this.entity.id,y(y({},this.entity),{},{sign_pad_base64:this.dataImage})).then((function(){n.$vs.notify({title:n.$t("tcSignatureSuccesfullySaved"),text:"",color:"primary",iconPack:"feather",icon:"CheckSquareIcon"}),n.dataImage=null,n.onClose()})).catch((function(){n.$vs.notify({title:n.$t("NotifyUpdateFailed"),text:"",color:"danger",iconPack:"feather",icon:"CheckSquareIcon"})})):(i["a"].$emit("currentSign",this.dataImage),i["a"].$emit("quizSignature",this.dataImage),this.onClose())},currentSignature:function(t){this.dataImage=t},onClose:function(){this.$emit("closeActionPrompt",!1)}}},w=S,x=(n("b584"),Object(f["a"])(w,s,r,!1,null,"514bf94e",null));e["a"]=x.exports},2639:function(t,e,n){"use strict";n("2948")},2948:function(t,e,n){},"39a3":function(t,e,n){"use strict";n("033a")},"3c92":function(t,e,n){"use strict";n.r(e);var s=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"dashboard-analytics"}},[null===t.releasenoteInfo||t.releasenoteInfo.error?t._e():e("VsPopup",{attrs:{id:"preview-template-popup",active:t.releasenotePopup,"button-close-hidden":!0,title:"Dernière mise à jour"},on:{"update:active":function(e){t.releasenotePopup=e}}},[e("div",{domProps:{innerHTML:t._s(t.releasenoteInfo.description)}}),e("div",{staticClass:"mt-5",staticStyle:{"text-align":"center"}},[e("vs-button",{on:{click:function(e){return e.stopPropagation(),t.readReleaseNote(t.releasenoteInfo.id)}}},[t._v(" Fermer ")])],1)]),e("div",{staticClass:"vx-row"},[e("div",{staticClass:"vx-col w-full lg:w-6/12 mb-3"},[e("vx-card",{staticClass:"greet-user",staticStyle:{height:"100%"},attrs:{slot:"no-body"},slot:"no-body"},[e("FuturCoursesList")],1)],1),e("div",{staticClass:"vx-col w-full lg:w-6/12 mb-3"},[e("vx-card",{staticStyle:{height:"100%"},attrs:{slot:"no-body"},slot:"no-body"},[e("Attendance")],1)],1)]),e("vs-divider"),e("div",{staticClass:"vx-row"},[e("div",{staticClass:"vx-col w-full lg:w-6/12 mb-3"},[e("vx-card",{attrs:{slot:"no-body"},slot:"no-body"},[e("CoursesList")],1)],1)]),e("div",{staticClass:"vx-row"},[e("div",{staticClass:"vx-col w-full lg:w-6/12 mb-3"},[e("vx-card",{attrs:{slot:"no-body"},slot:"no-body"},[e("TextbookList")],1)],1)])],1)},r=[],o=n("14b7"),i=n.n(o),a=n("c1df"),c=n.n(a),l=n("bb36"),u=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"blocks-tab-page-dashboard"}},[e("vx-card",{staticClass:"greet-user",staticStyle:{height:"100%"},attrs:{slot:"no-body"},slot:"no-body"},[e("vs-col",{attrs:{"vs-align":"center","vs-type":"flex"}},[e("h4",{staticClass:"bold inline mb-2"},[t._v(" "+t._s(t.$t("tcInternMessaging"))+" ")])]),e("vs-divider"),e("vs-table",{ref:"table",attrs:{data:t.messages,"max-items":t.itemsPerPage,"no-data-text":t.$t("tcNoNewMessage")},scopedSlots:t._u([{key:"default",fn:function(n){var s=n.data;return[e("tbody",{staticClass:"max-height"},t._l(s,(function(n,s){return e("vs-tr",{key:s,attrs:{data:n}},[e("div",[e("div",{staticClass:"vx-row"},[e("div",{staticClass:"vx-col w-1/2 mt-3"},[e("vs-col",{attrs:{"vs-align":"center","vs-type":"flex"}},[e("vs-avatar",{attrs:{text:t.$t("tcParisCollege")}}),null!==n.message.title_message?e("p",{staticClass:"inline"},[e("span",{staticClass:"text-primary"},[e("b",[t._v(t._s(n.message.actor.lastname)+" "+t._s(n.message.actor.firstname))])]),e("br"),e("b",[t._v(t._s(n.message.title_message))])]):e("p",{staticClass:"inline"},[t._v(" "+t._s(n.message.actor.lastname)+" "+t._s(n.message.actor.firstname)+" ")])],1)],1),e("div",{staticClass:"vx-col w-1/2 mt-3"},[e("vs-col",{attrs:{"vs-justify":"end","vs-type":"flex"}},[e("p",[t._v("Le "+t._s(t._f("moment")(n.message.date_message,"DD/MM")))])])],1)]),null!==n.message.body_message?e("p",{staticClass:"max-width"},[e("quill-editor",{ref:"myQuillEditor",refInFor:!0,staticClass:"mt-1",attrs:{disabled:"",options:t.editorOptionPrint},model:{value:n.message.body_message,callback:function(e){t.$set(n.message,"body_message",e)},expression:"tr.message.body_message"}})],1):e("p",{staticClass:"font-medium max-w-xs"},[t._v(" "+t._s(t.$t("tcNoContent"))+" ")])])])})),1)]}}]),model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}}),e("div",{staticClass:"center mt-5"},[e("vs-button",{staticClass:"ml-4 d-flex",attrs:{icon:"RotateCcwIcon","icon-pack":"feather",to:"/message-teacher"}},[t._v(" "+t._s(t.$t("tcSeeAllMyMessages"))+" ")])],1)],1)],1)},d=[],f=n("2f62"),h=n("953d");n("a753"),n("8096"),n("14e1");function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,s)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function y(t,e,n){return e=b(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){var e=g(t,"string");return"symbol"===v(e)?e:String(e)}function g(t,e){if("object"!==v(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!==v(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var _={components:{quillEditor:h["quillEditor"]},data:function(){return{selected:[],isMounted:!1,editorOptionPrint:{modules:{toolbar:!1}},itemsPerPage:5,school_id:localStorage.getItem("school_id"),id_actor:i.a.decode(localStorage.getItem("accesstoken")).id_actor}},computed:m({},Object(f["c"])("dataListTeachers",["messages"])),created:function(){this.fetchTeacherMessage({id_school:this.school_id,id_actor:this.id_actor})},methods:m({},Object(f["b"])("dataListTeachers",["fetchTeacherMessage"]))},S=_,w=(n("91ac"),n("8b82"),n("2877")),x=Object(w["a"])(S,u,d,!1,null,null,null),C=x.exports,O=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"futur-courses-dashboard"}},[e("vx-card",{staticClass:"greet-user",staticStyle:{height:"100%"},attrs:{slot:"no-body"},slot:"no-body"},[e("vs-col",{attrs:{"vs-align":"center","vs-type":"flex"}},[e("h4",{staticClass:"bold inline mb-2"},[t._v(" "+t._s(t.$t("tcNextCourse"))+" ")])]),e("vs-divider"),e("vs-table",{ref:"table",attrs:{data:t.courses,"max-items":t.itemsPerPage,"no-data-text":t.$t("datatable_no_data_available")},scopedSlots:t._u([{key:"default",fn:function(n){var s=n.data;return[e("tbody",{staticClass:"max-height"},t._l(s,(function(n,s){return e("vs-tr",{key:s,attrs:{data:n}},[e("vs-td",[e("p",[e("b",[t._v(t._s(t._f("moment")(n.event.start,"DD/MM/YYYY")))])]),e("p",[t._v(t._s(t._f("moment")(n.event.start,"HH:mm"))+" - "+t._s(t._f("moment")(n.event.end,"HH:mm")))])]),e("vs-td",[e("p",[t._v(t._s(n.label))])]),e("vs-td",[e("p",[t._v(t._s(n.mSess.pSess?n.mSess.pSess.pSess.name:n.mSess.session.name))])])],1)})),1)]}}])},[e("template",{slot:"thead"},[e("vs-th",[t._v(t._s(t.$t("tcDate")))]),e("vs-th",[t._v(t._s(t.$t("Course")))]),e("vs-th",[t._v(t._s(t.$t("Session")))])],1)],2),e("div",{staticClass:"center mt-5"},[e("vs-button",{staticClass:"ml-4 d-flex",attrs:{icon:"RotateCcwIcon","icon-pack":"feather",to:"/my-planning-teacher"}},[t._v(" "+t._s(t.$t("tcSeePlanning"))+" ")])],1)],1)],1)},P=[],j={data:function(){return{selected:[],isMounted:!1,itemsPerPage:5,school_id:localStorage.getItem("school_id"),id_actor:i.a.decode(localStorage.getItem("accesstoken")).id_actor,courses:[]}},created:function(){var t=this;l["a"].get("api/erp/session_course/current-user-extranet/"+this.school_id+"/?entity_type=teach&entity_id="+this.id_actor).then((function(e){t.courses=e.data}))}},$=j,L=(n("4e18"),n("39a3"),Object(w["a"])($,O,P,!1,null,null,null)),k=L.exports,I=function(){var t=this,e=t._self._c;return e("div",{staticClass:"data-list-container",attrs:{id:"attendance-dashboard"}},[e("vx-card",{staticClass:"greet-user",staticStyle:{height:"100%"},attrs:{slot:"no-body"},slot:"no-body"},[e("vs-col",{attrs:{"vs-align":"center","vs-type":"flex"}},[e("h4",{staticClass:"bold inline mb-2"},[t._v(" "+t._s(t.$t("tcCallSheets"))+" ")])]),e("vs-divider"),e("SignatureHandlerPrompt",{attrs:{"active-signature-handler-prompt":t.activeAppealSignaturePrompt,entity:t.entity},on:{closeActionPrompt:t.closeActionPrompt}}),e("vs-table",{ref:"table",attrs:{data:t.displayAttendances,"max-items":t.itemsPerPage,"no-data-text":t.$t("datatable_no_data_available")},scopedSlots:t._u([{key:"default",fn:function(n){var s=n.data;return[e("tbody",{staticClass:"max-height"},t._l(s,(function(n,s){return e("vs-tr",{key:s,attrs:{data:n}},[e("vs-td",{staticClass:"whitespace-no-wrap"},[t.isLocalSignContext&&n.session_courses[0]&&t.idSessionCourse.includes(n.session_courses[0].id_session_course)?e("div",{staticClass:"vx-row"},[e("div",{staticClass:"vx-col w-1/2 mt-3"},[e("feather-icon",{staticClass:"ml-2",attrs:{icon:"Edit3Icon","svg-classes":"w-6 h-6 hover:text-danger stroke-current",title:"Signer"},on:{click:function(e){return e.stopPropagation(),t.onSignatureOpenPrompt(n.session_courses[0].id_session_course)}}})],1),e("div",{staticClass:"vx-col w-1/2 mt-3"},[e("router-link",{attrs:{target:"_blank",to:"/session-course-detail/"+n.id_event}},[e("feather-icon",{staticClass:"ml-2",attrs:{icon:"ExternalLinkIcon","svg-classes":"w-5 h-5 hover:text-primary stroke-current",title:t.$t("Details_btn")}})],1)],1)]):e("div",[e("div",{staticClass:"mt-3"},[e("router-link",{attrs:{target:"_blank",to:"/session-course-detail/"+n.id_event}},[e("feather-icon",{staticClass:"ml-2",attrs:{icon:"ExternalLinkIcon","svg-classes":"w-5 h-5 hover:text-primary stroke-current",title:t.$t("Details_btn")}})],1)],1)])]),e("vs-td",[e("p",{staticClass:"product-name font-medium truncate"},[e("b",[t._v(t._s(t._f("moment")(n.date_begin,"DD/MM/YYYY")))])]),e("p",{staticClass:"product-name font-medium truncate"},[t._v(" "+t._s(t._f("moment")(n.date_begin,"HH:mm"))+" ")])]),e("vs-td",[n.session_courses.length>0?e("p",{staticClass:"product-name font-medium truncate"},[t._v(" "+t._s(n.session_courses[0].label)+" ")]):t._e()]),e("vs-td",[n.session_courses.length>0&&n.session_courses[0].mSess?e("p",{staticClass:"product-name font-medium truncate"},[t._v(" "+t._s(t.parentSessionValueByKeyed(n.session_courses[0].mSess,"name"))+" ")]):e("p",{staticClass:"product-name font-medium truncate"},[t._v(" - ")]),n.sharedSessions&&n.sharedSessions.length>0?e("ul",t._l(n.sharedSessions,(function(n,s){return e("li",{key:s},[e("span",[t._v(" "+t._s(n.name)+" ")])])})),0):t._e()]),e("vs-td",[n.session_courses[0]&&t.idSessionCourse.includes(n.session_courses[0].id_session_course)?e("p",{staticClass:"product-name font-medium truncate"},[t._v(" "+t._s(t.$t("tcYes"))+" "),e("feather-icon",{attrs:{icon:"CheckIcon","svg-classes":"h-5 w-5 text-success"}})],1):e("p",{staticClass:"product-name font-medium truncate"},[t._v(" "+t._s(t.$t("tcNo"))+" "),e("feather-icon",{attrs:{icon:"XIcon","svg-classes":"h-5 w-5 text-danger"}})],1)]),e("vs-td",[n.session_courses.length>0&&n.session_courses[0].mSess?e("p",{staticClass:"product-name font-medium truncate"},[t._v(" "+t._s(t.parentSessionValueByKeyed(n.session_courses[0].mSess,"school"))+" ")]):t._e(),n.sharedSessions&&n.sharedSessions.length>0?e("ul",t._l(n.sharedSessions,(function(n,s){return e("li",{key:s},[e("span",[t._v(" "+t._s(t.parentSessionValueByKeyed(n,"school"))+" ")])])})),0):t._e()]),t.isLocalSignContext?e("vs-td",[e("span",[t._v(" "+t._s(n.statsSigned)+" ")])]):t._e(),t.isLocalSignContext?e("vs-td",[n.signature?e("img",{staticClass:"img-size",attrs:{src:n.signature}}):n.session_courses[0]&&t.idSessionCourse.includes(n.session_courses[0].id_session_course)?e("p",[e("span",{staticClass:"text-danger"},[t._v(t._s(t.$t("tcRequiredSignature")))])]):t._e()]):t._e()],1)})),1)]}}]),model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}},[e("template",{slot:"thead"},[e("vs-th",[t._v(t._s(t.$t("tcActions")))]),e("vs-th",[t._v(t._s(t.$t("tcDate")))]),e("vs-th",[t._v(t._s(t.$t("Course")))]),e("vs-th",[t._v(t._s(t.$t("tcSession")))]),e("vs-th",[t._v(t._s(t.$t("tcCall")))]),e("vs-th",[t._v(t._s(t.$t("school")))]),t.isLocalSignContext?e("vs-th",[t._v(" "+t._s(t.$t("tcLearnerSignature"))+" ")]):t._e(),t.isLocalSignContext?e("vs-th",[t._v(" "+t._s(t.$t("tcSignature"))+" ")]):t._e()],1)],2),e("div",{staticClass:"center mt-5"},[e("vs-button",{staticClass:"ml-4 d-flex",attrs:{icon:"RotateCcwIcon","icon-pack":"feather",to:"/my-attendances"}},[t._v(" "+t._s(t.$t("tcSeeAllCallSheets"))+" ")])],1)],1)],1)},D=[],E=n("cb0a"),A=E["a"],T=(n("7e6b"),Object(w["a"])(A,I,D,!1,null,null,null)),N=T.exports,M=function(){var t=this,e=t._self._c;return e("div",{staticClass:"data-list-container",attrs:{id:"course-list-view-dashboard"}},[e("vx-card",{staticClass:"greet-user",staticStyle:{height:"100%"},attrs:{slot:"no-body"},slot:"no-body"},[e("vs-col",{attrs:{"vs-align":"center","vs-type":"flex"}},[e("h4",{staticClass:"bold inline mb-2"},[t._v(" "+t._s(t.$t("tcMyModules"))+" ")])]),e("vs-divider"),e("vs-table",{ref:"table",attrs:{data:t.filteredCoursesList,"max-items":t.itemsPerPage,"no-data-text":t.$t("datatable_no_data_available")},scopedSlots:t._u([{key:"default",fn:function(n){var s=n.data;return[e("tbody",t._l(s,(function(n,s){var r;return e("vs-tr",{key:s,attrs:{data:n}},[e("vs-td",[e("p",{staticClass:"font-medium"},[t._v(" "+t._s(n.courseName)+" ")]),n.courseName!==n.sessionModuleName?e("p",{staticClass:"font-light"},[t._v(" "+t._s(n.sessionModuleName)+" ")]):t._e()]),e("vs-td",[e("p",{staticClass:"font-medium"},[t._v(" "+t._s(n.sessionName)+" ")])]),e("vs-td",{staticClass:"flex-start"},[e("vs-list",{attrs:{id:"listSchools"}},t._l(n.schools,(function(n,s){return e("vs-list-item",{key:s,staticClass:"font-medium"},[t._v(" "+t._s(n.label)+" ")])})),1)],1),n.syllabusDocuments.length>0&&"Syllabus"===(null===(r=n.syllabusDocuments[0])||void 0===r?void 0:r.type_session_document)?e("vs-td",[e("feather-icon",{staticClass:"ml-2",attrs:{icon:"CheckIcon","svg-classes":" w-5 h-5 primary text-success stroke-current"}})],1):e("vs-td",[e("feather-icon",{staticClass:"ml-2",attrs:{icon:"UploadCloudIcon","svg-classes":"w-5 h-5 hover:text-primary stroke-current",title:"Upload"},on:{click:function(e){return t.showSyllabusPopup(n)}}})],1),e("vs-td",{staticClass:"whitespace-no-wrap"},[e("div",{staticClass:"vx-row"},[e("a",{attrs:{href:"/course-detail/".concat(n.ref_id,"/").concat(n.sessionId)},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.$router.push("/course-detail/".concat(n.ref_id,"/").concat(n.sessionId))}}},[e("feather-icon",{staticClass:"ml-2",attrs:{icon:"ExternalLinkIcon","svg-classes":"w-5 h-5 hover:text-primary stroke-current",title:t.$t("Details_btn")}})],1)])])],1)})),1)]}}])},[e("template",{slot:"thead"},[e("vs-th",[t._v(t._s(t.$t("Course")))]),e("vs-th",[t._v(t._s(t.$t("Session")))]),e("vs-th",[t._v(t._s(t.$t("school")))]),e("vs-th",[t._v("Syllabus")]),e("vs-th",[t._v(t._s(t.$t("tcActions")))])],1)],2),e("div",{staticClass:"center mt-5"},[e("vs-button",{staticClass:"ml-4 d-flex",attrs:{icon:"RotateCcwIcon","icon-pack":"feather",to:"/my-session"}},[t._v(" "+t._s(t.$t("tcSeeMyModules"))+" ")])],1)],1),e("vs-popup",{attrs:{active:t.popUpSyllabus,"button-close-hidden":!0,title:"Ajout syllabus: ".concat(t.syllabusData?t.syllabusData.courseName:"")},on:{"update:active":function(e){t.popUpSyllabus=e}}},[null!==t.syllabusData.ref_id?e("div",{staticClass:"flex-row"},[e("div",{staticClass:"mt-2 flex"},[e("span",[t._v(t._s(t.$t("LinkedToAllSession")))]),e("vs-checkbox",{staticClass:"mr-4",attrs:{checked:!0===t.isLinked,label:"Oui"},on:{change:function(e){return t.handleLinkedChange()}},model:{value:t.isLinked,callback:function(e){t.isLinked=e},expression:"isLinked"}})],1)]):t._e(),e("vs-row",{attrs:{"vs-align":"center","vs-justify":"center","vs-type":"flex","vs-w":"12"}},[e("vs-col",{staticClass:"mt-2",attrs:{"vs-align":"center","vs-justify":"center","vs-type":"flex","vs-w":"12","vs-xs":"12"}},[e("vs-input",{staticClass:"mt-2 w-full",attrs:{label:"".concat(t.$t("lnTitle")," *"),placeholder:"".concat(t.$t("lnTitle"),"...")},model:{value:t.syllabusName,callback:function(e){t.syllabusName=e},expression:"syllabusName"}})],1)],1),e("vs-row",{attrs:{"vs-align":"center","vs-justify":"center","vs-type":"flex"}},[e("vs-col",{staticClass:"mt-2",attrs:{"vs-align":"center","vs-justify":"end","vs-type":"flex","vs-w":"12"}},[e("VsUpload",{ref:"fileUploadComponent",attrs:{accept:"*",limit:1}})],1)],1),e("vs-row",{attrs:{"vs-align":"center","vs-justify":"center","vs-type":"flex","vs-w":"12","vs-xs":"12"}},[e("vs-col",{staticClass:"mt-4",attrs:{"vs-align":"center","vs-justify":"center","vs-type":"flex","vs-w":"4","vs-xs":"12"}},[e("vs-button",{attrs:{color:"danger",type:"border"},on:{click:function(e){return t.closePopup()}}},[t._v(" "+t._s(t.$t("tcCancel"))+" ")])],1),e("vs-col",{staticClass:"mt-4",attrs:{"vs-align":"center","vs-justify":"center","vs-type":"flex","vs-w":"4","vs-xs":"12"}},[e("vs-button",{attrs:{color:"primary",disabled:0===t.syllabusName.length,type:"filled"},on:{click:function(e){return t.submitSyllabus(t.syllabusData)}}},[t._v(" "+t._s(t.$t("tcSave"))+" ")])],1)],1)],1)],1)},F=[],U=n("4a7a"),R=n.n(U),Y=n("503a");function H(t){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H(t)}function B(){B=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch($){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new O(r||[]);return s(i,"_invoke",{value:S(t,n,a)}),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch($){return{type:"throw",arg:$}}}t.wrap=l;var d={};function f(){}function h(){}function v(){}var p={};c(p,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(P([])));y&&y!==e&&n.call(y,o)&&(p=y);var b=v.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(s,o,i,a){var c=u(t[s],t,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==H(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(d).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,a)}))}a(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function s(){return new e((function(e,s){r(t,n,e,s)}))}return o=o?o.then(s,s):s()}})}function S(t,e,n){var s="suspendedStart";return function(r,o){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===r)throw o;return j()}for(n.method=r,n.arg=o;;){var i=n.delegate;if(i){var a=w(i,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===s)throw s="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);s="executing";var c=u(t,e,n);if("normal"===c.type){if(s=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(s="completed",n.method="throw",n.arg=c.arg)}}}function w(t,e){var n=e.method,s=t.iterator[n];if(void 0===s)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var r=u(s,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,r=function e(){for(;++s<t.length;)if(n.call(t,s))return e.value=t[s],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:j}}function j(){return{value:void 0,done:!0}}return h.prototype=v,s(b,"constructor",{value:v,configurable:!0}),s(v,"constructor",{value:h,configurable:!0}),h.displayName=c(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(_.prototype),c(_.prototype,i,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,s,r,o){void 0===o&&(o=Promise);var i=new _(l(e,n,s,r),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var s in e)n.push(s);return n.reverse(),function t(){for(;n.length;){var s=n.pop();if(s in e)return t.value=s,t.done=!1,t}return t.done=!0,t}},t.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function s(n,s){return i.type="throw",i.arg=t,e.next=n,s&&(e.method="next",e.arg=void 0),!!s}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return s("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return s(o.catchLoc,!0);if(this.prev<o.finallyLoc)return s(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return s(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return s(o.finallyLoc)}}}},abrupt:function(t,e){for(var s=this.tryEntries.length-1;s>=0;--s){var r=this.tryEntries[s];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var s=n.completion;if("throw"===s.type){var r=s.arg;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function G(t,e,n,s,r,o,i){try{var a=t[o](i),c=a.value}catch(l){return void n(l)}a.done?e(c):Promise.resolve(c).then(s,r)}function q(t){return function(){var e=this,n=arguments;return new Promise((function(s,r){var o=t.apply(e,n);function i(t){G(o,s,r,i,a,"next",t)}function a(t){G(o,s,r,i,a,"throw",t)}i(void 0)}))}}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,s)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){W(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function W(t,e,n){return e=K(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K(t){var e=Q(t,"string");return"symbol"===H(e)?e:String(e)}function Q(t,e){if("object"!==H(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!==H(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var J={components:{vSelect:R.a,VsUpload:Y["a"]},data:function(){return{idSchool:localStorage.getItem("school_id"),idActor:i.a.decode(localStorage.getItem("accesstoken")).id_actor,itemsPerPage:5,isMounted:!1,filtersDisplayed:!1,filterSessionSelect:[],filterSession:null,filterProgramSelect:[],filterProgram:null,filterSchoolSelect:[],filterSchool:null,syllabusData:{},syllabusName:"",isLinked:!1,popUpSyllabus:!1}},computed:z(z({},Object(f["c"])("dataListTeachers",["courses"])),{},{currentPage:function(){return this.isMounted&&this.$refs.table?this.$refs.table.currentx:1},coursesList:function(){var t=this;return this.courses.map((function(e){e.courseName=e.course_erp.label_i18n&&e.course_erp.label_i18n[t.$i18n.locale]?e.course_erp.label_i18n[t.$i18n.locale]:e.course_erp.label,e.sessionModuleName=e.name;var n="Bloc"===e.pSess.type?e.pSess.pSess:e.pSess;return e.sessionName=n.name,e.sessionId=n.id_session,e.schools=n.asso_school_sessions.map((function(t){return t.school})),e.syllabusDocuments=e.syllabusDocuments||[],e}))},filteredCoursesList:function(){var t=this;return this.coursesList.filter((function(e){return null===t.filterSession||e.sessionName===t.filterSession})).filter((function(e){return null===t.filterSchool||e.schools.find((function(e){return e.id_school===t.filterSchool.id_school}))}))}}),created:function(){var t=this;this.fetchCoursesTeacher({id_actor:this.idActor}).then((function(){t.filterSessionSelect=t.coursesList.map((function(t){return t.sessionName})).filter((function(t,e,n){return n.indexOf(t)===e})),t.filterSchoolSelect=t.coursesList.map((function(t){return t.schools})).flat().filter((function(t,e,n){return n.findIndex((function(e){return e.id_school===t.id_school}))===e}))}))},mounted:function(){this.isMounted=!0},methods:z(z({},Object(f["b"])("dataListTeachers",["fetchCoursesTeacher","teacherAddSyllabus"])),{},{submitSyllabus:function(t){var e=this;return q(B().mark((function n(){var s,r,o,i;return B().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(n.prev=0,s=e.$refs.fileUploadComponent.getFilesToUpload(),r=s.find((function(t){return t})),r){n.next=6;break}return e.$vs.notify({title:e.$t("Error"),text:e.$t("AddFile"),color:"danger"}),n.abrupt("return");case 6:return o=new FormData,o.append("id_session",t.id_session),o.append("label_session_document",e.syllabusName),o.append("ref_id",!0===e.isLinked?t.ref_id:null),o.append("id_actor",e.idActor),o.append("entity_id_session_document",t.pSess.id_session),o.append("file",r,r.name),e.$vs.loading({type:"loading"}),n.next=16,e.teacherAddSyllabus(o);case 16:n.sent,e.$vs.loading.close(),e.popUpSyllabus=!1,e.$refs.fileUploadComponent.resetFiles(),e.syllabusName="",e.isLinked=!1,i=e.courses.findIndex((function(e){return e.sessionId===t.sessionId})),-1!==i&&(e.courses[i].syllabusDocuments.push({type_session_document:"Syllabus"}),e.$forceUpdate()),e.$vs.notify({title:e.$t("Success"),text:e.$t("UploadSyllabusDone"),color:"success"}),n.next=31;break;case 27:n.prev=27,n.t0=n["catch"](0),e.$vs.loading.close(),e.$vs.notify({title:e.$t("Error"),text:e.$t("UploadSyllabusNotDone"),color:"danger"});case 31:case"end":return n.stop()}}),n,null,[[0,27]])})))()},showSyllabusPopup:function(t){this.popUpSyllabus=!0,this.syllabusData=t},closePopup:function(){this.popUpSyllabus=null,this.$refs.fileUploadComponent.resetFiles(),this.syllabusName="",this.isLinked=!1,this.syllabusData={}}})},X=J,Z=(n("e054"),n("a7af"),Object(w["a"])(X,M,F,!1,null,null,null)),tt=Z.exports,et=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"student-tab-page"}},[e("vx-card",{staticClass:"greet-user",staticStyle:{height:"100%"},attrs:{slot:"no-body"},slot:"no-body"},[e("vs-col",{attrs:{"vs-align":"center","vs-type":"flex"}},[e("h4",{staticClass:"bold inline mb-2"},[t._v(" "+t._s(t.$t("tcTextBook"))+" ")])]),e("vs-divider"),e("transition",{attrs:{name:"fade"}},[e("vs-table",{ref:"table",attrs:{data:t.filteredCoursesList,"max-items":t.itemsPerPage,"no-data-text":t.$t("datatable_no_data_available"),pagination:""},scopedSlots:t._u([{key:"default",fn:function(n){var s=n.data;return[e("tbody",t._l(s,(function(n,s){return e("vs-tr",{key:s,attrs:{data:n}},[e("vs-td",[e("p",{staticClass:"font-medium"},[t._v(" "+t._s(n.label)+" ")])]),e("vs-td",[e("p",{staticClass:"font-medium"},[t._v(" "+t._s(t.$t("tcThe"))+" "+t._s(t.$moment(n.event.date_begin).format("DD/MM/YYYY"))+", "+t._s(t.$t("tcFrom"))+" "+t._s(t.$moment(n.event.date_begin).format("HH:mm"))+" "+t._s(t.$t("To"))+" "+t._s(t.$moment(n.event.date_end).format("HH:mm"))+" ")])]),e("vs-td",{staticClass:"whitespace-no-wrap"},[e("div",{staticClass:"vx-col w-1/2 mt-3",on:{click:function(e){return e.stopPropagation(),t.openSidebar(n)}}},[e("feather-icon",{staticClass:"ml-2",attrs:{icon:"EditIcon","svg-classes":"w-5 h-5 hover:text-primary stroke-current"}})],1)])],1)})),1)]}}])},[e("template",{slot:"thead"},[e("vs-th",[t._v(t._s(t.$t("Label")))]),e("vs-th",[t._v("Date")]),e("vs-th",[t._v("Actions")])],1)],2)],1),e("div",{staticClass:"center mt-5"},[e("vs-button",{staticClass:"ml-4 d-flex",attrs:{icon:"RotateCcwIcon","icon-pack":"feather",to:"/my-text-book"}},[t._v(" "+t._s(t.$t("tcSeeMyTextBook"))+" ")])],1)],1),e("vs-sidebar",{staticClass:"session-course-form-sidebar items-no-padding",attrs:{id:"session-course-form-sidebar","click-not-close":"",color:"primary","default-index":"1",parent:"body","position-right":"",spacer:""},model:{value:t.isSidebarActiveLocal,callback:function(e){t.isSidebarActiveLocal=e},expression:"isSidebarActiveLocal"}},[e("VuePerfectScrollbar",{staticClass:"scroll-area-session-course-form-sidebar",attrs:{settings:t.settings}},[e("div",{staticClass:"vx-col w-full lg:w-12/12"},[e("vx-card",[e("h4",[t._v(" "+t._s(t.dataSidebar.label)+" "),t.dataSidebar.event?e("span",[t._v(" - "+t._s(t.$moment(t.dataSidebar.event.date_begin).format("DD/MM/YYYY"))+", "+t._s(t.$t("tcFrom"))+" "+t._s(t.$moment(t.dataSidebar.event.date_begin).format("HH:mm"))+" "+t._s(t.$t("To"))+" "+t._s(t.$moment(t.dataSidebar.event.date_end).format("HH:mm"))+" ")]):t._e()]),e("div",{staticClass:"mt-4 mb-8"},[e("vs-textarea",{staticClass:"w-full mt-4",attrs:{disabled:!t.dataSidebar.id_session_course,label:"Objectifs pédagogiques"},model:{value:t.dataSidebar.description,callback:function(e){t.$set(t.dataSidebar,"description",e)},expression:"dataSidebar.description"}})],1),e("div",{staticClass:"mt-4 mb-8"},[e("vs-textarea",{staticClass:"w-full mt-4",attrs:{disabled:!t.dataSidebar.id_session_course,label:"Contenu"},model:{value:t.dataSidebar.goals,callback:function(e){t.$set(t.dataSidebar,"goals",e)},expression:"dataSidebar.goals"}})],1),e("div",{staticClass:"mt-5"},[e("h6",[t._v("Ressources :")]),e("small",[e("i",[t._v("30mb max | "+t._s(t.$t("UnauthorizedAccent")))])]),e("VsUpload",{ref:"fileUploadComponents",attrs:{accept:"application/*, image/*, .pptx, .ppt, .txt, .odt,.ott,.odd,.ots,.odp,.otp,",limit:1,"show-upload-button":!1}})],1)])],1)]),e("div",[e("vs-button",{staticClass:"mx-4 mt-6",attrs:{id:"save"},on:{click:function(e){return e.stopPropagation(),t.updateData(t.dataSidebar)}}},[t._v(" "+t._s(t.$t("Save"))+" ")]),e("vs-button",{attrs:{id:"changeStatus",color:"danger",type:"border"},on:{click:function(e){t.isSidebarActiveLocal=!1}}},[t._v(" "+t._s(t.$t("Cancel"))+" ")])],1)],1)],1)},nt=[],st=n("9d63"),rt=n.n(st);function ot(t){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ot(t)}function it(){it=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch($){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new O(r||[]);return s(i,"_invoke",{value:S(t,n,a)}),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch($){return{type:"throw",arg:$}}}t.wrap=l;var d={};function f(){}function h(){}function v(){}var p={};c(p,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(P([])));y&&y!==e&&n.call(y,o)&&(p=y);var b=v.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(s,o,i,a){var c=u(t[s],t,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==ot(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(d).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,a)}))}a(c.arg)}var o;s(this,"_invoke",{value:function(t,n){function s(){return new e((function(e,s){r(t,n,e,s)}))}return o=o?o.then(s,s):s()}})}function S(t,e,n){var s="suspendedStart";return function(r,o){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===r)throw o;return j()}for(n.method=r,n.arg=o;;){var i=n.delegate;if(i){var a=w(i,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===s)throw s="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);s="executing";var c=u(t,e,n);if("normal"===c.type){if(s=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(s="completed",n.method="throw",n.arg=c.arg)}}}function w(t,e){var n=e.method,s=t.iterator[n];if(void 0===s)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var r=u(s,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,r=function e(){for(;++s<t.length;)if(n.call(t,s))return e.value=t[s],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:j}}function j(){return{value:void 0,done:!0}}return h.prototype=v,s(b,"constructor",{value:v,configurable:!0}),s(v,"constructor",{value:h,configurable:!0}),h.displayName=c(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(_.prototype),c(_.prototype,i,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,s,r,o){void 0===o&&(o=Promise);var i=new _(l(e,n,s,r),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var s in e)n.push(s);return n.reverse(),function t(){for(;n.length;){var s=n.pop();if(s in e)return t.value=s,t.done=!1,t}return t.done=!0,t}},t.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function s(n,s){return i.type="throw",i.arg=t,e.next=n,s&&(e.method="next",e.arg=void 0),!!s}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return s("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return s(o.catchLoc,!0);if(this.prev<o.finallyLoc)return s(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return s(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return s(o.finallyLoc)}}}},abrupt:function(t,e){for(var s=this.tryEntries.length-1;s>=0;--s){var r=this.tryEntries[s];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var s=n.completion;if("throw"===s.type){var r=s.arg;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function at(t,e,n,s,r,o,i){try{var a=t[o](i),c=a.value}catch(l){return void n(l)}a.done?e(c):Promise.resolve(c).then(s,r)}function ct(t){return function(){var e=this,n=arguments;return new Promise((function(s,r){var o=t.apply(e,n);function i(t){at(o,s,r,i,a,"next",t)}function a(t){at(o,s,r,i,a,"throw",t)}i(void 0)}))}}function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,s)}return n}function ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(n),!0).forEach((function(e){dt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function dt(t,e,n){return e=ft(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ft(t){var e=ht(t,"string");return"symbol"===ot(e)?e:String(e)}function ht(t,e){if("object"!==ot(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!==ot(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var vt={components:{VuePerfectScrollbar:rt.a,VsUpload:Y["a"]},data:function(){return{idSchool:localStorage.getItem("school_id"),idActor:i.a.decode(localStorage.getItem("accesstoken")).id_actor,itemsPerPage:5,isMounted:!1,selectedCourse:null,isSidebarActiveLocal:!1,dataSidebar:{},settings:{maxScrollbarLength:60,wheelSpeed:.6}}},computed:ut(ut({},Object(f["c"])("dataListTeachers",["sessionCoursesByTeacher"])),{},{currentPage:function(){return this.isMounted&&this.$refs.table?this.$refs.table.currentx:1},coursesList:function(){return this.sessionCoursesByTeacher},filteredCoursesList:function(){var t,e=this;return null===(t=this.coursesList)||void 0===t?void 0:t.sort((function(t,n){var s,r;return(null!==(s=n.event)&&void 0!==s&&s.date_begin?e.$moment(n.event.date_begin).valueOf():0)-(null!==(r=t.event)&&void 0!==r&&r.date_begin?e.$moment(t.event.date_begin).valueOf():0)})).filter((function(t){return null===e.selectedCourse||t.label===e.selectedCourse})).filter((function(t){var n;return e.$moment().isAfter(e.$moment(null===(n=t.event)||void 0===n?void 0:n.date_end))&&null===t.description&&null===t.goals&&null===t.resources&&4!==t.id_session_course_status}))}}),created:function(){this.fetchSessionCoursesListItemsByTeacher({id_actor:this.idActor})},mounted:function(){this.isMounted=!0},methods:ut(ut({},Object(f["b"])("dataListTeachers",["fetchSessionCoursesListItemsByTeacher","updateSessionCourses","updateSessionCourseResources"])),{},{updateData:function(t){var e=this,n=this.$refs.fileUploadComponents.getFilesToUpload();if(n.length>0){var s=new FormData;n.forEach((function(t){s.append("files[]",t,t.name)})),this.updateSessionCourses({id_session_course:t.id_session_course,description:this.dataSidebar.description,goals:this.dataSidebar.goals}).then((function(){e.updateSessionCourseResources({formData:s,id_session_course:t.id_session_course}).then(ct(it().mark((function t(){return it().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.fetchSessionCoursesListItemsByTeacher({id_actor:e.idActor}),e.$refs.fileUploadComponents.removeFile(0),e.isSidebarActiveLocal=!1,e.$vs.notify({title:e.$t("NotifyRecordingCompleted"),color:"success",iconPack:"feather",icon:"CheckSquareIcon"});case 4:case"end":return t.stop()}}),t)})))).catch((function(t){e.notify(e.$t("NotifyRecordingFailed"),"danger",t),e.$vs.loading.close()}))})).catch((function(t){e.notify(e.$t("NotifyRecordingFailed"),"danger",t),e.$vs.loading.close()}))}else this.updateSessionCourses({id_session_course:t.id_session_course,description:this.dataSidebar.description,goals:this.dataSidebar.goals}).then((function(){e.fetchSessionCoursesListItemsByTeacher({id_actor:e.idActor}),e.isSidebarActiveLocal=!1,e.$vs.notify({title:e.$t("NotifyRecordingCompleted"),color:"success",iconPack:"feather",icon:"CheckSquareIcon"})})).catch((function(t){e.notify(e.$t("NotifyRecordingFailed"),"danger",t),e.$vs.loading.close()}))},openSidebar:function(t){this.isSidebarActiveLocal=!0,this.dataSidebar=t}})},pt=vt,mt=(n("e72b"),n("bda6"),Object(w["a"])(pt,et,nt,!1,null,null,null)),yt=mt.exports;function bt(t){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(t)}function gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,s)}return n}function _t(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gt(Object(n),!0).forEach((function(e){St(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function St(t,e,n){return e=wt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t){var e=xt(t,"string");return"symbol"===bt(e)?e:String(e)}function xt(t,e){if("object"!==bt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!==bt(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function Ct(t){return $t(t)||jt(t)||Pt(t)||Ot()}function Ot(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pt(t,e){if(t){if("string"===typeof t)return Lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(t,e):void 0}}function jt(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function $t(t){if(Array.isArray(t))return Lt(t)}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,s=new Array(e);n<e;n++)s[n]=t[n];return s}var kt={components:{MessageView:C,FuturCoursesList:k,Attendance:N,CoursesList:tt,TextbookList:yt},filters:{changedatefilter:function(t){return c()(t).format("Do MMMM YYYY")}},data:function(){return{school_id:localStorage.getItem("school_id"),idActor:i.a.decode(localStorage.getItem("accesstoken")).id_actor,releasenotePopup:!1,releasenoteInfo:null}},computed:{user_displayName:function(){var t=i.a.decode(localStorage.getItem("accesstoken"));return t.firstname+" "+t.lastname}},created:function(){var t=this;this.getReleaseNotes(),l["a"].get("api/school/"+localStorage.getItem("school_id")).then((function(e){t.dateStart=e.data.filter((function(t){return t.id_school==localStorage.getItem("school_id")}))[0].back_to_school_date}));for(var e=c()(new Date).subtract(15,"week"),n=[],s=0;s<16;s++)n=[].concat(Ct(n),[e.format()]),e.add(1,"week");this.globalChartOptions=_t(_t({},this.globalChartOptions),{},{labels:n}),window.addEventListener("scroll",this.handleScroll)},methods:{handleScroll:function(){window.scrollY>600&&0==this.pass&&(this.siaGraph(localStorage.getItem("school_id")),this.pass=!0)},getReleaseNotes:function(){var t=this;l["a"].get("/api/release/get_latest_release_extranet/"+this.school_id+"/"+this.idActor).then((function(e){t.releasenoteInfo=e.data,l["a"].get("/api/release/get_read_release/"+t.school_id+"/"+t.idActor+"/"+t.releasenoteInfo.id).then((function(e){null!==t.releasenoteInfo&&""!==t.releasenoteInfo&&null===e.data.data?t.releasenotePopup=!0:t.releasenotePopup=!1})).catch((function(t){}))})).catch((function(t){}))},readReleaseNote:function(t){var e=this;l["a"].post("/api/release/create_read_release/"+this.school_id+"/"+this.idActor+"/"+t).then((function(){e.releasenotePopup=!1})).catch((function(t){}))}}},It=kt,Dt=(n("7eec"),Object(w["a"])(It,s,r,!1,null,null,null));e["default"]=Dt.exports},"40e1":function(t,e,n){},"4e18":function(t,e,n){"use strict";n("b4fb")},"503a":function(t,e,n){"use strict";var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"con-upload"},[e("div",{staticClass:"con-img-upload"},[t._l(t.getFilesFilter,(function(n,s){return e("div",{key:s,staticClass:"img-upload",class:{fileError:n.error,removeItem:t.itemRemove.includes(s)}},[100===n.percent?e("button",{staticClass:"btn-down-file",attrs:{type:"button"}},[e("i",{staticClass:"material-icons notranslate",attrs:{translate:"no"}},[t._v(" get_app ")])]):t._e(),e("button",{staticClass:"btn-x-file",attrs:{type:"button"},on:{click:function(e){return t.removeFile(s)}}},[e("i",{staticClass:"material-icons notranslate",attrs:{translate:"no"}},[t._v(" clear ")])]),t.showUploadButton?e("button",{staticClass:"btn-upload-file",class:{"on-progress":n.percent,"ready-progress":n.percent>=100},style:{height:"".concat(n.percent,"%")}},[e("div",[e("i",{staticClass:"material-icons notranslate",attrs:{translate:"no"}},[t._v(" "+t._s(n.percent>=100?n.error?"report_problem":"cloud_done":"cloud_upload")+" ")]),e("span",[t._v(t._s(n.percent)+" %")])])]):t._e(),n.src?e("img",{key:s,style:{maxWidth:"h"===n.orientation?"100%":"none",maxHeight:"w"===n.orientation?"100%":"none"},attrs:{src:n.src}}):t._e(),n.src?t._e():e("h4",{staticClass:"text-archive"},[e("i",{staticClass:"material-icons notranslate",attrs:{translate:"no"}},[t._v(" description ")]),e("span",[t._v(" "+t._s(n.name)+" ")])])])})),e("div",{staticClass:"con-input-upload",class:{"on-progress-all-upload":0!==t.percent,"is-ready-all-upload":t.percent>=100,"disabled-upload":!(!t.$attrs.hasOwnProperty("disabled")&&!t.limit)&&t.srcs.length-t.itemRemove.length>=Number(t.limit)}},[e("input",t._b({ref:"fileInput",attrs:{accept:t.accept,disabled:t.$attrs.disabled||!!t.limit&&t.srcs.length-t.itemRemove.length>=Number(t.limit),type:"file"},on:{change:t.getFiles}},"input",t.$attrs,!1)),e("span",{staticClass:"text-input"},[t._v(" "+t._s(t.text)+" ")]),e("span",{staticClass:"input-progress",style:{width:"".concat(t.percent,"%")}})])],2)])},r=[];function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t){return u(t)||l(t)||c(t)||a()}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(t){if("string"===typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function l(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return d(t)}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,s=new Array(e);n<e;n++)s[n]=t[n];return s}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,s)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e,n){return e=p(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){var e=m(t,"string");return"symbol"===o(e)?e:String(e)}function m(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!==o(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var y={name:"VsUpload",components:{},inheritAttrs:!1,props:{text:{type:String,default:function(){return this.$t("SubmitDocuments")}},accept:{default:null,type:String},limit:{default:null,type:[Number,String]},fileUploaded:{type:Array,default:function(){return[]}},showUploadButton:{default:!0,type:Boolean}},data:function(){return{srcs:[],filesx:[],itemRemove:[],percent:0}},computed:{getFilesFilter:function(){var t=this.srcs.filter((function(t){return!t.remove}));return t}},watch:{percent:function(){var t=this;this.percent>=100&&(this.srcs.forEach((function(t){t.percent=100})),setTimeout((function(){t.percent=0}),1e3))}},mounted:function(){var t=this;this.fileUploaded&&this.fileUploaded.map((function(e){t.filesx.push({remove:!1}),t.srcs.push({error:!1,reference_name:e.reference_name,name:e.name_of_the_file,percent:100,remove:null,src:null})}))},methods:{removeFile:function(t){var e=this;this.itemRemove.push(t),this.srcs[t].reference_name&&this.$emit("on-delete",this.srcs[t].reference_name),setTimeout((function(){e.filesx.splice(t,1,h(h({},e.filesx[t]),{},{remove:!0}))}),301)},resetFiles:function(){this.srcs=[],this.filesx=[],this.itemRemove=[],this.percent=0,this.$refs.fileInput&&(this.$refs.fileInput.value="")},getFiles:function(t){this.$emit("update:vsFile",t.target.value);var e=t.target.files,n=this.srcs.length-this.itemRemove.length;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(this.limit&&(n++,n>Number(this.limit)))break;var r=e[s];this.filesx.push(r),this.srcs.push({src:null,name:r.name,percent:null,error:!1,remove:null}),this.$emit("change",t.target.value,this.filesx)}},getFilesToUpload:function(){return i(this.filesx.filter((function(t){return!t.remove})))}}},b=y,g=n("2877"),_=Object(g["a"])(b,s,r,!1,null,null,null);e["a"]=_.exports},"74d7":function(t,e,n){},"7e6b":function(t,e,n){"use strict";n("8e93")},"7eec":function(t,e,n){"use strict";n("8c05")},"81f6":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var s=n("2b0e"),r=new s["default"]},"8af8":function(t,e,n){},"8b82":function(t,e,n){"use strict";n("f2a3")},"8c05":function(t,e,n){},"8e93":function(t,e,n){},"91ac":function(t,e,n){"use strict";n("8af8")},"93a1":function(t,e,n){},a7af:function(t,e,n){"use strict";n("e2e0")},b4fb:function(t,e,n){},b584:function(t,e,n){"use strict";n("93a1")},bda6:function(t,e,n){"use strict";n("40e1")},cb0a:function(t,e,n){"use strict";(function(t){var s=n("2f62"),r=n("4a7a"),o=n.n(r),i=n("14b7"),a=n.n(i),c=n("1420");function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,s)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return e=h(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t){var e=v(t,"string");return"symbol"===l(e)?e:String(e)}function v(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!==l(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}e["a"]={components:{vSelect:o.a,SignatureHandlerPrompt:c["a"]},data:function(){return{selected:[],itemsPerPage:5,isMounted:!1,attendances:[],id_school:localStorage.getItem("school_id"),filtersDisplayed:!1,filterSchoolSelect:[],filterSchool:null,filterSessionSelect:[],filterSession:null,filterGapDate:{start:this.$moment().subtract(7,"days").utcOffset(0).set({hour:0,minute:0,second:0,millisecond:0}).toDate(),end:this.$moment().add(1,"days").utcOffset(0).set({hour:23,minute:59,second:59,millisecond:1}).toDate()},dateNow:null,dateBegin:[],idSessionCourse:[],eventsSchoolSession:{},eventListId:[],configBeginDatePicker:d({},this.$store.state.configDatePickerAllDateAllowed),configEndDatePicker:d({},this.$store.state.configDatePickerAllDateAllowed),eventsSchoolSharedSession:{},filterSchoolSharedSelect:[],filterSessionSharedSelect:[],activeAppealSignaturePrompt:!1,id_actor:a.a.decode(localStorage.getItem("accesstoken")).id_actor,entity:{}}},computed:d(d({},Object(s["c"])("dataListSignature",["listPresence","statPresences"])),{},{currentPage:function(){return this.isMounted&&this.$refs.table?this.$refs.table.currentx:1},displayAttendances:function(){var t,e=this;return(null===(t=this.eventListId)||void 0===t?void 0:t.length)>0&&this.attendances.length>0?this.attendances.filter((function(t){return e.eventListId.map((function(t){return parseInt(t,10)})).includes(t.id_event)})):this.attendances},displayFilterSchoolSelect:function(){var t,e,n=this;if((null===(t=this.eventListId)||void 0===t?void 0:t.length)>0&&this.filterSchoolSelect.length>0&&(null===(e=this.filterSession)||void 0===e?void 0:e.id)>0){var s=this.eventListId.filter((function(t){return n.isOnSession(t)})).map((function(t){return n.eventsSchoolSession[t].school_id}));return this.filterSchoolSelect.filter((function(t){return s.includes(t.id)}))}return this.filterSchoolSelect},displayFilterSessionSelect:function(){var t,e,n=this;if((null===(t=this.eventListId)||void 0===t?void 0:t.length)>0&&this.filterSessionSelect.length>0&&(null===(e=this.filterSchool)||void 0===e?void 0:e.id)>0){var s=this.eventListId.filter((function(t){return n.isOnSchool(t)})).map((function(t){return n.eventsSchoolSession[t].session_id}));return this.filterSessionSelect.filter((function(t){return s.includes(t.id)}))}return this.filterSessionSelect},isLocalSignContext:function(){return"#signature"===this.$route.hash}}),mounted:function(){var t=this;this.fetchTeacherSignaturesPresence({id_actor:this.id_actor,id_school:this.id_school}).then((function(){return t.fetchStatTeacherSignaturesPresence({id_actor:t.id_actor,id_school:t.id_school})})).then((function(){t.fetchSessionCoursesListItemsExtranetDashboardTeacher({id_actor:t.id_actor}).then((function(e){t.extractSessionCoursesListItemsResponse(e)}))})),this.fetchAssoSessionAttendances().then((function(e){return[e.data.map((function(e){t.idSessionCourse.push(e.id_session_course)}))]}))},methods:d(d(d(d({},Object(s["b"])("dataListAttendances",["fetchSessionCoursesListItemsExtranetDashboardTeacher","fetchAssoSessionAttendances"])),Object(s["b"])("dataListPrograms",["filterProgramsListItems"])),Object(s["b"])("dataListSignature",["fetchTeacherSignaturesPresence","fetchStatTeacherSignaturesPresence"])),{},{extractSessionCoursesListItemsResponse:function(e){var n=this;this.attendances=e.data.map((function(e){var s;if(e.session_courses[0].asce_t.length>0&&(e.teachers=e.session_courses[0].asce_t.map((function(t){return d({},t.actor)})),delete e.session_courses[0].asce_t),e.session_courses[0].scMaster.length>0&&(e.sharedSessions=e.session_courses[0].scMaster.map((function(t){return n.$helpers.getRootSession(t.session_slave)})).filter((function(t){return null!==t})),delete e.session_courses[0].scMaster),e.statsSigned="",(null===(s=n.listPresence)||void 0===s?void 0:s.length)>0){e.signature=null;var r=n.listPresence.find((function(t){return t.id_session_course===e.session_courses[0].id_session_course}));if(null!==r&&void 0!==r&&r.actor_signature){var o=r.actor_signature;if(o.signature&&o.signature.type){var i=t.from(o.signature).toString("base64");n.$set(e,"signature","data:image/".concat(o.format,";base64,").concat(i)),e.updatedAt=o.updatedAt}}}var a=0,c=0,l=n.statPresences.find((function(t){var n;return t.id_session_course===e.session_courses[0].id_session_course&&(null===(n=t.asso_session_course_attendance_actors)||void 0===n?void 0:n.length)}));return l&&(l.asso_session_course_attendance_actors.map((function(t){null!==t.asso_actor_signature_presence&&(a+=1),c+=1})),c>0&&(e.statsSigned=a+"/"+c)),e}));var s=this.attendances.filter((function(t){return t.session_courses&&t.session_courses.length>0&&t.session_courses[0].mSess})).map((function(t){return t.session_courses.map((function(e){var n;return d(d({},e.mSess),{},{id_event:t.id_event,sharedSessions:null!==(n=null===t||void 0===t?void 0:t.sharedSessions)&&void 0!==n?n:null})}))})).flat();null!==s&&void 0!==s&&s.length&&(this.filterSchoolSharedSelect=[],this.filterSessionSharedSelect=[],this.filterSchoolSelect=s.map((function(t){var e,s,r,o=null!==(e=null===(s=t.pSess)||void 0===s||null===(s=s.session)||void 0===s||null===(s=s.asso_school_sessions[0])||void 0===s?void 0:s.school)&&void 0!==e?e:null===(r=t.pSess)||void 0===r||null===(r=r.asso_school_sessions[0])||void 0===r?void 0:r.school;return t.sharedSessions&&n.$set(n.eventsSchoolSharedSession,t.id_event,t.sharedSessions.map((function(t){var e,s;if(n.filterSessionSharedSelect.find((function(e){return e.id&&e.id===t.id_session}))||n.filterSessionSharedSelect.push({id:t.id_session,label:t.name}),null!==t&&void 0!==t&&null!==(e=t.asso_school_sessions)&&void 0!==e&&e.length&&null!==t&&void 0!==t&&null!==(s=t.asso_school_sessions[0])&&void 0!==s&&null!==(s=s.school)&&void 0!==s&&s.label)return n.filterSchoolSharedSelect.find((function(e){return e.id&&e.id===t.asso_school_sessions[0].id_school}))||n.filterSchoolSharedSelect.push({id:t.asso_school_sessions[0].id_school,label:t.asso_school_sessions[0].school.label}),{id_session:t.id_session,id_school:t.asso_school_sessions[0].id_school}}))),o?(n.$set(n.eventsSchoolSession,t.id_event,{school_id:o.id_school}),{id:o.id_school,label:o.label}):null})).filter((function(t){return null!==t})).flat().filter((function(t,e,n){return n.findIndex((function(e){return e.id===t.id}))===e})),this.filterSchoolSharedSelect.length&&this.filterSchoolSharedSelect.map((function(t){n.filterSchoolSelect.find((function(e){return t.id===e.id}))||n.filterSchoolSelect.push(d({},t))})),this.filterSessionSelect=s.map((function(t){var e,s,r=null!==(e=null===(s=t.pSess)||void 0===s?void 0:s.session)&&void 0!==e?e:t.pSess;return r?(n.$set(n.eventsSchoolSession,t.id_event,{school_id:n.eventsSchoolSession[t.id_event].school_id,session_id:r.id_session}),{id:r.id_session,label:r.name}):null})).filter((function(t){return null!==t})).flat().filter((function(t,e,n){return n.findIndex((function(e){return e.id===t.id}))===e}))),this.filterSessionSharedSelect.length&&this.filterSessionSharedSelect.map((function(t){n.filterSessionSelect.find((function(e){return t.id===e.id}))||n.filterSessionSelect.push(d({},t))}))},getOrderStatusColor:function(t){return 0===t?"danger":1===t?"success":2===t?"warning":"primary"},changeFilter:function(){var t,e,n,s,r=this;this.eventListId=[],(null===(t=this.filterSchool)||void 0===t?void 0:t.id)>0&&(null===(e=this.filterSession)||void 0===e?void 0:e.id)>0?this.eventListId=Object.keys(this.eventsSchoolSession).filter((function(t){return r.isOnSchool(t)&&r.isOnSession(t)})):(null===(n=this.filterSchool)||void 0===n?void 0:n.id)>0?this.eventListId=Object.keys(this.eventsSchoolSession).filter((function(t){return r.isOnSchool(t)})):(null===(s=this.filterSession)||void 0===s?void 0:s.id)>0&&(this.eventListId=Object.keys(this.eventsSchoolSession).filter((function(t){return r.isOnSession(t)})))},parentSessionValueByKeyed:function(t){var e,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",r=null!==(e=null===(n=t.pSess)||void 0===n?void 0:n.session)&&void 0!==e?e:t.pSess;if(r){var o;if("name"===s&&r.name)return r.name;if("school"===s&&null!==(o=r.asso_school_sessions[0])&&void 0!==o&&null!==(o=o.school)&&void 0!==o&&o.label)return r.asso_school_sessions[0].school.label}return null},isOnSchool:function(t){return this.eventsSchoolSession[t].school_id===this.filterSchool.id||this.eventIsOnSessionShared(t,this.filterSchool.id,"school")},isOnSession:function(t){return this.eventsSchoolSession[t].session_id===this.filterSession.id||this.eventIsOnSessionShared(t,this.filterSession.id)},eventIsOnSessionShared:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"session";for(var s in this.eventsSchoolSharedSession)if(t===s){if("session"===n)return-1!==this.eventsSchoolSharedSession[s].findIndex((function(t){return t.id_session===e}));if("school"===n)return-1!==this.eventsSchoolSharedSession[s].findIndex((function(t){return t.id_school===e}))}return!1},onSignatureOpenPrompt:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"appeal";this.entity={type:e,id:t,id_actor:this.id_actor,role:"teach"},"appeal"===e&&(this.activeAppealSignaturePrompt=!0)},closeActionPrompt:function(){var t=this;this.activeAppealSignaturePrompt=!1,this.fetchTeacherSignaturesPresence({id_actor:this.id_actor,id_school:this.id_school}).then((function(){t.fetchSessionCoursesListItemsExtranetDashboardTeacher({id_actor:t.id_actor}).then((function(e){t.extractSessionCoursesListItemsResponse(e)}))}))}})}}).call(this,n("b639").Buffer)},e054:function(t,e,n){"use strict";n("e99c")},e2e0:function(t,e,n){},e72b:function(t,e,n){"use strict";n("74d7")},e99c:function(t,e,n){},f2a3:function(t,e,n){}}]);