diff --git a/core/admin/attendance/index.php b/core/admin/attendance/index.php index d4a38310..3058b5df 100644 --- a/core/admin/attendance/index.php +++ b/core/admin/attendance/index.php @@ -4,27 +4,29 @@ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) */ -$moduleName = 'attendance_monitor'; +$moduleName = 'attendance'; +$moduleGroup = 'admin'; define('MODULE_PATH',dirname(__FILE__)); include APP_BASE_PATH.'header.php'; include APP_BASE_PATH.'modulejslibs.inc.php'; $photoAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Photo Attendance'); +$mapAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Request Attendance Location on Mobile'); ?>
- IceHrm.com
TP: +44 33 0001 0210
+ IceHrm.com
- © 2018 IceHrm. All rights reserved. + © 2018 IceHrm
diff --git a/core/templates/email/passwordReset.html b/core/templates/email/passwordReset.html index 9010d28f..a2558678 100644 --- a/core/templates/email/passwordReset.html +++ b/core/templates/email/passwordReset.html @@ -1,4 +1,4 @@ -Hi,
-A password reset request has been recieved for your login at #_url_#.
-To reset your password, please follow this link: #_passurl_#.
-Thanks!
\ No newline at end of file +Hi,
+A password reset request has been received for your login at #_url_#.
+If you are the one who requested this, please click this link to set a new password: #_passurl_#.
+Thanks!
diff --git a/core/templates/fields/colorpick.html b/core/templates/fields/colorpick.html index 013dca07..cf89dccd 100644 --- a/core/templates/fields/colorpick.html +++ b/core/templates/fields/colorpick.html @@ -9,6 +9,6 @@
'),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}}]),t}(),d=function(e){function t(){return s(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,i.default),l(t,[{key:"getDataMapping",value:function(){return["id","employee","status"]}},{key:"getHeaders",value:function(){return[{sTitle:"ID",bVisible:!1},{sTitle:"Employee"},{sTitle:"Clocked In Status"}]}},{key:"getFormFields",value:function(){return[]}},{key:"getFilters",value:function(){return[["employee",{label:"Employee",type:"select2","allow-null":!1,"remote-source":["Employee","id","first_name+last_name"]}]]}},{key:"getActionButtonsHtml",value:function(e,t){var a='';return a=a.replace(/_BASE_/g,this.baseUrl),"Not Clocked In"==t[2]?a=a.replace(/_COLOR_/g,"gray"):"Clocked Out"==t[2]?a=a.replace(/_COLOR_/g,"yellow"):"Clocked In"==t[2]&&(a=a.replace(/_COLOR_/g,"green")),a}},{key:"isSubProfileTable",value:function(){return"Admin"!==this.user.user_level}}]),t}();t.exports={AttendanceAdapter:c,AttendanceStatusAdapter:d}},{"../../../api/AdapterBase":4,"../../../api/FormValidation":5}],3:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=function(){function e(e,t){for(var a=0;a
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}}]),t}(),d=function(e){function t(){return s(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,i.default),l(t,[{key:"getDataMapping",value:function(){return["id","employee","status"]}},{key:"getHeaders",value:function(){return[{sTitle:"ID",bVisible:!1},{sTitle:"Employee"},{sTitle:"Clocked In Status"}]}},{key:"getFormFields",value:function(){return[]}},{key:"getFilters",value:function(){return[["employee",{label:"Employee",type:"select2","allow-null":!1,"remote-source":["Employee","id","first_name+last_name"]}]]}},{key:"getActionButtonsHtml",value:function(e,t){var a='';return a=a.replace(/_BASE_/g,this.baseUrl),"Not Clocked In"==t[2]?a=a.replace(/_COLOR_/g,"gray"):"Clocked Out"==t[2]?a=a.replace(/_COLOR_/g,"yellow"):"Clocked In"==t[2]&&(a=a.replace(/_COLOR_/g,"green")),a}},{key:"isSubProfileTable",value:function(){return"Admin"!==this.user.user_level}}]),t}();t.exports={AttendanceAdapter:c,AttendanceStatusAdapter:d}},{"../../../api/AdapterBase":4,"../../../api/FormValidation":5}],3:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=function(){function e(e,t){for(var a=0;a
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace("_process_",'
')).replace(/_id_/g,e)).replace(/_status_/g,t[6])).replace(/_BASE_/g,this.baseUrl)}},{key:"get",value:function(e){$("#PayrollData").hide(),$("#PayrollForm").hide(),$("#PayrollDataButtons").hide(),$("#Payroll").show(),modJsList.tabPayrollData.setCurrentPayroll(null),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"get",this).call(this,e)}}]),t}(),h=function(e){function t(e,a,l,i){s(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,l,i));return n.cellDataUpdates={},n.payrollId=null,n}return d(t,o.default),l(t,[{key:"validateCellValue",value:function(e,t,a){return modJs.addCellDataUpdate(e.data("colId"),e.data("rowId"),a),!0}},{key:"setCurrentPayroll",value:function(e){this.payrollId=e}},{key:"addAdditionalRequestData",value:function(e,t){return"updateData"===e?t.payrollId=this.payrollId:"updateAllData"===e?t.payrollId=this.payrollId:"getAllData"===e&&(t.payrollId=this.payrollId),t}},{key:"modifyCSVHeader",value:function(e){return e.unshift(""),e}},{key:"getCSVData",value:function(){for(var e="",t=0;t
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace("_process_",'
')).replace(/_id_/g,e)).replace(/_status_/g,t[6])).replace(/_BASE_/g,this.baseUrl)}},{key:"get",value:function(e){$("#PayrollData").hide(),$("#PayrollForm").hide(),$("#PayrollDataButtons").hide(),$("#Payroll").show(),modJsList.tabPayrollData.setCurrentPayroll(null),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"get",this).call(this,e)}}]),t}(),h=function(e){function t(e,a,l,i){s(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,l,i));return n.cellDataUpdates={},n.payrollId=null,n}return d(t,o.default),l(t,[{key:"validateCellValue",value:function(e,t,a){return modJs.addCellDataUpdate(e.data("colId"),e.data("rowId"),a),!0}},{key:"setCurrentPayroll",value:function(e){this.payrollId=e}},{key:"addAdditionalRequestData",value:function(e,t){return"updateData"===e?t.payrollId=this.payrollId:"updateAllData"===e?t.payrollId=this.payrollId:"getAllData"===e&&(t.payrollId=this.payrollId),t}},{key:"modifyCSVHeader",value:function(e){return e.unshift(""),e}},{key:"getCSVData",value:function(){for(var e="",t=0;t
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
';
const deleteButton = '
';
- const photoButton = '
';
+ const photoButton = '
';
let html;
if (this.photoAttendance === 1) {
diff --git a/web/admin/src/company_structure/lib.js b/web/admin/src/company_structure/lib.js
index 598d57e6..3a3d8bc2 100644
--- a/web/admin/src/company_structure/lib.js
+++ b/web/admin/src/company_structure/lib.js
@@ -1,7 +1,7 @@
/* eslint-disable prefer-destructuring */
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
/* global d3, nv */
@@ -41,7 +41,7 @@ class CompanyStructureAdapter extends AdapterBase {
['type', { label: 'Type', type: 'select', source: [['Company', 'Company'], ['Head Office', 'Head Office'], ['Regional Office', 'Regional Office'], ['Department', 'Department'], ['Unit', 'Unit'], ['Sub Unit', 'Sub Unit'], ['Other', 'Other']] }],
['country', { label: 'Country', type: 'select2', 'remote-source': ['Country', 'code', 'name'] }],
['timezone', {
- label: 'Time Zone', type: 'select2', 'allow-null': false, 'remote-source': ['Timezone', 'name', 'details'],
+ label: 'Time Zone', type: 'select2', 'allow-null': false, 'remote-source': ['Timezone', 'name', 'details', 'getTimezonesWithOffset'],
}],
['parent', {
label: 'Parent Structure', type: 'select', 'allow-null': true, 'remote-source': ['CompanyStructure', 'id', 'title'],
diff --git a/web/admin/src/dashboard/lib.js b/web/admin/src/dashboard/lib.js
index ba91bab3..4999f62e 100644
--- a/web/admin/src/dashboard/lib.js
+++ b/web/admin/src/dashboard/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/data/lib.js b/web/admin/src/data/lib.js
index 1db52293..e899802c 100644
--- a/web/admin/src/data/lib.js
+++ b/web/admin/src/data/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
/* global dependOnField */
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/employees/lib.js b/web/admin/src/employees/lib.js
index 9d0a5486..a9af8290 100644
--- a/web/admin/src/employees/lib.js
+++ b/web/admin/src/employees/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
/* eslint-disable prefer-destructuring,no-restricted-globals */
diff --git a/web/admin/src/fieldnames/lib.js b/web/admin/src/fieldnames/lib.js
index 5edc0e67..c7e8e5ca 100644
--- a/web/admin/src/fieldnames/lib.js
+++ b/web/admin/src/fieldnames/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/jobs/lib.js b/web/admin/src/jobs/lib.js
index 23a2cc58..c69989b1 100644
--- a/web/admin/src/jobs/lib.js
+++ b/web/admin/src/jobs/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/loans/lib.js b/web/admin/src/loans/lib.js
index cf71f83b..5ee6313b 100644
--- a/web/admin/src/loans/lib.js
+++ b/web/admin/src/loans/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/metadata/lib.js b/web/admin/src/metadata/lib.js
index 789310a1..f01c46fb 100644
--- a/web/admin/src/metadata/lib.js
+++ b/web/admin/src/metadata/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/modules/lib.js b/web/admin/src/modules/lib.js
index c99f3b3d..1ae98146 100644
--- a/web/admin/src/modules/lib.js
+++ b/web/admin/src/modules/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
/**
diff --git a/web/admin/src/overtime/lib.js b/web/admin/src/overtime/lib.js
index 944a9074..69cb72a8 100644
--- a/web/admin/src/overtime/lib.js
+++ b/web/admin/src/overtime/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/payroll/lib.js b/web/admin/src/payroll/lib.js
index ea8ee13e..ea50f0fb 100644
--- a/web/admin/src/payroll/lib.js
+++ b/web/admin/src/payroll/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
/* global modJs, modJsList */
import AdapterBase from '../../../api/AdapterBase';
@@ -594,10 +594,12 @@ class PayslipTemplateAdapter extends AdapterBase {
if (data.payrollColumn === 'NULL') {
res.valid = false;
res.message = 'Please select payroll column';
- } else {
- data.payrollColumn = 'NULL';
}
- } else if (data.type === 'Text') {
+ } else {
+ data.payrollColumn = 'NULL';
+ }
+
+ if (data.type === 'Text') {
if (data.text === '') {
res.valid = false;
res.message = 'Text can not be empty';
diff --git a/web/admin/src/permissions/lib.js b/web/admin/src/permissions/lib.js
index 766cc618..ba6e9b06 100644
--- a/web/admin/src/permissions/lib.js
+++ b/web/admin/src/permissions/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/projects/lib.js b/web/admin/src/projects/lib.js
index 95139c63..7d6a2421 100644
--- a/web/admin/src/projects/lib.js
+++ b/web/admin/src/projects/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/qualifications/lib.js b/web/admin/src/qualifications/lib.js
index 1984de49..dbcc8b6b 100644
--- a/web/admin/src/qualifications/lib.js
+++ b/web/admin/src/qualifications/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/reports/lib.js b/web/admin/src/reports/lib.js
index b96fc8fa..1a8cfb55 100644
--- a/web/admin/src/reports/lib.js
+++ b/web/admin/src/reports/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
/* global SignaturePad, modJs */
/* eslint-disable no-underscore-dangle */
diff --git a/web/admin/src/salary/lib.js b/web/admin/src/salary/lib.js
index e5ef5bb3..caabe88a 100644
--- a/web/admin/src/salary/lib.js
+++ b/web/admin/src/salary/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/settings/lib.js b/web/admin/src/settings/lib.js
index 31d19ea0..fa440032 100644
--- a/web/admin/src/settings/lib.js
+++ b/web/admin/src/settings/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/travel/lib.js b/web/admin/src/travel/lib.js
index ea62815d..726f8e14 100644
--- a/web/admin/src/travel/lib.js
+++ b/web/admin/src/travel/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import AdapterBase from '../../../api/AdapterBase';
diff --git a/web/admin/src/users/lib.js b/web/admin/src/users/lib.js
index e113f181..d6608768 100644
--- a/web/admin/src/users/lib.js
+++ b/web/admin/src/users/lib.js
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
-Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
+ Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
+ Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
import FormValidation from '../../../api/FormValidation';
@@ -37,13 +37,9 @@ class UserAdapter extends AdapterBase {
label: 'Employee', type: 'select2', 'allow-null': true, 'remote-source': ['Employee', 'id', 'first_name+last_name'],
}],
['user_level', { label: 'User Level', type: 'select', source: [['Admin', 'Admin'], ['Manager', 'Manager'], ['Employee', 'Employee'], ['Other', 'Other']] }],
- ['user_roles', { label: 'User Roles', type: 'select2multi', 'remote-source': ['UserRole', 'id', 'name'] }],
['lang', {
label: 'Language', type: 'select2', 'allow-null': true, 'remote-source': ['SupportedLanguage', 'id', 'description'],
}],
- ['default_module', {
- label: 'Default Module', type: 'select2', 'null-label': 'No Default Module', 'allow-null': true, 'remote-source': ['Module', 'id', 'menu+label'],
- }],
];
}
diff --git a/web/api/SocialShare.js b/web/api-common/SocialShare.js
similarity index 100%
rename from web/api/SocialShare.js
rename to web/api-common/SocialShare.js
diff --git a/web/api-common/app-global.js b/web/api-common/app-global.js
index a0761552..2d3cc03c 100644
--- a/web/api-common/app-global.js
+++ b/web/api-common/app-global.js
@@ -1,149 +1,140 @@
-var uploadId="";
-var uploadAttr="";
-var popupUpload = null;
+let uploadId = '';
+let uploadAttr = '';
+const popupUpload = null;
-function showUploadDialog(id,msg,group,user,postUploadId,postUploadAttr,postUploadResultAttr,fileType){
- var ts = Math.round((new Date()).getTime() / 1000);
- uploadId = postUploadId;
- uploadAttr = postUploadAttr;
- uploadResultAttr = postUploadResultAttr;
- var html='';
- var html = html.replace(/_id_/g,id);
- var html = html.replace(/_msg_/g,msg);
- var html = html.replace(/_file_group_/g,group);
- var html = html.replace(/_user_/g,user);
- var html = html.replace(/_file_type_/g,fileType);
+function showUploadDialog(id, msg, group, user, postUploadId, postUploadAttr, postUploadResultAttr, fileType) {
+ const ts = Math.round((new Date()).getTime() / 1000);
+ uploadId = postUploadId;
+ uploadAttr = postUploadAttr;
+ uploadResultAttr = postUploadResultAttr;
+ var html = ``;
+ var html = html.replace(/_id_/g, id);
+ var html = html.replace(/_msg_/g, msg);
+ var html = html.replace(/_file_group_/g, group);
+ var html = html.replace(/_user_/g, user);
+ var html = html.replace(/_file_type_/g, fileType);
- modJs.renderModel('upload',"Upload File",html);
- $('#uploadModel').modal('show');
-
+ modJs.renderModel('upload', 'Upload File', html);
+ $('#uploadModel').modal('show');
}
-function closeUploadDialog(success,error,data){
- var arr = data.split("|");
- var file = arr[0];
- var fileBaseName = arr[1];
- var fileId = arr[2];
-
- if(success == 1){
- //popupUpload.close();
- $('#uploadModel').modal('hide');
- if(uploadResultAttr == "url"){
- if(uploadAttr == "val"){
- $('#'+uploadId).val(file);
- }else if(uploadAttr == "html"){
- $('#'+uploadId).html(file);
- }else{
- $('#'+uploadId).attr(uploadAttr,file);
- }
-
- }else if(uploadResultAttr == "name"){
- if(uploadAttr == "val"){
- $('#'+uploadId).val(fileBaseName);
- }else if(uploadAttr == "html"){
- $('#'+uploadId).html(fileBaseName);
- $('#'+uploadId).attr("val",fileBaseName);
- }else{
- $('#'+uploadId).attr(uploadAttr,fileBaseName);
- }
- $('#'+uploadId).show();
- $('#'+uploadId+"_download").show();
- $('#'+uploadId+"_remove").show();
- }else if(uploadResultAttr == "id"){
- if(uploadAttr == "val"){
- $('#'+uploadId).attr(uploadAttr,fileId);
- }else if(uploadAttr == "html"){
- $('#'+uploadId).html(fileBaseName);
- $('#'+uploadId).attr("val",fileId);
- }else{
- $('#'+uploadId).attr(uploadAttr,fileId);
- }
- $('#'+uploadId).show();
- $('#'+uploadId+"_download").show();
- $('#'+uploadId+"_remove").show();
- }
-
-
- }else{
- //popupUpload.close();
- $('#uploadModel').modal('hide');
- }
-
-}
+function closeUploadDialog(success, error, data) {
+ const arr = data.split('|');
+ const file = arr[0];
+ const fileBaseName = arr[1];
+ const fileId = arr[2];
-function download(name, closeCallback, closeCallbackData){
-
- var successCallback = function(data){
-
- var link;
- var fileParts;
- var viewableImages = ["png","jpg","gif","bmp","jpge"];
- var viewableFiles = ["pdf","xml"];
-
- $('.modal').modal('hide');
-
- if(data['filename'].indexOf("https:") == 0 || data['filename'].indexOf("http:") == 0){
- fileParts = data['filename'].split("?");
- fileParts = fileParts[0].split(".");
-
- if(jQuery.inArray(fileParts[fileParts.length - 1], viewableFiles ) >= 0) {
- var win = window.open(data['filename'], '_blank');
- win.focus();
- }else{
- link = 'Download File ';
- if(jQuery.inArray(fileParts[fileParts.length - 1], viewableImages ) >= 0) {
- link += '
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l


'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l


'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
_redoBtn_
_redoBtn_
')}else a=a.replace(/_redoBtn_/g,"");return a=(a=(a=(a=(a=a.replace(/_id_/g,e)).replace(/_sdate_/g,t[1])).replace(/_edate_/g,t[2])).replace(/_status_/g,t[4])).replace(/_BASE_/g,this.baseUrl)}},{key:"getCustomTableParams",value:function(){var e=this;return{aoColumnDefs:[{fnRender:function(t,a){return e.preProcessRemoteTableData(t,a,1)},aTargets:[1]},{fnRender:function(t,a){return e.preProcessRemoteTableData(t,a,2)},aTargets:[2]},{fnRender:e.getActionButtons,aTargets:[e.getDataMapping().length]}]}}},{key:"preProcessRemoteTableData",value:function(e,t,a){return Date.parse(t).toString("MMM d, yyyy (dddd)")}}]),t}(),m=function(e){function t(e,a,l,i){o(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,l,i));return r.timeSheetStatusChangeId=null,r}return d(t,h),l(t,[{key:"getDataMapping",value:function(){return["id","employee","date_start","date_end","status"]}},{key:"getHeaders",value:function(){return[{sTitle:"ID",bVisible:!1},{sTitle:"Employee",bSearchable:!0},{sTitle:"Start Date",bSearchable:!0},{sTitle:"End Date",bSearchable:!0},{sTitle:"Status"}]}},{key:"getFormFields",value:function(){return[["id",{label:"ID",type:"hidden"}],["employee",{label:"Employee",type:"select","allow-null":!1,"remote-source":["Employee","id","first_name+last_name"]}],["date_start",{label:"TimeSheet Start Date",type:"date",validation:""}],["date_end",{label:"TimeSheet Start Date",type:"date",validation:""}],["details",{label:"Reason",type:"textarea",validation:"none"}]]}},{key:"isSubProfileTable",value:function(){return!0}},{key:"getCustomSuccessCallBack",value:function(e){for(var t=[],a=this.getDataMapping(),l=0;l

':'

'):a.replace("_clone_",""),a=this.showDelete?a.replace("_delete_",'
'):a.replace("_delete_",""),a=(a=(a=this.showEdit?a.replace("_edit_",'
'):a.replace("_edit_","")).replace(/_id_/g,e)).replace(/_BASE_/g,this.baseUrl)}},{key:"generateRandom",value:function(e){for(var t=new Date,a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",l="",i=e;i>0;--i)l+=a[Math.round(Math.random()*(a.length-1))];return l+t.getTime()}},{key:"checkFileType",value:function(e,t){var a=document.getElementById(e),l="";return a.value.lastIndexOf(".")>0&&(l=a.value.substring(a.value.lastIndexOf(".")+1,a.value.length)),l=l.toLowerCase(),!(t.split(",").indexOf(l)<0)||(a.value="",this.showMessage("File Type Error","Selected file type is not supported"),this.clearFileElement(e),!1)}},{key:"clearFileElement",value:function(e){var t=$("#"+e);t.replaceWith(t=t.val("").clone(!0))}},{key:"fixJSON",value:function(e){return"1"===this.noJSONRequests&&(e=window.btoa(e)),e}},{key:"getClientDate",value:function(e){var t=this.getClientGMTOffset();return e.addMinutes(60*t)}},{key:"getClientGMTOffset",value:function(){var e=new Date,t=new Date(e.getFullYear(),0,1,0,0,0,0),a=t.toGMTString();return(t-new Date(a.substring(0,a.lastIndexOf(" ")-1)))/36e5}},{key:"getHelpLink",value:function(){return null}},{key:"showLoader",value:function(){$("#iceloader").show()}},{key:"hideLoader",value:function(){$("#iceloader").hide()}},{key:"generateOptions",value:function(e){var t="";for(var a in e)t+=''.replace("__val__",a).replace("__text__",e[a]);return t}},{key:"isModuleInstalled",value:function(e,t){return void 0!==modulesInstalled&&null!==modulesInstalled&&1===modulesInstalled[e+"_"+t]}},{key:"setCustomFields",value:function(e){for(var t=void 0,a=void 0,l=0;l
_redoBtn_
_redoBtn_
')}else a=a.replace(/_redoBtn_/g,"");return a=(a=(a=(a=(a=a.replace(/_id_/g,e)).replace(/_sdate_/g,t[1])).replace(/_edate_/g,t[2])).replace(/_status_/g,t[4])).replace(/_BASE_/g,this.baseUrl)}},{key:"getCustomTableParams",value:function(){var e=this;return{aoColumnDefs:[{fnRender:function(t,a){return e.preProcessRemoteTableData(t,a,1)},aTargets:[1]},{fnRender:function(t,a){return e.preProcessRemoteTableData(t,a,2)},aTargets:[2]},{fnRender:e.getActionButtons,aTargets:[e.getDataMapping().length]}]}}},{key:"preProcessRemoteTableData",value:function(e,t,a){return Date.parse(t).toString("MMM d, yyyy (dddd)")}}]),t}(),m=function(e){function t(e,a,l,i){o(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,l,i));return r.timeSheetStatusChangeId=null,r}return d(t,h),l(t,[{key:"getDataMapping",value:function(){return["id","employee","date_start","date_end","total_time","status"]}},{key:"getHeaders",value:function(){return[{sTitle:"ID",bVisible:!1},{sTitle:"Employee",bSearchable:!0},{sTitle:"Start Date",bSearchable:!0},{sTitle:"End Date",bSearchable:!0},{sTitle:"Total Time",bSearchable:!1},{sTitle:"Status"}]}},{key:"getFormFields",value:function(){return[["id",{label:"ID",type:"hidden"}],["employee",{label:"Employee",type:"select","allow-null":!1,"remote-source":["Employee","id","first_name+last_name"]}],["date_start",{label:"TimeSheet Start Date",type:"date",validation:""}],["date_end",{label:"TimeSheet Start Date",type:"date",validation:""}],["details",{label:"Reason",type:"textarea",validation:"none"}]]}},{key:"isSubProfileTable",value:function(){return!0}},{key:"getCustomSuccessCallBack",value:function(e){for(var t=[],a=this.getDataMapping(),l=0;l

':'
