Upgrade to v26 (#172)
* A bunch of new updates from icehrm pro * Push changes to frontend
This commit is contained in:
5
web/modules/src/projects/index.js
Normal file
5
web/modules/src/projects/index.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import {
|
||||
EmployeeProjectAdapter,
|
||||
} from './lib';
|
||||
|
||||
window.EmployeeProjectAdapter = EmployeeProjectAdapter;
|
||||
32
web/modules/src/projects/lib.js
Normal file
32
web/modules/src/projects/lib.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
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';
|
||||
|
||||
class EmployeeProjectAdapter extends AdapterBase {
|
||||
getDataMapping() {
|
||||
return [
|
||||
'id',
|
||||
'project',
|
||||
];
|
||||
}
|
||||
|
||||
getHeaders() {
|
||||
return [
|
||||
{ sTitle: 'ID', bVisible: false },
|
||||
{ sTitle: 'Project' },
|
||||
];
|
||||
}
|
||||
|
||||
getFormFields() {
|
||||
return [
|
||||
['id', { label: 'ID', type: 'hidden' }],
|
||||
['project', { label: 'Project', type: 'select2', 'remote-source': ['Project', 'id', 'name'] }],
|
||||
['details', { label: 'Details', type: 'textarea', validation: 'none' }],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { EmployeeProjectAdapter };
|
||||
Reference in New Issue
Block a user