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,3 @@
import { DashboardAdapter } from './lib';
window.DashboardAdapter = DashboardAdapter;

View File

@@ -0,0 +1,56 @@
/*
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 DashboardAdapter extends AdapterBase {
getDataMapping() {
return [];
}
getHeaders() {
return [];
}
getFormFields() {
return [];
}
get(callBackData) {
}
getInitData() {
const that = this;
const object = {};
const reqJson = JSON.stringify(object);
const callBackData = [];
callBackData.callBackData = [];
callBackData.callBackSuccess = 'getInitDataSuccessCallBack';
callBackData.callBackFail = 'getInitDataFailCallBack';
this.customAction('getInitData', 'admin=dashboard', reqJson, callBackData);
}
getInitDataSuccessCallBack(data) {
$('#numberOfEmployees').html(`${data.numberOfEmployees} Employees`);
$('#numberOfCompanyStuctures').html(`${data.numberOfCompanyStuctures} Departments`);
$('#numberOfUsers').html(`${data.numberOfUsers} Users`);
$('#numberOfProjects').html(`${data.numberOfProjects} Active Projects`);
$('#numberOfAttendanceLastWeek').html(`${data.numberOfAttendanceLastWeek} Entries Last Week`);
$('#numberOfLeaves').html(`${data.numberOfLeaves} Upcoming`);
$('#numberOfTimeEntries').html(data.numberOfTimeEntries);
$('#numberOfCandidates').html(`${data.numberOfCandidates} Candidates`);
$('#numberOfJobs').html(`${data.numberOfJobs} Active`);
$('#numberOfCourses').html(`${data.numberOfCourses} Courses`);
}
getInitDataFailCallBack(callBackData) {
}
}
module.exports = { DashboardAdapter };