Upgrade to v26 (#172)
* A bunch of new updates from icehrm pro * Push changes to frontend
This commit is contained in:
3
web/admin/src/dashboard/index.js
Normal file
3
web/admin/src/dashboard/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import { DashboardAdapter } from './lib';
|
||||
|
||||
window.DashboardAdapter = DashboardAdapter;
|
||||
56
web/admin/src/dashboard/lib.js
Normal file
56
web/admin/src/dashboard/lib.js
Normal 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 };
|
||||
Reference in New Issue
Block a user