67 lines
1.6 KiB
JavaScript
67 lines
1.6 KiB
JavaScript
/*
|
|
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';
|
|
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 = {};
|
|
}
|
|
|
|
getDataMapping() {
|
|
return [
|
|
'id',
|
|
'component',
|
|
'amount',
|
|
'details',
|
|
];
|
|
}
|
|
|
|
getHeaders() {
|
|
return [
|
|
{ sTitle: 'ID', bVisible: false },
|
|
{ sTitle: 'Salary Component' },
|
|
{ sTitle: 'Amount' },
|
|
{ sTitle: 'Details' },
|
|
];
|
|
}
|
|
|
|
getTableColumns() {
|
|
return [
|
|
{
|
|
title: 'Salary Component',
|
|
dataIndex: 'component',
|
|
sorter: true,
|
|
},
|
|
{
|
|
title: 'Amount',
|
|
dataIndex: 'amount',
|
|
sorter: true,
|
|
},
|
|
{
|
|
title: 'Details',
|
|
dataIndex: 'details',
|
|
sorter: true,
|
|
}
|
|
];
|
|
}
|
|
|
|
|
|
getFormFields() {
|
|
return [
|
|
['id', { label: 'ID', type: 'hidden' }],
|
|
['component', { label: 'Salary Component', type: 'select2', 'remote-source': ['SalaryComponent', 'id', 'name'] }],
|
|
['amount', { label: 'Amount', type: 'text', validation: 'float' }],
|
|
['details', { label: 'Details', type: 'textarea', validation: 'none' }],
|
|
];
|
|
}
|
|
}
|
|
|
|
module.exports = { EmployeeSalaryAdapter };
|