Skip to content

Commit

Permalink
Merge branch 'release/v31.0.0.OS'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddave001 committed Jan 14, 2022
2 parents f44b9ec + f04159c commit d61e992
Show file tree
Hide file tree
Showing 112 changed files with 371,021 additions and 933 deletions.
2 changes: 1 addition & 1 deletion core/admin/clients/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@

var modJs = modJsList['tabClient'];
</script>
<?php include APP_BASE_PATH . 'footer.php'; ?>
<?php include APP_BASE_PATH . 'footer.php'; ?>
2 changes: 1 addition & 1 deletion core/admin/connection/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$data = json_decode($data, true);
}

$employeeCount = StatsHelper::getEmployeeCount();
$employeeCount = StatsHelper::getActiveEmployeeCount();
$userCount = StatsHelper::getUserCount();
$connectionService = new ConnectionService();
?><div class="span9">
Expand Down
2 changes: 1 addition & 1 deletion core/admin/dashboard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<div class="col-lg-4 col-xs-12">
<div id="TaskListLoader" style="width:100%;"></div>
<div id="TaskListWrap" style="display: none;box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);border: none;margin-bottom: 20px; padding:25px;">
<h4>Tasks to Attend</h4>
<h4>Things to Do</h4>
<div id="TaskList" style="margin-left: 10px; margin-top: 30px;"></div>
</div>
</div>
Expand Down
14 changes: 9 additions & 5 deletions core/admin/documents/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
$activeStr = 'active';
}

