Skip to content

Commit

Permalink
Merge branch 'release/v33.5.0.OS'
Browse files Browse the repository at this point in the history
  • Loading branch information
icehrm committed Nov 2, 2024
2 parents 51131f3 + 0afb02a commit b25eaeb
Show file tree
Hide file tree
Showing 292 changed files with 46,872 additions and 13,875 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ keys.dev.pub
/app/icehrm.key
/app/data/*.*
/app/data/keys/*
/app/data/upgrades/
!/app/data/index.php
!/app/data/.htaccess
icehrm.key
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apk --no-cache add bind-tools

# Install packages
RUN apk --no-cache add php php-fpm php-opcache php-mysqli php-json php-openssl php-curl \
php-zlib php-xml php-phar php-intl php-dom php-xmlreader php-ctype php-session \
php-zlib php-xml php-phar php-intl php-dom php-xmlreader php-ctype php-session php-zip \
php-mbstring php-gd php-tokenizer nginx supervisor curl

# Install xdebug
Expand Down
6 changes: 6 additions & 0 deletions app/updater.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
if (php_sapi_name() != 'cli') {
exit();
}
include ('config.php');
include(APP_BASE_PATH.'../updater/updater.php');
4 changes: 1 addition & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@
<include name=".vagrant/**"/>
<include name=".idea/**"/>
<include name="Vagrantfile"/>
<include name="test/**"/>
<include name="tools/**"/>
<include name="robo/**"/>
<include name="deployment/**"/>
<include name="build/**"/>
<include name="build.xml"/>
Expand All @@ -258,6 +255,7 @@
<include name="web/modules/dist/*.map"/>
<include name="web/dist/*.map"/>
<include name="app/config.php"/>
<include name="doc/tools.md"/>
</fileset>
</delete>

Expand Down
7 changes: 5 additions & 2 deletions core/admin/attendance/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

use Attendance\Common\Model\Attendance;
use Classes\PermissionManager;
use Classes\SettingsManager;

$moduleName = 'attendance';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$mapAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Request Attendance Location on Mobile');
$mapAttendance = SettingsManager::getInstance()->getSetting('Attendance: Request Attendance Location on Mobile');
$overtimeStartHours = SettingsManager::getInstance()->getSetting('Attendance: Overtime Start Hour');
?><div class="span9">

<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
Expand Down Expand Up @@ -92,7 +94,8 @@
'permissions' => [
'Attendance' => PermissionManager::checkGeneralAccess(new Attendance()),
'AttendanceStatus' => [],
]
],
'overtimeStartHour' => (int)$overtimeStartHours,
];
?>
<script>
Expand Down
6 changes: 6 additions & 0 deletions core/admin/clients/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/

use Classes\BaseService;
use Classes\PermissionManager;
use Clients\Common\Model\Client;

Expand All @@ -20,6 +21,7 @@

<div class="tab-content">
<div class="tab-pane active" id="tabPageClient">
<div id="ClientTableTop" class="reviewBlock"></div>
<div id="ClientTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="ClientForm"></div>
<div id="ClientFilterForm"></div>
Expand All @@ -30,6 +32,9 @@
<?php
$moduleData = [
'user_level' => $user->user_level,
'customFields' => [
'Client' => BaseService::getInstance()->getCustomFields("Client"),
],
'permissions' => [
'Client' => PermissionManager::checkGeneralAccess(new Client()),
]
Expand All @@ -45,6 +50,7 @@
modJsList.tabClient.setAccess(data.permissions.Client);
modJsList.tabClient.setDataPipe(new IceDataPipe(modJsList.tabClient));
modJsList.tabClient.setRemoteTable(true);
modJsList.tabClient.setCustomFields(data.customFields.Client);

var modJs = modJsList['tabClient'];
</script>
Expand Down
1 change: 1 addition & 0 deletions core/admin/company_structure/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

<div class="tab-content">
<div class="tab-pane active" id="tabPageCompanyStructure">
<div id="CompanyStructureTableTop" class="reviewBlock"></div>
<div id="CompanyStructureTable" class="reviewBlock" data-content="List" style="padding-left:5px;"></div>
<div id="CompanyStructureForm"></div>
<div id="CompanyStructureFilterForm"></div>
Expand Down
2 changes: 1 addition & 1 deletion core/admin/connection/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'isOpenSource' => $isOpenSource,
'count' => $employeeCount,
'allowed' => $isIceHrmPro ? intval($data['employees']) : 'N/A',
'validUntil' => $data['licenseActivated'],
'validUntil' => date('Y-m-d', strtotime('+1 year', strtotime($data['licenseActivated'])) ),
'licenseId' => $data['key'],
],
'systemData' => [
Expand Down
1 change: 1 addition & 0 deletions core/admin/custom_fields/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<div class="tab-content">
<div class="tab-pane active" id="tabPageCustomField">
<div id="CustomFieldTableTop" class="reviewBlock"></div>
<div id="CustomFieldTable" class="reviewBlock" data-content="List"></div>
<div id="CustomFieldForm"></div>
<div id="CustomFieldFilterForm"></div>
Expand Down
27 changes: 22 additions & 5 deletions core/admin/dashboard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

$employee_directory_url = CLIENT_BASE_URL.'?g=extension&n=directory|user&m=module_Company';

$moduleManagers = BaseService::getInstance()->getModuleManagers();
$dashBoardList = array();
/** @var AbstractModuleManager $moduleManagerObj */
Expand Down Expand Up @@ -50,13 +52,27 @@
}

