v19.0.OS (#35)
* Updates from pro v19 * Update travis * Update db script * Update docs * change build script
This commit is contained in:
@@ -21,4 +21,4 @@ if (!class_exists('AttendanceModulesManager')) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
<t>Record Attendance</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,4 +74,4 @@ var modJs = modJsList['tabAttendance'];
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -95,4 +95,4 @@ modJs.getInitData();
|
||||
*/
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -60,4 +60,4 @@ modJsList['tabEmployeeDependent'].setShowEdit(false);
|
||||
var modJs = modJsList['tabEmployeeDependent'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -61,4 +61,4 @@ modJsList['tabEmergencyContact'].setShowEdit(false);
|
||||
var modJs = modJsList['tabEmergencyContact'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -167,7 +167,14 @@
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -207,4 +214,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -14,4 +14,4 @@
|
||||
<t>View/Edit Profile</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,4 +83,4 @@ modJsList['tabCompanyGraph'] = new CompanyGraphAdapter('CompanyStructure');
|
||||
var modJs = modJsList['tabEmployee'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -263,7 +263,7 @@ EmployeeAdapter.method('modEmployeeGetSuccessCallBack' , function(data) {
|
||||
}
|
||||
}
|
||||
|
||||
html = html.replace(/#_.+_#/i,"");
|
||||
html = html.replace(/#_.+_#/gi,"");
|
||||
|
||||
html = html.replace(/_id_/g,data.id);
|
||||
|
||||
|
||||
@@ -55,4 +55,4 @@ modJsList['tabEmployeeCompanyLoan'].setShowEdit(true);
|
||||
var modJs = modJsList['tabEmployeeCompanyLoan'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
19
ext/modules/overtime/api/OvertimeActionManager.php
Normal file
19
ext/modules/overtime/api/OvertimeActionManager.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
class OvertimeActionManager extends ApproveModuleActionManager{
|
||||
|
||||
public function getModelClass(){
|
||||
return "EmployeeOvertime";
|
||||
}
|
||||
|
||||
public function getItemName(){
|
||||
return "Overtime Request";
|
||||
}
|
||||
|
||||
public function getModuleName(){
|
||||
return "Overtime Management";
|
||||
}
|
||||
|
||||
public function getModuleTabUrl(){
|
||||
return "g=modules&n=overtime&m=module_Time_Management#SubordinateEmployeeOvertime";
|
||||
}
|
||||
}
|
||||
24
ext/modules/overtime/api/OvertimeModulesManager.php
Normal file
24
ext/modules/overtime/api/OvertimeModulesManager.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if (!class_exists('OvertimeModulesManager')) {
|
||||
|
||||
class OvertimeModulesManager extends AbstractModuleManager{
|
||||
|
||||
public function initializeUserClasses(){
|
||||
|
||||
}
|
||||
|
||||
public function initializeFieldMappings(){
|
||||
|
||||
}
|
||||
|
||||
public function initializeDatabaseErrorMappings(){
|
||||
|
||||
}
|
||||
|
||||
public function setupModuleClassDefinitions(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
94
ext/modules/overtime/index.php
Normal file
94
ext/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?>"><?=LanguageManager::tran('Overtime Requests')?></a></li>
|
||||
<li class=""><a id="tab<?=$subModuleMainName?>" href="#tabPage<?=$subModuleMainName?>"><?=LanguageManager::tran('Subordinate Overtime Requests')?></a></li>
|
||||
<li class=""><a id="tab<?=$appModName?>" href="#tabPage<?=$appModName?>"><?=LanguageManager::tran('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';?>
|
||||
120
ext/modules/overtime/lib.js
Normal file
120
ext/modules/overtime/lib.js
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
This file is part of iCE Hrm.
|
||||
|
||||
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
|
||||
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
|
||||
*/
|
||||
|
||||
|
||||
function EmployeeOvertimeAdapter(endPoint) {
|
||||
this.initAdapter(endPoint);
|
||||
this.itemName = 'Overtime';
|
||||
this.itemNameLower = 'employeeovertime';
|
||||
this.modulePathName = 'overtime';
|
||||
}
|
||||
|
||||
EmployeeOvertimeAdapter.inherits(ApproveModuleAdapter);
|
||||
|
||||
|
||||
|
||||
EmployeeOvertimeAdapter.method('getDataMapping', function() {
|
||||
return [
|
||||
"id",
|
||||
"category",
|
||||
"start_time",
|
||||
"end_time",
|
||||
"project",
|
||||
"status"
|
||||
];
|
||||
});
|
||||
|
||||
EmployeeOvertimeAdapter.method('getHeaders', function() {
|
||||
return [
|
||||
{ "sTitle": "ID" ,"bVisible":false},
|
||||
{ "sTitle": "Category" },
|
||||
{ "sTitle": "Start Time" },
|
||||
{ "sTitle": "End Time"},
|
||||
{ "sTitle": "Project"},
|
||||
{ "sTitle": "Status"}
|
||||
];
|
||||
});
|
||||
|
||||
EmployeeOvertimeAdapter.method('getFormFields', function() {
|
||||
return [
|
||||
["id", {"label": "ID", "type": "hidden"}],
|
||||
["category", {"label": "Category", "type": "select2", "allow-null":false, "remote-source": ["OvertimeCategory", "id", "name"]}],
|
||||
["start_time", {"label": "Start Time", "type": "datetime", "validation": ""}],
|
||||
["end_time", {"label": "End Time", "type": "datetime", "validation": ""}],
|
||||
["project", {"label": "Project", "type": "select2", "allow-null":true,"null=label":"none","remote-source": ["Project", "id", "name"]}],
|
||||
["notes", {"label": "Notes", "type": "textarea", "validation": "none"}]
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
EmployeeOvertimeApproverAdapter
|
||||
*/
|
||||
|
||||
function EmployeeOvertimeApproverAdapter(endPoint) {
|
||||
this.initAdapter(endPoint);
|
||||
this.itemName = 'Overtime';
|
||||
this.itemNameLower = 'employeeovertime';
|
||||
this.modulePathName = 'overtime';
|
||||
}
|
||||
|
||||
EmployeeOvertimeApproverAdapter.inherits(EmployeeOvertimeAdminAdapter);
|
||||
|
||||
EmployeeOvertimeApproverAdapter.method('getActionButtonsHtml', function(id,data) {
|
||||
var statusChangeButton = '<img class="tableActionButton" src="_BASE_images/run.png" style="cursor:pointer;" rel="tooltip" title="Change Status" onclick="modJs.openStatus(_id_, \'_cstatus_\');return false;"></img>';
|
||||
var viewLogsButton = '<img class="tableActionButton" src="_BASE_images/log.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="View Logs" onclick="modJs.getLogs(_id_);return false;"></img>';
|
||||
|
||||
var html = '<div style="width:80px;">_status__logs_</div>';
|
||||
|
||||
|
||||
html = html.replace('_logs_',viewLogsButton);
|
||||
|
||||
|
||||
if(data[this.getStatusFieldPosition()] == 'Processing'){
|
||||
html = html.replace('_status_',statusChangeButton);
|
||||
|
||||
}else{
|
||||
html = html.replace('_status_','');
|
||||
}
|
||||
|
||||
html = html.replace(/_id_/g,id);
|
||||
html = html.replace(/_BASE_/g,this.baseUrl);
|
||||
html = html.replace(/_cstatus_/g,data[this.getStatusFieldPosition()]);
|
||||
return html;
|
||||
});
|
||||
|
||||
EmployeeOvertimeApproverAdapter.method('getStatusOptionsData', function(currentStatus) {
|
||||
var data = {};
|
||||
if(currentStatus != 'Processing'){
|
||||
|
||||
}else{
|
||||
data["Approved"] = "Approved";
|
||||
data["Rejected"] = "Rejected";
|
||||
|
||||
}
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
EmployeeOvertimeApproverAdapter.method('getStatusOptions', function(currentStatus) {
|
||||
return this.generateOptions(this.getStatusOptionsData(currentStatus));
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
EmployeeOvertimeAdapter
|
||||
*/
|
||||
|
||||
function SubordinateEmployeeOvertimeAdapter(endPoint,tab,filter,orderBy) {
|
||||
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||
this.itemName = 'Overtime';
|
||||
this.itemNameLower = 'employeeovertime';
|
||||
this.modulePathName = 'overtime';
|
||||
}
|
||||
|
||||
SubordinateEmployeeOvertimeAdapter.inherits(EmployeeOvertimeAdminAdapter);
|
||||
|
||||
12
ext/modules/overtime/meta.json
Normal file
12
ext/modules/overtime/meta.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"label":"Overtime Requests",
|
||||
"menu":"Time Management",
|
||||
"order":"5",
|
||||
"icon":"fa-align-center",
|
||||
"user_levels":["Admin","Manager","Employee"],
|
||||
"dashboardPosition":106,
|
||||
|
||||
"permissions":
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -62,4 +62,4 @@ if (!class_exists('EmployeeProject')) {
|
||||
return new IceResponse(IceResponse::SUCCESS,$obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,4 +61,4 @@ modJsList['tabEmployeeProject'].setShowEdit(false);
|
||||
var modJs = modJsList['tabEmployeeProject'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -81,4 +81,4 @@ modJsList['tabEmployeeLanguage'] = new EmployeeLanguageAdapter('EmployeeLanguage
|
||||
var modJs = modJsList['tabEmployeeSkill'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -61,4 +61,4 @@ modJsList['tabEmployeeSalary'].setShowEdit(false);
|
||||
var modJs = modJsList['tabEmployeeSalary'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
@@ -149,4 +149,4 @@ if (!class_exists('EmployeeTimeSheet')) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
<t>Update Time Sheet</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -696,4 +696,4 @@ EmployeeTimeEntryAdapter.method('deleteRow', function(id) {
|
||||
|
||||
EmployeeTimeEntryAdapter.method('deleteSuccessCallBack', function(callBackData,serverData) {
|
||||
modJs.getTimeEntries();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
<button id="add_time_sheet_entry" style="margin-left:5px;display:none;" onclick="try{modJs.openTimeEntryDialog()}catch(e){};return false;" class="btn"><span class="icon-plus-sign"></span> <t>Add Time Entry</t></button>
|
||||
<button id="submit_sheet" onclick="modJs.changeTimeSheetStatusWithId(modJs.currentId,'Submitted');return false;" class="btn" style="display:none;"><span class="icon-ok"></span> <t>Submit</t></button>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
@@ -16,4 +16,4 @@ class TravelActionManager extends ApproveModuleActionManager{
|
||||
public function getModuleTabUrl(){
|
||||
return "g=modules&n=travel&m=module_Travel_Management#tabSubordinateEmployeeTravelRecord";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,4 +14,4 @@
|
||||
<t>Travel Management</t> <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,4 +100,4 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
|
||||
var modJs = modJsList['tab<?=$moduleMainName?>'];
|
||||
|
||||
</script>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
<?php include APP_BASE_PATH.'footer.php';?>
|
||||
Reference in New Issue
Block a user