$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$moduleBuilder = new \Classes\ModuleBuilderV2\ModuleBuilder();
if($user->user_level == "Admin") {
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\CompanyDocument',
'CompanyDocument',
'CompanyDocument',
'Company Documents',
Expand All @@ -25,7 +26,8 @@
'',
true
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\Document',
'Document',
'Document',
'Document Types',
Expand All @@ -36,7 +38,8 @@
));
$options1 = array();
$options1['setRemoteTable'] = 'true';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\EmployeeDocument',
'EmployeeDocument',
'EmployeeDocument',
'Employee Documents',
Expand All @@ -49,7 +52,8 @@
}else{
$options1 = array();
$options1['setRemoteTable'] = 'true';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\EmployeeDocument',
'EmployeeDocument',
'EmployeeDocument',
'Employee Documents',
Expand Down
160 changes: 3 additions & 157 deletions core/admin/modules/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,137 +9,14 @@
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$groupsStr = \Classes\SettingsManager::getInstance()->getSetting("Modules : Group");
$groups = array();
if(!empty($groupsStr)){
$groups = explode(",",$groupsStr);
}
if(empty($groups)){
$groups[] = 'all';
}
?><div class="span9">

<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabUsage" href="#tabPageUsage"><?=t('Usage')?></a></li>
<li class=""><a id="tabModule" href="#tabPageModule"><?=t('Modules')?></a></li>
<li class="active"><a id="tabModule" href="#tabPageModule"><?=t('Modules')?></a></li>
</ul>

<div class="tab-content">
<div class="tab-pane active" id="tabPageUsage">
<div id="Usage" class="reviewBlock" data-content="List" style="padding-left:5px;">
<div class="callout callout-info">
<h3>How Do You Want to Use IceHrm</h3>

<p style="font-size: 1.2em;">
In order to make IceHrm user interface much simpler to use for you and your employees you
can select the purpose of using IceHrm for your company. This will disable unwanted modules
and provide you a better user experience.
</p>
</div>


<hr/>


<div class="row">
<div class="col-lg-4 col-xs-12">
<div class="callout callout-gray">
<h4 class="list-group-item-heading">
<input id="all" class="module-check" type="checkbox" value="all"/>
&nbsp;Use All Available Modules</h4>
<p style="font-size: 1.2em;">
Use all the Available Modules in IceHrm. This option will enable all the modules
including Employee Management, Leave Management, Time Sheets, Attendance, Training,
Expenses, Document Management, Travel, Recruitment Management and Payroll
</p>
</div>
<div class="callout callout-white">
<h4 class="list-group-item-heading">
<input id="leave" class="module-check" type="checkbox" value="leave"/>
&nbsp;Leave Management System
</h4>
<p style="font-size: 1.2em;">
Use IceHrm as a Leave / Vacation Management System, Allow Employees to Apply for leave,
Approve leave requests and track leave balances
</p>
</div>
<div class="callout callout-gray">
<h4 class="list-group-item-heading">
<input id="documents" class="module-check" type="checkbox" value="documents"/>
&nbsp;Document Management System
</h4>
<p style="font-size: 1.2em;">
Use IceHrm as a Document Management System, Allow Employees upload documents, Automated
notifications for expiring documents, Add company documents and share with specific
employees or departments.
</p>
</div>
</div>
<div class="col-lg-4 col-xs-12">
<div class="callout callout-white">
<h4 class="list-group-item-heading">
<input id="attendance" class="module-check" type="checkbox" value="attendance"/>
&nbsp;Time Tracking System
</h4>
<p style="font-size: 1.2em;"><br/>
Use IceHrm as an Attendance Management and Time Tracking System. Let employees record
attendance and fill in time sheets.
</p>
</div>
<div class="callout callout-gray">
<h4 class="list-group-item-heading">
<input id="training" class="module-check" type="checkbox" value="training"/>
&nbsp;Training Management System
</h4>
<p style="font-size: 1.2em;">
Use IceHrm as a Training Management System. Create courses and training sessions. Let
employees subscribe to training sessions and allow them to submit feedback with training
certificates for auditing purposes.
</p>
</div>
<div class="callout callout-white">
<h4 class="list-group-item-heading">
<input id="finance" class="module-check" type="checkbox" value="finance"/>
&nbsp;Expense and Travel Management
</h4>
<p style="font-size: 1.2em;">
Get your employees to submit expense claims and let managers approve. Also combine
approved expenses with payroll module to have those added to employees salary.
Also you can track and approve employee travel requests
</p>
</div>
</div>
<?php if(defined('RECRUITMENT_ENABLED') && RECRUITMENT_ENABLED == true){?>
<div class="col-lg-4 col-xs-12">
<div class="callout callout-gray">
<h4 class="list-group-item-heading">
<input id="recruitment" class="module-check" type="checkbox" value="recruitment"/>
&nbsp;Applicant Tracking System
</h4>
<p style="font-size: 1.2em;">
Define available vacancies in your company and track applicants. Schedule interviews
and track progress of your candidates
</p>
</div>
<div class="callout callout-white">
<h4 class="list-group-item-heading">
<input id="payroll" class="module-check" type="checkbox" value="payroll"/>
&nbsp;Salary and Payroll
</h4>
<p style="font-size: 1.2em;">
Process your company payroll using IceHrm and Store employee salary
</p>
</div>
</div>
<?php }?>
</div>

<button onclick="modJs.saveUsage();" class="saveBtn btn btn-primary">
<i class="fa fa-save"></i><t>Save</t>
</button>
</div>
</div>
<div class="tab-pane" id="tabPageModule">
<div class="tab-pane active" id="tabPageModule">
<div id="Module" class="reviewBlock" data-content="List" style="padding-left:5px;">

</div>
Expand All @@ -155,37 +32,6 @@

modJsList['tabModule'] = new ModuleAdapter('Module','Module');
modJsList['tabModule'].setShowAddNew(false);

modJsList['tabUsage'] = new UsageAdapter('Usage','Usage');
var modJs = modJsList['tabUsage'];

$(document).ready(function(){


$("#all").click(function() {
if($(this).is(":checked")) {

$('.module-check').each(function(){
if($(this).val() != 'all'){
$(this).removeAttr('checked');
}
});
}
});

$(".module-check").click(function() {
if($(this).val() != 'all') {
$("#all").removeAttr('checked');
}
});

$('.module-check').each(function(){
if(jQuery.inArray($(this).val(), <?=json_encode($groups)?>) !== -1){
$(this).attr('checked','checked');
}

});
})

var modJs = modJsList['tabModule'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
59 changes: 41 additions & 18 deletions core/admin/overtime/index.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
<?php
/*
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
use Overtime\Common\Model\EmployeeOvertime;
use Overtime\Common\Model\OvertimeCategory;
use Classes\PermissionManager;

$moduleName = 'overtime';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
/**
* This is needed for multi level approvals
*/
$itemName = 'OvertimeRequest';
$moduleName = 'Time Management';
$itemNameLower = strtolower($itemName);
?><div class="span9">

$options = array();
$options['setRemoteTable'] = 'true';
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabOvertimeCategory" href="#tabPageOvertimeCategory"><?=t('Overtime Categories')?></a></li>
<li><a id="tabEmployeeOvertime" href="#tabPageEmployeeOvertime"><?=t('Overtime Requests')?></a></li>
</ul>

$moduleBuilder = new \Classes\ModuleBuilder\ModuleBuilder();
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'OvertimeCategory','OvertimeCategory','Overtime Categories','OvertimeCategoryAdapter','','',true,$options
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilder\ModuleTab(
'EmployeeOvertime','EmployeeOvertime','Overtime Requests','EmployeeOvertimeAdminAdapter','','',false,$options
));
echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
<div class="tab-content">
<div class="tab-pane active" id="tabPageOvertimeCategory">
<div id="OvertimeCategoryTable" class="reviewBlock" data-content="List"></div>
<div id="OvertimeCategoryForm"></div>
<div id="OvertimeCategoryFilterForm"></div>
</div>
<div class="tab-pane" id="tabPageEmployeeOvertime">
<div id="EmployeeOvertimeTable" class="reviewBlock" data-content="List"></div>
<div id="EmployeeOvertimeForm"></div>
<div id="EmployeeOvertimeFilterForm"></div>
</div>
</div>

</div>
<div id="dataGroup"></div>
<?php
$moduleData = [
'user_level' => $user->user_level,
'permissions' => [
'OvertimeCategory' => PermissionManager::checkGeneralAccess(new OvertimeCategory()),
'EmployeeOvertime' => PermissionManager::checkGeneralAccess(new EmployeeOvertime()),
]
];
?>
<script>
initAdminOvertime(<?=json_encode($moduleData)?>);
</script>
<?php include APP_BASE_PATH.'footer.php';?>

$itemName = 'OvertimeRequest';
$moduleName = 'Time Management';
$itemNameLower = strtolower($itemName);

include APP_BASE_PATH.'footer.php';
5 changes: 3 additions & 2 deletions core/api-rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
}