?><div class="span9">
<div id="NewsHolder" class="row" style="display: none;margin-bottom: 10px;">
<div class="col-lg-12 col-xs-12">
<div id="NewsMessage">
</div>
</div>
</div>
<div class="row">
<?php
foreach($dashboardList1 as $v){
echo LanguageManager::translateTnrText($v);
}
?>
</div>
<div class="row">
<div class="col-lg-12 col-xs-12">
<div id="EmployeeListWrapper" 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: 20px;">
<h4><?=t('Your Colleagues')?></h4>
<div id="EmployeeList"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-xs-12">
<div id="EmployeeOnlineOfflineChartLoader" style="width:100%;"></div>
Expand Down Expand Up @@ -86,17 +102,17 @@
<div class="small-box bg-yellow">
<div class="inner">
<h3>
<t>Buy Extensions</t>
<t>IceHrmPro</t>
</h3>
<p>
<t>Purchase New Extensions</t>
<t>Purchase IceHrmPro</t>
</p>
</div>
<div class="icon">
<i class="fa fa-store"></i>
</div>
<a target="_blank" href="https://icehrm.com/explore/extensions/" class="small-box-footer">
<t>Purchase</t> <t>Extensions</t> <i class="fa fa-arrow-circle-right"></i>
<a target="_blank" href="https://icehrm.com/purchase-icehrmpro" class="small-box-footer">
<t>Purchase</t> <t>IceHrmPro</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
Expand All @@ -108,7 +124,8 @@
var modJsList = [];

modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');

modJsList['tabDashboard'].setVersion('<?=VERSION?>');
modJsList['tabDashboard'].setUser
var modJs = modJsList['tabDashboard'];

</script>
Expand Down
154 changes: 86 additions & 68 deletions core/admin/documents/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,99 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/

use Classes\PermissionManager;
use Documents\Common\Model\CompanyDocument;
use Documents\Common\Model\Document;
use Documents\Common\Model\EmployeeDocument;
use Documents\Common\Model\PayslipDocument;

