Refactor project structure
This commit is contained in:
17
core/modules/attendance/dashboard.html
Normal file
17
core/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">
|
||||
<t>Punch In</t>
|
||||
</h3>
|
||||
<p><t>or</t> <t>Punch Out</t></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-ios7-alarm-outline"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="atteandanceLink">
|
||||
<t>Record Attendance</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
79
core/modules/attendance/index.php
Normal file
79
core/modules/attendance/index.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?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 = 'attendance';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
$useServerTime = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Use Department Time Zone');
|
||||
$photoAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Photo Attendance');
|
||||
$currentEmployeeTimeZone = \Classes\BaseService::getInstance()->getCurrentEmployeeTimeZone();
|
||||
if(empty($currentEmployeeTimeZone)){
|
||||
$useServerTime = 0;
|
||||
}
|
||||
?><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="tabAttendance" href="#tabPageAttendance"><?=t('Attendance')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageAttendance">
|
||||
<div id="Attendance" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<style>
|
||||
#Attendance .dataTables_filter label{
|
||||
float:left;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var modJsList = [];
|
||||
modJsList['tabAttendance'] = new AttendanceAdapter('Attendance','Attendance','','in_time desc');
|
||||
modJsList['tabAttendance'].setUseServerTime(<?=$useServerTime?>);
|
||||
modJsList['tabAttendance'].setPhotoAttendance(<?=$photoAttendance == '1'?>);
|
||||
modJsList['tabAttendance'].setRemoteTable(true);
|
||||
modJsList['tabAttendance'].updatePunchButton(true);
|
||||
|
||||
|
||||
var modJs = modJsList['tabAttendance'];
|
||||
|
||||
</script>
|
||||
<div class="modal" id="PunchModel" 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;">Punch Time</h3>
|
||||
</div>
|
||||
<div class="modal-body" style="max-height:530px;" id="AttendanceForm">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
15
core/modules/attendance/meta.json
Normal file
15
core/modules/attendance/meta.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Attendance",
|
||||
"menu": "Time Management",
|
||||
"order": "2",
|
||||
"icon": "fa-clock-o",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 102,
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Attendance\\Common\\Model",
|
||||
"manager": "\\Attendance\\User\\Api\\AttendanceModulesManager"
|
||||
}
|
||||
31
core/modules/attendance/templates/form_template.html
Normal file
31
core/modules/attendance/templates/form_template.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<form class="form-horizontal" id="_id_" role="form">
|
||||
<div class="box-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="_id__error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row photoAttendance" style="background: #f3f4f5; padding: 10px;">
|
||||
<div class="col-sm-5">
|
||||
<video id="attendnaceVideo" height="156" width="208" autoplay style="border: 1px #222 dotted;"></video>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button style="margin-top:90px;" class="attendnaceSnap btn btn-primary pull-right"><i class="fa fa-camera"></i></button>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<canvas id="attendnaceCanvas" height="156" width="208" style="border: 1px #222 dotted;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
_fields_
|
||||
|
||||
<div class="control-group row">
|
||||
<div class="controls col-sm-9">
|
||||
<button class="saveBtn btn btn-primary pull-right"><i class="fa fa-save"></i> <t>Save</t></button>
|
||||
<button class="cancelBtn btn pull-right" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> <t>Cancel</t></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
95
core/modules/dashboard/index.php
Normal file
95
core/modules/dashboard/index.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?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 = 'dashboard';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
?><div class="span9">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
$moduleManagers = \Classes\BaseService::getInstance()->getModuleManagers();
|
||||
$dashBoardList = array();
|
||||
foreach($moduleManagers as $moduleManagerObj){
|
||||
|
||||
$allowed = \Classes\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 \Classes\LanguageManager::translateTnrText($v);
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');
|
||||
|
||||
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'));
|
||||
$("#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'));
|
||||
$("#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.getInitData();
|
||||
*/
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
14
core/modules/dashboard/meta.json
Normal file
14
core/modules/dashboard/meta.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"label": "Dashboard",
|
||||
"menu": "Personal Information",
|
||||
"order": "1",
|
||||
"icon": "fa-desktop",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Dashboard\\Common\\Model",
|
||||
"manager": "\\Dashboard\\User\\Api\\DashboardModulesManager"
|
||||
}
|
||||
63
core/modules/dependents/index.php
Normal file
63
core/modules/dependents/index.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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 = 'emergency_contact';
|
||||
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="tabEmployeeDependent" href="#tabPageEmployeeDependent"><?=t('Dependents')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageEmployeeDependent">
|
||||
<div id="EmployeeDependent" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeDependentForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabEmployeeDependent'] = new EmployeeDependentAdapter('EmployeeDependent');
|
||||
<?php if(isset($modulePermissions['perm']['Add Dependents']) && $modulePermissions['perm']['Add Dependents'] == "No"){?>
|
||||
modJsList['tabEmployeeDependent'].setShowAddNew(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Delete Dependents']) && $modulePermissions['perm']['Delete Dependents'] == "No"){?>
|
||||
modJsList['tabEmployeeDependent'].setShowDelete(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Edit Dependents']) && $modulePermissions['perm']['Edit Dependents'] == "No"){?>
|
||||
modJsList['tabEmployeeDependent'].setShowEdit(false);
|
||||
<?php }?>
|
||||
|
||||
var modJs = modJsList['tabEmployeeDependent'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
24
core/modules/dependents/meta.json
Normal file
24
core/modules/dependents/meta.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"label":"Dependents",
|
||||
"menu":"Personal Information",
|
||||
"order":"5",
|
||||
"icon":"fa-sliders",
|
||||
"user_levels":["Admin","Manager","Employee"],
|
||||
|
||||
"permissions":
|
||||
{
|
||||
"Manager":{
|
||||
"Add Dependents":"Yes",
|
||||
"Edit Dependents":"Yes",
|
||||
"Delete Dependents":"Yes"
|
||||
},
|
||||
|
||||
"Employee":{
|
||||
"Add Dependents":"Yes",
|
||||
"Edit Dependents":"Yes",
|
||||
"Delete Dependents":"Yes"
|
||||
}
|
||||
},
|
||||
"model_namespace": "\\Dependents\\Common\\Model",
|
||||
"manager": "\\Dependents\\User\\Api\\DependentsModulesManager"
|
||||
}
|
||||
64
core/modules/emergency_contact/index.php
Normal file
64
core/modules/emergency_contact/index.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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 = 'emergency_contact';
|
||||
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="tabEmergencyContact" href="#tabPageEmergencyContact"><?=t('Emergency Contacts')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageEmergencyContact">
|
||||
<div id="EmergencyContact" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmergencyContactForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabEmergencyContact'] = new EmergencyContactAdapter('EmergencyContact');
|
||||
|
||||
<?php if(isset($modulePermissions['perm']['Add Emergency Contacts']) && $modulePermissions['perm']['Add Emergency Contacts'] == "No"){?>
|
||||
modJsList['tabEmergencyContact'].setShowAddNew(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Delete Emergency Contacts']) && $modulePermissions['perm']['Delete Emergency Contacts'] == "No"){?>
|
||||
modJsList['tabEmergencyContact'].setShowDelete(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Edit Emergency Contacts']) && $modulePermissions['perm']['Edit Emergency Contacts'] == "No"){?>
|
||||
modJsList['tabEmergencyContact'].setShowEdit(false);
|
||||
<?php }?>
|
||||
|
||||
var modJs = modJsList['tabEmergencyContact'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
24
core/modules/emergency_contact/meta.json
Normal file
24
core/modules/emergency_contact/meta.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"label":"Emergency Contacts",
|
||||
"menu":"Personal Information",
|
||||
"order":"6",
|
||||
"icon":"fa-phone-square",
|
||||
"user_levels":["Admin","Manager","Employee"],
|
||||
|
||||
"permissions":
|
||||
{
|
||||
"Manager":{
|
||||
"Add Emergency Contacts":"Yes",
|
||||
"Edit Emergency Contacts":"Yes",
|
||||
"Delete Emergency Contacts":"Yes"
|
||||
},
|
||||
|
||||
"Employee":{
|
||||
"Add Emergency Contacts":"Yes",
|
||||
"Edit Emergency Contacts":"Yes",
|
||||
"Delete Emergency Contacts":"Yes"
|
||||
}
|
||||
},
|
||||
"model_namespace": "\\EmergencyContacts\\Common\\Model",
|
||||
"manager": "\\EmergencyContacts\\User\\Api\\EmergencyContactModulesManager"
|
||||
}
|
||||
219
core/modules/employees/customTemplates/myDetails.html
Normal file
219
core/modules/employees/customTemplates/myDetails.html
Normal file
@@ -0,0 +1,219 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-2">
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-12" style="text-align: center;">
|
||||
<img id="profile_image__id_" src="" class="img-polaroid img-thumbnail" style="max-width: 140px;max-height: 140px;">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-10">
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-12"><h2 id="name"></h2></div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
<i class="fa fa-phone"></i> <span id="mobile_phone"></span>
|
||||
<i class="fa fa-envelope"></i> <span id="work_email"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-12" style="font-size:18px;border-bottom: 1px solid #DDD;margin-bottom: 10px;padding-bottom: 10px;">
|
||||
<button id="employeeProfileEditInfo" class="btn btn-small btn-success" onclick="modJs.editEmployee();" style="margin-right:10px;"><i class="fa fa-edit"></i> Edit Info</button>
|
||||
<button id="employeeUploadProfileImage" onclick="showUploadDialog('profile_image__id_','Upload Profile Image','profile_image',_id_,'profile_image__id_','src','url','image');return false;" class="btn btn-small btn-primary" type="button" style="margin-right:10px;"><i class="fa fa-upload"></i> Upload Profile Image</button>
|
||||
<button id="employeeDeleteProfileImage" onclick="modJs.deleteProfileImage(_id_);return false;" class="btn btn-small btn-warning" type="button" style="margin-right:10px;"><i class="fa fa-times"></i> Delete Profile Image</button>
|
||||
<button id="employeeUpdatePassword" onclick="modJs.changePassword();return false;" class="btn btn-small btn-success" type="button" style="margin-right:10px;"><i class="fa fa-lock"></i> Change Password</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid" style="border-top: 1px;">
|
||||
<div class="col-xs-6 col-md-4" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;font-size:13px;">#_label_employee_id_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="employee_id"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_nic_num_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="nic_num"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_ssn_num_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="ssn_num"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-left:10px;">
|
||||
<div class="panel panel-default" style="width:97.5%;">
|
||||
<div class="panel-heading"><h4>Personal Information</h4></div>
|
||||
<div class="panel-body">
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_driving_license_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="driving_license"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_other_id_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="other_id"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_birthday_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="birthday"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_gender_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="gender"></label>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_nationality_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="nationality_Name"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_marital_status_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="marital_status"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_joined_date_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="joined_date"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-left:10px;margin-top:20px;">
|
||||
<div class="panel panel-default" style="width:97.5%;">
|
||||
<div class="panel-heading"><h4>Contact Information</h4></div>
|
||||
<div class="panel-body">
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_address1_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="address1"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_address2_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="address2"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_city_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="city"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_country_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="country_Name"></label>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_postal_code_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="postal_code"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_home_phone_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="home_phone"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_work_phone_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="work_phone"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_private_email_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="private_email"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-left:10px;margin-top:20px;">
|
||||
<div class="panel panel-default" style="width:97.5%;">
|
||||
<div class="panel-heading"><h4>Job Details</h4></div>
|
||||
<div class="panel-body">
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_job_title_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="job_title_Name"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_employment_status_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="employment_status_Name"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">Supervisor</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="supervisor_Name"></label>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">Direct Reports</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="subordinates"></label>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-6 col-md-3" style="font-size:16px;">
|
||||
<label class="control-label col-xs-12" style="font-size:13px;">#_label_department_#</label>
|
||||
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="department_Name"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" id="customFieldsCont" style="margin-left:10px;margin-top:20px;">
|
||||
<!--
|
||||
<div class="panel panel-default" style="width:97.5%;">
|
||||
<div class="panel-heading"><h4>Other Details</h4></div>
|
||||
<div class="panel-body">
|
||||
<div class="row-fluid" id="customFields">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal" id="adminUsersModel" 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 User Password</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="adminUsersChangePwd">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="adminUsersChangePwd_error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="field_newpwd">
|
||||
<label class="control-label" for="newpwd">New Password</label>
|
||||
<div class="controls">
|
||||
<input class="" type="password" id="newpwd" name="newpwd" value="" class="form-control"/>
|
||||
<span class="help-inline" id="help_newpwd"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" id="field_conpwd">
|
||||
<label class="control-label" for="conpwd">Confirm Password</label>
|
||||
<div class="controls">
|
||||
<input class="" type="password" id="conpwd" name="conpwd" value="" class="form-control"/>
|
||||
<span class="help-inline" id="help_conpwd"></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" onclick="modJs.changePasswordConfirm();">Change Password</button>
|
||||
<button class="btn" onclick="modJs.closeChangePassword();">Not Now</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
17
core/modules/employees/dashboard.html
Normal file
17
core/modules/employees/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="col-lg-3 col-xs-12">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-red">
|
||||
<div class="inner">
|
||||
<h3><t>My Profile</t></h3>
|
||||
<p>
|
||||
<t>Edit Details</t>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-ios7-person"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="myProfileLink">
|
||||
<t>View/Edit Profile</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
116
core/modules/employees/index.php
Normal file
116
core/modules/employees/index.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?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 = 'employees';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
$fieldNameMap = \Classes\BaseService::getInstance()->getFieldNameMappings("Employee");
|
||||
$customFields = \Classes\BaseService::getInstance()->getCustomFields("Employee");
|
||||
|
||||
if (\Classes\SettingsManager::getInstance()->getSetting("Api: REST Api Enabled") == "1") {
|
||||
$user = \Classes\BaseService::getInstance()->getCurrentUser();
|
||||
if (empty($user)) {
|
||||
return;
|
||||
}
|
||||
$dbUser = new \Users\Common\Model\User();
|
||||
$dbUser->Load("id = ?", array($user->id));
|
||||
$resp = \Classes\RestApiManager::getInstance()->getAccessTokenForUser($dbUser);
|
||||
if ($resp->getStatus() != \Classes\IceResponse::SUCCESS) {
|
||||
\Utils\LogManager::getInstance()->error(
|
||||
"Error occurred while creating REST Api access token for ".$user->username
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript" src="<?=BASE_URL.'js/d3js/d3.js?v='.$jsVersion?>"></script>
|
||||
<script type="text/javascript" src="<?=BASE_URL.'js/d3js/d3.layout.js?v='.$jsVersion?>"></script>
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.node circle {
|
||||
cursor: pointer;
|
||||
fill: #fff;
|
||||
stroke: steelblue;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
.node text {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
path.link {
|
||||
fill: none;
|
||||
stroke: #ccc;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<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="tabEmployee" href="#tabPageEmployee"><?=t('My Details')?></a></li>
|
||||
<li><a id="tabCompanyGraph" href="#tabPageCompanyGraph"><?=t('Company')?></a></li>
|
||||
<?php if (\Classes\SettingsManager::getInstance()->getSetting("Api: REST Api Enabled") == "1") { ?>
|
||||
<li><a id="tabApiAccess" href="#tabPageApiAccess"><?=t('Api Access')?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageEmployee">
|
||||
<div id="Employee" class="container reviewBlock" data-content="List" style="padding:25px 0px 0px 0px; width:99%;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane reviewBlock" id="tabPageCompanyGraph" style="overflow-x: scroll;">
|
||||
|
||||
</div>
|
||||
<?php if (\Classes\SettingsManager::getInstance()->getSetting("Api: REST Api Enabled") == "1") { ?>
|
||||
<div class="tab-pane reviewBlock" id="tabPageApiAccess" style="overflow-x: scroll;">
|
||||
<div class="row">
|
||||
<div class="panel panel-default" style="width:97.5%;">
|
||||
<div class="panel-heading"><h4>Api Access Token</h4></div>
|
||||
<div class="panel-body">
|
||||
<?=$resp->getData()?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
modJsList['tabEmployee'] = new EmployeeAdapter('Employee');
|
||||
modJsList['tabEmployee'].setFieldNameMap(<?=json_encode($fieldNameMap)?>);
|
||||
modJsList['tabEmployee'].setCustomFields(<?=json_encode($customFields)?>);
|
||||
modJsList['tabCompanyGraph'] = new CompanyGraphAdapter('CompanyStructure');
|
||||
modJsList['tabApiAccess'] = new ApiAccessAdapter('ApiAccess');
|
||||
|
||||
var modJs = modJsList['tabEmployee'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
42
core/modules/employees/meta.json
Normal file
42
core/modules/employees/meta.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"label": "Basic Information",
|
||||
"menu": "Personal Information",
|
||||
"order": "2",
|
||||
"icon": "fa-user",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 101,
|
||||
"permissions": {
|
||||
"Manager": {
|
||||
"Edit Employee Number": "No",
|
||||
"Edit EPF\/CPF Number": "Yes",
|
||||
"Edit Employment Status": "No",
|
||||
"Edit Job Title": "Yes",
|
||||
"Edit Pay Grade": "Yes",
|
||||
"Edit Joined Date": "Yes",
|
||||
"Edit Department": "Yes",
|
||||
"Edit Work Email": "Yes",
|
||||
"Edit Country": "Yes",
|
||||
"Upload\/Delete Profile Image": "Yes",
|
||||
"Edit Employee Details": "Yes"
|
||||
},
|
||||
"Employee": {
|
||||
"Edit Employee Number": "No",
|
||||
"Edit EPF\/CPF Number": "Yes",
|
||||
"Edit Employment Status": "No",
|
||||
"Edit Job Title": "No",
|
||||
"Edit Pay Grade": "No",
|
||||
"Edit Joined Date": "No",
|
||||
"Edit Department": "No",
|
||||
"Edit Work Email": "No",
|
||||
"Edit Country": "No",
|
||||
"Upload\/Delete Profile Image": "Yes",
|
||||
"Edit Employee Details": "Yes"
|
||||
}
|
||||
},
|
||||
"model_namespace": "\\Employees\\Common\\Model",
|
||||
"manager": "\\Employees\\User\\Api\\EmployeesModulesManager"
|
||||
}
|
||||
58
core/modules/loans/index.php
Normal file
58
core/modules/loans/index.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?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 = 'loans';
|
||||
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="tabEmployeeCompanyLoan" href="#tabPageEmployeeCompanyLoan"><?=t('Loans Taken')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageEmployeeCompanyLoan">
|
||||
<div id="EmployeeCompanyLoan" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeCompanyLoanForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabEmployeeCompanyLoan'] = new EmployeeCompanyLoanAdapter('EmployeeCompanyLoan','EmployeeCompanyLoan');
|
||||
modJsList['tabEmployeeCompanyLoan'].setShowAddNew(false);
|
||||
modJsList['tabEmployeeCompanyLoan'].setShowSave(false);
|
||||
modJsList['tabEmployeeCompanyLoan'].setShowDelete(false);
|
||||
modJsList['tabEmployeeCompanyLoan'].setShowEdit(true);
|
||||
|
||||
var modJs = modJsList['tabEmployeeCompanyLoan'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
14
core/modules/loans/meta.json
Normal file
14
core/modules/loans/meta.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"label": "Loans",
|
||||
"menu": "Finance",
|
||||
"order": "3",
|
||||
"icon": "fa-shield",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Loans\\Common\\Model",
|
||||
"manager": "\\Loans\\User\\Api\\LoansModulesManager"
|
||||
}
|
||||
11
core/modules/meta.json
Normal file
11
core/modules/meta.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"Personal Information":"fa-male",
|
||||
"Leave":"fa-calendar-o",
|
||||
"Time Management":"fa-clock-o",
|
||||
"Documents":"fa-files-o",
|
||||
"Company":"fa-building",
|
||||
"Training":"fa-briefcase",
|
||||
"Travel Management":"fa-plane",
|
||||
"Finance":"fa-money",
|
||||
"User Reports":"fa-file-text"
|
||||
}
|
||||
94
core/modules/overtime/index.php
Normal file
94
core/modules/overtime/index.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?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 = 'overtime';
|
||||
$moduleMainName = "EmployeeOvertime"; // for creating module js lib
|
||||
$subModuleMainName = "SubordinateEmployeeOvertime";
|
||||
$moduleItemName = "Overtime Request"; // For permissions
|
||||
|
||||
$itemName = $moduleItemName; // for status change popup
|
||||
$itemNameLower = strtolower($moduleMainName); // for status change popup
|
||||
$appModName = $moduleMainName.'Approval';
|
||||
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
$additionalJs = array();
|
||||
$additionalJs[] = BASE_URL.'admin/overtime/lib.js?v='.$jsVersion;
|
||||
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="tab<?=$moduleMainName?>" href="#tabPage<?=$moduleMainName?>"><?=t('Overtime Requests')?></a></li>
|
||||
<li class=""><a id="tab<?=$subModuleMainName?>" href="#tabPage<?=$subModuleMainName?>"><?=t('Subordinate Overtime Requests')?></a></li>
|
||||
<li class=""><a id="tab<?=$appModName?>" href="#tabPage<?=$appModName?>"><?=t('Overtime Request Approval')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPage<?=$moduleMainName?>">
|
||||
<div id="<?=$moduleMainName?>" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="<?=$moduleMainName?>Form" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPage<?=$subModuleMainName?>">
|
||||
<div id="<?=$subModuleMainName?>" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="<?=$subModuleMainName?>Form" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPage<?=$appModName?>">
|
||||
<div id="<?=$appModName?>" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="<?=$appModName?>Form" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tab<?=$moduleMainName?>'] = new <?=$moduleMainName?>Adapter('<?=$moduleMainName?>','<?=$moduleMainName?>');
|
||||
|
||||
|
||||
modJsList['tab<?=$appModName?>'] = new <?=$moduleMainName?>ApproverAdapter('<?=$appModName?>', '<?=$appModName?>');
|
||||
modJsList['tab<?=$appModName?>'].setShowAddNew(false);
|
||||
modJsList['tab<?=$appModName?>'].setShowDelete(false);
|
||||
modJsList['tab<?=$appModName?>'].setShowEdit(false);
|
||||
|
||||
modJsList['tab<?=$subModuleMainName?>'] = new <?=$subModuleMainName?>Adapter('<?=$moduleMainName?>','<?=$subModuleMainName?>');
|
||||
modJsList['tab<?=$subModuleMainName?>'].setRemoteTable(true);
|
||||
modJsList['tab<?=$subModuleMainName?>'].setShowAddNew(false);
|
||||
modJsList['tab<?=$subModuleMainName?>'].setShowDelete(false);
|
||||
modJsList['tab<?=$subModuleMainName?>'].setShowEdit(true);
|
||||
|
||||
var modJs = modJsList['tab<?=$moduleMainName?>'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
15
core/modules/overtime/meta.json
Normal file
15
core/modules/overtime/meta.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Overtime Requests",
|
||||
"menu": "Time Management",
|
||||
"order": "5",
|
||||
"icon": "fa-align-center",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 106,
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Overtime\\Common\\Model",
|
||||
"manager": "\\Overtime\\User\\Api\\OvertimeModulesManager"
|
||||
}
|
||||
15
core/modules/projects/dashboard.html
Normal file
15
core/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-aqua">
|
||||
<div class="inner">
|
||||
<h3><t>My Projects</t></h3>
|
||||
<p><t>Projects Assigned</t></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-pie-graph"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="projectsLink">
|
||||
<t>More info</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
64
core/modules/projects/index.php
Normal file
64
core/modules/projects/index.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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 = 'projects';
|
||||
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="tabEmployeeProject" href="#tabPageEmployeeProject"><?=t('My Projects')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageEmployeeProject">
|
||||
<div id="EmployeeProject" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeProjectForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabEmployeeProject'] = new EmployeeProjectAdapter('EmployeeProject','EmployeeProject');
|
||||
|
||||
<?php if(isset($modulePermissions['perm']['Add Projects']) && $modulePermissions['perm']['Add Projects'] == "No"){?>
|
||||
modJsList['tabEmployeeProject'].setShowAddNew(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Delete Projects']) && $modulePermissions['perm']['Delete Projects'] == "No"){?>
|
||||
modJsList['tabEmployeeProject'].setShowDelete(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Edit Projects']) && $modulePermissions['perm']['Edit Projects'] == "No"){?>
|
||||
modJsList['tabEmployeeProject'].setShowEdit(false);
|
||||
<?php }?>
|
||||
|
||||
var modJs = modJsList['tabEmployeeProject'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
26
core/modules/projects/meta.json
Normal file
26
core/modules/projects/meta.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"label": "Projects",
|
||||
"menu": "Time Management",
|
||||
"order": "1",
|
||||
"icon": "fa-pencil-square",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 105,
|
||||
"permissions": {
|
||||
"Manager": {
|
||||
"Add Projects": "Yes",
|
||||
"Edit Projects": "Yes",
|
||||
"Delete Projects": "Yes"
|
||||
},
|
||||
"Employee": {
|
||||
"Add Projects": "No",
|
||||
"Edit Projects": "No",
|
||||
"Delete Projects": "No"
|
||||
}
|
||||
},
|
||||
"model_namespace": "\\Projects\\Common\\Model",
|
||||
"manager": "\\Projects\\User\\Api\\ProjectsModulesManager"
|
||||
}
|
||||
84
core/modules/qualifications/index.php
Normal file
84
core/modules/qualifications/index.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?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 = 'qualifications';
|
||||
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="tabEmployeeSkill" href="#tabPageEmployeeSkill"><?=t('Skills')?></a></li>
|
||||
<li><a id="tabEmployeeEducation" href="#tabPageEmployeeEducation"><?=t('Education')?></a></li>
|
||||
<li><a id="tabEmployeeCertification" href="#tabPageEmployeeCertification"><?=t('Certifications')?></a></li>
|
||||
<li><a id="tabEmployeeLanguage" href="#tabPageEmployeeLanguage"><?=t('Languages')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageEmployeeSkill">
|
||||
<div id="EmployeeSkill" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeSkillForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageEmployeeEducation">
|
||||
<div id="EmployeeEducation" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeEducationForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageEmployeeCertification">
|
||||
<div id="EmployeeCertification" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeCertificationForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageEmployeeLanguage">
|
||||
<div id="EmployeeLanguage" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeLanguageForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabEmployeeSkill'] = new EmployeeSkillAdapter('EmployeeSkill');
|
||||
modJsList['tabEmployeeEducation'] = new EmployeeEducationAdapter('EmployeeEducation');
|
||||
modJsList['tabEmployeeCertification'] = new EmployeeCertificationAdapter('EmployeeCertification');
|
||||
modJsList['tabEmployeeLanguage'] = new EmployeeLanguageAdapter('EmployeeLanguage');
|
||||
|
||||
var modJs = modJsList['tabEmployeeSkill'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
14
core/modules/qualifications/meta.json
Normal file
14
core/modules/qualifications/meta.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"label": "Qualifications",
|
||||
"menu": "Personal Information",
|
||||
"order": "3",
|
||||
"icon": "fa-graduation-cap",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Qualifications\\Common\\Model",
|
||||
"manager": "\\Qualifications\\User\\Api\\QualificationsModulesManager"
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Client Project Timesheet</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link href="{{BASE_URL}}themecss/AdminLTE.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/ionicons.min.css" rel="stylesheet">
|
||||
<script src="{{BASE_URL}}themejs/bootstrap.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="margin-top:10px;">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-center">
|
||||
<i class="pull-right"><img class="logo" src="{{LOGO}}" style="max-height: 100px;"/></i>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th>Company</th>
|
||||
<th>Client</th>
|
||||
<th>Reporting Period</th>
|
||||
<th>Projects</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{company}}</td>
|
||||
<td>{{client}}</td>
|
||||
<td>{{period}}</td>
|
||||
<td>{{projects}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:30%">Employee<br/>{{employee}}</td>
|
||||
<td style="width:70%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%">Manager</td>
|
||||
<td style="width:70%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30%">Account Manager</td>
|
||||
<td style="width:70%"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<table class="table borderless">
|
||||
|
||||
<tbody>
|
||||
<tr style="font-weight: bold;">
|
||||
<td>Date</td>
|
||||
<td>Start Time</td>
|
||||
<td>End Time</td>
|
||||
<td>Details</td>
|
||||
<td>Project</td>
|
||||
<td>Duration</td>
|
||||
</tr>
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td>{{entry.date}}</td>
|
||||
<td>{{entry.startTime}}</td>
|
||||
<td>{{entry.endTime}}</td>
|
||||
<td>{{entry.details}}</td>
|
||||
<td>{{entry.project}}</td>
|
||||
<td>{{entry.duration | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td><br/><br/></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><b>Total</b></td>
|
||||
<td>{{totalHours | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Working Day</td>
|
||||
<td>{{totalHoursWorking | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Non Working Day / Holiday</td>
|
||||
<td>{{totalHoursNonWorking | number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><br/></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><b>Project Statistics</b></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% for project,time in projectTimes %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{project}}</td>
|
||||
<td>{{time|number_format(2, '.', ',')}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.borderless td {
|
||||
border: none;
|
||||
}
|
||||
* {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
43
core/modules/reports/customTemplates/payslip.html
Normal file
43
core/modules/reports/customTemplates/payslip.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Payslip {{employeeName}} {{payroll.name}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link href="{{BASE_URL}}themecss/AdminLTE.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="{{BASE_URL}}themecss/ionicons.min.css" rel="stylesheet">
|
||||
<script src="{{BASE_URL}}themejs/bootstrap.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="margin-top:10px;">
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-8">
|
||||
{% for field in fields %}
|
||||
{% if field.type == 'Company Logo' %}
|
||||
{% include 'payslip/logo.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Company Name' %}
|
||||
{% include 'payslip/companyname.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Payroll Column' %}
|
||||
{% include 'payslip/column.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Text' %}
|
||||
{% include 'payslip/text.html' with {'field': field} %}
|
||||
{% elseif field.type == 'Separators' %}
|
||||
{% include 'payslip/hr.html' with {'field': field} %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col-xs-2"></div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.borderless td {
|
||||
border: none;
|
||||
}
|
||||
* {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
8
core/modules/reports/customTemplates/payslip/column.html
Normal file
8
core/modules/reports/customTemplates/payslip/column.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<b>{{field.label}}</b>
|
||||
</div>
|
||||
<div class="col-xs-6" style="text-align: right">
|
||||
{{field.value}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="">
|
||||
<h2>{{companyName}}</h2>
|
||||
|
||||
{% if field.label != "" %}
|
||||
<h3>{{field.label}}</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if field.text != "" %}
|
||||
<p>{{field.text}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
5
core/modules/reports/customTemplates/payslip/hr.html
Normal file
5
core/modules/reports/customTemplates/payslip/hr.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
8
core/modules/reports/customTemplates/payslip/logo.html
Normal file
8
core/modules/reports/customTemplates/payslip/logo.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="">
|
||||
<img src="{{LOGO}}" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
14
core/modules/reports/customTemplates/payslip/text.html
Normal file
14
core/modules/reports/customTemplates/payslip/text.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="">
|
||||
{% if field.label != "" %}
|
||||
<h3>{{field.label}}</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if field.text != "" %}
|
||||
<p>{{field.text}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
44
core/modules/reports/index.php
Normal file
44
core/modules/reports/index.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
$moduleName = 'Reports';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
$additionalJs = array();
|
||||
$additionalJs[] = BASE_URL.'admin/reports/lib.js?v='.$jsVersion;
|
||||
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="tabUserReport" href="#tabPageUserReport"><?=t('Reports')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageUserReport">
|
||||
<div id="UserReport" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="UserReportForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabUserReport'] = new UserReportAdapter('UserReport','UserReport','','report_group');
|
||||
modJsList['tabUserReport'].setShowAddNew(false);
|
||||
modJsList['tabUserReport'].setRemoteTable(true);
|
||||
|
||||
/*
|
||||
modJsList['tabReport'] = new ReportGenAdapter('File','File','{"file_group":"Report"}','group');
|
||||
modJsList['tabReport'].setShowAddNew(false);
|
||||
*/
|
||||
|
||||
var modJs = modJsList['tabUserReport'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
15
core/modules/reports/meta.json
Normal file
15
core/modules/reports/meta.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Reports",
|
||||
"menu": "User Reports",
|
||||
"order": "1",
|
||||
"icon": "fa-file-o",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 7,
|
||||
"permissions": [],
|
||||
"model_namespace": "\\Reports\\Common\\Model",
|
||||
"manager": "\\Reports\\User\\Api\\ReportsModulesManager"
|
||||
}
|
||||
18
core/modules/reports/scripts/reports.sql
Normal file
18
core/modules/reports/scripts/reports.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||
('Active Employee Report', 'This report list employees who are currently active based on joined date and termination date ',
|
||||
'[\r\n[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}]\r\n]',
|
||||
'ActiveEmployeeReport',
|
||||
'["department"]', 'Class');
|
||||
|
||||
|
||||
INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||
('New Hires Employee Report', 'This report list employees who are joined between given two dates ',
|
||||
'[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]',
|
||||
'NewHiresEmployeeReport',
|
||||
'["department","date_start","date_end"]', 'Class');
|
||||
|
||||
INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`) VALUES
|
||||
('Terminated Employee Report', 'This report list employees who are terminated between given two dates ',
|
||||
'[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]',
|
||||
'TerminatedEmployeeReport',
|
||||
'["department","date_start","date_end"]', 'Class');
|
||||
6
core/modules/reports/templates/fields/label.html
Normal file
6
core/modules/reports/templates/fields/label.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="control-group" id="field__id_">
|
||||
<div class="controls">
|
||||
<label id="_id_" name="_id_" style="font-weight:bold"></label>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
14
core/modules/reports/templates/form_template.html
Normal file
14
core/modules/reports/templates/form_template.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<form class="form-horizontal" id="_id_">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="_id__error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
_fields_
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button onclick="try{modJs.save()}catch(e){};return false;" class="btn"><t>Download</t></button>
|
||||
<button onclick="modJs.cancel();return false;" class="btn"><t>Cancel</t></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
64
core/modules/salary/index.php
Normal file
64
core/modules/salary/index.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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 = 'salary';
|
||||
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="tabEmployeeSalary" href="#tabPageEmployeeSalary"><?=t('Salary')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPageEmployeeSalary">
|
||||
<div id="EmployeeSalary" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeSalaryForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabEmployeeSalary'] = new EmployeeSalaryAdapter('EmployeeSalary');
|
||||
|
||||
<?php if(isset($modulePermissions['perm']['Add Salary']) && $modulePermissions['perm']['Add Salary'] == "No"){?>
|
||||
modJsList['tabEmployeeSalary'].setShowAddNew(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Delete Salary']) && $modulePermissions['perm']['Delete Salary'] == "No"){?>
|
||||
modJsList['tabEmployeeSalary'].setShowDelete(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Edit Salary']) && $modulePermissions['perm']['Edit Salary'] == "No"){?>
|
||||
modJsList['tabEmployeeSalary'].setShowEdit(false);
|
||||
<?php }?>
|
||||
|
||||
var modJs = modJsList['tabEmployeeSalary'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
25
core/modules/salary/meta.json
Normal file
25
core/modules/salary/meta.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"label": "Salary",
|
||||
"menu": "Finance",
|
||||
"order": "2",
|
||||
"icon": "fa-calculator",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"permissions": {
|
||||
"Manager": {
|
||||
"Add Salary": "No",
|
||||
"Edit Salary": "No",
|
||||
"Delete Salary": "No"
|
||||
},
|
||||
"Employee": {
|
||||
"Add Salary": "No",
|
||||
"Edit Salary": "No",
|
||||
"Delete Salary": "No"
|
||||
}
|
||||
},
|
||||
"model_namespace": "\\Salary\\Common\\Model",
|
||||
"manager": "\\Salary\\User\\Api\\SalaryModulesManager"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
<form class="form-horizontal" id="_id_" role="form">
|
||||
<div class="box-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<span class="label label-warning" id="_id__error" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
_fields_
|
||||
<div class="control-group row">
|
||||
<div class="controls col-sm-9">
|
||||
<button onclick="try{modJs.save()}catch(e){};return false;" class="saveBtn btn btn-primary pull-right"><i class="fa fa-save"></i> <t>Save</t></button>
|
||||
<button onclick="modJs.cancel();return false;" class="cancelBtn btn pull-right" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> <t>Cancel</t></button>
|
||||
</div>
|
||||
<div class="controls col-sm-3">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
17
core/modules/time_sheets/dashboard.html
Normal file
17
core/modules/time_sheets/dashboard.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="col-lg-3 col-xs-12">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner">
|
||||
<h3>#_timeSheetHoursWorked_#</h3>
|
||||
<p>
|
||||
<t>Hours in Time Sheets</t>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-clock"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="timesheetLink">
|
||||
<t>Update Time Sheet</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
201
core/modules/time_sheets/index.php
Normal file
201
core/modules/time_sheets/index.php
Normal file
@@ -0,0 +1,201 @@
|
||||
<?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 = 'employee_TimeSheet';
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
$startEndTimeNeeded = \Classes\SettingsManager::getInstance()->getSetting(
|
||||
'System: Time-sheet Entry Start and End time Required'
|
||||
);
|
||||
?><script type="text/javascript" src="<?=BASE_URL?>js/mindmup-editabletable.js?v=<?=$jsVersion?>"></script>
|
||||
<div class="span9">
|
||||
|
||||
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
|
||||
<li class="modTabPage active"><a id="tabEmployeeTimeSheetAll" href="#tabPageEmployeeTimeSheetAll"><?=t('All My TimeSheets')?></a></li>
|
||||
<li class="modTabPage"><a id="tabEmployeeTimeSheetApproved" href="#tabPageEmployeeTimeSheetApproved"><?=t('Approved TimeSheets')?></a></li>
|
||||
<li class="modTabPage"><a id="tabEmployeeTimeSheetPending" href="#tabPageEmployeeTimeSheetPending"><?=t('Pending TimeSheets')?></a></li>
|
||||
<li class="modTabPage"><a id="tabSubEmployeeTimeSheetAll" href="#tabPageSubEmployeeTimeSheetAll"><?=t('Subordinate TimeSheets')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="timesheetTabs">
|
||||
<div class="tab-pane active" id="tabPageEmployeeTimeSheetAll">
|
||||
<div id="EmployeeTimeSheetAll" class="reviewBlock reviewBlockTable" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeTimeSheetAllForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageEmployeeTimeSheetApproved">
|
||||
<div id="EmployeeTimeSheetApproved" class="reviewBlock reviewBlockTable" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeTimeSheetApprovedForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageEmployeeTimeSheetPending">
|
||||
<div id="EmployeeTimeSheetPending" class="reviewBlock reviewBlockTable" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="EmployeeTimeSheetPendingForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPageSubEmployeeTimeSheetAll">
|
||||
<div id="SubEmployeeTimeSheetAll" class="reviewBlock reviewBlockTable" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="SubEmployeeTimeSheetAllForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="QtsheetHeader" class="reviewBlock" style="text-align: right;display:none;padding: 12px 19px 14px;">
|
||||
<span style="font-size:17px;font-weight:bold;color:#999;margin-left:10px;">
|
||||
Timesheet From <span class="timesheet_start"></span> to <span class="timesheet_end"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div id="Qtsheet" class="reviewBlock" data-content="List" style="padding-left:5px;display:none;overflow-x: auto;">
|
||||
|
||||
</div>
|
||||
<div id="QtsheetDataButtons" style="text-align: right;margin-top: 10px;">
|
||||
<button class="cancelBtnTable btn" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> Cancel</button>
|
||||
<button class="saveBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-save"></i> Save</button>
|
||||
<button class="downloadBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-check"></i> Download</button>
|
||||
<button class="completeBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-check-square-o"></i> Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tabEmployeeTimeSheetAll'] = new EmployeeTimeSheetAdapter('EmployeeTimeSheet','EmployeeTimeSheetAll','','date_start desc');
|
||||
modJsList['tabEmployeeTimeSheetAll'].setShowAddNew(false);
|
||||
modJsList['tabEmployeeTimeSheetAll'].setRemoteTable(true);
|
||||
modJsList['tabEmployeeTimeSheetAll'].setNeedStartEndTime(<?=$startEndTimeNeeded?>);
|
||||
|
||||
modJsList['tabEmployeeTimeSheetApproved'] = new EmployeeTimeSheetAdapter('EmployeeTimeSheet','EmployeeTimeSheetApproved',{"status":"Approved"});
|
||||
modJsList['tabEmployeeTimeSheetApproved'].setShowAddNew(false);
|
||||
modJsList['tabEmployeeTimeSheetApproved'].setRemoteTable(true);
|
||||
modJsList['tabEmployeeTimeSheetApproved'].setNeedStartEndTime(<?=$startEndTimeNeeded?>);
|
||||
|
||||
modJsList['tabEmployeeTimeSheetPending'] = new EmployeeTimeSheetAdapter('EmployeeTimeSheet','EmployeeTimeSheetPending',{"status":"Pending"});
|
||||
modJsList['tabEmployeeTimeSheetPending'].setShowAddNew(false);
|
||||
modJsList['tabEmployeeTimeSheetPending'].setRemoteTable(true);
|
||||
modJsList['tabEmployeeTimeSheetPending'].setNeedStartEndTime(<?=$startEndTimeNeeded?>);
|
||||
|
||||
modJsList['tabSubEmployeeTimeSheetAll'] = new SubEmployeeTimeSheetAdapter('EmployeeTimeSheet','SubEmployeeTimeSheetAll','','date_start desc');
|
||||
modJsList['tabSubEmployeeTimeSheetAll'].setShowAddNew(false);
|
||||
modJsList['tabSubEmployeeTimeSheetAll'].setRemoteTable(true);
|
||||
modJsList['tabSubEmployeeTimeSheetAll'].setNeedStartEndTime(<?=$startEndTimeNeeded?>);
|
||||
|
||||
modJsList['tabEmployeeTimeEntry'] = new EmployeeTimeEntryAdapter('EmployeeTimeEntry','EmployeeTimeEntry','','');
|
||||
modJsList['tabEmployeeTimeEntry'].setShowAddNew(false);
|
||||
|
||||
modJsList['tabQtsheet'] = new QtsheetAdapter('Qtsheet','Qtsheet');
|
||||
modJsList['tabQtsheet'].setRemoteTable(false);
|
||||
modJsList['tabQtsheet'].setShowAddNew(false);
|
||||
modJsList['tabQtsheet'].setModulePath('modules=time_sheets');
|
||||
modJsList['tabQtsheet'].setRowFieldName('project');
|
||||
modJsList['tabQtsheet'].setColumnFieldName('date');
|
||||
modJsList['tabQtsheet'].setTables('Project','QTDays','EmployeeTimeEntry');
|
||||
|
||||
$(".saveBtnTable").off().on('click',function(){
|
||||
modJsList['tabQtsheet'].sendCellDataUpdates();
|
||||
});
|
||||
|
||||
$(".completeBtnTable").off().on('click',function(){
|
||||
modJsList['tabQtsheet'].sendAllCellDataUpdates();
|
||||
$(".completeBtnTable").hide();
|
||||
$(".saveBtnTable").hide();
|
||||
});
|
||||
|
||||
$(".downloadBtnTable").off().on('click',function(){
|
||||
modJsList['tabQtsheet'].downloadTimesheet();
|
||||
});
|
||||
|
||||
$(".cancelBtnTable").off().on('click',function(){
|
||||
var lastTabName = $('#Qtsheet').data('lastActiveTab');
|
||||
modJs = modJsList['tab'+lastTabName];
|
||||
modJs.get([]);
|
||||
$('#QtsheetHeader').hide();
|
||||
$('#Qtsheet').hide();
|
||||
$('#QtsheetDataButtons').hide();
|
||||
});
|
||||
|
||||
$(".modTabPage").on('click',function(){
|
||||
$('#QtsheetHeader').hide();
|
||||
$('#Qtsheet').hide();
|
||||
$('#QtsheetDataButtons').hide();
|
||||
});
|
||||
|
||||
var modJs = modJsList['tabEmployeeTimeSheetAll'];
|
||||
|
||||
</script>
|
||||
<div class="modal" id="TimeSheetStatusModel" 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 Timesheet Status</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="TimeSheetStatusForm">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="timesheet_status">Timesheet Status</label>
|
||||
<div class="controls">
|
||||
<select class="" type="text" id="timesheet_status" name="timesheet_status">
|
||||
<option value="Approved">Approved</option>
|
||||
<option value="Pending">Pending</option>
|
||||
<option value="Rejected">Rejected</option>
|
||||
<option value="Submitted">Submitted</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" onclick="modJs.changeTimeSheetStatus();">Change Status</button>
|
||||
<button class="btn" onclick="modJs.closeTimeSheetStatus();">Not Now</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="TimeEntryModel" 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;">Time Entry</h3>
|
||||
</div>
|
||||
<div class="modal-body" style="max-height:530px;" id="EmployeeTimeEntryForm">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
14
core/modules/time_sheets/meta.json
Normal file
14
core/modules/time_sheets/meta.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"label":"Time Sheets",
|
||||
"menu":"Time Management",
|
||||
"order":"3",
|
||||
"icon":"fa-check-circle-o",
|
||||
"user_levels":["Admin","Manager","Employee"],
|
||||
"dashboardPosition":104,
|
||||
|
||||
"permissions":
|
||||
{
|
||||
},
|
||||
"model_namespace": "\\TimeSheets\\Common\\Model",
|
||||
"manager": "\\TimeSheets\\User\\Api\\TimeSheetsModulesManager"
|
||||
}
|
||||
29
core/modules/time_sheets/templates/form_template.html
Normal file
29
core/modules/time_sheets/templates/form_template.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<form class="form-horizontal" id="timesheet_entries_cont">
|
||||
<div id="loadingBlock" style="display:none;position: absolute;top: 10px;left: 10px;font-weight: bold">Loading...</div>
|
||||
|
||||
<div class="control-group">
|
||||
<button style="margin-left:5px;display:none;" onclick="try{modJs.openTimeEntryDialog()}catch(e){};return false;" class="add_time_sheet_entry btn btn-primary"><i class="fa fa-plus"></i> <t>Add Time Entry</t></button>
|
||||
<button onclick="modJs.changeTimeSheetStatusWithId(modJs.currentId,'Submitted');return false;" class="submit_sheet btn btn-success" style="display:none;"><i class="fa fa-check"></i> <t>Submit</t></button>
|
||||
<span style="font-size:17px;font-weight:bold;color:#999;margin-left:10px;">
|
||||
Timesheet From <span class="timesheet_start"></span> to <span class="timesheet_end"></span>
|
||||
</span>
|
||||
</div>
|
||||
<hr/>
|
||||
<div id="EmployeeTimesheetBlock" style="width:100%;margin-left:5px;"></div>
|
||||
|
||||
<table class="table table-condensed table-bordered table-striped" id="timesheet_entries" style="width:100%;font-size:12px;margin-left:5px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Start</th>
|
||||
<th>End</th>
|
||||
<th>Duration</th>
|
||||
<th>Project</th>
|
||||
<th>Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="timesheet_entries_table_body" class="timesheet_entries_table_body">
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
17
core/modules/travel/dashboard.html
Normal file
17
core/modules/travel/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><t>My Travel</t></h3>
|
||||
<p>
|
||||
<t>Management</t>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-plane"></i>
|
||||
</div>
|
||||
<a href="#_moduleLink_#" class="small-box-footer" id="mytravelLink">
|
||||
<t>Travel Management</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
103
core/modules/travel/index.php
Normal file
103
core/modules/travel/index.php
Normal file
@@ -0,0 +1,103 @@
|
||||
<?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';
|
||||
$moduleMainName = "EmployeeTravelRecord"; // for creating module js lib
|
||||
$subModuleMainName = "SubordinateEmployeeTravelRecord";
|
||||
$moduleItemName = "Travel Request"; // For permissions
|
||||
|
||||
$itemName = $moduleItemName; // for status change popup
|
||||
$itemNameLower = strtolower($moduleMainName); // for status change popup
|
||||
$appModName = $moduleMainName.'Approval';
|
||||
|
||||
define('MODULE_PATH',dirname(__FILE__));
|
||||
include APP_BASE_PATH.'header.php';
|
||||
$additionalJs = array();
|
||||
$additionalJs[] = BASE_URL.'admin/travel/lib.js?v='.$jsVersion;
|
||||
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="tab<?=$moduleMainName?>" href="#tabPage<?=$moduleMainName?>"><?=t('Travel Requests')?></a></li>
|
||||
<li class=""><a id="tab<?=$subModuleMainName?>" href="#tabPage<?=$subModuleMainName?>"><?=t('Subordinate Travel Requests')?></a></li>
|
||||
<li class=""><a id="tab<?=$appModName?>" href="#tabPage<?=$appModName?>"><?=t('Travel Request Approval')?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tabPage<?=$moduleMainName?>">
|
||||
<div id="<?=$moduleMainName?>" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="<?=$moduleMainName?>Form" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPage<?=$subModuleMainName?>">
|
||||
<div id="<?=$subModuleMainName?>" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="<?=$subModuleMainName?>Form" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tabPage<?=$appModName?>">
|
||||
<div id="<?=$appModName?>" class="reviewBlock" data-content="List" style="padding-left:5px;">
|
||||
|
||||
</div>
|
||||
<div id="<?=$appModName?>Form" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var modJsList = new Array();
|
||||
|
||||
modJsList['tab<?=$moduleMainName?>'] = new <?=$moduleMainName?>Adapter('<?=$moduleMainName?>','<?=$moduleMainName?>');
|
||||
|
||||
<?php if(isset($modulePermissions['perm']['Add '.$moduleItemName]) && $modulePermissions['perm']['Add '.$moduleItemName] == "No"){?>
|
||||
modJsList['tab<?=$moduleMainName?>'].setShowAddNew(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Delete '.$moduleItemName]) && $modulePermissions['perm']['Delete '.$moduleItemName] == "No"){?>
|
||||
modJsList['tab<?=$moduleMainName?>'].setShowDelete(false);
|
||||
<?php }?>
|
||||
<?php if(isset($modulePermissions['perm']['Edit '.$moduleItemName]) && $modulePermissions['perm']['Edit '.$moduleItemName] == "No"){?>
|
||||
modJsList['tab<?=$moduleMainName?>'].setShowEdit(false);
|
||||
<?php }?>
|
||||
|
||||
modJsList['tab<?=$appModName?>'] = new <?=$moduleMainName?>ApproverAdapter('<?=$appModName?>', '<?=$appModName?>');
|
||||
modJsList['tab<?=$appModName?>'].setShowAddNew(false);
|
||||
modJsList['tab<?=$appModName?>'].setShowDelete(false);
|
||||
modJsList['tab<?=$appModName?>'].setShowEdit(false);
|
||||
|
||||
modJsList['tab<?=$subModuleMainName?>'] = new <?=$subModuleMainName?>Adapter('<?=$moduleMainName?>','<?=$subModuleMainName?>');
|
||||
modJsList['tab<?=$subModuleMainName?>'].setRemoteTable(true);
|
||||
modJsList['tab<?=$subModuleMainName?>'].setShowAddNew(false);
|
||||
modJsList['tab<?=$subModuleMainName?>'].setShowDelete(false);
|
||||
modJsList['tab<?=$subModuleMainName?>'].setShowEdit(true);
|
||||
|
||||
var modJs = modJsList['tab<?=$moduleMainName?>'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
26
core/modules/travel/meta.json
Normal file
26
core/modules/travel/meta.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"label": "Travel",
|
||||
"menu": "Travel Management",
|
||||
"order": "1",
|
||||
"icon": "fa-plane",
|
||||
"user_levels": [
|
||||
"Admin",
|
||||
"Manager",
|
||||
"Employee"
|
||||
],
|
||||
"dashboardPosition": 107,
|
||||
"permissions": {
|
||||
"Manager": {
|
||||
"Add Travel Request": "Yes",
|
||||
"Edit Travel Request": "Yes",
|
||||
"Delete Travel Request": "Yes"
|
||||
},
|
||||
"Employee": {
|
||||
"Add Travel Request": "Yes",
|
||||
"Edit Travel Request": "Yes",
|
||||
"Delete Travel Request": "Yes"
|
||||
}
|
||||
},
|
||||
"model_namespace": "\\Travel\\Common\\Model",
|
||||
"manager": "\\Travel\\User\\Api\\TravelModulesManager"
|
||||
}
|
||||
Reference in New Issue
Block a user