\Utils\LogManager::getInstance()->info("Request: " . $_REQUEST);
\Utils\LogManager::getInstance()->info("Request: " . print_r($_REQUEST, true));
\Utils\LogManager::getInstance()->info("REST_API_PATH: " . REST_API_PATH);

if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
http_response_code(200);
Expand All @@ -24,7 +25,7 @@
echo "Echo " . rand();
});

\Utils\LogManager::getInstance()->debug('Api registered URI: '.$echoRoute);
\Utils\LogManager::getInstance()->info('Api registered URI: '.$echoRoute);

$moduleManagers = \Classes\BaseService::getInstance()->getModuleManagers();

Expand Down
2 changes: 1 addition & 1 deletion core/api-url-based.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@

}else{
echo "REST Api is not enabled. Please set 'Api: REST Api Enabled' setting to true";
}
}
8 changes: 4 additions & 4 deletions core/config.base.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
}

//Version
define('VERSION', '30.0.0.OS');
define('CACHE_VALUE', '30.0.0.OS.2021-06261009');
define('VERSION_NUMBER', '300000');
define('VERSION_DATE', '26/06/2021');
define('VERSION', '31.0.0.OS');
define('CACHE_VALUE', '31.0.0.OS.2022-01141009');
define('VERSION_NUMBER', '310000');
define('VERSION_DATE', '14/01/2022');

if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','[email protected]');}
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');}
Expand Down
Loading

0 comments on commit d61e992

Please sign in to comment.