Compare commits

...
Author SHA1 Message Date
roshelrao 18fb2a90f9 made a small change to the index.js of loans 2021-06-28 13:00:45 +05:30
roshelrao d1226152a7 removed the button in loans module 2021-06-25 15:48:01 +05:30
roshelrao 7dcc5fb58e react loan module and salary module 2021-06-22 16:06:53 +05:30
roshelrao d69d573e65 loans index.php changes 2021-06-15 15:51:14 +05:30
roshelrao 528191e8da loans index.php changes 2021-06-15 15:40:56 +05:30
roshelrao 07aea4cdf0 loan react 2021-06-15 14:06:38 +05:30
Alan Cell 3eaf290a58 Fix employee filed not loading issue 2021-05-07 08:16:06 +02:00
Alan Cell c276009bd8 Update release notes 2021-05-07 08:11:21 +02:00
27 changed files with 398619 additions and 34218 deletions

No files matched your search

+3
View File
@@ -19,6 +19,9 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
<div class="tab-pane active" id="tabPageEmployeeFieldName"> <div class="tab-pane active" id="tabPageEmployeeFieldName">
<div id="EmployeeFieldName" class="reviewBlock" data-content="List" style="padding-left:5px;"> <div id="EmployeeFieldName" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeFieldNameForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div> </div>
</div> </div>
</div> </div>
+4 -1
View File
@@ -28,20 +28,23 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
<div id="JobTitleForm"></div> <div id="JobTitleForm"></div>
<div id="JobTitleFilterForm"></div> <div id="JobTitleFilterForm"></div>
</div> </div>
<div class="tab-pane" id="tabPagePayGrades"> <div class="tab-pane" id="tabPagePayGrades">
<div id="PayGradeTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div> <div id="PayGradeTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="PayGradeForm"></div> <div id="PayGradeForm"></div>
<div id="PayGradeFilterForm"></div> <div id="PayGradeFilterForm"></div>
</div> </div>
<div class="tab-pane" id="tabPageEmploymentStatus"> <div class="tab-pane" id="tabPageEmploymentStatus">
<div id="EmploymentStatusTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div> <div id="EmploymentStatusTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="EmploymentStatusForm"></div> <div id="EmploymentStatusForm"></div>
<div id="EmploymentStatusFilterForm"></div> <div id="EmploymentStatusFilterForm"></div>
</div> </div>
</div> </div>
</div> </div>
<div id="dataGroup"></div>
<?php <?php
$moduleData = [ $moduleData = [
'user_level' => $user->user_level, 'user_level' => $user->user_level,
+26 -20
View File
@@ -4,12 +4,17 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/ */
use Classes\PermissionManager;
use Loans\Common\Model\CompanyLoan;
use Loans\Common\Model\EmployeeCompanyLoan;
$moduleName = 'loans'; $moduleName = 'loans';
$moduleGroup = 'admin'; $moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__)); define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php'; include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php'; include APP_BASE_PATH.'modulejslibs.inc.php';
?><div class="span9"> ?>
<div class="span9">
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;"> <ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabCompanyLoan" href="#tabPageCompanyLoan"><?=t('Loan Types')?></a></li> <li class="active"><a id="tabCompanyLoan" href="#tabPageCompanyLoan"><?=t('Loan Types')?></a></li>
@@ -18,31 +23,32 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="tabPageCompanyLoan"> <div class="tab-pane active" id="tabPageCompanyLoan">
<div id="CompanyLoan" class="reviewBlock" data-content="List" style="padding-left:5px;"> <div id="CompanyLoanTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="CompanyLoanForm"></div>
</div> <div id="CompanyLoanFilterForm"></div>
<div id="CompanyLoanForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div> </div>
<div class="tab-pane" id="tabPageEmployeeCompanyLoan"> <div class="tab-pane" id="tabPageEmployeeCompanyLoan">
<div id="EmployeeCompanyLoan" class="reviewBlock" data-content="List" style="padding-left:5px;"> <div id="EmployeeCompanyLoanTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="EmployeeCompanyLoanForm"></div>
</div> <div id="EmployeeCompanyLoanFilterForm"></div>
<div id="EmployeeCompanyLoanForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div> </div>
</div> </div>
</div> </div>
<?php
$moduleData = [
'user_level' => $user->user_level,
'permissions' => [
'CompanyLoan' => PermissionManager::checkGeneralAccess(new CompanyLoan()),
'EmployeeCompanyLoan' => PermissionManager::checkGeneralAccess(new EmployeeCompanyLoan()),
]
];
?>
<script> <script>
var modJsList = new Array(); initAdminLoan(<?=json_encode($moduleData)?>);
modJsList['tabCompanyLoan'] = new CompanyLoanAdapter('CompanyLoan','CompanyLoan');
modJsList['tabEmployeeCompanyLoan'] = new EmployeeCompanyLoanAdapter('EmployeeCompanyLoan','EmployeeCompanyLoan');
var modJs = modJsList['tabCompanyLoan'];
</script> </script>
<?php include APP_BASE_PATH.'footer.php';?> <?php include APP_BASE_PATH.'footer.php';?>
+58 -2
View File
@@ -1,4 +1,9 @@
<?php <?php
use Classes\PermissionManager;
use Salary\Common\Model\SalaryComponentType;
use Salary\Common\Model\SalaryComponent;
use Salary\Common\Model\EmployeeSalary;
$moduleName = 'salary'; $moduleName = 'salary';
$moduleGroup = 'admin'; $moduleGroup = 'admin';
@@ -6,7 +11,7 @@ define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php'; include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php'; include APP_BASE_PATH.'modulejslibs.inc.php';
$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder(); /*$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab( $moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'SalaryComponentType','SalaryComponentType','Salary Component Types','SalaryComponentTypeAdapter','','',true 'SalaryComponentType','SalaryComponentType','Salary Component Types','SalaryComponentTypeAdapter','','',true
@@ -21,4 +26,55 @@ $moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder); echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
include APP_BASE_PATH.'footer.php'; include APP_BASE_PATH.'footer.php';*/
?><div class="span9">
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabSalaryComponentType" href="#tabSalaryComponentType"><?=t('Salary Component Types')?></a></li>
<li><a id="tabSalaryComponent" href="#tabPageSalaryComponent"><?=t('Salary Components')?></a></li>
<li><a id="tabEmployeeSalary" href="#tabPageEmployeeSalary"><?=t('Employee Salary Components')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageSalaryComponentType">
<div id="SalaryComponentTypeTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="SalaryComponentTypeForm"></div>
<div id="SalaryComponentTypeFilterForm"></div>
</div>
<div class="tab-pane" id="tabPageSalaryComponent">
<div id="SalaryComponentTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="SalaryComponentForm"></div>
<div id="SalaryComponentFilterForm"></div>
</div>
<div class="tab-pane" id="tabPageEmployeeSalary">
<div id="EmployeeSalaryTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="EmployeeSalaryForm"></div>
<div id="EmployeeSalaryFilterForm"></div>
</div>
</div>
</div>
<?php
$moduleData = [
'user_level' => $user->user_level,
'permissions' => [
'SalaryComponentType' => PermissionManager::checkGeneralAccess(new SalaryComponentType()),
'SalaryComponent' => PermissionManager::checkGeneralAccess(new SalaryComponent()),
'EmployeeSalary' => PermissionManager::checkGeneralAccess(new EmployeeSalary()),
]
];
?>
<script>
initAdminSalary(<?=json_encode($moduleData)?>);
</script>
<?php include APP_BASE_PATH.'footer.php';?>
+20 -16
View File
@@ -4,6 +4,9 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/ */
use Classes\PermissionManager;
use Loans\Common\Model\EmployeeCompanyLoan;
$moduleName = 'loans'; $moduleName = 'loans';
$moduleGroup = 'modules'; $moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__)); define('MODULE_PATH',dirname(__FILE__));
@@ -17,26 +20,27 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="tabPageEmployeeCompanyLoan"> <div class="tab-pane active" id="tabPageEmployeeCompanyLoan">
<div id="EmployeeCompanyLoan" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div> <div id="EmployeeCompanyLoanTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="EmployeeCompanyLoanForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;"> <div id="EmployeeCompanyLoanForm"></div>
<div id="EmployeeCompanyLoanFilterForm"></div>
</div>
</div> </div>
</div> </div>
</div> </div>
<?php
$moduleData = [
'user_level' => $user->user_level,
'permissions' => [
'EmployeeCompanyLoan' => PermissionManager::checkGeneralAccess(new EmployeeCompanyLoan()),
]
];
?>
<script> <script>
var modJsList = new Array(); initAdminLoan(<?=json_encode($moduleData)?>);
modJsList['tabEmployeeCompanyLoan'] = new EmployeeCompanyLoanAdapter('EmployeeCompanyLoan','EmployeeCompanyLoan');
modJsList['tabEmployeeCompanyLoan'].setShowAddNew(false);
modJsList['tabEmployeeCompanyLoan'].setShowSave(false);
modJsList['tabEmployeeCompanyLoan'].setShowDelete(false);
modJsList['tabEmployeeCompanyLoan'].setShowEdit(true);
var modJs = modJsList['tabEmployeeCompanyLoan'];
</script> </script>
<?php include APP_BASE_PATH.'footer.php';?> <?php include APP_BASE_PATH.'footer.php';?>
+18 -22
View File
@@ -4,6 +4,9 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/ */
use Classes\PermissionManager;
use Salary\Common\Model\EmployeeSalary;
$moduleName = 'salary'; $moduleName = 'salary';
$moduleGroup = 'modules'; $moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__)); define('MODULE_PATH',dirname(__FILE__));
@@ -17,32 +20,25 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="tabPageEmployeeSalary"> <div class="tab-pane active" id="tabPageEmployeeSalary">
<div id="EmployeeSalary" class="reviewBlock" data-content="List" style="padding-left:5px;"> <div id="EmployeeSalaryTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="EmployeeSalaryForm"></div>
</div> <div id="EmployeeSalaryFilterForm"></div>
<div id="EmployeeSalaryForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div> </div>
</div> </div>
</div> </div>
<?php
$moduleData = [
'user_level' => $user->user_level,
'permissions' => [
'EmployeeSalary' => PermissionManager::checkGeneralAccess(new EmployeeSalary()),
]
];
?>
<script> <script>
var modJsList = new Array(); initAdminSalary(<?=json_encode($moduleData)?>);
modJsList['tabEmployeeSalary'] = new EmployeeSalaryAdapter('EmployeeSalary');
<?php if(isset($modulePermissions['perm']['Add Salary']) && $modulePermissions['perm']['Add Salary'] == "No"){?>
modJsList['tabEmployeeSalary'].setShowAddNew(false);
<?php }?>
<?php if(isset($modulePermissions['perm']['Delete Salary']) && $modulePermissions['perm']['Delete Salary'] == "No"){?>
modJsList['tabEmployeeSalary'].setShowDelete(false);
<?php }?>
<?php if(isset($modulePermissions['perm']['Edit Salary']) && $modulePermissions['perm']['Edit Salary'] == "No"){?>
modJsList['tabEmployeeSalary'].setShowEdit(false);
<?php }?>
var modJs = modJsList['tabEmployeeSalary'];
</script> </script>
<?php include APP_BASE_PATH.'footer.php';?> <?php include APP_BASE_PATH.'footer.php';?>
+1 -1
View File
@@ -1,6 +1,6 @@
# Release Notes IceHrm Open Source # Release Notes IceHrm Open Source
##Release note v29.0.0.PRO ## Release note v29.0.0.OS
### 🧲 New features ### 🧲 New features
+1 -2
View File
@@ -1,4 +1,3 @@
import { FieldNameAdapter, CustomFieldAdapter } from './lib'; import { FieldNameAdapter } from './lib';
window.FieldNameAdapter = FieldNameAdapter; window.FieldNameAdapter = FieldNameAdapter;
window.CustomFieldAdapter = CustomFieldAdapter;
+1 -2
View File
@@ -4,7 +4,6 @@
*/ */
import AdapterBase from '../../../api/AdapterBase'; import AdapterBase from '../../../api/AdapterBase';
import CustomFieldAdapter from '../../../api/CustomFieldAdapter';
/** /**
* FieldNameAdapter * FieldNameAdapter
@@ -44,4 +43,4 @@ class FieldNameAdapter extends AdapterBase {
} }
module.exports = { FieldNameAdapter, CustomFieldAdapter }; module.exports = { FieldNameAdapter };
+21 -2
View File
@@ -3,5 +3,24 @@ import {
EmployeeCompanyLoanAdapter, EmployeeCompanyLoanAdapter,
} from './lib'; } from './lib';
window.CompanyLoanAdapter = CompanyLoanAdapter;
window.EmployeeCompanyLoanAdapter = EmployeeCompanyLoanAdapter; import IceDataPipe from "../../../api/IceDataPipe";
function init(data) {
const modJsList = {};
modJsList.tabCompanyLoan = new CompanyLoanAdapter('CompanyLoan', 'CompanyLoan');
modJsList.tabCompanyLoan.setObjectTypeName('Company Loan');
modJsList.tabCompanyLoan.setDataPipe(new IceDataPipe(modJsList.tabCompanyLoan));
modJsList.tabCompanyLoan.setAccess(data.permissions.CompanyLoan);
modJsList.tabEmployeeCompanyLoan = new EmployeeCompanyLoanAdapter('EmployeeCompanyLoan', 'EmployeeCompanyLoan');
modJsList.tabEmployeeCompanyLoan.setObjectTypeName('Employee Company Loan');
modJsList.tabEmployeeCompanyLoan.setDataPipe(new IceDataPipe(modJsList.tabEmployeeCompanyLoan));
modJsList.tabEmployeeCompanyLoan.setAccess(data.permissions.EmployeeCompanyLoan);
window.modJs = modJsList.tabCompanyLoan;
window.modJsList = modJsList;
}
window.initAdminLoan = init;
+83 -4
View File
@@ -2,13 +2,22 @@
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de) Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/ */
import AdapterBase from '../../../api/AdapterBase'; //import AdapterBase from '../../../api/AdapterBase';
import ReactModalAdapterBase from '../../../api/ReactModalAdapterBase';
/** /**
* CompanyLoanAdapter * CompanyLoanAdapter
*/ */
class CompanyLoanAdapter extends AdapterBase { class CompanyLoanAdapter extends ReactModalAdapterBase {
constructor(endPoint, tab, filter, orderBy) {
super(endPoint, tab, filter, orderBy);
this.fieldNameMap = {};
this.hiddenFields = {};
this.tableFields = {};
this.formOnlyFields = {};
}
getDataMapping() { getDataMapping() {
return [ return [
'id', 'id',
@@ -25,13 +34,35 @@ class CompanyLoanAdapter extends AdapterBase {
]; ];
} }
getTableColumns() {
return [
{
title: 'Name',
dataIndex: 'name',
sorter: true,
},
{
title: 'Details',
dataIndex: 'details',
sorter: true,
}
];
}
getFormFields() { getFormFields() {
if(this.showSave){
return [ return [
['id', { label: 'ID', type: 'hidden' }], ['id', { label: 'ID', type: 'hidden' }],
['name', { label: 'Name', type: 'text', validation: '' }], ['name', { label: 'Name', type: 'text', validation: '' }],
['details', { label: 'Details', type: 'textarea', validation: 'none' }], ['details', { label: 'Details', type: 'textarea', validation: 'none' }],
]; ];
} }
return [
['id', { label: 'ID', type: 'hidden' }],
['name', { label: 'Name', type: 'text', validation: '' }],
['details', { label: 'Details', type: 'textarea', validation: 'none' }],
];
}
} }
@@ -39,7 +70,15 @@ class CompanyLoanAdapter extends AdapterBase {
* EmployeeCompanyLoanAdapter * EmployeeCompanyLoanAdapter
*/ */
class EmployeeCompanyLoanAdapter extends AdapterBase { class EmployeeCompanyLoanAdapter extends ReactModalAdapterBase {
constructor(endPoint, tab, filter, orderBy) {
super(endPoint, tab, filter, orderBy);
this.fieldNameMap = {};
this.hiddenFields = {};
this.tableFields = {};
this.formOnlyFields = {};
}
getDataMapping() { getDataMapping() {
return [ return [
'id', 'id',
@@ -66,6 +105,46 @@ class EmployeeCompanyLoanAdapter extends AdapterBase {
]; ];
} }
getTableColumns() {
return [
{
title: 'Employee',
dataIndex: 'employee',
sorter: true,
},
{
title: 'Loan Type',
dataIndex: 'loan',
sorter: true,
},
{
title: 'Loan Start Date',
dataIndex: 'start_date',
sorter: true,
},
{
title: 'Loan Period (Months)',
dataIndex: 'period_months',
sorter: true,
},
{
title: 'Currency',
dataIndex: 'currency',
sorter: true,
},
{
title: 'Amount',
dataIndex: 'amount',
sorter: true,
},
{
title: 'Status',
dataIndex: 'status',
sorter: true,
}
];
}
getFormFields() { getFormFields() {
return [ return [
['id', { label: 'ID', type: 'hidden' }], ['id', { label: 'ID', type: 'hidden' }],
@@ -97,5 +176,5 @@ class EmployeeCompanyLoanAdapter extends AdapterBase {
module.exports = { module.exports = {
CompanyLoanAdapter, CompanyLoanAdapter,
EmployeeCompanyLoanAdapter, EmployeeCompanyLoanAdapter
}; };
+29 -2
View File
@@ -4,6 +4,33 @@ import {
EmployeeSalaryAdapter, EmployeeSalaryAdapter,
} from './lib'; } from './lib';
window.SalaryComponentTypeAdapter = SalaryComponentTypeAdapter; /*window.SalaryComponentTypeAdapter = SalaryComponentTypeAdapter;
window.SalaryComponentAdapter = SalaryComponentAdapter; window.SalaryComponentAdapter = SalaryComponentAdapter;
window.EmployeeSalaryAdapter = EmployeeSalaryAdapter; window.EmployeeSalaryAdapter = EmployeeSalaryAdapter;*/
import IceDataPipe from "../../../api/IceDataPipe";
function init(data) {
const modJsList = [];
modJsList.tabSalaryComponentType = new SalaryComponentTypeAdapter('SalaryComponentType', 'SalaryComponentType');
modJsList.tabSalaryComponentType.setObjectTypeName('Salary Component Types');
modJsList.tabSalaryComponentType.setDataPipe(new IceDataPipe(modJsList.tabSalaryComponentType));
modJsList.tabSalaryComponentType.setAccess(data.permissions.SalaryComponentType);
modJsList.tabSalaryComponent = new SalaryComponentAdapter('SalaryComponent', 'SalaryComponent');
modJsList.tabSalaryComponent.setObjectTypeName('Salary components');
modJsList.tabSalaryComponent.setDataPipe(new IceDataPipe(modJsList.tabSalaryComponent));
modJsList.tabSalaryComponent.setAccess(data.permissions.SalaryComponent);
modJsList.tabEmployeeSalary = new EmployeeSalaryAdapter('EmployeeSalary', 'EmployeeSalary');
modJsList.tabEmployeeSalary.setObjectTypeName('Employee Salary');
modJsList.tabEmployeeSalary.setDataPipe(new IceDataPipe(modJsList.tabEmployeeSalary));
modJsList.tabEmployeeSalary.setAccess(data.permissions.EmployeeSalary);
//window.modJs = modJsList.tabEmployeeSalary;
window.modJs = modJsList.tabSalaryComponentType;
window.modJsList = modJsList;
}
window.initAdminSalary = init;
+90 -4
View File
@@ -3,13 +3,22 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/ */
import AdapterBase from '../../../api/AdapterBase'; //import AdapterBase from '../../../api/AdapterBase';
import ReactModalAdapterBase from '../../../api/ReactModalAdapterBase';
/** /**
* SalaryComponentTypeAdapter * SalaryComponentTypeAdapter
*/ */
class SalaryComponentTypeAdapter extends AdapterBase { class SalaryComponentTypeAdapter extends ReactModalAdapterBase {
constructor(endPoint, tab, filter, orderBy) {
super(endPoint, tab, filter, orderBy);
this.fieldNameMap = {};
this.hiddenFields = {};
this.tableFields = {};
this.formOnlyFields = {};
}
getDataMapping() { getDataMapping() {
return [ return [
'id', 'id',
@@ -26,6 +35,21 @@ class SalaryComponentTypeAdapter extends AdapterBase {
]; ];
} }
getTableColumns() {
return [
{
title: 'Code',
dataIndex: 'code',
sorter: true,
},
{
title: 'Name',
dataIndex: 'name',
sorter: true,
}
];
}
getFormFields() { getFormFields() {
return [ return [
['id', { label: 'ID', type: 'hidden' }], ['id', { label: 'ID', type: 'hidden' }],
@@ -40,7 +64,15 @@ class SalaryComponentTypeAdapter extends AdapterBase {
* SalaryComponentAdapter * SalaryComponentAdapter
*/ */
class SalaryComponentAdapter extends AdapterBase { class SalaryComponentAdapter extends ReactModalAdapterBase {
constructor(endPoint, tab, filter, orderBy) {
super(endPoint, tab, filter, orderBy);
this.fieldNameMap = {};
this.hiddenFields = {};
this.tableFields = {};
this.formOnlyFields = {};
}
getDataMapping() { getDataMapping() {
return [ return [
'id', 'id',
@@ -59,6 +91,27 @@ class SalaryComponentAdapter extends AdapterBase {
]; ];
} }
getTableColumns() {
return [
{
title: 'Name',
dataIndex: 'name',
sorter: true,
},
{
title: 'Salary Component Type',
dataIndex: 'componentType',
sorter: true,
},
{
title: 'Details',
dataIndex: 'details',
sorter: true,
}
];
}
getFormFields() { getFormFields() {
return [ return [
['id', { label: 'ID', type: 'hidden' }], ['id', { label: 'ID', type: 'hidden' }],
@@ -74,7 +127,15 @@ class SalaryComponentAdapter extends AdapterBase {
* EmployeeSalaryAdapter * EmployeeSalaryAdapter
*/ */
class EmployeeSalaryAdapter extends AdapterBase { class EmployeeSalaryAdapter extends ReactModalAdapterBase {
constructor(endPoint, tab, filter, orderBy) {
super(endPoint, tab, filter, orderBy);
this.fieldNameMap = {};
this.hiddenFields = {};
this.tableFields = {};
this.formOnlyFields = {};
}
getDataMapping() { getDataMapping() {
return [ return [
'id', 'id',
@@ -95,6 +156,31 @@ class EmployeeSalaryAdapter extends AdapterBase {
]; ];
} }
getTableColumns() {
return [
{
title: 'Employee',
dataIndex: 'employee',
sorter: true,
},
{
title: 'Salary Component',
dataIndex: 'component',
sorter: true,
},
{
title: 'Amount',
dataIndex: 'amount',
sorter: true,
},
{
title: 'Details',
dataIndex: 'details',
sorter: true,
}
];
}
getFormFields() { getFormFields() {
return [ return [
['id', { label: 'ID', type: 'hidden' }], ['id', { label: 'ID', type: 'hidden' }],
+46921 -4
View File
File diff suppressed because it is too large. Load diff
+531 -1
View File
@@ -1 +1,531 @@
var _0x1b3c=['getMonth','removeAllByPrefix','getData','Friday','August','#_count_#','baseUrl','renderNotification','getLineBreakString','renderNotifications','convertToRelativeTime','setupNotifications','getUTCMonth','#_image_#','setData','#_header_#','about\x20an\x20hour\x20ago','exports','getDay','prototype','popup','setTemplates','setTimeUtils','type','serverGMToffset','less\x20than\x20a\x20minute\x20ago','https://www.linkedin.com/cws/share?url=','setBaseUrl','#notifications','toString','replace','setItem','3px','.navbar\x20.menu','default','value','SUCCESS','service.php','getUTCDate','#_message_#','width=','setServerGMToffset','December','writable','concat','March','image','getItem','indexOf','height','Wednesday','action','getJSON','notifications','Sunday','September','Saturday','Tuesday','enumerable','Share\x20on\x20Linked\x20in','.label-danger','320px','call','storage','Monday','SocialShare','<br/>','\x20new\x20notifications','url','css','getTimezoneOffset','#_time_#',',left=','.notificationTime','May','./RequestCache','remove','February','notification','round','width','getFullYear','Cannot\x20call\x20a\x20class\x20as\x20a\x20function','https://www.facebook.com/sharer/sharer.php?u=','key','open','July','timeUtils','getKey','#_fromName_#','substring','clearPendingNotifications','length','abs','configurable','templates','split','getMinutes',',top=','title','find','April','function','100%','parse','getUTCFullYear','html','setupTimeUtils',',height=','getHours','./Notifications','status','data','invalidateTable','#_url_#','width=550,height=260,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=200,top=200','#_notifications_#','__esModule','&url=','slimscroll','You\x20have\x20no\x20new\x20notifications','each','attr','\x20new\x20notification','defineProperty','Share\x20on\x20Google','message'];(function(_0x5a6e1d,_0x1b3c1d){var _0x2aa244=function(_0xfa9021){while(--_0xfa9021){_0x5a6e1d['push'](_0x5a6e1d['shift']());}};_0x2aa244(++_0x1b3c1d);}(_0x1b3c,0xd9));var _0x2aa2=function(_0x5a6e1d,_0x1b3c1d){_0x5a6e1d=_0x5a6e1d-0x0;var _0x2aa244=_0x1b3c[_0x5a6e1d];return _0x2aa244;};!function e(_0xfa9021,_0x1950c3,_0x66929){var _0x47797d=_0x2aa2;function _0x4bb56c(_0x1e09bc,_0x5b559b){var _0x37fad9=_0x2aa2;if(!_0x1950c3[_0x1e09bc]){if(!_0xfa9021[_0x1e09bc]){var _0x170eeb=_0x37fad9('0xc')==typeof require&&require;if(!_0x5b559b&&_0x170eeb)return _0x170eeb(_0x1e09bc,!0x0);if(_0x3db400)return _0x3db400(_0x1e09bc,!0x0);var _0x13c1a6=new Error('Cannot\x20find\x20module\x20\x27'+_0x1e09bc+'\x27');throw _0x13c1a6['code']='MODULE_NOT_FOUND',_0x13c1a6;}var _0x35818c=_0x1950c3[_0x1e09bc]={'exports':{}};_0xfa9021[_0x1e09bc][0x0][_0x37fad9('0x63')](_0x35818c[_0x37fad9('0x36')],function(_0x399d3b){return _0x4bb56c(_0xfa9021[_0x1e09bc][0x1][_0x399d3b]||_0x399d3b);},_0x35818c,_0x35818c[_0x37fad9('0x36')],e,_0xfa9021,_0x1950c3,_0x66929);}return _0x1950c3[_0x1e09bc]['exports'];}for(var _0x3db400=_0x47797d('0xc')==typeof require&&require,_0x1b17e6=0x0;_0x1b17e6<_0x66929[_0x47797d('0x2')];_0x1b17e6++)_0x4bb56c(_0x66929[_0x1b17e6]);return _0x4bb56c;}({0x1:[function(_0x3225ab,_0x3bcc87,_0x5baf6f){var _0x208e2b=_0x2aa2;'use strict';function _0x1440d4(_0x2a16b9,_0x2c0b16){var _0x439bbf=_0x2aa2;for(var _0x139877=0x0;_0x139877<_0x2c0b16[_0x439bbf('0x2')];_0x139877++){var _0x3a287d=_0x2c0b16[_0x139877];_0x3a287d[_0x439bbf('0x5f')]=_0x3a287d[_0x439bbf('0x5f')]||!0x1,_0x3a287d[_0x439bbf('0x4')]=!0x0,_0x439bbf('0x48')in _0x3a287d&&(_0x3a287d[_0x439bbf('0x50')]=!0x0),Object[_0x439bbf('0x22')](_0x2a16b9,_0x3a287d[_0x439bbf('0x79')],_0x3a287d);}}Object[_0x208e2b('0x22')](_0x5baf6f,'__esModule',{'value':!0x0}),_0x5baf6f[_0x208e2b('0x47')]=void 0x0;var _0x36849f=function(){var _0x5bac5e=_0x208e2b;function _0x3e687e(){var _0x257670=_0x2aa2;!function(_0x1fe4dc,_0x1a5b6d){var _0x21e598=_0x2aa2;if(!(_0x1fe4dc instanceof _0x1a5b6d))throw new TypeError(_0x21e598('0x77'));}(this,_0x3e687e),this[_0x257670('0x2b')]='',this['templates']={};}var _0x485acd,_0x49c71d,_0xf8bea1;return _0x485acd=_0x3e687e,(_0x49c71d=[{'key':'setBaseUrl','value':function(_0x4cef8e){var _0x17ec69=_0x2aa2;this[_0x17ec69('0x2b')]=_0x4cef8e;}},{'key':_0x5bac5e('0x3a'),'value':function(_0x4ba35e){var _0xd51a27=_0x5bac5e;this[_0xd51a27('0x5')]=_0x4ba35e;}},{'key':_0x5bac5e('0x3b'),'value':function(_0x3b9f76){var _0xc56532=_0x5bac5e;this[_0xc56532('0x7c')]=_0x3b9f76;}},{'key':'getNotifications','value':function(_0x48a29b,_0xf4fe6a){var _0x140d0c=_0x5bac5e,_0x269e46=this;$[_0x140d0c('0x59')](this[_0x140d0c('0x2b')],{'a':'getNotifications'},function(_0x3ccaf5){var _0x2e5b21=_0x140d0c;_0x2e5b21('0x49')===_0x3ccaf5[_0x2e5b21('0x15')]&&_0x269e46[_0x2e5b21('0x2e')](_0x3ccaf5[_0x2e5b21('0x16')][0x1],_0x3ccaf5['data'][0x0]);});}},{'key':_0x5bac5e('0x1'),'value':function(_0x57c47c,_0x35855e){var _0x1a8609=_0x5bac5e;$[_0x1a8609('0x59')](this[_0x1a8609('0x2b')],{'a':'clearNotifications'},function(_0x369024){});}},{'key':'renderNotifications','value':function(Line truncated (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/*
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
var NotificationManager = /*#__PURE__*/function () {
function NotificationManager() {
_classCallCheck(this, NotificationManager);
this.baseUrl = '';
this.templates = {};
}
_createClass(NotificationManager, [{
key: "setBaseUrl",
value: function setBaseUrl(url) {
this.baseUrl = url;
}
}, {
key: "setTemplates",
value: function setTemplates(data) {
this.templates = data;
}
}, {
key: "setTimeUtils",
value: function setTimeUtils(timeUtils) {
this.timeUtils = timeUtils;
}
}, {
key: "getNotifications",
value: function getNotifications(name, data) {
var that = this;
$.getJSON(this.baseUrl, {
a: 'getNotifications'
}, function (_data) {
if (_data.status === 'SUCCESS') {
that.renderNotifications(_data.data[1], _data.data[0]);
}
});
}
}, {
key: "clearPendingNotifications",
value: function clearPendingNotifications(name, data) {
var that = this;
$.getJSON(this.baseUrl, {
a: 'clearNotifications'
}, function (_data) {});
}
}, {
key: "renderNotifications",
value: function renderNotifications(notifications, unreadCount) {
if (notifications.length === 0) {
return;
}
var t = this.templates.notifications;
if (unreadCount > 0) {
t = t.replace('#_count_#', unreadCount);
if (unreadCount > 1) {
t = t.replace('#_header_#', "You have ".concat(unreadCount, " new notifications"));
} else {
t = t.replace('#_header_#', "You have ".concat(unreadCount, " new notification"));
}
} else {
t = t.replace('#_count_#', '');
t = t.replace('#_header_#', 'You have no new notifications');
}
var notificationStr = '';
for (var index in notifications) {
notificationStr += this.renderNotification(notifications[index]);
}
t = t.replace('#_notifications_#', notificationStr);
var $obj = $(t);
if (unreadCount === 0) {
$obj.find('.label-danger').remove();
}
$obj.attr('id', 'notifications');
var k = $('#notifications');
k.replaceWith($obj);
$('.navbar .menu').slimscroll({
height: '320px',
alwaysVisible: false,
size: '3px'
}).css('width', '100%');
this.timeUtils.convertToRelativeTime($('.notificationTime'));
}
}, {
key: "renderNotification",
value: function renderNotification(notification) {
var t = this.templates.notification;
t = t.replace('#_image_#', notification.image);
try {
var json = JSON.parse(notification.action);
t = t.replace('#_url_#', this.baseUrl.replace('service.php', '?') + json.url);
} catch (e) {
t = t.replace('#_url_#', '');
}
t = t.replace('#_time_#', notification.time);
t = t.replace('#_fromName_#', notification.type);
t = t.replace('#_message_#', this.getLineBreakString(notification.message, 27));
return t;
}
}, {
key: "getLineBreakString",
value: function getLineBreakString(str, len) {
var t = '';
try {
var arr = str.split(' ');
var count = 0;
for (var i = 0; i < arr.length; i++) {
count += arr[i].length + 1;
if (count > len) {
t += "".concat(arr[i], "<br/>");
count = 0;
} else {
t += "".concat(arr[i], " ");
}
}
} catch (e) {// Do nothing
}
return t;
}
}]);
return NotificationManager;
}();
var _default = NotificationManager;
exports["default"] = _default;
},{}],2:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/*
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
/**
* RequestCache
*/
var MemoryStorage = /*#__PURE__*/function () {
function MemoryStorage() {
_classCallCheck(this, MemoryStorage);
this.data = {};
}
_createClass(MemoryStorage, [{
key: "getItem",
value: function getItem(key) {
return this.data[key];
}
}, {
key: "setItem",
value: function setItem(key, data) {
this.data[key] = data;
}
}, {
key: "removeAllByPrefix",
value: function removeAllByPrefix(prefix) {
var keys = Object.keys(this.data);
for (var i = 0; i < keys.length; i++) {
if (keys[i].indexOf(prefix) > 0) {
delete this.data[keys[i]];
}
}
}
}]);
return MemoryStorage;
}();
var RequestCache = /*#__PURE__*/function () {
function RequestCache(storage) {
_classCallCheck(this, RequestCache);
if (!storage) {
this.storage = new MemoryStorage();
} else {
this.storage = storage;
}
}
_createClass(RequestCache, [{
key: "getKey",
value: function getKey(url, params) {
var key = "".concat(url, "|");
for (var index in params) {
key += "".concat(index, "=").concat(params[index], "|");
}
return key;
}
/*
invalidateTable(table) {
let key;
for (let i = 0; i < this.storage.length; i++) {
key = this.storage.key(i);
if (key.indexOf(`t=${table}`) > 0) {
this.storage.removeItem(key);
}
}
}
*/
}, {
key: "invalidateTable",
value: function invalidateTable(table) {
this.storage.removeAllByPrefix("t=".concat(table));
}
}, {
key: "getData",
value: function getData(key) {
var data = this.storage.getItem(key);
if (!data) {
return null;
}
return data;
}
}, {
key: "setData",
value: function setData(key, data) {
if (data.status !== undefined && data.status != null && data.status !== 'SUCCESS') {
return null;
}
this.storage.setItem(key, data);
return data;
}
}]);
return RequestCache;
}();
var _default = RequestCache;
exports["default"] = _default;
},{}],3:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
/* eslint-disable no-restricted-globals */
/*
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
var SocialShare = {
facebook: function facebook(url) {
var w = 700;
var h = 500;
var left = screen.width / 2 - w / 2;
var top = screen.height / 2 - h / 2;
url = "https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(url));
window.open(url, 'Share on Facebook', "width=".concat(w, ",height=").concat(h, ",left=").concat(left, ",top=").concat(top));
return false;
},
google: function google(url) {
var w = 500;
var h = 500;
var left = screen.width / 2 - w / 2;
var top = screen.height / 2 - h / 2;
url = "https://plus.google.com/share?url=".concat(encodeURIComponent(url));
window.open(url, 'Share on Google', "width=".concat(w, ",height=").concat(h, ",left=").concat(left, ",top=").concat(top));
return false;
},
linkedin: function linkedin(url) {
var w = 500;
var h = 500;
var left = screen.width / 2 - w / 2;
var top = screen.height / 2 - h / 2;
url = "https://www.linkedin.com/cws/share?url=".concat(encodeURIComponent(url));
window.open(url, 'Share on Linked in', "width=".concat(w, ",height=").concat(h, ",left=").concat(left, ",top=").concat(top));
return false;
},
twitter: function twitter(url, msg) {
window.open("http://twitter.com/share?text=".concat(escape(msg), "&url=").concat(escape(url)), 'popup', 'width=550,height=260,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=200,top=200');
return false;
}
};
var _default = SocialShare;
exports["default"] = _default;
},{}],4:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
/* eslint-disable camelcase,brace-style */
/*
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
var TimeUtils = /*#__PURE__*/function () {
function TimeUtils() {
_classCallCheck(this, TimeUtils);
}
_createClass(TimeUtils, [{
key: "setServerGMToffset",
value: function setServerGMToffset(serverGMToffset) {
this.serverGMToffset = serverGMToffset;
}
}, {
key: "getMySQLFormatDate",
value: function getMySQLFormatDate(date) {
var format = function format(val) {
if (val < 10) {
return "0".concat(val);
}
return val;
};
return "".concat(date.getUTCFullYear(), "-").concat(format(date.getUTCMonth() + 1), "-").concat(format(date.getUTCDate()));
}
}, {
key: "convertToRelativeTime",
value: function convertToRelativeTime(selector) {
var that = this;
var getAmPmTime = function getAmPmTime(curHour, curMin) {
var amPm = 'am';
var amPmHour = curHour;
if (amPmHour >= 12) {
amPm = 'pm';
if (amPmHour > 12) {
amPmHour -= 12;
}
}
var prefixCurMin = '';
if (curMin < 10) {
prefixCurMin = '0';
}
var prefixCurHour = '';
if (curHour === 0) {
prefixCurHour = '0';
}
return " at ".concat(prefixCurHour).concat(amPmHour, ":").concat(prefixCurMin).concat(curMin).concat(amPm);
};
var getBrowserTimeZone = function getBrowserTimeZone() {
var current_date = new Date();
var gmt_offset = current_date.getTimezoneOffset() / 60;
return -gmt_offset;
};
var curDate = new Date();
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var timezoneDiff = this.serverGMToffset - getBrowserTimeZone();
var timezoneTimeDiff = timezoneDiff * 60 * 60 * 1000;
selector.each(function () {
try {
var thisValue = $(this).html(); // Split value into date and time
var thisValueArray = thisValue.split(' ');
var thisValueDate = thisValueArray[0];
var thisValueTime = thisValueArray[1]; // Split date into components
var thisValueDateArray = thisValueDate.split('-');
var curYear = thisValueDateArray[0];
var curMonth = thisValueDateArray[1] - 1;
var curDay = thisValueDateArray[2]; // Split time into components
var thisValueTimeArray = thisValueTime.split(':');
var curHour = thisValueTimeArray[0];
var curMin = thisValueTimeArray[1];
var curSec = thisValueTimeArray[2]; // Create this date
var thisDate = new Date(curYear, curMonth, curDay, curHour, curMin, curSec);
var thisTime = thisDate.getTime();
var tzDate = new Date(thisTime - timezoneTimeDiff); // var tzDay = tzDate.getDay();//getDay will return the day of the week not the month
// var tzDay = tzDate.getUTCDate(); //getUTCDate will return the day of the month
var tzDay = tzDate.toString('d'); //
var tzYear = tzDate.getFullYear();
var tzHour = tzDate.getHours();
var tzMin = tzDate.getMinutes(); // Create the full date
// var fullDate = days[tzDate.getDay()] + ", " + months[tzDate.getMonth()] + " " + tzDay + ", " + tzYear + getAmPmTime(tzHour, tzMin);
var fullDate = "".concat(days[tzDate.getDay()], ", ").concat(months[tzDate.getMonth()], " ").concat(tzDay, ", ").concat(tzYear).concat(getAmPmTime(tzHour, tzMin)); // Get the time different
var timeDiff = (curDate.getTime() - tzDate.getTime()) / 1000;
var minDiff = Math.abs(timeDiff / 60);
var hourDiff = Math.abs(timeDiff / (60 * 60));
var dayDiff = Math.abs(timeDiff / (60 * 60 * 24));
var yearDiff = Math.abs(timeDiff / (60 * 60 * 24 * 365)); // If more than a day old, display the month, day and time (and year, if applicable)
var fbDate = '';
if (dayDiff > 1) {
// fbDate = curDay + " " + months[tzDate.getMonth()].substring(0,3);
fbDate = "".concat(tzDay, " ").concat(months[tzDate.getMonth()].substring(0, 3)); // Add the year, if applicable
if (yearDiff > 1) {
fbDate = "".concat(fbDate, " ").concat(curYear);
} // Add the time
fbDate += getAmPmTime(tzHour, tzMin);
} // Less than a day old, and more than an hour old
else if (hourDiff >= 1) {
var roundedHour = Math.round(hourDiff);
if (roundedHour === 1) fbDate = 'about an hour ago';else fbDate = "".concat(roundedHour, " hours ago");
} // Less than an hour, and more than a minute
else if (minDiff >= 1) {
var roundedMin = Math.round(minDiff);
if (roundedMin === 1) fbDate = 'about a minute ago';else fbDate = "".concat(roundedMin, " minutes ago");
} // Less than a minute
else if (minDiff < 1) {
fbDate = 'less than a minute ago';
} // Update this element
$(this).html(fbDate);
$(this).attr('title', fullDate);
} catch (e) {// Do nothing
}
});
}
}]);
return TimeUtils;
}();
var _default = TimeUtils;
exports["default"] = _default;
},{}],5:[function(require,module,exports){
"use strict";
var _Notifications = _interopRequireDefault(require("./Notifications"));
var _TimeUtils = _interopRequireDefault(require("./TimeUtils"));
var _RequestCache = _interopRequireDefault(require("./RequestCache"));
var _SocialShare = _interopRequireDefault(require("./SocialShare"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/* global timeUtils */
/*
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
window.RequestCache = _RequestCache["default"];
window.SocialShare = _SocialShare["default"];
window.setupTimeUtils = function (diffHoursBetweenServerTimezoneWithGMT) {
var timeUtils = new _TimeUtils["default"]();
timeUtils.setServerGMToffset(diffHoursBetweenServerTimezoneWithGMT);
return timeUtils;
};
window.setupNotifications = function (baseUrl) {
var notificationManager = new _Notifications["default"]();
notificationManager.setBaseUrl(baseUrl);
notificationManager.setTimeUtils(timeUtils);
return notificationManager;
};
},{"./Notifications":1,"./RequestCache":2,"./SocialShare":3,"./TimeUtils":4}]},{},[5])
//# sourceMappingURL=common.js.map
+10479 -4
View File
File diff suppressed because it is too large. Load diff
+37713 -5
View File
File diff suppressed because it is too large. Load diff
+34094 -34094
View File
File diff suppressed because it is too large. Load diff
+91750 -5
View File
File diff suppressed because it is too large. Load diff
+39547 -2
View File
File diff suppressed because it is too large. Load diff
+92733 -5
View File
File diff suppressed because it is too large. Load diff
+15464 -2
View File
File diff suppressed because it is too large. Load diff
+28918 -10
View File
File diff suppressed because it is too large. Load diff
+21 -3
View File
@@ -1,5 +1,23 @@
import { import {
EmployeeCompanyLoanAdapter, EmployeeCompanyLoanAdapter,
} from './lib'; } from './lib';
window.EmployeeCompanyLoanAdapter = EmployeeCompanyLoanAdapter; import IceDataPipe from "../../../api/IceDataPipe";
function init(data) {
const modJsList = [];
modJsList.tabEmployeeCompanyLoan = new EmployeeCompanyLoanAdapter('EmployeeCompanyLoan', 'EmployeeCompanyLoan');
modJsList.tabEmployeeCompanyLoan.setObjectTypeName('Employee Company Loan');
modJsList.tabEmployeeCompanyLoan.setShowAddNew(false);
modJsList.tabEmployeeCompanyLoan.setShowEdit(false);
modJsList.tabEmployeeCompanyLoan.setShowDelete(false);
modJsList.tabEmployeeCompanyLoan.setDataPipe(new IceDataPipe(modJsList.tabEmployeeCompanyLoan));
modJsList.tabEmployeeCompanyLoan.setAccess(data.permissions.EmployeeCompanyLoan);
window.modJs = modJsList.tabEmployeeCompanyLoan;
window.modJsList = modJsList;
}
window.initAdminLoan = init;
+46 -2
View File
@@ -2,9 +2,18 @@
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de) Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/ */
import AdapterBase from '../../../api/AdapterBase'; //import AdapterBase from '../../../api/AdapterBase';
import ReactModalAdapterBase from '../../../api/ReactModalAdapterBase';
class EmployeeCompanyLoanAdapter extends ReactModalAdapterBase {
constructor(endPoint, tab, filter, orderBy) {
super(endPoint, tab, filter, orderBy);
this.fieldNameMap = {};
this.hiddenFields = {};
this.tableFields = {};
this.formOnlyFields = {};
}
class EmployeeCompanyLoanAdapter extends AdapterBase {
getDataMapping() { getDataMapping() {
return [ return [
'id', 'id',
@@ -29,6 +38,41 @@ class EmployeeCompanyLoanAdapter extends AdapterBase {
]; ];
} }
getTableColumns() {
return [
{
title: 'Loan Type',
dataIndex: 'loan',
sorter: true,
},
{
title: 'Loan Start Date',
dataIndex: 'start_date',
sorter: true,
},
{
title: 'Loan Period (Months)',
dataIndex: 'period_months',
sorter: true,
},
{
title: 'Currency',
dataIndex: 'currency',
sorter: true,
},
{
title: 'Amount',
dataIndex: 'amount',
sorter: true,
},
{
title: 'Status',
dataIndex: 'status',
sorter: true,
}
];
}
getFormFields() { getFormFields() {
return [ return [
['id', { label: 'ID', type: 'hidden' }], ['id', { label: 'ID', type: 'hidden' }],
+15 -1
View File
@@ -2,4 +2,18 @@ import {
EmployeeSalaryAdapter, EmployeeSalaryAdapter,
} from './lib'; } from './lib';
window.EmployeeSalaryAdapter = EmployeeSalaryAdapter; import IceDataPipe from "../../../api/IceDataPipe";
function init(data) {
const modJsList = {};
modJsList.tabEmployeeSalary = new EmployeeSalaryAdapter('EmployeeSalary', 'EmployeeSalary');
modJsList.tabEmployeeSalary.setObjectTypeName('Employee Salary');
modJsList.tabEmployeeSalary.setDataPipe(new IceDataPipe(modJsList.tabEmployeeSalary));
modJsList.tabEmployeeSalary.setAccess(data.permissions.EmployeeSalary);
window.modJs = modJsList.tabEmployeeSalary;
window.modJsList = modJsList;
}
window.initAdminSalary = init;
+32 -2
View File
@@ -2,9 +2,18 @@
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de) Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah) Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/ */
import AdapterBase from '../../../api/AdapterBase'; //import AdapterBase from '../../../api/AdapterBase';
import ReactModalAdapterBase from '../../../api/ReactModalAdapterBase';
class EmployeeSalaryAdapter extends ReactModalAdapterBase {
constructor(endPoint, tab, filter, orderBy) {
super(endPoint, tab, filter, orderBy);
this.fieldNameMap = {};
this.hiddenFields = {};
this.tableFields = {};
this.formOnlyFields = {};
}
class EmployeeSalaryAdapter extends AdapterBase {
getDataMapping() { getDataMapping() {
return [ return [
'id', 'id',
@@ -23,6 +32,27 @@ class EmployeeSalaryAdapter extends AdapterBase {
]; ];
} }
getTableColumns() {
return [
{
title: 'Salary Component',
dataIndex: 'component',
sorter: true,
},
{
title: 'Amount',
dataIndex: 'amount',
sorter: true,
},
{
title: 'Details',
dataIndex: 'details',
sorter: true,
}
];
}
getFormFields() { getFormFields() {
return [ return [
['id', { label: 'ID', type: 'hidden' }], ['id', { label: 'ID', type: 'hidden' }],