Compare commits

..

40 Commits

Author SHA1 Message Date
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
gamonoid
cf3ce34537 Merge branch 'dev' 2018-02-03 04:44:03 +01:00
gamonoid
f783163a78 Applying improvements selected from IcehrmPro for release v21.0.0 2018-02-03 04:42:17 +01:00
Thilina Hasantha
e7792e7d79 Add pear modules, mail and net_smtp via composer (#93)
Add pear modules, mail and net_smtp via composer, remove php 5.6 build due to phpunit 6
2018-01-08 23:13:43 +01:00
Thilina Hasantha
9dbe0861cb Merge pull request #85 from gamonoid/dev
RC v20.3.0
2017-11-26 21:45:16 +01:00
gamonoid
359e3f8382 Update release notes 2017-11-26 21:40:14 +01:00
gamonoid
cf010ceb0f Change approver filed empty label to None 2017-11-26 21:01:31 +01:00
gamonoid
4a07ca07e8 Remove table and form option from employee custom fields 2017-11-26 20:56:12 +01:00
gamonoid
1ddf6ffbb6 Fix issue: custom fields not getting saved in mysql v5.7 2017-11-26 20:48:38 +01:00
gamonoid
6e74832798 Fix php list syntax issue 2017-11-26 20:16:45 +01:00
gamonoid
af5569dc32 Remove delete function from employee filed names, remove default custom fields 2017-11-26 20:02:13 +01:00
gamonoid
a6d2abcb45 Adding edit button to employee list 2017-11-26 19:44:41 +01:00
gamonoid
22f75d6e51 Fix issue: special chars in db password 2017-11-26 19:28:12 +01:00
gamonoid
83181beb23 Adding swift mailer 2017-11-26 18:20:25 +01:00
gamonoid
7330194eb3 Payroll hooks for timesheet 2017-11-25 20:19:18 +01:00
gamonoid
732a2d7aa3 Attendance and Employee API 2017-11-25 20:16:06 +01:00
gamonoid
17f9d23e31 Remove unwanted logs 2017-10-31 07:48:13 +01:00
gamonoid
452cda0b50 Fix LDAP login, sso user issue 2017-10-11 00:40:02 +02:00
gamonoid
03ae79f1f1 Fix LDAP login 2017-10-10 23:40:35 +02:00
gamonoid
92f7e11dd1 Remove payroll data from master data 2017-10-09 07:53:51 +02:00
gamonoid
088817172f Import - Export ⚙️ implementation for payroll 2017-10-08 19:31:27 +02:00
gamonoid
ddb46d8443 Fix zero time issue when updating time sheets 2017-10-08 16:53:33 +02:00
gamonoid
10403e280c Add export tab to admin reports 2017-10-08 16:52:10 +02:00
gamonoid
9f7831bafe Order payroll columns by calculation group 2017-10-08 16:51:05 +02:00
gamonoid
8d86b3c371 Data import module added to open source 2017-10-08 16:48:54 +02:00
gamonoid
79ecf9cd6a Allow punch out time to be null - fix for mysql strict date mode 2017-10-03 08:17:58 +02:00
8429 changed files with 609652 additions and 193780 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

@@ -3,14 +3,13 @@ services:
before_script:
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('dev') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
install:
- rm $TRAVIS_BUILD_DIR/tools/phpunit
- composer require --dev phpunit/phpunit ^5.7
- $TRAVIS_BUILD_DIR/vendor/bin/phpunit --version
- cp $TRAVIS_BUILD_DIR/vendor/bin/phpunit $TRAVIS_BUILD_DIR/tools
#- rm $TRAVIS_BUILD_DIR/tools/phpunit
#- composer require --dev phpunit/phpunit ~6.5.5
#- $TRAVIS_BUILD_DIR/vendor/bin/phpunit --version
#- cp $TRAVIS_BUILD_DIR/vendor/bin/phpunit $TRAVIS_BUILD_DIR/tools
script: ant build-ci
language: php
php:
- '5.6'
- '7.0'
- '7.1'
after_failure: "cat /tmp/icehrm.test.log"

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 -->

File diff suppressed because it is too large Load Diff

View File

@@ -1,57 +0,0 @@
<?php
/*
This file is part of Ice Framework.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'fieldnames';
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="tabEmployeeFieldName" href="#tabPageEmployeeFieldName"><?=t('Employee Field Names')?></a></li>
<li><a id="tabEmployeeCustomField" href="#tabPageEmployeeCustomField"><?=t('Employee Custom Fields')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageEmployeeFieldName">
<div id="EmployeeFieldName" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeFieldNameForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageEmployeeCustomField">
<div id="EmployeeCustomField" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeCustomFieldForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabEmployeeFieldName'] = new FieldNameAdapter('FieldNameMapping','EmployeeFieldName',{"type":"Employee"});
modJsList['tabEmployeeFieldName'].setRemoteTable(true);
modJsList['tabEmployeeFieldName'].setShowAddNew(false);
modJsList['tabEmployeeCustomField'] = new CustomFieldAdapter('CustomField','EmployeeCustomField',{"type":"Employee"},"display_order desc");
modJsList['tabEmployeeCustomField'].setRemoteTable(true);
modJsList['tabEmployeeCustomField'].setTableType("Employee");
var modJs = modJsList['tabEmployeeFieldName'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

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","Form"],["Table and Form","Table and Form"],["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,151 +0,0 @@
<?php
$moduleName = 'payroll';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
?><script type="text/javascript" src="<?=BASE_URL?>js/mindmup-editabletable.js?v=<?=$jsVersion?>"></script>
<style type="text/css">
.sorting_disabled{min-width: 80px;}
</style>
<div class="span9">
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabPayrollEmployee" href="#tabPagePayrollEmployee"><?=t('Company Payroll')?></a></li>
<li class=""><a id="tabPayroll" href="#tabPagePayroll"><?=t('Payroll Reports')?></a></li>
<li class=""><a id="tabPayrollColumn" href="#tabPagePayrollColumn"><?=t('Payroll Columns')?></a></li>
<li class=""><a id="tabDeductionGroup" href="#tabPageDeductionGroup"><?=t('Calculation Groups')?></a></li>
<li class=""><a id="tabDeduction" href="#tabPageDeduction"><?=t('Calculation Methods')?></a></li>
<li class=""><a id="tabPayslipTemplate" href="#tabPagePayslipTemplate"><?=t('Payslip Templates')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPagePayrollEmployee">
<div id="PayrollEmployee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollEmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane " id="tabPagePayroll">
<div id="Payroll" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
<div id="PayrollData" class="reviewBlock" data-content="List" style="padding-left:5px;display:none;overflow-x: auto;">
</div>
<div id="PayrollDataButtons" style="text-align: right;margin-top: 10px;">
<button class="cancelBtnTable btn" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> Cancel</button>
<button class="saveBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-save"></i> Save</button>
<button class="downloadBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-check"></i> Download</button>
<button class="completeBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-check-square-o"></i> Finalize</button>
</div>
</div>
<div class="tab-pane" id="tabPagePayrollColumn">
<div id="PayrollColumn" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollColumnForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<!--<div class="tab-pane" id="tabPagePayrollColumnTemplate">
<div id="PayrollColumnTemplate" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollColumnTemplateForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>-->
<div class="tab-pane" id="tabPageDeductionGroup">
<div id="DeductionGroup" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="DeductionGroupForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageDeduction">
<div id="Deduction" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="DeductionForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPagePayslipTemplate">
<div id="PayslipTemplate" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayslipTemplateForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabPayday'] = new PaydayAdapter('PayFrequency','Payday');
modJsList['tabPayroll'] = new PayrollAdapter('Payroll','Payroll');
modJsList['tabPayrollData'] = new PayrollDataAdapter('PayrollData','PayrollData');
modJsList['tabPayrollData'].setRemoteTable(false);
modJsList['tabPayrollData'].setShowAddNew(false);
modJsList['tabPayrollData'].setModulePath('admin=payroll');
modJsList['tabPayrollData'].setRowFieldName('employee');
modJsList['tabPayrollData'].setColumnFieldName('payroll_item');
modJsList['tabPayrollData'].setTables('PayrollEmployee','PayrollColumn','PayrollData');
modJsList['tabPayrollColumn'] = new PayrollColumnAdapter('PayrollColumn','PayrollColumn','','name, colorder');
modJsList['tabPayrollColumn'].setRemoteTable(true);
//modJsList['tabPayrollColumnTemplate'] = new PayrollColumnTemplateAdapter('PayrollColumnTemplate','PayrollColumnTemplate');
modJsList['tabPayrollEmployee'] = new PayrollEmployeeAdapter('PayrollEmployee','PayrollEmployee');
modJsList['tabPayrollEmployee'].setRemoteTable(true);
modJsList['tabPayslipTemplate'] = new PayslipTemplateAdapter('PayslipTemplate','PayslipTemplate');
modJsList['tabPayslipTemplate'].setRemoteTable(true);
var modJs = modJsList['tabPayrollEmployee'];
$(".saveBtnTable").off().on('click',function(){
modJsList['tabPayrollData'].sendCellDataUpdates();
});
$(".completeBtnTable").off().on('click',function(){
modJsList['tabPayrollData'].sendAllCellDataUpdates();
$(".completeBtnTable").hide();
$(".saveBtnTable").hide();
});
$(".downloadBtnTable").off().on('click',function(){
modJsList['tabPayrollData'].downloadPayroll();
});
$(".cancelBtnTable").off().on('click',function(){
modJs = modJsList['tabPayroll'];
modJs.get([]);
});
modJsList['tabDeduction'] = new DeductionAdapter('Deduction','Deduction');
modJsList['tabDeduction'].setRemoteTable(true);
modJsList['tabDeductionGroup'] = new DeductionGroupAdapter('DeductionGroup','DeductionGroup');
modJsList['tabDeductionGroup'].setRemoteTable(true);
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -1,648 +0,0 @@
/**
* Author: Thilina Hasantha
*/
/**
* PaydayAdapter
*/
function PaydayAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
PaydayAdapter.inherits(AdapterBase);
PaydayAdapter.method('getDataMapping', function() {
return [
"id",
"name"
];
});
PaydayAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Select Pay Frequency"}
];
});
PaydayAdapter.method('getFormFields', function() {
return [
[ "name", {"label":"Name","type":"text","validation":""}]
];
});
/*
PaydayAdapter.method('showActionButtons' , function() {
return false;
});
*/
PaydayAdapter.method('getAddNewLabel', function() {
return "Run Payroll";
});
PaydayAdapter.method('createTable', function(elementId) {
$("#payday_all").off();
this.uber('createTable',elementId);
$("#payday_all").off().on('click',function(){
if($(this).is(':checked')){
$('.paydayCheck').prop('checked', true);
}else{
$('.paydayCheck').prop('checked', false);
}
})
});
PaydayAdapter.method('getActionButtonsHtml', function(id,data) {
var editButton = '<input type="checkbox" class="paydayCheck" id="payday__id_" name="payday__id_" value="checkbox_payday__id_"/>';
var html = '<div style="width:120px;">_edit_</div>';
html = html.replace('_edit_',editButton);
html = html.replace(/_id_/g,id);
html = html.replace(/_BASE_/g,this.baseUrl);
return html;
});
PaydayAdapter.method('getActionButtonHeader', function() {
return { "sTitle": '<input type="checkbox" id="payday_all" name="payday_all" value="checkbox_payday_all"/>', "sClass": "center" };
});
/**
* PayrollAdapter
*/
function PayrollAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
PayrollAdapter.inherits(AdapterBase);
PayrollAdapter.method('getDataMapping', function() {
return [
"id",
"name",
"pay_period",
"department",
"date_start",
"date_end",
"status"
];
});
PayrollAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID","bVisible":false },
{ "sTitle": "Name" },
{ "sTitle": "Pay Frequency"},
{ "sTitle": "Department"},
{ "sTitle": "Date Start"},
{ "sTitle": "Date End"},
{ "sTitle": "Status"}
];
});
PayrollAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text"}],
[ "pay_period", {"label":"Pay Frequency","type":"select","remote-source":["PayFrequency","id","name"],"sort":"none"}],
[ "deduction_group", {"label":"Calculation Group","type":"select","remote-source":["DeductionGroup","id","name"],"sort":"none"}],
[ "payslipTemplate", {"label":"Payslip Template","type":"select","remote-source":["PayslipTemplate","id","name"]}],
[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"sort":"none"}],
[ "date_start", {"label":"Start Date","type":"date","validation":""}],
[ "date_end", {"label":"End Date","type":"date","validation":""}],
//[ "column_template", {"label":"Report Column Template","type":"select","remote-source":["PayrollColumnTemplate","id","name"]}],
[ "columns", {"label":"Payroll Columns","type":"select2multi","remote-source":["PayrollColumn","id","name"]}],
[ "status", {"label":"Status","type":"select","source":[["Draft","Draft"],["Completed","Completed"]],"sort":"none"}]
];
});
PayrollAdapter.method('postRenderForm', function(object, $tempDomObj) {
if(object != null && object != undefined && object.id != undefined && object.id != null){
$tempDomObj.find("#pay_period").attr('disabled','disabled');
$tempDomObj.find("#department").attr('disabled','disabled');
//$tempDomObj.find("#date_start").attr('disabled','disabled');
//$tempDomObj.find("#date_end").attr('disabled','disabled');
//$tempDomObj.find("#column_template").attr('disabled','disabled');
}
});
PayrollAdapter.method('process', function(id, status) {
modJs = modJsList['tabPayrollData'];
modJs.setCurrentPayroll(id);
$("#Payroll").hide();
$("#PayrollData").show();
$("#PayrollDataButtons").show();
if(status == 'Completed'){
$(".completeBtnTable").hide();
$(".saveBtnTable").hide();
}else{
$(".completeBtnTable").show();
$(".saveBtnTable").show();
}
modJs.get([]);
});
PayrollAdapter.method('getActionButtonsHtml', function(id,data) {
var editButton = '<img class="tableActionButton" src="_BASE_images/edit.png" style="cursor:pointer;" rel="tooltip" title="Edit" onclick="modJs.edit(_id_);return false;"></img>';
var processButton = '<img class="tableActionButton" src="_BASE_images/run.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Process" onclick="modJs.process(_id_,\'_status_\');return false;"></img>';
var deleteButton = '<img class="tableActionButton" src="_BASE_images/delete.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Delete" onclick="modJs.deleteRow(_id_);return false;"></img>';
var cloneButton = '<img class="tableActionButton" src="_BASE_images/clone.png" style="margin-left:15px;cursor:pointer;" rel="tooltip" title="Copy" onclick="modJs.copyRow(_id_);return false;"></img>';
var html = '<div style="width:120px;">_edit__process__clone__delete_</div>';
if(this.showAddNew){
html = html.replace('_clone_',cloneButton);
}else{
html = html.replace('_clone_','');
}
if(this.showDelete){
html = html.replace('_delete_',deleteButton);
}else{
html = html.replace('_delete_','');
}
if(this.showEdit){
html = html.replace('_edit_',editButton);
}else{
html = html.replace('_edit_','');
}
/*
if(data[6] != "Completed"){
html = html.replace('_process_',processButton);
}else{
html = html.replace('_process_','');
}
*/
html = html.replace('_process_',processButton);
html = html.replace(/_id_/g,id);
html = html.replace(/_status_/g,data[6]);
html = html.replace(/_BASE_/g,this.baseUrl);
return html;
});
PayrollAdapter.method('get', function(callBackData) {
$("#PayrollData").hide();
$("#PayrollForm").hide();
$("#PayrollDataButtons").hide();
$("#Payroll").show();
modJsList['tabPayrollData'].setCurrentPayroll(null);
this.uber('get',callBackData);
});
/**
* PayrollDataAdapter
*/
function PayrollDataAdapter(endPoint) {
this.initAdapter(endPoint);
this.cellDataUpdates = {};
this.payrollId = null;
}
PayrollDataAdapter.inherits(TableEditAdapter);
PayrollDataAdapter.method('validateCellValue', function(element, evt, newValue) {
modJs.addCellDataUpdate(element.data('colId'),element.data('rowId'),newValue);
return true;
});
PayrollDataAdapter.method('setCurrentPayroll', function(val) {
this.payrollId = val;
});
PayrollDataAdapter.method('addAdditionalRequestData' , function(type, req) {
if(type == 'updateData'){
req.payrollId = this.payrollId;
}else if(type == 'updateAllData'){
req.payrollId = this.payrollId;
}else if(type == 'getAllData'){
req.payrollId = this.payrollId;
}
return req;
});
PayrollDataAdapter.method('modifyCSVHeader', function(header) {
header.unshift("");
return header;
});
PayrollDataAdapter.method('getCSVData' , function() {
var csv = "";
for(var i=0;i<this.csvData.length;i++){
csv += this.csvData[i].join(",");
if(i < this.csvData.length -1){
csv += "\r\n";
}
}
return csv;
});
PayrollDataAdapter.method('downloadPayroll' , function() {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(this.getCSVData()));
element.setAttribute('download', "payroll_"+this.payrollId+".csv");
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
});
/**
* PayrollColumnAdapter
*/
function PayrollColumnAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
PayrollColumnAdapter.inherits(AdapterBase);
PayrollColumnAdapter.method('getDataMapping', function() {
return [
"id",
"name",
"colorder",
"calculation_hook",
"editable",
"enabled"
];
});
PayrollColumnAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name"},
{ "sTitle": "Column Order"},
{ "sTitle": "Calculation Method"},
{ "sTitle": "Editable"},
{ "sTitle": "Enabled"}
];
});
PayrollColumnAdapter.method('getFormFields', function() {
var fucntionColumnList = [ "calculation_columns", {"label":"Calculation Columns","type":"datagroup",
"form":[
[ "name", {"label":"Name","type":"text","validation":""}],
[ "column", {"label":"Column","type":"select2","remote-source":["PayrollColumn","id","name"]}]
],
"html":'<div id="#_id_#" class="panel panel-default">#_delete_##_edit_#<div class="panel-body">#_renderFunction_#</div></div>',
"validation":"none",
"render":function(item){
var output = "Variable:"+item.name;
return output;
}
}];
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "calculation_hook", {"label":"Predefined Calculations","type":"select2","allow-null":true,"null-label":"None","remote-source":["CalculationHook","code","name"]}],
[ "salary_components", {"label":"Salary Components","type":"select2multi","remote-source":["SalaryComponent","id","name"]}],
[ "deductions", {"label":"Calculation Method","type":"select2multi","remote-source":["Deduction","id","name"]}],
[ "add_columns", {"label":"Columns to Add","type":"select2multi","remote-source":["PayrollColumn","id","name"]}],
[ "sub_columns", {"label":"Columns to Subtract","type":"select2multi","remote-source":["PayrollColumn","id","name"]}],
[ "colorder", {"label":"Column Order","type":"text","validation":"number"}],
[ "editable", {"label":"Editable","type":"select","source":[["Yes","Yes"],["No","No"]]}],
[ "enabled", {"label":"Enabled","type":"select","source":[["Yes","Yes"],["No","No"]]}],
[ "default_value", {"label":"Default Value","type":"text","validation":""}],
fucntionColumnList,
[ "calculation_function", {"label":"Function","type":"text","validation":"none"}]
];
});
/**
* PayrollColumnTemplateAdapter
*/
function PayrollColumnTemplateAdapter(endPoint) {
this.initAdapter(endPoint);
}
PayrollColumnTemplateAdapter.inherits(AdapterBase);
PayrollColumnTemplateAdapter.method('getDataMapping', function() {
return [
"id",
"name"
];
});
PayrollColumnTemplateAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":true},
{ "sTitle": "Name"}
];
});
PayrollColumnTemplateAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "columns", {"label":"Payroll Columns","type":"select2multi","remote-source":["PayrollColumn","id","name"]}]
];
});
/*
* PayrollEmployeeAdapter
*/
function PayrollEmployeeAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
PayrollEmployeeAdapter.inherits(AdapterBase);
PayrollEmployeeAdapter.method('getDataMapping', function() {
return [
"id",
"employee",
"pay_frequency",
"deduction_group",
"currency"
];
});
PayrollEmployeeAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Employee" },
{ "sTitle": "Pay Frequency"},
{ "sTitle": "Calculation Group"},
{ "sTitle": "Currency"},
];
});
PayrollEmployeeAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}],
[ "pay_frequency", {"label":"Pay Frequency","type":"select2","remote-source":["PayFrequency","id","name"]}],
[ "currency", {"label":"Currency","type":"select2","remote-source":["CurrencyType","id","code"]}],
[ "deduction_group", {"label":"Calculation Group","type":"select2","allow-null":true,"null-label":"None","remote-source":["DeductionGroup","id","name"]}],
[ "deduction_exemptions", {"label":"Calculation Exemptions","type":"select2multi","remote-source":["Deduction","id","name"],"validation":"none"}],
[ "deduction_allowed", {"label":"Calculations Assigned","type":"select2multi","remote-source":["Deduction","id","name"],"validation":"none"}]
];
});
PayrollEmployeeAdapter.method('getFilters', function() {
return [
[ "employee", {"label":"Employee","type":"select2","remote-source":["Employee","id","first_name+last_name"]}]
];
});
/**
* DeductionAdapter
*/
function DeductionAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
DeductionAdapter.inherits(AdapterBase);
DeductionAdapter.method('getDataMapping', function() {
return [
"id",
"name",
"deduction_group"
];
});
DeductionAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name" },
{ "sTitle": "Calculation Group"}
];
});
DeductionAdapter.method('getFormFields', function() {
var rangeAmounts = [ "rangeAmounts", {"label":"Calculation Process","type":"datagroup",
"form":[
[ "lowerCondition", {"label":"Lower Limit Condition","type":"select","source":[["No Lower Limit","No Lower Limit"],["gt","Greater than"],["gte","Greater than or Equal"]]}],
[ "lowerLimit", {"label":"Lower Limit","type":"text","validation":"float"}],
[ "upperCondition", {"label":"Upper Limit Condition","type":"select","source":[["No Upper Limit","No Upper Limit"],["lt","Less than"],["lte","Less than or Equal"]]}],
[ "upperLimit", {"label":"Upper Limit","type":"text","validation":"float"}],
[ "amount", {"label":"Value","type":"text","validation":""}]
],
"html":'<div id="#_id_#" class="panel panel-default">#_delete_##_edit_#<div class="panel-body">#_renderFunction_#</div></div>',
"validation":"none",
"custom-validate-function":function (data){
var res = {};
res['valid'] = true;
if(data.lowerCondition == 'No Lower Limit'){
data.lowerLimit = 0;
}
if(data.upperCondition == 'No Upper Limit'){
data.upperLimit = 0;
}
res['params'] = data;
return res;
},
"render":function(item){
var output = "";
var getSymbol = function(text){
var map = {};
map['gt'] = '>';
map['gte'] = '>=';
map['lt'] = '<';
map['lte'] = '<=';
return map[text];
}
if(item.lowerCondition != "No Lower Limit"){
output += item.lowerLimit + " " + getSymbol(item.lowerCondition) + " ";
}
if(item.upperCondition != "No Upper Limit"){
output += " and ";
output += getSymbol(item.upperCondition) + " " + item.upperLimit + " ";
}
if(output == ""){
return "Deduction is "+item.amount + " for all ranges";
}else{
return "If salary component "+output+ " deduction is "+item.amount;
}
return output;
}
}];
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "componentType", {"label":"Salary Component Type","type":"select2multi","allow-null":true,"remote-source":["SalaryComponentType","id","name"]}],
[ "component", {"label":"Salary Component","type":"select2multi","allow-null":true,"remote-source":["SalaryComponent","id","name"]}],
[ "payrollColumn", {"label":"Payroll Report Column","type":"select2","allow-null":true,"remote-source":["PayrollColumn","id","name"]}],
rangeAmounts,
[ "deduction_group", {"label":"Calculation Group","type":"select2","allow-null":true,"null-label":"None","remote-source":["DeductionGroup","id","name"]}]
];
});
/*
* DeductionGroupAdapter
*/
function DeductionGroupAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
DeductionGroupAdapter.inherits(AdapterBase);
DeductionGroupAdapter.method('getDataMapping', function() {
return [
"id",
"name",
"description"
];
});
DeductionGroupAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name" },
{ "sTitle": "Details" }
];
});
DeductionGroupAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "description", {"label":"Details","type":"textarea","validation":"none"}]
];
});
/*
* PayslipTemplateAdapter
*/
function PayslipTemplateAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
PayslipTemplateAdapter.inherits(AdapterBase);
PayslipTemplateAdapter.method('getDataMapping', function() {
return [
"id",
"name"
];
});
PayslipTemplateAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name" }
];
});
PayslipTemplateAdapter.method('getFormFields', function() {
var payslipFields = [ "data", {"label":"Payslip Fields","type":"datagroup",
"form":[
[ "type", {"label":"Type","type":"select","sort":"none","source":[["Payroll Column","Payroll Column"],["Text","Text"],["Company Name","Company Name"],["Company Logo","Company Logo"], ["Separators","Separators"]]}],
[ "payrollColumn", {"label":"Payroll Column","type":"select2","sort":"none","allow-null":true,"null-label":"None","remote-source":["PayrollColumn","id","name"]}],
[ "label", {"label":"Label","type":"text","validation":"none"}],
[ "text", {"label":"Text","type":"textarea","validation":"none"}],
[ "status", {"label":"Status","type":"select","sort":"none","source":[["Show","Show"],["Hide","Hide"]]}]
],
//"html":'<div id="#_id_#" class="panel panel-default">#_delete_##_edit_#<div class="panel-body"><table class="table table-striped"><tr><td>Type</td><td>#_type_#</td></tr><tr><td>Label</td><td>#_label_#</td></tr><tr><td>Text</td><td>#_text_#</td></tr><tr><td>Font Size</td><td>#_fontSize_#</td></tr><tr><td>Font Style</td><td>#_fontStyle_#</td></tr><tr><td>Font Color</td><td>#_fontColor_#</td></tr><tr><td>Status</td><td>#_status_#</td></tr></table> </div></div>',
"html":'<div id="#_id_#" class="panel panel-default">#_delete_##_edit_#<div class="panel-body">#_type_# #_label_# <br/> #_text_#</div></div>',
"validation":"none",
"custom-validate-function":function (data){
var res = {};
res['valid'] = true;
if(data.type == 'Payroll Column'){
if(data.payrollColumn == "NULL"){
res['valid'] = false;
res['message'] = "Please select payroll column";
}else{
data.payrollColumn == "NULL";
}
}else if(data.type == 'Text'){
if(data.text == ""){
res['valid'] = false;
res['message'] = "Text can not be empty";
}
}
res['params'] = data;
return res;
}
}];
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
payslipFields
];
});

