Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2368e526b | ||
|
|
76b3aff37d | ||
|
|
078396d5d7 | ||
|
|
b99b6f6f77 | ||
|
|
4c97461ec6 | ||
|
|
5b728aa551 | ||
|
|
cdbea02b46 | ||
|
|
e46aca54f9 | ||
|
|
cfdaeaad50 | ||
|
|
09071a0f21 | ||
|
|
785c210c4e | ||
|
|
d0d57b6575 | ||
|
|
d2c3a2af28 | ||
|
|
8eb1f9f4be | ||
|
|
6b87fdfcd8 | ||
|
|
934388d769 | ||
|
|
08b4d93bef | ||
|
|
3016ef518d | ||
|
|
6798312a78 | ||
|
|
ea106119ab | ||
|
|
ca3492e30e | ||
|
|
8dacf2a8f1 | ||
|
|
16ce8fe461 | ||
|
|
51f9897ca2 | ||
|
|
208d62d167 | ||
|
|
7c5c28047d | ||
|
|
2881319247 |
157
CHANGELOG.txt
157
CHANGELOG.txt
@@ -1,157 +0,0 @@
|
|||||||
Release note v9.1
|
|
||||||
-----------------
|
|
||||||
### Fixes
|
|
||||||
*Add missing S3FileSystem class
|
|
||||||
|
|
||||||
Release note v9.0
|
|
||||||
-----------------
|
|
||||||
### Features
|
|
||||||
*New user interface
|
|
||||||
*Decimal leave counts supported
|
|
||||||
|
|
||||||
|
|
||||||
Release note v8.4
|
|
||||||
-----------------
|
|
||||||
### Fixes
|
|
||||||
* Fix leave carry forward rounding issues
|
|
||||||
* Fix issue: select2 default value not getting set for select2
|
|
||||||
* Fix issue: email not sent when admin changing leave status
|
|
||||||
|
|
||||||
Release note v8.3
|
|
||||||
-----------------
|
|
||||||
### Fixes
|
|
||||||
* Fix user table issue on windows, this will resolve errors such as: (Note that this fix has no effect on unix based installations)
|
|
||||||
* Admin not able to view user uploaded documents
|
|
||||||
* Admin not able to upload documants for users
|
|
||||||
* Admin can not view employee attendance records
|
|
||||||
* Employee projects can not be added
|
|
||||||
|
|
||||||
|
|
||||||
Release note v8.2
|
|
||||||
-----------------
|
|
||||||
### Features
|
|
||||||
*Instance verification added
|
|
||||||
|
|
||||||
Release note v8.1
|
|
||||||
-----------------
|
|
||||||
### Fixes
|
|
||||||
*Fixed bug that caused a fatal error in php v5.4
|
|
||||||
*aws2.7.11 phar file replaced by a aws2.7.11 extracted files
|
|
||||||
*old aws sdk removed
|
|
||||||
|
|
||||||
Release note v8.0
|
|
||||||
-----------------
|
|
||||||
### Features
|
|
||||||
*Admin dashbord module
|
|
||||||
*If the employee joined in current leave period, his leave entitlement is calculated proportional to joined date
|
|
||||||
*Improvements to reporting module
|
|
||||||
*Adding new employee time tracking report
|
|
||||||
*Join date for employees made mandatory
|
|
||||||
*Sending welcome email when a user is added
|
|
||||||
*Let users directly reply to admin user from any email sent out from icehrm
|
|
||||||
*All the users who are not admins must have an employee object attached
|
|
||||||
*Upgrade aws sdk to v2.7.11
|
|
||||||
*Allow employees to change password
|
|
||||||
*Use only the email address defined under user for sending mails
|
|
||||||
*Making work_email and private_email fields optional
|
|
||||||
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
*Upload dialog close button issue fixed
|
|
||||||
|
|
||||||
|
|
||||||
Release note v7.2
|
|
||||||
-----------------
|
|
||||||
*Fixes
|
|
||||||
*Some critical vulnerabilities are fixed as recommend by http://zeroscience.mk/en/
|
|
||||||
|
|
||||||
Release note v7.1
|
|
||||||
-----------------
|
|
||||||
*Features
|
|
||||||
*Improved company structure graph
|
|
||||||
*Leave notes implementation – Supervisor can add a note when approving or rejecting leaves
|
|
||||||
*Filtering support
|
|
||||||
*Select boxes with long lists are now searchable
|
|
||||||
*Add/Edit/Delete company structure permissions added for managers
|
|
||||||
*Add ability to disable employee information editing
|
|
||||||
|
|
||||||
*Fixes
|
|
||||||
*Make loans editable only by admin
|
|
||||||
*Fix: permissions not getting applied to employee documents
|
|
||||||
*Fix error adding employee documents when no user assigned to the admin
|
|
||||||
|
|
||||||
*Code Quality
|
|
||||||
*Moving all module related code and data into module folders
|
|
||||||
|
|
||||||
Release note v6.0
|
|
||||||
-----------------
|
|
||||||
* Features
|
|
||||||
* Notifications for leaves and timesheets
|
|
||||||
* Leave module accrue and leave carry forward
|
|
||||||
* Employee leave entitlement sub module
|
|
||||||
* Ability to put system on debug mode
|
|
||||||
* Allow admins to see documents of all the employees at one place
|
|
||||||
* Backup data when deleting an employee
|
|
||||||
* Employee attendance report added
|
|
||||||
* Changes to time entry form in timesheet module to make time entry process faster
|
|
||||||
* Admin can make all projects available to employees or just the set of prjects assigned to them using Setting "Projects: Make All Projects Available to Employees"
|
|
||||||
* Employee document, date added field can not be changed by the employee anymore
|
|
||||||
* About dialog added for admins
|
|
||||||
|
|
||||||
* Fixes
|
|
||||||
* Fix default employee delete issue (when the default employee is deleted the admin user attached to it also get deleted)
|
|
||||||
* Fix user duplicate email issue
|
|
||||||
* Fix manager can not logout from switched employee
|
|
||||||
* Remove admin guide from non admin users
|
|
||||||
|
|
||||||
Release note v5.3
|
|
||||||
-----------------
|
|
||||||
* Fixes
|
|
||||||
* Fix missing employee name in employee details report
|
|
||||||
|
|
||||||
Release note v5.2
|
|
||||||
-----------------
|
|
||||||
* Fixes
|
|
||||||
* Remove unwanted error logs
|
|
||||||
* Fix attendance module employee permission issue
|
|
||||||
* Resolve warnings
|
|
||||||
* Remove add new button from subordinates module
|
|
||||||
* Adding administrators' guide
|
|
||||||
|
|
||||||
Release note v5.1
|
|
||||||
-----------------
|
|
||||||
* Fixes
|
|
||||||
* Fixing for non updating null fields
|
|
||||||
* https://bitbucket.org/thilina/icehrm-opensource/commits/df57308b53484a2e43ef5c72967ed1cd0dc756cc
|
|
||||||
|
|
||||||
Release note v5.0
|
|
||||||
-----------------
|
|
||||||
* Features
|
|
||||||
* New user permission implementation
|
|
||||||
* Adding new user level - Manager
|
|
||||||
|
|
||||||
* Fixes
|
|
||||||
* Fixing remote table loading issue
|
|
||||||
|
|
||||||
Release note v4.2
|
|
||||||
-----------------
|
|
||||||
* Fixes
|
|
||||||
* https://bitbucket.org/thilina/icehrm-opensource/issue/23/subordinate-leaves-pagination-not-working
|
|
||||||
* https://bitbucket.org/thilina/icehrm-opensource/issue/20/error-occured-while-time-punch
|
|
||||||
|
|
||||||
|
|
||||||
Release note v4.1
|
|
||||||
-----------------
|
|
||||||
* Features
|
|
||||||
* Better email format for notifications
|
|
||||||
* Convert upload dialog to a bootstrp model
|
|
||||||
|
|
||||||
* Fixes
|
|
||||||
* Fix error sending emails with amazon SES
|
|
||||||
* Fix errors related to XAMPP and WAMPP servers
|
|
||||||
* Fix php warnings and notifications
|
|
||||||
* Fix company structure graph issues
|
|
||||||
* Allow icehrm client to work without an internet connection
|
|
||||||
* Fix installer incorrect base url issue
|
|
||||||
* Fix empty user creation issue
|
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ define('APP_DB', '_APP_DB_');
|
|||||||
define('APP_USERNAME', '_APP_USERNAME_');
|
define('APP_USERNAME', '_APP_USERNAME_');
|
||||||
define('APP_PASSWORD', '_APP_PASSWORD_');
|
define('APP_PASSWORD', '_APP_PASSWORD_');
|
||||||
define('APP_HOST', '_APP_HOST_');
|
define('APP_HOST', '_APP_HOST_');
|
||||||
define('APP_CON_STR', 'mysql://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB);
|
define('APP_CON_STR', 'mysqli://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB);
|
||||||
|
|
||||||
//file upload
|
//file upload
|
||||||
define('FILE_TYPES', 'jpg,png,jpeg');
|
define('FILE_TYPES', 'jpg,png,jpeg');
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ define('CURRENT_PATH',dirname(__FILE__));
|
|||||||
define('CLIENT_APP_PATH',realpath(dirname(__FILE__)."/..")."/");
|
define('CLIENT_APP_PATH',realpath(dirname(__FILE__)."/..")."/");
|
||||||
define('APP_PATH',realpath(dirname(__FILE__)."/../..")."/");
|
define('APP_PATH',realpath(dirname(__FILE__)."/../..")."/");
|
||||||
define('APP_NAME',"ICE Hrm");
|
define('APP_NAME',"ICE Hrm");
|
||||||
define('APP_ID',"icehrm");
|
define('APP_ID',"icehrm");
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class NotificationManager{
|
|||||||
$this->baseService = $baseService;
|
$this->baseService = $baseService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addNotification($toEmployee, $message, $action, $type, $toUserId = null, $fromSystem = false){
|
public function addNotification($toEmployee, $message, $action, $type, $toUserId = null, $fromSystem = false, $sendEmail = false){
|
||||||
|
|
||||||
$userEmp = new User();
|
$userEmp = new User();
|
||||||
|
|
||||||
@@ -63,7 +63,12 @@ class NotificationManager{
|
|||||||
$ok = $noti->Save();
|
$ok = $noti->Save();
|
||||||
if(!$ok){
|
if(!$ok){
|
||||||
error_log("Error adding notification: ".$noti->ErrorMsg());
|
error_log("Error adding notification: ".$noti->ErrorMsg());
|
||||||
}
|
}else if($sendEmail){
|
||||||
|
$emailSender = BaseService::getInstance()->getEmailSender();
|
||||||
|
if(!empty($emailSender)){
|
||||||
|
$emailSender->sendEmailFromNotification($noti);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearNotifications($userId){
|
public function clearNotifications($userId){
|
||||||
@@ -127,4 +132,4 @@ class NotificationManager{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
1
core-ext/common.cron.tasks.ext.php
Normal file
1
core-ext/common.cron.tasks.ext.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?php
|
||||||
@@ -9,13 +9,13 @@ define('HOME_LINK_ADMIN', CLIENT_BASE_URL."?g=admin&n=dashboard&m=admin_Admin");
|
|||||||
define('HOME_LINK_OTHERS', CLIENT_BASE_URL."?g=modules&n=dashboard&m=module_Personal_Information");
|
define('HOME_LINK_OTHERS', CLIENT_BASE_URL."?g=modules&n=dashboard&m=module_Personal_Information");
|
||||||
|
|
||||||
//Version
|
//Version
|
||||||
define('VERSION', '13.1.OS');
|
define('VERSION', '15.0.OS');
|
||||||
define('CACHE_VALUE', '13.1');
|
define('CACHE_VALUE', '15.0.OS');
|
||||||
define('VERSION_DATE', '09/10/2015');
|
define('VERSION_DATE', '07/02/2016');
|
||||||
|
|
||||||
if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');}
|
if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');}
|
||||||
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');}
|
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');}
|
||||||
if(!defined('APP_SEC')){define('APP_SEC','dbcs234d2saaqw');}
|
if(!defined('APP_SEC')){define('APP_SEC','dbcs234d2s111');}
|
||||||
|
|
||||||
define('UI_SHOW_SWITCH_PROFILE', true);
|
define('UI_SHOW_SWITCH_PROFILE', true);
|
||||||
define('CRON_LOG', '/var/log/nginx/icehrmcron.log');
|
define('CRON_LOG', '/var/log/nginx/icehrmcron.log');
|
||||||
@@ -1,519 +0,0 @@
|
|||||||
.redFont{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
.box_ws{
|
|
||||||
background: white;
|
|
||||||
border-left: 1px solid #DDD;
|
|
||||||
border-right: 1px solid #DDD;
|
|
||||||
border-bottom: 1px solid #DDD;
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cal_box_ws{
|
|
||||||
background: white;
|
|
||||||
border: 1px solid #DDD;
|
|
||||||
color: #555;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cal_box_ws .wd_date_full{
|
|
||||||
font-weight:bold;
|
|
||||||
font-size:10px;
|
|
||||||
float: right;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cal_box_ws .wd_date{
|
|
||||||
font-size:10px;
|
|
||||||
float: right;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-pills li a:hover{
|
|
||||||
background: #1D64AD;
|
|
||||||
color:white;
|
|
||||||
};
|
|
||||||
|
|
||||||
.navbar-inverse .brand, .navbar-inverse .nav > li > a {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.categoryWrap p{
|
|
||||||
font-size:16px;
|
|
||||||
font-weight:bold;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.categoryWrap p:hover{
|
|
||||||
font-size:16px;
|
|
||||||
font-weight:bold;
|
|
||||||
color:white;
|
|
||||||
background: gray;
|
|
||||||
padding: 3px;
|
|
||||||
cursor:pointer;
|
|
||||||
border-radius: 4px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.resultLogo{
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pbar{
|
|
||||||
font-weight:bold;
|
|
||||||
font-size:11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pbar .progress{
|
|
||||||
height: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bs-docs-sidenav {
|
|
||||||
width: 228px;
|
|
||||||
margin: 30px 0 0;
|
|
||||||
padding: 0;
|
|
||||||
background-color: #fff;
|
|
||||||
-webkit-border-radius: 6px;
|
|
||||||
-moz-border-radius: 6px;
|
|
||||||
border-radius: 6px;
|
|
||||||
-webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065);
|
|
||||||
-moz-box-shadow: 0 1px 4px rgba(0,0,0,.065);
|
|
||||||
box-shadow: 0 1px 4px rgba(0,0,0,.065);
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav > li > a {
|
|
||||||
display: block;
|
|
||||||
*width: 190px;
|
|
||||||
margin: 0 0 -1px;
|
|
||||||
padding: 8px 14px;
|
|
||||||
border: 1px solid #e5e5e5;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav > li:first-child > a {
|
|
||||||
-webkit-border-radius: 6px 6px 0 0;
|
|
||||||
-moz-border-radius: 6px 6px 0 0;
|
|
||||||
border-radius: 6px 6px 0 0;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav > li:last-child > a {
|
|
||||||
-webkit-border-radius: 0 0 6px 6px;
|
|
||||||
-moz-border-radius: 0 0 6px 6px;
|
|
||||||
border-radius: 0 0 6px 6px;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav > .active > a {
|
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
padding: 9px 15px;
|
|
||||||
border: 0;
|
|
||||||
text-shadow: 0 1px 0 rgba(0,0,0,.15);
|
|
||||||
-webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);
|
|
||||||
-moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);
|
|
||||||
box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);
|
|
||||||
}
|
|
||||||
/* Chevrons */
|
|
||||||
.bs-docs-sidenav .icon-chevron-right {
|
|
||||||
float: right;
|
|
||||||
margin-top: 2px;
|
|
||||||
margin-right: -6px;
|
|
||||||
opacity: .25;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav > li > a:hover {
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav a:hover .icon-chevron-right {
|
|
||||||
opacity: .5;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav .active .icon-chevron-right,
|
|
||||||
.bs-docs-sidenav .active a:hover .icon-chevron-right {
|
|
||||||
background-image: url(../img/glyphicons-halflings-white.png);
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav.affix {
|
|
||||||
top: 40px;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav.affix-bottom {
|
|
||||||
position: absolute;
|
|
||||||
top: auto;
|
|
||||||
bottom: 270px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Responsive
|
|
||||||
-------------------------------------------------- */
|
|
||||||
|
|
||||||
/* Desktop large
|
|
||||||
------------------------- */
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
.bs-docs-container {
|
|
||||||
max-width: 970px;
|
|
||||||
}
|
|
||||||
.bs-docs-sidenav {
|
|
||||||
width: 258px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reviewPoints{
|
|
||||||
margin-top:10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reviewPoints .star{
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reviewBlock {
|
|
||||||
position: relative;
|
|
||||||
margin: 0px 0;
|
|
||||||
padding: 39px 19px 14px;
|
|
||||||
background-color: white;
|
|
||||||
border: 1px solid #DDD;
|
|
||||||
/*
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
*/
|
|
||||||
font-size:12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*.reviewBlock::after {
|
|
||||||
content: attr(data-content);
|
|
||||||
position: absolute;
|
|
||||||
top: -1px;
|
|
||||||
left: -1px;
|
|
||||||
padding: 3px 7px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
background-color: whiteSmoke;
|
|
||||||
border: 1px solid #DDD;
|
|
||||||
color: #9DA0A4;
|
|
||||||
-webkit-border-radius: 4px 0 4px 0;
|
|
||||||
-moz-border-radius: 4px 0 4px 0;
|
|
||||||
border-radius: 4px 0 4px 0;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
.box_ws{
|
|
||||||
background: white;
|
|
||||||
border-left: 1px solid #DDD;
|
|
||||||
border-right: 1px solid #DDD;
|
|
||||||
border-bottom: 1px solid #DDD;
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cal_box_ws{
|
|
||||||
background: white;
|
|
||||||
border: 1px solid #DDD;
|
|
||||||
color: #555;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cal_box_ws .wd_date_full{
|
|
||||||
font-weight:bold;
|
|
||||||
font-size:10px;
|
|
||||||
float: right;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cal_box_ws .wd_date{
|
|
||||||
font-size:10px;
|
|
||||||
float: right;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-pills li a:hover{
|
|
||||||
background: #1D64AD;
|
|
||||||
color:white;
|
|
||||||
};
|
|
||||||
|
|
||||||
.nav-tabs > li > a {
|
|
||||||
color:white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tabs > li > a:hover{
|
|
||||||
color:#555;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.topheader {
|
|
||||||
background: -moz-linear-gradient(#829AA8, #405A6A);
|
|
||||||
background: -webkit-linear-gradient(#829AA8, #405A6A);
|
|
||||||
background: linear-gradient(#829AA8, #405A6A);
|
|
||||||
border: 1px solid #677C89;
|
|
||||||
border-bottom-color: #6B808D;
|
|
||||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4),0 0px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.bgbody{
|
|
||||||
background: #FAFAFA;
|
|
||||||
background: -moz-linear-gradient(#FAFAFA, #EAEAEA);
|
|
||||||
background: -webkit-linear-gradient(#FAFAFA, #EAEAEA);
|
|
||||||
background: linear-gradient(#FAFAFA, #EAEAEA);
|
|
||||||
border-bottom: 1px solid #CACACA;
|
|
||||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4),0 0px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leftMenu{
|
|
||||||
background-color: #E9F1F4;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px 1px 2px;
|
|
||||||
border-color: #E9F1F4 #D8DEE2 #D8DEE2;
|
|
||||||
border-radius: 0 0 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav > li > a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: whitesmoke;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
.nav-list > .active > a, .nav-list > .active > a:hover{
|
|
||||||
color: white;
|
|
||||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
|
||||||
background-color: #405A6A;
|
|
||||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4),0 0px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #405A6A;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-header {
|
|
||||||
display: block;
|
|
||||||
padding: 3px 15px;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 20px;
|
|
||||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
|
||||||
text-transform: none;
|
|
||||||
background: -moz-linear-gradient(#829AA8, #405A6A);
|
|
||||||
background: -webkit-linear-gradient(#829AA8, #405A6A);
|
|
||||||
background: linear-gradient(#829AA8, #405A6A);
|
|
||||||
color: white;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-backdrop,
|
|
||||||
.modal-backdrop.fade.in {
|
|
||||||
opacity: 0.4;
|
|
||||||
filter: alpha(opacity=40);
|
|
||||||
}
|
|
||||||
|
|
||||||
.error{
|
|
||||||
color:red;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnMain{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.borderBox{
|
|
||||||
padding-bottom: 10px;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-top: 10px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
-moz-box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
-webkit-box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
border: 1px solid #EEE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.iceicon_edit{
|
|
||||||
background-image: url("../images/edit.png");
|
|
||||||
}
|
|
||||||
|
|
||||||
.iceicon_delete{
|
|
||||||
background-image: url("../images/delete.png");
|
|
||||||
}
|
|
||||||
|
|
||||||
.iceicon_user{
|
|
||||||
background-image: url("../images/user.png");
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-menu{
|
|
||||||
z-index: 10000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightface .lightfaceContent .lightfaceTitle {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #fff;
|
|
||||||
background-color: #405A6A;
|
|
||||||
border: 1px solid #405A6A;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: -1px;
|
|
||||||
margin-bottom: 0;
|
|
||||||
padding: 5px 10px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label-ice, .badge-ice{
|
|
||||||
background-color: #405A6A;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataTables_processing{
|
|
||||||
position: absolute;
|
|
||||||
margin-left: 40px;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 13px;
|
|
||||||
color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*changes to full caledar*/
|
|
||||||
.fc-header-title h2 {
|
|
||||||
margin-top: 0;
|
|
||||||
white-space: nowrap;
|
|
||||||
font-size: 20px;
|
|
||||||
margin-left: 10px;
|
|
||||||
color:#405A6A;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.dataTable{
|
|
||||||
font-size: 1.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-horizontal{
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-horizontal .row{
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table.dataTable {width:100% !important;}
|
|
||||||
|
|
||||||
.iceLabel{
|
|
||||||
font-size: 12px !important;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #3c8dbc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tabs>li>a{
|
|
||||||
border-radius:0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav > li > a:hover {
|
|
||||||
border-radius:0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
-webkit-border-radius: 0px;
|
|
||||||
-moz-border-radius: 0px;
|
|
||||||
border-radius: 0px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* select2 style overide */
|
|
||||||
.select2-choice{
|
|
||||||
border: none !important;
|
|
||||||
width: 100% !important;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
background-color: #FFF !important;
|
|
||||||
background-image: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.select2-container{
|
|
||||||
padding:3px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select2-container-multi{
|
|
||||||
padding:0px !important;
|
|
||||||
border:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select2-arrow{
|
|
||||||
background-image: none !important;
|
|
||||||
background: #FFF !important;
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select2-drop-active {
|
|
||||||
/*border: 1px solid black !important;*/
|
|
||||||
border-top: none !important;
|
|
||||||
background: #f0f0f0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logTime{
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 13px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popupForm{
|
|
||||||
border: none !important;
|
|
||||||
padding: 0px 19px 14px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
background: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-panel > .info > p {
|
|
||||||
margin-bottom: 9px;
|
|
||||||
max-width: 135px;
|
|
||||||
line-height: 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-group-item-text{
|
|
||||||
margin-bottom:5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-group-item{
|
|
||||||
padding-bottom:30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/custom for v11.0 */
|
|
||||||
|
|
||||||
|
|
||||||
.table-bordered>thead>tr>th{
|
|
||||||
border:none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-bordered>thead>tr>th, .table-bordered>thead>tr>td {
|
|
||||||
border-bottom-width: 2px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table{
|
|
||||||
-webkit-transition: margin-left .15s linear;
|
|
||||||
transition: margin-left .15s linear;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
background-color: #fff;
|
|
||||||
-webkit-box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
|
|
||||||
box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.reviewBlock{
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
box-sizing: border-box
|
|
||||||
}
|
|
||||||
|
|
||||||
.treeview-menu li:hover{
|
|
||||||
font-weight:bold;
|
|
||||||
}
|
|
||||||
145
core-ext/db_upgrade/upgrade_v13.3.OS_to_v14.0.OS.sql
Normal file
145
core-ext/db_upgrade/upgrade_v13.3.OS_to_v14.0.OS.sql
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
ALTER TABLE EmployeeTravelRecords ADD COLUMN `funding` decimal(10,3) NULL AFTER `details`;
|
||||||
|
ALTER TABLE EmployeeTravelRecords ADD COLUMN `currency` bigint(20) NULL AFTER `funding`;
|
||||||
|
ALTER TABLE EmployeeTravelRecords ADD COLUMN `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending';
|
||||||
|
|
||||||
|
|
||||||
|
REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||||
|
('Travel Request Report', 'This report list employees travel requests for a specified period',
|
||||||
|
'[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","type":"select","source":[["NULL","All Statuses"],["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"],["Cancellation Requested","Cancellation Requested"],["Cancelled","Cancelled"]]}]\r\n]',
|
||||||
|
'TravelRequestReport',
|
||||||
|
'["employee","date_start","date_end","status"]', 'Class');
|
||||||
|
|
||||||
|
REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Travel: Pre-Approve Travel Request', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
|
||||||
|
|
||||||
|
REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Attendance: Use Department Time Zone', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
|
||||||
|
|
||||||
|
UPDATE `Settings` set value = '1' where name = 'System: Reset Modules and Permissions';
|
||||||
|
|
||||||
|
ALTER TABLE `CompanyStructures` ADD COLUMN `timezone` varchar(100) not null default 'Europe/London';
|
||||||
|
|
||||||
|
create table `Timezones` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) not null default '',
|
||||||
|
`details` varchar(255) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `Timezones`(`id`, `name`, `details`) VALUES
|
||||||
|
(1, 'Pacific/Midway', '(GMT-11:00) Midway Island'),
|
||||||
|
(2, 'US/Samoa', '(GMT-11:00) Samoa'),
|
||||||
|
(3, 'US/Hawaii', '(GMT-10:00) Hawaii'),
|
||||||
|
(4, 'US/Alaska', '(GMT-09:00) Alaska'),
|
||||||
|
(5, 'US/Pacific', '(GMT-08:00) Pacific Time (US & Canada)'),
|
||||||
|
(6, 'America/Tijuana', '(GMT-08:00) Tijuana'),
|
||||||
|
(7, 'US/Arizona', '(GMT-07:00) Arizona'),
|
||||||
|
(8, 'US/Mountain', '(GMT-07:00) Mountain Time (US & Canada)'),
|
||||||
|
(9, 'America/Chihuahua', '(GMT-07:00) Chihuahua'),
|
||||||
|
(10, 'America/Mazatlan', '(GMT-07:00) Mazatlan'),
|
||||||
|
(11, 'America/Mexico_City', '(GMT-06:00) Mexico City'),
|
||||||
|
(12, 'America/Monterrey', '(GMT-06:00) Monterrey'),
|
||||||
|
(13, 'Canada/Saskatchewan', '(GMT-06:00) Saskatchewan'),
|
||||||
|
(14, 'US/Central', '(GMT-06:00) Central Time (US & Canada)'),
|
||||||
|
(15, 'US/Eastern', '(GMT-05:00) Eastern Time (US & Canada)'),
|
||||||
|
(16, 'US/East-Indiana', '(GMT-05:00) Indiana (East)'),
|
||||||
|
(17, 'America/Bogota', '(GMT-05:00) Bogota'),
|
||||||
|
(18, 'America/Lima', '(GMT-05:00) Lima'),
|
||||||
|
(19, 'America/Caracas', '(GMT-04:30) Caracas'),
|
||||||
|
(20, 'Canada/Atlantic', '(GMT-04:00) Atlantic Time (Canada)'),
|
||||||
|
(21, 'America/La_Paz', '(GMT-04:00) La Paz'),
|
||||||
|
(22, 'America/Santiago', '(GMT-04:00) Santiago'),
|
||||||
|
(23, 'Canada/Newfoundland', '(GMT-03:30) Newfoundland'),
|
||||||
|
(24, 'America/Buenos_Aires', '(GMT-03:00) Buenos Aires'),
|
||||||
|
(25, 'Greenland', '(GMT-03:00) Greenland'),
|
||||||
|
(26, 'Atlantic/Stanley', '(GMT-02:00) Stanley'),
|
||||||
|
(27, 'Atlantic/Azores', '(GMT-01:00) Azores'),
|
||||||
|
(28, 'Atlantic/Cape_Verde', '(GMT-01:00) Cape Verde Is.'),
|
||||||
|
(29, 'Africa/Casablanca', '(GMT) Casablanca'),
|
||||||
|
(30, 'Europe/Dublin', '(GMT) Dublin'),
|
||||||
|
(31, 'Europe/Lisbon', '(GMT) Lisbon'),
|
||||||
|
(32, 'Europe/London', '(GMT) London'),
|
||||||
|
(33, 'Africa/Monrovia', '(GMT) Monrovia'),
|
||||||
|
(34, 'Europe/Amsterdam', '(GMT+01:00) Amsterdam'),
|
||||||
|
(35, 'Europe/Belgrade', '(GMT+01:00) Belgrade'),
|
||||||
|
(36, 'Europe/Berlin', '(GMT+01:00) Berlin'),
|
||||||
|
(37, 'Europe/Bratislava', '(GMT+01:00) Bratislava'),
|
||||||
|
(38, 'Europe/Brussels', '(GMT+01:00) Brussels'),
|
||||||
|
(39, 'Europe/Budapest', '(GMT+01:00) Budapest'),
|
||||||
|
(40, 'Europe/Copenhagen', '(GMT+01:00) Copenhagen'),
|
||||||
|
(41, 'Europe/Ljubljana', '(GMT+01:00) Ljubljana'),
|
||||||
|
(42, 'Europe/Madrid', '(GMT+01:00) Madrid'),
|
||||||
|
(43, 'Europe/Paris', '(GMT+01:00) Paris'),
|
||||||
|
(44, 'Europe/Prague', '(GMT+01:00) Prague'),
|
||||||
|
(45, 'Europe/Rome', '(GMT+01:00) Rome'),
|
||||||
|
(46, 'Europe/Sarajevo', '(GMT+01:00) Sarajevo'),
|
||||||
|
(47, 'Europe/Skopje', '(GMT+01:00) Skopje'),
|
||||||
|
(48, 'Europe/Stockholm', '(GMT+01:00) Stockholm'),
|
||||||
|
(49, 'Europe/Vienna', '(GMT+01:00) Vienna'),
|
||||||
|
(50, 'Europe/Warsaw', '(GMT+01:00) Warsaw'),
|
||||||
|
(51, 'Europe/Zagreb', '(GMT+01:00) Zagreb'),
|
||||||
|
(52, 'Europe/Athens', '(GMT+02:00) Athens'),
|
||||||
|
(53, 'Europe/Bucharest', '(GMT+02:00) Bucharest'),
|
||||||
|
(54, 'Africa/Cairo', '(GMT+02:00) Cairo'),
|
||||||
|
(55, 'Africa/Harare', '(GMT+02:00) Harare'),
|
||||||
|
(56, 'Europe/Helsinki', '(GMT+02:00) Helsinki'),
|
||||||
|
(57, 'Europe/Istanbul', '(GMT+02:00) Istanbul'),
|
||||||
|
(58, 'Asia/Jerusalem', '(GMT+02:00) Jerusalem'),
|
||||||
|
(59, 'Europe/Kiev', '(GMT+02:00) Kyiv'),
|
||||||
|
(60, 'Europe/Minsk', '(GMT+02:00) Minsk'),
|
||||||
|
(61, 'Europe/Riga', '(GMT+02:00) Riga'),
|
||||||
|
(62, 'Europe/Sofia', '(GMT+02:00) Sofia'),
|
||||||
|
(63, 'Europe/Tallinn', '(GMT+02:00) Tallinn'),
|
||||||
|
(64, 'Europe/Vilnius', '(GMT+02:00) Vilnius'),
|
||||||
|
(65, 'Asia/Baghdad', '(GMT+03:00) Baghdad'),
|
||||||
|
(66, 'Asia/Kuwait', '(GMT+03:00) Kuwait'),
|
||||||
|
(67, 'Africa/Nairobi', '(GMT+03:00) Nairobi'),
|
||||||
|
(68, 'Asia/Riyadh', '(GMT+03:00) Riyadh'),
|
||||||
|
(69, 'Europe/Moscow', '(GMT+03:00) Moscow'),
|
||||||
|
(70, 'Asia/Tehran', '(GMT+03:30) Tehran'),
|
||||||
|
(71, 'Asia/Baku', '(GMT+04:00) Baku'),
|
||||||
|
(72, 'Europe/Volgograd', '(GMT+04:00) Volgograd'),
|
||||||
|
(73, 'Asia/Muscat', '(GMT+04:00) Muscat'),
|
||||||
|
(74, 'Asia/Tbilisi', '(GMT+04:00) Tbilisi'),
|
||||||
|
(75, 'Asia/Yerevan', '(GMT+04:00) Yerevan'),
|
||||||
|
(76, 'Asia/Kabul', '(GMT+04:30) Kabul'),
|
||||||
|
(77, 'Asia/Karachi', '(GMT+05:00) Karachi'),
|
||||||
|
(78, 'Asia/Tashkent', '(GMT+05:00) Tashkent'),
|
||||||
|
(79, 'Asia/Kolkata', '(GMT+05:30) Kolkata'),
|
||||||
|
(80, 'Asia/Kathmandu', '(GMT+05:45) Kathmandu'),
|
||||||
|
(81, 'Asia/Yekaterinburg', '(GMT+06:00) Ekaterinburg'),
|
||||||
|
(82, 'Asia/Almaty', '(GMT+06:00) Almaty'),
|
||||||
|
(83, 'Asia/Dhaka', '(GMT+06:00) Dhaka'),
|
||||||
|
(84, 'Asia/Novosibirsk', '(GMT+07:00) Novosibirsk'),
|
||||||
|
(85, 'Asia/Bangkok', '(GMT+07:00) Bangkok'),
|
||||||
|
(86, 'Asia/Jakarta', '(GMT+07:00) Jakarta'),
|
||||||
|
(87, 'Asia/Krasnoyarsk', '(GMT+08:00) Krasnoyarsk'),
|
||||||
|
(88, 'Asia/Chongqing', '(GMT+08:00) Chongqing'),
|
||||||
|
(89, 'Asia/Hong_Kong', '(GMT+08:00) Hong Kong'),
|
||||||
|
(90, 'Asia/Kuala_Lumpur', '(GMT+08:00) Kuala Lumpur'),
|
||||||
|
(91, 'Australia/Perth', '(GMT+08:00) Perth'),
|
||||||
|
(92, 'Asia/Singapore', '(GMT+08:00) Singapore'),
|
||||||
|
(93, 'Asia/Taipei', '(GMT+08:00) Taipei'),
|
||||||
|
(94, 'Asia/Ulaanbaatar', '(GMT+08:00) Ulaan Bataar'),
|
||||||
|
(95, 'Asia/Urumqi', '(GMT+08:00) Urumqi'),
|
||||||
|
(96, 'Asia/Irkutsk', '(GMT+09:00) Irkutsk'),
|
||||||
|
(97, 'Asia/Seoul', '(GMT+09:00) Seoul'),
|
||||||
|
(98, 'Asia/Tokyo', '(GMT+09:00) Tokyo'),
|
||||||
|
(99, 'Australia/Adelaide', '(GMT+09:30) Adelaide'),
|
||||||
|
(100, 'Australia/Darwin', '(GMT+09:30) Darwin'),
|
||||||
|
(101, 'Asia/Yakutsk', '(GMT+10:00) Yakutsk'),
|
||||||
|
(102, 'Australia/Brisbane', '(GMT+10:00) Brisbane'),
|
||||||
|
(103, 'Australia/Canberra', '(GMT+10:00) Canberra'),
|
||||||
|
(104, 'Pacific/Guam', '(GMT+10:00) Guam'),
|
||||||
|
(105, 'Australia/Hobart', '(GMT+10:00) Hobart'),
|
||||||
|
(106, 'Australia/Melbourne', '(GMT+10:00) Melbourne'),
|
||||||
|
(107, 'Pacific/Port_Moresby', '(GMT+10:00) Port Moresby'),
|
||||||
|
(108, 'Australia/Sydney', '(GMT+10:00) Sydney'),
|
||||||
|
(109, 'Asia/Vladivostok', '(GMT+11:00) Vladivostok'),
|
||||||
|
(110, 'Asia/Magadan', '(GMT+12:00) Magadan'),
|
||||||
|
(111, 'Pacific/Auckland', '(GMT+12:00) Auckland'),
|
||||||
|
(112, 'Pacific/Fiji', '(GMT+12:00) Fiji');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
586
core-ext/db_upgrade/upgrade_v14.0.OS_to_v15.0.OS.sql
Normal file
586
core-ext/db_upgrade/upgrade_v14.0.OS_to_v15.0.OS.sql
Normal file
@@ -0,0 +1,586 @@
|
|||||||
|
ALTER table `Reports` ADD COLUMN `report_group` varchar(500) NULL;
|
||||||
|
|
||||||
|
ALTER table `Employees` ADD COLUMN `indirect_supervisors` VARCHAR(250) default null after `supervisor`;
|
||||||
|
|
||||||
|
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Leave: Allow Indirect Admins to Approve', '0', 'Allow indirect admins to approve leave requests','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
|
||||||
|
|
||||||
|
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('System: Default Country', '0', 'Set the default Country','[ "value", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}]');
|
||||||
|
|
||||||
|
UPDATE Reports set report_group = 'Employee Information' where name = 'Employee Details Report';
|
||||||
|
UPDATE Reports set report_group = 'Leave Management' where name = 'Employee Leaves Report';
|
||||||
|
UPDATE Reports set report_group = 'Time Management' where name = 'Employee Time Entry Report';
|
||||||
|
UPDATE Reports set report_group = 'Time Management' where name = 'Employee Attendance Report';
|
||||||
|
UPDATE Reports set report_group = 'Time Management' where name = 'Employee Time Tracking Report';
|
||||||
|
UPDATE Reports set report_group = 'Employee Information' where name = 'Active Employee Report';
|
||||||
|
UPDATE Reports set report_group = 'Employee Information' where name = 'New Hires Employee Report';
|
||||||
|
UPDATE Reports set report_group = 'Employee Information' where name = 'Terminated Employee Report';
|
||||||
|
UPDATE Reports set report_group = 'Leave Management' where name = 'Employee Leave Entitlement';
|
||||||
|
UPDATE Reports set report_group = 'Travel and Expense Management' where name = 'Travel Request Report';
|
||||||
|
UPDATE Reports set report_group = 'Travel and Expense Management' where name = 'Expense Report';
|
||||||
|
|
||||||
|
INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`) VALUES
|
||||||
|
('Employee Time Sheet Report', 'This report list all employee time sheets by employee and date range', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","allow-null":true,"null-label":"All Status","type":"select","source":[["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"]]}]\r\n]', 'EmployeeTimeSheetData', '["employee","date_start","date_end","status"]', 'Class','Time Management');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Files: Upload Files to S3', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
||||||
|
('Files: Amazon S3 Key for File Upload', '', 'Please provide S3 Key for uploading files',''),
|
||||||
|
('Files: Amazone S3 Secret for File Upload', '', 'Please provide S3 Secret for uploading files',''),
|
||||||
|
('Files: S3 Bucket', '', 'Please provide S3 Bucket name for uploading files',''),
|
||||||
|
('Files: S3 Web Url', '', 'Please provide Url to the s3 bucket','');
|
||||||
|
|
||||||
|
|
||||||
|
create table `Crons` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`class` varchar(100) NOT NULL,
|
||||||
|
`lastrun` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`frequency` int(4) NOT NULL,
|
||||||
|
`time` varchar(50) NOT NULL,
|
||||||
|
`type` enum('Minutely','Hourly','Daily','Weekly','Monthly','Yearly') default 'Hourly',
|
||||||
|
`status` enum('Enabled','Disabled') default 'Enabled',
|
||||||
|
primary key (`id`),
|
||||||
|
key `KEY_Crons_frequency` (`frequency`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `Crons` (`name`,`class`, `lastrun`, `frequency`, `time`, `type`, `status`) VALUES
|
||||||
|
('Email Sender Task', 'EmailSenderTask', NULL, 1, 1, 'Minutely', 'Enabled'),
|
||||||
|
('Document Expire Alert', 'DocumentExpiryNotificationTask', NULL, 1, 1, 'Minutely', 'Enabled');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create table `LeaveTypes` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`supervisor_leave_assign` enum('Yes','No') default 'Yes',
|
||||||
|
`employee_can_apply` enum('Yes','No') default 'Yes',
|
||||||
|
`apply_beyond_current` enum('Yes','No') default 'Yes',
|
||||||
|
`leave_accrue` enum('No','Yes') default 'No',
|
||||||
|
`carried_forward` enum('No','Yes') default 'No',
|
||||||
|
`default_per_year` decimal(10,3) NOT NULL,
|
||||||
|
`carried_forward_percentage` int(11) NULL default 0,
|
||||||
|
`carried_forward_leave_availability` int(11) NULL default 365,
|
||||||
|
`propotionate_on_joined_date` enum('No','Yes') default 'No',
|
||||||
|
`send_notification_emails` enum('Yes','No') default 'Yes',
|
||||||
|
`leave_group` bigint(20) NULL,
|
||||||
|
`leave_color` varchar(10) NULL,
|
||||||
|
`max_carried_forward_amount` int(11) NULL default 0,
|
||||||
|
primary key (`id`),
|
||||||
|
unique key (`name`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `LeaveRules` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`leave_type` bigint(20) NOT NULL,
|
||||||
|
`job_title` bigint(20) NULL,
|
||||||
|
`employment_status` bigint(20) NULL,
|
||||||
|
`employee` bigint(20) NULL,
|
||||||
|
`supervisor_leave_assign` enum('Yes','No') default 'Yes',
|
||||||
|
`employee_can_apply` enum('Yes','No') default 'Yes',
|
||||||
|
`apply_beyond_current` enum('Yes','No') default 'Yes',
|
||||||
|
`leave_accrue` enum('No','Yes') default 'No',
|
||||||
|
`carried_forward` enum('No','Yes') default 'No',
|
||||||
|
`default_per_year` decimal(10,3) NOT NULL,
|
||||||
|
`carried_forward_percentage` int(11) NULL default 0,
|
||||||
|
`carried_forward_leave_availability` int(11) NULL default 365,
|
||||||
|
`propotionate_on_joined_date` enum('No','Yes') default 'No',
|
||||||
|
`leave_group` bigint(20) NULL,
|
||||||
|
`max_carried_forward_amount` int(11) NULL default 0,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `LeaveGroups` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`details` text default null,
|
||||||
|
`created` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`updated` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `LeaveGroupEmployees` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`employee` bigint(20) NOT NULL,
|
||||||
|
`leave_group` bigint(20) NOT NULL,
|
||||||
|
`created` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`updated` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
CONSTRAINT `Fk_LeaveGroupEmployees_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_LeaveGroupEmployees_LeaveGroups` FOREIGN KEY (`leave_group`) REFERENCES `LeaveGroups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
primary key (`id`),
|
||||||
|
unique key `LeaveGroupEmployees_employee` (`employee`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `LeavePeriods` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`date_start` date default '0000-00-00',
|
||||||
|
`date_end` date default '0000-00-00',
|
||||||
|
`status` enum('Active','Inactive') default 'Inactive',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `WorkDays` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`status` enum('Full Day','Half Day','Non-working Day') default 'Full Day',
|
||||||
|
`country` bigint(20) DEFAULT NULL,
|
||||||
|
primary key (`id`),
|
||||||
|
unique key `workdays_name_country` (`name`,`country`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `HoliDays` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`dateh` date default '0000-00-00',
|
||||||
|
`status` enum('Full Day','Half Day') default 'Full Day',
|
||||||
|
`country` bigint(20) DEFAULT NULL,
|
||||||
|
primary key (`id`),
|
||||||
|
unique key `holidays_dateh_country` (`dateh`,`country`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `EmployeeLeaves` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`employee` bigint(20) NOT NULL,
|
||||||
|
`leave_type` bigint(20) NOT NULL,
|
||||||
|
`leave_period` bigint(20) NOT NULL,
|
||||||
|
`date_start` date default '0000-00-00',
|
||||||
|
`date_end` date default '0000-00-00',
|
||||||
|
`details` text default null,
|
||||||
|
`status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending',
|
||||||
|
`attachment` varchar(100) NULL,
|
||||||
|
CONSTRAINT `Fk_EmployeeLeaves_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_EmployeeLeaves_LeaveTypes` FOREIGN KEY (`leave_type`) REFERENCES `LeaveTypes` (`id`),
|
||||||
|
CONSTRAINT `Fk_EmployeeLeaves_LeavePeriods` FOREIGN KEY (`leave_period`) REFERENCES `LeavePeriods` (`id`),
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `EmployeeLeaveLog` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`employee_leave` bigint(20) NOT NULL,
|
||||||
|
`user_id` bigint(20) NULL,
|
||||||
|
`data` varchar(500) NOT NULL,
|
||||||
|
`status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending',
|
||||||
|
`status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending',
|
||||||
|
`created` timestamp default '0000-00-00 00:00:00',
|
||||||
|
CONSTRAINT `Fk_EmployeeLeaveLog_EmployeeLeaves` FOREIGN KEY (`employee_leave`) REFERENCES `EmployeeLeaves` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_EmployeeLeaveLog_Users` FOREIGN KEY (`user_id`) REFERENCES `Users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `EmployeeLeaveDays` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`employee_leave` bigint(20) NOT NULL,
|
||||||
|
`leave_date` date default '0000-00-00',
|
||||||
|
`leave_type` enum('Full Day','Half Day - Morning','Half Day - Afternoon','1 Hour - Morning','2 Hours - Morning','3 Hours - Morning','1 Hour - Afternoon','2 Hours - Afternoon','3 Hours - Afternoon') NOT NULL,
|
||||||
|
CONSTRAINT `Fk_EmployeeLeaveDays_EmployeeLeaves` FOREIGN KEY (`employee_leave`) REFERENCES `EmployeeLeaves` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create table `Documents` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`details` text default null,
|
||||||
|
`expire_notification` enum('Yes','No') default 'Yes',
|
||||||
|
`expire_notification_month` enum('Yes','No') default 'Yes',
|
||||||
|
`expire_notification_week` enum('Yes','No') default 'Yes',
|
||||||
|
`expire_notification_day` enum('Yes','No') default 'Yes',
|
||||||
|
`sign` enum('Yes','No') default 'Yes',
|
||||||
|
`sign_label` VARCHAR(500) default null,
|
||||||
|
`created` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`updated` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `EmployeeDocuments` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`employee` bigint(20) NOT NULL,
|
||||||
|
`document` bigint(20) NULL,
|
||||||
|
`date_added` date NOT NULL,
|
||||||
|
`valid_until` date NOT NULL,
|
||||||
|
`status` enum('Active','Inactive','Draft') default 'Active',
|
||||||
|
`details` text default null,
|
||||||
|
`attachment` varchar(100) NULL,
|
||||||
|
`signature` text default null,
|
||||||
|
`expire_notification_last` int(4) NULL,
|
||||||
|
CONSTRAINT `Fk_EmployeeDocuments_Documents` FOREIGN KEY (`document`) REFERENCES `Documents` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_EmployeeDocuments_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
primary key (`id`),
|
||||||
|
KEY `KEY_EmployeeDocuments_valid_until` (`valid_until`),
|
||||||
|
KEY `KEY_EmployeeDocuments_valid_until_status` (`valid_until`,`status`,`expire_notification_last`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `CompanyDocuments` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`details` text default null,
|
||||||
|
`valid_until` date NOT NULL,
|
||||||
|
`status` enum('Active','Inactive','Draft') default 'Active',
|
||||||
|
`notify_employees` enum('Yes','No') default 'Yes',
|
||||||
|
`attachment` varchar(100) NULL,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `Courses` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` varchar(300) NOT NULL,
|
||||||
|
`name` varchar(300) NOT NULL,
|
||||||
|
`description` text default null,
|
||||||
|
`coordinator` bigint(20) NULL,
|
||||||
|
`trainer` varchar(300) NULL,
|
||||||
|
`trainer_info` text default null,
|
||||||
|
`paymentType` enum('Company Sponsored','Paid by Employee') default 'Company Sponsored',
|
||||||
|
`currency` varchar(3) null,
|
||||||
|
`cost` decimal(12,2) DEFAULT 0.00,
|
||||||
|
`status` enum('Active','Inactive') default 'Active',
|
||||||
|
`created` datetime default '0000-00-00 00:00:00',
|
||||||
|
`updated` datetime default '0000-00-00 00:00:00',
|
||||||
|
CONSTRAINT `Fk_Courses_Employees` FOREIGN KEY (`coordinator`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `TrainingSessions` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(300) NOT NULL,
|
||||||
|
`course` bigint(20) NOT NULL,
|
||||||
|
`description` text default null,
|
||||||
|
`scheduled` datetime default '0000-00-00 00:00:00',
|
||||||
|
`dueDate` datetime default '0000-00-00 00:00:00',
|
||||||
|
`deliveryMethod` enum('Classroom','Self Study','Online') default 'Classroom',
|
||||||
|
`deliveryLocation` varchar(500) NULL,
|
||||||
|
`status` enum('Pending','Approved','Completed','Cancelled') default 'Pending',
|
||||||
|
`attendanceType` enum('Sign Up','Assign') default 'Sign Up',
|
||||||
|
`attachment` varchar(300) NULL,
|
||||||
|
`created` datetime default '0000-00-00 00:00:00',
|
||||||
|
`updated` datetime default '0000-00-00 00:00:00',
|
||||||
|
`requireProof` enum('Yes','No') default 'Yes',
|
||||||
|
CONSTRAINT `Fk_TrainingSessions_Courses` FOREIGN KEY (`course`) REFERENCES `Courses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `EmployeeTrainingSessions` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`employee` bigint(20) NOT NULL,
|
||||||
|
`trainingSession` bigint(20) NULL,
|
||||||
|
`feedBack` varchar(1500) NULL,
|
||||||
|
`status` enum('Scheduled','Attended','Not-Attended','Completed') default 'Scheduled',
|
||||||
|
`proof` varchar(300) NULL,
|
||||||
|
CONSTRAINT `Fk_EmployeeTrainingSessions_TrainingSessions` FOREIGN KEY (`trainingSession`) REFERENCES `TrainingSessions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_EmployeeTrainingSessions_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create table `EmployementType` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `Industry` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `ExperienceLevel` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `JobFunction` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `EducationLevel` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `Benifits` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `Tags` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `Job` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`title` varchar(200) NOT NULL,
|
||||||
|
`shortDescription` text DEFAULT NULL,
|
||||||
|
`description` text DEFAULT NULL,
|
||||||
|
`requirements` text DEFAULT NULL,
|
||||||
|
`benefits` text DEFAULT NULL,
|
||||||
|
`country` bigint(20) DEFAULT NULL,
|
||||||
|
`company` bigint(20) DEFAULT NULL,
|
||||||
|
`department` VARCHAR(100) NULL,
|
||||||
|
`code` VARCHAR(20) NULL,
|
||||||
|
`employementType` bigint(20) DEFAULT NULL,
|
||||||
|
`industry` bigint(20) DEFAULT NULL,
|
||||||
|
`experienceLevel` bigint(20) DEFAULT NULL,
|
||||||
|
`jobFunction` bigint(20) DEFAULT NULL,
|
||||||
|
`educationLevel` bigint(20) DEFAULT NULL,
|
||||||
|
`currency` bigint(20) DEFAULT NULL,
|
||||||
|
`showSalary` enum('Yes','No') default NULL,
|
||||||
|
`salaryMin` bigint(20) DEFAULT NULL,
|
||||||
|
`salaryMax` bigint(20) DEFAULT NULL,
|
||||||
|
`keywords` text DEFAULT NULL,
|
||||||
|
`status` enum('Active','On hold','Closed') default NULL,
|
||||||
|
`closingDate` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`attachment` varchar(100) NULL,
|
||||||
|
`display` varchar(200) NOT NULL,
|
||||||
|
`postedBy` bigint(20) DEFAULT NULL,
|
||||||
|
INDEX `Job_status` (`status`),
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `Candidates` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`first_name` varchar(100) default '' not null,
|
||||||
|
`last_name` varchar(100) default '' not null,
|
||||||
|
`nationality` bigint(20) default null,
|
||||||
|
`birthday` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`gender` enum('Male','Female') default NULL,
|
||||||
|
`marital_status` enum('Married','Single','Divorced','Widowed','Other') default NULL,
|
||||||
|
`address1` varchar(100) default '',
|
||||||
|
`address2` varchar(100) default '',
|
||||||
|
`city` varchar(150) default '',
|
||||||
|
`country` char(2) default null,
|
||||||
|
`province` bigint(20) default null,
|
||||||
|
`postal_code` varchar(20) default null,
|
||||||
|
`email` varchar(200) default null,
|
||||||
|
`home_phone` varchar(50) default null,
|
||||||
|
`mobile_phone` varchar(50) default null,
|
||||||
|
`cv_title` varchar(200) default '' not null,
|
||||||
|
`cv` varchar(150) NULL,
|
||||||
|
`cvtext` text NULL,
|
||||||
|
`industry` text DEFAULT NULL,
|
||||||
|
`profileImage` varchar(150) NULL,
|
||||||
|
`head_line` text DEFAULT NULL,
|
||||||
|
`objective` text DEFAULT NULL,
|
||||||
|
`work_history` text DEFAULT NULL,
|
||||||
|
`education` text DEFAULT NULL,
|
||||||
|
`skills` text DEFAULT NULL,
|
||||||
|
`referees` text DEFAULT NULL,
|
||||||
|
`linkedInUrl` varchar(500) DEFAULT NULL,
|
||||||
|
`linkedInData` text DEFAULT NULL,
|
||||||
|
`totalYearsOfExperience` int(11) default null,
|
||||||
|
`totalMonthsOfExperience` int(11) default null,
|
||||||
|
`htmlCVData` longtext DEFAULT NULL,
|
||||||
|
`generatedCVFile` varchar(150) DEFAULT NULL,
|
||||||
|
`created` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`updated` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`expectedSalary` int(11) default null,
|
||||||
|
`preferedPositions` text default null,
|
||||||
|
`preferedJobtype` varchar(60) default null,
|
||||||
|
`preferedCountries` text default null,
|
||||||
|
`tags` text default null,
|
||||||
|
`notes` text default null,
|
||||||
|
`calls` text default null,
|
||||||
|
`age` int(11) default null,
|
||||||
|
`hash` varchar(100) DEFAULT NULL,
|
||||||
|
`linkedInProfileLink` varchar(250) DEFAULT NULL,
|
||||||
|
`linkedInProfileId` varchar(50) DEFAULT NULL,
|
||||||
|
`facebookProfileLink` varchar(250) DEFAULT NULL,
|
||||||
|
`facebookProfileId` varchar(50) DEFAULT NULL,
|
||||||
|
`twitterProfileLink` varchar(250) DEFAULT NULL,
|
||||||
|
`twitterProfileId` varchar(50) DEFAULT NULL,
|
||||||
|
`googleProfileLink` varchar(250) DEFAULT NULL,
|
||||||
|
`googleProfileId` varchar(50) DEFAULT NULL,
|
||||||
|
primary key (`id`)
|
||||||
|
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `Applications` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`job` bigint(20) NOT NULL,
|
||||||
|
`candidate` bigint(20) DEFAULT NULL,
|
||||||
|
`created` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`referredByEmail` varchar(200) DEFAULT NULL,
|
||||||
|
`notes` text DEFAULT NULL,
|
||||||
|
primary key (`id`),
|
||||||
|
unique key (`job`,`candidate`),
|
||||||
|
CONSTRAINT `Fk_Applications_Job` FOREIGN KEY (`job`) REFERENCES `Job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_Applications_Candidates` FOREIGN KEY (`candidate`) REFERENCES `Candidates` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `Interviews` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`job` bigint(20) NOT NULL,
|
||||||
|
`candidate` bigint(20) DEFAULT NULL,
|
||||||
|
`level` varchar(100) DEFAULT NULL,
|
||||||
|
`created` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`updated` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`scheduled` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`location` varchar(500) DEFAULT NULL,
|
||||||
|
`mapId` bigint(20) NULL,
|
||||||
|
`status` varchar(100) default null,
|
||||||
|
`notes` text DEFAULT NULL,
|
||||||
|
primary key (`id`),
|
||||||
|
CONSTRAINT `Fk_Interviews_Job` FOREIGN KEY (`job`) REFERENCES `Job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_Interviews_Candidates` FOREIGN KEY (`candidate`) REFERENCES `Candidates` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `Calls` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`job` bigint(20) NOT NULL,
|
||||||
|
`candidate` bigint(20) DEFAULT NULL,
|
||||||
|
`phone` varchar(20) default null,
|
||||||
|
`created` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`updated` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`status` varchar(100) default null,
|
||||||
|
`notes` text DEFAULT NULL,
|
||||||
|
primary key (`id`),
|
||||||
|
CONSTRAINT `Fk_Calls_Job` FOREIGN KEY (`job`) REFERENCES `Job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_Calls_Candidates` FOREIGN KEY (`candidate`) REFERENCES `Candidates` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `LeaveStartingBalance` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`leave_type` bigint(20) NOT NULL,
|
||||||
|
`employee` bigint(20) NULL,
|
||||||
|
`leave_period` bigint(20) NOT NULL,
|
||||||
|
`amount` decimal(10,3) NOT NULL,
|
||||||
|
`note` text DEFAULT NULL,
|
||||||
|
`created` datetime default '0000-00-00 00:00:00',
|
||||||
|
`updated` datetime default '0000-00-00 00:00:00',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
INSERT INTO `WorkDays` (`id`, `name`, `status`, `country`) VALUES
|
||||||
|
(1, 'Monday', 'Full Day',NULL),
|
||||||
|
(2, 'Tuesday', 'Full Day',NULL),
|
||||||
|
(3, 'Wednesday', 'Full Day',NULL),
|
||||||
|
(4, 'Thursday', 'Full Day',NULL),
|
||||||
|
(5, 'Friday', 'Full Day',NULL),
|
||||||
|
(6, 'Saturday', 'Non-working Day',NULL),
|
||||||
|
(7, 'Sunday', 'Non-working Day',NULL);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `Documents` (`id`, `name`, `details`, `expire_notification`, `expire_notification_month`, `expire_notification_week`, `expire_notification_day`,`sign`,`created`, `updated`) VALUES
|
||||||
|
(1, 'ID Copy', 'Your ID copy','Yes','Yes','Yes','Yes','No',NOW(), NOW()),
|
||||||
|
(2, 'Degree Certificate', 'Degree Certificate','Yes','Yes','Yes','Yes','Yes',NOW(), NOW()),
|
||||||
|
(3, 'Driving License', 'Driving License','Yes','Yes','Yes','Yes','Yes',NOW(), NOW());
|
||||||
|
|
||||||
|
INSERT INTO `HoliDays` (`id`, `name`, `dateh`, `status`) VALUES
|
||||||
|
(1, 'New Year''s Day', '2015-01-01', 'Full Day'),
|
||||||
|
(2, 'Christmas Day', '2015-12-25', 'Full Day');
|
||||||
|
|
||||||
|
INSERT INTO `LeavePeriods` (`id`, `name`, `date_start`, `date_end`, `status`) VALUES
|
||||||
|
(3, 'Year 2015', '2015-01-01', '2015-12-31', 'Active'),
|
||||||
|
(4, 'Year 2016', '2016-01-01', '2016-12-31', 'Active'),
|
||||||
|
(5, 'Year 2017', '2017-01-01', '2017-12-31', 'Active');
|
||||||
|
|
||||||
|
INSERT INTO `LeaveTypes` (`id`, `name`, `supervisor_leave_assign`, `employee_can_apply`, `apply_beyond_current`, `leave_accrue`, `carried_forward`, `default_per_year`) VALUES
|
||||||
|
(1, 'Annual leave', 'No', 'Yes', 'No', 'No', 'No', 14),
|
||||||
|
(2, 'Casual leave', 'Yes', 'Yes', 'No', 'No', 'No', 7),
|
||||||
|
(3, 'Medical leave', 'Yes', 'Yes', 'Yes', 'No', 'No', 7);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `Courses` (`id`,`code`, `name`, `description`, `coordinator`, `trainer`, `trainer_info`, `paymentType`, `currency`, `cost`, `status`, `created`, `updated`) VALUES
|
||||||
|
(1,'C0001', 'Info Marketing', 'Learn how to Create and Outsource Info Marketing Products', 1, 'Tim Jhon', 'Tim Jhon has a background in business management and has been working with small business to establish their online presence','Company Sponsored','USD','55','Active',now(), now()),
|
||||||
|
(2,'C0002', 'People Management', 'Learn how to Manage People', 1, 'Tim Jhon', 'Tim Jhon has a background in business management and has been working with small business to establish their online presence','Company Sponsored','USD','59','Active',now(), now());
|
||||||
|
|
||||||
|
INSERT INTO `EmployementType` (`name`) VALUES
|
||||||
|
('Full-time'),
|
||||||
|
('Part-time'),
|
||||||
|
('Contract'),
|
||||||
|
('Temporary'),
|
||||||
|
('Other');
|
||||||
|
|
||||||
|
INSERT INTO `Benifits` (`name`) VALUES
|
||||||
|
('Retirement plan'),
|
||||||
|
('Health plan'),
|
||||||
|
('Life insurance'),
|
||||||
|
('Paid vacations');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `ExperienceLevel` (`name`) VALUES
|
||||||
|
('Not Applicable'),
|
||||||
|
('Internship'),
|
||||||
|
('Entry level'),
|
||||||
|
('Associate'),
|
||||||
|
('Mid-Senior level'),
|
||||||
|
('Director'),
|
||||||
|
('Executive');
|
||||||
|
|
||||||
|
INSERT INTO `JobFunction` (`name`) VALUES
|
||||||
|
('Accounting/Auditing'),
|
||||||
|
('Administrative'),
|
||||||
|
('Advertising'),
|
||||||
|
('Business Analyst'),
|
||||||
|
('Financial Analyst'),
|
||||||
|
('Data Analyst'),
|
||||||
|
('Art/Creative'),
|
||||||
|
('Business Development'),
|
||||||
|
('Consulting'),
|
||||||
|
('Customer Service'),
|
||||||
|
('Distribution'),
|
||||||
|
('Design'),
|
||||||
|
('Education'),
|
||||||
|
('Engineering'),
|
||||||
|
('Finance'),
|
||||||
|
('General Business'),
|
||||||
|
('Health Care Provider'),
|
||||||
|
('Human Resources'),
|
||||||
|
('Information Technology'),
|
||||||
|
('Legal'),
|
||||||
|
('Management'),
|
||||||
|
('Manufacturing'),
|
||||||
|
('Marketing'),
|
||||||
|
('Other'),
|
||||||
|
('Public Relations'),
|
||||||
|
('Purchasing'),
|
||||||
|
('Product Management'),
|
||||||
|
('Project Management'),
|
||||||
|
('Production'),
|
||||||
|
('Quality Assurance'),
|
||||||
|
('Research'),
|
||||||
|
('Sales'),
|
||||||
|
('Science'),
|
||||||
|
('Strategy/Planning'),
|
||||||
|
('Supply Chain'),
|
||||||
|
('Training'),
|
||||||
|
('Writing/Editing');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `EducationLevel` (`name`) VALUES
|
||||||
|
('Unspecified'),
|
||||||
|
('High School or equivalent'),
|
||||||
|
('Certification'),
|
||||||
|
('Vocational'),
|
||||||
|
('Associate Degree'),
|
||||||
|
('Bachelor\'s Degree'),
|
||||||
|
('Master\'s Degree'),
|
||||||
|
('Doctorate'),
|
||||||
|
('Professional'),
|
||||||
|
('Some College Coursework Completed'),
|
||||||
|
('Vocational - HS Diploma'),
|
||||||
|
('Vocational - Degree'),
|
||||||
|
('Some High School Coursework');
|
||||||
@@ -1,54 +1,78 @@
|
|||||||
<?php
|
<?php
|
||||||
define('CLIENT_PATH',dirname(__FILE__));
|
define('CLIENT_PATH',dirname(__FILE__));
|
||||||
include ("config.base.php");
|
include ("config.base.php");
|
||||||
include ("include.common.php");
|
include ("include.common.php");
|
||||||
include("server.includes.inc.php");
|
include("server.includes.inc.php");
|
||||||
if(empty($user)){
|
if(empty($user)){
|
||||||
if(!empty($_REQUEST['username']) && !empty($_REQUEST['password'])){
|
if(!empty($_REQUEST['username']) && !empty($_REQUEST['password'])){
|
||||||
$suser = null;
|
$suser = null;
|
||||||
$ssoUserLoaded = false;
|
$ssoUserLoaded = false;
|
||||||
if(empty($suser)){
|
|
||||||
$suser = new User();
|
if(empty($suser)){
|
||||||
$suser->Load("(username = ? or email = ?) and password = ?",array($_REQUEST['username'],$_REQUEST['username'],md5($_REQUEST['password'])));
|
$suser = new User();
|
||||||
}
|
$suser->Load("(username = ? or email = ?) and password = ?",array($_REQUEST['username'],$_REQUEST['username'],md5($_REQUEST['password'])));
|
||||||
|
}
|
||||||
if($suser->password == md5($_REQUEST['password']) || $ssoUserLoaded){
|
|
||||||
$user = $suser;
|
if($suser->password == md5($_REQUEST['password']) || $ssoUserLoaded){
|
||||||
SessionUtils::saveSessionObject('user', $user);
|
$user = $suser;
|
||||||
$suser->last_login = date("Y-m-d H:i:s");
|
SessionUtils::saveSessionObject('user', $user);
|
||||||
$suser->Save();
|
$suser->last_login = date("Y-m-d H:i:s");
|
||||||
|
$suser->Save();
|
||||||
if(!$ssoUserLoaded && !empty(BaseService::getInstance()->auditManager)){
|
|
||||||
BaseService::getInstance()->auditManager->user = $user;
|
if(!$ssoUserLoaded && !empty(BaseService::getInstance()->auditManager)){
|
||||||
BaseService::getInstance()->audit(IceConstants::AUDIT_AUTHENTICATION, "User Login");
|
BaseService::getInstance()->auditManager->user = $user;
|
||||||
}
|
BaseService::getInstance()->audit(IceConstants::AUDIT_AUTHENTICATION, "User Login");
|
||||||
|
}
|
||||||
if($user->user_level == "Admin"){
|
|
||||||
header("Location:".HOME_LINK_ADMIN);
|
$redirectUrl = SessionUtils::getSessionObject('loginRedirect');
|
||||||
}else{
|
if(!empty($redirectUrl)){
|
||||||
header("Location:".HOME_LINK_OTHERS);
|
header("Location:".$redirectUrl);
|
||||||
}
|
}else{
|
||||||
}else{
|
if($user->user_level == "Admin"){
|
||||||
header("Location:".CLIENT_BASE_URL."login.php?f=1");
|
header("Location:".HOME_LINK_ADMIN);
|
||||||
}
|
}else{
|
||||||
}
|
if(empty($user->default_module)){
|
||||||
|
header("Location:".HOME_LINK_OTHERS);
|
||||||
|
}else{
|
||||||
|
$defaultModule = new Module();
|
||||||
|
$defaultModule->Load("id = ?",array($user->default_module));
|
||||||
|
if($defaultModule->mod_group == "user"){
|
||||||
|
$defaultModule->mod_group = "modules";
|
||||||
|
}
|
||||||
|
$homeLink = CLIENT_BASE_URL."?g=".$defaultModule->mod_group."&n=".$defaultModule->name.
|
||||||
|
"&m=".$defaultModule->mod_group."_".str_replace(" ","_",$defaultModule->menu);
|
||||||
|
header("Location:".$homeLink);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
header("Location:".CLIENT_BASE_URL."login.php?f=1");
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if($user->user_level == "Admin"){
|
if($user->user_level == "Admin"){
|
||||||
header("Location:".HOME_LINK_ADMIN);
|
header("Location:".HOME_LINK_ADMIN);
|
||||||
}else{
|
}else{
|
||||||
header("Location:".HOME_LINK_OTHERS);
|
if(empty($user->default_module)){
|
||||||
}
|
header("Location:".HOME_LINK_OTHERS);
|
||||||
|
}else{
|
||||||
|
$defaultModule = new Module();
|
||||||
|
$defaultModule->Load("id = ?",array($user->default_module));
|
||||||
|
if($defaultModule->mod_group == "user"){
|
||||||
|
$defaultModule->mod_group = "modules";
|
||||||
|
}
|
||||||
|
$homeLink = CLIENT_BASE_URL."?g=".$defaultModule->mod_group."&n=".$defaultModule->name.
|
||||||
|
"&m=".$defaultModule->mod_group."_".str_replace(" ","_",$defaultModule->menu);
|
||||||
|
header("Location:".$homeLink);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$tuser = SessionUtils::getSessionObject('user');
|
$tuser = SessionUtils::getSessionObject('user');
|
||||||
//check user
|
//check user
|
||||||
|
|
||||||
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
|
$logoFileUrl = UIManager::getInstance()->getCompanyLogoUrl();
|
||||||
$logoFileUrl = CLIENT_BASE_URL."data/logo.png";
|
|
||||||
if(!file_exists($logoFileName)){
|
|
||||||
$logoFileUrl = BASE_URL."images/logo.png";
|
|
||||||
}
|
|
||||||
|
|
||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -74,29 +98,30 @@ if(!file_exists($logoFileName)){
|
|||||||
|
|
||||||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
/* Override some defaults */
|
/* Override some defaults */
|
||||||
html, body {
|
html, body {
|
||||||
background-color: #829AA8;
|
background-color: #829AA8;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The white background content wrapper */
|
/* The white background content wrapper */
|
||||||
.container > .content {
|
.container > .content {
|
||||||
|
min-height: 0px !important;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin: 0 -20px;
|
margin: 0 -20px;
|
||||||
-webkit-border-radius: 10px 10px 10px 10px;
|
-webkit-border-radius:0px;
|
||||||
-moz-border-radius: 10px 10px 10px 10px;
|
-moz-border-radius:0px;
|
||||||
border-radius: 10px 10px 10px 10px;
|
border-radius: 0px;
|
||||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||||
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
||||||
@@ -112,10 +137,22 @@ if(!file_exists($logoFileName)){
|
|||||||
color: #404040;
|
color: #404040;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.add-on{
|
||||||
|
-webkit-border-radius:0px;
|
||||||
|
-moz-border-radius:0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input{
|
||||||
|
-webkit-border-radius:0px;
|
||||||
|
-moz-border-radius:0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div itemscope itemtype="http://schema.org/WebApplication" style="display: none;">
|
<div itemscope itemtype="http://schema.org/WebApplication" style="display: none;">
|
||||||
|
|||||||
@@ -69,4 +69,8 @@ class ICEHRM_Record extends ADOdb_Active_Record{
|
|||||||
return array(
|
return array(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public function allowIndirectMapping(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -52,6 +52,41 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Plain Message Modal -->
|
<!-- Plain Message Modal -->
|
||||||
|
|
||||||
|
<!-- Data Message Modal -->
|
||||||
|
<div class="modal fade" id="dataMessageModel" tabindex="-1" role="dialog" aria-labelledby="dataMessageModelLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header" style="border-bottom:none;/*background-color: #3c8dbc;*/">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="margin-top:-10px;"><li class="fa fa-times"/></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p id="dataMessageModelBody"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Data Message Modal -->
|
||||||
|
|
||||||
|
<!-- Yes No Modal -->
|
||||||
|
<div class="modal fade" id="yesnoModel" tabindex="-1" role="dialog" aria-labelledby="yesnoModelLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><li class="fa fa-times"/></button>
|
||||||
|
<h3 id="yesnoModelLabel" style="font-size: 17px;"></h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p id="yesnoModelBody"></p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button id="yesnoModelNoBtn" class="btn" onclick="modJs.cancelYesno();">No</button>
|
||||||
|
<button id="yesnoModelYesBtn" class="btn btn-primary">Yes</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Yes No Modal -->
|
||||||
|
|
||||||
<!-- Upload Modal -->
|
<!-- Upload Modal -->
|
||||||
<div class="modal fade" id="uploadModel" tabindex="-1" role="dialog" aria-hidden="true">
|
<div class="modal fade" id="uploadModel" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
@@ -148,4 +183,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|||||||
@@ -1,3 +1,119 @@
|
|||||||
|
INSERT INTO `Timezones`(`id`, `name`, `details`) VALUES
|
||||||
|
(1, 'Pacific/Midway', '(GMT-11:00) Midway Island'),
|
||||||
|
(2, 'US/Samoa', '(GMT-11:00) Samoa'),
|
||||||
|
(3, 'US/Hawaii', '(GMT-10:00) Hawaii'),
|
||||||
|
(4, 'US/Alaska', '(GMT-09:00) Alaska'),
|
||||||
|
(5, 'US/Pacific', '(GMT-08:00) Pacific Time (US, Canada)'),
|
||||||
|
(6, 'America/Tijuana', '(GMT-08:00) Tijuana'),
|
||||||
|
(7, 'US/Arizona', '(GMT-07:00) Arizona'),
|
||||||
|
(8, 'US/Mountain', '(GMT-07:00) Mountain Time (US, Canada)'),
|
||||||
|
(9, 'America/Chihuahua', '(GMT-07:00) Chihuahua'),
|
||||||
|
(10, 'America/Mazatlan', '(GMT-07:00) Mazatlan'),
|
||||||
|
(11, 'America/Mexico_City', '(GMT-06:00) Mexico City'),
|
||||||
|
(12, 'America/Monterrey', '(GMT-06:00) Monterrey'),
|
||||||
|
(13, 'Canada/Saskatchewan', '(GMT-06:00) Saskatchewan'),
|
||||||
|
(14, 'US/Central', '(GMT-06:00) Central Time (US , Canada)'),
|
||||||
|
(15, 'US/Eastern', '(GMT-05:00) Eastern Time (US , Canada)'),
|
||||||
|
(16, 'US/East-Indiana', '(GMT-05:00) Indiana (East)'),
|
||||||
|
(17, 'America/Bogota', '(GMT-05:00) Bogota'),
|
||||||
|
(18, 'America/Lima', '(GMT-05:00) Lima'),
|
||||||
|
(19, 'America/Caracas', '(GMT-04:30) Caracas'),
|
||||||
|
(20, 'Canada/Atlantic', '(GMT-04:00) Atlantic Time (Canada)'),
|
||||||
|
(21, 'America/La_Paz', '(GMT-04:00) La Paz'),
|
||||||
|
(22, 'America/Santiago', '(GMT-04:00) Santiago'),
|
||||||
|
(23, 'Canada/Newfoundland', '(GMT-03:30) Newfoundland'),
|
||||||
|
(24, 'America/Buenos_Aires', '(GMT-03:00) Buenos Aires'),
|
||||||
|
(25, 'Greenland', '(GMT-03:00) Greenland'),
|
||||||
|
(26, 'Atlantic/Stanley', '(GMT-02:00) Stanley'),
|
||||||
|
(27, 'Atlantic/Azores', '(GMT-01:00) Azores'),
|
||||||
|
(28, 'Atlantic/Cape_Verde', '(GMT-01:00) Cape Verde Is.'),
|
||||||
|
(29, 'Africa/Casablanca', '(GMT) Casablanca'),
|
||||||
|
(30, 'Europe/Dublin', '(GMT) Dublin'),
|
||||||
|
(31, 'Europe/Lisbon', '(GMT) Lisbon'),
|
||||||
|
(32, 'Europe/London', '(GMT) London'),
|
||||||
|
(33, 'Africa/Monrovia', '(GMT) Monrovia'),
|
||||||
|
(34, 'Europe/Amsterdam', '(GMT+01:00) Amsterdam'),
|
||||||
|
(35, 'Europe/Belgrade', '(GMT+01:00) Belgrade'),
|
||||||
|
(36, 'Europe/Berlin', '(GMT+01:00) Berlin'),
|
||||||
|
(37, 'Europe/Bratislava', '(GMT+01:00) Bratislava'),
|
||||||
|
(38, 'Europe/Brussels', '(GMT+01:00) Brussels'),
|
||||||
|
(39, 'Europe/Budapest', '(GMT+01:00) Budapest'),
|
||||||
|
(40, 'Europe/Copenhagen', '(GMT+01:00) Copenhagen'),
|
||||||
|
(41, 'Europe/Ljubljana', '(GMT+01:00) Ljubljana'),
|
||||||
|
(42, 'Europe/Madrid', '(GMT+01:00) Madrid'),
|
||||||
|
(43, 'Europe/Paris', '(GMT+01:00) Paris'),
|
||||||
|
(44, 'Europe/Prague', '(GMT+01:00) Prague'),
|
||||||
|
(45, 'Europe/Rome', '(GMT+01:00) Rome'),
|
||||||
|
(46, 'Europe/Sarajevo', '(GMT+01:00) Sarajevo'),
|
||||||
|
(47, 'Europe/Skopje', '(GMT+01:00) Skopje'),
|
||||||
|
(48, 'Europe/Stockholm', '(GMT+01:00) Stockholm'),
|
||||||
|
(49, 'Europe/Vienna', '(GMT+01:00) Vienna'),
|
||||||
|
(50, 'Europe/Warsaw', '(GMT+01:00) Warsaw'),
|
||||||
|
(51, 'Europe/Zagreb', '(GMT+01:00) Zagreb'),
|
||||||
|
(52, 'Europe/Athens', '(GMT+02:00) Athens'),
|
||||||
|
(53, 'Europe/Bucharest', '(GMT+02:00) Bucharest'),
|
||||||
|
(54, 'Africa/Cairo', '(GMT+02:00) Cairo'),
|
||||||
|
(55, 'Africa/Harare', '(GMT+02:00) Harare'),
|
||||||
|
(56, 'Europe/Helsinki', '(GMT+02:00) Helsinki'),
|
||||||
|
(57, 'Europe/Istanbul', '(GMT+02:00) Istanbul'),
|
||||||
|
(58, 'Asia/Jerusalem', '(GMT+02:00) Jerusalem'),
|
||||||
|
(59, 'Europe/Kiev', '(GMT+02:00) Kyiv'),
|
||||||
|
(60, 'Europe/Minsk', '(GMT+02:00) Minsk'),
|
||||||
|
(61, 'Europe/Riga', '(GMT+02:00) Riga'),
|
||||||
|
(62, 'Europe/Sofia', '(GMT+02:00) Sofia'),
|
||||||
|
(63, 'Europe/Tallinn', '(GMT+02:00) Tallinn'),
|
||||||
|
(64, 'Europe/Vilnius', '(GMT+02:00) Vilnius'),
|
||||||
|
(65, 'Asia/Baghdad', '(GMT+03:00) Baghdad'),
|
||||||
|
(66, 'Asia/Kuwait', '(GMT+03:00) Kuwait'),
|
||||||
|
(67, 'Africa/Nairobi', '(GMT+03:00) Nairobi'),
|
||||||
|
(68, 'Asia/Riyadh', '(GMT+03:00) Riyadh'),
|
||||||
|
(69, 'Europe/Moscow', '(GMT+03:00) Moscow'),
|
||||||
|
(70, 'Asia/Tehran', '(GMT+03:30) Tehran'),
|
||||||
|
(71, 'Asia/Baku', '(GMT+04:00) Baku'),
|
||||||
|
(72, 'Europe/Volgograd', '(GMT+04:00) Volgograd'),
|
||||||
|
(73, 'Asia/Muscat', '(GMT+04:00) Muscat'),
|
||||||
|
(74, 'Asia/Tbilisi', '(GMT+04:00) Tbilisi'),
|
||||||
|
(75, 'Asia/Yerevan', '(GMT+04:00) Yerevan'),
|
||||||
|
(76, 'Asia/Kabul', '(GMT+04:30) Kabul'),
|
||||||
|
(77, 'Asia/Karachi', '(GMT+05:00) Karachi'),
|
||||||
|
(78, 'Asia/Tashkent', '(GMT+05:00) Tashkent'),
|
||||||
|
(79, 'Asia/Kolkata', '(GMT+05:30) Kolkata'),
|
||||||
|
(80, 'Asia/Kathmandu', '(GMT+05:45) Kathmandu'),
|
||||||
|
(81, 'Asia/Yekaterinburg', '(GMT+06:00) Ekaterinburg'),
|
||||||
|
(82, 'Asia/Almaty', '(GMT+06:00) Almaty'),
|
||||||
|
(83, 'Asia/Dhaka', '(GMT+06:00) Dhaka'),
|
||||||
|
(84, 'Asia/Novosibirsk', '(GMT+07:00) Novosibirsk'),
|
||||||
|
(85, 'Asia/Bangkok', '(GMT+07:00) Bangkok'),
|
||||||
|
(86, 'Asia/Jakarta', '(GMT+07:00) Jakarta'),
|
||||||
|
(87, 'Asia/Krasnoyarsk', '(GMT+08:00) Krasnoyarsk'),
|
||||||
|
(88, 'Asia/Chongqing', '(GMT+08:00) Chongqing'),
|
||||||
|
(89, 'Asia/Hong_Kong', '(GMT+08:00) Hong Kong'),
|
||||||
|
(90, 'Asia/Kuala_Lumpur', '(GMT+08:00) Kuala Lumpur'),
|
||||||
|
(91, 'Australia/Perth', '(GMT+08:00) Perth'),
|
||||||
|
(92, 'Asia/Singapore', '(GMT+08:00) Singapore'),
|
||||||
|
(93, 'Asia/Taipei', '(GMT+08:00) Taipei'),
|
||||||
|
(94, 'Asia/Ulaanbaatar', '(GMT+08:00) Ulaan Bataar'),
|
||||||
|
(95, 'Asia/Urumqi', '(GMT+08:00) Urumqi'),
|
||||||
|
(96, 'Asia/Irkutsk', '(GMT+09:00) Irkutsk'),
|
||||||
|
(97, 'Asia/Seoul', '(GMT+09:00) Seoul'),
|
||||||
|
(98, 'Asia/Tokyo', '(GMT+09:00) Tokyo'),
|
||||||
|
(99, 'Australia/Adelaide', '(GMT+09:30) Adelaide'),
|
||||||
|
(100, 'Australia/Darwin', '(GMT+09:30) Darwin'),
|
||||||
|
(101, 'Asia/Yakutsk', '(GMT+10:00) Yakutsk'),
|
||||||
|
(102, 'Australia/Brisbane', '(GMT+10:00) Brisbane'),
|
||||||
|
(103, 'Australia/Canberra', '(GMT+10:00) Canberra'),
|
||||||
|
(104, 'Pacific/Guam', '(GMT+10:00) Guam'),
|
||||||
|
(105, 'Australia/Hobart', '(GMT+10:00) Hobart'),
|
||||||
|
(106, 'Australia/Melbourne', '(GMT+10:00) Melbourne'),
|
||||||
|
(107, 'Pacific/Port_Moresby', '(GMT+10:00) Port Moresby'),
|
||||||
|
(108, 'Australia/Sydney', '(GMT+10:00) Sydney'),
|
||||||
|
(109, 'Asia/Vladivostok', '(GMT+11:00) Vladivostok'),
|
||||||
|
(110, 'Asia/Magadan', '(GMT+12:00) Magadan'),
|
||||||
|
(111, 'Pacific/Auckland', '(GMT+12:00) Auckland'),
|
||||||
|
(112, 'Pacific/Fiji', '(GMT+12:00) Fiji');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `CurrencyTypes`(`id`, `code`, `name`) VALUES
|
INSERT INTO `CurrencyTypes`(`id`, `code`, `name`) VALUES
|
||||||
(3, 'AED', 'Utd. Arab Emir. Dirham'),
|
(3, 'AED', 'Utd. Arab Emir. Dirham'),
|
||||||
(4, 'AFN', 'Afghanistan Afghani'),
|
(4, 'AFN', 'Afghanistan Afghani'),
|
||||||
@@ -400,8 +516,8 @@ INSERT INTO `Country`(`code`, `namecap`, `name`, `iso3`, `numcode`) VALUES
|
|||||||
('YE', 'YEMEN', 'Yemen', 'YEM', 887),
|
('YE', 'YEMEN', 'Yemen', 'YEM', 887),
|
||||||
('ZM', 'ZAMBIA', 'Zambia', 'ZMB', 894),
|
('ZM', 'ZAMBIA', 'Zambia', 'ZMB', 894),
|
||||||
('ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716);
|
('ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716);
|
||||||
|
|
||||||
INSERT INTO `Province`(`id`, `name`, `code`, `country`) VALUES
|
INSERT INTO `Province`(`id`, `name`, `code`, `country`) VALUES
|
||||||
(1, 'Alaska', 'AK', 'US'),
|
(1, 'Alaska', 'AK', 'US'),
|
||||||
(2, 'Alabama', 'AL', 'US'),
|
(2, 'Alabama', 'AL', 'US'),
|
||||||
(3, 'American Samoa', 'AS', 'US'),
|
(3, 'American Samoa', 'AS', 'US'),
|
||||||
@@ -467,9 +583,9 @@ INSERT INTO `Province`(`id`, `name`, `code`, `country`) VALUES
|
|||||||
(63, 'Armed Forces Europe', 'AE', 'US'),
|
(63, 'Armed Forces Europe', 'AE', 'US'),
|
||||||
(64, 'Armed Forces Middle East', 'AE', 'US'),
|
(64, 'Armed Forces Middle East', 'AE', 'US'),
|
||||||
(65, 'Armed Forces Pacific', 'AP', 'US');
|
(65, 'Armed Forces Pacific', 'AP', 'US');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `Nationality` (`id`, `name`) VALUES
|
INSERT INTO `Nationality` (`id`, `name`) VALUES
|
||||||
(1, 'Afghan'),
|
(1, 'Afghan'),
|
||||||
(2, 'Albanian'),
|
(2, 'Albanian'),
|
||||||
@@ -665,14 +781,6 @@ INSERT INTO `Nationality` (`id`, `name`) VALUES
|
|||||||
(192, 'Zambian'),
|
(192, 'Zambian'),
|
||||||
(193, 'Zimbabwean');
|
(193, 'Zimbabwean');
|
||||||
|
|
||||||
INSERT INTO `WorkDays` (`id`, `name`, `status`, `country`) VALUES
|
|
||||||
(1, 'Monday', 'Full Day',NULL),
|
|
||||||
(2, 'Tuesday', 'Full Day',NULL),
|
|
||||||
(3, 'Wednesday', 'Full Day',NULL),
|
|
||||||
(4, 'Thursday', 'Full Day',NULL),
|
|
||||||
(5, 'Friday', 'Full Day',NULL),
|
|
||||||
(6, 'Saturday', 'Non-working Day',NULL),
|
|
||||||
(7, 'Sunday', 'Non-working Day',NULL);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `Reports` (`id`, `name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
INSERT INTO `Reports` (`id`, `name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||||
@@ -683,8 +791,17 @@ INSERT INTO `Reports` (`id`, `name`, `details`, `parameters`, `query`, `paramOrd
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||||
|
('Travel Request Report', 'This report list employees travel requests for a specified period',
|
||||||
|
'[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","type":"select","source":[["NULL","All Statuses"],["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"],["Cancellation Requested","Cancellation Requested"],["Cancelled","Cancelled"]]}]\r\n]',
|
||||||
|
'TravelRequestReport',
|
||||||
|
'["employee","date_start","date_end","status"]', 'Class');
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Company: Logo', '', '','[ "value", {"label":"Logo","type":"fileupload","validation":"none"}]'),
|
||||||
('Company: Name', 'Sample Company Pvt Ltd', 'Update your company name - For updating company logo copy a file named logo.png to /app/data/ folder', ''),
|
('Company: Name', 'Sample Company Pvt Ltd', 'Update your company name - For updating company logo copy a file named logo.png to /app/data/ folder', ''),
|
||||||
|
('Company: Description', 'This is a company using icehrm.com', '',''),
|
||||||
('Email: Enable', '1', '0 will disable all outgoing emails from modules. Value 1 will enable outgoing emails','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
('Email: Enable', '1', '0 will disable all outgoing emails from modules. Value 1 will enable outgoing emails','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
||||||
('Email: Mode', 'SMTP', 'SMTP, PHP Mailer or Amazon SES. SMTP = send emails using local or a remote smtp server. PHP Mailer = send emails using mail function provided by php. Amazon SES = send emails trough amazon Simple Email Service.','["value", {"label":"Value","type":"select","source":[["SMTP","SMTP"],["PHP Mailer","PHP Mailer"],["SES","Amazon SES"]]}]'),
|
('Email: Mode', 'SMTP', 'SMTP, PHP Mailer or Amazon SES. SMTP = send emails using local or a remote smtp server. PHP Mailer = send emails using mail function provided by php. Amazon SES = send emails trough amazon Simple Email Service.','["value", {"label":"Value","type":"select","source":[["SMTP","SMTP"],["PHP Mailer","PHP Mailer"],["SES","Amazon SES"]]}]'),
|
||||||
('Email: SMTP Host', 'localhost', 'SMTP host IP',''),
|
('Email: SMTP Host', 'localhost', 'SMTP host IP',''),
|
||||||
@@ -700,10 +817,21 @@ INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
|||||||
('System: Add New Permissions', '0', 'Select this to add new permission changes done to meta.json file of any module','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
('System: Add New Permissions', '0', 'Select this to add new permission changes done to meta.json file of any module','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
||||||
('System: Debug Mode', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
('System: Debug Mode', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
||||||
('Projects: Make All Projects Available to Employees', '1', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
('Projects: Make All Projects Available to Employees', '1', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
||||||
('Attendance: Time-sheet Cross Check', '0', 'Only allow users to add an entry to a timesheet only if they have marked atteandance for the selected period','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'),
|
('Attendance: Time-sheet Cross Check', '0', 'Only allow users to add an entry to a timesheet only if they have marked atteandance for the selected period','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
|
||||||
('Api: REST Api Enabled', '0', '','["value", {"label":"Value","type":"select","source":[["0","No"],["1","Yes"]]}]');
|
('Api: REST Api Enabled', '0', '','["value", {"label":"Value","type":"select","source":[["0","No"],["1","Yes"]]}]');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Travel: Pre-Approve Travel Request', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
|
||||||
|
|
||||||
|
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Attendance: Use Department Time Zone', '0', '','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
|
||||||
|
|
||||||
|
INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
||||||
|
('Analytics: Google Key', 'UA-48048570-2', 'Google Analytics Key','');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `Certifications` (`id`, `name`, `description`) VALUES
|
INSERT INTO `Certifications` (`id`, `name`, `description`) VALUES
|
||||||
(1, 'Red Hat Certified Architect (RHCA)', 'Red Hat Certified Architect (RHCA)'),
|
(1, 'Red Hat Certified Architect (RHCA)', 'Red Hat Certified Architect (RHCA)'),
|
||||||
(2, 'GIAC Secure Software Programmer -Java', 'GIAC Secure Software Programmer -Java'),
|
(2, 'GIAC Secure Software Programmer -Java', 'GIAC Secure Software Programmer -Java'),
|
||||||
@@ -746,11 +874,6 @@ INSERT INTO `CompanyStructures` (`id`, `title`, `description`, `address`, `type`
|
|||||||
(3, 'Marketing Department', 'Marketing Department', 'PO Box 001002\nSample Road, Sample Town', 'Department', 'US', 2);
|
(3, 'Marketing Department', 'Marketing Department', 'PO Box 001002\nSample Road, Sample Town', 'Department', 'US', 2);
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `Documents` (`id`, `name`, `details`) VALUES
|
|
||||||
(1, 'ID Copy', 'Your ID copy'),
|
|
||||||
(2, 'Degree Ceritficate', 'Degree Ceritficate'),
|
|
||||||
(3, 'Driving License', 'Driving License');
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `Educations` (`id`, `name`, `description`) VALUES
|
INSERT INTO `Educations` (`id`, `name`, `description`) VALUES
|
||||||
(1, 'Bachelors Degree', 'Bachelors Degree'),
|
(1, 'Bachelors Degree', 'Bachelors Degree'),
|
||||||
@@ -758,9 +881,6 @@ INSERT INTO `Educations` (`id`, `name`, `description`) VALUES
|
|||||||
(3, 'Masters Degree', 'Masters Degree'),
|
(3, 'Masters Degree', 'Masters Degree'),
|
||||||
(4, 'Doctorate', 'Doctorate');
|
(4, 'Doctorate', 'Doctorate');
|
||||||
|
|
||||||
INSERT INTO `HoliDays` (`id`, `name`, `dateh`, `status`) VALUES
|
|
||||||
(1, 'New Year''s Day', '2015-01-01', 'Full Day'),
|
|
||||||
(2, 'Christmas Day', '2015-12-25', 'Full Day');
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `JobTitles` (`id`, `code`, `name`, `description`, `specification`) VALUES
|
INSERT INTO `JobTitles` (`id`, `code`, `name`, `description`, `specification`) VALUES
|
||||||
@@ -887,6 +1007,39 @@ INSERT INTO `SalaryComponentType` (`id`,`code`, `name`) VALUES
|
|||||||
(2,'B002', 'Allowance');
|
(2,'B002', 'Allowance');
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `SalaryComponent` VALUES
|
INSERT INTO `SalaryComponent` (`id`,`name`, `componentType`) VALUES
|
||||||
(1,'Basic Salary', 1,''),(2,'Fixed Allowance', 1,''),(3,'Car Allowance', 2,''),(4,'Telephone Allowance', 2,'');
|
(1,'Basic Salary', 1),
|
||||||
|
(2,'Fixed Allowance', 1),
|
||||||
|
(3,'Car Allowance', 2),
|
||||||
|
(4,'Telephone Allowance', 2);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `Crons` (`name`,`class`, `lastrun`, `frequency`, `time`, `type`, `status`) VALUES
|
||||||
|
('Email Sender Task', 'EmailSenderTask', NULL, 1, 1, 'Minutely', 'Enabled'),
|
||||||
|
('Document Expire Alert', 'DocumentExpiryNotificationTask', NULL, 1, 1, 'Minutely', 'Enabled');
|
||||||
|
|
||||||
|
INSERT INTO `ExpensesPaymentMethods` (`name`) VALUES
|
||||||
|
('Cash'),
|
||||||
|
('Check'),
|
||||||
|
('Credit Card'),
|
||||||
|
('Debit Card');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `ExpensesCategories` (`name`) VALUES
|
||||||
|
('Auto - Gas'),
|
||||||
|
('Auto - Insurance'),
|
||||||
|
('Auto - Maintenance'),
|
||||||
|
('Auto - Payment'),
|
||||||
|
('Transportation'),
|
||||||
|
('Bank Fees'),
|
||||||
|
('Dining Out'),
|
||||||
|
('Entertainment'),
|
||||||
|
('Hotel / Motel'),
|
||||||
|
('Insurance'),
|
||||||
|
('Interest Charges'),
|
||||||
|
('Loan Payment'),
|
||||||
|
('Medical'),
|
||||||
|
('Mileage'),
|
||||||
|
('Rent'),
|
||||||
|
('Rental Car'),
|
||||||
|
('Utility');
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ INSERT INTO `EmployeeDependents` (`id`, `employee`, `name`, `relationship`, `dob
|
|||||||
(2, 1, 'Mica Singroo', 'Other', '2000-06-13', '');
|
(2, 1, 'Mica Singroo', 'Other', '2000-06-13', '');
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `EmployeeDocuments` (`id`, `employee`, `document`, `date_added`, `valid_until`, `status`, `details`) VALUES
|
|
||||||
(1, 2, 2, '2013-01-08', '0000-00-00', 'Active', 'zxczx');
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `EmployeeEducations` (`id`, `education_id`, `employee`, `institute`, `date_start`, `date_end`) VALUES
|
INSERT INTO `EmployeeEducations` (`id`, `education_id`, `employee`, `institute`, `date_start`, `date_end`) VALUES
|
||||||
@@ -59,9 +58,9 @@ INSERT INTO `EmployeeProjects` (`id`, `employee`, `project`, `date_start`, `date
|
|||||||
|
|
||||||
|
|
||||||
INSERT INTO `EmployeeSalary` (`id`, `employee`, `component`, `pay_frequency`, `currency`, `amount`, `details`) VALUES
|
INSERT INTO `EmployeeSalary` (`id`, `employee`, `component`, `pay_frequency`, `currency`, `amount`, `details`) VALUES
|
||||||
(1, 1, 'Basic', 'Monthly', 131, '2700.00', ''),
|
(1, 1, 1, 'Monthly', 131, '2700.00', ''),
|
||||||
(2, 2, 'Basic Salary', 'Monthly', 151, '12000.00', ''),
|
(2, 2, 2, 'Monthly', 151, '12000.00', ''),
|
||||||
(3, 2, 'Travelling Allowance', 'Monthly', 131, '5000.00', '');
|
(3, 2, 3, 'Monthly', 131, '5000.00', '');
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `EmployeeSkills` (`id`, `skill_id`, `employee`, `details`) VALUES
|
INSERT INTO `EmployeeSkills` (`id`, `skill_id`, `employee`, `details`) VALUES
|
||||||
|
|||||||
@@ -1,248 +0,0 @@
|
|||||||
/* Upgrade v10.2 to v11.0 */
|
|
||||||
|
|
||||||
ALTER TABLE `LeaveTypes` ADD COLUMN `leave_color` varchar(10) NULL;
|
|
||||||
|
|
||||||
create table `RestAccessTokens` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`userId` bigint(20) NOT NULL,
|
|
||||||
`hash` varchar(32) default null,
|
|
||||||
`token` varchar(500) default null,
|
|
||||||
`created` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
`updated` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
primary key (`id`),
|
|
||||||
unique key `userId` (`userId`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
|
|
||||||
('Api: REST Api Enabled', '0', '','["value", {"label":"Value","type":"select","source":[["0","No"],["1","Yes"]]}]');
|
|
||||||
|
|
||||||
ALTER TABLE Employees ADD COLUMN `status` enum('Active','Terminated') default 'Active';
|
|
||||||
|
|
||||||
ALTER TABLE EmployeeLeaves MODIFY COLUMN `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending';
|
|
||||||
|
|
||||||
ALTER TABLE EmployeeLeaveLog MODIFY COLUMN `status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending';
|
|
||||||
ALTER TABLE EmployeeLeaveLog MODIFY COLUMN `status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending';
|
|
||||||
|
|
||||||
create table `ArchivedEmployees` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`ref_id` bigint(20) NOT NULL,
|
|
||||||
`employee_id` varchar(50) default null,
|
|
||||||
`first_name` varchar(100) default '' not null,
|
|
||||||
`last_name` varchar(100) default '' not null,
|
|
||||||
`gender` enum('Male','Female') default NULL,
|
|
||||||
`ssn_num` varchar(100) default '',
|
|
||||||
`nic_num` varchar(100) default '',
|
|
||||||
`other_id` varchar(100) default '',
|
|
||||||
`work_email` varchar(100) default null,
|
|
||||||
`joined_date` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
`confirmation_date` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
`supervisor` bigint(20) default null,
|
|
||||||
`department` bigint(20) default null,
|
|
||||||
`termination_date` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
`notes` text default null,
|
|
||||||
`data` longtext default null,
|
|
||||||
primary key (`id`)
|
|
||||||
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
|
|
||||||
/* Upgrade v11.0 to v11.1 */
|
|
||||||
|
|
||||||
create table `FieldNameMappings` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`type` varchar(20) NOT NULL,
|
|
||||||
`name` varchar(20) NOT NULL,
|
|
||||||
`textOrig` varchar(200) default null,
|
|
||||||
`textMapped` varchar(200) default null,
|
|
||||||
`display` enum('Form','Table and Form','Hidden') default 'Form',
|
|
||||||
`created` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
`updated` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
INSERT INTO `FieldNameMappings` (`type`, `name`, `textOrig`, `textMapped`, `display`) VALUES
|
|
||||||
('Employee', 'employee_id', 'Employee Number', 'Employee Number', 'Table and Form'),
|
|
||||||
('Employee', 'first_name', 'First Name', 'First Name', 'Table and Form'),
|
|
||||||
('Employee', 'middle_name', 'Middle Name', 'Middle Name', 'Form'),
|
|
||||||
('Employee', 'last_name', 'Last Name', 'Last Name', 'Table and Form'),
|
|
||||||
('Employee', 'nationality', 'Nationality', 'Nationality', 'Form'),
|
|
||||||
('Employee', 'ethnicity', 'Ethnicity', 'Ethnicity', 'Form'),
|
|
||||||
('Employee', 'immigration_status', 'Immigration Status', 'Immigration Status', 'Form'),
|
|
||||||
('Employee', 'birthday', 'Date of Birth', 'Date of Birth', 'Form'),
|
|
||||||
('Employee', 'gender', 'Gender', 'Gender', 'Form'),
|
|
||||||
('Employee', 'marital_status', 'Marital Status', 'Marital Status', 'Form'),
|
|
||||||
('Employee', 'ssn_num', 'SSN/NRIC', 'SSN/NRIC', 'Form'),
|
|
||||||
('Employee', 'nic_num', 'NIC', 'NIC', 'Form'),
|
|
||||||
('Employee', 'other_id', 'Other ID', 'Other ID', 'Form'),
|
|
||||||
('Employee', 'driving_license', 'Driving License No', 'Driving License No', 'Form'),
|
|
||||||
('Employee', 'employment_status', 'Employment Status', 'Employment Status', 'Form'),
|
|
||||||
('Employee', 'job_title', 'Job Title', 'Job Title', 'Form'),
|
|
||||||
('Employee', 'pay_grade', 'Pay Grade', 'Pay Grade', 'Form'),
|
|
||||||
('Employee', 'work_station_id', 'Work Station Id', 'Work Station Id', 'Form'),
|
|
||||||
('Employee', 'address1', 'Address Line 1', 'Address Line 1', 'Form'),
|
|
||||||
('Employee', 'address2', 'Address Line 2', 'Address Line 2', 'Form'),
|
|
||||||
('Employee', 'city', 'City', 'City', 'Form'),
|
|
||||||
('Employee', 'country', 'Country', 'Country', 'Form'),
|
|
||||||
('Employee', 'province', 'Province', 'Province', 'Form'),
|
|
||||||
('Employee', 'postal_code', 'Postal/Zip Code', 'Postal/Zip Code', 'Form'),
|
|
||||||
('Employee', 'home_phone', 'Home Phone', 'Home Phone', 'Form'),
|
|
||||||
('Employee', 'mobile_phone', 'Mobile Phone', 'Mobile Phone', 'Table and Form'),
|
|
||||||
('Employee', 'work_phone', 'Work Phone', 'Work Phone', 'Form'),
|
|
||||||
('Employee', 'work_email', 'Work Email', 'Work Email', 'Form'),
|
|
||||||
('Employee', 'private_email', 'Private Email', 'Private Email', 'Form'),
|
|
||||||
('Employee', 'joined_date', 'Joined Date', 'Joined Date', 'Form'),
|
|
||||||
('Employee', 'confirmation_date', 'Confirmation Date', 'Confirmation Date', 'Form'),
|
|
||||||
('Employee', 'termination_date', 'Termination Date', 'Termination Date', 'Form'),
|
|
||||||
('Employee', 'supervisor', 'Supervisor', 'Supervisor', 'Table and Form'),
|
|
||||||
('Employee', 'department', 'Department', 'Department', 'Table and Form'),
|
|
||||||
('Employee', 'notes', 'Notes', 'Notes', 'Form');
|
|
||||||
|
|
||||||
|
|
||||||
create table `CustomFields` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`type` varchar(20) NOT NULL,
|
|
||||||
`name` varchar(20) NOT NULL,
|
|
||||||
`data` text default null,
|
|
||||||
`display` enum('Form','Table and Form','Hidden') default 'Form',
|
|
||||||
`created` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
`updated` DATETIME default '0000-00-00 00:00:00',
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `CustomFields` (`type`, `name`, `data`,`display`) VALUES
|
|
||||||
('Employee', 'custom1', '', 'Hidden'),
|
|
||||||
('Employee', 'custom2', '', 'Hidden'),
|
|
||||||
('Employee', 'custom3', '', 'Hidden'),
|
|
||||||
('Employee', 'custom4', '', 'Hidden'),
|
|
||||||
('Employee', 'custom5', '', 'Hidden'),
|
|
||||||
('Employee', 'custom6', '', 'Hidden'),
|
|
||||||
('Employee', 'custom7', '', 'Hidden'),
|
|
||||||
('Employee', 'custom8', '', 'Hidden'),
|
|
||||||
('Employee', 'custom9', '', 'Hidden'),
|
|
||||||
('Employee', 'custom10', '', 'Hidden');
|
|
||||||
|
|
||||||
|
|
||||||
Alter table `Employees` MODIFY COLUMN `middle_name` varchar(100) default null;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `last_name` varchar(100) default null;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `ssn_num` varchar(100) default NULL;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `nic_num` varchar(100) default NULL;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `other_id` varchar(100) default NULL;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `driving_license` varchar(100) default NULL;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `work_station_id` varchar(100) default NULL;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `address1` varchar(100) default NULL;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `address2` varchar(100) default NULL;
|
|
||||||
Alter table `Employees` MODIFY COLUMN `city` varchar(150) default NULL;
|
|
||||||
|
|
||||||
|
|
||||||
Alter table `Employees` ADD COLUMN `ethnicity` bigint(20) default null;
|
|
||||||
Alter table `Employees` ADD COLUMN `immigration_status` bigint(20) default null;
|
|
||||||
|
|
||||||
|
|
||||||
Alter table `EmployeeSalary` MODIFY COLUMN `component` bigint(20) NOT NULL;
|
|
||||||
Alter table `EmployeeSalary` MODIFY COLUMN `currency` bigint(20) NULL;
|
|
||||||
|
|
||||||
INSERT INTO `SalaryComponentType` (`id`,`code`, `name`) VALUES
|
|
||||||
(1,'B001', 'Basic'),
|
|
||||||
(2,'B002', 'Allowance');
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `SalaryComponent` VALUES
|
|
||||||
(1,'Basic Salary', 1,''),(2,'Fixed Allowance', 1,''),(3,'Car Allowance', 2,''),(4,'Telephone Allowance', 2,'');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Upgrade v11.1 to v12.0 */
|
|
||||||
|
|
||||||
ALTER TABLE Users ADD COLUMN user_roles text null;
|
|
||||||
ALTER TABLE Users ADD COLUMN `default_module` bigint(20) null after `employee`;
|
|
||||||
ALTER TABLE Modules ADD COLUMN user_roles text null AFTER `user_levels`;
|
|
||||||
ALTER TABLE Modules ADD COLUMN label varchar(100) NOT NULL AFTER `name`;
|
|
||||||
|
|
||||||
create table `UserRoles` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(100) default null,
|
|
||||||
primary key (`id`),
|
|
||||||
unique key `name` (`name`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
ALTER TABLE `Users` CHANGE `user_level` `user_level` enum('Admin','Employee','Manager','Other') default NULL;
|
|
||||||
|
|
||||||
create table `EmployeeEducationsTemp` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`education_id` bigint(20) NULL,
|
|
||||||
`employee` bigint(20) NOT NULL,
|
|
||||||
`institute` varchar(400) default null,
|
|
||||||
`date_start` date default '0000-00-00',
|
|
||||||
`date_end` date default '0000-00-00',
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
insert into EmployeeEducationsTemp select * from EmployeeEducations;
|
|
||||||
|
|
||||||
drop table EmployeeEducations;
|
|
||||||
|
|
||||||
create table `EmployeeEducations` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`education_id` bigint(20) NULL,
|
|
||||||
`employee` bigint(20) NOT NULL,
|
|
||||||
`institute` varchar(400) default null,
|
|
||||||
`date_start` date default '0000-00-00',
|
|
||||||
`date_end` date default '0000-00-00',
|
|
||||||
CONSTRAINT `Fk_EmployeeEducations_Educations` FOREIGN KEY (`education_id`) REFERENCES `Educations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
CONSTRAINT `Fk_EmployeeEducations_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
insert into EmployeeEducations select * from EmployeeEducationsTemp;
|
|
||||||
|
|
||||||
drop table EmployeeEducationsTemp;
|
|
||||||
|
|
||||||
UPDATE `Settings` set value = '1' where name = 'System: Reset Modules and Permissions';
|
|
||||||
UPDATE `Settings` set value = '1' where name = 'System: Add New Permissions';
|
|
||||||
|
|
||||||
create table `SalaryComponentType` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` varchar(10) NOT NULL,
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `SalaryComponent` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
`componentType` bigint(20) NULL,
|
|
||||||
`details` text default null,
|
|
||||||
CONSTRAINT `Fk_SalaryComponent_SalaryComponentType` FOREIGN KEY (`componentType`) REFERENCES `SalaryComponentType` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `ImmigrationStatus` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `Ethnicity` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `EmployeeImmigrationStatus` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`employee` bigint(20) NOT NULL,
|
|
||||||
`status` bigint(20) NOT NULL,
|
|
||||||
CONSTRAINT `Fk_EmployeeImmigrationStatus_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
CONSTRAINT `Fk_EmployeeImmigrationStatus_Type` FOREIGN KEY (`status`) REFERENCES `ImmigrationStatus` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `EmployeeEthnicity` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`employee` bigint(20) NOT NULL,
|
|
||||||
`ethnicity` bigint(20) NOT NULL,
|
|
||||||
CONSTRAINT `Fk_EmployeeEthnicity_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
CONSTRAINT `Fk_EmployeeEthnicity_Ethnicity` FOREIGN KEY (`ethnicity`) REFERENCES `Ethnicity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
@@ -6,6 +6,7 @@ create table `CompanyStructures` (
|
|||||||
`type` enum('Company','Head Office','Regional Office','Department','Unit','Sub Unit','Other') default NULL,
|
`type` enum('Company','Head Office','Regional Office','Department','Unit','Sub Unit','Other') default NULL,
|
||||||
`country` varchar(2) not null default '0',
|
`country` varchar(2) not null default '0',
|
||||||
`parent` bigint(20) NULL,
|
`parent` bigint(20) NULL,
|
||||||
|
`timezone` varchar(100) not null default 'Europe/London',
|
||||||
CONSTRAINT `Fk_CompanyStructures_Own` FOREIGN KEY (`parent`) REFERENCES `CompanyStructures` (`id`),
|
CONSTRAINT `Fk_CompanyStructures_Own` FOREIGN KEY (`parent`) REFERENCES `CompanyStructures` (`id`),
|
||||||
primary key (`id`)
|
primary key (`id`)
|
||||||
) engine=innodb default charset=utf8;
|
) engine=innodb default charset=utf8;
|
||||||
@@ -157,7 +158,7 @@ create table `Employees` (
|
|||||||
CONSTRAINT `Fk_Employee_PayGrades` FOREIGN KEY (`pay_grade`) REFERENCES `PayGrades` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
CONSTRAINT `Fk_Employee_PayGrades` FOREIGN KEY (`pay_grade`) REFERENCES `PayGrades` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||||
primary key (`id`),
|
primary key (`id`),
|
||||||
unique key `employee_id` (`employee_id`)
|
unique key `employee_id` (`employee_id`)
|
||||||
|
|
||||||
) engine=innodb default charset=utf8;
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
create table `ArchivedEmployees` (
|
create table `ArchivedEmployees` (
|
||||||
@@ -179,7 +180,7 @@ create table `ArchivedEmployees` (
|
|||||||
`notes` text default null,
|
`notes` text default null,
|
||||||
`data` longtext default null,
|
`data` longtext default null,
|
||||||
primary key (`id`)
|
primary key (`id`)
|
||||||
|
|
||||||
) engine=innodb default charset=utf8;
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
create table `UserRoles` (
|
create table `UserRoles` (
|
||||||
@@ -364,26 +365,7 @@ create table `EmployeeTimeEntry` (
|
|||||||
primary key (`id`)
|
primary key (`id`)
|
||||||
) engine=innodb default charset=utf8;
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
create table `Documents` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(100) NOT NULL,
|
|
||||||
`details` text default null,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `EmployeeDocuments` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`employee` bigint(20) NOT NULL,
|
|
||||||
`document` bigint(20) NULL,
|
|
||||||
`date_added` date NOT NULL,
|
|
||||||
`valid_until` date NOT NULL,
|
|
||||||
`status` enum('Active','Inactive','Draft') default 'Active',
|
|
||||||
`details` text default null,
|
|
||||||
`attachment` varchar(100) NULL,
|
|
||||||
CONSTRAINT `Fk_EmployeeDocuments_Documents` FOREIGN KEY (`document`) REFERENCES `Documents` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
|
||||||
CONSTRAINT `Fk_EmployeeDocuments_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `CompanyLoans` (
|
create table `CompanyLoans` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
@@ -513,54 +495,6 @@ create table `Notifications` (
|
|||||||
KEY `toUser_status_time` (`toUser`,`status`,`time`)
|
KEY `toUser_status_time` (`toUser`,`status`,`time`)
|
||||||
) engine=innodb default charset=utf8;
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
create table `Courses` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` varchar(300) NOT NULL,
|
|
||||||
`name` varchar(300) NOT NULL,
|
|
||||||
`description` text default null,
|
|
||||||
`coordinator` bigint(20) NULL,
|
|
||||||
`trainer` varchar(300) NULL,
|
|
||||||
`trainer_info` text default null,
|
|
||||||
`paymentType` enum('Company Sponsored','Paid by Employee') default 'Company Sponsored',
|
|
||||||
`currency` varchar(3) not null,
|
|
||||||
`cost` decimal(12,2) DEFAULT 0.00,
|
|
||||||
`status` enum('Active','Inactive') default 'Active',
|
|
||||||
`created` datetime default '0000-00-00 00:00:00',
|
|
||||||
`updated` datetime default '0000-00-00 00:00:00',
|
|
||||||
CONSTRAINT `Fk_Courses_Employees` FOREIGN KEY (`coordinator`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
create table `TrainingSessions` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(300) NOT NULL,
|
|
||||||
`course` bigint(20) NOT NULL,
|
|
||||||
`description` text default null,
|
|
||||||
`scheduled` datetime default '0000-00-00 00:00:00',
|
|
||||||
`dueDate` datetime default '0000-00-00 00:00:00',
|
|
||||||
`deliveryMethod` enum('Classroom','Self Study','Online') default 'Classroom',
|
|
||||||
`deliveryLocation` varchar(500) NULL,
|
|
||||||
`status` enum('Pending','Approved','Completed','Cancelled') default 'Pending',
|
|
||||||
`attendanceType` enum('Sign Up','Assign') default 'Sign Up',
|
|
||||||
`attachment` varchar(300) NULL,
|
|
||||||
`created` datetime default '0000-00-00 00:00:00',
|
|
||||||
`updated` datetime default '0000-00-00 00:00:00',
|
|
||||||
CONSTRAINT `Fk_TrainingSessions_Courses` FOREIGN KEY (`course`) REFERENCES `Courses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
|
|
||||||
create table `EmployeeTrainingSessions` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
`employee` bigint(20) NOT NULL,
|
|
||||||
`trainingSession` bigint(20) NULL,
|
|
||||||
`feedBack` varchar(1500) NULL,
|
|
||||||
`status` enum('Scheduled','Attended','Not-Attended') default 'Scheduled',
|
|
||||||
CONSTRAINT `Fk_EmployeeTrainingSessions_TrainingSessions` FOREIGN KEY (`trainingSession`) REFERENCES `TrainingSessions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
CONSTRAINT `Fk_EmployeeTrainingSessions_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
||||||
primary key (`id`)
|
|
||||||
) engine=innodb default charset=utf8;
|
|
||||||
|
|
||||||
|
|
||||||
create table `ImmigrationDocuments` (
|
create table `ImmigrationDocuments` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
@@ -604,11 +538,14 @@ create table `EmployeeTravelRecords` (
|
|||||||
`travel_date` datetime NULL default '0000-00-00 00:00:00',
|
`travel_date` datetime NULL default '0000-00-00 00:00:00',
|
||||||
`return_date` datetime NULL default '0000-00-00 00:00:00',
|
`return_date` datetime NULL default '0000-00-00 00:00:00',
|
||||||
`details` varchar(500) default null,
|
`details` varchar(500) default null,
|
||||||
|
`funding` decimal(10,3) NULL,
|
||||||
|
`currency` bigint(20) NULL,
|
||||||
`attachment1` varchar(100) NULL,
|
`attachment1` varchar(100) NULL,
|
||||||
`attachment2` varchar(100) NULL,
|
`attachment2` varchar(100) NULL,
|
||||||
`attachment3` varchar(100) NULL,
|
`attachment3` varchar(100) NULL,
|
||||||
`created` timestamp NULL default '0000-00-00 00:00:00',
|
`created` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
`updated` timestamp NULL default '0000-00-00 00:00:00',
|
`updated` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending',
|
||||||
CONSTRAINT `Fk_EmployeeTravelRecords_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
CONSTRAINT `Fk_EmployeeTravelRecords_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
primary key (`id`)
|
primary key (`id`)
|
||||||
) engine=innodb default charset=utf8;
|
) engine=innodb default charset=utf8;
|
||||||
@@ -771,5 +708,82 @@ create table `DeductionRules` (
|
|||||||
) engine=innodb default charset=utf8;
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `Crons` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) NOT NULL,
|
||||||
|
`class` varchar(100) NOT NULL,
|
||||||
|
`lastrun` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`frequency` int(4) NOT NULL,
|
||||||
|
`time` varchar(50) NOT NULL,
|
||||||
|
`type` enum('Minutely','Hourly','Daily','Weekly','Monthly','Yearly') default 'Hourly',
|
||||||
|
`status` enum('Enabled','Disabled') default 'Enabled',
|
||||||
|
primary key (`id`),
|
||||||
|
key `KEY_Crons_frequency` (`frequency`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `Emails` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`subject` varchar(300) NOT NULL,
|
||||||
|
`toEmail` varchar(300) NOT NULL,
|
||||||
|
`template` text NULL,
|
||||||
|
`params` text NULL,
|
||||||
|
`cclist` varchar(500) NULL,
|
||||||
|
`bcclist` varchar(500) NULL,
|
||||||
|
`error` varchar(500) NULL,
|
||||||
|
`created` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`updated` DATETIME default '0000-00-00 00:00:00',
|
||||||
|
`status` enum('Pending','Sent','Error') default 'Pending',
|
||||||
|
primary key (`id`),
|
||||||
|
key `KEY_Emails_status` (`status`),
|
||||||
|
key `KEY_Emails_created` (`created`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `ExpensesCategories` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(500) NOT NULL,
|
||||||
|
`created` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`updated` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`pre_approve` enum('Yes','No') default 'Yes',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
create table `ExpensesPaymentMethods` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(500) NOT NULL,
|
||||||
|
`created` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`updated` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `EmployeeExpenses` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`employee` bigint(20) NOT NULL,
|
||||||
|
`expense_date` date NULL default '0000-00-00',
|
||||||
|
`payment_method` bigint(20) NOT NULL,
|
||||||
|
`transaction_no` varchar(300) NOT NULL,
|
||||||
|
`payee` varchar(500) NOT NULL,
|
||||||
|
`category` bigint(20) NOT NULL,
|
||||||
|
`notes` text,
|
||||||
|
`amount` decimal(10,3) NULL,
|
||||||
|
`currency` bigint(20) NULL,
|
||||||
|
`attachment1` varchar(100) NULL,
|
||||||
|
`attachment2` varchar(100) NULL,
|
||||||
|
`attachment3` varchar(100) NULL,
|
||||||
|
`created` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`updated` timestamp NULL default '0000-00-00 00:00:00',
|
||||||
|
`status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending',
|
||||||
|
CONSTRAINT `Fk_EmployeeExpenses_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_EmployeeExpenses_pm` FOREIGN KEY (`payment_method`) REFERENCES `ExpensesPaymentMethods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `Fk_EmployeeExpenses_category` FOREIGN KEY (`category`) REFERENCES `ExpensesCategories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|
||||||
|
|
||||||
|
create table `Timezones` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(100) not null default '',
|
||||||
|
`details` varchar(255) not null default '',
|
||||||
|
primary key (`id`)
|
||||||
|
) engine=innodb default charset=utf8;
|
||||||
|
|||||||
@@ -1,50 +1,88 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!class_exists('AttendanceAdminManager')) {
|
if (!class_exists('AttendanceAdminManager')) {
|
||||||
|
|
||||||
class AttendanceAdminManager extends AbstractModuleManager{
|
class AttendanceAdminManager extends AbstractModuleManager{
|
||||||
|
|
||||||
public function initializeUserClasses(){
|
public function initializeUserClasses(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initializeFieldMappings(){
|
public function initializeFieldMappings(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initializeDatabaseErrorMappings(){
|
public function initializeDatabaseErrorMappings(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setupModuleClassDefinitions(){
|
public function setupModuleClassDefinitions(){
|
||||||
$this->addModelClass('Attendance');
|
$this->addModelClass('Attendance');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public function getDashboardItemData(){
|
||||||
|
$data = array();
|
||||||
|
$attendance = new Attendance();
|
||||||
|
$data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'");
|
||||||
|
if(empty($data['numberOfAttendanceLastWeek'])){
|
||||||
|
$data['numberOfAttendanceLastWeek'] = 0;
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initQuickAccessMenu(){
|
||||||
|
UIManager::getInstance()->addQuickAccessMenuItem("Clocked In Employees","fa-clock-o",CLIENT_BASE_URL."?g=admin&n=attendance&m=admin_Employees#tabAttendanceStatus",array("Admin","Manager"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists('AttendanceDashboardManager')) {
|
||||||
|
|
||||||
|
class AttendanceDashboardManager extends AbstractModuleManager{
|
||||||
|
|
||||||
|
public function initializeUserClasses(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initializeFieldMappings(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initializeDatabaseErrorMappings(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setupModuleClassDefinitions(){
|
||||||
|
$this->addModelClass('Attendance');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Model Classes
|
//Model Classes
|
||||||
|
|
||||||
if (!class_exists('Attendance')) {
|
if (!class_exists('Attendance')) {
|
||||||
class Attendance extends ICEHRM_Record {
|
class Attendance extends ICEHRM_Record {
|
||||||
var $_table = 'Attendance';
|
var $_table = 'Attendance';
|
||||||
|
|
||||||
public function getAdminAccess(){
|
public function getAdminAccess(){
|
||||||
return array("get","element","save","delete");
|
return array("get","element","save","delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getManagerAccess(){
|
public function getManagerAccess(){
|
||||||
return array("get","element","save","delete");
|
return array("get","element","save","delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUserAccess(){
|
public function getUserAccess(){
|
||||||
return array("get");
|
return array("get");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUserOnlyMeAccess(){
|
public function getUserOnlyMeAccess(){
|
||||||
return array("element","save","delete");
|
return array("element","save","delete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
18
ext/admin/attendance/dashboard.html
Normal file
18
ext/admin/attendance/dashboard.html
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
<div class="small-box bg-yellow">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>
|
||||||
|
Attendance
|
||||||
|
</h3>
|
||||||
|
<p id="numberOfAttendanceLastWeek">
|
||||||
|
#_numberOfAttendanceLastWeek_# Entries Last Week
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-clock"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="attendanceLink">
|
||||||
|
Monitor Attendance <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -158,6 +158,13 @@ AttendanceAdapter.method('saveFailCallback', function(callBackData) {
|
|||||||
this.showMessage("Error saving attendance entry", callBackData);
|
this.showMessage("Error saving attendance entry", callBackData);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AttendanceAdapter.method('isSubProfileTable', function() {
|
||||||
|
if(this.user.user_level == "Admin"){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -215,4 +222,13 @@ AttendanceStatusAdapter.method('getActionButtonsHtml', function(id,data) {
|
|||||||
html = html.replace(/_COLOR_/g,'green');
|
html = html.replace(/_COLOR_/g,'green');
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
AttendanceStatusAdapter.method('isSubProfileTable', function() {
|
||||||
|
if(this.user.user_level == "Admin"){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
"menu":"Employees",
|
"menu":"Employees",
|
||||||
"order":"8",
|
"order":"8",
|
||||||
"icon":"fa-clock-o",
|
"icon":"fa-clock-o",
|
||||||
"user_levels":["Admin"],
|
"user_levels":["Admin","Manager"],
|
||||||
|
"dashboardPosition":5,
|
||||||
|
|
||||||
"permissions":
|
"permissions":
|
||||||
{}
|
{}
|
||||||
|
|||||||
@@ -20,6 +20,14 @@ if (!class_exists('Company_structureAdminManager')) {
|
|||||||
|
|
||||||
$this->addModelClass('CompanyStructure');
|
$this->addModelClass('CompanyStructure');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDashboardItemData(){
|
||||||
|
$data = array();
|
||||||
|
$company = new CompanyStructure();
|
||||||
|
$data['numberOfCompanyStuctures'] = $company->Count("1 = 1");
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,4 +57,24 @@ if (!class_exists('CompanyStructure')) {
|
|||||||
return new IceResponse(IceResponse::SUCCESS,"");
|
return new IceResponse(IceResponse::SUCCESS,"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!class_exists('Timezone')) {
|
||||||
|
class Timezone extends ICEHRM_Record {
|
||||||
|
var $_table = 'Timezones';
|
||||||
|
|
||||||
|
public function getAdminAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getManagerAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess(){
|
||||||
|
return array("get","element");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
17
ext/admin/company_structure/dashboard.html
Normal file
17
ext/admin/company_structure/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-green">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>Company</h3>
|
||||||
|
<p id="numberOfCompanyStuctures">
|
||||||
|
#_numberOfCompanyStuctures_# Departments
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-shuffle"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="companyLink">
|
||||||
|
Manage Company <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -17,6 +17,7 @@ CompanyStructureAdapter.method('getDataMapping', function() {
|
|||||||
"address",
|
"address",
|
||||||
"type",
|
"type",
|
||||||
"country",
|
"country",
|
||||||
|
"timezone",
|
||||||
"parent"
|
"parent"
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
@@ -28,6 +29,7 @@ CompanyStructureAdapter.method('getHeaders', function() {
|
|||||||
{ "sTitle": "Address","bSortable":false},
|
{ "sTitle": "Address","bSortable":false},
|
||||||
{ "sTitle": "Type"},
|
{ "sTitle": "Type"},
|
||||||
{ "sTitle": "Country", "sClass": "center" },
|
{ "sTitle": "Country", "sClass": "center" },
|
||||||
|
{ "sTitle": "Time Zone"},
|
||||||
{ "sTitle": "Parent Structure"}
|
{ "sTitle": "Parent Structure"}
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
@@ -39,7 +41,8 @@ CompanyStructureAdapter.method('getFormFields', function() {
|
|||||||
[ "description", {"label":"Details","type":"textarea","validation":""}],
|
[ "description", {"label":"Details","type":"textarea","validation":""}],
|
||||||
[ "address", {"label":"Address","type":"textarea","validation":"none"}],
|
[ "address", {"label":"Address","type":"textarea","validation":"none"}],
|
||||||
[ "type", {"label":"Type","type":"select","source":[["Company","Company"],["Head Office","Head Office"],["Regional Office","Regional Office"],["Department","Department"],["Unit","Unit"],["Sub Unit","Sub Unit"],["Other","Other"]]}],
|
[ "type", {"label":"Type","type":"select","source":[["Company","Company"],["Head Office","Head Office"],["Regional Office","Regional Office"],["Department","Department"],["Unit","Unit"],["Sub Unit","Sub Unit"],["Other","Other"]]}],
|
||||||
[ "country", {"label":"Country","type":"select","remote-source":["Country","code","name"]}],
|
[ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}],
|
||||||
|
[ "timezone", {"label":"Time Zone","type":"select2","allow-null":false,"remote-source":["Timezone","name","details"]}],
|
||||||
[ "parent", {"label":"Parent Structure","type":"select","allow-null":true,"remote-source":["CompanyStructure","id","title"]}]
|
[ "parent", {"label":"Parent Structure","type":"select","allow-null":true,"remote-source":["CompanyStructure","id","title"]}]
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
@@ -298,7 +301,7 @@ CompanyGraphAdapter.method('fixCyclicParent', function(sourceData) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
CompanyGraphAdapter.method('getHelpLink', function () {
|
CompanyGraphAdapter.method('getHelpLink', function () {
|
||||||
return 'http://blog.icehrm.com/?page_id=61';
|
return 'http://blog.icehrm.com/docs/companystructure/';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
"label":"Company Structure",
|
"label":"Company Structure",
|
||||||
"menu":"Admin",
|
"menu":"Admin",
|
||||||
"order":"2",
|
"order":"2",
|
||||||
"icon":"fa-building-o",
|
"icon":"fa-building-o",
|
||||||
"user_levels":["Admin","Manager"],
|
"user_levels":["Admin","Manager"],
|
||||||
|
"dashboardPosition":2,
|
||||||
|
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
"Manager":{
|
"Manager":{
|
||||||
"Add Company Structure":"No",
|
"Add Company Structure":"No",
|
||||||
"Edit Company Structure":"No",
|
"Edit Company Structure":"No",
|
||||||
"Delete Company Structure":"No"
|
"Delete Company Structure":"No"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,14 +40,26 @@ class DashboardActionManager extends SubActionManager{
|
|||||||
|
|
||||||
$attendance = new Attendance();
|
$attendance = new Attendance();
|
||||||
$data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'");
|
$data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'");
|
||||||
|
if(empty($data['numberOfAttendanceLastWeek'])){
|
||||||
|
$data['numberOfAttendanceLastWeek'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$empLeave = new EmployeeLeave();
|
$empLeave = new EmployeeLeave();
|
||||||
$data['numberOfLeaves'] = $empLeave->Count("date_start > '".date("Y-m-d")."'");
|
$data['numberOfLeaves'] = $empLeave->Count("date_start > '".date("Y-m-d")."'");
|
||||||
|
|
||||||
$timeEntry = new EmployeeTimeEntry();
|
$timeEntry = new EmployeeTimeEntry();
|
||||||
$data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'");
|
$data['numberOfAttendanceLastWeek'] = $timeEntry->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'");
|
||||||
|
|
||||||
|
$candidate = new Candidate();
|
||||||
|
$data['numberOfCandidates'] = $candidate->Count("1 = 1");
|
||||||
|
|
||||||
|
$job = new Job();
|
||||||
|
$data['numberOfJobs'] = $job->Count("status = 'Active'");
|
||||||
|
|
||||||
|
$course = new Course();
|
||||||
|
$data['numberOfCourses'] = $course->Count("1 = 1");
|
||||||
|
|
||||||
return new IceResponse(IceResponse::SUCCESS,$data);
|
return new IceResponse(IceResponse::SUCCESS,$data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
|
|
||||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
||||||
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -25,199 +25,48 @@ $moduleName = 'dashboard';
|
|||||||
define('MODULE_PATH',dirname(__FILE__));
|
define('MODULE_PATH',dirname(__FILE__));
|
||||||
include APP_BASE_PATH.'header.php';
|
include APP_BASE_PATH.'header.php';
|
||||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||||
|
|
||||||
?><div class="span9">
|
?><div class="span9">
|
||||||
<div id="iceannon">
|
<div class="row">
|
||||||
<div class="callout callout-warning lead" style="font-size: 14px;">
|
<?php
|
||||||
<h4>Why not upgrade to IceHrm Pro Version</h4>
|
$moduleManagers = BaseService::getInstance()->getModuleManagers();
|
||||||
<p>
|
$dashBoardList = array();
|
||||||
IceHrm Pro is the feature rich upgrade to IceHrm open source version. It comes with improved modules for
|
foreach($moduleManagers as $moduleManagerObj){
|
||||||
employee management, leave management, LDAP support and number of other features over open source version.
|
|
||||||
Hit this <a href="http://icehrm.com/#compare" class="btn btn-primary btn-xs target="_blank">link</a> to do a full one to one comparison.
|
|
||||||
|
|
||||||
Also you can learn more about IceHrm Pro <a href="http://blog.icehrm.com/icehrm-pro/" class="btn btn-primary btn-xs" target="_blank">here</a>
|
//Check if this is not an admin module
|
||||||
<br/>
|
if($moduleManagerObj->getModuleType() != 'admin'){
|
||||||
<br/>
|
continue;
|
||||||
<a href="http://icehrm.com/modules.php" class="btn btn-success btm-xs" target="_blank"><i class="fa fa-checkout"></i> Buy IceHrm Pro</a>
|
}
|
||||||
</p>
|
|
||||||
</div>
|
$allowed = BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj);
|
||||||
|
|
||||||
|
if(!$allowed){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$item = $moduleManagerObj->getDashboardItem();
|
||||||
|
if(!empty($item)) {
|
||||||
|
$index = $moduleManagerObj->getDashboardItemIndex();
|
||||||
|
$dashBoardList[$index] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ksort($dashBoardList);
|
||||||
|
|
||||||
|
foreach($dashBoardList as $k=>$v){
|
||||||
|
echo $v;
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-aqua">
|
|
||||||
<div class="inner">
|
|
||||||
<h3>
|
|
||||||
People
|
|
||||||
</h3>
|
|
||||||
<p id="numberOfEmployees">
|
|
||||||
.. Employees
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-person-stalker"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="employeeLink">
|
|
||||||
Manage Employees <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-green">
|
|
||||||
<div class="inner">
|
|
||||||
<h3 id="numberOfCompanyStuctures">..</h3>
|
|
||||||
<p >
|
|
||||||
Company Structures
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-shuffle"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="companyLink">
|
|
||||||
Manage Company <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-yellow">
|
|
||||||
<div class="inner">
|
|
||||||
<h3>Users</h3>
|
|
||||||
<p id="numberOfUsers">
|
|
||||||
.. Users
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-person-add"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="usersLink">
|
|
||||||
Manage Users <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-red">
|
|
||||||
<div class="inner">
|
|
||||||
<h3 id="numberOfProjects">..</h3>
|
|
||||||
<p>
|
|
||||||
Active Projects
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-pie-graph"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="projectsLink">
|
|
||||||
Update Clients/Projects <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-yellow">
|
|
||||||
<div class="inner">
|
|
||||||
<h3>
|
|
||||||
Attendance
|
|
||||||
</h3>
|
|
||||||
<p id="numberOfAttendanceLastWeek">
|
|
||||||
.. Entries Last Week
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-clock"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="attendanceLink">
|
|
||||||
Monitor Attendance <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-red">
|
|
||||||
<div class="inner">
|
|
||||||
<h3 id="numberOfLeaves">..</h3>
|
|
||||||
<p >Upcoming Leaves</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-calendar"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="leaveLink">
|
|
||||||
Leave Management <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-teal">
|
|
||||||
<div class="inner">
|
|
||||||
<h3>Reports</h3>
|
|
||||||
<p>
|
|
||||||
View / Download Reports
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-document-text"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="reportsLink">
|
|
||||||
Create a Report <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-green">
|
|
||||||
<div class="inner">
|
|
||||||
<h3>Settings</h3>
|
|
||||||
<p>
|
|
||||||
Configure IceHrm
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-settings"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="settingsLink">
|
|
||||||
Update Settings <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var modJsList = new Array();
|
var modJsList = new Array();
|
||||||
|
|
||||||
modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');
|
modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');
|
||||||
|
|
||||||
var modJs = modJsList['tabDashboard'];
|
var modJs = modJsList['tabDashboard'];
|
||||||
|
|
||||||
$("#employeeLink").attr("href",modJs.getCustomUrl('?g=admin&n=employees&m=admin_Admin'));
|
|
||||||
$("#companyLink").attr("href",modJs.getCustomUrl('?g=admin&n=company_structure&m=admin_Admin'));
|
|
||||||
$("#usersLink").attr("href",modJs.getCustomUrl('?g=admin&n=users&m=admin_System'));
|
|
||||||
$("#projectsLink").attr("href",modJs.getCustomUrl('?g=admin&n=projects&m=admin_Admin'));
|
|
||||||
$("#attendanceLink").attr("href",modJs.getCustomUrl('?g=admin&n=attendance&m=admin_Admin'));
|
|
||||||
$("#leaveLink").attr("href",modJs.getCustomUrl('?g=admin&n=leaves&m=admin_Admin'));
|
|
||||||
$("#reportsLink").attr("href",modJs.getCustomUrl('?g=admin&n=reports&m=admin_Reports'));
|
|
||||||
$("#settingsLink").attr("href",modJs.getCustomUrl('?g=admin&n=settings&m=admin_System'));
|
|
||||||
|
|
||||||
modJs.getInitData();
|
|
||||||
|
|
||||||
$(document).ready(function(){
|
|
||||||
try{
|
|
||||||
$.ajax({
|
|
||||||
url : "https://icehrm-public.s3.amazonaws.com/icehrmnews.html",
|
|
||||||
success : function(result){
|
|
||||||
$('#iceannon').html(result);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}catch(e){}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php include APP_BASE_PATH.'footer.php';?>
|
<?php include APP_BASE_PATH.'footer.php';?>
|
||||||
@@ -62,13 +62,16 @@ DashboardAdapter.method('getInitData', function() {
|
|||||||
DashboardAdapter.method('getInitDataSuccessCallBack', function(data) {
|
DashboardAdapter.method('getInitDataSuccessCallBack', function(data) {
|
||||||
|
|
||||||
$("#numberOfEmployees").html(data['numberOfEmployees']+" Employees");
|
$("#numberOfEmployees").html(data['numberOfEmployees']+" Employees");
|
||||||
$("#numberOfCompanyStuctures").html(data['numberOfCompanyStuctures']);
|
$("#numberOfCompanyStuctures").html(data['numberOfCompanyStuctures']+" Departments");
|
||||||
$("#numberOfUsers").html(data['numberOfUsers']+" Users");
|
$("#numberOfUsers").html(data['numberOfUsers']+" Users");
|
||||||
$("#numberOfProjects").html(data['numberOfProjects']);
|
$("#numberOfProjects").html(data['numberOfProjects']+" Active Projects");
|
||||||
$("#numberOfAttendanceLastWeek").html(data['numberOfAttendanceLastWeek']+" Entries Last Week");
|
$("#numberOfAttendanceLastWeek").html(data['numberOfAttendanceLastWeek']+" Entries Last Week");
|
||||||
$("#numberOfLeaves").html(data['numberOfLeaves']);
|
$("#numberOfLeaves").html(data['numberOfLeaves']+" Upcoming");
|
||||||
$("#numberOfTimeEntries").html(data['numberOfTimeEntries']);
|
$("#numberOfTimeEntries").html(data['numberOfTimeEntries']);
|
||||||
|
$("#numberOfCandidates").html(data['numberOfCandidates']+" Candidates");
|
||||||
|
$("#numberOfJobs").html(data['numberOfJobs']+" Active");
|
||||||
|
$("#numberOfCourses").html(data['numberOfCourses']+" Courses");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardAdapter.method('getInitDataFailCallBack', function(callBackData) {
|
DashboardAdapter.method('getInitDataFailCallBack', function(callBackData) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"menu":"Admin",
|
"menu":"Admin",
|
||||||
"order":"1",
|
"order":"1",
|
||||||
"icon":"fa-desktop",
|
"icon":"fa-desktop",
|
||||||
"user_levels":["Admin"],
|
"user_levels":["Admin","Other"],
|
||||||
|
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (!class_exists('DocumentsAdminManager')) {
|
|
||||||
class DocumentsAdminManager extends AbstractModuleManager{
|
|
||||||
|
|
||||||
public function initializeUserClasses(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function initializeFieldMappings(){
|
|
||||||
$this->addFileFieldMapping('EmployeeDocument', 'attachment', 'name');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function initializeDatabaseErrorMappings(){
|
|
||||||
$this->addDatabaseErrorMapping('CONSTRAINT `Fk_EmployeeDocuments_Documents` FOREIGN KEY','Can not delete Document Type, users have already uploaded these types of documents');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setupModuleClassDefinitions(){
|
|
||||||
|
|
||||||
$this->addModelClass('Document');
|
|
||||||
$this->addModelClass('EmployeeDocument');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!class_exists('Document')) {
|
|
||||||
class Document extends ICEHRM_Record {
|
|
||||||
var $_table = 'Documents';
|
|
||||||
|
|
||||||
public function getAdminAccess(){
|
|
||||||
return array("get","element","save","delete");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function getUserAccess(){
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('EmployeeDocument')) {
|
|
||||||
class EmployeeDocument extends ICEHRM_Record {
|
|
||||||
var $_table = 'EmployeeDocuments';
|
|
||||||
|
|
||||||
public function getAdminAccess(){
|
|
||||||
return array("get","element","save","delete");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getManagerAccess(){
|
|
||||||
return array("get","element","save","delete");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUserAccess(){
|
|
||||||
return array("get");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUserOnlyMeAccess(){
|
|
||||||
return array("element","save","delete");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function Insert(){
|
|
||||||
if(empty($this->date_added)){
|
|
||||||
$this->date_added = date("Y-m-d H:i:s");
|
|
||||||
}
|
|
||||||
return parent::Insert();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
This file is part of iCE Hrm.
|
|
||||||
|
|
||||||
iCE Hrm is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
iCE Hrm is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
------------------------------------------------------------------
|
|
||||||
|
|
||||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
|
||||||
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
|
||||||
*/
|
|
||||||
|
|
||||||
$moduleName = 'documents';
|
|
||||||
define('MODULE_PATH',dirname(__FILE__));
|
|
||||||
include APP_BASE_PATH.'header.php';
|
|
||||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
|
||||||
?><div class="span9">
|
|
||||||
|
|
||||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
|
||||||
<li class="active"><a id="tabDocument" href="#tabPageDocument">Document Types</a></li>
|
|
||||||
<li class=""><a id="tabEmployeeDocument" href="#tabPageEmployeeDocument">Employee Documents</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="tab-content">
|
|
||||||
<div class="tab-pane active" id="tabPageDocument">
|
|
||||||
<div id="Document" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div id="DocumentForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tab-pane" id="tabPageEmployeeDocument">
|
|
||||||
<div id="EmployeeDocument" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div id="EmployeeDocumentForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var modJsList = new Array();
|
|
||||||
|
|
||||||
modJsList['tabDocument'] = new DocumentAdapter('Document','Document');
|
|
||||||
modJsList['tabEmployeeDocument'] = new EmployeeDocumentAdapter('EmployeeDocument','EmployeeDocument');
|
|
||||||
|
|
||||||
var modJs = modJsList['tabDocument'];
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<?php include APP_BASE_PATH.'footer.php';?>
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
/**
|
|
||||||
* Author: Thilina Hasantha
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DocumentAdapter
|
|
||||||
*/
|
|
||||||
|
|
||||||
function DocumentAdapter(endPoint) {
|
|
||||||
this.initAdapter(endPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
DocumentAdapter.inherits(AdapterBase);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DocumentAdapter.method('getDataMapping', function() {
|
|
||||||
return [
|
|
||||||
"id",
|
|
||||||
"name",
|
|
||||||
"details"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
DocumentAdapter.method('getHeaders', function() {
|
|
||||||
return [
|
|
||||||
{ "sTitle": "ID" ,"bVisible":false},
|
|
||||||
{ "sTitle": "Name" },
|
|
||||||
{ "sTitle": "Details"}
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
DocumentAdapter.method('getFormFields', function() {
|
|
||||||
return [
|
|
||||||
[ "id", {"label":"ID","type":"hidden"}],
|
|
||||||
[ "name", {"label":"Name","type":"text","validation":""}],
|
|
||||||
[ "details", {"label":"Details","type":"textarea","validation":"none"}]
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
DocumentAdapter.method('getHelpLink', function () {
|
|
||||||
return 'http://blog.icehrm.com/?page_id=88';
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function EmployeeDocumentAdapter(endPoint) {
|
|
||||||
this.initAdapter(endPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.inherits(AdapterBase);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getDataMapping', function() {
|
|
||||||
return [
|
|
||||||
"id",
|
|
||||||
"employee",
|
|
||||||
"document",
|
|
||||||
"details",
|
|
||||||
"date_added",
|
|
||||||
"status",
|
|
||||||
"attachment"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getHeaders', function() {
|
|
||||||
return [
|
|
||||||
{ "sTitle": "ID" ,"bVisible":false},
|
|
||||||
{ "sTitle": "Employee" },
|
|
||||||
{ "sTitle": "Document" },
|
|
||||||
{ "sTitle": "Details" },
|
|
||||||
{ "sTitle": "Date Added"},
|
|
||||||
{ "sTitle": "Status"},
|
|
||||||
{ "sTitle": "Attachment","bVisible":false}
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getFormFields', function() {
|
|
||||||
return [
|
|
||||||
[ "id", {"label":"ID","type":"hidden"}],
|
|
||||||
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}],
|
|
||||||
[ "document", {"label":"Document","type":"select2","remote-source":["Document","id","name"]}],
|
|
||||||
[ "date_added", {"label":"Date Added","type":"date","validation":""}],
|
|
||||||
[ "valid_until", {"label":"Valid Until","type":"date","validation":"none"}],
|
|
||||||
[ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"],["Draft","Draft"]]}],
|
|
||||||
[ "details", {"label":"Details","type":"textarea","validation":"none"}],
|
|
||||||
[ "attachment", {"label":"Attachment","type":"fileupload","validation":"none"}]
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getFilters', function() {
|
|
||||||
return [
|
|
||||||
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}]
|
|
||||||
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getActionButtonsHtml', function(id,data) {
|
|
||||||
var html = '<div style="width:80px;"><img class="tableActionButton" src="_BASE_images/edit.png" style="cursor:pointer;" rel="tooltip" title="Edit" onclick="modJs.edit(_id_);return false;"></img><img class="tableActionButton" src="_BASE_images/download.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Download Document" onclick="download(\'_attachment_\');return false;"></img><img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Delete" onclick="modJs.deleteRow(_id_);return false;"></img></div>';
|
|
||||||
html = html.replace(/_id_/g,id);
|
|
||||||
html = html.replace(/_attachment_/g,data[6]);
|
|
||||||
html = html.replace(/_BASE_/g,this.baseUrl);
|
|
||||||
return html;
|
|
||||||
});
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"label":"Document Management",
|
|
||||||
"menu":"Employees",
|
|
||||||
"order":"2",
|
|
||||||
"icon":"fa-files-o",
|
|
||||||
"user_levels":["Admin"],
|
|
||||||
|
|
||||||
"permissions":
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -20,6 +20,21 @@ if (!class_exists('EmployeesAdminManager')) {
|
|||||||
$this->addModelClass('EmploymentStatus');
|
$this->addModelClass('EmploymentStatus');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDashboardItemData(){
|
||||||
|
$data = array();
|
||||||
|
$emp = new Employee();
|
||||||
|
$data['numberOfEmployees'] = $emp->Count("1 = 1");
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initQuickAccessMenu(){
|
||||||
|
UIManager::getInstance()->addQuickAccessMenuItem("View Employees","fa-users",CLIENT_BASE_URL."?g=admin&n=employees&m=admin_Employees",array("Admin","Manager"));
|
||||||
|
UIManager::getInstance()->addQuickAccessMenuItem("Add a New Employee","fa-edit",CLIENT_BASE_URL."?g=admin&n=employees&m=admin_Employees&action=new",array("Admin"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
ext/admin/employees/dashboard.html
Normal file
19
ext/admin/employees/dashboard.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-aqua">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>
|
||||||
|
People
|
||||||
|
</h3>
|
||||||
|
<p id="numberOfEmployees">
|
||||||
|
#_numberOfEmployees_# Employees
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-person-stalker"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="employeeLink">
|
||||||
|
Manage Employees <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"label":"Employees",
|
"label":"Employees",
|
||||||
"menu":"Employees",
|
"menu":"Employees",
|
||||||
"order":"1",
|
"order":"1",
|
||||||
"icon":"fa-users",
|
"icon":"fa-users",
|
||||||
"user_levels":["Admin"],
|
"user_levels":["Admin","Manager"],
|
||||||
|
"dashboardPosition":1,
|
||||||
|
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ JobTitleAdapter.method('getFormFields', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
JobTitleAdapter.method('getHelpLink', function () {
|
JobTitleAdapter.method('getHelpLink', function () {
|
||||||
return 'http://blog.icehrm.com/?page_id=80';
|
return 'http://blog.icehrm.com/docs/jobdetails/';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"label":"Company Loans",
|
"label":"Company Loans",
|
||||||
"menu":"Admin",
|
"menu":"Admin",
|
||||||
"order":"7",
|
"order":"81",
|
||||||
"icon":"fa-shield",
|
"icon":"fa-shield",
|
||||||
"user_levels":["Admin"],
|
"user_levels":["Admin"],
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ ModuleAdapter.method('getFormFields', function() {
|
|||||||
[ "id", {"label":"ID","type":"hidden"}],
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
[ "label", {"label":"Label","type":"text","validation":""}],
|
[ "label", {"label":"Label","type":"text","validation":""}],
|
||||||
[ "status", {"label":"Status","type":"select","source":[["Enabled","Enabled"],["Disabled","Disabled"]]}],
|
[ "status", {"label":"Status","type":"select","source":[["Enabled","Enabled"],["Disabled","Disabled"]]}],
|
||||||
[ "user_levels", {"label":"User Levels","type":"select2multi","source":[["Admin","Admin"],["Manager","Manager"],["Employee","Employee"],["Other","Other"]]}]
|
[ "user_levels", {"label":"User Levels","type":"select2multi","source":[["Admin","Admin"],["Manager","Manager"],["Employee","Employee"],["Other","Other"]]}],
|
||||||
|
[ "user_roles", {"label":"User Roles","type":"select2multi","remote-source":["UserRole","id","name"]}]
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -65,7 +66,8 @@ ModuleAdapter.method('getActionButtonsHtml', function(id,data) {
|
|||||||
nonEditableFields["admin_Settings"] = 1;
|
nonEditableFields["admin_Settings"] = 1;
|
||||||
nonEditableFields["admin_Users"] = 1;
|
nonEditableFields["admin_Users"] = 1;
|
||||||
nonEditableFields["admin_Upgrade"] = 1;
|
nonEditableFields["admin_Upgrade"] = 1;
|
||||||
|
nonEditableFields["admin_Upgrade"] = 1;
|
||||||
|
|
||||||
nonEditableFields["user_Basic Information"] = 1;
|
nonEditableFields["user_Basic Information"] = 1;
|
||||||
|
|
||||||
if(nonEditableFields[data[3]+"_"+data[1]] == 1){
|
if(nonEditableFields[data[3]+"_"+data[1]] == 1){
|
||||||
|
|||||||
44
ext/admin/payroll/LICENSE.txt
Normal file
44
ext/admin/payroll/LICENSE.txt
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
ICEHRM END USER LICENSE AGREEMENT
|
||||||
|
NOTICE TO ALL USERS: BY PURCHASING THE MODULE, YOU (EITHER AN INDIVIDUAL OR A SINGLE ENTITY) CONSENT TO BE BOUND BY AND BECOME A PARTY TO THIS AGREEMENT.
|
||||||
|
|
||||||
|
All references to "Software" herein shall be deemed to include the software license with which you will be provided by Gamonoid Media Pvt Ltd, as part of the Software.
|
||||||
|
|
||||||
|
1. LICENSE GRANT. Subject to the payment of the applicable licence fees, and subject to the terms and conditions of this Agreement, ICEHRM hereby grants to you a non-exclusive, non-transferable right to use one copy of the specified version of the Software and the accompanying documentation (the "Documentation") for the term of this Agreement solely for your own internal business purposes. You may install one copy of the Software for production use.
|
||||||
|
.
|
||||||
|
2. USE. The Software is licensed as a single product; it may not be used on more than one ICEHRM Server at a time. The Software is "in use" on a Server when its installed on a Server. You shall not, nor permit any third party to copy (other than as expressly permitted herein). You shall not rent, lease or lend the Software to any other person, nor transfer or sub-licence your licence rights to any other person.
|
||||||
|
|
||||||
|
3. TERM. This Agreement is effective until terminated as set forth herein. This Agreement will terminate automatically if you fail to comply with any of the conditions, limitations or other requirements described herein. Upon any termination of this Agreement, you must immediately destroy all copies of the Software and the Documentation. You may terminate this Agreement at any point by destroying all copies of the Software and the Documentation.
|
||||||
|
|
||||||
|
4. SUPPORT. Gamonoid Media Pvt Ltd will provide you support according to the support agreement subscribed by the company.
|
||||||
|
|
||||||
|
5. OWNERSHIP RIGHTS. The Software is protected by copyright laws. ICEHRM and Gamonoid Media Pvt Ltd own and retain all right, title and interest in and to the Software, including all copyrights, patents, trademarks and other intellectual property rights therein. Your possession, installation, or use of the Software does not transfer to you any title to the intellectual property in the Software, and you will not acquire any rights to the Software except as expressly set forth in this Agreement.
|
||||||
|
|
||||||
|
6. LIMITED WARRANTY. You may not rent, lease, loan or resell the Software. You may not permit third parties to benefit from the use or functionality of the Software via a timesharing, service bureau or other arrangement, except to the extent such use is specified in the applicable list price or product packaging for the Software. You may not transfer any of the rights granted to you under this Agreement. You may not modify, or create derivative works based upon, the Software in whole or in part. You may not copy the Software or Documentation except as expressly permitted in Section 1 above. You may not remove any proprietary notices or labels on the Software. All rights not expressly set forth hereunder are reserved by ICEHRM. ICEHRM reserves the right to periodically conduct audits upon advance written notice to verify compliance with the terms of this Agreement.
|
||||||
|
|
||||||
|
7. WARRANTY and DISCLAIMER.
|
||||||
|
|
||||||
|
(i) Gamonoid Media Pvt Ltd. warrants that for 30 days from first download or installation the Software will perform substantially in accordance with the functionality described in the Documentation (http://blog.icehrm.com) when operated properly and in the manner specified in the Documentation.
|
||||||
|
|
||||||
|
(ii) You accept all responsibility for the selection of this Software to meet your requirements.
|
||||||
|
|
||||||
|
(iii) Gamonoid Media Pvt Ltd. does not warrant that the Software and/or the Documentation will be suitable for such requirements nor that any use will be uninterrupted and error free.
|
||||||
|
|
||||||
|
(iv) The warranty in (i) shall not apply if you (a) make or cause to be made any modifications to this Software, (b) use the Software in a manner for which it was not intended or (c) use the Software other than as permitted under this Agreement.
|
||||||
|
|
||||||
|
(vii) The warranties and conditions stated in this Agreement are in lieu of all other conditions, warranties or other terms concerning the supply or purported supply of, failure to supply or delay in supplying the Software or the Documentation which might but for this paragraph (vii) have effect between the ICEHRM and you or would otherwise be implied into or incorporated into this Agreement or any collateral contract, whether by statute, common law or otherwise, all of which are hereby excluded (including, without limitation, the implied conditions, warranties or other terms as to satisfactory quality, fitness for purpose or as to the use of reasonable skill and care).
|
||||||
|
|
||||||
|
8. LIMITATION of LIABILITY. Gamonoid Media Pvt Ltd. shall have no liability (whether in contract, tort, restitution or otherwise) for any of the following losses or damage (whether such losses or damage were foreseen, foreseeable, known or otherwise):
|
||||||
|
- Loss of revenue;
|
||||||
|
- Loss of actual or anticipated profits (including for loss of profits on contracts);
|
||||||
|
- Loss of the use of money;
|
||||||
|
- Loss of anticipated savings;
|
||||||
|
- Loss of business;
|
||||||
|
- Loss of opportunity;
|
||||||
|
- Loss of goodwill;
|
||||||
|
- Loss of reputation;
|
||||||
|
- Loss of, damage to or corruption of data;
|
||||||
|
or
|
||||||
|
Any indirect or consequential loss or damage howsoever caused (including, for the avoidance of doubt, where such loss or damage is of the type specified in paragraph (ii), (a) to (ii), (i).
|
||||||
|
The ICEHRM liability (whether in contract, tort, restitution or otherwise) arising out of or in connection with the supply of the Software shall in no circumstances exceed a sum equal to the amount equally paid by you for the Software.
|
||||||
|
The construction and interpretation of this Agreement shall be governed in accordance with the laws of Sri Lanka. The parties hereby submit to the jurisdiction of the courts of Sri Lanka save that ICEHRM as claimant shall be entitled to initiate proceedings in any court of competent jurisdiction.
|
||||||
|
This Agreement contains the entire understanding of the parties with respect to the subject matter hereof and supersedes all and any prior understandings, undertakings and promises between you and ICEHRM, whether oral or in writing, which have been given or may be implied from anything written or said in negotiations between us or our representatives prior to this Agreement and all prior agreements between the parties relating to the matters aforesaid shall cease to have effect as from the Effective Date.
|
||||||
7
ext/admin/payroll/README.txt
Normal file
7
ext/admin/payroll/README.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
This module is licensed under IceHrm Commercial License, which can be found in LICENSE.txt.
|
||||||
|
You are allowed to make any modification required to these module, but only allowed to use
|
||||||
|
the module in one production server (even with modifications).
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
Copy this module into <icehrm path>/admin/ directory
|
||||||
69
ext/admin/payroll/api/PayrollAdminManager.php
Normal file
69
ext/admin/payroll/api/PayrollAdminManager.php
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
if (!class_exists('PayrollAdminManager')) {
|
||||||
|
class PayrollAdminManager extends AbstractModuleManager{
|
||||||
|
|
||||||
|
public function initializeUserClasses(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initializeFieldMappings(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initializeDatabaseErrorMappings(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setupModuleClassDefinitions(){
|
||||||
|
$this->addModelClass('SalaryComponentType');
|
||||||
|
$this->addModelClass('SalaryComponent');
|
||||||
|
$this->addModelClass('Deduction');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists('SalaryComponentType')) {
|
||||||
|
class SalaryComponentType extends ICEHRM_Record {
|
||||||
|
var $_table = 'SalaryComponentType';
|
||||||
|
|
||||||
|
public function getAdminAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess(){
|
||||||
|
return array("get","element");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists('SalaryComponent')) {
|
||||||
|
class SalaryComponent extends ICEHRM_Record {
|
||||||
|
var $_table = 'SalaryComponent';
|
||||||
|
|
||||||
|
public function getAdminAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess(){
|
||||||
|
return array("get","element");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists('Deduction')) {
|
||||||
|
class Deduction extends ICEHRM_Record {
|
||||||
|
var $_table = 'Deductions';
|
||||||
|
|
||||||
|
public function getAdminAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess(){
|
||||||
|
return array("get","element");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
17
ext/admin/payroll/index.php
Normal file
17
ext/admin/payroll/index.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$moduleName = 'metadata';
|
||||||
|
define('MODULE_PATH',dirname(__FILE__));
|
||||||
|
include APP_BASE_PATH.'header.php';
|
||||||
|
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||||
|
|
||||||
|
$moduleBuilder = new ModuleBuilder();
|
||||||
|
|
||||||
|
$moduleBuilder->addModuleOrGroup(new ModuleTab('SalaryComponentType','SalaryComponentType','Salary Component Types','SalaryComponentTypeAdapter','','',true));
|
||||||
|
$moduleBuilder->addModuleOrGroup(new ModuleTab('SalaryComponent','SalaryComponent','Salary Components','SalaryComponentAdapter','',''));
|
||||||
|
$moduleBuilder->addModuleOrGroup(new ModuleTab('EmployeeSalary','EmployeeSalary','Employee Salary','EmployeeSalaryAdapter','','',false,array("setRemoteTable"=>"true")));
|
||||||
|
|
||||||
|
|
||||||
|
echo UIManager::getInstance()->renderModule($moduleBuilder);
|
||||||
|
|
||||||
|
include APP_BASE_PATH.'footer.php';
|
||||||
274
ext/admin/payroll/lib.js
Normal file
274
ext/admin/payroll/lib.js
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
/**
|
||||||
|
* Author: Thilina Hasantha
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalaryComponentTypeAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
function SalaryComponentTypeAdapter(endPoint,tab,filter,orderBy) {
|
||||||
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
SalaryComponentTypeAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SalaryComponentTypeAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"code",
|
||||||
|
"name"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
SalaryComponentTypeAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Code" },
|
||||||
|
{ "sTitle": "Name"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
SalaryComponentTypeAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "code", {"label":"Code","type":"text","validation":""}],
|
||||||
|
[ "name", {"label":"Name","type":"text","validation":""}]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalaryComponentAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
function SalaryComponentAdapter(endPoint,tab,filter,orderBy) {
|
||||||
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
SalaryComponentAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SalaryComponentAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"componentType",
|
||||||
|
"details"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
SalaryComponentAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Name" },
|
||||||
|
{ "sTitle": "Salary Component Type" },
|
||||||
|
{ "sTitle": "Details"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
SalaryComponentAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "name", {"label":"Name","type":"text","validation":""}],
|
||||||
|
[ "componentType", {"label":"Salary Component Type","type":"select2","remote-source":["SalaryComponentType","id","name"]}],
|
||||||
|
[ "details", {"label":"Details","type":"textarea","validation":"none"}]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DeductionAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
function DeductionAdapter(endPoint,tab,filter,orderBy) {
|
||||||
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
DeductionAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DeductionAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"contributor",
|
||||||
|
"type",
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
DeductionAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Name" },
|
||||||
|
{ "sTitle": "Contributor"},
|
||||||
|
{ "sTitle": "Deduction Type"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
DeductionAdapter.method('getFormFields', function() {
|
||||||
|
|
||||||
|
var rangeAmounts = [ "rangeAmounts", {"label":"Deduction Amounts","type":"datagroup",
|
||||||
|
"form":[
|
||||||
|
[ "lowerCondition", {"label":"Lower Limit Condition","type":"select","source":[["No Lower Limit","No Lower Limit"],[">","Greater than"],[">=","Greater than or Equal"]]}],
|
||||||
|
[ "lowerLimit", {"label":"Lower Limit","type":"text","validation":"none"}],
|
||||||
|
[ "upperCondition", {"label":"Upper Limit Condition","type":"select","source":[["No Upper Limit","No Upper Limit"],["<","Less than"],["<=","Less than or Equal"]]}],
|
||||||
|
[ "upperLimit", {"label":"Upper Limit","type":"text","validation":"none"}],
|
||||||
|
[ "amount", {"label":"Value","type":"text","validation":"float"}]
|
||||||
|
],
|
||||||
|
"html":'<div id="#_id_#" class="panel panel-default">#_delete_##_edit_#<div class="panel-body">#_renderFunction_#</div></div>',
|
||||||
|
"validation":"none",
|
||||||
|
"render":function(item){
|
||||||
|
var output = "";
|
||||||
|
if(item.lowerCondition != "No Lower Limit"){
|
||||||
|
output += item.lowerLimit + " " + item.lowerCondition + " ";
|
||||||
|
output += " and ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item.upperCondition != "No Upper Limit"){
|
||||||
|
output += item.upperCondition + " " + item.upperLimit + " ";
|
||||||
|
}
|
||||||
|
if(output == ""){
|
||||||
|
return "Deduction is "+item.amount + " for all ranges";
|
||||||
|
}else{
|
||||||
|
return "If salary component "+output+ " deduction is "+item.amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return output;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}];
|
||||||
|
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "name", {"label":"Name","type":"text","validation":""}],
|
||||||
|
[ "contributor", {"label":"Contributor","type":"select","source":[["Employee","Employee"],["Employer","Employer"]]}],
|
||||||
|
[ "type", {"label":"Deduction Type","type":"select","source":[["Fixed","Fixed"],["Percentage","Percentage"]]}],
|
||||||
|
[ "percentage_type", {"label":"Percentage Type","type":"select","source":[["On Component","On Component"],["On Component Type","On Component Type"]]}],
|
||||||
|
[ "componentType", {"label":"Salary Component Type","type":"select2","allow-null":true,"null-label":"N/A","remote-source":["SalaryComponentType","id","name"]}],
|
||||||
|
[ "component", {"label":"Salary Component","type":"select2","allow-null":true,"null-label":"N/A","remote-source":["SalaryComponent","id","name"]}],
|
||||||
|
rangeAmounts,
|
||||||
|
[ "country", {"label":"Country","type":"select2","remote-source":["Country","id","name"]}]
|
||||||
|
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
DeductionAdapter.method('doCustomValidation', function(params) {
|
||||||
|
if(params.type == "Fixed"){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if(params.percentage_type == "On Component Type"){
|
||||||
|
params.component = "NULL";
|
||||||
|
if(params.componentType == "NULL"){
|
||||||
|
return "Salary component type should be selected";
|
||||||
|
}
|
||||||
|
}else if(params.percentage_type == "On Component"){
|
||||||
|
params.componentType = "NULL";
|
||||||
|
if(params.component == "NULL"){
|
||||||
|
return "Salary component should be selected";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
|
||||||
|
DeductionAdapter.method('postRenderForm', function(object, $tempDomObj) {
|
||||||
|
|
||||||
|
$tempDomObj.find("#field_componentType").hide();
|
||||||
|
$tempDomObj.find("#field_percentage_type").hide();
|
||||||
|
$tempDomObj.find("#field_component").hide();
|
||||||
|
|
||||||
|
|
||||||
|
$tempDomObj.find("#percentage_type").off().on('change',function(e){
|
||||||
|
if(e.val == "On Component"){
|
||||||
|
$("#componentType").hide();
|
||||||
|
$("#component").show();
|
||||||
|
}else{
|
||||||
|
$("#componentType").show();
|
||||||
|
$("#component").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$tempDomObj.find("#type").off().on('change',function(e){
|
||||||
|
if(e.val == "Fixed"){
|
||||||
|
$("#componentType").hide();
|
||||||
|
$("#percentage_type").hide();
|
||||||
|
$("#component").hide();
|
||||||
|
}else{
|
||||||
|
$("#percentage_type").show();
|
||||||
|
if($("#percentage_type").select2('data').id == 'On Component'){
|
||||||
|
$("#field_componentType").hide();
|
||||||
|
$("#field_component").show();
|
||||||
|
}else{
|
||||||
|
$("#field_componentType").show();
|
||||||
|
$("#field_component").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EmployeeSalaryAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
function EmployeeSalaryAdapter(endPoint,tab,filter,orderBy) {
|
||||||
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
EmployeeSalaryAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EmployeeSalaryAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"employee",
|
||||||
|
"component",
|
||||||
|
"pay_frequency",
|
||||||
|
"currency",
|
||||||
|
"amount",
|
||||||
|
"details"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
EmployeeSalaryAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Employee" },
|
||||||
|
{ "sTitle": "Salary Component" },
|
||||||
|
{ "sTitle": "Pay Frequency"},
|
||||||
|
{ "sTitle": "Currency"},
|
||||||
|
{ "sTitle": "Amount"},
|
||||||
|
{ "sTitle": "Details"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
EmployeeSalaryAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}],
|
||||||
|
[ "component", {"label":"Salary Component","type":"select2","remote-source":["SalaryComponent","id","name"]}],
|
||||||
|
[ "pay_frequency", {"label":"Pay Frequency","type":"select","source":[["Hourly","Hourly"],["Daily","Daily"],["Bi Weekly","Bi Weekly"],["Weekly","Weekly"],["Semi Monthly","Semi Monthly"],["Monthly","Monthly"]]}],
|
||||||
|
[ "currency", {"label":"Currency","type":"select2","remote-source":["CurrencyType","id","name"]}],
|
||||||
|
[ "amount", {"label":"Amount","type":"text","validation":"float"}],
|
||||||
|
[ "details", {"label":"Details","type":"textarea","validation":"none"}]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
EmployeeSalaryAdapter.method('getFilters', function() {
|
||||||
|
return [
|
||||||
|
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}]
|
||||||
|
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
11
ext/admin/payroll/meta.json
Normal file
11
ext/admin/payroll/meta.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"label":"Setup",
|
||||||
|
"menu":"Salary Details",
|
||||||
|
"order":"6",
|
||||||
|
"icon":"fa-cogs",
|
||||||
|
"user_levels":["Admin"],
|
||||||
|
|
||||||
|
"permissions":
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
19
ext/admin/permissions/dashboard.html
Normal file
19
ext/admin/permissions/dashboard.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-aqua">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>
|
||||||
|
Permission
|
||||||
|
</h3>
|
||||||
|
<p>
|
||||||
|
Management
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-locked"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="permissionLink">
|
||||||
|
Manage Permissions <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"label":"Manage Permissions",
|
"label":"Manage Permissions",
|
||||||
"menu":"System",
|
"menu":"System",
|
||||||
"order":"4",
|
"order":"4",
|
||||||
"icon":"fa-unlock",
|
"icon":"fa-unlock",
|
||||||
"user_levels":["Admin"],
|
"user_levels":["Admin"],
|
||||||
|
"dashboardPosition":15,
|
||||||
|
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,19 @@ if (!class_exists('ProjectsAdminManager')) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDashboardItemData(){
|
||||||
|
$data = array();
|
||||||
|
$project = new Project();
|
||||||
|
$data['numberOfProjects'] = $project->Count("status = 'Active'");
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initQuickAccessMenu(){
|
||||||
|
UIManager::getInstance()->addQuickAccessMenuItem("Manage Client/Projects","fa-list-alt",CLIENT_BASE_URL."?g=admin&n=projects&m=admin_Admin",array("Admin","Manager"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
17
ext/admin/projects/dashboard.html
Normal file
17
ext/admin/projects/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-red">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>Projects</h3>
|
||||||
|
<p id="numberOfProjects">
|
||||||
|
#_numberOfProjects_# Active Projects
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-pie-graph"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="projectsLink">
|
||||||
|
Update Clients/Projects <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -63,7 +63,7 @@ ClientAdapter.method('getFormFields', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ClientAdapter.method('getHelpLink', function () {
|
ClientAdapter.method('getHelpLink', function () {
|
||||||
return 'http://blog.icehrm.com/?page_id=85';
|
return 'http://blog.icehrm.com/docs/projects/';
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -116,7 +116,7 @@ ProjectAdapter.method('getFormFields', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ProjectAdapter.method('getHelpLink', function () {
|
ProjectAdapter.method('getHelpLink', function () {
|
||||||
return 'http://blog.icehrm.com/?page_id=85';
|
return 'http://blog.icehrm.com/docs/projects/';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -172,6 +172,6 @@ EmployeeProjectAdapter.method('getFilters', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
EmployeeProjectAdapter.method('getHelpLink', function () {
|
EmployeeProjectAdapter.method('getHelpLink', function () {
|
||||||
return 'http://blog.icehrm.com/?page_id=85';
|
return 'http://blog.icehrm.com/docs/projects/';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
{
|
{
|
||||||
"label":"Projects/Client Setup",
|
"label":"Projects/Client Setup",
|
||||||
"menu":"Admin",
|
"menu":"Admin",
|
||||||
"order":"5",
|
"order":"51",
|
||||||
"icon":"fa-list-alt",
|
"icon":"fa-list-alt",
|
||||||
"user_levels":["Admin","Manager"],
|
"user_levels":["Admin","Manager"],
|
||||||
|
"dashboardPosition":4,
|
||||||
|
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
"Manager":{
|
"Manager":{
|
||||||
"Add Projects":"Yes",
|
"Add Projects":"Yes",
|
||||||
"Edit Projects":"Yes",
|
"Edit Projects":"Yes",
|
||||||
"Delete Projects":"No",
|
"Delete Projects":"No",
|
||||||
"Add Clients":"Yes",
|
"Add Clients":"Yes",
|
||||||
"Edit Clients":"Yes",
|
"Edit Clients":"Yes",
|
||||||
"Delete Clients":"No"
|
"Delete Clients":"No"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ SkillAdapter.method('getFormFields', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
SkillAdapter.method('getHelpLink', function () {
|
SkillAdapter.method('getHelpLink', function () {
|
||||||
return 'http://blog.icehrm.com/?page_id=83';
|
return 'http://blog.icehrm.com/docs/qualifications/';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
17
ext/admin/reports/dashboard.html
Normal file
17
ext/admin/reports/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-teal">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>Reports</h3>
|
||||||
|
<p>
|
||||||
|
View / Download Reports
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-document-text"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="reportsLink">
|
||||||
|
Create a Report <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -19,14 +19,21 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var modJsList = new Array();
|
var modJsList = new Array();
|
||||||
|
|
||||||
modJsList['tabReport'] = new ReportAdapter('Report','Report');
|
modJsList['tabReport'] = new ReportAdapter('Report','Report','','report_group');
|
||||||
modJsList['tabReport'].setShowAddNew(false);
|
modJsList['tabReport'].setShowAddNew(false);
|
||||||
|
modJsList['tabReport'].setRemoteTable(true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
modJsList['tabReport'] = new ReportGenAdapter('File','File','{"file_group":"Report"}','group');
|
||||||
|
modJsList['tabReport'].setShowAddNew(false);
|
||||||
|
*/
|
||||||
|
|
||||||
var modJs = modJsList['tabReport'];
|
var modJs = modJsList['tabReport'];
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
* ReportAdapter
|
* ReportAdapter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function ReportAdapter(endPoint) {
|
|
||||||
this.initAdapter(endPoint);
|
function ReportAdapter(endPoint,tab,filter,orderBy) {
|
||||||
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
this._formFileds = [
|
this._formFileds = [
|
||||||
[ "id", {"label":"ID","type":"hidden"}],
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
[ "name", {"label":"Name","type":"label","validation":""}],
|
[ "name", {"label":"Name","type":"label","validation":""}],
|
||||||
@@ -162,6 +163,42 @@ ReportAdapter.method('fillForm', function(object) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ReportAdapter.method('getHelpLink', function () {
|
|
||||||
return 'http://blog.icehrm.com/?page_id=118';
|
|
||||||
|
|
||||||
|
function ReportGenAdapter(endPoint) {
|
||||||
|
this.initAdapter(endPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReportGenAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ReportGenAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ReportGenAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Name" }
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
ReportGenAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
ReportGenAdapter.method('getActionButtonsHtml', function(id,data) {
|
||||||
|
var html = '<div style="width:80px;"><img class="tableActionButton" src="_BASE_images/download.png" style="cursor:pointer;" rel="tooltip" title="Download" onclick="download(_name_);return false;"></img></div>';
|
||||||
|
html = html.replace(/_id_/g,id);
|
||||||
|
html = html.replace(/_name_/g,data[1]);
|
||||||
|
html = html.replace(/_BASE_/g,this.baseUrl);
|
||||||
|
return html;
|
||||||
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"label":"Reports",
|
"label":"Reports",
|
||||||
"menu":"Reports",
|
"menu":"Reports",
|
||||||
"order":"1",
|
"order":"1",
|
||||||
"icon":"fa-file-o",
|
"icon":"fa-file-o",
|
||||||
"user_levels":["Admin","Manager"],
|
"user_levels":["Admin","Manager"],
|
||||||
|
"dashboardPosition":7,
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!class_exists('ReportBuilder')){
|
if(!class_exists('ReportBuilder')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ReportBuilder.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
|
||||||
}
|
}
|
||||||
class ActiveEmployeeReport extends ReportBuilder{
|
class ActiveEmployeeReport extends ReportBuilder{
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!class_exists('ReportBuilder')){
|
if(!class_exists('ReportBuilder')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ReportBuilder.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
|
||||||
}
|
}
|
||||||
class EmployeeAttendanceReport extends ReportBuilder{
|
class EmployeeAttendanceReport extends ReportBuilder{
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
if(!interface_exists('ReportBuilderInterface')){
|
||||||
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilderInterface.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!class_exists('LeavesActionManager')){
|
||||||
|
include_once APP_BASE_PATH.'modules/leaves/api/LeavesActionManager.php';
|
||||||
|
}
|
||||||
|
class EmployeeLeaveEntitlementReport implements ReportBuilderInterface{
|
||||||
|
public function getData($report,$req){
|
||||||
|
|
||||||
|
$leaveActionManager = new LeavesActionManager();
|
||||||
|
|
||||||
|
$department = $req['department'];
|
||||||
|
$employeeId = $req['employee'];
|
||||||
|
|
||||||
|
if(($employeeId == "NULL" || empty($employeeId)) && ($department == "NULL" || empty($department))){
|
||||||
|
$emp = new Employee();
|
||||||
|
$employees = $emp->Find("status = 'Active'",array());
|
||||||
|
}else if($employeeId != "NULL" && !empty($employeeId)){
|
||||||
|
$emp = new Employee();
|
||||||
|
$employees = $emp->Find("id = ?",array($employeeId));
|
||||||
|
}else{
|
||||||
|
$emp = new Employee();
|
||||||
|
$employees = $emp->Find("department = ? and status = 'Active'",array($department));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$reportData = array();
|
||||||
|
$reportData[] = array("Employee ID","Employee","Leave Type","Pending","Approved","Rejected","Canceled","Available","To be Accrued","Carried Forward from Previous Years");
|
||||||
|
|
||||||
|
foreach($employees as $employee){
|
||||||
|
$leaveEntitlements = $leaveActionManager->getEntitlementByEmployee($employee)->getObject();
|
||||||
|
foreach($leaveEntitlements as $leaveEntitlement){
|
||||||
|
$reportData[] = array(
|
||||||
|
$employee->employee_id,
|
||||||
|
$employee->first_name." ".$employee->last_name,
|
||||||
|
$leaveEntitlement['name'],
|
||||||
|
$leaveEntitlement['pendingLeaves'],
|
||||||
|
$leaveEntitlement['approvedLeaves'],
|
||||||
|
$leaveEntitlement['rejectedLeaves'],
|
||||||
|
$leaveEntitlement['cancelRequestedLeaves'],
|
||||||
|
$leaveEntitlement['availableLeaves'],
|
||||||
|
$leaveEntitlement['tobeAccrued'],
|
||||||
|
$leaveEntitlement['carriedForward']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $reportData;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!class_exists('ReportBuilder')){
|
if(!class_exists('ReportBuilder')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ReportBuilder.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
|
||||||
}
|
}
|
||||||
class EmployeeLeavesReport extends ReportBuilder{
|
class EmployeeLeavesReport extends ReportBuilder{
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ class EmployeeLeavesReport extends ReportBuilder{
|
|||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
(SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`) from Employees where id = employee) as 'Employee',
|
(SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`) from Employees where id = employee) as 'Employee',
|
||||||
(SELECT name from LeaveTypes where id = leave_type) as 'Leave Type',
|
(SELECT name from LeaveTypes where id = leave_type) as 'Leave Type',
|
||||||
(SELECT name from LeavePeriods where id = leave_type) as 'Leave Type',
|
(SELECT name from LeavePeriods where id = leave_period) as 'Leave Period',
|
||||||
date_start as 'Start Date',
|
date_start as 'Start Date',
|
||||||
date_end as 'End Date',
|
date_end as 'End Date',
|
||||||
details as 'Reason',
|
details as 'Reason',
|
||||||
|
|||||||
69
ext/admin/reports/reportClasses/EmployeeTimeSheetData.php
Normal file
69
ext/admin/reports/reportClasses/EmployeeTimeSheetData.php
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if(!interface_exists('ReportBuilderInterface')){
|
||||||
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilderInterface.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
class EmployeeTimeSheetData implements ReportBuilderInterface{
|
||||||
|
public function getData($report,$request){
|
||||||
|
|
||||||
|
$employeeCache = array();
|
||||||
|
|
||||||
|
$employeeList = array();
|
||||||
|
if(!empty($request['employee'])){
|
||||||
|
$employeeList = json_decode($request['employee'],true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(in_array("NULL", $employeeList) ){
|
||||||
|
$employeeList = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$employee_query = "";
|
||||||
|
if(!empty($employeeList)){
|
||||||
|
$employee_query = "employee in (".implode(",", $employeeList).") and ";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$timeSheet = new EmployeeTimeSheet();
|
||||||
|
if($request['status'] != "NULL"){
|
||||||
|
$timeSheets = $timeSheet->Find($employee_query."status = ? and date_start >= ? and date_end <= ?",
|
||||||
|
array($request['status'],$request['date_start'],$request['date_end']));
|
||||||
|
}else{
|
||||||
|
$timeSheets = $timeSheet->Find($employee_query."date_start >= ? and date_end <= ?",
|
||||||
|
array($request['date_start'],$request['date_end']));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!$timeSheets){
|
||||||
|
LogManager::getInstance()->info($timeSheet->ErrorMsg());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$reportData = array();
|
||||||
|
$reportData[] = array("Employee ID","Employee","Name","Start","End","Total Time","Status");
|
||||||
|
|
||||||
|
foreach($timeSheets as $ts){
|
||||||
|
$employee = $employeeCache[$ts->employee];
|
||||||
|
if(empty($employee)){
|
||||||
|
$employee = new Employee();
|
||||||
|
$employee->Load("id = ?",array($ts->employee));
|
||||||
|
if(empty($employee->id)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$employeeCache[$employee->id] = $employee;
|
||||||
|
}
|
||||||
|
$reportData[] = array(
|
||||||
|
$employee->employee_id,
|
||||||
|
$employee->first_name." ".$employee->last_name,
|
||||||
|
date("F j, Y",strtotime($ts->date_start))." - ".date("F j, Y",strtotime($ts->date_end)),
|
||||||
|
$ts->date_start,
|
||||||
|
$ts->date_end,
|
||||||
|
$ts->getTotalTime(),
|
||||||
|
$ts->status
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $reportData;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!interface_exists('ReportBuilderInterface')){
|
if(!interface_exists('ReportBuilderInterface')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ReportBuilderInterface.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilderInterface.php';
|
||||||
}
|
}
|
||||||
class EmployeeTimeTrackReport implements ReportBuilderInterface{
|
class EmployeeTimeTrackReport implements ReportBuilderInterface{
|
||||||
public function getData($report,$req){
|
public function getData($report,$req){
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!class_exists('ReportBuilder')){
|
if(!class_exists('ReportBuilder')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ReportBuilder.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
|
||||||
}
|
}
|
||||||
class EmployeeTimesheetReport extends ReportBuilder{
|
class EmployeeTimesheetReport extends ReportBuilder{
|
||||||
|
|
||||||
|
|||||||
68
ext/admin/reports/reportClasses/ExpenseReport.php
Normal file
68
ext/admin/reports/reportClasses/ExpenseReport.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
if(!class_exists('ReportBuilder')){
|
||||||
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
|
||||||
|
}
|
||||||
|
class ExpenseReport extends ReportBuilder{
|
||||||
|
|
||||||
|
public function getMainQuery(){
|
||||||
|
$query = "SELECT
|
||||||
|
(SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`) from Employees where id = employee) as 'Employee',
|
||||||
|
expense_date as 'Date',
|
||||||
|
(SELECT name from ExpensesPaymentMethods where id = payment_method) as 'Payment Method',
|
||||||
|
transaction_no as 'Transaction Ref',
|
||||||
|
payee as 'Payee',
|
||||||
|
(SELECT name from ExpensesCategories where id = category) as 'Category',
|
||||||
|
notes as 'Notes',
|
||||||
|
concat(`amount`,' ',`currency`) as 'Amount',
|
||||||
|
status as 'Status',
|
||||||
|
created as 'Created',
|
||||||
|
updated as 'Updated'
|
||||||
|
from EmployeeExpenses";
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWhereQuery($request){
|
||||||
|
|
||||||
|
$employeeList = array();
|
||||||
|
if(!empty($request['employee'])){
|
||||||
|
$employeeList = json_decode($request['employee'],true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(in_array("NULL", $employeeList) ){
|
||||||
|
$employeeList = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($employeeList) && ($request['status'] != "NULL" && !empty($request['status']))){
|
||||||
|
$query = "where employee in (".implode(",", $employeeList).") and date(expense_date) >= ? and date(expense_date) <= ? and status = ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end'],
|
||||||
|
$request['status']
|
||||||
|
);
|
||||||
|
}else if(!empty($employeeList)){
|
||||||
|
$query = "where employee in (".implode(",", $employeeList).") and date(expense_date) >= ? and date(expense_date) <= ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end']
|
||||||
|
);
|
||||||
|
}else if(($request['status'] != "NULL" && !empty($request['status']))){
|
||||||
|
$query = "where status = ? and date(expense_date) >= ? and date(expense_date) <= ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['status'],
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end']
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
$query = "where date(expense_date) >= ? and date(expense_date) <= ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($query, $params);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!class_exists('ActiveEmployeeReport')){
|
if(!class_exists('ActiveEmployeeReport')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ActiveEmployeeReport.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ActiveEmployeeReport.php';
|
||||||
}
|
}
|
||||||
class NewHiresEmployeeReport extends ActiveEmployeeReport{
|
class NewHiresEmployeeReport extends ActiveEmployeeReport{
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!interface_exists('ReportBuilderInterface')){
|
if(!interface_exists('ReportBuilderInterface')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ReportBuilderInterface.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilderInterface.php';
|
||||||
}
|
}
|
||||||
abstract class ReportBuilder implements ReportBuilderInterface{
|
abstract class ReportBuilder implements ReportBuilderInterface{
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!class_exists('ActiveEmployeeReport')){
|
if(!class_exists('ActiveEmployeeReport')){
|
||||||
include_once MODULE_PATH.'/reportClasses/ActiveEmployeeReport.php';
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ActiveEmployeeReport.php';
|
||||||
}
|
}
|
||||||
class TerminatedEmployeeReport extends ActiveEmployeeReport{
|
class TerminatedEmployeeReport extends ActiveEmployeeReport{
|
||||||
|
|
||||||
|
|||||||
69
ext/admin/reports/reportClasses/TravelRequestReport.php
Normal file
69
ext/admin/reports/reportClasses/TravelRequestReport.php
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
if(!class_exists('ReportBuilder')){
|
||||||
|
include_once APP_BASE_PATH.'admin/reports/reportClasses/ReportBuilder.php';
|
||||||
|
}
|
||||||
|
class TravelRequestReport extends ReportBuilder{
|
||||||
|
|
||||||
|
public function getMainQuery(){
|
||||||
|
$query = "SELECT
|
||||||
|
(SELECT concat(`first_name`,' ',`middle_name`,' ', `last_name`) from Employees where id = employee) as 'Employee',
|
||||||
|
type as 'Type',
|
||||||
|
purpose as 'Purpose',
|
||||||
|
travel_from as 'Travel From',
|
||||||
|
travel_to as 'Travel To',
|
||||||
|
travel_date as 'Travel Date',
|
||||||
|
return_date as 'Return Date',
|
||||||
|
details as 'Other Details',
|
||||||
|
concat(`funding`,' ',`currency`) as 'Funding',
|
||||||
|
status as 'Status',
|
||||||
|
created as 'Created',
|
||||||
|
updated as 'Updated'
|
||||||
|
from EmployeeTravelRecords";
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWhereQuery($request){
|
||||||
|
|
||||||
|
$employeeList = array();
|
||||||
|
if(!empty($request['employee'])){
|
||||||
|
$employeeList = json_decode($request['employee'],true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(in_array("NULL", $employeeList) ){
|
||||||
|
$employeeList = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($employeeList) && ($request['status'] != "NULL" && !empty($request['status']))){
|
||||||
|
$query = "where employee in (".implode(",", $employeeList).") and date(travel_date) >= ? and date(return_date) <= ? and status = ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end'],
|
||||||
|
$request['status']
|
||||||
|
);
|
||||||
|
}else if(!empty($employeeList)){
|
||||||
|
$query = "where employee in (".implode(",", $employeeList).") and date(travel_date) >= ? and date(return_date) <= ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end']
|
||||||
|
);
|
||||||
|
}else if(($request['status'] != "NULL" && !empty($request['status']))){
|
||||||
|
$query = "where status = ? and date(travel_date) >= ? and date(return_date) <= ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['status'],
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end']
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
$query = "where date(travel_date) >= ? and date(return_date) <= ?;";
|
||||||
|
$params = array(
|
||||||
|
$request['date_start'],
|
||||||
|
$request['date_end']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($query, $params);
|
||||||
|
}
|
||||||
|
}
|
||||||
17
ext/admin/settings/dashboard.html
Normal file
17
ext/admin/settings/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-green">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>Settings</h3>
|
||||||
|
<p>
|
||||||
|
Configure IceHrm
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-settings"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="settingsLink">
|
||||||
|
Update Settings <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -51,5 +51,11 @@ modJsList['tabSetting'].setShowAddNew(false);
|
|||||||
|
|
||||||
var modJs = modJsList['tabSetting'];
|
var modJs = modJsList['tabSetting'];
|
||||||
|
|
||||||
|
$(window).load(function() {
|
||||||
|
modJs.loadRemoteDataForSettings();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php include APP_BASE_PATH.'footer.php';?>
|
<?php include APP_BASE_PATH.'footer.php';?>
|
||||||
@@ -55,6 +55,11 @@ SettingAdapter.method('getMetaFieldForRendering', function(fieldName) {
|
|||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
SettingAdapter.method('edit', function(id) {
|
||||||
|
this.loadRemoteDataForSettings();
|
||||||
|
this.uber('edit',id);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
SettingAdapter.method('fillForm', function(object) {
|
SettingAdapter.method('fillForm', function(object) {
|
||||||
this.uber('fillForm',object);
|
this.uber('fillForm',object);
|
||||||
@@ -62,6 +67,22 @@ SettingAdapter.method('fillForm', function(object) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
SettingAdapter.method('loadRemoteDataForSettings', function () {
|
||||||
|
var field = ["country", {"label": "Country", "type": "select2", "remote-source": ["Country", "code", "name"]}];
|
||||||
|
if (field[1]['remote-source'] != undefined && field[1]['remote-source'] != null) {
|
||||||
|
var key = field[1]['remote-source'][0] + "_" + field[1]['remote-source'][1] + "_" + field[1]['remote-source'][2];
|
||||||
|
this.fieldMasterDataKeys[key] = false;
|
||||||
|
this.sourceMapping[field[0]] = field[1]['remote-source'];
|
||||||
|
|
||||||
|
var callBackData = {};
|
||||||
|
callBackData['callBack'] = 'initFieldMasterDataResponse';
|
||||||
|
callBackData['callBackData'] = [key];
|
||||||
|
|
||||||
|
this.getFieldValues(field[1]['remote-source'], callBackData);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
SettingAdapter.method('getHelpLink', function () {
|
SettingAdapter.method('getHelpLink', function () {
|
||||||
return 'http://blog.icehrm.com/?page_id=126';
|
return 'http://blog.icehrm.com/docs/settings/';
|
||||||
});
|
});
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"label":"Settings",
|
"label":"Settings",
|
||||||
"menu":"System",
|
"menu":"System",
|
||||||
"order":"1",
|
"order":"1",
|
||||||
"icon":"fa-cogs",
|
"icon":"fa-cogs",
|
||||||
"user_levels":["Admin"],
|
"user_levels":["Admin"],
|
||||||
|
"dashboardPosition":8,
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
19
ext/admin/travel/api/TravelActionManager.php
Normal file
19
ext/admin/travel/api/TravelActionManager.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
class TravelActionManager extends ApproveAdminActionManager{
|
||||||
|
|
||||||
|
public function getModelClass(){
|
||||||
|
return "EmployeeTravelRecord";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getItemName(){
|
||||||
|
return "TravelRequest";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModuleName(){
|
||||||
|
return "Travel Management";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModuleTabUrl(){
|
||||||
|
return "g=modules&n=travel&m=module_Travel_Management";
|
||||||
|
}
|
||||||
|
}
|
||||||
128
ext/admin/travel/api/TravelAdminManager.php
Normal file
128
ext/admin/travel/api/TravelAdminManager.php
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
<?php
|
||||||
|
if (!class_exists('TravelAdminManager')) {
|
||||||
|
|
||||||
|
class TravelAdminManager extends AbstractModuleManager{
|
||||||
|
|
||||||
|
public function initializeUserClasses(){
|
||||||
|
if(defined('MODULE_TYPE') && MODULE_TYPE != 'admin'){
|
||||||
|
$this->addUserClass("EmployeeImmigration");
|
||||||
|
$this->addUserClass("EmployeeTravelRecord");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initializeFieldMappings(){
|
||||||
|
$this->addFileFieldMapping('EmployeeImmigration', 'attachment1', 'name');
|
||||||
|
$this->addFileFieldMapping('EmployeeImmigration', 'attachment2', 'name');
|
||||||
|
$this->addFileFieldMapping('EmployeeImmigration', 'attachment3', 'name');
|
||||||
|
|
||||||
|
$this->addFileFieldMapping('EmployeeTravelRecord', 'attachment1', 'name');
|
||||||
|
$this->addFileFieldMapping('EmployeeTravelRecord', 'attachment2', 'name');
|
||||||
|
$this->addFileFieldMapping('EmployeeTravelRecord', 'attachment3', 'name');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initializeDatabaseErrorMappings(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setupModuleClassDefinitions(){
|
||||||
|
|
||||||
|
$this->addModelClass('ImmigrationDocument');
|
||||||
|
$this->addModelClass('EmployeeImmigration');
|
||||||
|
$this->addModelClass('EmployeeTravelRecord');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!class_exists('ImmigrationDocument')) {
|
||||||
|
class ImmigrationDocument extends ICEHRM_Record {
|
||||||
|
var $_table = 'ImmigrationDocuments';
|
||||||
|
|
||||||
|
public function getAdminAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getManagerAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess(){
|
||||||
|
return array("get");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserOnlyMeAccess(){
|
||||||
|
return array("get","element");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists('EmployeeImmigration')) {
|
||||||
|
class EmployeeImmigration extends ICEHRM_Record {
|
||||||
|
var $_table = 'EmployeeImmigrations';
|
||||||
|
|
||||||
|
public function getAdminAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getManagerAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess(){
|
||||||
|
return array("get");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserOnlyMeAccess(){
|
||||||
|
return array("element","save","delete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!class_exists('EmployeeTravelRecord')) {
|
||||||
|
class EmployeeTravelRecord extends ApproveModel
|
||||||
|
{
|
||||||
|
var $_table = 'EmployeeTravelRecords';
|
||||||
|
|
||||||
|
var $notificationModuleName = "Travel Management";
|
||||||
|
var $notificationUnitName = "TravelRequest";
|
||||||
|
var $notificationUnitPrefix = "A";
|
||||||
|
var $notificationUnitAdminUrl = "g=admin&n=travel&m=admin_Employees";
|
||||||
|
var $preApproveSettingName = "Travel: Pre-Approve Travel Request";
|
||||||
|
|
||||||
|
public function getAdminAccess()
|
||||||
|
{
|
||||||
|
return array("get", "element", "save", "delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getManagerAccess()
|
||||||
|
{
|
||||||
|
return array("get", "element", "save", "delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess()
|
||||||
|
{
|
||||||
|
return array("get");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserOnlyMeAccess()
|
||||||
|
{
|
||||||
|
return array("element", "save", "delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fieldsNeedToBeApproved()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
"travel_from",
|
||||||
|
"travel_to",
|
||||||
|
"travel_date",
|
||||||
|
"return_date",
|
||||||
|
"funding",
|
||||||
|
"currency"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
19
ext/admin/travel/dashboard.html
Normal file
19
ext/admin/travel/dashboard.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-red">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>
|
||||||
|
Travel
|
||||||
|
</h3>
|
||||||
|
<p id="numberOfTravel">
|
||||||
|
Requests
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-plane"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="travelLink">
|
||||||
|
Manage Travel <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
78
ext/admin/travel/index.php
Normal file
78
ext/admin/travel/index.php
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
This file is part of iCE Hrm.
|
||||||
|
|
||||||
|
iCE Hrm is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
iCE Hrm is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
|
|
||||||
|
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
||||||
|
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
||||||
|
*/
|
||||||
|
|
||||||
|
$moduleName = 'travel';
|
||||||
|
define('MODULE_PATH',dirname(__FILE__));
|
||||||
|
include APP_BASE_PATH.'header.php';
|
||||||
|
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||||
|
|
||||||
|
$options = array();
|
||||||
|
$options['setRemoteTable'] = 'true';
|
||||||
|
|
||||||
|
$moduleBuilder = new ModuleBuilder();
|
||||||
|
$moduleBuilder->addModuleOrGroup(new ModuleTab('EmployeeTravelRecord','EmployeeTravelRecord','Travel Requests','EmployeeTravelRecordAdapter','','',true,$options));
|
||||||
|
echo UIManager::getInstance()->renderModule($moduleBuilder);
|
||||||
|
|
||||||
|
|
||||||
|
$itemName = 'TravelRequest';
|
||||||
|
$moduleName = 'Travel Management';
|
||||||
|
$itemNameLower = strtolower($itemName);
|
||||||
|
|
||||||
|
$statuses = array("Approved","Pending","Rejected","Cancelled");
|
||||||
|
|
||||||
|
?><div class="modal" id="<?=$itemNameLower?>StatusModel" tabindex="-1" role="dialog" aria-labelledby="messageModelLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><li class="fa fa-times"/></button>
|
||||||
|
<h3 style="font-size: 17px;">Change <?=$itemName?> Status</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="expenseStatusForm">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="expense_status"><?=$itemName?> Status</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select type="text" id="<?=$itemNameLower?>_status" class="form-control" name="<?=$itemNameLower?>_status" value="">
|
||||||
|
<?php foreach($statuses as $status){?>
|
||||||
|
<option value="<?=$status?>"><?=$status?></option>
|
||||||
|
<?php }?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="expense_status">Status Change Note</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea id="<?=$itemNameLower?>_reason" class="form-control" name="<?=$itemNameLower?>_reason" maxlength="500"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-primary" onclick="modJs.changeStatus();">Change <?=$itemName?> Status</button>
|
||||||
|
<button class="btn" onclick="modJs.closeDialog();">Not Now</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
include APP_BASE_PATH.'footer.php';
|
||||||
182
ext/admin/travel/lib.js
Normal file
182
ext/admin/travel/lib.js
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
/**
|
||||||
|
* Author: Thilina Hasantha
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ImmigrationDocumentAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
function ImmigrationDocumentAdapter(endPoint) {
|
||||||
|
this.initAdapter(endPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
ImmigrationDocumentAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ImmigrationDocumentAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"details",
|
||||||
|
"required",
|
||||||
|
"alert_on_missing",
|
||||||
|
"alert_before_expiry"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
ImmigrationDocumentAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Name" },
|
||||||
|
{ "sTitle": "Details"},
|
||||||
|
{ "sTitle": "Compulsory"},
|
||||||
|
{ "sTitle": "Alert If Not Found"},
|
||||||
|
{ "sTitle": "Alert Before Expiry"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
ImmigrationDocumentAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "name", {"label":"Name","type":"text","validation":""}],
|
||||||
|
[ "details", {"label":"Details","type":"textarea","validation":"none"}],
|
||||||
|
[ "required", {"label":"Compulsory","type":"select","source":[["No","No"],["Yes","Yes"]]}],
|
||||||
|
[ "alert_on_missing", {"label":"Alert If Not Found","type":"select","source":[["No","No"],["Yes","Yes"]]}],
|
||||||
|
[ "alert_before_expiry", {"label":"Alert Before Expiry","type":"select","source":[["No","No"],["Yes","Yes"]]}],
|
||||||
|
[ "alert_before_day_number", {"label":"Days for Expiry Alert","type":"text","validation":""}]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EmployeeImmigrationAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
function EmployeeImmigrationAdapter(endPoint) {
|
||||||
|
this.initAdapter(endPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
EmployeeImmigrationAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EmployeeImmigrationAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"employee",
|
||||||
|
"document",
|
||||||
|
"documentname",
|
||||||
|
"valid_until",
|
||||||
|
"status"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
EmployeeImmigrationAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Employee" },
|
||||||
|
{ "sTitle": "Document" },
|
||||||
|
{ "sTitle": "Document Id" },
|
||||||
|
{ "sTitle": "Valid Until"},
|
||||||
|
{ "sTitle": "Status"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
EmployeeImmigrationAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}],
|
||||||
|
[ "document", {"label":"Document","type":"select2","remote-source":["ImmigrationDocument","id","name"]}],
|
||||||
|
[ "documentname", {"label":"Document Id","type":"text","validation":""}],
|
||||||
|
[ "valid_until", {"label":"Valid Until","type":"date","validation":"none"}],
|
||||||
|
[ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"],["Draft","Draft"]]}],
|
||||||
|
[ "details", {"label":"Details","type":"textarea","validation":"none"}],
|
||||||
|
[ "attachment1", {"label":"Attachment 1","type":"fileupload","validation":"none"}],
|
||||||
|
[ "attachment2", {"label":"Attachment 2","type":"fileupload","validation":"none"}],
|
||||||
|
[ "attachment3", {"label":"Attachment 3","type":"fileupload","validation":"none"}]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
EmployeeImmigrationAdapter.method('getFilters', function() {
|
||||||
|
return [
|
||||||
|
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}]
|
||||||
|
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EmployeeTravelRecordAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
function EmployeeTravelRecordAdapter(endPoint,tab,filter,orderBy) {
|
||||||
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
|
this.itemName = 'TravelRequest';
|
||||||
|
this.itemNameLower = 'travelrequest';
|
||||||
|
this.modulePathName = 'travel';
|
||||||
|
}
|
||||||
|
|
||||||
|
EmployeeTravelRecordAdapter.inherits(ApproveAdminAdapter);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EmployeeTravelRecordAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"employee",
|
||||||
|
"type",
|
||||||
|
"purpose",
|
||||||
|
"travel_from",
|
||||||
|
"travel_to",
|
||||||
|
"travel_date",
|
||||||
|
"status"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
EmployeeTravelRecordAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Employee" },
|
||||||
|
{ "sTitle": "Travel Type" },
|
||||||
|
{ "sTitle": "Purpose" },
|
||||||
|
{ "sTitle": "From"},
|
||||||
|
{ "sTitle": "To"},
|
||||||
|
{ "sTitle": "Travel Date"},
|
||||||
|
{ "sTitle": "Status"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
EmployeeTravelRecordAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
["id", {"label": "ID", "type": "hidden"}],
|
||||||
|
["employee", {
|
||||||
|
"label": "Employee",
|
||||||
|
"type": "select2",
|
||||||
|
"sort": "none",
|
||||||
|
"allow-null": false,
|
||||||
|
"remote-source": ["Employee", "id", "first_name+last_name", "getActiveSubordinateEmployees"]
|
||||||
|
}],
|
||||||
|
["type", {
|
||||||
|
"label": "Travel Type",
|
||||||
|
"type": "select",
|
||||||
|
"source": [["Local", "Local"], ["International", "International"]]
|
||||||
|
}],
|
||||||
|
["purpose", {"label": "Purpose of Travel", "type": "textarea", "validation": ""}],
|
||||||
|
["travel_from", {"label": "Travel From", "type": "text", "validation": ""}],
|
||||||
|
["travel_to", {"label": "Travel To", "type": "text", "validation": ""}],
|
||||||
|
["travel_date", {"label": "Travel Date", "type": "datetime", "validation": ""}],
|
||||||
|
["return_date", {"label": "Return Date", "type": "datetime", "validation": ""}],
|
||||||
|
["details", {"label": "Notes", "type": "textarea", "validation": "none"}],
|
||||||
|
["currency", {"label": "Currency", "type": "select2", "allow-null":false, "remote-source": ["CurrencyType", "id", "code"]}],
|
||||||
|
["funding", {"label": "Total Funding Proposed", "type": "text", "validation": "float"}],
|
||||||
|
["attachment1", {"label": "Itinerary / Cab Receipt", "type": "fileupload", "validation": "none"}],
|
||||||
|
["attachment2", {"label": "Other Attachment 1", "type": "fileupload", "validation": "none"}],
|
||||||
|
["attachment3", {"label": "Other Attachment 2", "type": "fileupload", "validation": "none"}]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
12
ext/admin/travel/meta.json
Normal file
12
ext/admin/travel/meta.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"label":"Travel Administration",
|
||||||
|
"menu":"Employees",
|
||||||
|
"order":"6",
|
||||||
|
"icon":"fa-plane",
|
||||||
|
"user_levels":["Admin","Manager"],
|
||||||
|
"dashboardPosition":12,
|
||||||
|
|
||||||
|
"permissions":
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,6 +19,14 @@ if (!class_exists('UsersAdminManager')) {
|
|||||||
$this->addModelClass('User');
|
$this->addModelClass('User');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDashboardItemData(){
|
||||||
|
$data = array();
|
||||||
|
$user = new User();
|
||||||
|
$data['numberOfUsers'] = $user->Count("1 = 1");
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,4 +61,18 @@ if (!class_exists('User')) {
|
|||||||
|
|
||||||
var $_table = 'Users';
|
var $_table = 'Users';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists('UserRole')) {
|
||||||
|
class UserRole extends ICEHRM_Record {
|
||||||
|
public function getAdminAccess(){
|
||||||
|
return array("get","element","save","delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserAccess(){
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
var $_table = 'UserRoles';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
17
ext/admin/users/dashboard.html
Normal file
17
ext/admin/users/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
|
||||||
|
<div class="small-box bg-yellow">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>Users</h3>
|
||||||
|
<p id="numberOfUsers">
|
||||||
|
#_numberOfUsers_# Users
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-person-add"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="usersLink">
|
||||||
|
Manage Users <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -30,6 +30,7 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
|
|||||||
|
|
||||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
||||||
<li class="active"><a id="tabUser" href="#tabPageUser">Users</a></li>
|
<li class="active"><a id="tabUser" href="#tabPageUser">Users</a></li>
|
||||||
|
<li class=""><a id="tabUserRole" href="#tabPageUserRole">User Roles</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
@@ -41,6 +42,14 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tab-pane" id="tabPageUserRole">
|
||||||
|
<div id="UserRole" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="UserRoleForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -50,7 +59,7 @@ modJsList['tabUser'] = new UserAdapter('User');
|
|||||||
<?php if(isset($_REQUEST['action']) && $_REQUEST['action'] == "new" && isset($_REQUEST['object'])){?>
|
<?php if(isset($_REQUEST['action']) && $_REQUEST['action'] == "new" && isset($_REQUEST['object'])){?>
|
||||||
modJsList['tabUser'].newInitObject = JSON.parse(Base64.decode('<?=$_REQUEST['object']?>'));
|
modJsList['tabUser'].newInitObject = JSON.parse(Base64.decode('<?=$_REQUEST['object']?>'));
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
modJsList['tabUserRole'] = new UserRoleAdapter('UserRole');
|
||||||
var modJs = modJsList['tabUser'];
|
var modJs = modJsList['tabUser'];
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ UserAdapter.method('getFormFields', function() {
|
|||||||
[ "username", {"label":"User Name","type":"text","validation":"username"}],
|
[ "username", {"label":"User Name","type":"text","validation":"username"}],
|
||||||
[ "email", {"label":"Email","type":"text","validation":"email"}],
|
[ "email", {"label":"Email","type":"text","validation":"email"}],
|
||||||
[ "employee", {"label":"Employee","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
|
[ "employee", {"label":"Employee","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
|
||||||
[ "user_level", {"label":"User Level","type":"select","source":[["Admin","Admin"],["Manager","Manager"],["Employee","Employee"]]}]
|
[ "user_level", {"label":"User Level","type":"select","source":[["Admin","Admin"],["Manager","Manager"],["Employee","Employee"],["Other","Other"]]}],
|
||||||
|
[ "user_roles", {"label":"User Roles","type":"select2multi","remote-source":["UserRole","id","name"]}],
|
||||||
|
[ "default_module", {"label":"Default Module","type":"select2","null-label":"No Default Module","allow-null":true,"remote-source":["Module","id","menu+label"]}]
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -62,8 +64,8 @@ UserAdapter.method('saveUserFailCallBack', function(callBackData,serverData) {
|
|||||||
|
|
||||||
UserAdapter.method('doCustomValidation', function(params) {
|
UserAdapter.method('doCustomValidation', function(params) {
|
||||||
var msg = null;
|
var msg = null;
|
||||||
if(params['user_level'] != "Admin" && params['employee'] == "NULL"){
|
if((params['user_level'] != "Admin" && params['user_level'] != "Other") && params['employee'] == "NULL"){
|
||||||
msg = "For non Admin users, you have to assign an employee when adding or editing the user.<br/>";
|
msg = "For this user type, you have to assign an employee when adding or editing the user.<br/>";
|
||||||
msg += " You may create a new employee through 'Admin'->'Employees' menu";
|
msg += " You may create a new employee through 'Admin'->'Employees' menu";
|
||||||
}
|
}
|
||||||
return msg;
|
return msg;
|
||||||
@@ -154,9 +156,39 @@ UserAdapter.method('changePasswordFailCallBack', function(callBackData,serverDat
|
|||||||
this.showMessage("Error",callBackData);
|
this.showMessage("Error",callBackData);
|
||||||
});
|
});
|
||||||
|
|
||||||
UserAdapter.method('getHelpLink', function () {
|
|
||||||
return 'http://blog.icehrm.com/?page_id=132';
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UserRoleAdapter
|
||||||
|
*/
|
||||||
|
|
||||||
|
function UserRoleAdapter(endPoint,tab,filter,orderBy) {
|
||||||
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
UserRoleAdapter.inherits(AdapterBase);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UserRoleAdapter.method('getDataMapping', function() {
|
||||||
|
return [
|
||||||
|
"id",
|
||||||
|
"name"
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
UserRoleAdapter.method('getHeaders', function() {
|
||||||
|
return [
|
||||||
|
{ "sTitle": "ID" ,"bVisible":false},
|
||||||
|
{ "sTitle": "Name"}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
UserRoleAdapter.method('getFormFields', function() {
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "name", {"label":"Name","type":"text","validation":""}]
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"label":"Users",
|
"label":"Users",
|
||||||
"menu":"System",
|
"menu":"System",
|
||||||
"order":"2",
|
"order":"2",
|
||||||
"icon":"fa-user",
|
"icon":"fa-user",
|
||||||
"user_levels":["Admin"],
|
"user_levels":["Admin"],
|
||||||
|
"dashboardPosition":3,
|
||||||
|
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,15 +46,22 @@ class AttendanceActionManager extends SubActionManager{
|
|||||||
|
|
||||||
|
|
||||||
public function savePunch($req){
|
public function savePunch($req){
|
||||||
|
|
||||||
|
$useServerTime = SettingsManager::getInstance()->getSetting('Attendance: Use Department Time Zone');
|
||||||
|
$currentEmployeeTimeZone = BaseService::getInstance()->getCurrentEmployeeTimeZone();
|
||||||
|
|
||||||
|
if($useServerTime == '1' && !empty($currentEmployeeTimeZone)){
|
||||||
|
date_default_timezone_set('Asia/Colombo');
|
||||||
|
|
||||||
|
$date = new DateTime("now", new DateTimeZone('Asia/Colombo'));
|
||||||
|
|
||||||
|
$date->setTimezone(new DateTimeZone($currentEmployeeTimeZone));
|
||||||
|
$req->time = $date->format('Y-m-d H:i:s');
|
||||||
|
}
|
||||||
|
|
||||||
$req->date = $req->time;
|
$req->date = $req->time;
|
||||||
|
|
||||||
/*
|
//check if there is an open punch
|
||||||
if(strtotime($req->date) > strtotime($req->cdate)){
|
|
||||||
return new IceResponse(IceResponse::ERROR,"You are not allowed to punch a future time");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//check if there is an open punch
|
|
||||||
$openPunch = $this->getPunch($req)->getData();
|
$openPunch = $this->getPunch($req)->getData();
|
||||||
|
|
||||||
if(empty($openPunch)){
|
if(empty($openPunch)){
|
||||||
@@ -65,13 +72,7 @@ class AttendanceActionManager extends SubActionManager{
|
|||||||
$arr = explode(" ",$dateTime);
|
$arr = explode(" ",$dateTime);
|
||||||
$date = $arr[0];
|
$date = $arr[0];
|
||||||
|
|
||||||
$currentDateTime = $req->cdate;
|
|
||||||
$arr = explode(" ",$currentDateTime);
|
|
||||||
$currentDate = $arr[0];
|
|
||||||
|
|
||||||
if($currentDate != $date){
|
|
||||||
return new IceResponse(IceResponse::ERROR,"You are not allowed to punch time for a previous date");
|
|
||||||
}
|
|
||||||
|
|
||||||
$employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true);
|
$employee = $this->baseService->getElement('Employee',$this->getCurrentProfileId(),null,true);
|
||||||
|
|
||||||
@@ -98,18 +99,18 @@ class AttendanceActionManager extends SubActionManager{
|
|||||||
}
|
}
|
||||||
if(strtotime($attendance->out_time) >= strtotime($dateTime) && strtotime($attendance->in_time) <= strtotime($dateTime)){
|
if(strtotime($attendance->out_time) >= strtotime($dateTime) && strtotime($attendance->in_time) <= strtotime($dateTime)){
|
||||||
//-1---0---1---0 || ---0--1---1---0
|
//-1---0---1---0 || ---0--1---1---0
|
||||||
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 1");
|
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one");
|
||||||
}else if(strtotime($attendance->out_time) >= strtotime($openPunch->in_time) && strtotime($attendance->in_time) <= strtotime($openPunch->in_time)){
|
}else if(strtotime($attendance->out_time) >= strtotime($openPunch->in_time) && strtotime($attendance->in_time) <= strtotime($openPunch->in_time)){
|
||||||
//---0---1---0---1 || ---0--1---1---0
|
//---0---1---0---1 || ---0--1---1---0
|
||||||
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 2");
|
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one");
|
||||||
}else if(strtotime($attendance->out_time) <= strtotime($dateTime) && strtotime($attendance->in_time) >= strtotime($openPunch->in_time)){
|
}else if(strtotime($attendance->out_time) <= strtotime($dateTime) && strtotime($attendance->in_time) >= strtotime($openPunch->in_time)){
|
||||||
//--1--0---0--1--
|
//--1--0---0--1--
|
||||||
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 3 ".$attendance->id);
|
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one ".$attendance->id);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(strtotime($attendance->out_time) >= strtotime($dateTime) && strtotime($attendance->in_time) <= strtotime($dateTime)){
|
if(strtotime($attendance->out_time) >= strtotime($dateTime) && strtotime($attendance->in_time) <= strtotime($dateTime)){
|
||||||
//---0---1---0
|
//---0---1---0
|
||||||
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one 4");
|
return new IceResponse(IceResponse::ERROR,"Time entry is overlapping with an existing one");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
ext/modules/attendance/dashboard.html
Normal file
17
ext/modules/attendance/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-aqua">
|
||||||
|
<div class="inner">
|
||||||
|
<h3 id="lastPunchTime">
|
||||||
|
Punch In
|
||||||
|
</h3>
|
||||||
|
<p>or punch out</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-ios7-alarm-outline"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="atteandanceLink">
|
||||||
|
Record Attendance <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -25,6 +25,11 @@ $moduleName = 'attendance';
|
|||||||
define('MODULE_PATH',dirname(__FILE__));
|
define('MODULE_PATH',dirname(__FILE__));
|
||||||
include APP_BASE_PATH.'header.php';
|
include APP_BASE_PATH.'header.php';
|
||||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||||
|
$useServerTime = SettingsManager::getInstance()->getSetting('Attendance: Use Department Time Zone');
|
||||||
|
$currentEmployeeTimeZone = BaseService::getInstance()->getCurrentEmployeeTimeZone();
|
||||||
|
if(empty($currentEmployeeTimeZone)){
|
||||||
|
$useServerTime = 0;
|
||||||
|
}
|
||||||
?><div class="span9">
|
?><div class="span9">
|
||||||
|
|
||||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
||||||
@@ -48,9 +53,11 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
|
|||||||
<script>
|
<script>
|
||||||
var modJsList = new Array();
|
var modJsList = new Array();
|
||||||
modJsList['tabAttendance'] = new AttendanceAdapter('Attendance','Attendance','','in_time desc');
|
modJsList['tabAttendance'] = new AttendanceAdapter('Attendance','Attendance','','in_time desc');
|
||||||
|
modJsList['tabAttendance'].setUseServerTime(<?=$useServerTime?>);
|
||||||
modJsList['tabAttendance'].setRemoteTable(true);
|
modJsList['tabAttendance'].setRemoteTable(true);
|
||||||
modJsList['tabAttendance'].updatePunchButton(true);
|
modJsList['tabAttendance'].updatePunchButton(true);
|
||||||
|
|
||||||
|
|
||||||
var modJs = modJsList['tabAttendance'];
|
var modJs = modJsList['tabAttendance'];
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilin
|
|||||||
function AttendanceAdapter(endPoint,tab,filter,orderBy) {
|
function AttendanceAdapter(endPoint,tab,filter,orderBy) {
|
||||||
this.initAdapter(endPoint,tab,filter,orderBy);
|
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||||
this.punch = null;
|
this.punch = null;
|
||||||
|
this.useServerTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AttendanceAdapter.inherits(AdapterBase);
|
AttendanceAdapter.inherits(AdapterBase);
|
||||||
@@ -31,6 +32,10 @@ AttendanceAdapter.method('updatePunchButton', function() {
|
|||||||
this.getPunch('changePunchButtonSuccessCallBack');
|
this.getPunch('changePunchButtonSuccessCallBack');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AttendanceAdapter.method('setUseServerTime', function(val) {
|
||||||
|
this.useServerTime = val;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
AttendanceAdapter.method('getDataMapping', function() {
|
AttendanceAdapter.method('getDataMapping', function() {
|
||||||
return [
|
return [
|
||||||
@@ -51,11 +56,19 @@ AttendanceAdapter.method('getHeaders', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
AttendanceAdapter.method('getFormFields', function() {
|
AttendanceAdapter.method('getFormFields', function() {
|
||||||
return [
|
if(this.useServerTime == 0){
|
||||||
[ "id", {"label":"ID","type":"hidden"}],
|
return [
|
||||||
[ "time", {"label":"Time","type":"datetime"}],
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
[ "note", {"label":"Note","type":"textarea","validation":"none"}]
|
[ "time", {"label":"Time","type":"datetime"}],
|
||||||
];
|
[ "note", {"label":"Note","type":"textarea","validation":"none"}]
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
return [
|
||||||
|
[ "id", {"label":"ID","type":"hidden"}],
|
||||||
|
[ "note", {"label":"Note","type":"textarea","validation":"none"}]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"order":"2",
|
"order":"2",
|
||||||
"icon":"fa-clock-o",
|
"icon":"fa-clock-o",
|
||||||
"user_levels":["Admin","Manager","Employee"],
|
"user_levels":["Admin","Manager","Employee"],
|
||||||
|
"dashboardPosition":102,
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,53 +24,79 @@ Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilin
|
|||||||
include (APP_BASE_PATH."modules/leaves/api/LeavesActionManager.php");
|
include (APP_BASE_PATH."modules/leaves/api/LeavesActionManager.php");
|
||||||
|
|
||||||
class DashboardActionManager extends SubActionManager{
|
class DashboardActionManager extends SubActionManager{
|
||||||
|
|
||||||
public function getPendingLeaves($req){
|
public function getPendingLeaves($req){
|
||||||
|
|
||||||
$lam = new LeavesActionManager();
|
$lam = new LeavesActionManager();
|
||||||
$leavePeriod = $lam->getCurrentLeavePeriod(date("Y-m-d H:i:s"), date("Y-m-d H:i:s"));
|
$leavePeriod = $lam->getCurrentLeavePeriod(date("Y-m-d H:i:s"), date("Y-m-d H:i:s"));
|
||||||
|
|
||||||
$leave = new EmployeeLeave();
|
$leave = new EmployeeLeave();
|
||||||
$pendingLeaves = $leave->Find("status = ? and employee = ?",array("Pending", $this->getCurrentProfileId()));
|
$pendingLeaves = $leave->Find("status = ? and employee = ?",array("Pending", $this->getCurrentProfileId()));
|
||||||
|
|
||||||
return new IceResponse(IceResponse::SUCCESS,count($pendingLeaves));
|
return new IceResponse(IceResponse::SUCCESS,count($pendingLeaves));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLastTimeSheetHours($req){
|
public function getInitData($req){
|
||||||
$timeSheet = new EmployeeTimeSheet();
|
$data = array();
|
||||||
$timeSheet->Load("employee = ? order by date_end desc limit 1",array($this->getCurrentProfileId()));
|
|
||||||
|
$emp = new Employee();
|
||||||
if(empty($timeSheet->employee)){
|
$data['numberOfEmployees'] = $emp->Count("status = 'Active' and supervisor = ?",array($this->getCurrentProfileId()));
|
||||||
return new IceResponse(IceResponse::SUCCESS,"0:00");
|
|
||||||
}
|
$data['lastTimeSheetHours'] = $this->getLastTimeSheetHours($req)->getData();
|
||||||
|
$data['activeProjects'] = $this->getEmployeeActiveProjects($req)->getData();
|
||||||
$timeSheetEntry = new EmployeeTimeEntry();
|
$data['pendingLeaves'] = $this->getPendingLeaves($req)->getData();
|
||||||
$list = $timeSheetEntry->Find("timesheet = ?",array($timeSheet->id));
|
$candidate = new Candidate();
|
||||||
|
$data['numberOfCandidates'] = $candidate->Count("1 = 1");
|
||||||
$seconds = 0;
|
|
||||||
foreach($list as $entry){
|
$job = new Job();
|
||||||
$seconds += (strtotime($entry->date_end) - strtotime($entry->date_start));
|
$data['numberOfJobs'] = $job->Count("status = 'Active'");
|
||||||
}
|
|
||||||
|
|
||||||
$minutes = (int)($seconds/60);
|
$attendance = new Attendance();
|
||||||
$rem = $minutes % 60;
|
$data['numberOfAttendanceLastWeek'] = $attendance->Count("in_time > '".date("Y-m-d H:i:s",strtotime("-1 week"))."'");
|
||||||
$hours = ($minutes - $rem)/60;
|
|
||||||
if($rem < 10){
|
$course = new Course();
|
||||||
$rem ="0".$rem;
|
$data['numberOfCourses'] = $course->Count("1 = 1");
|
||||||
}
|
|
||||||
return new IceResponse(IceResponse::SUCCESS,$hours.":".$rem);
|
return new IceResponse(IceResponse::SUCCESS,$data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmployeeActiveProjects($req){
|
public function getLastTimeSheetHours($req){
|
||||||
$project = new EmployeeProject();
|
$timeSheet = new EmployeeTimeSheet();
|
||||||
$projects = $project->Find("employee = ? and status =?",array($this->getCurrentProfileId(),'Current'));
|
$timeSheet->Load("employee = ? order by date_end desc limit 1",array($this->getCurrentProfileId()));
|
||||||
|
|
||||||
|
if(empty($timeSheet->employee)){
|
||||||
return new IceResponse(IceResponse::SUCCESS,count($projects));
|
return new IceResponse(IceResponse::SUCCESS,"0:00");
|
||||||
|
}
|
||||||
}
|
|
||||||
|
$timeSheetEntry = new EmployeeTimeEntry();
|
||||||
|
$list = $timeSheetEntry->Find("timesheet = ?",array($timeSheet->id));
|
||||||
|
|
||||||
|
$seconds = 0;
|
||||||
|
foreach($list as $entry){
|
||||||
|
$seconds += (strtotime($entry->date_end) - strtotime($entry->date_start));
|
||||||
|
}
|
||||||
|
|
||||||
|
$minutes = (int)($seconds/60);
|
||||||
|
$rem = $minutes % 60;
|
||||||
|
$hours = ($minutes - $rem)/60;
|
||||||
|
if($rem < 10){
|
||||||
|
$rem ="0".$rem;
|
||||||
|
}
|
||||||
|
return new IceResponse(IceResponse::SUCCESS,$hours.":".$rem);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEmployeeActiveProjects($req){
|
||||||
|
$project = new EmployeeProject();
|
||||||
|
$projects = $project->Find("employee = ? and status =?",array($this->getCurrentProfileId(),'Current'));
|
||||||
|
|
||||||
|
|
||||||
|
return new IceResponse(IceResponse::SUCCESS,count($projects));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -26,79 +26,41 @@ define('MODULE_PATH',dirname(__FILE__));
|
|||||||
include APP_BASE_PATH.'header.php';
|
include APP_BASE_PATH.'header.php';
|
||||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||||
?><div class="span9">
|
?><div class="span9">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-aqua">
|
|
||||||
<div class="inner">
|
|
||||||
<h3 id="lastPunchTime">
|
<?php
|
||||||
..
|
$moduleManagers = BaseService::getInstance()->getModuleManagers();
|
||||||
</h3>
|
$dashBoardList = array();
|
||||||
<p id="punchTimeText">
|
foreach($moduleManagers as $moduleManagerObj){
|
||||||
Waiting for Response..
|
|
||||||
</p>
|
$allowed = BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj);
|
||||||
</div>
|
|
||||||
<div class="icon">
|
if(!$allowed){
|
||||||
<i class="ion ion-ios7-alarm-outline"></i>
|
continue;
|
||||||
</div>
|
}
|
||||||
<a href="#" class="small-box-footer" id="atteandanceLink">
|
|
||||||
Record Attendance <i class="fa fa-arrow-circle-right"></i>
|
$item = $moduleManagerObj->getDashboardItem();
|
||||||
</a>
|
if(!empty($item)) {
|
||||||
</div>
|
$index = $moduleManagerObj->getDashboardItemIndex();
|
||||||
</div><!-- ./col -->
|
$dashBoardList[$index] = $item;
|
||||||
<div class="col-lg-3 col-xs-6">
|
}
|
||||||
<!-- small box -->
|
}
|
||||||
<div class="small-box bg-green">
|
|
||||||
<div class="inner">
|
ksort($dashBoardList);
|
||||||
<h3 id="pendingLeaveCount">..</h3>
|
|
||||||
<p>
|
foreach($dashBoardList as $k=>$v){
|
||||||
Pending Leaves
|
echo $v;
|
||||||
</p>
|
}
|
||||||
</div>
|
?>
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-calendar"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="leavesLink">
|
|
||||||
Check Leave Status <i class="fa fa-arrow-circle-right"></i>
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-yellow">
|
|
||||||
<div class="inner">
|
|
||||||
<h3 id="timeSheetHoursWorked">..</h3>
|
|
||||||
<p>
|
|
||||||
Hours worked Last Week
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-clock"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="timesheetLink">
|
|
||||||
Update Time Sheet <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
<div class="col-lg-3 col-xs-6">
|
|
||||||
<!-- small box -->
|
|
||||||
<div class="small-box bg-red">
|
|
||||||
<div class="inner">
|
|
||||||
<h3 id="numberOfProjects">..</h3>
|
|
||||||
<p>
|
|
||||||
Active Projects
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="icon">
|
|
||||||
<i class="ion ion-pie-graph"></i>
|
|
||||||
</div>
|
|
||||||
<a href="#" class="small-box-footer" id="projectsLink">
|
|
||||||
More info <i class="fa fa-arrow-circle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div><!-- ./col -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
@@ -107,16 +69,30 @@ var modJsList = new Array();
|
|||||||
modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');
|
modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');
|
||||||
|
|
||||||
var modJs = modJsList['tabDashboard'];
|
var modJs = modJsList['tabDashboard'];
|
||||||
|
/*
|
||||||
|
$("#employeeLink").attr("href",modJs.getCustomUrl('?g=admin&n=employees&m=admin_Admin'));
|
||||||
|
$("#jobsLink").attr("href",modJs.getCustomUrl('?g=admin&n=jobpositions&m=admin_Recruitment'));
|
||||||
|
$("#candidatesLink").attr("href",modJs.getCustomUrl('?g=admin&n=candidates&m=admin_Recruitment'));
|
||||||
|
$("#projectAdminLink").attr("href",modJs.getCustomUrl('?g=admin&n=projects&m=admin_Admin'));
|
||||||
|
$("#trainingLink").attr("href",modJs.getCustomUrl('?g=admin&n=training&m=admin_Admin'));
|
||||||
|
$("#travelLink").attr("href",modJs.getCustomUrl('?g=admin&n=travel&m=admin_Employees'));
|
||||||
|
$("#documentLink").attr("href",modJs.getCustomUrl('?g=admin&n=documents&m=admin_Employees'));
|
||||||
|
$("#expenseLink").attr("href",modJs.getCustomUrl('?g=admin&n=expenses&m=admin_Employees'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$("#myProfileLink").attr("href",modJs.getCustomUrl('?g=modules&n=employees&m=module_Personal_Information'));
|
||||||
$("#atteandanceLink").attr("href",modJs.getCustomUrl('?g=modules&n=attendance&m=module_Time_Management'));
|
$("#atteandanceLink").attr("href",modJs.getCustomUrl('?g=modules&n=attendance&m=module_Time_Management'));
|
||||||
$("#leavesLink").attr("href",modJs.getCustomUrl('?g=modules&n=leaves&m=module_Leaves'));
|
$("#leavesLink").attr("href",modJs.getCustomUrl('?g=modules&n=leaves&m=module_Leaves'));
|
||||||
$("#timesheetLink").attr("href",modJs.getCustomUrl('?g=modules&n=time_sheets&m=module_Time_Management'));
|
$("#timesheetLink").attr("href",modJs.getCustomUrl('?g=modules&n=time_sheets&m=module_Time_Management'));
|
||||||
$("#projectsLink").attr("href",modJs.getCustomUrl('?g=modules&n=projects&m=module_Personal_Information'));
|
$("#projectsLink").attr("href",modJs.getCustomUrl('?g=modules&n=projects&m=module_Personal_Information'));
|
||||||
|
$("#myDocumentsLink").attr("href",modJs.getCustomUrl('?g=modules&n=documents&m=module_Documents'));
|
||||||
|
$("#mytravelLink").attr("href",modJs.getCustomUrl('?g=modules&n=travel&m=module_Travel_Management'));
|
||||||
|
$("#myExpensesLink").attr("href",modJs.getCustomUrl('?g=modules&n=expenses&m=module_Finance'));
|
||||||
|
|
||||||
modJs.getPunch();
|
modJs.getPunch();
|
||||||
modJs.getPendingLeaves();
|
modJs.getInitData();
|
||||||
modJs.getLastTimeSheetHours();
|
*/
|
||||||
modJs.getEmployeeActiveProjects();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php include APP_BASE_PATH.'footer.php';?>
|
<?php include APP_BASE_PATH.'footer.php';?>
|
||||||
@@ -1,27 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of iCE Hrm.
|
This file is part of iCE Hrm.
|
||||||
|
|
||||||
iCE Hrm is free software: you can redistribute it and/or modify
|
iCE Hrm is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
iCE Hrm is distributed in the hope that it will be useful,
|
iCE Hrm is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
------------------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
|
|
||||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
||||||
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function DashboardAdapter(endPoint) {
|
function DashboardAdapter(endPoint) {
|
||||||
this.initAdapter(endPoint);
|
this.initAdapter(endPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
DashboardAdapter.inherits(AdapterBase);
|
DashboardAdapter.inherits(AdapterBase);
|
||||||
@@ -29,15 +29,15 @@ DashboardAdapter.inherits(AdapterBase);
|
|||||||
|
|
||||||
|
|
||||||
DashboardAdapter.method('getDataMapping', function() {
|
DashboardAdapter.method('getDataMapping', function() {
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardAdapter.method('getHeaders', function() {
|
DashboardAdapter.method('getHeaders', function() {
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardAdapter.method('getFormFields', function() {
|
DashboardAdapter.method('getFormFields', function() {
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -46,128 +46,85 @@ DashboardAdapter.method('get', function(callBackData) {
|
|||||||
|
|
||||||
|
|
||||||
DashboardAdapter.method('getPunch', function() {
|
DashboardAdapter.method('getPunch', function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var object = {};
|
var object = {};
|
||||||
|
|
||||||
object['date'] = this.getClientDate(new Date()).toISOString().slice(0, 19).replace('T', ' ');
|
object['date'] = this.getClientDate(new Date()).toISOString().slice(0, 19).replace('T', ' ');
|
||||||
object['offset'] = this.getClientGMTOffset();
|
object['offset'] = this.getClientGMTOffset();
|
||||||
var reqJson = JSON.stringify(object);
|
var reqJson = JSON.stringify(object);
|
||||||
var callBackData = [];
|
var callBackData = [];
|
||||||
callBackData['callBackData'] = [];
|
callBackData['callBackData'] = [];
|
||||||
callBackData['callBackSuccess'] = 'getPunchSuccessCallBack';
|
callBackData['callBackSuccess'] = 'getPunchSuccessCallBack';
|
||||||
callBackData['callBackFail'] = 'getPunchFailCallBack';
|
callBackData['callBackFail'] = 'getPunchFailCallBack';
|
||||||
|
|
||||||
this.customAction('getPunch','modules=attendance',reqJson,callBackData);
|
this.customAction('getPunch','modules=attendance',reqJson,callBackData);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DashboardAdapter.method('getPunchSuccessCallBack', function(callBackData) {
|
DashboardAdapter.method('getPunchSuccessCallBack', function(callBackData) {
|
||||||
var punch = callBackData;
|
var punch = callBackData;
|
||||||
if(punch == null){
|
if(punch == null){
|
||||||
$("#lastPunchTime").html("Not");
|
$("#lastPunchTime").html("Not");
|
||||||
$("#punchTimeText").html("Punched In");
|
$("#punchTimeText").html("Punched In");
|
||||||
}else{
|
}else{
|
||||||
$("#lastPunchTime").html(Date.parse(punch.in_time).toString('h:mm tt'));
|
$("#lastPunchTime").html(Date.parse(punch.in_time).toString('h:mm tt'));
|
||||||
$("#punchTimeText").html("Punched In");
|
$("#punchTimeText").html("Punched In");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardAdapter.method('getPunchFailCallBack', function(callBackData) {
|
DashboardAdapter.method('getPunchFailCallBack', function(callBackData) {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
DashboardAdapter.method('getInitData', function() {
|
||||||
|
var that = this;
|
||||||
|
var object = {};
|
||||||
|
var reqJson = JSON.stringify(object);
|
||||||
|
var callBackData = [];
|
||||||
|
callBackData['callBackData'] = [];
|
||||||
|
callBackData['callBackSuccess'] = 'getInitDataSuccessCallBack';
|
||||||
|
callBackData['callBackFail'] = 'getInitDataFailCallBack';
|
||||||
|
|
||||||
DashboardAdapter.method('getPendingLeaves', function() {
|
this.customAction('getInitData','modules=dashboard',reqJson,callBackData);
|
||||||
var that = this;
|
|
||||||
var object = {};
|
|
||||||
|
|
||||||
var reqJson = JSON.stringify(object);
|
|
||||||
var callBackData = [];
|
|
||||||
callBackData['callBackData'] = [];
|
|
||||||
callBackData['callBackSuccess'] = 'getPendingLeavesSuccessCallBack';
|
|
||||||
callBackData['callBackFail'] = 'getPendingLeavesFailCallBack';
|
|
||||||
|
|
||||||
this.customAction('getPendingLeaves','modules=dashboard',reqJson,callBackData);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DashboardAdapter.method('getPendingLeavesSuccessCallBack', function(callBackData) {
|
DashboardAdapter.method('getInitDataSuccessCallBack', function(data) {
|
||||||
var leaveCount = callBackData;
|
|
||||||
$("#pendingLeaveCount").html(leaveCount);
|
$("#timeSheetHoursWorked").html(data['lastTimeSheetHours']);
|
||||||
|
$("#numberOfProjects").html(data['activeProjects']);
|
||||||
|
$("#pendingLeaveCount").html(data['pendingLeaves']);
|
||||||
|
|
||||||
|
$("#numberOfEmployees").html(data['numberOfEmployees']+" Subordinates");
|
||||||
|
$("#numberOfCandidates").html(data['numberOfCandidates']+" Candidates");
|
||||||
|
$("#numberOfJobs").html(data['numberOfJobs']+" Active");
|
||||||
|
$("#numberOfCourses").html(data['numberOfCourses']+" Active");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardAdapter.method('getPendingLeavesFailCallBack', function(callBackData) {
|
DashboardAdapter.method('getInitDataFailCallBack', function(callBackData) {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardAdapter.method('getLastTimeSheetHours', function() {
|
|
||||||
var that = this;
|
|
||||||
var object = {};
|
|
||||||
|
|
||||||
var reqJson = JSON.stringify(object);
|
|
||||||
var callBackData = [];
|
|
||||||
callBackData['callBackData'] = [];
|
|
||||||
callBackData['callBackSuccess'] = 'getLastTimeSheetHoursSuccessCallBack';
|
|
||||||
callBackData['callBackFail'] = 'getLastTimeSheetHoursFailCallBack';
|
|
||||||
|
|
||||||
this.customAction('getLastTimeSheetHours','modules=dashboard',reqJson,callBackData);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DashboardAdapter.method('getLastTimeSheetHoursSuccessCallBack', function(callBackData) {
|
|
||||||
var hours = callBackData;
|
|
||||||
$("#timeSheetHoursWorked").html(hours);
|
|
||||||
});
|
|
||||||
|
|
||||||
DashboardAdapter.method('getLastTimeSheetHoursFailCallBack', function(callBackData) {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DashboardAdapter.method('getEmployeeActiveProjects', function() {
|
|
||||||
var that = this;
|
|
||||||
var object = {};
|
|
||||||
|
|
||||||
var reqJson = JSON.stringify(object);
|
|
||||||
var callBackData = [];
|
|
||||||
callBackData['callBackData'] = [];
|
|
||||||
callBackData['callBackSuccess'] = 'getEmployeeActiveProjectsSuccessCallBack';
|
|
||||||
callBackData['callBackFail'] = 'getEmployeeActiveProjectsFailCallBack';
|
|
||||||
|
|
||||||
this.customAction('getEmployeeActiveProjects','modules=dashboard',reqJson,callBackData);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DashboardAdapter.method('getEmployeeActiveProjectsSuccessCallBack', function(callBackData) {
|
|
||||||
var hours = callBackData;
|
|
||||||
$("#numberOfProjects").html(hours);
|
|
||||||
});
|
|
||||||
|
|
||||||
DashboardAdapter.method('getEmployeeActiveProjectsFailCallBack', function(callBackData) {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
DashboardAdapter.method('getClientDate', function (date) {
|
DashboardAdapter.method('getClientDate', function (date) {
|
||||||
|
|
||||||
var offset = this.getClientGMTOffset();
|
var offset = this.getClientGMTOffset();
|
||||||
var tzDate = date.addMinutes(offset*60);
|
var tzDate = date.addMinutes(offset*60);
|
||||||
return tzDate;
|
return tzDate;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardAdapter.method('getClientGMTOffset', function () {
|
DashboardAdapter.method('getClientGMTOffset', function () {
|
||||||
|
|
||||||
var rightNow = new Date();
|
var rightNow = new Date();
|
||||||
var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0);
|
var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0);
|
||||||
var temp = jan1.toGMTString();
|
var temp = jan1.toGMTString();
|
||||||
var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1));
|
var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1));
|
||||||
var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60);
|
var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60);
|
||||||
|
|
||||||
return std_time_offset;
|
return std_time_offset;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
This file is part of iCE Hrm.
|
|
||||||
|
|
||||||
iCE Hrm is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
iCE Hrm is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
------------------------------------------------------------------
|
|
||||||
|
|
||||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
|
||||||
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
|
||||||
*/
|
|
||||||
|
|
||||||
$moduleName = 'documents';
|
|
||||||
define('MODULE_PATH',dirname(__FILE__));
|
|
||||||
include APP_BASE_PATH.'header.php';
|
|
||||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
|
||||||
?><div class="span9">
|
|
||||||
|
|
||||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
|
||||||
<li class="active"><a id="tabEmployeeDocument" href="#tabPageEmployeeDocument">My Documents</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="tab-content">
|
|
||||||
<div class="tab-pane active" id="tabPageEmployeeDocument">
|
|
||||||
<div id="EmployeeDocument" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div id="EmployeeDocumentForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var modJsList = new Array();
|
|
||||||
|
|
||||||
modJsList['tabEmployeeDocument'] = new EmployeeDocumentAdapter('EmployeeDocument','EmployeeDocument');
|
|
||||||
|
|
||||||
<?php if(isset($modulePermissions['perm']['Add Documents']) && $modulePermissions['perm']['Add Documents'] == "No"){?>
|
|
||||||
modJsList['tabEmployeeDocument'].setShowAddNew(false);
|
|
||||||
<?php }?>
|
|
||||||
<?php if(isset($modulePermissions['perm']['Delete Documents']) && $modulePermissions['perm']['Delete Documents'] == "No"){?>
|
|
||||||
modJsList['tabEmployeeDocument'].setShowDelete(false);
|
|
||||||
<?php }?>
|
|
||||||
<?php if(isset($modulePermissions['perm']['Edit Documents']) && $modulePermissions['perm']['Edit Documents'] == "No"){?>
|
|
||||||
modJsList['tabEmployeeDocument'].setShowEdit(false);
|
|
||||||
<?php }?>
|
|
||||||
|
|
||||||
var modJs = modJsList['tabEmployeeDocument'];
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<?php include APP_BASE_PATH.'footer.php';?>
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of iCE Hrm.
|
|
||||||
|
|
||||||
iCE Hrm is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
iCE Hrm is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
------------------------------------------------------------------
|
|
||||||
|
|
||||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
|
||||||
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
|
||||||
*/
|
|
||||||
|
|
||||||
function EmployeeDocumentAdapter(endPoint) {
|
|
||||||
this.initAdapter(endPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.inherits(AdapterBase);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getDataMapping', function() {
|
|
||||||
return [
|
|
||||||
"id",
|
|
||||||
"document",
|
|
||||||
"details",
|
|
||||||
"date_added",
|
|
||||||
"status",
|
|
||||||
"attachment"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getHeaders', function() {
|
|
||||||
return [
|
|
||||||
{ "sTitle": "ID" ,"bVisible":false},
|
|
||||||
{ "sTitle": "Document" },
|
|
||||||
{ "sTitle": "Details" },
|
|
||||||
{ "sTitle": "Date Added"},
|
|
||||||
{ "sTitle": "Status"},
|
|
||||||
{ "sTitle": "Attachment","bVisible":false}
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getFormFields', function() {
|
|
||||||
return [
|
|
||||||
[ "id", {"label":"ID","type":"hidden"}],
|
|
||||||
[ "document", {"label":"Document","type":"select2","remote-source":["Document","id","name"]}],
|
|
||||||
//[ "date_added", {"label":"Date Added","type":"date","validation":""}],
|
|
||||||
[ "valid_until", {"label":"Valid Until","type":"date","validation":"none"}],
|
|
||||||
[ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"],["Draft","Draft"]]}],
|
|
||||||
[ "details", {"label":"Details","type":"textarea","validation":"none"}],
|
|
||||||
[ "attachment", {"label":"Attachment","type":"fileupload","validation":"none"}]
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
EmployeeDocumentAdapter.method('getActionButtonsHtml', function(id,data) {
|
|
||||||
var downloadButton = '<img class="tableActionButton" src="_BASE_images/download.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Download Document" onclick="download(\'_attachment_\');return false;"></img>';
|
|
||||||
var editButton = '<img class="tableActionButton" src="_BASE_images/edit.png" style="cursor:pointer;" rel="tooltip" title="Edit" onclick="modJs.edit(_id_);return false;"></img>';
|
|
||||||
var deleteButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Delete" onclick="modJs.deleteRow(_id_);return false;"></img>';
|
|
||||||
var html = '<div style="width:80px;">_edit__download__delete_</div>';
|
|
||||||
|
|
||||||
html = html.replace('_download_',downloadButton);
|
|
||||||
|
|
||||||
if(this.showDelete){
|
|
||||||
html = html.replace('_delete_',deleteButton);
|
|
||||||
}else{
|
|
||||||
html = html.replace('_delete_','');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.showEdit){
|
|
||||||
html = html.replace('_edit_',editButton);
|
|
||||||
}else{
|
|
||||||
html = html.replace('_edit_','');
|
|
||||||
}
|
|
||||||
|
|
||||||
html = html.replace(/_id_/g,id);
|
|
||||||
html = html.replace(/_attachment_/g,data[5]);
|
|
||||||
html = html.replace(/_BASE_/g,this.baseUrl);
|
|
||||||
return html;
|
|
||||||
});
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"label":"My Documents",
|
|
||||||
"menu":"Documents",
|
|
||||||
"order":"1",
|
|
||||||
"icon":"fa-files-o",
|
|
||||||
"user_levels":["Admin","Manager","Employee"],
|
|
||||||
|
|
||||||
"permissions":
|
|
||||||
{
|
|
||||||
"Manager":{
|
|
||||||
"Add Documents":"Yes",
|
|
||||||
"Edit Documents":"Yes",
|
|
||||||
"Delete Documents":"Yes"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Employee":{
|
|
||||||
"Add Documents":"Yes",
|
|
||||||
"Edit Documents":"Yes",
|
|
||||||
"Delete Documents":"Yes"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"label":"Loans",
|
"label":"Loans",
|
||||||
"menu":"Loans",
|
"menu":"Finance",
|
||||||
"order":"1",
|
"order":"3",
|
||||||
"icon":"fa-shield",
|
"icon":"fa-shield",
|
||||||
"user_levels":["Admin","Manager","Employee"],
|
"user_levels":["Admin","Manager","Employee"],
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Personal Information":"fa-male",
|
"Personal Information":"fa-male",
|
||||||
"Subordinates":"fa-user",
|
"Subordinates":"fa-user",
|
||||||
"Leaves":"fa-calendar-o",
|
|
||||||
"Time Management":"fa-clock-o",
|
"Time Management":"fa-clock-o",
|
||||||
"Documents":"fa-files-o",
|
"Travel Management":"fa-plane",
|
||||||
"Training":"fa-briefcase",
|
"Finance":"fa-money"
|
||||||
"Loans":"fa-list-alt"
|
|
||||||
}
|
}
|
||||||
15
ext/modules/projects/dashboard.html
Normal file
15
ext/modules/projects/dashboard.html
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-red">
|
||||||
|
<div class="inner">
|
||||||
|
<h3>My Projects</h3>
|
||||||
|
<p>Projects Assigned</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-pie-graph"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#_moduleLink_#" class="small-box-footer" id="projectsLink">
|
||||||
|
More info <i class="fa fa-arrow-circle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"order":"1",
|
"order":"1",
|
||||||
"icon":"fa-pencil-square",
|
"icon":"fa-pencil-square",
|
||||||
"user_levels":["Admin","Manager","Employee"],
|
"user_levels":["Admin","Manager","Employee"],
|
||||||
|
"dashboardPosition":105,
|
||||||
"permissions":
|
"permissions":
|
||||||
{
|
{
|
||||||
"Manager":{
|
"Manager":{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"label":"Salary",
|
"label":"Salary",
|
||||||
"menu":"Personal Information",
|
"menu":"Finance",
|
||||||
"order":"4",
|
"order":"2",
|
||||||
"icon":"fa-calculator",
|
"icon":"fa-calculator",
|
||||||
"user_levels":["Admin","Manager","Employee"],
|
"user_levels":["Admin","Manager","Employee"],
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,13 @@ class Time_sheetsActionManager extends SubActionManager{
|
|||||||
|
|
||||||
$oldStatus = $timeSheet->status;
|
$oldStatus = $timeSheet->status;
|
||||||
$timeSheet->status = $req->status;
|
$timeSheet->status = $req->status;
|
||||||
|
|
||||||
|
|
||||||
|
//Auto approve admin timesheets
|
||||||
|
if($req->status == 'Submitted' && BaseService::getInstance()->getCurrentUser()->user_level == "Admin"){
|
||||||
|
$timeSheet->status = 'Approved';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($oldStatus == $req->status){
|
if($oldStatus == $req->status){
|
||||||
return new IceResponse(IceResponse::SUCCESS,"");
|
return new IceResponse(IceResponse::SUCCESS,"");
|
||||||
|
|||||||
@@ -23,6 +23,39 @@ if (!class_exists('Time_sheetsModulesManager')) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDashboardItemData(){
|
||||||
|
$data = array();
|
||||||
|
$data['timeSheetHoursWorked'] = $this->getLastTimeSheetHours()->getData();
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getLastTimeSheetHours(){
|
||||||
|
$timeSheet = new EmployeeTimeSheet();
|
||||||
|
$timeSheet->Load("employee = ? order by date_end desc limit 1",array(BaseService::getInstance()->getCurrentProfileId()));
|
||||||
|
|
||||||
|
if(empty($timeSheet->employee)){
|
||||||
|
return new IceResponse(IceResponse::SUCCESS,"0:00");
|
||||||
|
}
|
||||||
|
|
||||||
|
$timeSheetEntry = new EmployeeTimeEntry();
|
||||||
|
$list = $timeSheetEntry->Find("timesheet = ?",array($timeSheet->id));
|
||||||
|
|
||||||
|
$seconds = 0;
|
||||||
|
foreach($list as $entry){
|
||||||
|
$seconds += (strtotime($entry->date_end) - strtotime($entry->date_start));
|
||||||
|
}
|
||||||
|
|
||||||
|
$minutes = (int)($seconds/60);
|
||||||
|
$rem = $minutes % 60;
|
||||||
|
$hours = ($minutes - $rem)/60;
|
||||||
|
if($rem < 10){
|
||||||
|
$rem ="0".$rem;
|
||||||
|
}
|
||||||
|
return new IceResponse(IceResponse::SUCCESS,$hours.":".$rem);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,6 +79,41 @@ if (!class_exists('EmployeeTimeSheet')) {
|
|||||||
public function getUserOnlyMeAccess(){
|
public function getUserOnlyMeAccess(){
|
||||||
return array("element","save","delete");
|
return array("element","save","delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTotalTime()
|
||||||
|
{
|
||||||
|
|
||||||
|
$start = $this->date_start . " 00:00:00";
|
||||||
|
$end = $this->date_end . " 23:59:59";
|
||||||
|
|
||||||
|
$timeEntry = new EmployeeTimeEntry();
|
||||||
|
$list = $timeEntry->Find("employee = ? and ((date_start >= ? and date_start <= ?) or (date_end >= ? and date_end <= ?))", array($this->employee, $start, $end, $start, $end));
|
||||||
|
|
||||||
|
|
||||||
|
$seconds = 0;
|
||||||
|
|
||||||
|
foreach ($list as $entry) {
|
||||||
|
|
||||||
|
$secondsTemp = (strtotime($entry->date_end) - strtotime($entry->date_start));
|
||||||
|
if ($secondsTemp < 0) {
|
||||||
|
$secondsTemp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$seconds += $secondsTemp;
|
||||||
|
}
|
||||||
|
|
||||||
|
$totMinutes = round($seconds / 60);
|
||||||
|
$minutes = $totMinutes % 60;
|
||||||
|
$hours = ($totMinutes - $minutes) / 60;
|
||||||
|
|
||||||
|
return CalendarTools::addLeadingZero($hours) . ":" . CalendarTools::addLeadingZero($minutes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function postProcessGetData($entry){
|
||||||
|
$entry->total_time = $this->getTotalTime();
|
||||||
|
return $entry;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class EmployeeTimeEntry extends ICEHRM_Record {
|
class EmployeeTimeEntry extends ICEHRM_Record {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user