loan react
This commit is contained in:
@@ -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' }],
|
||||||
|
|||||||
Reference in New Issue
Block a user