View File

@@ -1,38 +0,0 @@
<?php
$moduleName = 'Reports';
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="tabReport" href="#tabPageReport"><?=t('Reports')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageReport">
<div id="Report" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="ReportForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabReport'] = new ReportAdapter('Report','Report','','report_group');
modJsList['tabReport'].setShowAddNew(false);
modJsList['tabReport'].setRemoteTable(true);
var modJs = modJsList['tabReport'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -1,396 +0,0 @@
/**
* Author: Thilina Hasantha
*/
/**
* ReportAdapter
*/
function ReportAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
this._construct();
}
ReportAdapter.inherits(AdapterBase);
ReportAdapter.method('_construct', function() {
this._formFileds = [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"label","validation":""}],
[ "parameters", {"label":"Parameters","type":"fieldset","validation":"none"}]
];
this.remoteFieldsExists = false;
});
ReportAdapter.method('_initLocalFormFields', function() {
this._formFileds = [
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"label","validation":""}],
[ "parameters", {"label":"Parameters","type":"fieldset","validation":"none"}]
];
});
ReportAdapter.method('setRemoteFieldExists', function(val) {
this.remoteFieldsExists = val;
});
ReportAdapter.method('getDataMapping', function() {
return [
"id",
"icon",
"name",
"details",
"parameters"
];
});
ReportAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "","bSortable":false,"sWidth":"22px"},
{ "sTitle": "Name","sWidth":"30%"},
{ "sTitle": "Details"},
{ "sTitle": "Parameters","bVisible":false},
];
});
ReportAdapter.method('getFormFields', function() {
return this._formFileds;
});
ReportAdapter.method('processFormFieldsWithObject', function(object) {
var that = this;
this._initLocalFormFields();
var len = this._formFileds.length;
var fieldIDsToDelete = [];
var fieldsToDelete = [];
this.remoteFieldsExists = false;
for(var i=0;i<len;i++){
if(this._formFileds[i][1]['type']=="fieldset"){
var newFields = JSON.parse(object[this._formFileds[i][0]]);
fieldsToDelete.push(this._formFileds[i][0]);
newFields.forEach(function(entry) {
that._formFileds.push(entry);
if(entry[1]['remote-source'] != undefined && entry[1]['remote-source'] != null){
that.remoteFieldsExists = true;
}
});
}
}
var tempArray = [];
that._formFileds.forEach(function(entry) {
if(jQuery.inArray(entry[0], fieldsToDelete) < 0){
tempArray.push(entry);
}
});
that._formFileds = tempArray;
});
ReportAdapter.method('renderForm', function(object) {
var that = this;
this.processFormFieldsWithObject(object);
if(this.remoteFieldsExists){
var cb = function(){
that.renderFormNew(object);
};
this.initFieldMasterData(cb);
}else{
this.initFieldMasterData();
that.renderFormNew(object);
}
this.currentReport = object;
});
ReportAdapter.method('renderFormNew', function(object) {
var that = this;
var signatureIds = [];
if(object == null || object == undefined){
this.currentId = null;
}
this.preRenderForm(object);
var formHtml = this.templates['formTemplate'];
var html = "";
var fields = this.getFormFields();
for(var i=0;i<fields.length;i++){
var metaField = this.getMetaFieldForRendering(fields[i][0]);
if(metaField == "" || metaField == undefined){
html += this.renderFormField(fields[i]);
}else{
var metaVal = object[metaField];
if(metaVal != '' && metaVal != null && metaVal != undefined && metaVal.trim() != ''){
html += this.renderFormField(JSON.parse(metaVal));
}else{
html += this.renderFormField(fields[i]);
}
}
}
formHtml = formHtml.replace(/_id_/g,this.getTableName()+"_submit");
formHtml = formHtml.replace(/_fields_/g,html);
var $tempDomObj;
var randomFormId = this.generateRandom(14);
if(!this.showFormOnPopup){
$tempDomObj = $("#"+this.getTableName()+'Form');
}else{
$tempDomObj = $('<div class="reviewBlock popupForm" data-content="Form"></div>');
$tempDomObj.attr('id',randomFormId);
}
$tempDomObj.html(formHtml);
$tempDomObj.find('.datefield').datepicker({'viewMode':2});
$tempDomObj.find('.timefield').datetimepicker({
language: 'en',
pickDate: false
});
$tempDomObj.find('.datetimefield').datetimepicker({
language: 'en'
});
$tempDomObj.find('.colorpick').colorpicker();
//$tempDomObj.find('.select2Field').select2();
$tempDomObj.find('.select2Field').each(function() {
$(this).select2().select2('val', $(this).find("option:eq(0)").val());
});
$tempDomObj.find('.select2Multi').each(function() {
$(this).select2().on("change",function(e){
var parentRow = $(this).parents(".row");
var height = parentRow.find(".select2-choices").height();
parentRow.height(parseInt(height));
});
});
$tempDomObj.find('.signatureField').each(function() {
//$(this).data('signaturePad',new SignaturePad($(this)));
signatureIds.push($(this).attr('id'));
});
for(var i=0;i<fields.length;i++){
if(fields[i][1].type == "datagroup"){
$tempDomObj.find("#"+fields[i][0]).data('field',fields[i]);
}
}
if(this.showSave == false){
$tempDomObj.find('.saveBtn').remove();
}else{
$tempDomObj.find('.saveBtn').off();
$tempDomObj.find('.saveBtn').data("modJs",this);
$tempDomObj.find('.saveBtn').on( "click", function() {
if($(this ).data('modJs').saveSuccessItemCallback != null && $(this ).data('modJs').saveSuccessItemCallback!= undefined){
$(this ).data('modJs').save($(this ).data('modJs').retriveItemsAfterSave(), $(this ).data('modJs').saveSuccessItemCallback);
}else{
$(this ).data('modJs').save();
}
return false;
});
}
if(this.showCancel== false){
$tempDomObj.find('.cancelBtn').remove();
}else{
$tempDomObj.find('.cancelBtn').off();
$tempDomObj.find('.cancelBtn').data("modJs",this);
$tempDomObj.find('.cancelBtn').on( "click", function() {
$(this ).data('modJs').cancel();
return false;
});
}
if(!this.showFormOnPopup){
$("#"+this.getTableName()+'Form').show();
$("#"+this.getTableName()).hide();
for(var i=0;i<signatureIds.length;i++){
$("#"+signatureIds[i])
.data('signaturePad',
new SignaturePad(document.getElementById(signatureIds[i])));
}
if(object != undefined && object != null){
this.fillForm(object);
}
}else{
//var tHtml = $tempDomObj.wrap('<div>').parent().html();
//this.showMessage("Edit",tHtml,null,null,true);
this.showMessage("Edit","",null,null,true);
$("#plainMessageModel .modal-body").html("");
$("#plainMessageModel .modal-body").append($tempDomObj);
for(var i=0;i<signatureIds.length;i++){
$("#"+signatureIds[i])
.data('signaturePad',
new SignaturePad(document.getElementById(signatureIds[i])));
}
if(object != undefined && object != null){
this.fillForm(object,"#"+randomFormId);
}
}
this.postRenderForm(object,$tempDomObj);
});
ReportAdapter.method('getActionButtonsHtml', function(id,data) {
var html = '<div style="width:80px;"><img class="tableActionButton" src="_BASE_images/download.png" style="cursor:pointer;" rel="tooltip" title="Download" onclick="modJs.edit(_id_);return false;"></img></div>';
html = html.replace(/_id_/g,id);
html = html.replace(/_BASE_/g,this.baseUrl);
return html;
});
ReportAdapter.method('addSuccessCallBack', function(callBackData,serverData) {
var fileName = serverData[0];
var link;
if(fileName.indexOf("https:") == 0){
link = '<a href="'+fileName+'" target="_blank" style="font-size:14px;font-weight:bold;">Download Report <img src="_BASE_images/download.png"></img> </a>';
}else{
link = '<a href="'+modJs.getCustomActionUrl("download",{'file':fileName})+'" target="_blank" style="font-size:14px;font-weight:bold;">Download Report <img src="_BASE_images/download.png"></img> </a>';
}
link = link.replace(/_BASE_/g,this.baseUrl);
if(this.currentReport.output == "PDF"){
this.showMessage("Download Report",link);
}else{
if(serverData[1].length == 0){
this.showMessage("Empty Report","There were no data for selected filters");
return;
}
var tableHtml = link+'<br/><br/><div class="box-body table-responsive" style="overflow-x:scroll;padding: 5px;border: solid 1px #DDD;"><table id="tempReportTable" cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-striped"></table></div>';
//Delete existing temp report table
$("#tempReportTable").remove();
//this.showMessage("Report",tableHtml);
$("#"+this.table).html(tableHtml);
$("#"+this.table).show();
$("#"+this.table+"Form").hide();
//Prepare headers
var headers = [];
for(title in serverData[1]){
headers.push({ "sTitle": serverData[1][title]});
}
var data = serverData[2];
var dataTableParams = {
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
},
"aaData": data,
"aoColumns": headers,
"bSort": false,
"iDisplayLength": 15,
"iDisplayStart": 0
};
$("#tempReportTable").dataTable( dataTableParams );
$(".dataTables_paginate ul").addClass("pagination");
$(".dataTables_length").hide();
$(".dataTables_filter input").addClass("form-control");
$(".dataTables_filter input").attr("placeholder","Search");
$(".dataTables_filter label").contents().filter(function(){
return (this.nodeType == 3);
}).remove();
$('.tableActionButton').tooltip();
}
});
ReportAdapter.method('fillForm', function(object) {
var fields = this.getFormFields();
for(var i=0;i<fields.length;i++) {
if(fields[i][1].type == 'label'){
$("#"+this.getTableName()+'Form #'+fields[i][0]).html(object[fields[i][0]]);
}else{
$("#"+this.getTableName()+'Form #'+fields[i][0]).val(object[fields[i][0]]);
}
}
});
function ReportGenAdapter(endPoint) {
this.initAdapter(endPoint);
}
ReportGenAdapter.inherits(AdapterBase);
ReportGenAdapter.method('getDataMapping', function() {
return [
"id",
"name",
];
});
ReportGenAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Name" }
];
});
ReportGenAdapter.method('getFormFields', function() {
return [
];
});
ReportGenAdapter.method('getActionButtonsHtml', function(id,data) {
var html = '<div style="width:80px;"><img class="tableActionButton" src="_BASE_images/download.png" style="cursor:pointer;" rel="tooltip" title="Download" onclick="download(_name_);return false;"></img></div>';
html = html.replace(/_id_/g,id);
html = html.replace(/_name_/g,data[1]);
html = html.replace(/_BASE_/g,this.baseUrl);
return html;
});