$moduleName = 'documents';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$activeStr = '';
if($user->user_level == "Manager"){
$activeStr = 'active';
}
?>
<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="tabCompanyDocument" href="#tabPageCompanyDocument">Company Documents</a></li>
<li class=""><a id="tabDocument" href="#tabPageDocument">Document Types</a></li>
<li class=""><a id="tabEmployeeDocument" href="#tabPageEmployeeDocument">Employee Documents</a></li>
<?php if($user->user_level === "Admin"){?>
<li class=""><a id="tabPayslipDocument" href="#tabPagePayslipDocument">Employee Payslip</a></li>
<?php }?>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageCompanyDocument">
<div id="CompanyDocumentTableTop" class="reviewBlock"></div>
<div id="CompanyDocumentTable" class="reviewBlock" data-content="List"></div>
<div id="CompanyDocumentForm"></div>
<div id="CompanyDocumentFilterForm"></div>
</div>
<div class="tab-pane" id="tabPageDocument">
<div id="DocumentTableTop" class="reviewBlock"></div>
<div id="DocumentTable" class="reviewBlock" data-content="List"></div>
<div id="DocumentForm"></div>
<div id="DocumentFilterForm"></div>
</div>
<div class="tab-pane" id="tabPageEmployeeDocument">
<div id="EmployeeDocumentTableTop" class="reviewBlock"></div>
<div id="EmployeeDocumentTable" class="reviewBlock" data-content="List"></div>
<div id="EmployeeDocumentForm"></div>
<div id="EmployeeDocumentFilterForm"></div>
</div>
<?php if($user->user_level === "Admin"){?>
<div class="tab-pane" id="tabPagePayslipDocument">
<div id="PayslipDocumentTableTop" class="reviewBlock"></div>
<div id="PayslipDocumentTable" class="reviewBlock" data-content="List"></div>
<div id="PayslipDocumentForm"></div>
<div id="PayslipDocumentFilterForm"></div>
</div>
<?php }?>
</div>
<?php
$moduleData = [
'user_level' => $user->user_level,
'permissions' => [
'CompanyDocument' => PermissionManager::checkGeneralAccess(new CompanyDocument()),
'Document' => PermissionManager::checkGeneralAccess(new Document()),
'EmployeeDocument' => PermissionManager::checkGeneralAccess(new EmployeeDocument()),
'PayslipDocument' => PermissionManager::checkGeneralAccess(new PayslipDocument()),
]
];
?>
<script type="text/javascript">
//var data = {"user_level":"Admin","permissions":{"CompanyDocument":["get","element","save","delete"],"Document":["get","element","save","delete"],"EmployeeDocument":["get","element","save","delete"],"PayslipDocument":["get","element","save","delete"]}};
var data = <?php echo json_encode($moduleData);?>;
var modJsList = [];
modJsList['tabCompanyDocument'] = new CompanyDocumentAdapter('CompanyDocument','CompanyDocument','','');
modJsList['tabCompanyDocument'].setObjectTypeName('CompanyDocument');
modJsList['tabCompanyDocument'].setAccess(data.permissions.CompanyDocument ? data.permissions.CompanyDocument : {});
modJsList['tabCompanyDocument'].setDataPipe(new IceDataPipe(modJsList.tabCompanyDocument));
modJsList['tabCompanyDocument'].setRemoteTable(1);
modJsList['tabCompanyDocument'].setTitle('Company Documents');

modJsList['tabDocument'] = new DocumentAdapter('Document','Document','','');
modJsList['tabDocument'].setObjectTypeName('Document');
modJsList['tabDocument'].setAccess(data.permissions.Document ? data.permissions.Document : {});
modJsList['tabDocument'].setDataPipe(new IceDataPipe(modJsList.tabDocument));
modJsList['tabDocument'].setRemoteTable(1);
modJsList['tabDocument'].setTitle('Document Types');

