Upgrade to v26 (#172)

* A bunch of new updates from icehrm pro

* Push changes to frontend
This commit is contained in:
Thilina Hasantha
2019-02-03 14:00:34 +01:00
committed by GitHub
parent a75325fb52
commit 16014bb38e
734 changed files with 131230 additions and 17430 deletions

View File

@@ -0,0 +1,15 @@
import {
CountryAdapter,
ProvinceAdapter,
CurrencyTypeAdapter,
NationalityAdapter,
ImmigrationStatusAdapter,
EthnicityAdapter,
} from './lib';
window.CountryAdapter = CountryAdapter;
window.ProvinceAdapter = ProvinceAdapter;
window.CurrencyTypeAdapter = CurrencyTypeAdapter;
window.NationalityAdapter = NationalityAdapter;
window.ImmigrationStatusAdapter = ImmigrationStatusAdapter;
window.EthnicityAdapter = EthnicityAdapter;

View File

@@ -0,0 +1,142 @@
/*
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 IdNameAdapter from '../../../api/IdNameAdapter';
/**
* CountryAdapter
*/
class CountryAdapter extends AdapterBase {
getDataMapping() {
return [
'id',
'code',
'name',
];
}
getHeaders() {
return [
{ sTitle: 'ID', bVisible: false },
{ sTitle: 'Code' },
{ sTitle: 'Name' },
];
}
getFormFields() {
return [
['id', { label: 'ID', type: 'hidden' }],
['code', { label: 'Code', type: 'text', validation: '' }],
['name', { label: 'Name', type: 'text', validation: '' }],
];
}
}
/**
* ProvinceAdapter
*/
class ProvinceAdapter extends AdapterBase {
getDataMapping() {
return [
'id',
'code',
'name',
'country',
];
}
getHeaders() {
return [
{ sTitle: 'ID', bVisible: false },
{ sTitle: 'Code' },
{ sTitle: 'Name' },
{ sTitle: 'Country' },
];
}
getFormFields() {
return [
['id', { label: 'ID', type: 'hidden' }],
['code', { label: 'Code', type: 'text', validation: '' }],
['name', { label: 'Name', type: 'text', validation: '' }],
['country', { label: 'Country', type: 'select2', 'remote-source': ['Country', 'code', 'name'] }],
];
}
getFilters() {
return [
['country', { label: 'Country', type: 'select2', 'remote-source': ['Country', 'code', 'name'] }],
];
}
}
/**
* CurrencyTypeAdapter
*/
class CurrencyTypeAdapter extends AdapterBase {
getDataMapping() {
return [
'id',
'code',
'name',
];
}
getHeaders() {
return [
{ sTitle: 'ID', bVisible: false },
{ sTitle: 'Code' },
{ sTitle: 'Name' },
];
}
getFormFields() {
return [
['id', { label: 'ID', type: 'hidden' }],
['code', { label: 'Code', type: 'text', validation: '' }],
['name', { label: 'Name', type: 'text', validation: '' }],
];
}
}
/**
* NationalityAdapter
*/
class NationalityAdapter extends IdNameAdapter {
}
/**
* ImmigrationStatusAdapter
*/
class ImmigrationStatusAdapter extends IdNameAdapter {
}
/**
* EthnicityAdapter
*/
class EthnicityAdapter extends IdNameAdapter {
}
module.exports = {
CountryAdapter,
ProvinceAdapter,
CurrencyTypeAdapter,
NationalityAdapter,
ImmigrationStatusAdapter,
EthnicityAdapter,
};