View File

@@ -1,67 +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 = 'settings';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$options1 = array();
$options1['setShowAddNew'] = 'false';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'CompanySetting','Setting','Company','SettingAdapter','{"name":["Company:"]}','name',true,$options1
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'SystemSetting','Setting','System','SettingAdapter','{"name":["System:"]}','name',false,$options1
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'EmailSetting','Setting','Email','SettingAdapter','{"name":["Email:"]}','name',false,$options1
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'LeaveSetting','Setting','Leave / PTO','SettingAdapter','{"name":["Leave:"]}','name',false,$options1
));
if(!defined('LDAP_ENABLED') || LDAP_ENABLED == true){
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'LDAPSetting','Setting','LDAP','SettingAdapter','{"name":["LDAP:"]}','name',false,$options1
));
}
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'AttendanceSetting','Setting','Attendance','SettingAdapter','{"name":["Attendance:"]}','name',false,$options1
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'OtherSetting','Setting','Other','SettingAdapter','{"name":["Projects:","Recruitment:","Notifications:","Expense:","Travel:","Api:","Overtime:"]}','name',false,$options1
));
echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
?>
</div>
<script>
$(window).load(function() {
modJs.loadRemoteDataForSettings();
});
</script>
<?php include APP_BASE_PATH.'footer.php';?>

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,200 +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) {
this.showMessage("Create User","An email has been sent to "+callBackData['email']+" with a temporary password to login to IceHrm.");
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);
});

