/
home
/
techb158
/
ileadtechnology.com
/
SSM
/
public
/
js
/
reception
/
complaint
/
/home/techb158/ileadtechnology.com/SSM/public/js/reception/complaint
mkdir
upload
Name
Size
Mode
Actions
edit~js/
-
0755
rm
edit.js
11536
0644
edit
dl
rm
edit.js.map
167
0644
edit
dl
rm
index.js
26480
0644
edit
dl
rm
index.js.map
160
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/SSM/public/js/reception/complaint/index.js
(26480B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[296],{"09gW":function(t,e,a){"use strict";var o={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,e=this.$loading.show();axios.get("/api/complaint/pre-requisite").then((function(a){t.complaint_types=a.complaint_types,t.employees=a.employees,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},store:function(){var t=this,e=this.$loading.show();this.complaintForm.post("/api/complaint").then((function(a){toastr.success(a.message),t.clearAttachment=!t.clearAttachment,t.complaintForm.upload_token=t.$uuid.v4(),t.$emit("completed"),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},get:function(){var t=this,e=this.$loading.show();axios.get("/api/complaint/"+this.uuid).then((function(a){t.complaintForm.upload_token=a.complaint.upload_token,t.complaintForm.complainant_name=a.complaint.complainant_name,t.complaintForm.complainant_contact_number=a.complaint.complainant_contact_number,t.complaintForm.complainant_address=a.complaint.complainant_address,t.complaintForm.description=a.complaint.description,t.complaintForm.date_of_complaint=a.complaint.date_of_complaint,t.complaintForm.date_of_resolution=a.complaint.date_of_resolution,t.complaintForm.employee_id=a.complaint.employee_id,t.selected_employee=a.selected_employee,t.complaintForm.complaint_type_id=a.complaint.complaint_type_id,t.selected_complaint_type=a.selected_complaint_type,t.is_actionable=a.is_actionable,t.module_id=a.complaint.id,t.loaded=!0,e.hide()})).catch((function(t){}))},update:function(){var t=this,e=this.$loading.show();this.complaintForm.patch("/api/complaint/"+this.uuid).then((function(a){toastr.success(a.message),e.hide(),t.$router.push("/reception/complaint")})).catch((function(t){e.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=a("KHd+"),i=Object(n.a)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("form",{on:{submit:function(e){return e.preventDefault(),t.proceed(e)},keydown:function(e){return t.complaintForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_type")))]),t._v(" "),a("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(e){return t.complaintForm.errors.clear("complaint_type_id")},remove:function(e){t.complaintForm.complaint_type_id=""}},model:{value:t.selected_complaint_type,callback:function(e){t.selected_complaint_type=e},expression:"selected_complaint_type"}},[t.complaint_types.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complaint_type_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("reception.date_of_complaint")))]),t._v(" "),a("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("reception.date_of_complaint")},on:{selected:function(e){return t.complaintForm.errors.clear("date_of_complaint")}},model:{value:t.complaintForm.date_of_complaint,callback:function(e){t.$set(t.complaintForm,"date_of_complaint",e)},expression:"complaintForm.date_of_complaint"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"date_of_complaint"}})],1)])]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complainant_name")))]),t._v(" "),a("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(e){e.target.composing||t.$set(t.complaintForm,"complainant_name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complainant_name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complainant_contact_number")))]),t._v(" "),a("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(e){e.target.composing||t.$set(t.complaintForm,"complainant_contact_number",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complainant_contact_number"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complainant_address")))]),t._v(" "),a("autosize-textarea",{attrs:{rows:"1",name:"complainant_address",placeholder:t.trans("reception.complainant_address")},model:{value:t.complaintForm.complainant_address,callback:function(e){t.$set(t.complaintForm,"complainant_address",e)},expression:"complaintForm.complainant_address"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"complainant_address"}})],1)])]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_description")))]),t._v(" "),a("autosize-textarea",{attrs:{rows:"3",name:"description",placeholder:t.trans("reception.complaint_description")},model:{value:t.complaintForm.description,callback:function(e){t.$set(t.complaintForm,"description",e)},expression:"complaintForm.description"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"description"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_assign_to")))]),t._v(" "),a("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(e){return t.complaintForm.errors.clear("employee_id")},remove:function(e){t.complaintForm.employee_id=""}},model:{value:t.selected_employee,callback:function(e){t.selected_employee=e},expression:"selected_employee"}},[t.employees.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"employee_id"}})],1)])]),t._v(" "),t.is_actionable?a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.date_of_resolution")))]),t._v(" "),a("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("reception.date_of_resolution")},on:{selected:function(e){return t.complaintForm.errors.clear("date_of_resolution")}},model:{value:t.complaintForm.date_of_resolution,callback:function(e){t.$set(t.complaintForm,"date_of_resolution",e)},expression:"complaintForm.date_of_resolution"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"date_of_resolution"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-9"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_action")))]),t._v(" "),a("autosize-textarea",{attrs:{rows:"2",name:"action",placeholder:t.trans("reception.complaint_action")},model:{value:t.complaintForm.action,callback:function(e){t.$set(t.complaintForm,"action",e)},expression:"complaintForm.action"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.complaintForm,"prop-name":"action"}})],1)])]):t._e(),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12"},[a("div",{staticClass:"form-group"},[a("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(" "),a("div",{staticClass:"card-footer text-right"},[a("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():a("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.uuid?a("span",[t._v(t._s(t.trans("general.update")))]):a("span",[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null);e.a=i.exports},"IF5+":function(t,e,a){"use strict";a.r(e);var o=a("09gW"),n={components:{},props:["uuid"],mounted:function(){this.uuid&&this.get()},data:function(){return{complaint:[],attachments:[]}},methods:{get:function(){var t=this,e=this.$loading.show();axios.get("/api/complaint/"+this.uuid).then((function(a){t.complaint=a.complaint,t.attachments=a.attachments,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},getEmployeeName:function(t){return helper.getEmployeeName(t)},getEmployeeDesignation:function(t,e){return helper.getEmployeeDesignation(t,e)}},computed:{authToken:function(){return helper.getAuthToken()}},filters:{momentDateTime:function(t){return helper.formatDateTime(t)},moment:function(t){return helper.formatDate(t)}}},i=a("KHd+"),s=Object(i.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"modal"}},[a("div",{staticClass:"modal-mask"},[a("div",{staticClass:"modal-wrapper"},[a("div",{staticClass:"modal-container modal-lg"},[t.complaint.id?a("div",{staticClass:"modal-header"},[t._t("header",[a("span",[t._v("#"+t._s(t.complaint.id))]),t._v(" "),a("span",{staticClass:"float-right pointer",on:{click:function(e){return t.$emit("close")}}},[t._v("x")])])],2):t._e(),t._v(" "),t.complaint.id?a("div",{staticClass:"modal-body"},[t._t("body",[a("h6",{staticClass:"card-title"},[a("p",[a("strong",[t._v(t._s(t.trans("reception.date_of_complaint"))+":")]),t._v(" "+t._s(t._f("moment")(t.complaint.date_of_complaint)))]),t._v(" "),t.complaint.date_of_resolution?a("p",[a("strong",[t._v(t._s(t.trans("reception.date_of_resolution"))+":")]),t._v(" "),a("span",{staticClass:"label label-success"},[t._v(t._s(t._f("moment")(t.complaint.date_of_resolution)))])]):t._e(),t._v(" "),a("strong",[t._v(t._s(t.trans("reception.complaint_type"))+":")]),t._v(" "+t._s(t.complaint.complaint_type.name)+"\n "),a("br"),t._v(" "),a("strong",[t._v(t._s(t.trans("reception.complainant_name"))+":")]),t._v(" "+t._s(t.complaint.complainant_name)+" "),a("br"),t._v(" "),a("strong",[t._v(t._s(t.trans("reception.complainant_contact_number"))+":")]),t._v(" "+t._s(t.complaint.complainant_contact_number)+" "),a("br"),t._v(" "),a("strong",[t._v(t._s(t.trans("reception.complainant_address"))+":")]),t._v(" "+t._s(t.complaint.complainant_address)+"\n "),t.complaint.employee?a("p",{staticClass:"pull-right"},[a("strong",[t._v(t._s(t.trans("reception.complaint_assign_to"))+":")]),t._v(" "+t._s(t.getEmployeeName(t.complaint.employee))+" "+t._s(t.getEmployeeDesignation(t.complaint.employee,t.complaint.date_of_complaint))+"\n ")]):t._e()]),t._v(" "),a("div",{staticClass:"m-t-20",domProps:{innerHTML:t._s(t.complaint.description)}}),t._v(" "),t.complaint.action?a("div",{staticClass:"m-t-20",domProps:{innerHTML:t._s(t.complaint.action)}}):t._e(),t._v(" "),t.attachments.length?a("div",[a("ul",{staticClass:"m-t-10 upload-file-list"},t._l(t.attachments,(function(e){return a("li",{staticClass:"upload-file-list-item"},[a("a",{staticClass:"no-link-color",attrs:{href:"/reception/complaint/"+t.complaint.uuid+"/attachment/"+e.uuid+"/download?token="+t.authToken}},[a("i",{class:["file-icon","fas","fa-lg",e.file_info.icon]}),t._v(" "),a("span",{staticClass:"upload-file-list-item-size"},[t._v(t._s(e.file_info.size))]),t._v(" "+t._s(e.user_filename))])])})),0)]):t._e(),t._v(" "),a("hr"),t._v(" "),a("p",[a("i",{staticClass:"far fa-clock"}),t._v(" "),a("small",[t._v(t._s(t.trans("general.created_at"))+" "+t._s(t._f("momentDateTime")(t.complaint.created_at)))]),t._v(" "),a("span",{staticClass:"pull-right"},[a("i",{staticClass:"far fa-clock"}),t._v(" "),a("small",[t._v(t._s(t.trans("general.updated_at"))+" "+t._s(t._f("momentDateTime")(t.complaint.updated_at)))])])])])],2):t._e()])])])])}),[],!1,null,null,null).exports,l={components:{complaintForm:o.a,complaintDetail:s},data:function(){return{complaints:{total:0,data:[]},filter:{sort_by:"created_at",order:"desc",type:"",complaint_type_id:[],date_of_complaint_start_date:"",date_of_complaint_end_date:"",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"date",translation:i18n.reception.date_of_complaint},{value:"created_at",translation:i18n.general.created_at}],showFilterPanel:!1,showCreatePanel:!1,complaint_types:[],selected_complaint_types:null,help_topic:"",showUuid:"",showModal:!1}},mounted:function(){helper.hasPermission("list-complaint")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getComplaints(),helper.showDemoNotification(["reception"])},methods:{hasPermission:function(t){return helper.hasPermission(t)},showAction:function(t){this.showUuid=t.uuid,this.showModal=!0},getEmployeeName:function(t){return helper.getEmployeeName(t)},getComplaints:function(t){var e=this,a=this.$loading.show();"number"!=typeof t&&(t=1),this.filter.date_of_complaint_start_date=helper.toDate(this.filter.date_of_complaint_start_date),this.filter.date_of_complaint_end_date=helper.toDate(this.filter.date_of_complaint_end_date);var o=helper.getFilterURL(this.filter);axios.get("/api/complaint?page="+t+o).then((function(t){e.complaints=t.complaints,e.complaint_types=t.filters.complaint_types,a.hide()})).catch((function(t){a.hide(),helper.showErrorMsg(t)}))},editComplaint:function(t){this.$router.push("/reception/complaint/"+t.uuid+"/edit")},confirmDelete:function(t){var e=this;return function(a){return e.deleteComplaint(t)}},deleteComplaint:function(t){var e=this,a=this.$loading.show();axios.delete("/api/complaint/"+t.uuid).then((function(t){toastr.success(t.message),e.getComplaints(),a.hide()})).catch((function(t){a.hide(),helper.showErrorMsg(t)}))},getConfig:function(t){return helper.getConfig(t)},print:function(){var t=this.$loading.show();axios.post("/api/complaint/print",{filter:this.filter}).then((function(e){var a=window.open("/print");t.hide(),a.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/complaint/pdf",{filter:this.filter}).then((function(a){e.hide(),window.open("/download/report/"+a+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onComplaintTypeSelect:function(t){this.filter.complaint_type_id.push(t.id)},onComplaintTypeRemove:function(t){this.filter.complaint_type_id.splice(this.filter.complaint_type_id.indexOf(t.id),1)},getEmployeeDesignationOnDate:function(t,e){return helper.getEmployeeDesignationOnDate(t,e)}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)},momentTime:function(t){return helper.formatTime(t)}},watch:{"filter.sort_by":function(t){this.getComplaints()},"filter.order":function(t){this.getComplaints()},"filter.page_length":function(t){this.getComplaints()}},computed:{authToken:function(){return helper.getAuthToken()}}},r=Object(i.a)(l,(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("reception.complaint"))+" \n "),t.complaints.total?a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.complaints.total,from:t.complaints.from,to:t.complaints.to})))]):a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"action-buttons pull-right"},[t.complaints.total&&!t.showCreatePanel&&t.hasPermission("create-complaint")?a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.add_new"),expression:"trans('general.add_new')"}],staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[a("i",{staticClass:"fas fa-plus"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("reception.add_new_complaint")))])]):t._e(),t._v(" "),t.showFilterPanel?t._e():a("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[a("i",{staticClass:"fas fa-filter"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.filter")))])]),t._v(" "),a("sort-by",{attrs:{"order-by-options":t.orderByOptions,"sort-by":t.filter.sort_by,order:t.filter.order},on:{updateSortBy:function(e){t.filter.sort_by=e},updateOrder:function(e){t.filter.order=e}}}),t._v(" "),a("div",{staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.more_option"),expression:"trans('general.more_option')"}],staticClass:"btn btn-info btn-sm dropdown-toggle no-caret ",attrs:{type:"button",role:"menu",id:"moreOption","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[a("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),a("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[a("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[a("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),a("help-button",{on:{clicked:function(e){t.help_topic="reception.complaint"}}})],1)])])]),t._v(" "),a("div",{staticClass:"container-fluid"},[a("transition",{attrs:{name:"fade"}},[t.showFilterPanel?a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter")))]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("reception.complaint_type")))]),t._v(" "),a("v-select",{attrs:{label:"name","track-by":"id",name:"complaint_type_id",id:"complaint_type_id",options:t.complaint_types,placeholder:t.trans("reception.select_complaint_type"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_complaint_types},on:{select:t.onComplaintTypeSelect,remove:t.onComplaintTypeRemove},model:{value:t.selected_complaint_types,callback:function(e){t.selected_complaint_types=e},expression:"selected_complaint_types"}},[t.complaint_types.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("date-range-picker",{attrs:{"start-date":t.filter.date_of_complaint_start_date,"end-date":t.filter.date_of_complaint_end_date,label:t.trans("general.date_between")},on:{"update:startDate":function(e){return t.$set(t.filter,"date_of_complaint_start_date",e)},"update:start-date":function(e){return t.$set(t.filter,"date_of_complaint_start_date",e)},"update:endDate":function(e){return t.$set(t.filter,"date_of_complaint_end_date",e)},"update:end-date":function(e){return t.$set(t.filter,"date_of_complaint_end_date",e)}}})],1)]),t._v(" "),a("div",{staticClass:"card-footer text-right"},[a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){t.showFilterPanel=!1}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getComplaints}},[t._v(t._s(t.trans("general.filter")))])])])]):t._e()]),t._v(" "),t.hasPermission("create-complaint")?a("transition",{attrs:{name:"fade"}},[t.showCreatePanel?a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("reception.add_new_complaint")))]),t._v(" "),a("complaint-form",{on:{completed:t.getComplaints,cancel:function(e){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]):t._e(),t._v(" "),a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[t.complaints.total?a("div",{staticClass:"table-responsive"},[a("table",{staticClass:"table table-sm"},[a("thead",[a("tr",[a("th",[t._v("#")]),t._v(" "),a("th",[t._v(t._s(t.trans("reception.complaint_type")))]),t._v(" "),a("th",[t._v(t._s(t.trans("reception.date_of_complaint")))]),t._v(" "),a("th",[t._v(t._s(t.trans("reception.complainant")))]),t._v(" "),a("th",[t._v(t._s(t.trans("reception.date_of_resolution")))]),t._v(" "),a("th",[t._v(t._s(t.trans("reception.complaint_assign_to")))]),t._v(" "),a("th",[t._v(t._s(t.trans("general.entry_by")))]),t._v(" "),a("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),a("tbody",t._l(t.complaints.data,(function(e){return a("tr",[a("td",{domProps:{textContent:t._s(e.id)}}),t._v(" "),a("td",{domProps:{textContent:t._s(e.complaint_type.name)}}),t._v(" "),a("td",[t._v(t._s(t._f("moment")(e.date_of_complaint)))]),t._v(" "),a("td",[t._v("\n "+t._s(e.complainant_name)+" "),a("br"),t._v("\n "+t._s(e.complainant_contact_number)+" "),a("br"),t._v("\n "+t._s(e.complainant_address)+" "),a("br")]),t._v(" "),a("td",[e.date_of_resolution?a("span",{staticClass:"label label-success"},[t._v(t._s(t._f("moment")(e.date_of_resolution)))]):a("span",{staticClass:"label label-danger"},[t._v(t._s(t.trans("reception.complaint_pending")))])]),t._v(" "),a("td",[t._v(t._s(t.getEmployeeName(e.employee))+" "),a("br"),t._v(" "+t._s(t.getEmployeeDesignationOnDate(e.employee,e.date_of_complaint)))]),t._v(" "),a("td",[t._v(t._s(t.getEmployeeName(e.user.employee))+" "),a("br"),t._v(" "+t._s(t.getEmployeeDesignationOnDate(e.user.employee,e.date_of_complaint)))]),t._v(" "),a("td",{staticClass:"table-option"},[a("div",{staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.view"),expression:"trans('general.view')"}],staticClass:"btn btn-success btn-sm",on:{click:function(a){return a.preventDefault(),t.showAction(e)}}},[a("i",{staticClass:"fas fa-arrow-circle-right"})]),t._v(" "),t.hasPermission("edit-complaint")?a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("reception.edit_complaint"),expression:"trans('reception.edit_complaint')"}],staticClass:"btn btn-info btn-sm",on:{click:function(a){return a.preventDefault(),t.editComplaint(e)}}},[a("i",{staticClass:"fas fa-edit"})]):t._e(),t._v(" "),t.hasPermission("delete-complaint")?a("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(e)},expression:"{ok: confirmDelete(complaint)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("reception.delete_complaint"),expression:"trans('reception.delete_complaint')"}],key:e.id,staticClass:"btn btn-danger btn-sm"},[a("i",{staticClass:"fas fa-trash"})]):t._e()])])])})),0)])]):t._e(),t._v(" "),t.complaints.total?t._e():a("module-info",{attrs:{module:"reception",title:"complaint_module_title",description:"complaint_module_description",icon:"list"}},[a("div",{attrs:{slot:"btn"},slot:"btn"},[!t.showCreatePanel&&t.hasPermission("create-complaint")?a("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[a("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.trans("general.add_new")))]):t._e()])]),t._v(" "),a("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.complaints},on:{"update:pageLength":function(e){return t.$set(t.filter,"page_length",e)},"update:page-length":function(e){return t.$set(t.filter,"page_length",e)},updateRecords:t.getComplaints}})],1)])],1),t._v(" "),t.showModal?a("complaint-detail",{attrs:{uuid:t.showUuid},on:{close:function(e){t.showModal=!1}}}):t._e(),t._v(" "),a("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);e.default=r.exports}}]); //# sourceMappingURL=index.js.map?id=7515b9275fa9b718b576
Save
cmd:
run