/home/techb158/ileadtechnology.com/SSM/public/js/communication
NameSizeModeActions
email/-0755rm
meeting/-0755rm
push-notification/-0755rm
sms/-0755rm
index.js181880644editdlrm
index.js.map1480644editdlrm
notification.js51300644editdlrm
notification.js.map1710644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/communication/index.js (18188B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{BYYD:function(t,e,s){"use strict";var n=s("KHd+"),a=Object(n.a)({},void 0,void 0,!1,null,null,null);e.a=a.exports},i1ug:function(t,e,s){"use strict";s.r(e);var n={components:{communicationDetail:s("BYYD").a},data:function(){return{communications:{total:0,data:[]},filter:{sort_by:"created_at",order:"desc",subject:"",type:"",course_id:[],batch_id:[],department_id:[],employee_category_id:[],start_date:"",end_date:"",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"created_at",translation:i18n.general.created_at},{value:"subject",translation:i18n.communication.subject}],types:[],courses:[],selected_courses:null,batches:[],selected_batches:null,departments:[],selected_departments:null,employee_categories:[],selected_employee_categories:null,showFilterPanel:!1,help_topic:"",communication:{},showModal:!1}},mounted:function(){helper.hasAnyPermission(["send-sms","send-email"])||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getCommunications(),helper.showDemoNotification(["communication"])},methods:{hasPermission:function(t){return helper.hasPermission(t)},hasAnyPermission:function(t){return helper.hasAnyPermission(t)},showAction:function(t){this.communication=t,this.showModal=!0},getEmployeeName:function(t){return helper.getEmployeeName(t)},getEmployeeDesignationOnDate:function(t,e){return helper.getEmployeeDesignationOnDate(t,e)},getCommunications:function(t){var e=this,s=this.$loading.show();"number"!=typeof t&&(t=1),this.filter.start_date=helper.toDate(this.filter.start_date),this.filter.end_date=helper.toDate(this.filter.end_date);var n=helper.getFilterURL(this.filter);axios.get("/api/communication?page="+t+n).then((function(t){e.communications=t.communications,e.courses=t.filters.courses,e.batches=t.filters.batches,e.departments=t.filters.departments,e.employee_categories=t.filters.employee_categories,e.types=t.filters.types,s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},confirmDelete:function(t){var e=this;return function(s){return e.deleteCommunication(t)}},deleteCommunication:function(t){var e=this,s=this.$loading.show();axios.delete("/api/communication/"+t.uuid).then((function(t){toastr.success(t.message),e.getCommunications(),s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},getConfig:function(t){return helper.getConfig(t)},print:function(){var t=this.$loading.show();axios.post("/api/communication/print",{filter:this.filter}).then((function(e){var s=window.open("/print");t.hide(),s.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/communication/pdf",{filter:this.filter}).then((function(s){e.hide(),window.open("/download/report/"+s+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onCourseSelect:function(t){this.filter.course_id.push(t.id)},onCourseRemove:function(t){this.filter.course_id.splice(this.filter.course_id.indexOf(t.id),1)},onBatchSelect:function(t){this.filter.batch_id.push(t.id)},onBatchRemove:function(t){this.filter.batch_id.splice(this.filter.batch_id.indexOf(t.id),1)},onDepartmentSelect:function(t){this.filter.department_id.push(t.id)},onDepartmentRemove:function(t){this.filter.department_id.splice(this.filter.department_id.indexOf(t.id),1)},onEmployeeCategorySelect:function(t){this.filter.employee_category_id.push(t.id)},onEmployeeCategoryRemove:function(t){this.filter.employee_category_id.splice(this.filter.employee_category_id.indexOf(t.id),1)}},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.getCommunications()},"filter.order":function(t){this.getCommunications()},"filter.page_length":function(t){this.getCommunications()}},computed:{authToken:function(){return helper.getAuthToken()}}},a=s("KHd+"),i=Object(a.a)(n,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"page-titles"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-6"},[s("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("communication.communication_history"))+" \n "),t.communications.total?s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.communications.total,from:t.communications.from,to:t.communications.to})))]):s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"action-buttons pull-right"},[t.showFilterPanel?t._e():s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[s("i",{staticClass:"fas fa-filter"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.filter")))])]),t._v(" "),s("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(" "),s("div",{staticClass:"btn-group"},[s("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"}},[s("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),s("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[s("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[s("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),s("help-button",{on:{clicked:function(e){t.help_topic="communication"}}})],1)])])]),t._v(" "),s("div",{staticClass:"container-fluid"},[s("transition",{attrs:{name:"fade"}},[t.showFilterPanel?s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body"},[s("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter"))+"\n ")]),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-2"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("communication.type")))]),t._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:t.filter.type,expression:"filter.type"}],staticClass:"custom-select col-12",on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.filter,"type",e.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"",selected:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.types,(function(e){return s("option",{domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2)])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.course")))]),t._v(" "),s("v-select",{attrs:{label:"name","track-by":"id","group-values":"courses","group-label":"course_group","group-select":!1,name:"course_id",id:"course_id",options:t.courses,placeholder:t.trans("academic.select_course"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_courses},on:{select:t.onCourseSelect,remove:t.onCourseRemove},model:{value:t.selected_courses,callback:function(e){t.selected_courses=e},expression:"selected_courses"}},[t.courses.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.batch")))]),t._v(" "),s("v-select",{attrs:{label:"name","track-by":"id","group-values":"batches","group-label":"course_group","group-select":!1,name:"batch_id",id:"batch_id",options:t.batches,placeholder:t.trans("academic.select_batch"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_batches},on:{select:t.onBatchSelect,remove:t.onBatchRemove},model:{value:t.selected_batches,callback:function(e){t.selected_batches=e},expression:"selected_batches"}},[t.batches.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("employee.department")))]),t._v(" "),s("v-select",{attrs:{label:"name","track-by":"id",name:"department_id",id:"department_id",options:t.departments,placeholder:t.trans("employee.select_department"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_departments},on:{select:t.onDepartmentSelect,remove:t.onDepartmentRemove},model:{value:t.selected_departments,callback:function(e){t.selected_departments=e},expression:"selected_departments"}},[t.departments.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("employee.category")))]),t._v(" "),s("v-select",{attrs:{label:"name","track-by":"id",name:"employee_category_id",id:"employee_category_id",options:t.employee_categories,placeholder:t.trans("employee.select_category"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_employee_categories},on:{select:t.onEmployeeCategorySelect,remove:t.onEmployeeCategoryRemove},model:{value:t.selected_employee_categories,callback:function(e){t.selected_employee_categories=e},expression:"selected_employee_categories"}},[t.employee_categories.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("communication.subject")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.filter.subject,expression:"filter.subject"}],staticClass:"form-control",attrs:{name:"subject"},domProps:{value:t.filter.subject},on:{input:function(e){e.target.composing||t.$set(t.filter,"subject",e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("date-range-picker",{attrs:{"start-date":t.filter.start_date,"end-date":t.filter.end_date,label:t.trans("general.date_between")},on:{"update:startDate":function(e){return t.$set(t.filter,"start_date",e)},"update:start-date":function(e){return t.$set(t.filter,"start_date",e)},"update:endDate":function(e){return t.$set(t.filter,"end_date",e)},"update:end-date":function(e){return t.$set(t.filter,"end_date",e)}}})],1)]),t._v(" "),s("div",{staticClass:"card-footer text-right"},[s("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(" "),s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getCommunications}},[t._v(t._s(t.trans("general.filter")))])])])]):t._e()]),t._v(" "),s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[t.communications.total?s("div",{staticClass:"table-responsive"},[s("table",{staticClass:"table table-sm"},[s("thead",[s("tr",[s("th",[t._v(t._s(t.trans("communication.type")))]),t._v(" "),s("th",[t._v(t._s(t.trans("communication.subject")))]),t._v(" "),s("th",[t._v(t._s(t.trans("communication.audience")))]),t._v(" "),s("th",[t._v(t._s(t.trans("communication.recipient_count")))]),t._v(" "),s("th",[t._v(t._s(t.trans("communication.sent_by")))]),t._v(" "),s("th",[t._v(t._s(t.trans("general.created_at")))]),t._v(" "),s("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),s("tbody",t._l(t.communications.data,(function(e){return s("tr",[s("td",[t._v(t._s(t.trans("communication."+e.type)))]),t._v(" "),s("td",{domProps:{textContent:t._s(e.subject)}}),t._v(" "),s("td",["everyone"==e.audience?s("span",[t._v(t._s(t.trans("communication.communication_for_everyone")))]):t._e(),t._v(" "),"selected_course"==e.audience?[t._v("\n "+t._s(t.trans("academic.course"))+" "),s("br"),t._v(" "),s("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},t._l(e.courses,(function(e){return s("li",[t._v(t._s(e.name+"("+e.course_group.name+")"))])})),0)]:"selected_batch"==e.audience?[t._v("\n "+t._s(t.trans("academic.batch"))+" "),s("br"),t._v(" "),s("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},t._l(e.batches,(function(e){return s("li",[t._v(t._s(e.name+"("+e.course.name+")"))])})),0)]:"selected_department"==e.audience?[t._v("\n "+t._s(t.trans("employee.department"))+" "),s("br"),t._v(" "),s("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},t._l(e.departments,(function(e){return s("li",[t._v(t._s(e.name))])})),0)]:"selected_employee_category"==e.audience?[t._v("\n "+t._s(t.trans("employee.category"))+" "),s("br"),t._v(" "),s("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},t._l(e.employee_categorys,(function(e){return s("li",[t._v(t._s(e.name))])})),0)]:t._e(),t._v(" "),e.options.individual_students&&e.options.individual_students.length?[s("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},[s("li",[t._v(t._s(t.trans("communication.count_individual_students",{attribute:e.options.individual_students.length})))])])]:t._e(),t._v(" "),e.options.individual_employees&&e.options.individual_employees.length?[s("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},[s("li",[t._v(t._s(t.trans("communication.count_individual_employees",{attribute:e.options.individual_employees.length})))])])]:t._e()],2),t._v(" "),s("td",[t._v(t._s(e.recipient_count))]),t._v(" "),s("td",[t._v(t._s(t.getEmployeeName(e.user.employee))+" "),s("br"),t._v(" "+t._s(t.getEmployeeDesignationOnDate(e.user.employee,e.start_date)))]),t._v(" "),s("td",[t._v(t._s(t._f("momentDateTime")(e.created_at)))]),t._v(" "),s("td",{staticClass:"table-option"},[s("div",{staticClass:"btn-group"},[s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.view_detail"),expression:"trans('general.view_detail')"}],staticClass:"btn btn-success btn-sm",on:{click:function(s){return s.preventDefault(),t.showAction(e)}}},[s("i",{staticClass:"fas fa-arrow-circle-right"})]),t._v(" "),t.hasPermission("delete-communication-history")?s("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(e)},expression:"{ok: confirmDelete(communication)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.delete"),expression:"trans('general.delete')"}],key:e.id,staticClass:"btn btn-danger btn-sm"},[s("i",{staticClass:"fas fa-trash"})]):t._e()])])])})),0)])]):t._e(),t._v(" "),t.communications.total?t._e():s("module-info",{attrs:{module:"communication",title:"communication_module_title",description:"communication_module_description",icon:"list"}},[s("div",{attrs:{slot:"btn"},slot:"btn"},[t.hasPermission("send-sms")?s("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){return t.$router.push("/communication/sms")}}},[s("i",{staticClass:"fas fa-paper-plan"}),t._v(" "+t._s(t.trans("communication.send_sms")))]):t._e(),t._v(" "),t.hasPermission("send-email")?s("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){return t.$router.push("/communication/email")}}},[s("i",{staticClass:"fas fa-envelop"}),t._v(" "+t._s(t.trans("communication.send_email")))]):t._e()])]),t._v(" "),s("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.communications},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.getCommunications}})],1)])],1),t._v(" "),t.showModal?s("transition",{attrs:{name:"modal"}},[s("div",{staticClass:"modal-mask"},[s("div",{staticClass:"modal-wrapper"},[s("div",{staticClass:"modal-container modal-lg"},[s("div",{staticClass:"modal-header"},[t._t("header",[t._v("\n "+t._s(t.communication.subject)+"\n "),s("span",{staticClass:"float-right pointer",on:{click:function(e){t.showModal=!1}}},[t._v("x")])])],2),t._v(" "),s("div",{staticClass:"modal-body"},[t._t("body",[s("div",{staticClass:"m-t-20",domProps:{innerHTML:t._s(t.communication.body)}}),t._v(" "),s("hr"),t._v(" "),s("p",[s("i",{staticClass:"far fa-clock"}),t._v(" "),s("small",[t._v(t._s(t.trans("general.created_at"))+" "+t._s(t._f("momentDateTime")(t.communication.created_at)))])]),t._v(" "),s("div",{staticClass:"clearfix"})])],2)])])])]):t._e(),t._v(" "),s("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);e.default=i.exports}}]); //# sourceMappingURL=index.js.map?id=fe0174acd9040a39e4ee