Compare commits

...

21 Commits

Author SHA1 Message Date
gamonoid
9cee4e91df Upgrades from IceHrm Pro v24 2018-07-03 03:10:32 +02:00
gamonoid
8b276d54e6 Release notes v23.0.1.OS 2018-06-14 04:39:45 +02:00
gamonoid
f23856d70a Update patch version 2018-06-14 04:25:28 +02:00
gamonoid
fde94aa7fa Add csrf token 2018-06-14 04:05:22 +02:00
gamonoid
025a8283ab Critical security issue - fix password hash 2018-06-14 03:40:21 +02:00
gamonoid
51e3569501 Fix conversation table creation 2018-05-21 10:36:35 +02:00
gamonoid
861e94cf9d Add latest changes from icehrm pro 2018-05-21 00:23:56 +02:00
gamonoid
9c56b8acd1 Update git ignore 2018-05-20 23:00:38 +02:00
Thilina Hasantha
3edb9aaa6c Update configurations 2018-05-02 03:47:58 +02:00
Thilina Hasantha
72d0820dee Update test db script paths 2018-05-01 17:09:49 +02:00
Thilina Hasantha
257071da2d Fix unit test paths 2018-05-01 17:05:21 +02:00
Thilina Hasantha
f803f4265d Fix db name issue 2018-05-01 15:30:54 +02:00
Thilina Hasantha
dda445659c Fix unit tests 2018-05-01 15:21:43 +02:00
Thilina Hasantha
e3a7e18d9c Refactor project structure 2018-04-29 17:46:42 +02:00
Thilina Hasantha
889baf124c Adding local config 2018-04-29 08:59:49 +02:00
Thilina Hasantha
8ebf28fbcb Changes for v22.0.0.OS 2018-04-28 03:04:36 +02:00
Thilina Hasantha
d105ee3512 Update vagrant url 2018-04-22 10:59:24 +02:00
gamonoid
86c572bdd1 Fix code style issues 2018-03-18 06:46:00 +01:00
gamonoid
a0db9da5f4 Fix unit tests 2018-03-18 06:46:00 +01:00
gamonoid
afc069afaa Translation updates and UI improvements 2018-03-18 06:46:00 +01:00
Patrick Geselbracht
a0d77cb944 Updates German translations (#97)
* Update of German translations up until line 1210

* Translates the rest of the German po file

* Changes last translator line at beginning of file

* Fixes two strings that sounded weird in context
2018-03-18 06:46:00 +01:00
14638 changed files with 978650 additions and 37272 deletions

2
.gitignore vendored
View File

@@ -5,6 +5,8 @@
/build
/deployment/clients/dev/data/
/deployment/clients/test/data/
/deployment/clients/local/data/
/.vagrant
/app/config.php
/app/data/*
.gitkeep

View File

@@ -1,310 +0,0 @@
/**
* Author: Thilina Hasantha
*/
function CompanyStructureAdapter(endPoint) {
this.initAdapter(endPoint);
}
CompanyStructureAdapter.inherits(AdapterBase);
CompanyStructureAdapter.method('getDataMapping', function() {
return [
"id",
"title",
"address",
"type",
"country",
"timezone",
"parent"
];
});
CompanyStructureAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID","bVisible":false },
{ "sTitle": "Name" },
{ "sTitle": "Address","bSortable":false},
{ "sTitle": "Type"},
{ "sTitle": "Country", "sClass": "center" },
{ "sTitle": "Time Zone"},
{ "sTitle": "Parent Structure"}
];
});
CompanyStructureAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden","validation":""}],
[ "title", {"label":"Name","type":"text","validation":""}],
[ "description", {"label":"Details","type":"textarea","validation":""}],
[ "address", {"label":"Address","type":"textarea","validation":"none"}],
[ "type", {"label":"Type","type":"select","source":[["Company","Company"],["Head Office","Head Office"],["Regional Office","Regional Office"],["Department","Department"],["Unit","Unit"],["Sub Unit","Sub Unit"],["Other","Other"]]}],
[ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}],
[ "timezone", {"label":"Time Zone","type":"select2","allow-null":false,"remote-source":["Timezone","name","details"]}],
[ "parent", {"label":"Parent Structure","type":"select","allow-null":true,"remote-source":["CompanyStructure","id","title"]}],
[ "heads", {"label":"Heads","type":"select2multi","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}]
];
});
/*
* Company Graph
*/
function CompanyGraphAdapter(endPoint) {
this.initAdapter(endPoint);
this.nodeIdCounter = 0;
}
CompanyGraphAdapter.inherits(CompanyStructureAdapter);
CompanyGraphAdapter.method('convertToTree', function(data) {
var ice = {};
ice['id'] = -1;
ice['title'] = '';
ice['name'] = '';
ice['children'] = [];
var parent = null;
var added = {};
for(var i=0;i<data.length;i++){
data[i].name = data[i].title;
if(data[i].parent != null && data[i].parent != undefined){
parent = this.findParent(data,data[i].parent);
if(parent != null){
if(parent.children == undefined || parent.children == null){
parent.children = [];
}
parent.children.push(data[i]);
}
}
}
for(var i=0;i<data.length;i++){
if(data[i].parent == null || data[i].parent == undefined){
ice['children'].push(data[i]);
}
}
return ice;
});
CompanyGraphAdapter.method('findParent', function(data, parent) {
for(var i=0;i<data.length;i++){
if(data[i].title == parent || data[i].title == parent){
return data[i];
}
}
return null;
});
CompanyGraphAdapter.method('createTable', function(elementId) {
$("#tabPageCompanyGraph").html("");
var that = this;
var sourceData = this.sourceData;
//this.fixCyclicParent(sourceData);
var treeData = this.convertToTree(sourceData);
var m = [20, 120, 20, 120],
w = 5000 - m[1] - m[3],
h = 1000 - m[0] - m[2],
root;
var tree = d3.layout.tree()
.size([h, w]);
this.diagonal = d3.svg.diagonal()
.projection(function(d) { return [d.y, d.x]; });
this.vis = d3.select("#tabPageCompanyGraph").append("svg:svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
.append("svg:g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
root = treeData;
root.x0 = h / 2;
root.y0 = 0;
function toggleAll(d) {
if (d.children) {
console.log(d.name);
d.children.forEach(toggleAll);
that.toggle(d);
}
}
this.update(root, tree, root);
});
CompanyGraphAdapter.method('update', function(source, tree, root) {
var that = this;
var duration = d3.event && d3.event.altKey ? 5000 : 500;
// Compute the new tree layout.
var nodes = tree.nodes(root).reverse();
// Normalize for fixed-depth.
nodes.forEach(function(d) { d.y = d.depth * 180; });
// Update the nodes<65>
var node = that.vis.selectAll("g.node")
.data(nodes, function(d) { return d.id || (d.id = ++that.nodeIdCounter); });
// Enter any new nodes at the parent's previous position.
var nodeEnter = node.enter().append("svg:g")
.attr("class", "node")
.attr("transform", function(d) { return "translate(" + source.y0 + "," + source.x0 + ")"; })
.on("click", function(d) { that.toggle(d); that.update(d, tree, root); });
nodeEnter.append("svg:circle")
.attr("r", 1e-6)
.style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; });
nodeEnter.append("svg:text")
.attr("x", function(d) { return d.children || d._children ? -10 : 10; })
.attr("dy", ".35em")
.attr("text-anchor", function(d) { return d.children || d._children ? "end" : "start"; })
.text(function(d) { return d.name; })
.style("fill-opacity", 1e-6);
// Transition nodes to their new position.
var nodeUpdate = node.transition()
.duration(duration)
.attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; });
nodeUpdate.select("circle")
.attr("r", 4.5)
.style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; });
nodeUpdate.select("text")
.style("fill-opacity", 1);
// Transition exiting nodes to the parent's new position.
var nodeExit = node.exit().transition()
.duration(duration)
.attr("transform", function(d) { return "translate(" + source.y + "," + source.x + ")"; })
.remove();
nodeExit.select("circle")
.attr("r", 1e-6);
nodeExit.select("text")
.style("fill-opacity", 1e-6);
// Update the links<6B>
var link = that.vis.selectAll("path.link")
.data(tree.links(nodes), function(d) { return d.target.id; });
// Enter any new links at the parent's previous position.
link.enter().insert("svg:path", "g")
.attr("class", "link")
.attr("d", function(d) {
var o = {x: source.x0, y: source.y0};
return that.diagonal({source: o, target: o});
})
.transition()
.duration(duration)
.attr("d", that.diagonal);
// Transition links to their new position.
link.transition()
.duration(duration)
.attr("d", that.diagonal);
// Transition exiting nodes to the parent's new position.
link.exit().transition()
.duration(duration)
.attr("d", function(d) {
var o = {x: source.x, y: source.y};
return that.diagonal({source: o, target: o});
})
.remove();
// Stash the old positions for transition.
nodes.forEach(function(d) {
d.x0 = d.x;
d.y0 = d.y;
});
});
// Toggle children.
CompanyGraphAdapter.method('toggle', function(d) {
if (d.children) {
d._children = d.children;
d.children = null;
} else {
d.children = d._children;
d._children = null;
}
});
CompanyGraphAdapter.method('getSourceDataById', function(id) {
for(var i=0; i< this.sourceData.length; i++){
if(this.sourceData[i].id == id){
return this.sourceData[i];
}
}
return null;
});
CompanyGraphAdapter.method('fixCyclicParent', function(sourceData) {
var errorMsg = "";
for(var i=0; i< sourceData.length; i++){
var obj = sourceData[i];
var curObj = obj;
var parentIdArr = {};
parentIdArr[curObj.id] = 1;
while(curObj.parent != null && curObj.parent != undefined){
var parent = this.getSourceDataById(curObj.parent);
if(parent == null){
break;
}else if(parentIdArr[parent.id] == 1){
errorMsg = obj.title +"'s parent structure set to "+parent.title+"<br/>";
obj.parent = null;
break;
}
parentIdArr[parent.id] = 1;
curObj = parent;
}
}
if(errorMsg != ""){
this.showMessage("Company Structure is having a cyclic dependency","We found a cyclic dependency due to following reasons:<br/>"+errorMsg);
return false;
}
return true;
});
CompanyGraphAdapter.method('getHelpLink', function () {
return 'http://blog.icehrm.com/docs/companystructure/';
});

View File

