/home/techb158/ileadtechnology.com/SSM/public/js/reception/complaint
NameSizeModeActions
edit~js/-0755rm
edit.js115360644editdlrm
edit.js.map1670644editdlrm
index.js264800644editdlrm
index.js.map1600644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/reception/complaint/edit.js (11536B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[295],{"09gW":function(t,o,e){"use strict";var a={components:{},data:function(){return{complaintForm:new Form({complainant_name:"",complainant_address:"",complainant_contact_number:"",complaint_type_id:"",employee_id:"",date_of_complaint:"",date_of_resolution:"",action:"",description:"",upload_token:""}),is_actionable:!1,employees:[],selected_employee:null,complaint_types:[],selected_complaint_type:null,module_id:"",clearAttachment:!0}},props:["uuid"],mounted:function(){helper.hasPermission("create-complaint")||helper.hasPermission("edit-complaint")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.uuid?this.get():(this.complaintForm.date_of_complaint=helper.today(),this.complaintForm.upload_token=this.$uuid.v4()),this.getPreRequisite()},methods:{proceed:function(){this.uuid?this.update():this.store()},getPreRequisite:function(){var t=this,o=this.$loading.show();axios.get("/api/complaint/pre-requisite").then((function(e){t.complaint_types=e.complaint_types,t.employees=e.employees,o.hide()})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},store:function(){var t=this,o=this.$loading.show();this.complaintForm.post("/api/complaint").then((function(e){toastr.success(e.message),t.clearAttachment=!t.clearAttachment,t.complaintForm.upload_token=t.$uuid.v4(),t.$emit("completed"),o.hide()})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},get:function(){var t=this,o=this.$loading.show();axios.get("/api/complaint/"+this.uuid).then((function(e){t.complaintForm.upload_token=e.complaint.upload_token,t.complaintForm.complainant_name=e.complaint.complainant_name,t.complaintForm.complainant_contact_number=e.complaint.complainant_contact_number,t.complaintForm.complainant_address=e.complaint.complainant_address,t.complaintForm.description=e.complaint.description,t.complaintForm.date_of_complaint=e.complaint.date_of_complaint,t.complaintForm.date_of_resolution=e.complaint.date_of_resolution,t.complaintForm.employee_id=e.complaint.employee_id,t.selected_employee=e.selected_employee,t.complaintForm.complaint_type_id=e.complaint.complaint_type_id,t.selected_complaint_type=e.selected_complaint_type,t.is_actionable=e.is_actionable,t.module_id=e.complaint.id,t.loaded=!0,o.hide()})).catch((function(t){}))},update:function(){var t=this,o=this.$loading.show();this.complaintForm.patch("/api/complaint/"+this.uuid).then((function(e){toastr.success(e.message),o.hide(),t.$router.push("/reception/complaint")})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},onComplaintTypeSelect:function(t){return this.complaintForm.complaint_type_id=t.id},onEmployeeSelect:function(t){return this.complaintForm.employee_id=t.id}}},n=e("KHd+"),i=Object(n.a)(a,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("form",{on:{submit:function(o){return o.preventDefault(),t.proceed(o)},keydown:function(o){return t.complaintForm.errors.clear(o.target.name)}}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-3"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_type")))]),t._v(" "),e("v-select",{attrs:{label:"name",name:"complaint_type_id",id:"complaint_type_id",options:t.complaint_types,placeholder:t.trans("reception.select_complaint_type")},on:{select:t.onComplaintTypeSelect,close:function(o){return t.complaintForm.errors.clear("complaint_type_id")},remove:function(o){t.complaintForm.complaint_type_id=""}},model:{value:t.selected_complaint_type,callback:function(o){t.selected_complaint_type=o},expression:"selected_complaint_type"}},[t.complaint_types.length?t._e():e("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complaint_type_id"}})],1)]),t._v(" "),e("div",{staticClass:"col-12 col-sm-4"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.date_of_complaint")))]),t._v(" "),e("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("reception.date_of_complaint")},on:{selected:function(o){return t.complaintForm.errors.clear("date_of_complaint")}},model:{value:t.complaintForm.date_of_complaint,callback:function(o){t.$set(t.complaintForm,"date_of_complaint",o)},expression:"complaintForm.date_of_complaint"}}),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"date_of_complaint"}})],1)])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-3"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complainant_name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.complaintForm.complainant_name,expression:"complaintForm.complainant_name"}],staticClass:"form-control",attrs:{type:"text",name:"complainant_name",placeholder:t.trans("reception.complainant_name")},domProps:{value:t.complaintForm.complainant_name},on:{input:function(o){o.target.composing||t.$set(t.complaintForm,"complainant_name",o.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complainant_name"}})],1)]),t._v(" "),e("div",{staticClass:"col-12 col-sm-3"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complainant_contact_number")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.complaintForm.complainant_contact_number,expression:"complaintForm.complainant_contact_number"}],staticClass:"form-control",attrs:{type:"text",name:"complainant_contact_number",placeholder:t.trans("reception.complainant_contact_number")},domProps:{value:t.complaintForm.complainant_contact_number},on:{input:function(o){o.target.composing||t.$set(t.complaintForm,"complainant_contact_number",o.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complainant_contact_number"}})],1)]),t._v(" "),e("div",{staticClass:"col-12 col-sm-6"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complainant_address")))]),t._v(" "),e("autosize-textarea",{attrs:{rows:"1",name:"complainant_address",placeholder:t.trans("reception.complainant_address")},model:{value:t.complaintForm.complainant_address,callback:function(o){t.$set(t.complaintForm,"complainant_address",o)},expression:"complaintForm.complainant_address"}}),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complainant_address"}})],1)])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_description")))]),t._v(" "),e("autosize-textarea",{attrs:{rows:"3",name:"description",placeholder:t.trans("reception.complaint_description")},model:{value:t.complaintForm.description,callback:function(o){t.$set(t.complaintForm,"description",o)},expression:"complaintForm.description"}}),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"description"}})],1)]),t._v(" "),e("div",{staticClass:"col-12 col-sm-3"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_assign_to")))]),t._v(" "),e("v-select",{attrs:{label:"name",name:"employee_id",id:"employee_id",options:t.employees,placeholder:t.trans("employee.select_employee")},on:{select:t.onEmployeeSelect,close:function(o){return t.complaintForm.errors.clear("employee_id")},remove:function(o){t.complaintForm.employee_id=""}},model:{value:t.selected_employee,callback:function(o){t.selected_employee=o},expression:"selected_employee"}},[t.employees.length?t._e():e("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"employee_id"}})],1)])]),t._v(" "),t.is_actionable?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-3"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.date_of_resolution")))]),t._v(" "),e("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("reception.date_of_resolution")},on:{selected:function(o){return t.complaintForm.errors.clear("date_of_resolution")}},model:{value:t.complaintForm.date_of_resolution,callback:function(o){t.$set(t.complaintForm,"date_of_resolution",o)},expression:"complaintForm.date_of_resolution"}}),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"date_of_resolution"}})],1)]),t._v(" "),e("div",{staticClass:"col-12 col-sm-9"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_action")))]),t._v(" "),e("autosize-textarea",{attrs:{rows:"2",name:"action",placeholder:t.trans("reception.complaint_action")},model:{value:t.complaintForm.action,callback:function(o){t.$set(t.complaintForm,"action",o)},expression:"complaintForm.action"}}),t._v(" "),e("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"action"}})],1)])]):t._e(),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"form-group"},[e("file-upload-input",{attrs:{"button-text":t.trans("general.upload_document"),token:t.complaintForm.upload_token,module:"complaint","clear-file":t.clearAttachment,"module-id":t.module_id}})],1)])]),t._v(" "),e("div",{staticClass:"card-footer text-right"},[e("router-link",{directives:[{name:"show",rawName:"v-show",value:t.uuid,expression:"uuid"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/reception/complaint"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.uuid?t._e():e("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(o){return t.$emit("cancel")}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),e("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.uuid?e("span",[t._v(t._s(t.trans("general.update")))]):e("span",[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null);o.a=i.exports},"6tfh":function(t,o,e){"use strict";e.r(o);var a={components:{complaintForm:e("09gW").a},data:function(){return{uuid:this.$route.params.uuid}},mounted:function(){helper.hasPermission("edit-complaint")||(helper.notAccessibleMsg(),this.$router.push("/dashboard"))}},n=e("KHd+"),i=Object(n.a)(a,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",[e("div",{staticClass:"page-titles"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-6"},[e("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("reception.edit_complaint")))])]),t._v(" "),e("div",{staticClass:"col-12 col-sm-6"},[e("div",{staticClass:"action-buttons pull-right"},[e("button",{staticClass:"btn btn-info btn-sm",on:{click:function(o){return t.$router.push("/reception/complaint")}}},[e("i",{staticClass:"fas fa-list"}),t._v(" "),e("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("reception.complaint")))])])])])])]),t._v(" "),e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"card card-form"},[e("div",{staticClass:"card-body p-t-20"},[e("complaint-form",{attrs:{uuid:t.uuid}})],1)])])])}),[],!1,null,null,null);o.default=i.exports}}]); //# sourceMappingURL=edit.js.map?id=b29ff7588703b3890947