38 lines
748 B
JavaScript
38 lines
748 B
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 './AdapterBase';
|
|
/**
|
|
* IdNameAdapter
|
|
*/
|
|
|
|
class IdNameAdapter extends AdapterBase {
|
|
constructor(endPoint, tab, filter, orderBy) {
|
|
super(endPoint, tab, filter, orderBy);
|
|
}
|
|
|
|
getDataMapping() {
|
|
return [
|
|
'id',
|
|
'name',
|
|
];
|
|
}
|
|
|
|
getHeaders() {
|
|
return [
|
|
{ sTitle: 'ID', bVisible: false },
|
|
{ sTitle: 'Name' },
|
|
];
|
|
}
|
|
|
|
getFormFields() {
|
|
return [
|
|
['id', { label: 'ID', type: 'hidden' }],
|
|
['name', { label: 'Name', type: 'text', validation: '' }],
|
|
];
|
|
}
|
|
}
|
|
|
|
export default IdNameAdapter;
|