$moduleBuilder = new \Classes\ModuleBuilderV2\ModuleBuilder();
if($user->user_level == "Admin") {
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\CompanyDocument',
'CompanyDocument',
'CompanyDocument',
'Company Documents',
'CompanyDocumentAdapter',
'',
'',
true
));
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\Document',
'Document',
'Document',
'Document Types',
'DocumentAdapter',
'',
'',
false
));
$options1 = array();
$options1['setRemoteTable'] = 'true';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\EmployeeDocument',
'EmployeeDocument',
'EmployeeDocument',
'Employee Documents',
'EmployeeDocumentAdapter',
'',
'date_added desc',
false,
$options1
));
modJsList['tabEmployeeDocument'] = new EmployeeDocumentAdapter('EmployeeDocument','EmployeeDocument','','date_added desc');
modJsList['tabEmployeeDocument'].setRemoteTable(1);
modJsList['tabEmployeeDocument'].setObjectTypeName('EmployeeDocument');
modJsList['tabEmployeeDocument'].setAccess(data.permissions.EmployeeDocument ? data.permissions.EmployeeDocument : {});
modJsList['tabEmployeeDocument'].setDataPipe(new IceDataPipe(modJsList.tabEmployeeDocument));
modJsList['tabEmployeeDocument'].setTitle('Employee Documents');

$options1 = array();
$options1['setRemoteTable'] = 'true';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\EmployeeDocument',
'PayslipDocument',
'PayslipDocument',
'Employee Payslip',
'EmployeePayslipDocumentAdapter',
'',
'date_added desc',
false,
$options1
));
}else{
$options1 = array();
$options1['setRemoteTable'] = 'true';
$moduleBuilder->addModuleOrGroup(new \Classes\ModuleBuilderV2\ModuleTab(
'\Documents\Common\Model\EmployeeDocument',
'EmployeeDocument',
'EmployeeDocument',
'Employee Documents',
'EmployeeDocumentAdapter',
'',
'',
($user->user_level != "Admin"),
$options1
));
}
modJsList['tabPayslipDocument'] = new EmployeePayslipDocumentAdapter('PayslipDocument','PayslipDocument','','date_added desc');
modJsList['tabPayslipDocument'].setRemoteTable(1);
modJsList['tabPayslipDocument'].setObjectTypeName('PayslipDocument');
modJsList['tabPayslipDocument'].setAccess(data.permissions.PayslipDocument ? data.permissions.PayslipDocument : {});
modJsList['tabPayslipDocument'].setDataPipe(new IceDataPipe(modJsList.tabPayslipDocument));
modJsList['tabPayslipDocument'].setTitle('Employee Payslip');

echo \Classes\UIManager::getInstance()->renderModule($moduleBuilder);
var modJs = modJsList['tabCompanyDocument'];
</script>
<?php

include APP_BASE_PATH.'footer.php';
26 changes: 26 additions & 0 deletions core/admin/employees/emailTemplates/welcomeUser.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Dear #_name_#,<br/><br/>
Your account in <b>IceHrm</b> has been created on <a href="#_url_#">#_url_#</a><br/><br/>

<b>Please find your account information below:</b><br/><br/>
Username: <b>#_username_#</b><br/>
Email: <b>#_email_#</b> (You can use, username or email to login)<br/>
Temporary Password: <b>#_password_#</b> (Strongly advised to change this password once logged in)<br/>
<br/>


Login to IceHrm here: (<b><a href="#_url_#">#_url_#</a></b>)<br/>
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; margin: 30px auto; padding: 0; text-align: center;">
<tr>
<td align="center" style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box;">
<div style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box;">
<a href="#_url_#" class="button" style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box; display: inline-block; width: 200px; border-radius: 3px; color: #ffffff; font-size: 15px; line-height: 45px; text-align: center; text-decoration: none; -webkit-text-size-adjust: none; mso-hide: all; background-color: #22BC66;" target="_blank">Get Started</a>
</div>
</td>
</tr>
</table>

<font face="Arial, sans-serif" size="1" color="#4a4a4a">
THIS IS AN AUTOMATED EMAIL - REPLIES WILL BE SENT TO #_adminEmail_#
</font>
<br/>
<br/>
Loading

0 comments on commit b25eaeb

Please sign in to comment.