/
home
/
techb158
/
ileadtechnology.com
/
SSM
/
public
/
js
/
employee
/
idCard
/
/home/techb158/ileadtechnology.com/SSM/public/js/employee/idCard
mkdir
upload
Name
Size
Mode
Actions
index.js
4632
0644
edit
dl
rm
index.js.map
152
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/SSM/public/js/employee/idCard/index.js
(4632B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[169],{G2q9:function(t,e,a){"use strict";a.r(e);var r={components:{},data:function(){return{idCardForm:new Form({department_id:"",id_card_template_id:""},!1),departments:[],selected_department:null,id_card_templates:[],selected_id_card_template:null,help_topic:""}},mounted:function(){helper.hasPermission("generate-employee-id-card")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getPreRequisite(),helper.showDemoNotification(["employee"])},methods:{getPreRequisite:function(){var t=this,e=this.$loading.show();axios.get("/api/employee/id-card/pre-requisite").then((function(a){t.departments=a.departments,t.id_card_templates=a.id_card_templates,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onDepartmentSelect:function(t){var e=this.$loading.show();this.idCardForm.department_id=t.id,e.hide()},onDepartmentRemove:function(t){this.idCardForm.department_id=""},onIdCardTemplateSelect:function(t){var e=this.$loading.show();this.idCardForm.id_card_template_id=t.id,e.hide()},onIdCardTemplateRemove:function(t){this.idCardForm.id_card_template_id=""}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},computed:{authToken:function(){return helper.getAuthToken()},getURL:function(){return"/employee/id-card/print?department_id="+this.idCardForm.department_id+"&token="+this.authToken+"&id_card_template_id="+this.idCardForm.id_card_template_id}}},i=a("KHd+"),d=Object(i.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"page-titles"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("employee.id_card")))])]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"action-buttons pull-right"},[a("help-button",{on:{clicked:function(e){t.help_topic=""}}})],1)])])]),t._v(" "),a("div",{staticClass:"container-fluid"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-body p-4"},[a("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)},keydown:function(e){return t.idCardForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("employee.department")))]),t._v(" "),a("v-select",{attrs:{label:"name",name:"department_id",id:"department_id",options:t.departments,placeholder:t.trans("employee.select_department")},on:{select:t.onDepartmentSelect,close:function(e){return t.idCardForm.errors.clear("department_id")},remove:t.onDepartmentRemove},model:{value:t.selected_department,callback:function(e){t.selected_department=e},expression:"selected_department"}},[t.departments.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n\t\t\t\t\t\t "+t._s(t.trans("general.no_option_found"))+"\n\t\t\t\t\t\t ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.idCardForm,"prop-name":"department_id"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.id_card_template")))]),t._v(" "),a("v-select",{attrs:{label:"name",name:"id_card_template_id",id:"id_card_template_id",options:t.id_card_templates,placeholder:t.trans("academic.select_id_card_template")},on:{select:t.onIdCardTemplateSelect,close:function(e){return t.idCardForm.errors.clear("id_card_template_id")},remove:t.onIdCardTemplateRemove},model:{value:t.selected_id_card_template,callback:function(e){t.selected_id_card_template=e},expression:"selected_id_card_template"}},[t.id_card_templates.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n\t\t\t\t\t\t "+t._s(t.trans("general.no_option_found"))+"\n\t\t\t\t\t\t ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.idCardForm,"prop-name":"id_card_template_id"}})],1)])]),t._v(" "),t.idCardForm.department_id&&t.idCardForm.id_card_template_id?a("div",{staticClass:"form-group"},[a("a",{staticClass:"btn btn-info",attrs:{href:t.getURL,target:"_blank"}},[t._v(t._s(t.trans("employee.generate_id_card")))])]):t._e()])])])])])]),t._v(" "),a("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);e.default=d.exports}}]); //# sourceMappingURL=index.js.map?id=843f6331f260e3324653
Save
cmd:
run