@@ -1,125 +0,0 @@
<?php
/*
This file is part of iCE Hrm.
iCE Hrm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
iCE Hrm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'dashboard';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$invoices = [];
$numOfUnpaidInvoices = 0;
if (class_exists('\\Billing\\Admin\\Api\\BillingActionManager')) {
$billingActionManager = new \Billing\Admin\Api\BillingActionManager();
$invoices = $billingActionManager->getInvoices(null)->getData();
if(!empty($invoices)){
$invoices = json_decode(json_encode($invoices));
}
foreach($invoices as $inv){
if($inv->status == "Sent"){
$numOfUnpaidInvoices++;
}
}
}
?><div class="span9">
<div class="row">
<?php if($numOfUnpaidInvoices == 1){?>
<div class="callout callout-warning lead" style="font-size: 14px;">
<h4>You have a pending invoice</h4>
<p style="font-weight: bold;">
You have a pending invoice. Please make you complete the payment so we can provide a better service.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System#tabInvoice" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Make a Payment</a>
</p>
</div>
<?php }else if($numOfUnpaidInvoices > 1){?>
<div class="callout callout-danger lead" style="font-size: 14px;">
<h4>You have <?=$numOfUnpaidInvoices?> pending invoices</h4>
<p style="font-weight: bold;">
You have <?=$numOfUnpaidInvoices?> pending invoice. None of your employees are currently allowed to login. Please make sure you complete payments to all the invoices to restore your service.
Please logout and login after completing the payment to get your service restored.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System#tabInvoice" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Make a Payment</a>
</p>
</div>
<?php }?>
<?php if(\Utils\SessionUtils::getSessionObject('account_locked') == "1"){?>
<div class="callout callout-danger lead" style="font-size: 14px;">
<h4>Your Trial Has Expired</h4>
<p style="font-weight: bold;">
Your Icehrm Trial has expired. Please upgrade subscription to continue. If not upgraded your account will be deleted with in few days.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Upgrade Subscription</a>
</p>
</div>
<?php }?>
<?php
$moduleManagers = \Classes\BaseService::getInstance()->getModuleManagers();
$dashBoardList = array();
foreach($moduleManagers as $moduleManagerObj){
//Check if this is not an admin module
if($moduleManagerObj->getModuleType() != 'admin'){
continue;
}
$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'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -1,253 +0,0 @@
<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>&nbsp;&nbsp;
<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.edit(_id_);" 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>
</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>
<ul class="nav nav-tabs" id="subModTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabBasic" href="#tabPageBasic">Basic Information</a></li>
<li class=""><a id="tabQualifications" href="#tabPageQualifications">Qualifications</a></li>
<li class=""><a id="tabFamily" href="#tabPageFamily">Family</a></li>
<li class=""><a id="tabDocuments" href="#tabPageDocuments">Documents</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane sub-tab active" id="tabPageBasic">
<div class="row" style="margin-left:10px;margin-top:20px;">
<div class="panel panel-default" style="width:97.5%;">
<div class="panel-heading"><h4>Personal Information</h4></div>
<div class="panel-body" id="cont_personal_information">
<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 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 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" id="cont_contact_information">
<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 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 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" id="cont_job_details">
<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;">#_label_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 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 id="customFieldsCont">
</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>
</div><!-- End tabPageBasic -->
<div class="tab-pane sub-tab" id="tabPageQualifications">
<div class="row" style="margin-top:20px;">
<div class="col-md-3 sub-column">
<div id="EmployeeSkillSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3 sub-column">
<div id="EmployeeEducationSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3 sub-column">
<div id="EmployeeCertificationSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3 sub-column">
<div id="EmployeeLanguageSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div><!-- End tabPageQualifications -->
</div>
<div class="tab-pane sub-tab" id="tabPageFamily">
<div class="row" style="margin-top:20px;">
<div class="col-md-6 sub-column">
<div id="EmployeeEmergencyContactSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-6 sub-column">
<div id="EmployeeDependentSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div>
</div>
<div class="tab-pane sub-tab" id="tabPageDocuments">
<div class="row" style="margin-top:20px;">
<div class="col-md-12">
<div id="EmployeeDocumentSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div><!-- End tabPageQualifications -->
</div>
</div><!-- End tab-content -->

View File

@@ -1,210 +0,0 @@
<?php
$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");
?><div class="span9">
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<?php if($user->user_level != "Admin"){
?>
<li class="active"><a id="tabEmployee" href="#tabPageEmployee"><?=t('Employees (Direct Reports)')?></a></li>
<?php }else{ ?>
<li class="active"><a id="tabEmployee" href="#tabPageEmployee"><?=t('Employees')?></a></li>
<?php }?>
<?php if($user->user_level == "Admin"){
?>
<li><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>
<li><a id="tabEmployeeDependent" href="#tabPageEmployeeDependent"><?=t('Dependents')?></a></li>
<li><a id="tabEmergencyContact" href="#tabPageEmergencyContact"><?=t('Emergency Contacts')?></a></li>
<?php if (class_exists('\\Documents\\Admin\\Api\\DocumentsAdminManager')) {?>
<li><a id="tabEmployeeDocument" href="#tabPageEmployeeDocument"><?=t('Documents')?></a></li>
<?php } ?>
<?php }?>
<?php if($user->user_level == "Admin"){
?>
<li class="dropdown">
<a href="#" id="terminatedEmployeeMenu" class="dropdown-toggle" data-toggle="dropdown" aria-controls="terminatedEmployeeMenu-contents"><?=t('Deactivated Employees')?> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="terminatedEmployeeMenu" id="terminatedEmployeeMenu-contents">
<li><a id="tabTerminatedEmployee" href="#tabPageTerminatedEmployee"><?=t('Temporarily Deactivated Employees')?></a></li>
<li><a id="tabArchivedEmployee" href="#tabPageArchivedEmployee"><?=t('Terminated Employee Data')?></a></li>
</ul>
</li>
<?php }?>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageEmployee">
<div id="Employee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" 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 class="tab-pane" 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 class="tab-pane" 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 class="tab-pane" id="tabPageArchivedEmployee">
<div id="ArchivedEmployee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="ArchivedEmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageTerminatedEmployee">
<div id="TerminatedEmployee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="TerminatedEmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<?php if (class_exists('\\Documents\\Admin\\Api\\DocumentsAdminManager')) {?>
<div class="tab-pane" id="tabPageEmployeeDocument">
<div id="EmployeeDocument" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeDocumentForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<?php } ?>
</div>
</div>
<script>
var modJsList = new Array();
<?php if($user->user_level != "Admin"){
?>
modJsList['tabEmployee'] = new EmployeeAdapter('Employee','Employee',{"status":"Active"});
modJsList['tabEmployee'].setShowAddNew(false);
<?php
}else{
?>
modJsList['tabEmployee'] = new EmployeeAdapter('Employee','Employee',{"status":"Active"});
<?php
}
?>
modJsList['tabEmployee'].setRemoteTable(true);
modJsList['tabEmployee'].setFieldNameMap(<?=json_encode($fieldNameMap)?>);
modJsList['tabEmployee'].setCustomFields(<?=json_encode($customFields)?>);
modJsList['tabEmployeeSkill'] = new EmployeeSkillAdapter('EmployeeSkill');
modJsList['tabEmployeeSkill'].setRemoteTable(true);
modJsList['tabEmployeeEducation'] = new EmployeeEducationAdapter('EmployeeEducation');
modJsList['tabEmployeeEducation'].setRemoteTable(true);
modJsList['tabEmployeeCertification'] = new EmployeeCertificationAdapter('EmployeeCertification');
modJsList['tabEmployeeCertification'].setRemoteTable(true);
modJsList['tabEmployeeLanguage'] = new EmployeeLanguageAdapter('EmployeeLanguage');
modJsList['tabEmployeeLanguage'].setRemoteTable(true);
modJsList['tabEmployeeDependent'] = new EmployeeDependentAdapter('EmployeeDependent');
modJsList['tabEmployeeDependent'].setRemoteTable(true);
modJsList['tabEmergencyContact'] = new EmergencyContactAdapter('EmergencyContact');
modJsList['tabEmergencyContact'].setRemoteTable(true);
modJsList['tabEmployeeImmigration'] = new EmployeeImmigrationAdapter('EmployeeImmigration');
modJsList['tabEmployeeImmigration'].setRemoteTable(true);
modJsList['tabArchivedEmployee'] = new ArchivedEmployeeAdapter('ArchivedEmployee');
modJsList['tabArchivedEmployee'].setRemoteTable(true);
modJsList['tabArchivedEmployee'].setShowAddNew(false);
modJsList['tabTerminatedEmployee'] = new TerminatedEmployeeAdapter('Employee','TerminatedEmployee',{"status":"Terminated"});
modJsList['tabTerminatedEmployee'].setRemoteTable(true);
modJsList['tabTerminatedEmployee'].setShowAddNew(false);
<?php if (class_exists('\\Documents\\Admin\\Api\\DocumentsAdminManager')) {?>
modJsList['tabEmployeeDocument'] = new EmployeeDocumentAdapter('EmployeeDocument','EmployeeDocument');
modJsList['tabTerminatedEmployee'].setRemoteTable(true);
<?php } ?>
var modJs = modJsList['tabEmployee'];
</script>
<div class="modal" id="createUserModel" 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;"><?=t('Employee Saved Successfully')?></h3>
</div>
<div class="modal-body">
<?=t('Employee needs a User to login to IceHrm. Do you want to create a user for this employee now?')?> <br/><br/><?=t('You can do this later through Users module if required.')?>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="modJs.createUser();">Yes</button>
<button class="btn" onclick="modJs.closeCreateUser();">No</button>
</div>
</div>
</div>
</div>
<?php include APP_BASE_PATH.'footer.php';?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,145 +0,0 @@
/**
* Author: Thilina Hasantha
*/
/**
* FieldNameAdapter
*/
function FieldNameAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
FieldNameAdapter.inherits(AdapterBase);
FieldNameAdapter.method('getDataMapping', function() {
return [
"id",
"name",
"textOrig",
"textMapped",
"display"
];
});
FieldNameAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name" },
{ "sTitle": "Original Text"},
{ "sTitle": "Mapped Text"},
{ "sTitle": "Display Status"}
];
});
FieldNameAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "type", {"label":"Type","type":"placeholder","validation":""}],
[ "name", {"label":"Name","type":"placeholder","validation":""}],
[ "textOrig", {"label":"Original Text","type":"placeholder","validation":""}],
[ "textMapped", {"label":"Mapped Text","type":"text","validation":""}],
[ "display", {"label":"Display Status","type":"select","source":[["Form","Show"],["Hidden","Hidden"]]}]
];
});
/*
*
*/
function CustomFieldAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
this.tableType = "";
}
CustomFieldAdapter.inherits(AdapterBase);
CustomFieldAdapter.method('getDataMapping', function() {
return [
"id",
"name",
"display",
"display_order"
];
});
CustomFieldAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name" },
{ "sTitle": "Display Status"},
{ "sTitle": "Priority"}
];
});
CustomFieldAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
//[ "type", {"label":"Type","type":"placeholder","validation":""}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "display", {"label":"Display Status","type":"select","source":[["Form","Show"],["Hidden","Hidden"]]}],
[ "field_type", {"label":"Field Type","type":"select","source":[["text","Text Field"],["textarea","Text Area"],["select","Select"],["select2","Select2"],["select2multi","Multi Select"],["fileupload","File Upload"],["date","Date"],["datetime","Date Time"],["time","Time"]]}],
[ "field_label", {"label":"Field Label","type":"text","validation":""}],
[ "field_validation", {"label":"Validation","type":"select","validation":"none","sort":"none","source":[["","Required"],["none","None"],["number","Number"],["numberOrEmpty","Number or Empty"],["float","Decimal"],["email","Email"],["emailOrEmpty","Email or Empty"]]}],
[ "field_options", {"label":"Field Options","type":"datagroup",
"form":[
[ "label", {"label":"Label","type":"text","validation":""}],
[ "value", {"label":"Value","type":"text","validation":"none"}]
],
"html":'<div id="#_id_#" class="panel panel-default"><div class="panel-body">#_delete_##_edit_#<span style="color:#999;font-size:13px;font-weight:bold">#_label_#</span>:#_value_#</div></div>',
"validation":"none"
}],
[ "display_order", {"label":"Priority","type":"text","validation":"number"}],
[ "display_section", {"label":"Display Section","type":"text","validation":""}]
];
});
CustomFieldAdapter.method('setTableType', function(type) {
this.tableType = type;
});
CustomFieldAdapter.method('doCustomValidation', function(params) {
var validateName= function (str) {
var name = /^[a-z][a-z0-9\._]+$/;
return str != null && name.test(str);
};
if(!validateName(params.name)){
return "Invalid name for custom field";
}
return null;
});
CustomFieldAdapter.method('forceInjectValuesBeforeSave', function(params) {
//Build data field
var data = [params.name], options = [], optionsData;
data.push({});
data[1]['label'] = params.field_label;
data[1]['type'] = params.field_type;
data[1]['validation'] = params.field_validation;
if(["select","select2","select2multi"].indexOf(params.field_type) >= 0){
optionsData = JSON.parse(params.field_options);
for(index in optionsData){
options.push([optionsData[index].value, optionsData[index].label]);
}
data[1]['source'] = options;
}
if(params.field_validation == null || params.field_validation == undefined){
params.field_validation = "";
}
params.data = JSON.stringify(data);
params.type = this.tableType;
return params;
});

View File

@@ -1,12 +0,0 @@
{
"label": "Field Names Setup",
"menu": "System",
"order": "7",
"icon": "fa-sort-alpha-asc",
"user_levels": [
"Admin"
],
"permissions": [],
"model_namespace": "\\FieldNames\\Common\\Model",
"manager": "\\FieldNames\\Admin\\Api\\FieldNamesAdminManager"
}

View File

@@ -1,12 +0,0 @@
{
"label": "Company Loans",
"menu": "Admin",
"order": "81",
"icon": "fa-shield",
"user_levels": [
"Admin"
],
"permissions": [],
"model_namespace": "\\Loans\\Common\\Model",
"manager": "\\Loans\\Admin\\Api\\LoansAdminManager"
}

View File

@@ -1,14 +0,0 @@
{
"label": "Overtime Administration",
"menu": "Employees",
"order": "94",
"icon": "fa-align-center",
"user_levels": [
"Admin",
"Manager"
],
"dashboardPosition": 13,
"permissions": [],
"model_namespace": "\\Overtime\\Common\\Model",
"manager": "\\Overtime\\Admin\\Api\\OvertimeAdminManager"
}

View File