12
app/api/.htaccess Normal file
View File

@@ -0,0 +1,12 @@
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
# Explicitly disable rewriting for front controllers
RewriteRule ^index.php - [L]
RewriteCond %{REQUEST_FILENAME} !-f
# Change below before deploying to production
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

3
app/api/index.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
include __DIR__.'/../config.php';
include (APP_BASE_PATH.'rest.php');

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

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

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="icehrm-opensource" default="build">
<project name="icehrm-pro" default="build">
<!-- By default, we assume all tools to be on the $PATH -->
<property name="toolsdir" value="${basedir}/tools/"/>
<property name="destination" value="${basedir}/build/app"/>
@@ -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';?>

19
core/admin/data/index.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
$moduleName = 'data';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'DataImport','DataImport','Data Importers','DataImportAdapter','','',true
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'DataImportFile','DataImportFile','Data Import Files','DataImportFileAdapter','',''
));
echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
include APP_BASE_PATH.'footer.php';

12
core/admin/data/meta.json Normal file
View File

@@ -0,0 +1,12 @@
{
"label": "Data",
"menu": "System",
"order": "8",
"icon": "fa-database",
"user_levels": [
"Admin"
],
"permissions": [],
"model_namespace": "\\Data\\Common\\Model",
"manager": "\\Data\\Admin\\Api\\DataAdminManager"
}

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,58 @@
<?php
/*
This file is part of Ice Framework.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'fieldnames';
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="tabEmployeeFieldName" href="#tabPageEmployeeFieldName"><?=t('Employee Field Names')?></a></li>
<li><a id="tabEmployeeCustomField" href="#tabPageEmployeeCustomField"><?=t('Employee Custom Fields')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageEmployeeFieldName">
<div id="EmployeeFieldName" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeFieldNameForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageEmployeeCustomField">
<div id="EmployeeCustomField" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeCustomFieldForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabEmployeeFieldName'] = new FieldNameAdapter('FieldNameMapping','EmployeeFieldName',{"type":"Employee"});
modJsList['tabEmployeeFieldName'].setRemoteTable(true);
modJsList['tabEmployeeFieldName'].setShowDelete(false);
modJsList['tabEmployeeFieldName'].setShowAddNew(false);
modJsList['tabEmployeeCustomField'] = new CustomFieldAdapter('CustomField','EmployeeCustomField',{"type":"Employee"},"display_order desc");
modJsList['tabEmployeeCustomField'].setRemoteTable(true);
modJsList['tabEmployeeCustomField'].setTableType("Employee");
var modJs = modJsList['tabEmployeeFieldName'];
</script>
<?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,151 @@
<?php
$moduleName = 'payroll';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
?><script type="text/javascript" src="<?=BASE_URL?>js/mindmup-editabletable.js?v=<?=$jsVersion?>"></script>
<style type="text/css">
.sorting_disabled{min-width: 80px;}
</style>
<div class="span9">
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabPayrollEmployee" href="#tabPagePayrollEmployee"><?=t('Company Payroll')?></a></li>
<li class=""><a id="tabPayroll" href="#tabPagePayroll"><?=t('Payroll Reports')?></a></li>
<li class=""><a id="tabPayrollColumn" href="#tabPagePayrollColumn"><?=t('Payroll Columns')?></a></li>
<li class=""><a id="tabDeductionGroup" href="#tabPageDeductionGroup"><?=t('Calculation Groups')?></a></li>
<li class=""><a id="tabDeduction" href="#tabPageDeduction"><?=t('Calculation Methods')?></a></li>
<li class=""><a id="tabPayslipTemplate" href="#tabPagePayslipTemplate"><?=t('Payslip Templates')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPagePayrollEmployee">
<div id="PayrollEmployee" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollEmployeeForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane " id="tabPagePayroll">
<div id="Payroll" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
<div id="PayrollData" class="reviewBlock" data-content="List" style="padding-left:5px;display:none;overflow-x: auto;">
</div>
<div id="PayrollDataButtons" style="text-align: right;margin-top: 10px;">
<button class="cancelBtnTable btn" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> Cancel</button>
<button class="saveBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-save"></i> Save</button>
<button class="downloadBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-check"></i> Download</button>
<button class="completeBtnTable btn btn-primary" style="margin-right:5px;"><i class="fa fa-check-square-o"></i> Finalize</button>
</div>
</div>
<div class="tab-pane" id="tabPagePayrollColumn">
<div id="PayrollColumn" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollColumnForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<!--<div class="tab-pane" id="tabPagePayrollColumnTemplate">
<div id="PayrollColumnTemplate" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayrollColumnTemplateForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>-->
<div class="tab-pane" id="tabPageDeductionGroup">
<div id="DeductionGroup" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="DeductionGroupForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageDeduction">
<div id="Deduction" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="DeductionForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPagePayslipTemplate">
<div id="PayslipTemplate" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="PayslipTemplateForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabPayday'] = new PaydayAdapter('PayFrequency','Payday');
modJsList['tabPayroll'] = new PayrollAdapter('Payroll','Payroll');
modJsList['tabPayrollData'] = new PayrollDataAdapter('PayrollData','PayrollData');
modJsList['tabPayrollData'].setRemoteTable(false);
modJsList['tabPayrollData'].setShowAddNew(false);
modJsList['tabPayrollData'].setModulePath('admin=payroll');
modJsList['tabPayrollData'].setRowFieldName('employee');
modJsList['tabPayrollData'].setColumnFieldName('payroll_item');
modJsList['tabPayrollData'].setTables('PayrollEmployee','PayrollColumn','PayrollData');
modJsList['tabPayrollColumn'] = new PayrollColumnAdapter('PayrollColumn','PayrollColumn','','deduction_group, colorder');
modJsList['tabPayrollColumn'].setRemoteTable(true);
//modJsList['tabPayrollColumnTemplate'] = new PayrollColumnTemplateAdapter('PayrollColumnTemplate','PayrollColumnTemplate');
modJsList['tabPayrollEmployee'] = new PayrollEmployeeAdapter('PayrollEmployee','PayrollEmployee');
modJsList['tabPayrollEmployee'].setRemoteTable(true);
modJsList['tabPayslipTemplate'] = new PayslipTemplateAdapter('PayslipTemplate','PayslipTemplate');
modJsList['tabPayslipTemplate'].setRemoteTable(true);
var modJs = modJsList['tabPayrollEmployee'];
$(".saveBtnTable").off().on('click',function(){
modJsList['tabPayrollData'].sendCellDataUpdates();
});
$(".completeBtnTable").off().on('click',function(){
modJsList['tabPayrollData'].sendAllCellDataUpdates();
$(".completeBtnTable").hide();
$(".saveBtnTable").hide();
});
$(".downloadBtnTable").off().on('click',function(){
modJsList['tabPayrollData'].downloadPayroll();
});
$(".cancelBtnTable").off().on('click',function(){
modJs = modJsList['tabPayroll'];
modJs.get([]);
});
modJsList['tabDeduction'] = new DeductionAdapter('Deduction','Deduction');
modJsList['tabDeduction'].setRemoteTable(true);
modJsList['tabDeductionGroup'] = new DeductionGroupAdapter('DeductionGroup','DeductionGroup');
modJsList['tabDeductionGroup'].setRemoteTable(true);
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -0,0 +1,48 @@
<?php
$moduleName = 'Reports';
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="tabReport" href="#tabPageReport"><?=t('Reports')?></a></li>
<li class=""><a id="tabExports" href="#tabPageExports"><?=t('Exports')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageReport">
<div id="Report" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="ReportForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageExports">
<div id="Exports" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="ExportsForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabReport'] = new ReportAdapter('Report','Report','{"type":"Reports"}','report_group');
modJsList['tabReport'].setShowAddNew(false);
modJsList['tabReport'].setRemoteTable(true);
modJsList['tabExports'] = new ReportAdapter('Report','Exports','{"type":"Exports"}','report_group');
modJsList['tabExports'].setShowAddNew(false);
modJsList['tabExports'].setRemoteTable(true);
var modJs = modJsList['tabReport'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -0,0 +1,44 @@
ICEHRM END USER LICENSE AGREEMENT
NOTICE TO ALL USERS: BY PURCHASING THE MODULE, YOU (EITHER AN INDIVIDUAL OR A SINGLE ENTITY) CONSENT TO BE BOUND BY AND BECOME A PARTY TO THIS AGREEMENT.
All references to "Software" herein shall be deemed to include the software license with which you will be provided by Gamonoid Media Pvt Ltd, as part of the Software.
1. LICENSE GRANT. Subject to the payment of the applicable licence fees, and subject to the terms and conditions of this Agreement, ICEHRM hereby grants to you a non-exclusive, non-transferable right to use one copy of the specified version of the Software and the accompanying documentation (the "Documentation") for the term of this Agreement solely for your own internal business purposes. You may install one copy of the Software for production use.
.
2. USE. The Software is licensed as a single product; it may not be used on more than one ICEHRM Server at a time. The Software is "in use" on a Server when its installed on a Server. You shall not, nor permit any third party to copy (other than as expressly permitted herein). You shall not rent, lease or lend the Software to any other person, nor transfer or sub-licence your licence rights to any other person.
3. TERM. This Agreement is effective until terminated as set forth herein. This Agreement will terminate automatically if you fail to comply with any of the conditions, limitations or other requirements described herein. Upon any termination of this Agreement, you must immediately destroy all copies of the Software and the Documentation. You may terminate this Agreement at any point by destroying all copies of the Software and the Documentation.
4. SUPPORT. Gamonoid Media Pvt Ltd will provide you support according to the support agreement subscribed by the company.
5. OWNERSHIP RIGHTS. The Software is protected by copyright laws. ICEHRM and Gamonoid Media Pvt Ltd own and retain all right, title and interest in and to the Software, including all copyrights, patents, trademarks and other intellectual property rights therein. Your possession, installation, or use of the Software does not transfer to you any title to the intellectual property in the Software, and you will not acquire any rights to the Software except as expressly set forth in this Agreement.
6. LIMITED WARRANTY. You may not rent, lease, loan or resell the Software. You may not permit third parties to benefit from the use or functionality of the Software via a timesharing, service bureau or other arrangement, except to the extent such use is specified in the applicable list price or product packaging for the Software. You may not transfer any of the rights granted to you under this Agreement. You may not modify, or create derivative works based upon, the Software in whole or in part. You may not copy the Software or Documentation except as expressly permitted in Section 1 above. You may not remove any proprietary notices or labels on the Software. All rights not expressly set forth hereunder are reserved by ICEHRM. ICEHRM reserves the right to periodically conduct audits upon advance written notice to verify compliance with the terms of this Agreement.
7. WARRANTY and DISCLAIMER.
(i) Gamonoid Media Pvt Ltd. warrants that for 30 days from first download or installation the Software will perform substantially in accordance with the functionality described in the Documentation (http://blog.icehrm.com) when operated properly and in the manner specified in the Documentation.
(ii) You accept all responsibility for the selection of this Software to meet your requirements.
(iii) Gamonoid Media Pvt Ltd. does not warrant that the Software and/or the Documentation will be suitable for such requirements nor that any use will be uninterrupted and error free.
(iv) The warranty in (i) shall not apply if you (a) make or cause to be made any modifications to this Software, (b) use the Software in a manner for which it was not intended or (c) use the Software other than as permitted under this Agreement.
(vii) The warranties and conditions stated in this Agreement are in lieu of all other conditions, warranties or other terms concerning the supply or purported supply of, failure to supply or delay in supplying the Software or the Documentation which might but for this paragraph (vii) have effect between the ICEHRM and you or would otherwise be implied into or incorporated into this Agreement or any collateral contract, whether by statute, common law or otherwise, all of which are hereby excluded (including, without limitation, the implied conditions, warranties or other terms as to satisfactory quality, fitness for purpose or as to the use of reasonable skill and care).
8. LIMITATION of LIABILITY. Gamonoid Media Pvt Ltd. shall have no liability (whether in contract, tort, restitution or otherwise) for any of the following losses or damage (whether such losses or damage were foreseen, foreseeable, known or otherwise):
- Loss of revenue;
- Loss of actual or anticipated profits (including for loss of profits on contracts);
- Loss of the use of money;
- Loss of anticipated savings;
- Loss of business;
- Loss of opportunity;
- Loss of goodwill;
- Loss of reputation;
- Loss of, damage to or corruption of data;
or
Any indirect or consequential loss or damage howsoever caused (including, for the avoidance of doubt, where such loss or damage is of the type specified in paragraph (ii), (a) to (ii), (i).
The ICEHRM liability (whether in contract, tort, restitution or otherwise) arising out of or in connection with the supply of the Software shall in no circumstances exceed a sum equal to the amount equally paid by you for the Software.
The construction and interpretation of this Agreement shall be governed in accordance with the laws of Sri Lanka. The parties hereby submit to the jurisdiction of the courts of Sri Lanka save that ICEHRM as claimant shall be entitled to initiate proceedings in any court of competent jurisdiction.
This Agreement contains the entire understanding of the parties with respect to the subject matter hereof and supersedes all and any prior understandings, undertakings and promises between you and ICEHRM, whether oral or in writing, which have been given or may be implied from anything written or said in negotiations between us or our representatives prior to this Agreement and all prior agreements between the parties relating to the matters aforesaid shall cease to have effect as from the Effective Date.

View File

@@ -0,0 +1,7 @@
This module is licensed under IceHrm Commercial License, which can be found in LICENSE.txt.
You are allowed to make any modification required to these module, but only allowed to use
the module in one production server (even with modifications).
Installation
------------
Copy this module into <icehrm path>/admin/ directory

View File

@@ -0,0 +1,69 @@
<?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 = 'settings';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$options1 = array();
$options1['setShowAddNew'] = 'false';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'CompanySetting','Setting','Company','SettingAdapter','{"name":["Company:"]}','name',true,$options1
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'SystemSetting','Setting','System','SettingAdapter','{"name":["System:"]}','name',false,$options1
));
if (!defined('CLOUD_INSTALLATION')) {
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'EmailSetting', 'Setting', 'Email', 'SettingAdapter', '{"name":["Email:"]}', 'name', false, $options1
));
}
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'LeaveSetting','Setting','Leave / PTO','SettingAdapter','{"name":["Leave:"]}','name',false,$options1
));
if(!defined('LDAP_ENABLED') || LDAP_ENABLED == true){
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'LDAPSetting','Setting','LDAP','SettingAdapter','{"name":["LDAP:"]}','name',false,$options1
));
}
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'AttendanceSetting','Setting','Attendance','SettingAdapter','{"name":["Attendance:"]}','name',false,$options1
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'OtherSetting','Setting','Other','SettingAdapter','{"name":["Projects:","Recruitment:","Notifications:","Expense:","Travel:","Api:","Overtime:"]}','name',false,$options1
));
echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
?>
</div>
<script>
$(window).load(function() {
modJs.loadRemoteDataForSettings();
});
</script>
<?php include APP_BASE_PATH.'footer.php';?>

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

@@ -13,10 +13,10 @@ if(!defined('HOME_LINK_OTHERS')){
}
//Version
define('VERSION', '20.2.0.OS');
define('CACHE_VALUE', '20.2.0.OS');
define('VERSION_NUMBER', '2020');
define('VERSION_DATE', '28/09/2017');
define('VERSION', '23.0.0.OS');
define('CACHE_VALUE', '23.0.0.OS');
define('VERSION_NUMBER', '2300');
define('VERSION_DATE', '21/05/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);
}

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