/home/techb158/ileadtechnology.com/SSM/public/js/employee~js/employee
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/employee~js/employee/edit.js (83350B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"5++/":function(e,t,o){var a=o("qRGV");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},"5A6s":function(e,t,o){"use strict";var a=o("NesM");o.n(a).a},"5TC0":function(e,t,o){var a=o("gLxG");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},"6m0h":function(e,t,o){"use strict";var a={components:{},data:function(){return{qualificationForm:new Form({standard:"",institute_name:"",board_name:"",result:"",start_period:"",end_period:"",upload_token:"",description:""}),module_id:"",clearAttachment:!0}},props:["uuid","qid","name"],mounted:function(){this.qualificationForm.upload_token=this.$uuid.v4(),this.qid&&this.getQualification()},methods:{proceed:function(){this.qid?this.updateQualification():this.storeQualification()},storeQualification:function(){var e=this,t=this.$loading.show();this.qualificationForm.start_period=moment(this.qualificationForm.start_period).format("YYYY-MM"),this.qualificationForm.end_period=moment(this.qualificationForm.end_period).format("YYYY-MM"),this.qualificationForm.post("/api/employee/"+this.uuid+"/qualification").then((function(o){toastr.success(o.message),e.clearAttachment=!e.clearAttachment,e.$emit("completed"),e.qualificationForm.upload_token=e.$uuid.v4(),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},getQualification:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/qualification/"+this.qid).then((function(o){e.qualificationForm.standard=o.employee_qualification.standard,e.qualificationForm.institute_name=o.employee_qualification.institute_name,e.qualificationForm.board_name=o.employee_qualification.board_name,e.qualificationForm.result=o.employee_qualification.result,e.qualificationForm.start_period=o.employee_qualification.start_period,e.qualificationForm.end_period=o.employee_qualification.end_period,e.qualificationForm.description=o.employee_qualification.description,e.qualificationForm.upload_token=o.employee_qualification.upload_token,e.module_id=o.employee_qualification.id,e.$emit("loaded"),t.hide()})).catch((function(o){t.hide(),e.$router.push("/employee/"+e.uuid)}))},updateQualification:function(){var e=this,t=this.$loading.show();this.qualificationForm.start_period=moment(this.qualificationForm.start_period).format("YYYY-MM"),this.qualificationForm.end_period=moment(this.qualificationForm.end_period).format("YYYY-MM"),this.qualificationForm.patch("/api/employee/"+this.uuid+"/qualification/"+this.qid).then((function(o){toastr.success(o.message),e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}}},n=o("KHd+"),i=Object(n.a)(a,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.qualificationForm.errors.clear(t.target.name)}}},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.qualification_standard")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.qualificationForm.standard,expression:"qualificationForm.standard"}],staticClass:"form-control",attrs:{type:"text",name:"standard",placeholder:e.trans("employee.qualification_standard")},domProps:{value:e.qualificationForm.standard},on:{input:function(t){t.target.composing||e.$set(e.qualificationForm,"standard",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.qualificationForm,"prop-name":"standard"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.institute_name")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.qualificationForm.institute_name,expression:"qualificationForm.institute_name"}],staticClass:"form-control",attrs:{type:"text",name:"institute_name",placeholder:e.trans("employee.institute_name")},domProps:{value:e.qualificationForm.institute_name},on:{input:function(t){t.target.composing||e.$set(e.qualificationForm,"institute_name",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.qualificationForm,"prop-name":"institute_name"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.board_name")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.qualificationForm.board_name,expression:"qualificationForm.board_name"}],staticClass:"form-control",attrs:{type:"text",name:"board_name",placeholder:e.trans("employee.board_name")},domProps:{value:e.qualificationForm.board_name},on:{input:function(t){t.target.composing||e.$set(e.qualificationForm,"board_name",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.qualificationForm,"prop-name":"board_name"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.qualification_result")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.qualificationForm.result,expression:"qualificationForm.result"}],staticClass:"form-control",attrs:{type:"text",name:"result",placeholder:e.trans("employee.qualification_result")},domProps:{value:e.qualificationForm.result},on:{input:function(t){t.target.composing||e.$set(e.qualificationForm,"result",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.qualificationForm,"prop-name":"result"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.qualification_start_period")))]),e._v(" "),o("vue-monthly-picker",{attrs:{name:"start_period",placeHolder:e.trans("employee.qualification_start_period"),dateFormat:"YYYY-MM "},model:{value:e.qualificationForm.start_period,callback:function(t){e.$set(e.qualificationForm,"start_period",t)},expression:"qualificationForm.start_period"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.qualificationForm,"prop-name":"start_period"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.qualification_end_period")))]),e._v(" "),o("vue-monthly-picker",{attrs:{name:"end_period",placeHolder:e.trans("employee.qualification_end_period"),dateFormat:"YYYY-MM "},model:{value:e.qualificationForm.end_period,callback:function(t){e.$set(e.qualificationForm,"end_period",t)},expression:"qualificationForm.end_period"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.qualificationForm,"prop-name":"end_period"}})],1)])]),e._v(" "),o("div",{staticClass:"form-group"},[o("file-upload-input",{attrs:{"button-text":e.trans("general.upload_document"),token:e.qualificationForm.upload_token,module:"employee_qualification","clear-file":e.clearAttachment,"module-id":e.module_id}})],1),e._v(" "),o("div",{staticClass:"form-group"},[o("autosize-textarea",{attrs:{rows:"2",name:"description",placeholder:e.trans("employee.qualification_description")},model:{value:e.qualificationForm.description,callback:function(t){e.$set(e.qualificationForm,"description",t)},expression:"qualificationForm.description"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.qualificationForm,"prop-name":"description"}})],1),e._v(" "),o("button",{staticClass:"btn btn-info waves-effect waves-light pull-right",attrs:{type:"submit"}},[e.qid?o("span",[e._v(e._s(e.trans("general.update")))]):o("span",[e._v(e._s(e.trans("general.save")))])])]),e._v(" "),o("div",{staticClass:"clearfix"})])}),[],!1,null,null,null).exports,s={components:{qualificationForm:i},props:["employee"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},r=(o("MyqW"),Object(n.a)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.add_new_qualification"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("qualification-form",{attrs:{uuid:e.employee.uuid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),l={components:{qualificationForm:i},props:["employee","qid"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},c=(o("CjGs"),Object(n.a)(l,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.edit_qualification"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("qualification-form",{attrs:{uuid:e.employee.uuid,qid:e.qid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),m={components:{qualificationForm:i},props:["employee","qid"],mounted:function(){this.qid&&this.getEmployeeQualification()},data:function(){return{employee_qualification:[],attachments:[]}},methods:{getEmployeeQualification:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.employee.uuid+"/qualification/"+this.qid).then((function(o){e.employee_qualification=o.employee_qualification,e.attachments=o.attachments,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}},computed:{authToken:function(){return helper.getAuthToken()}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)}}},d=Object(n.a)(m,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.view_qualification"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm custom-show-table"},[o("tbody",[o("tr",[o("td",[e._v(e._s(e.trans("employee.qualification_standard")))]),e._v(" "),o("td",[e._v(e._s(e.employee_qualification.standard))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.institute_name")))]),e._v(" "),o("td",[e._v(e._s(e.employee_qualification.institute_name))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.board_name")))]),e._v(" "),o("td",[e._v(e._s(e.employee_qualification.board_name))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.qualification_start_period")))]),e._v(" "),o("td",[e._v(e._s(e.employee_qualification.start_period))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.qualification_end_period")))]),e._v(" "),o("td",[e._v(e._s(e.employee_qualification.end_period))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.qualification_result")))]),e._v(" "),o("td",[e._v(e._s(e.employee_qualification.result))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.qualification_description")))]),e._v(" "),o("td",[e._v(e._s(e.employee_qualification.description))])])])])]),e._v(" "),e.attachments.length?o("div",[o("ul",{staticClass:"m-t-10 upload-file-list"},e._l(e.attachments,(function(t){return o("li",{staticClass:"upload-file-list-item"},[o("a",{staticClass:"no-link-color",attrs:{href:"/employee/"+e.employee.uuid+"/qualification/"+e.employee_qualification.id+"/attachment/"+t.uuid+"/download?token="+e.authToken}},[o("i",{class:["file-icon","fas","fa-lg",t.file_info.icon]}),e._v(" "),o("span",{staticClass:"upload-file-list-item-size"},[e._v(e._s(t.file_info.size))]),e._v(" "+e._s(t.user_filename))])])})),0)]):e._e(),e._v(" "),o("hr"),e._v(" "),o("p",[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.created_at"))+" "+e._s(e._f("momentDateTime")(e.employee_qualification.created_at)))]),e._v(" "),o("span",{staticClass:"pull-right"},[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.updated_at"))+" "+e._s(e._f("momentDateTime")(e.employee_qualification.updated_at)))])])])])],2)])])])])}),[],!1,null,null,null).exports,u={props:{employee:{type:Object,default:function(){return{}}},readMode:{type:Boolean,default:!1}},components:{createQualification:r,editQualification:c,showQualification:d},data:function(){return{employee_qualifications:{total:0,data:[]},showId:null,editId:null,filter:{page_length:helper.getConfig("page_length")},addModal:!1,editModal:!1,showModal:!1}},mounted:function(){helper.hasPermission("list-employee")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getEmployeeQualifications()},methods:{getEmployeeName:function(){return helper.getEmployeeName(this.employee)},editAction:function(e){this.editId=e.id,this.editModal=!0},showAction:function(e){this.showId=e.id,this.showModal=!0},getEmployeeQualifications:function(e){var t=this,o=this.$loading.show();"number"!=typeof e&&(e=1);var a=helper.getFilterURL(this.filter);axios.get("/api/employee/"+this.employee.uuid+"/qualification?page="+e+a).then((function(e){t.employee_qualifications=e,o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))},confirmDelete:function(e){var t=this;return function(o){return t.deleteEmployeeQualification(e)}},deleteEmployeeQualification:function(e){var t=this,o=this.$loading.show();axios.delete("/api/employee/"+this.employee.uuid+"/qualification/"+e.id).then((function(e){toastr.success(e.message),t.getEmployeeQualifications(),o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)}},watch:{employee:function(e){this.getEmployeeQualifications()}}},p=Object(n.a)(u,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[e.readMode?e._e():o("button",{staticClass:"btn btn-sm btn-info pull-right",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("employee.add_new_qualification")))]),e._v(" "),e.employee_qualifications.total?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm"},[o("thead",[o("tr",[o("th",[e._v(e._s(e.trans("employee.qualification_standard")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.institute_name")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.qualification_period")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.qualification_result")))]),e._v(" "),o("th",{staticClass:"table-option"},[e._v(e._s(e.trans("general.action")))])])]),e._v(" "),o("tbody",e._l(e.employee_qualifications.data,(function(t){return o("tr",[o("td",{domProps:{textContent:e._s(t.standard)}}),e._v(" "),o("td",{domProps:{textContent:e._s(t.institute_name)}}),e._v(" "),o("td",[e._v(e._s(t.start_period)+" "+e._s(e.trans("general.to"))+" "+e._s(t.end_period))]),e._v(" "),o("td",{domProps:{textContent:e._s(t.result)}}),e._v(" "),o("td",{staticClass:"table-option"},[o("div",{staticClass:"btn-group"},[o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.view_qualification"),expression:"trans('employee.view_qualification')"}],staticClass:"btn btn-success btn-sm",on:{click:function(o){return o.preventDefault(),e.showAction(t)}}},[o("i",{staticClass:"fas fa-arrow-circle-right"})]),e._v(" "),e.readMode?e._e():o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.edit_qualification"),expression:"trans('employee.edit_qualification')"}],staticClass:"btn btn-info btn-sm",on:{click:function(o){return o.preventDefault(),e.editAction(t)}}},[o("i",{staticClass:"fas fa-edit"})]),e._v(" "),e.readMode?e._e():o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:e.confirmDelete(t)},expression:"{ok: confirmDelete(employee_qualification)}"},{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.delete_qualification"),expression:"trans('employee.delete_qualification')"}],key:t.id,staticClass:"btn btn-danger btn-sm"},[o("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):e._e(),e._v(" "),e.readMode?[e.employee_qualifications.total?e._e():o("div",{staticClass:"font-80pc"},[e._v(e._s(e.trans("general.no_result_found")))]),e._v(" "),o("div",[e._v(" ")])]:[e.employee_qualifications.total?e._e():o("module-info",{attrs:{module:"employee",title:"qualification_module_title",description:"qualification_module_description",icon:"list"}},[o("div",{attrs:{slot:"btn"},slot:"btn"},[o("button",{staticClass:"btn btn-info btn-md",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("general.add_new")))])])])],e._v(" "),o("pagination-record",{attrs:{"page-length":e.filter.page_length,records:e.employee_qualifications},on:{"update:pageLength":function(t){return e.$set(e.filter,"page_length",t)},"update:page-length":function(t){return e.$set(e.filter,"page_length",t)},updateRecords:e.getEmployeeQualifications},nativeOn:{change:function(t){return e.getEmployeeQualifications(t)}}}),e._v(" "),e.addModal&&!e.readMode?o("create-qualification",{attrs:{employee:e.employee},on:{close:function(t){e.addModal=!1},completed:e.getEmployeeQualifications}}):e._e(),e._v(" "),e.editModal&&!e.readMode?o("edit-qualification",{attrs:{employee:e.employee,qid:e.editId},on:{close:function(t){e.editModal=!1},completed:e.getEmployeeQualifications}}):e._e(),e._v(" "),e.showModal?o("show-qualification",{attrs:{employee:e.employee,qid:e.showId},on:{close:function(t){e.showModal=!1}}}):e._e()],2)}),[],!1,null,null,null);t.a=p.exports},"94pI":function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},"9mlr":function(e,t,o){"use strict";var a=o("5TC0");o.n(a).a},BWRn:function(e,t,o){"use strict";var a=o("ZODj");o.n(a).a},Bb5J:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},C8Su:function(e,t,o){var a=o("e6Pe");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},CjGs:function(e,t,o){"use strict";var a=o("wCqo");o.n(a).a},D0tX:function(e,t,o){"use strict";var a=o("C8Su");o.n(a).a},J0Es:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},JsAR:function(e,t,o){"use strict";var a={components:{},props:["uuid","tid"],data:function(){return{termForm:new Form({designation_id:"",department_id:"",date_of_joining:"",date_of_leaving:"",is_leaving:0,joining_remarks:"",leaving_remarks:"",upload_token:""}),module_id:"",designations:[],departments:[],selected_designation:null,selected_department:null,clearAttachment:!0}},mounted:function(){this.termForm.upload_token=this.$uuid.v4(),this.getPreRequisite(),this.tid&&this.getTerm()},methods:{getPreRequisite:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/term/pre-requisite").then((function(o){e.designations=o.designations,e.departments=o.departments,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},proceed:function(){this.tid?this.updateTerm():this.storeTerm()},storeTerm:function(){var e=this,t=this.$loading.show();this.termForm.post("/api/employee/"+this.uuid+"/term").then((function(o){toastr.success(o.message),e.clearAttachment=!e.clearAttachment,e.$emit("completed"),e.termForm.upload_token=e.$uuid.v4(),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},getTerm:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/term/"+this.tid).then((function(o){e.termForm.date_of_joining=o.employee_term.date_of_joining,e.termForm.date_of_leaving=o.employee_term.date_of_leaving,e.termForm.joining_remarks=o.employee_term.joining_remarks,e.termForm.leaving_remarks=o.employee_term.leaving_remarks,e.termForm.is_leaving=o.employee_term.date_of_leaving?1:0,e.termForm.upload_token=o.employee_term.upload_token,e.module_id=o.employee_term.id,e.$emit("loaded"),t.hide()})).catch((function(o){t.hide(),e.$router.push("/employee/"+e.uuid)}))},updateTerm:function(){var e=this,t=this.$loading.show();this.termForm.patch("/api/employee/"+this.uuid+"/term/"+this.tid).then((function(o){toastr.success(o.message),e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},onDesignationSelect:function(e){this.termForm.designation_id=e.id},onDepartmentSelect:function(e){this.termForm.department_id=e.id}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)},moment:function(e){return helper.formatDate(e)}}},n=o("KHd+"),i=Object(n.a)(a,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.termForm.errors.clear(t.target.name)}}},[o("div",{staticClass:"row"},[e.tid?e._e():[o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.designation")))]),e._v(" "),o("v-select",{attrs:{label:"name","group-values":"designations","group-label":"employee_category","group-select":!1,name:"designation_id",id:"designation_id",options:e.designations,placeholder:e.trans("employee.select_designation")},on:{select:e.onDesignationSelect,close:function(t){return e.termForm.errors.clear("designation_id")},remove:function(t){e.termForm.designation_id=""}},model:{value:e.selected_designation,callback:function(t){e.selected_designation=t},expression:"selected_designation"}},[e.designations.length?e._e():o("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),o("show-error",{attrs:{"form-name":e.termForm,"prop-name":"designation_id"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.department")))]),e._v(" "),o("v-select",{attrs:{label:"name",name:"department_id",id:"department_id",options:e.departments,placeholder:e.trans("employee.select_department")},on:{select:e.onDepartmentSelect,close:function(t){return e.termForm.errors.clear("department_id")},remove:function(t){e.termForm.department_id=""}},model:{value:e.selected_department,callback:function(t){e.selected_department=t},expression:"selected_department"}},[e.departments.length?e._e():o("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),o("show-error",{attrs:{"form-name":e.termForm,"prop-name":"department_id"}})],1)])],e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.date_of_joining")))]),e._v(" "),e.tid?[o("p",[e._v(e._s(e._f("moment")(e.termForm.date_of_joining)))])]:[o("datepicker",{attrs:{bootstrapStyling:!0,placeholder:e.trans("employee.date_of_joining")},on:{selected:function(t){return e.termForm.errors.clear("date_of_joining")}},model:{value:e.termForm.date_of_joining,callback:function(t){e.$set(e.termForm,"date_of_joining",t)},expression:"termForm.date_of_joining"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.termForm,"prop-name":"date_of_joining"}})]],2)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.joining_remarks")))]),e._v(" "),e.tid?[o("p",{domProps:{textContent:e._s(e.termForm.joining_remarks)}})]:[o("autosize-textarea",{attrs:{rows:"1",name:"joining_remarks",placeholder:e.trans("employee.joining_remarks")},model:{value:e.termForm.joining_remarks,callback:function(t){e.$set(e.termForm,"joining_remarks",t)},expression:"termForm.joining_remarks"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.termForm,"prop-name":"joining_remarks"}})]],2)])],2),e._v(" "),e.tid?o("div",{staticClass:"form-group"},[o("label",{staticClass:"custom-control custom-checkbox"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.termForm.is_leaving,expression:"termForm.is_leaving"}],staticClass:"custom-control-input",attrs:{type:"checkbox",value:"1"},domProps:{checked:Array.isArray(e.termForm.is_leaving)?e._i(e.termForm.is_leaving,"1")>-1:e.termForm.is_leaving},on:{change:function(t){var o=e.termForm.is_leaving,a=t.target,n=!!a.checked;if(Array.isArray(o)){var i=e._i(o,"1");a.checked?i<0&&e.$set(e.termForm,"is_leaving",o.concat(["1"])):i>-1&&e.$set(e.termForm,"is_leaving",o.slice(0,i).concat(o.slice(i+1)))}else e.$set(e.termForm,"is_leaving",n)}}}),e._v(" "),o("span",{staticClass:"custom-control-label"},[e._v(e._s(e.trans("employee.is_leaving")))])])]):e._e(),e._v(" "),e.termForm.is_leaving?[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.date_of_leaving")))]),e._v(" "),e.tid?[o("datepicker",{attrs:{bootstrapStyling:!0,placeholder:e.trans("employee.date_of_leaving")},on:{selected:function(t){return e.termForm.errors.clear("date_of_leaving")}},model:{value:e.termForm.date_of_leaving,callback:function(t){e.$set(e.termForm,"date_of_leaving",t)},expression:"termForm.date_of_leaving"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.termForm,"prop-name":"date_of_leaving"}})]:[o("p",[e._v(e._s(e._f("moment")(e.termForm.date_of_leaving)))])]],2)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.leaving_remarks")))]),e._v(" "),e.tid?[o("autosize-textarea",{attrs:{rows:"1",name:"leaving_remarks",placeholder:e.trans("employee.leaving_remarks")},model:{value:e.termForm.leaving_remarks,callback:function(t){e.$set(e.termForm,"leaving_remarks",t)},expression:"termForm.leaving_remarks"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.termForm,"prop-name":"leaving_remarks"}})]:[o("p",{domProps:{textContent:e._s(e.termForm.leaving_remarks)}})]],2)])])]:e._e(),e._v(" "),o("div",{staticClass:"form-group"},[o("file-upload-input",{attrs:{"button-text":e.trans("general.upload_document"),token:e.termForm.upload_token,module:"employee_term","clear-file":e.clearAttachment,"module-id":e.module_id}})],1),e._v(" "),o("div",{staticClass:"form-group"},[o("button",{staticClass:"btn btn-info pull-right"},[e._v(e._s(e.trans("general.save")))])]),e._v(" "),o("div",{staticClass:"clearfix"})],2)}),[],!1,null,null,null).exports,s={components:{termForm:i},props:["employee"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},r=(o("ke8N"),Object(n.a)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.add_new_term"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("term-form",{attrs:{uuid:e.employee.uuid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),l={components:{termForm:i},props:["employee","tid"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},c=(o("BWRn"),{components:{},props:["employee","tid"],mounted:function(){this.tid&&this.getEmployeeTerm()},data:function(){return{employee_term:[],attachments:[]}},methods:{getEmployeeName:function(){return helper.getEmployeeName(this.employee)},getEmployeeTerm:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.employee.uuid+"/term/"+this.tid).then((function(o){e.employee_term=o.employee_term,e.attachments=o.attachments,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}},computed:{authToken:function(){return helper.getAuthToken()}},filters:{moment:function(e){return helper.formatDate(e)},momentDateTime:function(e){return helper.formatDateTime(e)}}});function m(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var d={components:{createTerm:r,editTerm:Object(n.a)(l,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.edit_term"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("term-form",{attrs:{uuid:e.employee.uuid,tid:e.tid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports,showTerm:Object(n.a)(c,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e.employee.id?e._t("header",[e._v("\n "+e._s(e.getEmployeeName(e.employee))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])]):e._e()],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[e.employee_term.id?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table custom-show-table"},[o("tbody",[o("tr",[o("td",[e._v(e._s(e.trans("employee.date_of_joining")))]),e._v(" "),o("td",[e._v(e._s(e._f("moment")(e.employee_term.date_of_joining)))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.joining_remarks")))]),e._v(" "),o("td",[e._v(e._s(e.employee_term.joining_remarks))])]),e._v(" "),e.employee_term.date_of_leaving?o("tr",[o("td",[e._v(e._s(e.trans("employee.date_of_leaving")))]),e._v(" "),o("td",[e._v(e._s(e._f("moment")(e.employee_term.date_of_leaving)))])]):e._e(),e._v(" "),e.employee_term.date_of_leaving?o("tr",[o("td",[e._v(e._s(e.trans("employee.leaving_remarks")))]),e._v(" "),o("td",[e._v(e._s(e.employee_term.leaving_remarks))])]):e._e()])])]):e._e(),e._v(" "),e.attachments.length?o("div",[o("ul",{staticClass:"m-t-10 upload-file-list"},e._l(e.attachments,(function(t){return o("li",{staticClass:"upload-file-list-item"},[o("a",{staticClass:"no-link-color",attrs:{href:"/employee/"+e.employee.uuid+"/term/"+e.employee_term.id+"/attachment/"+t.uuid+"/download?token="+e.authToken}},[o("i",{class:["file-icon","fas","fa-lg",t.file_info.icon]}),e._v(" "),o("span",{staticClass:"upload-file-list-item-size"},[e._v(e._s(t.file_info.size))]),e._v(" "+e._s(t.user_filename))])])})),0)]):e._e(),e._v(" "),o("hr"),e._v(" "),o("p",[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.created_at"))+" "+e._s(e._f("momentDateTime")(e.employee_term.created_at)))]),e._v(" "),o("span",{staticClass:"pull-right"},[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.updated_at"))+" "+e._s(e._f("momentDateTime")(e.employee_term.updated_at)))])])])])],2)])])])])}),[],!1,null,null,null).exports},props:{employee:{type:Object,default:function(){return{}}},readMode:{type:Boolean,default:!1}},data:function(){var e;return m(e={addModal:!1,showId:null,editId:null},"addModal",!1),m(e,"editModal",!1),m(e,"showModal",!1),e},mounted:function(){},methods:{editAction:function(e){this.editId=e.id,this.editModal=!0},showAction:function(e){this.showId=e.id,this.showModal=!0},confirmDelete:function(e){var t=this;return function(o){return t.deleteEmployeeTerm(e)}},deleteEmployeeTerm:function(e){var t=this,o=this.$loading.show();axios.delete("/api/employee/"+this.employee.uuid+"/term/"+e.id).then((function(e){toastr.success(e.message),t.$emit("completed"),o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))}},computed:{canAddTerm:function(){return this.employee.employee_terms.every((function(e){return null!=e.date_of_leaving}))}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)},moment:function(e){return helper.formatDate(e)}}},u=Object(n.a)(d,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[e.canAddTerm&&!e.readMode?o("button",{staticClass:"btn btn-sm btn-info pull-right",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("employee.add_new_term")))]):e._e(),e._v(" "),e.employee.employee_terms?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm"},[o("thead",[o("tr",[o("th",[e._v(e._s(e.trans("employee.date_of_joining")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.date_of_leaving")))]),e._v(" "),o("th",{staticClass:"table-option"},[e._v(e._s(e.trans("general.action")))])])]),e._v(" "),o("tbody",e._l(e.employee.employee_terms,(function(t){return o("tr",[o("td",[e._v(e._s(e._f("moment")(t.date_of_joining)))]),e._v(" "),o("td",[t.date_of_leaving?o("span",[e._v(e._s(e._f("moment")(t.date_of_leaving)))]):o("span",[e._v("-")])]),e._v(" "),o("td",{staticClass:"table-option"},[o("div",{staticClass:"btn-group"},[e.readMode?e._e():[o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:e.confirmDelete(t)},expression:"{ok: confirmDelete(employee_term)}"},{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.delete_term"),expression:"trans('employee.delete_term')"}],key:t.id,staticClass:"btn btn-danger btn-sm"},[o("i",{staticClass:"fas fa-trash"})]),e._v(" "),o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.edit_term"),expression:"trans('employee.edit_term')"}],staticClass:"btn btn-info btn-sm",on:{click:function(o){return o.preventDefault(),e.editAction(t)}}},[o("i",{staticClass:"fas fa-edit"})])],e._v(" "),o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.view_term"),expression:"trans('employee.view_term')"}],staticClass:"btn btn-success btn-sm",on:{click:function(o){return o.preventDefault(),e.showAction(t)}}},[o("i",{staticClass:"fas fa-arrow-circle-right"})])],2)])])})),0)])]):o("div",{staticClass:"font-80pc"},[e._v("\n "+e._s(e.trans("general.no_result_found"))+"\n ")]),e._v(" "),e.addModal&&e.canAddTerm&&!e.readMode?o("create-term",{attrs:{employee:e.employee},on:{close:function(t){e.addModal=!1},completed:function(t){return e.$emit("completed")}}}):e._e(),e._v(" "),e.editModal&&!e.readMode?o("edit-term",{attrs:{employee:e.employee,tid:e.editId},on:{close:function(t){e.editModal=!1},completed:function(t){return e.$emit("completed")}}}):e._e(),e._v(" "),e.showModal?o("show-term",{attrs:{employee:e.employee,tid:e.showId},on:{close:function(t){e.showModal=!1}}}):e._e()],1)}),[],!1,null,null,null);t.a=u.exports},MyqW:function(e,t,o){"use strict";var a=o("NZzk");o.n(a).a},NZzk:function(e,t,o){var a=o("oXN6");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},NesM:function(e,t,o){var a=o("Bb5J");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},OMI3:function(e,t,o){"use strict";var a={components:{},data:function(){return{accountForm:new Form({name:"",account_number:"",bank_name:"",branch_name:"",bank_identification_code:"",is_primary:!1,description:""}),clearAttachment:!0}},props:["uuid","aid"],mounted:function(){this.aid&&this.getAccount()},methods:{proceed:function(){this.aid?this.updateAccount():this.storeAccount()},storeAccount:function(){var e=this,t=this.$loading.show();this.accountForm.post("/api/employee/"+this.uuid+"/account").then((function(o){toastr.success(o.message),e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},getAccount:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/account/"+this.aid).then((function(o){e.accountForm.name=o.name,e.accountForm.account_number=o.account_number,e.accountForm.bank_name=o.bank_name,e.accountForm.branch_name=o.branch_name,e.accountForm.bank_identification_code=o.bank_identification_code,e.accountForm.is_primary=o.options.is_primary,e.accountForm.description=o.description,e.$emit("loaded"),t.hide()})).catch((function(o){t.hide(),e.$router.push("/employee/"+e.uuid)}))},updateAccount:function(){var e=this,t=this.$loading.show();this.accountForm.patch("/api/employee/"+this.uuid+"/account/"+this.aid).then((function(o){toastr.success(o.message),e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}}},n=o("KHd+"),i=Object(n.a)(a,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.accountForm.errors.clear(t.target.name)}}},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.account_name")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.accountForm.name,expression:"accountForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:e.trans("employee.account_name")},domProps:{value:e.accountForm.name},on:{input:function(t){t.target.composing||e.$set(e.accountForm,"name",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.accountForm,"prop-name":"name"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.account_number")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.accountForm.account_number,expression:"accountForm.account_number"}],staticClass:"form-control",attrs:{type:"text",name:"account_number",placeholder:e.trans("employee.account_number")},domProps:{value:e.accountForm.account_number},on:{input:function(t){t.target.composing||e.$set(e.accountForm,"account_number",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.accountForm,"prop-name":"account_number"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.bank_name")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.accountForm.bank_name,expression:"accountForm.bank_name"}],staticClass:"form-control",attrs:{type:"text",name:"bank_name",placeholder:e.trans("employee.bank_name")},domProps:{value:e.accountForm.bank_name},on:{input:function(t){t.target.composing||e.$set(e.accountForm,"bank_name",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.accountForm,"prop-name":"bank_name"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.branch_name")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.accountForm.branch_name,expression:"accountForm.branch_name"}],staticClass:"form-control",attrs:{type:"text",name:"branch_name",placeholder:e.trans("employee.branch_name")},domProps:{value:e.accountForm.branch_name},on:{input:function(t){t.target.composing||e.$set(e.accountForm,"branch_name",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.accountForm,"prop-name":"branch_name"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.bank_identification_code")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.accountForm.bank_identification_code,expression:"accountForm.bank_identification_code"}],staticClass:"form-control",attrs:{type:"text",name:"bank_identification_code",placeholder:e.trans("employee.bank_identification_code")},domProps:{value:e.accountForm.bank_identification_code},on:{input:function(t){t.target.composing||e.$set(e.accountForm,"bank_identification_code",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.accountForm,"prop-name":"bank_identification_code"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("switches",{staticClass:"m-l-20",attrs:{theme:"bootstrap",color:"success"},model:{value:e.accountForm.is_primary,callback:function(t){e.$set(e.accountForm,"is_primary",t)},expression:"accountForm.is_primary"}}),e._v(" "+e._s(e.trans("employee.is_account_primary"))+"\n ")],1)])]),e._v(" "),o("div",{staticClass:"form-group"},[o("autosize-textarea",{attrs:{rows:"2",name:"description",placeholder:e.trans("employee.account_description")},model:{value:e.accountForm.description,callback:function(t){e.$set(e.accountForm,"description",t)},expression:"accountForm.description"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.accountForm,"prop-name":"description"}})],1),e._v(" "),o("button",{staticClass:"btn btn-info waves-effect waves-light pull-right",attrs:{type:"submit"}},[e.aid?o("span",[e._v(e._s(e.trans("general.update")))]):o("span",[e._v(e._s(e.trans("general.save")))])])]),e._v(" "),o("div",{staticClass:"clearfix"})])}),[],!1,null,null,null).exports,s={components:{accountForm:i},props:["employee"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},r=(o("5A6s"),Object(n.a)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.add_new_account"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("account-form",{attrs:{uuid:e.employee.uuid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),l={components:{accountForm:i},props:["employee","aid"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},c=(o("V3nV"),Object(n.a)(l,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.edit_account"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("account-form",{attrs:{uuid:e.employee.uuid,aid:e.aid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),m={components:{accountForm:i},props:["employee","aid"],mounted:function(){this.aid&&this.getEmployeeAccount()},data:function(){return{employee_account:{}}},methods:{getEmployeeAccount:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.employee.uuid+"/account/"+this.aid).then((function(o){e.employee_account=o,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)}}},d=Object(n.a)(m,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.view_account"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm custom-show-table"},[o("tbody",[o("tr",[o("td",[e._v(e._s(e.trans("employee.account_name")))]),e._v(" "),o("td",[e._v(e._s(e.employee_account.name)+"\n "),e.employee_account.options&&e.employee_account.options.is_primary?o("span",{staticClass:"label label-info"},[e._v(e._s(e.trans("employee.account_primary")))]):e._e()])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.account_number")))]),e._v(" "),o("td",[e._v(e._s(e.employee_account.account_number))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.bank_name")))]),e._v(" "),o("td",[e._v(e._s(e.employee_account.bank_name))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.branch_name")))]),e._v(" "),o("td",[e._v(e._s(e.employee_account.branch_name))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.bank_identification_code")))]),e._v(" "),o("td",[e._v(e._s(e.employee_account.bank_identification_code))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.account_description")))]),e._v(" "),o("td",[e._v(e._s(e.employee_account.description))])])])])]),e._v(" "),o("p",[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.created_at"))+" "+e._s(e._f("momentDateTime")(e.employee_account.created_at)))]),e._v(" "),o("span",{staticClass:"pull-right"},[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.updated_at"))+" "+e._s(e._f("momentDateTime")(e.employee_account.updated_at)))])])])])],2)])])])])}),[],!1,null,null,null).exports,u={props:{employee:{type:Object,default:function(){return{}}},readMode:{type:Boolean,default:!1}},components:{createAccount:r,editAccount:c,showAccount:d},data:function(){return{employee_accounts:{total:0,data:[]},showId:null,editId:null,employee_account:{},filter:{page_length:helper.getConfig("page_length")},addModal:!1,editModal:!1,showModal:!1}},mounted:function(){helper.hasPermission("list-employee")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getEmployeeAccounts()},methods:{getEmployeeName:function(){return helper.getEmployeeName(this.employee)},showAction:function(e){this.showId=e.id,this.showModal=!0},editAction:function(e){this.editId=e.id,this.editModal=!0},getEmployeeAccounts:function(e){var t=this,o=this.$loading.show();"number"!=typeof e&&(e=1);var a=helper.getFilterURL(this.filter);axios.get("/api/employee/"+this.employee.uuid+"/account?page="+e+a).then((function(e){t.employee_accounts=e,o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))},confirmDelete:function(e){var t=this;return function(o){return t.deleteEmployeeAccount(e)}},deleteEmployeeAccount:function(e){var t=this,o=this.$loading.show();axios.delete("/api/employee/"+this.employee.uuid+"/account/"+e.id).then((function(e){toastr.success(e.message),t.getEmployeeAccounts(),o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)}},watch:{employee:function(e){this.getEmployeeAccounts()}}},p=Object(n.a)(u,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"p-b-20"},[e.readMode?e._e():o("button",{staticClass:"btn btn-sm btn-info pull-right m-b-10",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("employee.add_new_account")))]),e._v(" "),e.employee_accounts.total?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm"},[o("thead",[o("tr",[o("th",[e._v(e._s(e.trans("employee.account_name")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.account_number")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.bank_name")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.is_account_primary")))]),e._v(" "),o("th",{staticClass:"table-option"},[e._v(e._s(e.trans("general.action")))])])]),e._v(" "),o("tbody",e._l(e.employee_accounts.data,(function(t){return o("tr",[o("td",{domProps:{textContent:e._s(t.name)}}),e._v(" "),o("td",{domProps:{textContent:e._s(t.account_number)}}),e._v(" "),o("td",{domProps:{textContent:e._s(t.bank_name)}}),e._v(" "),o("td",[t.options.is_primary?o("i",{staticClass:"fas fa-check"}):o("i",{staticClass:"fas fa-times"})]),e._v(" "),o("td",{staticClass:"table-option"},[o("div",{staticClass:"btn-group"},[o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.view_account"),expression:"trans('employee.view_account')"}],staticClass:"btn btn-success btn-sm",on:{click:function(o){return o.preventDefault(),e.showAction(t)}}},[o("i",{staticClass:"fas fa-arrow-circle-right"})]),e._v(" "),e.readMode?e._e():o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.edit_account"),expression:"trans('employee.edit_account')"}],staticClass:"btn btn-info btn-sm",on:{click:function(o){return o.preventDefault(),e.editAction(t)}}},[o("i",{staticClass:"fas fa-edit"})]),e._v(" "),e.readMode?e._e():o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:e.confirmDelete(t)},expression:"{ok: confirmDelete(employee_account)}"},{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.delete_account"),expression:"trans('employee.delete_account')"}],key:t.id,staticClass:"btn btn-danger btn-sm"},[o("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):e._e(),e._v(" "),e.readMode?[e.employee_accounts.total?e._e():o("div",{staticClass:"font-80pc"},[e._v(e._s(e.trans("general.no_result_found")))])]:[e.employee_accounts.total?e._e():o("module-info",{attrs:{module:"employee",title:"account_module_title",description:"account_module_description",icon:"list"}},[o("div",{attrs:{slot:"btn"},slot:"btn"},[o("button",{staticClass:"btn btn-info btn-md",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("general.add_new")))])])])],e._v(" "),o("pagination-record",{attrs:{"page-length":e.filter.page_length,records:e.employee_accounts},on:{"update:pageLength":function(t){return e.$set(e.filter,"page_length",t)},"update:page-length":function(t){return e.$set(e.filter,"page_length",t)},updateRecords:e.getEmployeeAccounts},nativeOn:{change:function(t){return e.getEmployeeAccounts(t)}}}),e._v(" "),e.addModal&&!e.readMode?o("create-account",{attrs:{employee:e.employee},on:{close:function(t){e.addModal=!1},completed:e.getEmployeeAccounts}}):e._e(),e._v(" "),e.editModal&&!e.readMode?o("edit-account",{attrs:{employee:e.employee,aid:e.editId},on:{close:function(t){e.editModal=!1},completed:e.getEmployeeAccounts}}):e._e(),e._v(" "),e.showModal?o("show-account",{attrs:{employee:e.employee,aid:e.showId},on:{close:function(t){e.showModal=!1}}}):e._e()],2)}),[],!1,null,null,null);t.a=p.exports},V3nV:function(e,t,o){"use strict";var a=o("bSsd");o.n(a).a},VWBN:function(e,t,o){"use strict";var a=o("YL+b");o.n(a).a},VsSA:function(e,t,o){"use strict";var a={components:{},data:function(){return{documentForm:new Form({title:"",employee_document_type_id:"",description:"",upload_token:""}),selected_employee_document_type:null,employee_document_types:[],module_id:"",clearAttachment:!0}},props:["uuid","did"],mounted:function(){this.documentForm.upload_token=this.$uuid.v4(),this.getPreRequisite(),this.did&&this.getDocument()},methods:{proceed:function(){this.did?this.updateDocument():this.storeDocument()},getPreRequisite:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/document/pre-requisite").then((function(o){e.employee_document_types=o,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},storeDocument:function(){var e=this,t=this.$loading.show();this.documentForm.post("/api/employee/"+this.uuid+"/document").then((function(o){toastr.success(o.message),e.clearAttachment=!e.clearAttachment,e.$emit("completed"),e.selected_employee_document_type=null,e.documentForm.upload_token=e.$uuid.v4(),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},getDocument:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/document/"+this.did).then((function(o){e.documentForm.title=o.employee_document.title,e.documentForm.employee_document_type_id=o.employee_document.employee_document_type_id,e.selected_employee_document_type={id:o.employee_document.employee_document_type_id,name:o.employee_document.employee_document_type.name},e.documentForm.description=o.employee_document.description,e.documentForm.upload_token=o.employee_document.upload_token,e.module_id=o.employee_document.id,e.$emit("loaded"),t.hide()})).catch((function(o){t.hide(),e.$router.push("/employee/"+e.uuid)}))},updateDocument:function(){var e=this,t=this.$loading.show();this.documentForm.patch("/api/employee/"+this.uuid+"/document/"+this.did).then((function(o){toastr.success(o.message),e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},onDocumentTypeSelect:function(e){this.documentForm.employee_document_type_id=e.id}}},n=o("KHd+"),i=Object(n.a)(a,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.documentForm.errors.clear(t.target.name)}}},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.document_title")))]),e._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:e.documentForm.title,expression:"documentForm.title"}],staticClass:"form-control",attrs:{type:"text",name:"title",placeholder:e.trans("employee.document_title")},domProps:{value:e.documentForm.title},on:{input:function(t){t.target.composing||e.$set(e.documentForm,"title",t.target.value)}}}),e._v(" "),o("show-error",{attrs:{"form-name":e.documentForm,"prop-name":"title"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.document_type")))]),e._v(" "),o("v-select",{attrs:{label:"name",name:"employee_document_type_id",id:"employee_document_type_id",options:e.employee_document_types,placeholder:e.trans("general.select_one")},on:{select:e.onDocumentTypeSelect,close:function(t){return e.documentForm.errors.clear("employee_document_type_id")},remove:function(t){e.documentForm.employee_document_type_id=""}},model:{value:e.selected_employee_document_type,callback:function(t){e.selected_employee_document_type=t},expression:"selected_employee_document_type"}},[e.employee_document_types.length?e._e():o("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),o("show-error",{attrs:{"form-name":e.documentForm,"prop-name":"employee_document_type_id"}})],1)])]),e._v(" "),o("div",{staticClass:"form-group"},[o("autosize-textarea",{attrs:{rows:"2",name:"description",placeholder:e.trans("employee.document_description")},model:{value:e.documentForm.description,callback:function(t){e.$set(e.documentForm,"description",t)},expression:"documentForm.description"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.documentForm,"prop-name":"description"}})],1),e._v(" "),o("div",{staticClass:"form-group"},[o("file-upload-input",{attrs:{"button-text":e.trans("general.upload_document"),token:e.documentForm.upload_token,module:"employee_document","clear-file":e.clearAttachment,"module-id":e.module_id}})],1),e._v(" "),o("button",{staticClass:"btn btn-info waves-effect waves-light pull-right",attrs:{type:"submit"}},[e.did?o("span",[e._v(e._s(e.trans("general.update")))]):o("span",[e._v(e._s(e.trans("general.save")))])])]),e._v(" "),o("div",{staticClass:"clearfix"})])}),[],!1,null,null,null).exports,s={components:{documentForm:i},props:["employee"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},r=(o("iYFp"),Object(n.a)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.add_new_document"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("document-form",{attrs:{uuid:e.employee.uuid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),l={components:{documentForm:i},props:["employee","did"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},c=(o("9mlr"),Object(n.a)(l,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.edit_document"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("document-form",{attrs:{uuid:e.employee.uuid,did:e.did},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),m={components:{documentForm:i},props:["employee","did"],mounted:function(){this.did&&this.getEmployeeDocument()},data:function(){return{employee_document:[],documents:[]}},methods:{getEmployeeDocument:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.employee.uuid+"/document/"+this.did).then((function(o){e.employee_document=o.employee_document,e.documents=o.documents,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}},computed:{authToken:function(){return helper.getAuthToken()}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)}}},d=Object(n.a)(m,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.view_document"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[e.employee_document.employee_document_type?o("h4",{staticClass:"card-title"},[e._v(e._s(e.employee_document.title)+" ("+e._s(e.employee_document.employee_document_type.name)+")")]):e._e(),e._v(" "),o("div",{staticClass:"m-t-20",domProps:{innerHTML:e._s(e.employee_document.description)}}),e._v(" "),e.documents.length?o("div",[o("ul",{staticClass:"m-t-10 upload-file-list"},e._l(e.documents,(function(t){return o("li",{staticClass:"upload-file-list-item"},[o("a",{staticClass:"no-link-color",attrs:{href:"/employee/"+e.employee.uuid+"/document/"+e.employee_document.id+"/attachment/"+t.uuid+"/download?token="+e.authToken}},[o("i",{class:["file-icon","fas","fa-lg",t.file_info.icon]}),e._v(" "),o("span",{staticClass:"upload-file-list-item-size"},[e._v(e._s(t.file_info.size))]),e._v(" "+e._s(t.user_filename))])])})),0)]):e._e(),e._v(" "),o("hr"),e._v(" "),o("p",[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.created_at"))+" "+e._s(e._f("momentDateTime")(e.employee_document.created_at)))]),e._v(" "),o("span",{staticClass:"pull-right"},[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.updated_at"))+" "+e._s(e._f("momentDateTime")(e.employee_document.updated_at)))])])])])],2)])])])])}),[],!1,null,null,null).exports,u={props:{employee:{type:Object,default:function(){return{}}},readMode:{type:Boolean,default:!1}},components:{createDocument:r,editDocument:c,showDocument:d},data:function(){return{employee_documents:{total:0,data:[]},showId:null,editId:null,filter:{page_length:helper.getConfig("page_length")},addModal:!1,editModal:!1,showModal:!1}},mounted:function(){helper.hasPermission("list-employee")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getEmployeeDocuments()},methods:{editAction:function(e){this.editId=e.id,this.editModal=!0},showAction:function(e){this.showId=e.id,this.showModal=!0},getEmployeeDocuments:function(e){var t=this,o=this.$loading.show();"number"!=typeof e&&(e=1);var a=helper.getFilterURL(this.filter);axios.get("/api/employee/"+this.employee.uuid+"/document?page="+e+a).then((function(e){t.employee_documents=e,o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))},confirmDelete:function(e){var t=this;return function(o){return t.deleteEmployeeDocument(e)}},deleteEmployeeDocument:function(e){var t=this,o=this.$loading.show();axios.delete("/api/employee/"+this.employee.uuid+"/document/"+e.id).then((function(e){toastr.success(e.message),t.getEmployeeDocuments(),o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)}},watch:{employee:function(e){this.getEmployeeDocuments()}}},p=Object(n.a)(u,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[e.readMode?e._e():o("button",{staticClass:"btn btn-sm btn-info pull-right",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("employee.add_new_document")))]),e._v(" "),e.employee_documents.total?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm"},[o("thead",[o("tr",[o("th",[e._v(e._s(e.trans("employee.document_title")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.document_type")))]),e._v(" "),o("th",[e._v(e._s(e.trans("general.updated_at")))]),e._v(" "),o("th",{staticClass:"table-option"},[e._v(e._s(e.trans("general.action")))])])]),e._v(" "),o("tbody",e._l(e.employee_documents.data,(function(t){return o("tr",[o("td",{domProps:{textContent:e._s(t.title)}}),e._v(" "),o("td",{domProps:{textContent:e._s(t.employee_document_type.name)}}),e._v(" "),o("td",[e._v(e._s(e._f("momentDateTime")(t.updated_at)))]),e._v(" "),o("td",{staticClass:"table-option"},[o("div",{staticClass:"btn-group"},[o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.view_document"),expression:"trans('employee.view_document')"}],staticClass:"btn btn-success btn-sm",on:{click:function(o){return o.preventDefault(),e.showAction(t)}}},[o("i",{staticClass:"fas fa-arrow-circle-right"})]),e._v(" "),e.readMode?e._e():o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.edit_document"),expression:"trans('employee.edit_document')"}],staticClass:"btn btn-info btn-sm",on:{click:function(o){return o.preventDefault(),e.editAction(t)}}},[o("i",{staticClass:"fas fa-edit"})]),e._v(" "),e.readMode?e._e():o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:e.confirmDelete(t)},expression:"{ok: confirmDelete(employee_document)}"},{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.delete_document"),expression:"trans('employee.delete_document')"}],key:t.id,staticClass:"btn btn-danger btn-sm"},[o("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):e._e(),e._v(" "),e.readMode?[e.employee_documents.total?e._e():o("div",{staticClass:"font-80pc"},[e._v(e._s(e.trans("general.no_result_found")))]),e._v(" "),o("div",[e._v(" ")])]:[e.employee_documents.total?e._e():o("module-info",{attrs:{module:"employee",title:"document_module_title",description:"document_module_description",icon:"list"}},[o("div",{attrs:{slot:"btn"},slot:"btn"},[o("button",{staticClass:"btn btn-info btn-md",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("general.add_new")))])])])],e._v(" "),o("pagination-record",{attrs:{"page-length":e.filter.page_length,records:e.employee_documents},on:{"update:pageLength":function(t){return e.$set(e.filter,"page_length",t)},"update:page-length":function(t){return e.$set(e.filter,"page_length",t)},updateRecords:e.getEmployeeDocuments},nativeOn:{change:function(t){return e.getEmployeeDocuments(t)}}}),e._v(" "),e.addModal&&!e.readMode?o("create-document",{attrs:{employee:e.employee},on:{close:function(t){e.addModal=!1},completed:e.getEmployeeDocuments}}):e._e(),e._v(" "),e.editModal&&!e.readMode?o("edit-document",{attrs:{employee:e.employee,did:e.editId},on:{close:function(t){e.editModal=!1},completed:e.getEmployeeDocuments}}):e._e(),e._v(" "),e.showModal?o("show-document",{attrs:{employee:e.employee,did:e.showId},on:{close:function(t){e.showModal=!1}}}):e._e()],2)}),[],!1,null,null,null);t.a=p.exports},"YL+b":function(e,t,o){var a=o("94pI");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},ZHs6:function(e,t,o){"use strict";var a={components:{},props:["uuid","did"],data:function(){return{designationForm:new Form({designation_id:"",department_id:"",date_effective:"",remarks:"",upload_token:""}),designations:[],selected_designation:null,departments:[],selected_department:null,module_id:"",clearAttachment:!0}},mounted:function(){this.designationForm.upload_token=this.$uuid.v4(),this.getPreRequisite(),this.did&&this.getDesignation()},methods:{proceed:function(){this.did?this.updateDesignation():this.storeDesignation()},getPreRequisite:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/designation/pre-requisite").then((function(o){e.designations=o.designations,e.departments=o.departments,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},storeDesignation:function(){var e=this,t=this.$loading.show();this.designationForm.post("/api/employee/"+this.uuid+"/designation").then((function(o){toastr.success(o.message),e.clearAttachment=!e.clearAttachment,e.$emit("completed"),e.designationForm.upload_token=e.$uuid.v4(),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},getDesignation:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.uuid+"/designation/"+this.did).then((function(o){e.designationForm.designation_id=o.employee_designation.designation_id,e.designationForm.department_id=o.employee_designation.department_id,e.designationForm.date_effective=o.employee_designation.date_effective,e.designationForm.remarks=o.employee_designation.remarks,e.selected_designation={id:o.employee_designation.designation_id,name:o.employee_designation.designation.name},e.selected_department=o.employee_designation.department_id?{id:o.employee_designation.department_id,name:o.employee_designation.department.name}:null,e.designationForm.upload_token=o.employee_designation.upload_token,e.module_id=o.employee_designation.id,e.$emit("loaded"),t.hide()})).catch((function(o){t.hide(),e.$router.push("/employee/"+e.uuid)}))},updateDesignation:function(){var e=this,t=this.$loading.show();this.designationForm.patch("/api/employee/"+this.uuid+"/designation/"+this.did).then((function(o){toastr.success(o.message),e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},onDesignationSelect:function(e){this.designationForm.designation_id=e.id},onDepartmentSelect:function(e){this.designationForm.department_id=e.id}}},n=o("KHd+"),i=Object(n.a)(a,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.designationForm.errors.clear(t.target.name)}}},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.designation")))]),e._v(" "),o("v-select",{attrs:{label:"name","group-values":"designations","group-label":"employee_category","group-select":!1,name:"designation_id",id:"designation_id",options:e.designations,placeholder:e.trans("employee.select_designation")},on:{select:e.onDesignationSelect,close:function(t){return e.designationForm.errors.clear("designation_id")},remove:function(t){e.designationForm.designation_id=""}},model:{value:e.selected_designation,callback:function(t){e.selected_designation=t},expression:"selected_designation"}},[e.designations.length?e._e():o("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),o("show-error",{attrs:{"form-name":e.designationForm,"prop-name":"designation_id"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.department")))]),e._v(" "),o("v-select",{attrs:{label:"name",name:"department_id",id:"department_id",options:e.departments,placeholder:e.trans("employee.select_department")},on:{select:e.onDepartmentSelect,close:function(t){return e.designationForm.errors.clear("department_id")},remove:function(t){e.designationForm.department_id=""}},model:{value:e.selected_department,callback:function(t){e.selected_department=t},expression:"selected_department"}},[e.departments.length?e._e():o("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),o("show-error",{attrs:{"form-name":e.designationForm,"prop-name":"department_id"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.date_effective")))]),e._v(" "),o("datepicker",{attrs:{bootstrapStyling:!0,placeholder:e.trans("employee.date_effective")},on:{selected:function(t){return e.designationForm.errors.clear("date_effective")}},model:{value:e.designationForm.date_effective,callback:function(t){e.$set(e.designationForm,"date_effective",t)},expression:"designationForm.date_effective"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.designationForm,"prop-name":"date_effective"}})],1)]),e._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[e._v(e._s(e.trans("employee.remarks")))]),e._v(" "),o("autosize-textarea",{attrs:{rows:"1",name:"remarks",placeholder:e.trans("employee.remarks")},model:{value:e.designationForm.remarks,callback:function(t){e.$set(e.designationForm,"remarks",t)},expression:"designationForm.remarks"}}),e._v(" "),o("show-error",{attrs:{"form-name":e.designationForm,"prop-name":"remarks"}})],1)])]),e._v(" "),o("div",{staticClass:"form-group"},[o("file-upload-input",{attrs:{"button-text":e.trans("general.upload_document"),token:e.designationForm.upload_token,module:"employee_designation","clear-file":e.clearAttachment,"module-id":e.module_id}})],1),e._v(" "),o("div",{staticClass:"form-group"},[o("button",{staticClass:"btn btn-info pull-right"},[e._v(e._s(e.trans("general.save")))])]),e._v(" "),o("div",{staticClass:"clearfix"})])}),[],!1,null,null,null).exports,s={components:{designationForm:i},props:["employee"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},r=(o("VWBN"),Object(n.a)(s,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.add_new_designation"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("designation-form",{attrs:{uuid:e.employee.uuid},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports),l={components:{designationForm:i},props:["employee","did"],methods:{complete:function(){this.$emit("completed"),this.$emit("close")}}},c=(o("D0tX"),{components:{},props:["employee","did"],mounted:function(){this.did&&this.getEmployeeDesignation()},data:function(){return{employee_designation:[],attachments:[]}},methods:{getEmployeeName:function(){return helper.getEmployeeName(this.employee)},getEmployeeDesignation:function(){var e=this,t=this.$loading.show();axios.get("/api/employee/"+this.employee.uuid+"/designation/"+this.did).then((function(o){e.employee_designation=o.employee_designation,e.attachments=o.attachments,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}},computed:{authToken:function(){return helper.getAuthToken()}},filters:{moment:function(e){return helper.formatDate(e)},momentDateTime:function(e){return helper.formatDateTime(e)}}});function m(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var d={components:{createDesignation:r,editDesignation:Object(n.a)(l,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e._t("header",[e._v("\n "+e._s(e.trans("employee.edit_designation"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])])],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[o("designation-form",{attrs:{uuid:e.employee.uuid,did:e.did},on:{completed:e.complete}})])],2)])])])])}),[],!1,null,null,null).exports,showDesignation:Object(n.a)(c,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[e.employee.id?e._t("header",[e._v("\n "+e._s(e.getEmployeeName(e.employee))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(t){return e.$emit("close")}}},[e._v("x")])]):e._e()],2),e._v(" "),o("div",{staticClass:"modal-body"},[e._t("body",[e.employee_designation.id?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table custom-show-table"},[o("tbody",[o("tr",[o("td",[e._v(e._s(e.trans("employee.designation")))]),e._v(" "),o("td",[e._v(e._s(e.employee_designation.designation.name))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.category")))]),e._v(" "),o("td",[e._v(e._s(e.employee_designation.designation.employee_category.name))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.department")))]),e._v(" "),o("td",[e._v(e._s(e.employee_designation.department_id?e.employee_designation.department.name:"-"))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.date_effective")))]),e._v(" "),o("td",[e._v(e._s(e._f("moment")(e.employee_designation.date_effective)))])]),e._v(" "),o("tr",[o("td",[e._v(e._s(e.trans("employee.remarks")))]),e._v(" "),o("td",[e._v(e._s(e.employee_designation.remarks))])])])])]):e._e(),e._v(" "),e.attachments.length?o("div",[o("ul",{staticClass:"m-t-10 upload-file-list"},e._l(e.attachments,(function(t){return o("li",{staticClass:"upload-file-list-item"},[o("a",{staticClass:"no-link-color",attrs:{href:"/employee/"+e.employee.uuid+"/designation/"+e.employee_designation.id+"/attachment/"+t.uuid+"/download?token="+e.authToken}},[o("i",{class:["file-icon","fas","fa-lg",t.file_info.icon]}),e._v(" "),o("span",{staticClass:"upload-file-list-item-size"},[e._v(e._s(t.file_info.size))]),e._v(" "+e._s(t.user_filename))])])})),0)]):e._e(),e._v(" "),o("hr"),e._v(" "),o("p",[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.created_at"))+" "+e._s(e._f("momentDateTime")(e.employee_designation.created_at)))]),e._v(" "),o("span",{staticClass:"pull-right"},[o("i",{staticClass:"far fa-clock"}),e._v(" "),o("small",[e._v(e._s(e.trans("general.updated_at"))+" "+e._s(e._f("momentDateTime")(e.employee_designation.updated_at)))])])])])],2)])])])])}),[],!1,null,null,null).exports},props:{employee:{type:Object,default:function(){return{}}},readMode:{type:Boolean,default:!1}},data:function(){var e;return m(e={addModal:!1,showId:null,editId:null},"addModal",!1),m(e,"editModal",!1),m(e,"showModal",!1),e},methods:{editAction:function(e){this.editId=e.id,this.editModal=!0},showAction:function(e){this.showId=e.id,this.showModal=!0},confirmDelete:function(e){var t=this;return function(o){return t.deleteEmployeeDesignation(e)}},deleteEmployeeDesignation:function(e){var t=this,o=this.$loading.show();axios.delete("/api/employee/"+this.employee.uuid+"/designation/"+e.id).then((function(e){toastr.success(e.message),t.$emit("completed"),o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e)}))}},computed:{canAddDesignation:function(){return this.employee.employee_terms.some((function(e){return null==e.date_of_leaving}))}},filters:{momentDateTime:function(e){return helper.formatDateTime(e)},moment:function(e){return helper.formatDate(e)}}},u=Object(n.a)(d,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[e.canAddDesignation&&!e.readMode?o("button",{staticClass:"btn btn-sm btn-info pull-right m-b-10",on:{click:function(t){e.addModal=!0}}},[o("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("employee.add_new_designation")))]):e._e(),e._v(" "),e.employee.employee_designations?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm"},[o("thead",[o("tr",[o("th",[e._v(e._s(e.trans("employee.designation")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.category")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.department")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.date_effective")))]),e._v(" "),o("th",[e._v(e._s(e.trans("employee.date_end")))]),e._v(" "),o("th",{staticClass:"table-option"},[e._v(e._s(e.trans("general.action")))])])]),e._v(" "),o("tbody",e._l(e.employee.employee_designations,(function(t){return o("tr",[o("td",[e._v("\n "+e._s(t.designation.name)+"\n ")]),e._v(" "),o("td",{domProps:{textContent:e._s(t.designation.employee_category.name)}}),e._v(" "),o("td",{domProps:{textContent:e._s(t.department_id?t.department.name:"-")}}),e._v(" "),o("td",[e._v(e._s(e._f("moment")(t.date_effective)))]),e._v(" "),o("td",[t.date_end?o("span",[e._v(e._s(e._f("moment")(t.date_end)))]):o("span",[e._v("-")])]),e._v(" "),o("td",{staticClass:"table-option"},[o("div",{staticClass:"btn-group"},[e.$first(t,e.employee.employee_designations)&&!e.readMode?[o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:e.confirmDelete(t)},expression:"{ok: confirmDelete(employee_designation)}"},{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.delete_designation"),expression:"trans('employee.delete_designation')"}],key:t.id,staticClass:"btn btn-danger btn-sm"},[o("i",{staticClass:"fas fa-trash"})]),e._v(" "),o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.edit_designation"),expression:"trans('employee.edit_designation')"}],staticClass:"btn btn-info btn-sm",on:{click:function(o){return o.preventDefault(),e.editAction(t)}}},[o("i",{staticClass:"fas fa-edit"})])]:e._e(),e._v(" "),o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("employee.view_designation"),expression:"trans('employee.view_designation')"}],staticClass:"btn btn-success btn-sm",on:{click:function(o){return o.preventDefault(),e.showAction(t)}}},[o("i",{staticClass:"fas fa-arrow-circle-right"})])],2)])])})),0)])]):o("div",{staticClass:"font-80pc"},[e._v("\n "+e._s(e.trans("general.no_result_found"))+"\n ")]),e._v(" "),e.addModal&&e.canAddDesignation&&!e.readMode?o("create-designation",{attrs:{employee:e.employee},on:{close:function(t){e.addModal=!1},completed:function(t){return e.$emit("completed")}}}):e._e(),e._v(" "),e.editModal&&!e.readMode?o("edit-designation",{attrs:{employee:e.employee,did:e.editId},on:{close:function(t){e.editModal=!1},completed:function(t){return e.$emit("completed")}}}):e._e(),e._v(" "),e.showModal?o("show-designation",{attrs:{employee:e.employee,did:e.showId},on:{close:function(t){e.showModal=!1}}}):e._e()],1)}),[],!1,null,null,null);t.a=u.exports},ZODj:function(e,t,o){var a=o("J0Es");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},bSsd:function(e,t,o){var a=o("kfAI");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},e6Pe:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},gLxG:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},iYFp:function(e,t,o){"use strict";var a=o("5++/");o.n(a).a},ke8N:function(e,t,o){"use strict";var a=o("nyO7");o.n(a).a},kfAI:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},luSA:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},nyO7:function(e,t,o){var a=o("luSA");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},oXN6:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},qRGV:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])},wCqo:function(e,t,o){var a=o("xAxo");"string"==typeof a&&(a=[[e.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o("aET+")(a,n);a.locals&&(e.exports=a.locals)},xAxo:function(e,t,o){(e.exports=o("I1BE")(!1)).push([e.i,"\n.loading-overlay{\n z-index: 1060;\n}\n",""])}}]);
//# sourceMappingURL=edit.js.map?id=2f85921475e86c8720fd