@@ -1,50 +0,0 @@
<?php
/*
This file is part of iCE Hrm.
iCE Hrm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
iCE Hrm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'travel';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$options = array();
$options['setRemoteTable'] = 'true';
$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'EmployeeTravelRecord',
'EmployeeTravelRecord',
'Travel Requests',
'EmployeeTravelRecordAdminAdapter',
'',
'',
true,
$options
));
echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
$itemName = 'TravelRequest';
$moduleName = 'Travel Management';
$itemNameLower = strtolower($itemName);
include APP_BASE_PATH.'footer.php';

View File

@@ -1,182 +0,0 @@
/**
* Author: Thilina Hasantha
*/
/**
* ImmigrationDocumentAdapter
*/
function ImmigrationDocumentAdapter(endPoint) {
this.initAdapter(endPoint);
}
ImmigrationDocumentAdapter.inherits(AdapterBase);
ImmigrationDocumentAdapter.method('getDataMapping', function() {
return [
"id",
"name",
"details",
"required",
"alert_on_missing",
"alert_before_expiry"
];
});
ImmigrationDocumentAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name" },
{ "sTitle": "Details"},
{ "sTitle": "Compulsory"},
{ "sTitle": "Alert If Not Found"},
{ "sTitle": "Alert Before Expiry"}
];
});
ImmigrationDocumentAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "details", {"label":"Details","type":"textarea","validation":"none"}],
[ "required", {"label":"Compulsory","type":"select","source":[["No","No"],["Yes","Yes"]]}],
[ "alert_on_missing", {"label":"Alert If Not Found","type":"select","source":[["No","No"],["Yes","Yes"]]}],
[ "alert_before_expiry", {"label":"Alert Before Expiry","type":"select","source":[["No","No"],["Yes","Yes"]]}],
[ "alert_before_day_number", {"label":"Days for Expiry Alert","type":"text","validation":""}]
];
});
/**
* EmployeeImmigrationAdapter
*/
function EmployeeImmigrationAdapter(endPoint) {
this.initAdapter(endPoint);
}
EmployeeImmigrationAdapter.inherits(AdapterBase);
EmployeeImmigrationAdapter.method('getDataMapping', function() {
return [
"id",
"employee",
"document",
"documentname",
"valid_until",
"status"
];
});
EmployeeImmigrationAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Employee" },
{ "sTitle": "Document" },
{ "sTitle": "Document Id" },
{ "sTitle": "Valid Until"},
{ "sTitle": "Status"}
];
});
EmployeeImmigrationAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}],
[ "document", {"label":"Document","type":"select2","remote-source":["ImmigrationDocument","id","name"]}],
[ "documentname", {"label":"Document Id","type":"text","validation":""}],
[ "valid_until", {"label":"Valid Until","type":"date","validation":"none"}],
[ "status", {"label":"Status","type":"select","source":[["Active","Active"],["Inactive","Inactive"],["Draft","Draft"]]}],
[ "details", {"label":"Details","type":"textarea","validation":"none"}],
[ "attachment1", {"label":"Attachment 1","type":"fileupload","validation":"none"}],
[ "attachment2", {"label":"Attachment 2","type":"fileupload","validation":"none"}],
[ "attachment3", {"label":"Attachment 3","type":"fileupload","validation":"none"}]
];
});
EmployeeImmigrationAdapter.method('getFilters', function() {
return [
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}]
];
});
/**
* EmployeeTravelRecordAdminAdapter
*/
function EmployeeTravelRecordAdminAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
this.itemName = 'TravelRequest';
this.itemNameLower = 'travelrequest';
this.modulePathName = 'travel';
}
EmployeeTravelRecordAdminAdapter.inherits(ApproveAdminAdapter);
EmployeeTravelRecordAdminAdapter.method('getDataMapping', function() {
return [
"id",
"employee",
"type",
"purpose",
"travel_from",
"travel_to",
"travel_date",
"status"
];
});
EmployeeTravelRecordAdminAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Employee" },
{ "sTitle": "Travel Type" },
{ "sTitle": "Purpose" },
{ "sTitle": "From"},
{ "sTitle": "To"},
{ "sTitle": "Travel Date"},
{ "sTitle": "Status"}
];
});
EmployeeTravelRecordAdminAdapter.method('getFormFields', function() {
return [
["id", {"label": "ID", "type": "hidden"}],
["employee", {
"label": "Employee",
"type": "select2",
"sort": "none",
"allow-null": false,
"remote-source": ["Employee", "id", "first_name+last_name", "getActiveSubordinateEmployees"]
}],
["type", {
"label": "Travel Type",
"type": "select",
"source": [["Local", "Local"], ["International", "International"]]
}],
["purpose", {"label": "Purpose of Travel", "type": "textarea", "validation": ""}],
["travel_from", {"label": "Travel From", "type": "text", "validation": ""}],
["travel_to", {"label": "Travel To", "type": "text", "validation": ""}],
["travel_date", {"label": "Travel Date", "type": "datetime", "validation": ""}],
["return_date", {"label": "Return Date", "type": "datetime", "validation": ""}],
["details", {"label": "Notes", "type": "textarea", "validation": "none"}],
["currency", {"label": "Currency", "type": "select2", "allow-null":false, "remote-source": ["CurrencyType", "id", "code"]}],
["funding", {"label": "Total Funding Proposed", "type": "text", "validation": "float"}],
["attachment1", {"label": "Itinerary / Cab Receipt", "type": "fileupload", "validation": "none"}],
["attachment2", {"label": "Other Attachment 1", "type": "fileupload", "validation": "none"}],
["attachment3", {"label": "Other Attachment 2", "type": "fileupload", "validation": "none"}]
];
});

View File

@@ -1,14 +0,0 @@
{
"label": "Travel Administration",
"menu": "Employees",
"order": "6",
"icon": "fa-plane",
"user_levels": [
"Admin",
"Manager"
],
"dashboardPosition": 12,
"permissions": [],
"model_namespace": "\\Travel\\Common\\Model",
"manager": "\\Travel\\Admin\\Api\\TravelAdminManager"
}

View File

@@ -1,66 +0,0 @@
<?php
/*
This file is part of iCE Hrm.
iCE Hrm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
iCE Hrm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'users';
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="tabUser" href="#tabPageUser"><?=t('Users')?></a></li>
<li class=""><a id="tabUserRole" href="#tabPageUserRole"><?=t('User Roles')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageUser">
<div id="User" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="UserForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageUserRole">
<div id="UserRole" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="UserRoleForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabUser'] = new UserAdapter('User');
<?php if(isset($_REQUEST['action']) && $_REQUEST['action'] == "new" && isset($_REQUEST['object'])){?>
modJsList['tabUser'].newInitObject = JSON.parse(Base64.decode('<?=$_REQUEST['object']?>'));
<?php }?>
modJsList['tabUserRole'] = new UserRoleAdapter('UserRole');
var modJs = modJsList['tabUser'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -1,205 +0,0 @@
/**
* Author: Thilina Hasantha
*/
function UserAdapter(endPoint) {
this.initAdapter(endPoint);
}
UserAdapter.inherits(AdapterBase);
UserAdapter.method('getDataMapping', function() {
return [
"id",
"username",
"email",
"employee",
"user_level"
];
});
UserAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" },
{ "sTitle": "User Name" },
{ "sTitle": "Authentication Email" },
{ "sTitle": "Employee"},
{ "sTitle": "User Level"}
];
});
UserAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden","validation":""}],
[ "username", {"label":"User Name","type":"text","validation":"username"}],
[ "email", {"label":"Email","type":"text","validation":"email"}],
[ "employee", {"label":"Employee","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
[ "user_level", {"label":"User Level","type":"select","source":[["Admin","Admin"],["Manager","Manager"],["Employee","Employee"],["Other","Other"]]}],
[ "user_roles", {"label":"User Roles","type":"select2multi","remote-source":["UserRole","id","name"]}],
[ "lang", {"label":"Language","type":"select2","allow-null":true,"remote-source":["SupportedLanguage","id","description"]}],
[ "default_module", {"label":"Default Module","type":"select2","null-label":"No Default Module","allow-null":true,"remote-source":["Module","id","menu+label"]}]
];
});
UserAdapter.method('postRenderForm', function(object, $tempDomObj) {
if(object == null || object == undefined){
$tempDomObj.find("#changePasswordBtn").remove();
}
});
UserAdapter.method('changePassword', function() {
$('#adminUsersModel').modal('show');
$('#adminUsersChangePwd #newpwd').val('');
$('#adminUsersChangePwd #conpwd').val('');
});
UserAdapter.method('saveUserSuccessCallBack', function(callBackData,serverData) {
var user = callBackData[0];
if (callBackData[1]) {
this.showMessage("Create User","An email has been sent to "+user['email']+" with a temporary password to login to IceHrm.");
} else {
this.showMessage("Create User","User created successfully. But there was a problem sending welcome email.");
}
this.get([]);
});
UserAdapter.method('saveUserFailCallBack', function(callBackData,serverData) {
this.showMessage("Error",callBackData);
});
UserAdapter.method('doCustomValidation', function(params) {
var msg = null;
if((params['user_level'] != "Admin" && params['user_level'] != "Other") && params['employee'] == "NULL"){
msg = "For this user type, you have to assign an employee when adding or editing the user.<br/>";
msg += " You may create a new employee through 'Admin'->'Employees' menu";
}
return msg;
});
UserAdapter.method('save', function() {
var validator = new FormValidation(this.getTableName()+"_submit",true,{'ShowPopup':false,"LabelErrorClass":"error"});
if(validator.checkValues()){
var params = validator.getFormParameters();
var msg = this.doCustomValidation(params);
if(msg == null){
var id = $('#'+this.getTableName()+"_submit #id").val();
if(id != null && id != undefined && id != ""){
$(params).attr('id',id);
this.add(params,[]);
}else{
var reqJson = JSON.stringify(params);
var callBackData = [];
callBackData['callBackData'] = [];
callBackData['callBackSuccess'] = 'saveUserSuccessCallBack';
callBackData['callBackFail'] = 'saveUserFailCallBack';
this.customAction('saveUser','admin=users',reqJson,callBackData);
}
}else{
//$("#"+this.getTableName()+'Form .label').html(msg);
//$("#"+this.getTableName()+'Form .label').show();
this.showMessage("Error Saving User",msg);
}
}
});
UserAdapter.method('changePasswordConfirm', function() {
$('#adminUsersChangePwd_error').hide();
var passwordValidation = function (str) {
var val = /^[a-zA-Z0-9]\w{6,}$/;
return str != null && val.test(str);
};
var password = $('#adminUsersChangePwd #newpwd').val();
if(!passwordValidation(password)){
$('#adminUsersChangePwd_error').html("Password may contain only letters, numbers and should be longer than 6 characters");
$('#adminUsersChangePwd_error').show();
return;
}
var conPassword = $('#adminUsersChangePwd #conpwd').val();
if(conPassword != password){
$('#adminUsersChangePwd_error').html("Passwords don't match");
$('#adminUsersChangePwd_error').show();
return;
}
var req = {"id":this.currentId,"pwd":conPassword};
var reqJson = JSON.stringify(req);
var callBackData = [];
callBackData['callBackData'] = [];
callBackData['callBackSuccess'] = 'changePasswordSuccessCallBack';
callBackData['callBackFail'] = 'changePasswordFailCallBack';
this.customAction('changePassword','admin=users',reqJson,callBackData);
});
UserAdapter.method('closeChangePassword', function() {
$('#adminUsersModel').modal('hide');
});
UserAdapter.method('changePasswordSuccessCallBack', function(callBackData,serverData) {
this.closeChangePassword();
this.showMessage("Password Change","Password changed successfully");
});
UserAdapter.method('changePasswordFailCallBack', function(callBackData,serverData) {
this.closeChangePassword();
this.showMessage("Error",callBackData);
});
/**
* UserRoleAdapter
*/
function UserRoleAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
UserRoleAdapter.inherits(AdapterBase);
UserRoleAdapter.method('getDataMapping', function() {
return [
"id",
"name"
];
});
UserRoleAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name"}
];
});
UserRoleAdapter.method('postRenderForm', function(object, $tempDomObj) {
$tempDomObj.find("#changePasswordBtn").remove();
});
UserRoleAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}]
];
});

View File

@@ -1,284 +0,0 @@
/*
This file is part of Ice Framework.
Ice Framework 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 Framework 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 Framework. 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)
*/
ValidationRules = {
float: function (str) {
var floatstr = /^[-+]?[0-9]+(\.[0-9]+)?$/;
if (str != null && str.match(floatstr)) {
return true;
} else {
return false;
}
},
number: function (str) {
var numstr = /^[0-9]+$/;
if (str != null && str.match(numstr)) {
return true;
} else {
return false;
}
},
numberOrEmpty: function (str) {
if(str == ""){
return true;
}
var numstr = /^[0-9]+$/;
if (str != null && str.match(numstr)) {
return true;
} else {
return false;
}
},
email: function (str) {
var emailPattern = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/;
return str != null && emailPattern.test(str);
},
emailOrEmpty: function (str) {
if(str == ""){
return true;
}
var emailPattern = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/;
return str != null && emailPattern.test(str);
},
username: function (str) {
var username = /^[a-zA-Z0-9\.-]+$/;
return str != null && username.test(str);
},
input: function (str) {
if (str != null && str.length > 0) {
return true;
} else {
return false;
}
}
};
function FormValidation(formId,validateAll,options) {
this.tempOptions = {};
this.formId = formId;
this.formError = false;
this.formObject = null;
this.errorMessages = "";
this.popupDialog = null;
this.validateAll = validateAll;
this.errorMap = new Array();
this.settings = {"thirdPartyPopup":null,"LabelErrorClass":false, "ShowPopup":true};
this.settings = jQuery.extend(this.settings,options);
this.inputTypes = new Array( "text", "radio", "checkbox", "file", "password", "select-one","select-multi", "textarea","fileupload" ,"signature");
this.validator = ValidationRules;
}
FormValidation.method('clearError' , function(formInput, overrideMessage) {
var id = formInput.attr("id");
$('#'+ this.formId +' #field_'+id).removeClass('error');
$('#'+ this.formId +' #help_'+id).html('');
});
FormValidation.method('addError' , function(formInput, overrideMessage) {
this.formError = true;
if(formInput.attr("message") != null) {
this.errorMessages += (formInput.attr("message") + "\n");
this.errorMap[formInput.attr("name")] = formInput.attr("message");
}else{
this.errorMap[formInput.attr("name")] = "";
}
var id = formInput.attr("id");
var validation = formInput.attr("validation");
var message = formInput.attr("validation");
$('#'+ this.formId +' #field_'+id).addClass('error');
if(message == undefined || message == null || message == ""){
$('#'+ this.formId +' #help_'+id).html(message);
}else{
if(validation == undefined || validation == null || validation == ""){
$('#'+ this.formId +' #help_'+id).html("Required");
}else{
if(validation == "float" || validation == "number"){
$('#'+ this.formId +' #help_'+id).html("Number required");
}else if(validation == "email"){
$('#'+ this.formId +' #help_'+id).html("Email required");
}else{
$('#'+ this.formId +' #help_'+id).html("Required");
}
}
}
});
FormValidation.method('showErrors' , function() {
if(this.formError) {
if(this.settings['thirdPartyPopup'] != undefined && this.settings['thirdPartyPopup'] != null){
this.settings['thirdPartyPopup'].alert();
}else{
if(this.settings['ShowPopup'] == true){
if(this.tempOptions['popupTop'] != undefined && this.tempOptions['popupTop'] != null){
this.alert("Errors Found",this.errorMessages,this.tempOptions['popupTop']);
}else{
this.alert("Errors Found",this.errorMessages,-1);
}
}
}
}
});
FormValidation.method('checkValues' , function(options) {
this.tempOptions = options;
var that = this;
this.formError = false;
this.errorMessages = "";
this.formObject = new Object();
var validate = function (inputObject) {
if(that.settings['LabelErrorClass'] != false){
$("label[for='" + name + "']").removeClass(that.settings['LabelErrorClass']);
}
var id = inputObject.attr("id");
var name = inputObject.attr("name");
var type = inputObject.attr("type");
if(inputObject.hasClass('select2-focusser') || inputObject.hasClass('select2-input')){
return true;
}
if(jQuery.inArray(type, that.inputTypes ) >= 0) {
if(inputObject.hasClass('uploadInput')){
inputValue = inputObject.attr("val");
//}else if(inputObject.hasClass('datetimeInput')){
//inputValue = inputObject.getDate()+":00";
}else{
//inputValue = (type == "radio" || type == "checkbox")?$("input[name='" + name + "']:checked").val():inputObject.val();
inputValue = null;
if(type == "radio" || type == "checkbox"){
inputValue = $("input[name='" + name + "']:checked").val();
}else if(inputObject.hasClass('select2Field')){
if($('#'+id).select2('data') != null && $('#'+id).select2('data') != undefined){
inputValue = $('#'+id).select2('data').id;
}else{
inputValue = "";
}
}else if(inputObject.hasClass('select2Multi')){
if($('#'+id).select2('data') != null && $('#'+id).select2('data') != undefined){
inputValueObjects = $('#'+id).select2('data');
inputValue = [];
for(var i=0;i<inputValueObjects.length;i++){
inputValue.push(inputValueObjects[i].id);
}
inputValue = JSON.stringify(inputValue);
}else{
inputValue = "";
}
}else if(inputObject.hasClass('signatureField')){
if($('#'+id).data('signaturePad').isEmpty()){
inputValue = '';
}else{
inputValue = $('#'+id).data('signaturePad').toDataURL();
}
}else if(inputObject.hasClass('simplemde')){
inputValue = $('#'+id).data('simplemde').value();
}else if(inputObject.hasClass('tinymce')){
inputValue = tinyMCE.get(id).getContent({format : 'raw'});
}else{
inputValue = inputObject.val();
}
}
var validation = inputObject.attr('validation');
var valid = false;
if(validation != undefined && validation != null && that.validator[validation] != undefined && that.validator[validation] != null){
valid = that.validator[validation](inputValue);
}else{
if(that.validateAll){
if(validation != undefined && validation != null && validation == "none"){
valid = true;
}else{
valid = that.validator['input'](inputValue);
}
}else{
valid = true;
}
$(that.formObject).attr(id,inputValue);
}
if(!valid) {
that.addError(inputObject, null);
}else{
that.clearError(inputObject, null);
$(that.formObject).attr(id,inputValue);
}
}
};
var inputs = $('#'+ this.formId + " :input");
inputs.each(function() {
var that = $(this);
validate(that);
});
inputs = $('#'+ this.formId + " .uploadInput");
inputs.each(function() {
var that = $(this);
validate(that);
});
this.showErrors();
this.tempOptions = {};
return !this.formError;
});
FormValidation.method('getFormParameters' , function() {
return this.formObject;
});
FormValidation.method('alert', function (title,text,top) {
alert(text);
});

