/home/techb158/ileadtechnology.com/SSM/public/js/calendar/celebration
NameSizeModeActions
anniversary.js77350644editdlrm
anniversary.js.map1830644editdlrm
birthday.js95600644editdlrm
birthday.js.map1770644editdlrm
workAnniversary.js78840644editdlrm
workAnniversary.js.map1910644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/calendar/celebration/workAnniversary.js (7884B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{cY0A:function(t,e,n){"use strict";n.r(e);var a={components:{},data:function(){return{work_anniversaries:{total:0,data:[]},filter:{sort_by:"date",order:"asc",start_date:"",end_date:"",page_length:helper.getConfig("page_length")},showFilterPanel:!1}},mounted:function(){helper.hasPermission("list-work-anniversary")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getWorkAnniversaries(),helper.showDemoNotification(["calendar"])},created:function(){this.filter.start_date=helper.today(),this.filter.end_date=moment().add(1,"weeks").format("YYYY-MM-DD")},methods:{getConfig:function(t){return helper.getConfig(t)},hasPermission:function(t){return helper.hasPermission(t)},getEmployeeName:function(t){return helper.getEmployeeName(t)},getEmployeeCode:function(t){return helper.getEmployeeCode(t)},getCount:function(t){return moment().diff(t,"years")},getEmployeeDesignationOnDate:function(t){return helper.getEmployeeDesignationOnDate(t,helper.today())},getWorkAnniversaries:function(t){var e=this,n=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 a=helper.getFilterURL(this.filter);axios.get("/api/work/anniversary?page="+t+a).then((function(t){e.work_anniversaries=t,n.hide()})).catch((function(t){n.hide(),helper.showErrorMsg(t)}))},print:function(){var t=this.$loading.show();axios.post("/api/work/anniversary/print",{filter:this.filter}).then((function(e){t.hide(),window.open("/print").document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/work/anniversary/pdf",{filter:this.filter}).then((function(n){e.hide(),window.open("/download/report/"+n+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},showDate:function(t){return helper.formatDate(t)}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getWorkAnniversaries()},"filter.order":function(t){this.getWorkAnniversaries()},"filter.page_length":function(t){this.getWorkAnniversaries()}},computed:{authToken:function(){return helper.getAuthToken()}}},r=n("KHd+"),s=Object(r.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"page-titles"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("calendar.work_anniversary"))+"\n "),t.work_anniversaries.total?n("span",{staticClass:"card-subtitle"},[n("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.work_anniversaries.total,from:t.work_anniversaries.from,to:t.work_anniversaries.to})))])]):n("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"action-buttons pull-right"},[t.showFilterPanel?t._e():n("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[n("i",{staticClass:"fas fa-filter"}),t._v(" "),n("span",{staticClass:"d-none d-sm-inline"},[t._v(" "+t._s(t.trans("general.filter")))])]),t._v(" "),n("div",{staticClass:"btn-group"},[n("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"}},[n("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),n("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),n("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[n("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[n("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),n("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[n("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))]),t._v(" "),n("button",{staticClass:"dropdown-item custom-dropdown",on:{click:function(e){return t.$router.push("/calendar/celebration/birthday")}}},[n("i",{staticClass:"fas fa-birthday-cake"}),t._v(" "+t._s(t.trans("calendar.birthday")))]),t._v(" "),n("button",{staticClass:"dropdown-item custom-dropdown",on:{click:function(e){return t.$router.push("/calendar/celebration/anniversary")}}},[n("i",{staticClass:"fas fa-heartbeat"}),t._v(" "+t._s(t.trans("calendar.anniversary")))])])])])])])]),t._v(" "),n("div",{staticClass:"container-fluid"},[n("transition",{attrs:{name:"fade"}},[t.showFilterPanel?n("div",{staticClass:"card border-left border-bottom"},[n("div",{staticClass:"card-body p-4"},[n("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter"))+"\n "),n("button",{staticClass:"btn btn-danger btn-sm pull-right",attrs:{type:"button"},on:{click:function(e){t.showFilterPanel=!1}}},[t._v(t._s(t.trans("general.cancel")))])]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-8"},[n("div",{staticClass:"form-group"},[n("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(" "),n("button",{staticClass:"btn btn-info waves-effect waves-light pull-right",attrs:{type:"button"},on:{click:t.getWorkAnniversaries}},[t._v(t._s(t.trans("general.filter")))])])]):t._e()]),t._v(" "),n("div",{staticClass:"card"},[n("div",{staticClass:"card-body"},[t.filter.start_date&&t.filter.end_date?n("h6",{staticClass:"p-3"},[t._v(t._s(t.trans("calendar.work_anniversary_between",{start_date:t.showDate(t.filter.start_date),end_date:t.showDate(t.filter.end_date)})))]):t._e(),t._v(" "),t.work_anniversaries.total?n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.trans("employee.date_of_work_anniversary")))]),t._v(" "),n("th",[t._v(t._s(t.trans("employee.name")))]),t._v(" "),n("th",[t._v(t._s(t.trans("employee.code")))]),t._v(" "),n("th",[t._v(t._s(t.trans("employee.designation")))]),t._v(" "),n("th",[t._v(t._s(t.trans("employee.contact_number")))])])]),t._v(" "),n("tbody",t._l(t.work_anniversaries.data,(function(e){return n("tr",[n("td",[t._v(t._s(t._f("moment")(e.date_of_joining))+" ("+t._s(t.getCount(e.date_of_joining)+" "+t.trans("general.years"))+")")]),t._v(" "),n("td",[t._v(t._s(t.getEmployeeName(e.employee)))]),t._v(" "),n("td",[t._v(t._s(t.getEmployeeCode(e.employee)))]),t._v(" "),n("td",[t._v(t._s(t.getEmployeeDesignationOnDate(e.employee)))]),t._v(" "),n("td",[t._v(t._s(e.employee.contact_number))])])})),0)])]):t._e(),t._v(" "),t.work_anniversaries.total?t._e():n("module-info",{attrs:{module:"calendar",title:"work_anniversary_module_title",description:"work_anniversary_module_description",icon:"list"}}),t._v(" "),n("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.work_anniversaries},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.getWorkAnniversaries}})],1)])],1)])}),[],!1,null,null,null);e.default=s.exports}}]); //# sourceMappingURL=workAnniversary.js.map?id=bbf6f5ffc1fe8b5ade0a