View File

@@ -8,7 +8,7 @@ define('TWITTER_URL', 'Ice Hrm');
define('CLIENT_NAME', '_CLIENT_');
define('APP_BASE_PATH', '_APP_BASE_PATH_');
define('CLIENT_BASE_PATH', '_CLIENT_BASE_PATH_');
define('BASE_URL','_BASE_URL_');
define('BASE_URL','_BASE_URL_web/');
define('CLIENT_BASE_URL','_CLIENTBASE_URL_');
define('APP_DB', '_APP_DB_');

View File

@@ -3,6 +3,6 @@ error_reporting(E_ERROR);
ini_set("error_log", "../data/icehrm_install.log");
define('CURRENT_PATH',dirname(__FILE__));
define('CLIENT_APP_PATH',realpath(dirname(__FILE__)."/..")."/");
define('APP_PATH',realpath(dirname(__FILE__)."/../..")."/");
define('APP_PATH',realpath(dirname(__FILE__)."/../..")."/core/");
define('APP_NAME',"IceHrm");
define('APP_ID',"icehrm");

View File

@@ -67,14 +67,14 @@ if(!$isDataFolderExists){
<!-- Le styles -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript" src="../../web/js/jquery.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="styles.css?v=2" rel="stylesheet">
<script type="text/javascript" src="../../js/date.js"></script>
<script type="text/javascript" src="../../js/json2.js"></script>
<script type="text/javascript" src="../../js/CrockfordInheritance.v0.1.js"></script>
<script type="text/javascript" src="../../web/js/date.js"></script>
<script type="text/javascript" src="../../web/js/json2.js"></script>
<script type="text/javascript" src="../../web/js/CrockfordInheritance.v0.1.js"></script>
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="bootstrap/ico/favicon.ico">
@@ -253,4 +253,4 @@ if(!$isDataFolderExists){
</div>
</div>
</body>
</html>
</html>

View File

@@ -1,6 +1,6 @@
<?php
include dirname(__FILE__).'/config.php';
include(CLIENT_APP_PATH.'../lib/adodb512/adodb.inc.php');
include(CLIENT_APP_PATH.'../core/lib/adodb512/adodb.inc.php');
$isConfigFileExists = file_exists(CLIENT_APP_PATH."config.php");
$configData = file_get_contents(CLIENT_APP_PATH."config.php");
@@ -94,7 +94,7 @@ if($action == "TEST_DB"){
//Run create table script
$insql = file_get_contents(CLIENT_APP_PATH."../scripts/".APP_ID."db.sql");
$insql = file_get_contents(CLIENT_APP_PATH."../core/scripts/".APP_ID."db.sql");
$sql_list = preg_split('/;/',$insql);
foreach($sql_list as $sql){
if (preg_match('/^\s+$/', $sql) || $sql == '') { # skip empty lines
@@ -104,7 +104,7 @@ if($action == "TEST_DB"){
}
//Run create table script
$insql = file_get_contents(CLIENT_APP_PATH."../scripts/".APP_ID."_master_data.sql");
$insql = file_get_contents(CLIENT_APP_PATH."../core/scripts/".APP_ID."_master_data.sql");
$sql_list = preg_split('/;/',$insql);
foreach($sql_list as $sql){
if (preg_match('/^\s+$/', $sql) || $sql == '') { # skip empty lines

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,12 @@
"homepage": "",
"dependencies": {
"simplemde": "^1.11.2",
"tinymce": "^4.5.5"
"tinymce": "^4.5.5",
"d3-timeline": "^0.0.5",
"vis": "^4.21.0",
"handlebars": "^4.0.11",
"material-design-icons": "^3.0.1",
"inputmask": "~3.3.11",
"flag-icon-css": "~3.1.0"
}
}

View File

@@ -45,7 +45,6 @@
depends="clean"
description="Prepare for build">
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
@@ -63,7 +62,7 @@
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/src">
<fileset dir="${basedir}/core/src">
<include name="**/*.php" />
<exclude name="composer/**"/>
<modified />
@@ -80,8 +79,8 @@
description="Measure project size using PHPLOC and print human readable output. Intended for usage on the command line.">
<exec executable="${toolsdir}phploc">
<arg value="--count-tests" />
<arg path="${basedir}/src" />
<arg path="${basedir}/tests" />
<arg path="${basedir}/core/src" />
<arg path="${basedir}/test" />
</exec>
</target>
@@ -94,8 +93,8 @@
<arg path="${basedir}/build/logs/phploc.csv" />
<arg value="--log-xml" />
<arg path="${basedir}/build/logs/phploc.xml" />
<arg path="${basedir}/src" />
<arg path="${basedir}/tests" />
<arg path="${basedir}/core/src" />
<arg path="${basedir}/test" />
</exec>
</target>
@@ -106,14 +105,14 @@
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
<arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
<arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
<arg path="${basedir}/src" />
<arg path="${basedir}/core/src" />
</exec>
</target>
<target name="phpmd"
description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${toolsdir}phpmd">
<arg path="${basedir}/src" />
<arg path="${basedir}/core/src" />
<arg value="text" />
<arg path="${basedir}/build/phpmd.xml" />
</exec>
@@ -123,7 +122,7 @@
depends="prepare"
description="Perform project mess detection using PHPMD and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${toolsdir}phpmd">
<arg path="${basedir}/src" />
<arg path="${basedir}/core/src" />
<arg value="xml" />
<arg path="${basedir}/build/phpmd.xml" />
<arg value="--reportfile" />
@@ -137,7 +136,7 @@
<arg value="--standard=PSR2" />
<arg value="--extensions=php" />
<arg value="--ignore=autoload.php" />
<arg path="${basedir}/src" />
<arg path="${basedir}/core/src" />
<arg path="${basedir}/test/unit" />
<arg path="${basedir}/test/integration" />
</exec>
@@ -152,14 +151,14 @@
<arg value="--standard=PSR2" />
<arg value="--extensions=php" />
<arg value="--ignore=autoload.php" />
<arg path="${basedir}/src" />
<arg path="${basedir}/core/src" />
</exec>
</target>
<target name="phpcpd"
description="Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${toolsdir}phpcpd">
<arg path="${basedir}/src" />
<arg path="${basedir}/core/src" />
</exec>
</target>
@@ -169,7 +168,7 @@
<exec executable="${toolsdir}phpcpd">
<arg value="--log-pmd" />
<arg path="${basedir}/build/logs/pmd-cpd.xml" />
<arg path="${basedir}/src" />
<arg path="${basedir}/core/src" />
</exec>
</target>
@@ -215,6 +214,11 @@
<include name="build/**"/>
<include name="build.xml"/>
<include name="lib/composer/composer.phar"/>
<include name="keys.tags.pub"/>
<include name="keys.dev.pub"/>
<include name="cache.properties"/>
<include name="phpdox.xml"/>
<include name="phpunit.xml"/>
</fileset>
</delete>

244
cache.properties Normal file
View File

@@ -0,0 +1,244 @@
#Sun Apr 29 05:47:35 CEST 2018
/Users/Thilina/Projects/icehrm/src/Expenses/Common/Model/EmployeeExpenseApproval.php=db8eedd8fb151769acded489e9d616c1
/Users/Thilina/Projects/icehrm/src/Attendance/Common/Calculations/BasicOvertimeCalculator.php=9c96ae3f71796029d3f93e5c63783f53
/Users/Thilina/Projects/icehrm/src/Classes/Email/SNSEmailSender.php=fa905e3ab63ea745c591e744d6741b6b
/Users/Thilina/Projects/icehrm/src/Salary/Common/Model/SalaryComponent.php=31e89f1115de7986cd790c8e113ab6d5
/Users/Thilina/Projects/icehrm/src/Classes/Email/EmailSender.php=03a98d7d1bcc56a77cc5b3bfa46b79fd
/Users/Thilina/Projects/icehrm/test/bootstrap.php=391db040530140c40c84cbbc65645d58
/Users/Thilina/Projects/icehrm/src/Utils/InputCleaner.php=e86fcb9daf1d32a4328edf40a31152f8
/Users/Thilina/Projects/icehrm/src/Projects/Common/Model/Project.php=05b1cd967d67cb977558f2567d7f6cb6
/Users/Thilina/Projects/icehrm/src/Model/DataEntryBackup.php=9ab3a7d48dbdd377a90c505cf692c17e
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/Skill.php=e1441a2526e24a7ada7d20b36ff9e355
/Users/Thilina/Projects/icehrm/src/Permissions/Admin/Api/PermissionsAdminManager.php=c66e06b926b4006e8a2d7f2e77e0f1fa
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/Province.php=4a718577000772ab7591a2586f7c75c8
/Users/Thilina/Projects/icehrm/src/Loans/Common/Model/EmployeeCompanyLoan.php=abc8959df2ec0f3e19ff6da12c3163f9
/Users/Thilina/Projects/icehrm/src/Classes/Approval/ApprovalStatus.php=7a3bc0a73f237eb677254b245887f48f
/Users/Thilina/Projects/icehrm/src/Classes/FileService.php=806ff6c25c7654c30e99b0418e1c1475
/Users/Thilina/Projects/icehrm/src/Dashboard/User/Api/DashboardActionManager.php=3f797cf4807ad5cd4f881607142df049
/Users/Thilina/Projects/icehrm/src/Classes/Cron/Task/EmailSenderTask.php=f0c93e7c807706922cb812723e51bd09
/Users/Thilina/Projects/icehrm/src/Attendance/Admin/Api/AttendanceUtil.php=34fe63a4c0f954451afae6c359ea5b38
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/Deduction.php=1e49d0fd8d4673e3fd094cfb0e467df4
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/PayrollDataExport.php=83bd6faa73c75667ecf25091c3729abc
/Users/Thilina/Projects/icehrm/src/Employees/Common/Model/Employee.php=f8814257c241892fcf45e1d409d6ab1b
/Users/Thilina/Projects/icehrm/src/Metadata/Admin/Api/MetadataAdminManager.php=9f383f9c34ec98a8e2e701825c548a8a
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/NewHiresEmployeeReport.php=64eab525953538d481dab6052dd76d81
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/DeductionGroup.php=c35db5b88aa4b0c7d78b8444688931b5
/Users/Thilina/Projects/icehrm/src/Utils/Math/EvalMathFuncs.php=d6f7c26eab307d205ee8483d87a380cb
/Users/Thilina/Projects/icehrm/src/Classes/ModuleBuilder/ModuleTabGroup.php=d81cfc2b3dcad2f57317b1274c884d95
/Users/Thilina/Projects/icehrm/src/Model/RestAccessToken.php=77c292675944ff887fc8b4c3f7b6da94
/Users/Thilina/Projects/icehrm/src/Classes/LDAPManager.php=e88dd0634a6ca372564faa5a1d540796
/Users/Thilina/Projects/icehrm/src/Expenses/Admin/Api/ExpensesAdminManager.php=ef6961e298a55379ec4dfff8b9db77fc
/Users/Thilina/Projects/icehrm/src/Dashboard/User/Api/DashboardModulesManager.php=2e8968121b445353ee864c76c44483d3
/Users/Thilina/Projects/icehrm/src/Model/UserReport.php=0a8a8476e3088011cc54fda139567b56
/Users/Thilina/Projects/icehrm/src/Travel/Common/Model/EmployeeTravelRecordApproval.php=d84b2a1323f3663806cc30545e748cd4
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/SupportedLanguage.php=3ec1220796f6e33641998a33f036d709
/Users/Thilina/Projects/icehrm/src/TimeSheets/Common/Model/QTDays.php=32a00e65a966331b776dc37cc0609edf
/Users/Thilina/Projects/icehrm/src/Salary/Common/Model/EmployeeSalary.php=ec80c4e8280d23568df79f59d1b32de8
/Users/Thilina/Projects/icehrm/src/Classes/SimpleImage.php=fdfb7b2e71e14975ebce16de44ea9dee
/Users/Thilina/Projects/icehrm/src/Expenses/User/Api/ExpensesModulesManager.php=4860a1fbb24f4074a6918b2c0b973e80
/Users/Thilina/Projects/icehrm/src/Employees/User/Api/EmployeesActionManager.php=7f495266d28737c779e1e9ab3c61e0db
/Users/Thilina/Projects/icehrm/src/Classes/Approval/ApproveAdminActionManager.php=3c26b53f0e5141b8f4a033cbbd4c622e
/Users/Thilina/Projects/icehrm/src/Settings/Admin/Api/SettingsAdminManager.php=5e5df0056db6f9593128720581feca18
/Users/Thilina/Projects/icehrm/src/Travel/User/Api/TravelModulesManager.php=94c9204a67e99af9133cd2aa371cb6da
/Users/Thilina/Projects/icehrm/test/unit/UserAttendanceActionManagerUnit.php=1d71d366a13f253ef6931aa87202ac42
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/OvertimeRequestReport.php=3cd3bc887da768a32bfc61c152489528
/Users/Thilina/Projects/icehrm/src/Employees/User/Api/EmployeesModulesManager.php=ad9ab05afd9cf551870352dba82e6d69
/Users/Thilina/Projects/icehrm/test/helper/EmployeeTestDataHelper.php=65ec2048653c9e4e4359d9b6967a860d
/Users/Thilina/Projects/icehrm/test/integration/ApprovalStatusIntegration.php=8b9243e5cbb302513d906ff9de246acd
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/EmployeeTimeSheetData.php=9d612ee603fdf4e6b710eec725da2656
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/PayrollData.php=f1a49da4e6e5a91695dd96c9585e1686
/Users/Thilina/Projects/icehrm/src/TimeSheets/User/Api/TimeSheetsInitialize.php=d47372f12494019c1004a04cbe57013d
/Users/Thilina/Projects/icehrm/src/Modules/Admin/Api/ModulesAdminManager.php=ef70889c3b3b9eae52800ce3a326d540
/Users/Thilina/Projects/icehrm/src/Modules/Common/Model/Module.php=8f0d1680087f555f5628c53236c7625f
/Users/Thilina/Projects/icehrm/src/Expenses/Common/Model/ExpensesPaymentMethod.php=338ce9cabb90a291e88b940756b06701
/Users/Thilina/Projects/icehrm/src/Company/Common/Model/Timezone.php=50aff3bc39221658c35041abdc55ad98
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/OvertimeSummaryReport.php=16d9e2f10de82f25d0965e2d327086b9
/Users/Thilina/Projects/icehrm/src/Data/Common/Model/DataImport.php=a6af4d8acd5585932823889509cca581
/Users/Thilina/Projects/icehrm/src/FieldNames/Common/Model/FieldNameMapping.php=73bd1da0f6e51329dbe12930bb566ccd
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/ActiveEmployeeReport.php=261180dfbe69ab83d9d63646111695ba
/Users/Thilina/Projects/icehrm/test/unit/LanguageManagerUnit.php=ebb20febce875350bfddd7f0358e6ad0
/Users/Thilina/Projects/icehrm/src/Utils/LogManager.php=144ebae4d0ff60f0fd21e79a45aa6e6a
/Users/Thilina/Projects/icehrm/src/Dependents/Common/Model/EmployeeDependent.php=1f4b6cd6dfbc14269b53dbbac3730f9e
/Users/Thilina/Projects/icehrm/src/Data/Admin/Import/PayrollDataImporter.php=7350ec94ef8a70ba6c263e53c70c7073
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/ExpenseReport.php=397c8deb446994b64e2b9fef2845bb89
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/OvertimeReport.php=f630ae5402ec7957f42b64fa46cd1923
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/EmployeeLeaveEntitlementReport.php=9be41bfeb88fd0171028203f6513c799
/Users/Thilina/Projects/icehrm/src/Projects/User/Api/ProjectsModulesManager.php=4fc0463507ca7768a1e493d703ac2581
/Users/Thilina/Projects/icehrm/src/Permissions/Common/Model/Permission.php=0745dd3786e95cfc5265c32f47f4ee4a
/Users/Thilina/Projects/icehrm/src/Overtime/Admin/Api/OvertimeActionManager.php=0b039c008daf52e64f9ce827eabdd25a
/Users/Thilina/Projects/icehrm/src/Salary/User/Api/SalaryModulesManager.php=050d077e79532353a7d12a7221829b7c
/Users/Thilina/Projects/icehrm/src/Classes/Cron/IceTask.php=cc9b1481e824fd967eb503248eb92e29
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/EmployeeTimesheetReport.php=8661944cf39b10c441841a8af72cb988
/Users/Thilina/Projects/icehrm/src/EmergencyContacts/User/Api/EmergencyContactModulesManager.php=527888466137dad3da5c6bf5b7bf9b28
/Users/Thilina/Projects/icehrm/src/Classes/SettingsManager.php=ebed24cde74d7fb33cca4ba156389760
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/EmployeeLanguage.php=66127455502fb29181324c1cc25f93c4
/Users/Thilina/Projects/icehrm/src/Classes/Approval/ApproveCommonActionManager.php=c1b7efb8c4f3fe8199c7e0d6fdd1ccce
/Users/Thilina/Projects/icehrm/src/Overtime/Common/Model/EmployeeOvertime.php=50c166318a354b05dc2ae0e442d43a33
/Users/Thilina/Projects/icehrm/src/Reports/User/Api/ReportsModulesManager.php=1645b61be16b96d0085510f6a2d30b68
/Users/Thilina/Projects/icehrm/src/Classes/RestApiManager.php=c53180aa40576c5fe8c519b2b0a39e32
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/Payroll.php=5c7eb622aade003f693275944e041cc7
/Users/Thilina/Projects/icehrm/src/Attendance/Admin/Api/AttendanceActionManager.php=9045182bc0854647219b0a0418c37ffd
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/PDFReportBuilder.php=fbbc196b5ea432671667bcc239d8bf54
/Users/Thilina/Projects/icehrm/src/Employees/Rest/EmployeeRestEndPoint.php=5a006d8637a05d63f19e130b37bdd97d
/Users/Thilina/Projects/icehrm/src/Model/File.php=8211922ac309e1c3e5fc316a90bc0bf0
/Users/Thilina/Projects/icehrm/src/Data/Admin/Api/AbstractDataImporter.php=315bf5eec45aa13e174d412014e2237f
/Users/Thilina/Projects/icehrm/src/Classes/NotificationManager.php=a739fd4177892d44e78efed1641072cc
/Users/Thilina/Projects/icehrm/src/Utils/SessionUtils.php=f5c4db2214dfb4d8bf5b9bfe5edb1bac
/Users/Thilina/Projects/icehrm/src/Travel/Admin/Api/TravelActionManager.php=0e2fdd403d3456ebda102d554349e9f4
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/PayrollColumn.php=0f2e8fd9b44c038f163ae646d3c6f4b6
/Users/Thilina/Projects/icehrm/src/Travel/Common/Model/EmployeeTravelRecord.php=5366a1927bd94630217ffbc9386ff605
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/TravelRequestReport.php=c4bdd4c88f4a7b15c8091a0dcbb5018a
/Users/Thilina/Projects/icehrm/src/Classes/StatusChangeLogManager.php=b091e855d9800eea9d4190e0c75e3e8c
/Users/Thilina/Projects/icehrm/src/Qualifications/Admin/Api/QualificationsAdminManager.php=3037d64a2344a497ff0ceea52265d2a6
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/EmployeeLeavesReport.php=bd5efb4666ca4103a2e7e98aa24e1c83
/Users/Thilina/Projects/icehrm/src/TimeSheets/User/Api/TimeSheetsActionManager.php=ef271183cf6e71d8db24b8d3369e19b9
/Users/Thilina/Projects/icehrm/src/Expenses/Common/Model/ExpensesCategory.php=e9c0e170b950a39994d0a33d5981374f
/Users/Thilina/Projects/icehrm/src/Classes/Email/SwiftMailer.php=eca37dc0add437ae1089c695b5074b90
/Users/Thilina/Projects/icehrm/src/Data/Admin/Import/AttendanceDataImporter.php=dc4dec4294b9feac08a5f996b85cab85
/Users/Thilina/Projects/icehrm/src/Salary/Common/Model/PayrollEmployee.php=1a01bd60d1f82fc6f3eeb1875006f659
/Users/Thilina/Projects/icehrm/src/Classes/Crypt/AesCtr.php=4897c7fe9a510f38eeb91046127d79f7
/Users/Thilina/Projects/icehrm/src/Classes/AbstractModuleManager.php=5bb9fc5859bdd790753277a47752b0b9
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/ImmigrationStatus.php=f0dc9a94bcc487df21d53387ae8e89ba
/Users/Thilina/Projects/icehrm/src/Salary/Admin/Api/SalaryAdminManager.php=8bedb5d82608974feedd1c094cac64fa
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/ClassBasedReportBuilder.php=fc77219539745bdb6364fc81bdda2516
/Users/Thilina/Projects/icehrm/src/Classes/BaseService.php=e0de0276b6a8b58a4e318848a45439b6
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/PayrollColumnTemplate.php=cb69bf4717cfbaf0f395b931296efd9a
/Users/Thilina/Projects/icehrm/src/Expenses/Admin/Api/ExpensesActionManager.php=2997346b4574ccd83e564c338e38b189
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/EmployeeTimeTrackReport.php=eddda882fae0c258e97fb50aafe21061
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/Nationality.php=0f0cd1d95496f95ac9de08aa15e6b6a4
/Users/Thilina/Projects/icehrm/src/Classes/ReportHandler.php=80b280cae34fdfbee864b05b07c6789a
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/ExpenseReport.php=7c8d187bc57175a92b8bc0fa33e501f0
/Users/Thilina/Projects/icehrm/src/Overtime/Admin/Api/OvertimeAdminManager.php=7ae7776e6445429a1f0158a5efd38c04
/Users/Thilina/Projects/icehrm/src/Salary/Common/Model/SalaryComponentType.php=d96878a0b1547f44731830526306ab56
/Users/Thilina/Projects/icehrm/src/Travel/Common/Model/EmployeeImmigration.php=1dcb690d0045699a1aa65eda033f9adf
/Users/Thilina/Projects/icehrm/src/Classes/MenuItemTemplate.php=7ad7eb3a874ec729ec1baf0760f0b4ed
/Users/Thilina/Projects/icehrm/src/Employees/Admin/Api/EmployeesAdminManager.php=15e983c78e17191ced1a7eec13be0d3e
/Users/Thilina/Projects/icehrm/src/Classes/Cron/CronUtils.php=b55a1fe1c4ed55dc582e208b341f52b4
/Users/Thilina/Projects/icehrm/src/Overtime/Common/Model/EmployeeOvertimeApproval.php=edd2eedebb9f62a44f0e588c615654ce
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/EmployeeSkill.php=a02c5ceda0489aba4ed47df010d4892e
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/EmployeeAttendanceReport.php=a20c94c986fa57c52daebbcbf4fa1f3f
/Users/Thilina/Projects/icehrm/src/Overtime/User/Api/OvertimeActionManager.php=f6d2c26500ed9e10b90bb5826d6c124e
/Users/Thilina/Projects/icehrm/src/Projects/Common/Model/Client.php=666b6d5ad575ddd9ccc198f5e98e1211
/Users/Thilina/Projects/icehrm/src/Dependents/User/Api/DependentsModulesManager.php=409b6ea72b6ce0319bb12df6458d2bef
/Users/Thilina/Projects/icehrm/src/Jobs/Common/Model/JobTitle.php=4765635589eb4cc84cec2e578faa1557
/Users/Thilina/Projects/icehrm/src/Model/Cron.php=4f3da95d8dd8e6b4642e6a2c6390c5fe
/Users/Thilina/Projects/icehrm/src/Projects/Admin/Api/ProjectsAdminManager.php=8f20c5277a8560a69318263166b804e3
/Users/Thilina/Projects/icehrm/src/Loans/Common/Model/CompanyLoan.php=6e1e409dd612f22b47c6ffdcda4fe3a0
/Users/Thilina/Projects/icehrm/src/Classes/Migration/MigrationManager.php=10ce5f1187ed06d2b12820a0d9d7e90a
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/ReportsAdminManager.php=be16482fcb8d6714f13618407acf25a5
/Users/Thilina/Projects/icehrm/src/Utils/CalendarTools.php=9f60bf1aaa928a02163680da60ac255c
/Users/Thilina/Projects/icehrm/src/Data/Admin/Api/DataAdminManager.php=3913dc1f43ae1965956c420d0d9084c8
/Users/Thilina/Projects/icehrm/src/TimeSheets/Common/Model/EmployeeTimeEntry.php=f69d37222ff6d528b5dde53fcbb5b3a8
/Users/Thilina/Projects/icehrm/src/Classes/UIManager.php=03b64742f6595dedce18bba1372d4b20
/Users/Thilina/Projects/icehrm/src/Classes/MemcacheService.php=e07916b1c628686162c19fa26aad93d5
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/EmployeeTimesheetReport.php=2ec16a7dccb131862f295ad97db9067b
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/Country.php=f772b574b2b1310977a50daf9d2a51ef
/Users/Thilina/Projects/icehrm/src/Model/Audit.php=31e7780e4e210a8c840188d2015d2e01
/Users/Thilina/Projects/icehrm/src/Classes/Approval/ApproveModuleActionManager.php=834a7aad3a07c194a0a830cc353daec9
/Users/Thilina/Projects/icehrm/src/Loans/Admin/Api/LoansAdminManager.php=0954d425f553598a6f3a9dbefc19fb45
/Users/Thilina/Projects/icehrm/src/Classes/SubActionManager.php=7523ec5017da87c8d7d3e4438310d96f
/Users/Thilina/Projects/icehrm/src/Model/ApproveModel.php=7f15abbdae78812f15d65e7a165f6115
/Users/Thilina/Projects/icehrm/src/Classes/CustomFieldManager.php=7259e4d11e73fdd04984097e00233203
/Users/Thilina/Projects/icehrm/src/Payroll/Admin/Api/PayrollActionManager.php=177d85ae36ed00f8a42d9bb9e8f9aa1a
/Users/Thilina/Projects/icehrm/src/Loans/User/Api/LoansModulesManager.php=4f0650c7b4ab3ec6c241bd32c680dfca
/Users/Thilina/Projects/icehrm/src/Utils/Math/EvalMathStack.php=4b86e2041c19d8ef8eaf7f4ea630e116
/Users/Thilina/Projects/icehrm/src/Users/Admin/Api/UsersAdminManager.php=695662b7186616d4379d0a588b5130e6
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/Language.php=c904c6e3e2e167f5e79afffabf94716a
/Users/Thilina/Projects/icehrm/src/Classes/Macaw.php=5a2f26ffcb41c9f42af776a91c283572
/Users/Thilina/Projects/icehrm/src/Attendance/Common/Model/AttendanceStatus.php=ad80af2d596e584a3ab60a5fce4aac09
/Users/Thilina/Projects/icehrm/src/Classes/Email/SMTPEmailSender.php=0df2a519ce3a2d61d486b9527782f72b
/Users/Thilina/Projects/icehrm/src/FieldNames/Admin/Api/FieldNamesAdminManager.php=5eca8c33ccd8d9fc1c4e5b7fa81ed93c
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/PayFrequency.php=9207a551d667bab9734aa041e02a1be1
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/CurrencyType.php=e9f5f17d4e18a706e4c4068f253c01ac
/Users/Thilina/Projects/icehrm/src/Employees/Common/Model/EmployeeApproval.php=481ddd171d66e644bb442ab02e97b097
/Users/Thilina/Projects/icehrm/src/Data/Admin/Api/DataImporter.php=ad94e2de98e11c1d3f0f0b32c46f358c
/Users/Thilina/Projects/icehrm/src/Expenses/Common/Model/EmployeeExpense.php=29d2dccb5d009d392c4b8f44c59fcdd8
/Users/Thilina/Projects/icehrm/test/TestTemplate.php=8e6ff185d587f339892a9a720e2bfa5f
/Users/Thilina/Projects/icehrm/src/Classes/Crypt/Aes.php=d0b15a04faf73b0ff35efc308d09b6e7
/Users/Thilina/Projects/icehrm/src/Classes/LanguageManager.php=8df5d6d62bae8a5e14ab1cd486325af3
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/Education.php=6f992ef2bb13951f3c52f5209d73733b
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/EmployeeLeavesReport.php=0bd5801ac4c9803db53198c68904d5f5
/Users/Thilina/Projects/icehrm/src/TimeSheets/Common/Model/EmployeeTimeSheet.php=2a4e685315485e4933df5d2ba856d8fb
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/ClientProjectTimeReport.php=f860b3cff536b5074bb7d1e193c1c41d
/Users/Thilina/Projects/icehrm/src/Expenses/User/Api/ExpensesActionManager.php=c8ce93f6877fd2cdbc963b5c38708f04
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/EmployeeAttendanceReport.php=600c1feca3eab6d724ac9661f2f514d5
/Users/Thilina/Projects/icehrm/src/Utils/Math/EvalMath.php=476cb2ee5306966d7cd7bee2f3202559
/Users/Thilina/Projects/icehrm/src/Model/Migration.php=3f11c6dfaa18d4a6dcb2caa8d3677121
/Users/Thilina/Projects/icehrm/src/Data/Common/Model/DataImportFile.php=a0b3f8410e80862ba79aa9d8fed383d7
/Users/Thilina/Projects/icehrm/src/Travel/User/Api/TravelActionManager.php=e6241358886dc00138506f3bc4d13346
/Users/Thilina/Projects/icehrm/src/Company/Common/Model/CompanyStructure.php=a1957202858bc093b29e8dfe48955cc6
/Users/Thilina/Projects/icehrm/src/Classes/Migration/AbstractMigration.php=324fe15e15a0ca2b0f50f4029ae10548
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/EmployeeCertification.php=96045388cba569f4ea9617dc8fbeded6
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/PayslipTemplate.php=cc9bf7552cfccd84a0b9b1431f224f1f
/Users/Thilina/Projects/icehrm/test/test.includes.php=d87bcd9386b3271b62818e2b86df6c28
/Users/Thilina/Projects/icehrm/src/Company/Admin/Api/CompanyAdminManager.php=484a8b669d5fed117f1f40f289f2c6f4
/Users/Thilina/Projects/icehrm/src/Classes/Email/PHPMailer.php=54789d10177cc5075cb4d50838b05821
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/EmployeeEducation.php=8ba4cbc034b5ee23d593cc3352cf46a9
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Reports/TerminatedEmployeeReport.php=1b8b58d6e85eb77e45aaf44f426025ea
/Users/Thilina/Projects/icehrm/src/Users/Admin/Api/UsersEmailSender.php=87247955c331115e482aa3e577eca0b4
/Users/Thilina/Projects/icehrm/src/Classes/IceConstants.php=5f7497997d12c27dab080b6f34640df1
/Users/Thilina/Projects/icehrm/test/test.config.php=2d82ac9b697f10bb9bd6d760f63d2be4
/Users/Thilina/Projects/icehrm/src/Travel/Common/Model/ImmigrationDocument.php=c0636d2ce3e7d89d9e4ebb00c8d1450f
/Users/Thilina/Projects/icehrm/src/Classes/ModuleBuilder/ModuleBuilder.php=29fed2a27587032060efc02c7a30a838
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/PayslipReport.php=a7197be66726cf126c196bf6beccb907
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/EmployeeTimeTrackReport.php=ce6f2b098845233342c336f837001554
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/PDFReportBuilderInterface.php=cc049c4c1b86e5a5e4fd99ddf24e563d
/Users/Thilina/Projects/icehrm/src/Qualifications/User/Api/QualificationsModulesManager.php=e668d64139ecc146af9ebaea2f91e1fe
/Users/Thilina/Projects/icehrm/src/Classes/RestEndPoint.php=86136262a2e2a8f45564d17123dd5812
/Users/Thilina/Projects/icehrm/src/Classes/S3FileSystem.php=6308aca72380cef1981625946b59652f
/Users/Thilina/Projects/icehrm/src/Classes/Cron/Task/EmailIceTask.php=b754a286061db310b3f18677946d7b43
/Users/Thilina/Projects/icehrm/src/Data/Admin/Import/EmployeeDataImporter.php=d1b66e2d042335df792fa8913d363d5f
/Users/Thilina/Projects/icehrm/src/Projects/Common/Model/EmployeeProject.php=b0de956de8ec4c423604195b96f57df9
/Users/Thilina/Projects/icehrm/src/Model/Report.php=498c96015d1be2b31d8cd0bcedea7fab
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/CustomFieldValue.php=a9b7d8db9ee113345298ba49f9354be8
/Users/Thilina/Projects/icehrm/src/Classes/Cron/IceCron.php=edb023962095493d7daa728793ceaf9c
/Users/Thilina/Projects/icehrm/src/Settings/Admin/Api/SettingsInitialize.php=148bc391f5d101121f915a590f991a6b
/Users/Thilina/Projects/icehrm/src/Dashboard/Admin/Api/DashboardActionManager.php=5e8e996f9f4b77f1fbd10e026a5d1351
/Users/Thilina/Projects/icehrm/src/Payroll/Admin/Api/PayrollAdminManager.php=9bac9a6ed8406c9eb6fe7ef666aee482
/Users/Thilina/Projects/icehrm/src/Jobs/Admin/Api/JobsAdminManager.php=12546328edffcc5bda7e84f6a8c56d9e
/Users/Thilina/Projects/icehrm/src/Jobs/Common/Model/PayGrade.php=55f2f83ff22136154b14460b6b37632a
/Users/Thilina/Projects/icehrm/src/EmergencyContacts/Common/Model/EmergencyContact.php=6ec07210d94e695732c6d1a6a0fb34be
/Users/Thilina/Projects/icehrm/src/Employees/Admin/Api/EmployeesActionManager.php=63c6ccf63f54eab8556c893cf47f983c
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/CalculationHook.php=bbfa6f83e4042db9640b67c131274118
/Users/Thilina/Projects/icehrm/src/Users/Common/Model/User.php=cc9b6c966b40678574fdd35bb1f16cb2
/Users/Thilina/Projects/icehrm/src/Users/Admin/Api/UsersActionManager.php=b65c97c665190f9fb011cc8d0b97888c
/Users/Thilina/Projects/icehrm/src/Attendance/User/Api/AttendanceModulesManager.php=f1b34fae71cc963e197b41ed2ca032ca
/Users/Thilina/Projects/icehrm/src/Classes/IceResponse.php=bb74495c33fab87e96f72b610cfd5374
/Users/Thilina/Projects/icehrm/src/Qualifications/Common/Model/Certification.php=e81a7f90a10799d97a918e2cb071c1a9
/Users/Thilina/Projects/icehrm/src/Model/BaseModel.php=d932a9bb126c174000b9c51a8cb4d2f6
/Users/Thilina/Projects/icehrm/src/Model/StatusChangeLog.php=0745140bddda3f06915dcfcc6ac97ce8
/Users/Thilina/Projects/icehrm/src/Classes/AbstractInitialize.php=841a38244ca1d44b008f67a6b45df348
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/EmployeeTimeSheetData.php=2d6e95947963949b1c5150269d7527f7
/Users/Thilina/Projects/icehrm/src/Data/Admin/Api/DataActionManager.php=82f3ced08b946ca6e10a83c6e07475db
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/OvertimeReport.php=431965980b2458019398d2ed6d7fc39a
/Users/Thilina/Projects/icehrm/src/Metadata/Common/Model/Ethnicity.php=5f5935cdeab1b41ac0d2db9f6973f6b0
/Users/Thilina/Projects/icehrm/test/integration/MigrationManagerIntegration.php=f0f5bccf120067b34396f1e61fd6d20a
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/CSVReportBuilderInterface.php=6ada9a15e850c09162fc75020d6b00e4
/Users/Thilina/Projects/icehrm/src/Payroll/Common/Model/PayrollCalculations.php=70d1b733b1adbb6c6a2ea0dcec89efca
/Users/Thilina/Projects/icehrm/src/Travel/Admin/Api/TravelAdminManager.php=9b3c6e369e2264d2bc9fca122e8ed90c
/Users/Thilina/Projects/icehrm/src/Model/ReportFile.php=0a766e94902b5473ef1fa24583cf2481
/Users/Thilina/Projects/icehrm/src/Modules/Admin/Api/ModulesActionManager.php=c4d592d8930201a883a5d1ea71a037af
/Users/Thilina/Projects/icehrm/src/Model/IceEmail.php=02bd3cd01cb37ab05d763e468cba3835
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/ReportBuilderInterface.php=dd7e723c48ec4f97db98ffec0d0f39cb
/Users/Thilina/Projects/icehrm/src/TimeSheets/User/Api/TimeSheetsModulesManager.php=63a8c4364cd579be46b60a2e83f8f87f
/Users/Thilina/Projects/icehrm/src/Employees/Common/Model/ArchivedEmployee.php=6056e5073538c0d7a22dea52b6c25374
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/ReportBuilder.php=9b0e8e996157caebcf17a2a342ba0f6e
/Users/Thilina/Projects/icehrm/src/Users/Common/Model/UserRole.php=8d7dbcdf68c2c5a7a4d4f73dbb07d63b
/Users/Thilina/Projects/icehrm/src/Salary/Common/Model/PayFrequency.php=fab16310b7db7bb9aace5a6b038c9d2a
/Users/Thilina/Projects/icehrm/src/Model/Notification.php=0b06b249e456508d5a8ce06b453efe6b
/Users/Thilina/Projects/icehrm/src/Attendance/Admin/Api/AttendanceDashboardManager.php=c08fc7c021dd0c0780851c308225291f
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/TravelRequestReport.php=810d405042307fe9c6ca82e082c3673e
/Users/Thilina/Projects/icehrm/src/Attendance/Common/Model/Attendance.php=aa0945e6fc70e6e3418d0e09f7110082
/Users/Thilina/Projects/icehrm/src/Employees/Common/Model/EmploymentStatus.php=11365db49528f08847e0dfbf1b31472d
/Users/Thilina/Projects/icehrm/src/Attendance/Admin/Api/AttendanceAdminManager.php=21e4a22a3eb290704181e5a4a7a5df7a
/Users/Thilina/Projects/icehrm/src/Classes/HistoryManager.php=4741dd856bb81ec2e27bd016afb8e042
/Users/Thilina/Projects/icehrm/src/Dashboard/Admin/Api/DashboardAdminManager.php=800b72969de1b8c311a8e1b7d2940c79
/Users/Thilina/Projects/icehrm/src/Overtime/User/Api/OvertimeModulesManager.php=b29d52a4e3f021cdd786f41cbf1b9837
/Users/Thilina/Projects/icehrm/src/Reports/User/Reports/OvertimeSummaryReport.php=3918d7210957040977b8a43c580abae0
/Users/Thilina/Projects/icehrm/src/Classes/ModuleBuilder/ModuleTab.php=89136363d7520967c2d42e175052f4d5
/Users/Thilina/Projects/icehrm/src/Reports/Admin/Api/CSVReportBuilder.php=5c5f7175cc2aff776388c3281cea9cf3
/Users/Thilina/Projects/icehrm/src/Model/Setting.php=5b9440e9211662f5ed69f29794b6054d
/Users/Thilina/Projects/icehrm/src/FieldNames/Common/Model/CustomField.php=88578da07f1f07bae868e17b4a8e4cf7
/Users/Thilina/Projects/icehrm/src/Attendance/User/Api/AttendanceActionManager.php=feaa97dd192e7faec2045aba7dc03125
/Users/Thilina/Projects/icehrm/src/Overtime/Common/Model/OvertimeCategory.php=e9c90b23155e3fe1c7d9dd9cef462d1e
/Users/Thilina/Projects/icehrm/src/Attendance/Common/Calculations/CaliforniaOvertimeCalculator.php=a1a5ff46939030747f505710fbd49ffd

View File

@@ -1,13 +0,0 @@
<?php
\Classes\UIManager::getInstance()->setCurrentUser($user);
\Classes\UIManager::getInstance()->setProfiles($profileCurrent, $profileSwitched);
\Classes\UIManager::getInstance()->setHomeLink($homeLink);
$moduleManagers = \Classes\BaseService::getInstance()->getModuleManagers();
foreach($moduleManagers as $moduleManagerObj){
$allowed = \Classes\BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj);
if($allowed){
$moduleManagerObj->initQuickAccessMenu();
}
}

View File

@@ -0,0 +1,125 @@
<?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';
$invoices = [];
$numOfUnpaidInvoices = 0;
if (class_exists('\\Billing\\Admin\\Api\\BillingActionManager')) {
$billingActionManager = new \Billing\Admin\Api\BillingActionManager();
$invoices = $billingActionManager->getInvoices(null)->getData();
if(!empty($invoices)){
$invoices = json_decode(json_encode($invoices));
}
foreach($invoices as $inv){
if($inv->status == "Sent"){
$numOfUnpaidInvoices++;
}
}
}
?><div class="span9">
<div class="row">
<?php if($numOfUnpaidInvoices == 1){?>
<div class="callout callout-warning lead" style="font-size: 14px;">
<h4>You have a pending invoice</h4>
<p style="font-weight: bold;">
You have a pending invoice. Please make you complete the payment so we can provide a better service.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System#tabInvoice" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Make a Payment</a>
</p>
</div>
<?php }else if($numOfUnpaidInvoices > 1){?>
<div class="callout callout-danger lead" style="font-size: 14px;">
<h4>You have <?=$numOfUnpaidInvoices?> pending invoices</h4>
<p style="font-weight: bold;">
You have <?=$numOfUnpaidInvoices?> pending invoice. None of your employees are currently allowed to login. Please make sure you complete payments to all the invoices to restore your service.
Please logout and login after completing the payment to get your service restored.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System#tabInvoice" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Make a Payment</a>
</p>
</div>
<?php }?>
<?php if(\Utils\SessionUtils::getSessionObject('account_locked') == "1"){?>
<div class="callout callout-danger lead" style="font-size: 14px;">
<h4>Your Trial Has Expired</h4>
<p style="font-weight: bold;">
Your Icehrm Trial has expired. Please upgrade subscription to continue. If not upgraded your account will be deleted with in few days.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Upgrade Subscription</a>
</p>
</div>
<?php }?>
<?php
$moduleManagers = \Classes\BaseService::getInstance()->getModuleManagers();
$dashBoardList = array();
foreach($moduleManagers as $moduleManagerObj){
//Check if this is not an admin module
if($moduleManagerObj->getModuleType() != 'admin'){
continue;
}
$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'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -0,0 +1,253 @@
<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>&nbsp;&nbsp;
<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.edit(_id_);" style="margin-right:10px;"><i class="fa fa-edit"></i> <t>Edit Info</t></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> <t>Upload Profile Image</t></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> <t>Delete Profile Image</t></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>
<ul class="nav nav-tabs" id="subModTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabBasic" href="#tabPageBasic"><t>Basic Information</t></a></li>
<li class=""><a id="tabQualifications" href="#tabPageQualifications"><t>Qualifications</t></a></li>
<li class=""><a id="tabFamily" href="#tabPageFamily"><t>Family</t></a></li>
<li class=""><a id="tabDocuments" href="#tabPageDocuments"><t>Documents</t></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane sub-tab active" id="tabPageBasic">
<div class="row" style="margin-left:10px;margin-top:20px;">
<div class="panel panel-default" style="width:97.5%;">
<div class="panel-heading"><h4><t>Personal Information</t></h4></div>
<div class="panel-body" id="cont_personal_information">
<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 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 class="row" style="margin-left:10px;margin-top:20px;">
<div class="panel panel-default" style="width:97.5%;">
<div class="panel-heading"><h4><t>Contact Information</t></h4></div>
<div class="panel-body" id="cont_contact_information">
<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 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 class="row" style="margin-left:10px;margin-top:20px;">
<div class="panel panel-default" style="width:97.5%;">
<div class="panel-heading"><h4><t>Job Details</t></h4></div>
<div class="panel-body" id="cont_job_details">
<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;">#_label_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 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 id="customFieldsCont">
</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;"><t>Change Password</t></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"><t>New Password</t></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"><t>Confirm Password</t></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();"><t>Change Password</t></button>
<button class="btn" onclick="modJs.closeChangePassword();"><t>Not Now</t></button>
</div>
</div>
</div>
</div>
</div><!-- End tabPageBasic -->
<div class="tab-pane sub-tab" id="tabPageQualifications">
<div class="row" style="margin-top:20px;">
<div class="col-md-3 sub-column">
<div id="EmployeeSkillSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3 sub-column">
<div id="EmployeeEducationSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3 sub-column">
<div id="EmployeeCertificationSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3 sub-column">
<div id="EmployeeLanguageSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div><!-- End tabPageQualifications -->
</div>
<div class="tab-pane sub-tab" id="tabPageFamily">
<div class="row" style="margin-top:20px;">
<div class="col-md-6 sub-column">
<div id="EmployeeEmergencyContactSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-6 sub-column">
<div id="EmployeeDependentSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div>
</div>
<div class="tab-pane sub-tab" id="tabPageDocuments">
<div class="row" style="margin-top:20px;">
<div class="col-md-12">
<div id="EmployeeDocumentSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div><!-- End tabPageQualifications -->
</div>
</div><!-- End tab-content -->

View File

@@ -0,0 +1,204 @@
<?php
$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");
?><div class="span9">
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<?php if($user->user_level != "Admin"){
?>
<li class="active"><a id="tabEmployee" href="#tabPageEmployee"><?=t('Employees (Direct Reports)')?></a></li>
<?php }else{ ?>
<li class="active"><a id="tabEmployee" href="#tabPageEmployee"><?=t('Employees')?></a></li>
<?php }?>
<?php if ($user->user_level == "Admin") { ?>
<li><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>
<li><a id="tabEmployeeDependent" href="#tabPageEmployeeDependent"><?=t('Dependents')?></a></li>
<li><a id="tabEmergencyContact" href="#tabPageEmergencyContact"><?=t('Emergency Contacts')?></a></li>
<?php if (class_exists('\\Documents\\Admin\\Api\\DocumentsAdminManager')) {?>
<li><a id="tabEmployeeDocument" href="#tabPageEmployeeDocument"><?=t('Documents')?></a></li>
<?php } ?>
<?php }?>
<?php if ($user->user_level == "Admin"){ ?>
<li class="dropdown">
<a href="#" id="terminatedEmployeeMenu" class="dropdown-toggle" data-toggle="dropdown" aria-controls="terminatedEmployeeMenu-contents"><?=t('Deactivated Employees')?> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="terminatedEmployeeMenu" id="terminatedEmployeeMenu-contents">
<li><a id="tabTerminatedEmployee" href="#tabPageTerminatedEmployee"><?=t('Temporarily Deactivated Employees')?></a></li>
<li><a id="tabArchivedEmployee" href="#tabPageArchivedEmployee"><?=t('Terminated Employee Data')?></a></li>
</ul>
</li>
<?php } ?>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageEmployee">
<div id="Employee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" 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 class="tab-pane" 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 class="tab-pane" 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 class="tab-pane" id="tabPageArchivedEmployee">
<div id="ArchivedEmployee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="ArchivedEmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageTerminatedEmployee">
<div id="TerminatedEmployee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="TerminatedEmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<?php if (class_exists('\\Documents\\Admin\\Api\\DocumentsAdminManager')) {?>
<div class="tab-pane" id="tabPageEmployeeDocument">
<div id="EmployeeDocument" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeDocumentForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<?php } ?>
</div>
</div>
<script>
var modJsList = new Array();
<?php if($user->user_level != "Admin"){ ?>
modJsList['tabEmployee'] = new EmployeeAdapter('Employee','Employee',{"status":"Active"});
modJsList['tabEmployee'].setShowAddNew(false);
modJsList['tabEmployee'].setShowDelete(false);
<?php }else{ ?>
modJsList['tabEmployee'] = new EmployeeAdapter('Employee','Employee',{"status":"Active"});
<?php } ?>
modJsList['tabEmployee'].setRemoteTable(true);
modJsList['tabEmployee'].setFieldNameMap(<?=json_encode($fieldNameMap)?>);
modJsList['tabEmployee'].setCustomFields(<?=json_encode($customFields)?>);
modJsList['tabEmployeeSkill'] = new EmployeeSkillAdapter('EmployeeSkill');
modJsList['tabEmployeeSkill'].setRemoteTable(true);
modJsList['tabEmployeeEducation'] = new EmployeeEducationAdapter('EmployeeEducation');
modJsList['tabEmployeeEducation'].setRemoteTable(true);
modJsList['tabEmployeeCertification'] = new EmployeeCertificationAdapter('EmployeeCertification');
modJsList['tabEmployeeCertification'].setRemoteTable(true);
modJsList['tabEmployeeLanguage'] = new EmployeeLanguageAdapter('EmployeeLanguage');
modJsList['tabEmployeeLanguage'].setRemoteTable(true);
modJsList['tabEmployeeDependent'] = new EmployeeDependentAdapter('EmployeeDependent');
modJsList['tabEmployeeDependent'].setRemoteTable(true);
modJsList['tabEmergencyContact'] = new EmergencyContactAdapter('EmergencyContact');
modJsList['tabEmergencyContact'].setRemoteTable(true);
modJsList['tabEmployeeImmigration'] = new EmployeeImmigrationAdapter('EmployeeImmigration');
modJsList['tabEmployeeImmigration'].setRemoteTable(true);
modJsList['tabArchivedEmployee'] = new ArchivedEmployeeAdapter('ArchivedEmployee');
modJsList['tabArchivedEmployee'].setRemoteTable(true);
modJsList['tabArchivedEmployee'].setShowAddNew(false);
modJsList['tabTerminatedEmployee'] = new TerminatedEmployeeAdapter('Employee','TerminatedEmployee',{"status":"Terminated"});
modJsList['tabTerminatedEmployee'].setRemoteTable(true);
modJsList['tabTerminatedEmployee'].setShowAddNew(false);
<?php if (class_exists('\\Documents\\Admin\\Api\\DocumentsAdminManager')) {?>
modJsList['tabEmployeeDocument'] = new EmployeeDocumentAdapter('EmployeeDocument','EmployeeDocument');
modJsList['tabTerminatedEmployee'].setRemoteTable(true);
<?php } ?>
var modJs = modJsList['tabEmployee'];
</script>
<div class="modal" id="createUserModel" 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;"><?=t('Employee Saved Successfully')?></h3>
</div>
<div class="modal-body">
<?=t('Employee needs a User to login to IceHrm. Do you want to create a user for this employee now?')?> <br/><br/><?=t('You can do this later through Users module if required.')?>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="modJs.createUser();">Yes</button>
<button class="btn" onclick="modJs.closeCreateUser();">No</button>
</div>
</div>
</div>
</div>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -0,0 +1,12 @@
{
"label": "Employee Custom Fields",
"menu": "Admin",
"order": "83",
"icon": "fa-sliders",
"user_levels": [
"Admin"
],
"permissions": [],
"model_namespace": "\\FieldNames\\Common\\Model",
"manager": "\\FieldNames\\Admin\\Api\\FieldNamesAdminManager"
}

View File

@@ -0,0 +1,12 @@
{
"label": "Company Loans",
"menu": "Admin",
"order": "89",
"icon": "fa-shield",
"user_levels": [
"Admin"
],
"permissions": [],
"model_namespace": "\\Loans\\Common\\Model",
"manager": "\\Loans\\Admin\\Api\\LoansAdminManager"
}

View File

@@ -0,0 +1,14 @@
{
"label": "Overtime Administration",
"menu": "Admin",
"order": "82",
"icon": "fa-align-center",
"user_levels": [
"Admin",
"Manager"
],
"dashboardPosition": 13,
"permissions": [],
"model_namespace": "\\Overtime\\Common\\Model",
"manager": "\\Overtime\\Admin\\Api\\OvertimeAdminManager"
}

View File

@@ -0,0 +1,74 @@
<?php
/*
This file is part of iCE Hrm.
iCE Hrm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
iCE Hrm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'travel';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$customFields = \Classes\BaseService::getInstance()->getCustomFields("EmployeeTravelRecord");
$travelRequestOptions = [];
$travelRequestOptions['setRemoteTable'] = 'true';
$travelRequestOptions['setCustomFields'] = json_encode($customFields);
$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'EmployeeTravelRecord',
'EmployeeTravelRecord',
'Travel Requests',
'EmployeeTravelRecordAdminAdapter',
'',
'',
true,
$travelRequestOptions
));
if ($user->user_level === 'Admin') {
$travelCustomFieldOptions = [];
$travelCustomFieldOptions['setRemoteTable'] = 'true';
$travelCustomFieldOptions['setTableType'] = '\'EmployeeTravelRecord\'';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'TravelCustomField',
'CustomField',
'Custom Fields',
'CustomFieldAdapter',
'{"type":"EmployeeTravelRecord"}',
'',
false,
$travelCustomFieldOptions
));
}
echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
$itemName = 'TravelRequest';
$moduleName = 'Travel Management';
$itemNameLower = strtolower($itemName);
include APP_BASE_PATH.'footer.php';

View File

@@ -0,0 +1,14 @@
{
"label": "Travel Requests",
"menu": "Employees",
"order": "6",
"icon": "fa-plane",
"user_levels": [
"Admin",
"Manager"
],
"dashboardPosition": 12,
"permissions": [],
"model_namespace": "\\Travel\\Common\\Model",
"manager": "\\Travel\\Admin\\Api\\TravelAdminManager"
}

View File

@@ -0,0 +1,66 @@
<?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 = 'users';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$csrf = \Classes\BaseService::getInstance()->generateCsrf('User');
?><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="tabUser" href="#tabPageUser"><?=t('Users')?></a></li>
<li class=""><a id="tabUserRole" href="#tabPageUserRole"><?=t('User Roles')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageUser">
<div id="User" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="UserForm" class="reviewBlock" data-content="Form" data-csrf="<?=$csrf?>" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageUserRole">
<div id="UserRole" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="UserRoleForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabUser'] = new UserAdapter('User');
modJsList['tabUser'].setCSRFRequired(true);
<?php if(isset($_GET['action']) && $_GET['action'] == "new" && isset($_GET['object'])){?>
modJsList['tabUser'].newInitObject = JSON.parse(Base64.decode('<?=$_GET['object']?>'));
<?php }?>
modJsList['tabUserRole'] = new UserRoleAdapter('UserRole');
var modJs = modJsList['tabUser'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -13,10 +13,10 @@ if(!defined('HOME_LINK_OTHERS')){
}
//Version
define('VERSION', '21.0.0.PRO');
define('CACHE_VALUE', '21.0.0.OS');
define('VERSION_NUMBER', '2100');
define('VERSION_DATE', '02/02/2018');
define('VERSION', '24.0.0.OS');
define('CACHE_VALUE', '24.0.0.OS');
define('VERSION_NUMBER', '2400');
define('VERSION_DATE', '26/06/2018');
if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');}
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');}

View File

@@ -0,0 +1,19 @@
<?php
\Classes\UIManager::getInstance()->setCurrentUser($user);
\Classes\UIManager::getInstance()->setProfiles($profileCurrent, $profileSwitched);
\Classes\UIManager::getInstance()->setHomeLink($homeLink);
$moduleManagers = \Classes\BaseService::getInstance()->getModuleManagers();
foreach($moduleManagers as $moduleManagerObj){
$allowed = \Classes\BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj);
if($allowed){
$moduleManagerObj->initQuickAccessMenu();
}
}
$supportedLanguage = new \Metadata\Common\Model\SupportedLanguage();
$supportedLanguages = $supportedLanguage->Find("1 = 1", []);
foreach ($supportedLanguages as $supportedLanguage) {
\Classes\UIManager::getInstance()->addLanguageMenuItem($supportedLanguage->name);
}

21
core/crons/cron.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
include dirname(__FILE__).'/include.cron.php';
$cron = new \Model\Cron();
$crons = $cron->Find("status = ?",array('Enabled'));
if(!$crons){
\Utils\LogManager::getInstance()->info(CLIENT_NAME." error :".$cron->ErrorMsg());
}
\Utils\LogManager::getInstance()->info(CLIENT_NAME." cron count :".count($crons));
foreach($crons as $cron){
$count++;
$iceCron = new \Classes\Cron\IceCron($cron);
\Utils\LogManager::getInstance()->info(CLIENT_NAME." check cron :".$cron->name);
if($iceCron->isRunNow()){
\Utils\LogManager::getInstance()->info(CLIENT_NAME." execute cron :".$cron->name);
$iceCron->execute();
}
}

224
core/data.php Normal file
View File

@@ -0,0 +1,224 @@
<?php
define('CLIENT_PATH', dirname(__FILE__));
include("config.base.php");
include("include.common.php");
$modulePath = \Utils\SessionUtils::getSessionObject("modulePath");
if (!defined('MODULE_PATH')) {
define('MODULE_PATH', $modulePath);
}
include("server.includes.inc.php");
if (empty($user)) {
$ret['status'] = "ERROR";
echo json_encode($ret);
exit();
}
$_REQUEST['sm'] = \Classes\BaseService::getInstance()->fixJSON($_REQUEST['sm']);
$_REQUEST['cl'] = \Classes\BaseService::getInstance()->fixJSON($_REQUEST['cl']);
$_REQUEST['ft'] = \Classes\BaseService::getInstance()->fixJSON($_REQUEST['ft']);
$columns = json_decode($_REQUEST['cl'], true);
$columns[] = "id";
$table = $_REQUEST['t'];
$nsTable = \Classes\BaseService::getInstance()->getFullQualifiedModelClassName($table);
$obj = new $nsTable();
$sLimit = "";
if (!isset($_REQUEST['objects'])) {
if (isset($_REQUEST['iDisplayStart']) && $_REQUEST['iDisplayLength'] != '-1') {
$sLimit = " LIMIT " . intval($_REQUEST['iDisplayStart']) . ", " . intval($_REQUEST['iDisplayLength']);
}
} else {
if (isset($_REQUEST['iDisplayStart']) && $_REQUEST['iDisplayLength'] != '-1') {
$sLimit = " LIMIT " . intval($_REQUEST['iDisplayStart']) . ", " . (intval($_REQUEST['iDisplayLength'])+1);
}
}
$isSubOrdinates = false;
if (isset($_REQUEST['type']) && $_REQUEST['type'] = "sub") {
$isSubOrdinates = true;
}
$skipProfileRestriction = false;
if (isset($_REQUEST['skip']) && $_REQUEST['type'] = "1") {
$skipProfileRestriction = true;
}
$sortData = \Classes\BaseService::getInstance()->getSortingData($_REQUEST);
$data = \Classes\BaseService::getInstance()->getData(
$_REQUEST['t'],
$_REQUEST['sm'],
$_REQUEST['ft'],
$_REQUEST['ob'],
$sLimit,
$_REQUEST['cl'],
$_REQUEST['sSearch'],
$isSubOrdinates,
$skipProfileRestriction,
$sortData
);
//Get Total row count
$totalRows = 0;
if (!isset($_REQUEST['objects'])) {
$countFilterQuery = "";
$countFilterQueryData = array();
if (!empty($_REQUEST['ft'])) {
$filter = json_decode($_REQUEST['ft']);
if (!empty($filter)) {
\Utils\LogManager::getInstance()->debug("Filter:" . print_r($filter, true));
if (method_exists($obj, 'getCustomFilterQuery')) {
$response = $obj->getCustomFilterQuery($filter);
$countFilterQuery = $response[0];
$countFilterQueryData = $response[1];
} else {
$defaultFilterResp = \Classes\BaseService::getInstance()->buildDefaultFilterQuery($filter);
$countFilterQuery = $defaultFilterResp[0];
$countFilterQueryData = $defaultFilterResp[1];
}
}
}
if (in_array($table, \Classes\BaseService::getInstance()->userTables)
&& !$skipProfileRestriction && !$isSubOrdinates) {
$cemp = \Classes\BaseService::getInstance()->getCurrentProfileId();
$sql = "Select count(id) as count from "
. $obj->_table . " where " . SIGN_IN_ELEMENT_MAPPING_FIELD_NAME . " = ? " . $countFilterQuery;
array_unshift($countFilterQueryData, $cemp);
$rowCount = $obj->DB()->Execute($sql, $countFilterQueryData);
} else {
if ($isSubOrdinates) {
$cemp = \Classes\BaseService::getInstance()->getCurrentProfileId();
$profileClass = \Classes\BaseService::getInstance()->getFullQualifiedModelClassName(
ucfirst(SIGN_IN_ELEMENT_MAPPING_FIELD_NAME)
);
$subordinate = new $profileClass();
$subordinates = $subordinate->Find("supervisor = ?", array($cemp));
$cempObj = new \Employees\Common\Model\Employee();
$cempObj->Load("id = ?", array($cemp));
if ($obj->getUserOnlyMeAccessField() == 'id'
&& \Classes\SettingsManager::getInstance()->getSetting(
'System: Company Structure Managers Enabled'
) == 1
&& \Company\Common\Model\CompanyStructure::isHeadOfCompanyStructure($cempObj->department, $cemp)
) {
if (empty($subordinates)) {
$subordinates = array();
}
$childCompaniesIds = array();
if (\Classes\SettingsManager::getInstance()->getSetting(
'System: Child Company Structure Managers Enabled'
) == '1'
) {
$childCompaniesResp = \Company\Common\Model\CompanyStructure::getAllChildCompanyStructures(
$cempObj->department
);
$childCompanies = $childCompaniesResp->getObject();
foreach ($childCompanies as $cc) {
$childCompaniesIds[] = $cc->id;
}
} else {
$childCompaniesIds[] = $cempObj->department;
}
if (!empty($childCompaniesIds)) {
$childStructureSubordinates = $subordinate->Find(
"department in (" . implode(',', $childCompaniesIds) . ") and id != ?",
array($cemp)
);
$subordinates = array_merge($subordinates, $childStructureSubordinates);
}
}
$subordinatesIds = "";
foreach ($subordinates as $sub) {
if ($subordinatesIds != "") {
$subordinatesIds .= ",";
}
$subordinatesIds .= $sub->id;
}
if ($obj->allowIndirectMapping()) {
$indeirectEmployees = $subordinate->Find(
"indirect_supervisors IS NOT NULL and indirect_supervisors <> '' and status = 'Active'",
array()
);
foreach ($indeirectEmployees as $ie) {
$indirectSupervisors = json_decode($ie->indirect_supervisors, true);
if (in_array($cemp, $indirectSupervisors)) {
if ($subordinatesIds != "") {
$subordinatesIds .= ",";
}
$subordinatesIds .= $ie->id;
}
}
}
$sql = "Select count(id) as count from " . $obj->_table .
" where " . $obj->getUserOnlyMeAccessField() . " in (" . $subordinatesIds . ") "
. $countFilterQuery;
$rowCount = $obj->DB()->Execute($sql, $countFilterQueryData);
} else {
$sql = "Select count(id) as count from " . $obj->_table;
if (!empty($countFilterQuery)) {
$sql .= " where 1=1 " . $countFilterQuery;
}
$rowCount = $obj->DB()->Execute($sql, $countFilterQueryData);
}
}
}
if (isset($rowCount) && !empty($rowCount)) {
foreach ($rowCount as $cnt) {
$totalRows = $cnt['count'];
}
} else {
$totalRows = 0;
}
/*
* Output
*/
if (!isset($_REQUEST['objects'])) {
$output = array(
"sEcho" => intval($_REQUEST['sEcho']),
"iTotalRecords" => $totalRows,
"iTotalDisplayRecords" => $totalRows,
"aaData" => array()
);
foreach ($data as $item) {
$row = array();
$colCount = count($columns);
for ($i = 0; $i < $colCount; $i++) {
$row[] = $item->{$columns[$i]};
}
$row["_org"] = \Classes\BaseService::getInstance()->cleanUpAdoDB($item);
$output['aaData'][] = $row;
}
try {
echo \Classes\BaseService::getInstance()->safeJsonEncode($output);
} catch (Exception $e) {
\Utils\LogManager::getInstance()->error($e->getMessage());
echo json_encode(['status' => 'Error']);
}
} else {
$output = array();
foreach ($data as $item) {
unset($item->keysToIgnore);
$output[] = \Classes\BaseService::getInstance()->cleanUpAdoDB($item);
}
try {
echo \Classes\BaseService::getInstance()->safeJsonEncode($output);
} catch (Exception $e) {
\Utils\LogManager::getInstance()->error($e->getMessage());
echo json_encode(['status' => 'Error']);
}
}

Some files were not shown because too many files have changed in this diff Show More