v26.6.0 updates

This commit is contained in:
Thilina Hasantha
2019-07-26 03:53:24 +02:00
parent c3344b99fa
commit fd99ea299e
195 changed files with 18838 additions and 2639 deletions

View File

@@ -4,27 +4,29 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'attendance_monitor';
$moduleName = 'attendance';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
$photoAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Photo Attendance');
$mapAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendance: Request Attendance Location on Mobile');
?><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="tabAttendance" href="#tabPageAttendance"><?=t('Monitor Attendance')?></a></li>
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabAttendance" href="#tabPageAttendance"><?=t('Monitor Attendance')?></a></li>
<li class=""><a id="tabAttendanceStatus" href="#tabPageAttendanceStatus"><?=t('Current Clocked In Status')?></a></li>
</ul>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageAttendance">
<div id="Attendance" class="reviewBlock" data-content="List" style="padding-left:5px;">
<div class="tab-content">
<div class="tab-pane active" id="tabPageAttendance">
<div id="Attendance" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="AttendanceForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
<div id="AttendanceForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<div class="tab-pane" id="tabPageAttendanceStatus">
<div id="AttendanceStatus" class="reviewBlock" data-content="List" style="padding-left:5px;">
@@ -34,47 +36,69 @@ $photoAttendance = \Classes\SettingsManager::getInstance()->getSetting('Attendan
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="attendancePhotoModel" 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;">Attendance Details</h3>
</div>
<div class="modal-body">
<div class="row" style="background: #f3f4f5; padding: 10px;text-align: center;">
<h4 id="attendnaceCanvasEmp"></h4>
</div>
<div class="row" style="background: #f3f4f5; padding: 10px;">
<div class="col-sm-6" style="text-align: center;">
<canvas id="attendnaceCanvasIn" height="156" width="208" style="border: 1px #222 dotted;"></canvas>
<hr/>
<span id="attendnaceCanvasPunchInTime"></span>
</div>
<div class="col-sm-6" style="text-align: center;">
<canvas id="attendnaceCanvasOut" height="156" width="208" style="border: 1px #222 dotted;"></canvas>
<hr/>
<span id="attendnaceCanvasPunchOutTime"></span>
</div>
</div>
</div>
<div class="modal-footer">
<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;">Attendance Details</h3>
</div>
<div class="modal-body">
<div class="row" style="background: #f3f4f5; padding: 10px;text-align: center;">
<h4 id="attendnaceCanvasEmp"></h4>
</div>
<div class="row" style="background: #f3f4f5; padding: 10px;">
<div id="attendnaceCanvasPunchInTimeWraper" class="col-sm-6" style="text-align: center;">
<b>In: </b><span id="attendnaceCanvasPunchInTime"></span>
</div>
<div id="attendnaceCanvasPunchOutTimeWrapper" class="col-sm-6" style="text-align: center;">
<b>Out: </b><span id="attendnaceCanvasPunchOutTime"></span>
</div>
</div>
<div id="attendancePhoto" class="row" style="background: #f3f4f5; padding: 10px;display:none;">
<div class="col-sm-6" style="text-align: center;">
</div>
</div>
</div>
</div>
<div class="col-sm-6" style="text-align: center;">
</div>
</div>
<div id="attendanceMap" class="row" style="background: #f3f4f5; padding: 10px;display:none;">
<div id="attendnaceMapCanvasInWrapper" class="col-sm-6" style="text-align: center;">
</div>
<div id="attendnaceMapCanvasOutWrapper" class="col-sm-6" style="text-align: center;">
</div>
<div class="col-sm-6" style="text-align: center;">
<span>Location: <span id="punchInLocation"></span></span>
<br/>
IP Address: <span id="punchInIp"></span>
</div>
<div class="col-sm-6" style="text-align: center;">
<span>Location: <span id="punchOutLocation"></span></span>
<br/>
IP Address: <span id="punchOutIp"></span>
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabAttendance'] = new AttendanceAdapter('Attendance','Attendance','','in_time desc');
modJsList['tabAttendance'].setRemoteTable(true);
modJsList['tabAttendance'].setPhotoAttendance(<?=$photoAttendance == '1'?>);
modJsList['tabAttendanceStatus'] = new AttendanceStatusAdapter('AttendanceStatus','AttendanceStatus','','');
modJsList['tabAttendanceStatus'].setShowAddNew(false);
var modJs = modJsList['tabAttendance'];
var modJsList = new Array();
modJsList['tabAttendance'] = new AttendanceAdapter('Attendance','Attendance','','in_time desc');
modJsList['tabAttendance'].setRemoteTable(true);
modJsList['tabAttendance'].setPhotoAttendance(<?=$photoAttendance == '1' || $mapAttendance == '1'?>);
modJsList['tabAttendanceStatus'] = new AttendanceStatusAdapter('AttendanceStatus','AttendanceStatus','','');
modJsList['tabAttendanceStatus'].setShowAddNew(false);
var modJs = modJsList['tabAttendance'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -2,7 +2,7 @@
"label": "Monitor Attendance",
"menu": "Employees",
"order": "8",
"icon": "fa-clock-o",
"icon": "fa-clock",
"user_levels": [
"Admin",
"Manager"

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'company_structure';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
@@ -40,7 +41,7 @@ path.link {
<li class="active"><a id="tabCompanyStructure" href="#tabPageCompanyStructure"><?=t('Company Structure')?></a></li>
<li><a id="tabCompanyGraph" href="#tabPageCompanyGraph"><?=t('Company Graph')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageCompanyStructure">
<div id="CompanyStructure" class="reviewBlock" data-content="List" style="padding-left:5px;">

View File

@@ -2,7 +2,7 @@
"label":"Company Structure",
"menu":"Admin",
"order":"2",
"icon":"fa-building-o",
"icon":"fa-building",
"user_levels":["Admin","Manager"],
"dashboardPosition":2,

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'dashboard';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -1,6 +1,7 @@
<?php
$moduleName = 'data';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -159,9 +159,10 @@
</div>
</div>
<div class="row" style="margin-left:10px;margin-top:20px;">
<div id="customFieldsCont">
<div id="customFieldsCont">
</div>
</div>

View File

@@ -1,6 +1,7 @@
<?php
$moduleName = 'employees';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -1,14 +1,11 @@
<?php
/*
This file is part of Ice Framework.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
Copyright (c) 2018 [Glacies UG, Berlin, Germany] (http://glacies.de)
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'fieldnames';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label": "Employee Custom Fields",
"menu": "Admin",
"order": "83",
"icon": "fa-sliders",
"icon": "fa-ruler-horizontal",
"user_levels": [
"Admin"
],

View File

@@ -4,6 +4,7 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'jobs';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -4,7 +4,8 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'CompanyLoans';
$moduleName = 'loans';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label": "Company Loans",
"menu": "Admin",
"order": "89",
"icon": "fa-shield",
"icon": "fa-money-check",
"user_levels": [
"Admin"
],

View File

@@ -1,8 +1,8 @@
{
"Admin":"fa-cubes",
"Employees":"fa-users",
"Admin Reports":"fa-file-text",
"Employees":"fa-grip-horizontal",
"Admin Reports":"fa-book-reader",
"System":"fa-cogs",
"Insights":"fa-bar-chart-o",
"Payroll":"fa-money"
"Insights":"fa-chart-line",
"Payroll":"fa-file-archive"
}

View File

@@ -1,27 +1,6 @@
<?php
/*
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 (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'metadata';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,11 +2,11 @@
"label": "Manage Metadata",
"menu": "System",
"order": "6",
"icon": "fa-sort-alpha-asc",
"icon": "fa-microchip",
"user_levels": [
"Admin"
],
"permissions": [],
"model_namespace": "\\Metadata\\Common\\Model",
"manager": "\\Metadata\\Admin\\Api\\MetadataAdminManager"
}
}

View File

@@ -4,7 +4,8 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'Modules';
$moduleName = 'modules';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'overtime';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -1,6 +1,7 @@
<?php
$moduleName = 'payroll';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -4,7 +4,8 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'Permissions';
$moduleName = 'permissions';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'projects';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -4,7 +4,8 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'company_structure';
$moduleName = 'qualifications';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label": "Qualifications Setup",
"menu": "Admin",
"order": "4",
"icon": "fa-check-square-o",
"icon": "fa-check-square",
"user_levels": [
"Admin",
"Manager"
@@ -25,4 +25,4 @@
},
"model_namespace": "\\Qualifications\\Common\\Model",
"manager": "\\Qualifications\\Admin\\Api\\QualificationsAdminManager"
}
}

View File

@@ -1,6 +1,7 @@
<?php
$moduleName = 'Reports';
$moduleName = 'reports';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label": "Reports",
"menu": "Admin Reports",
"order": "1",
"icon": "fa-file-o",
"icon": "fa-window-maximize",
"user_levels": [
"Admin",
"Manager"
@@ -11,4 +11,4 @@
"permissions": [],
"model_namespace": "\\Reports\\Common\\Model",
"manager": "\\Reports\\Admin\\Api\\ReportsAdminManager"
}
}

View File

@@ -1,6 +1,7 @@
<?php
$moduleName = 'salary';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,11 +2,11 @@
"label": "Salary",
"menu": "Payroll",
"order": "1",
"icon": "fa-money",
"icon": "fa-money-check-alt",
"user_levels": [
"Admin"
],
"permissions": [],
"model_namespace": "\\Salary\\Common\\Model",
"manager": "\\Salary\\Admin\\Api\\SalaryAdminManager"
}
}

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'settings';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'travel';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'users';
$moduleGroup = 'admin';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
@@ -12,7 +13,6 @@ $csrf = \Classes\BaseService::getInstance()->generateCsrf('User');
?><div class="span9">
<ul class="nav nav-tabs" id="modTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabUser" href="#tabPageUser"><?=t('Users')?></a></li>
<li class=""><a id="tabUserRole" href="#tabPageUserRole"><?=t('User Roles')?></a></li>
</ul>
<div class="tab-content">
@@ -24,14 +24,14 @@ $csrf = \Classes\BaseService::getInstance()->generateCsrf('User');
</div>
</div>
<div class="tab-pane" id="tabPageUserRole">
<div id="UserRole" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="UserRoleForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<!-- <div class="tab-pane" id="tabPageUserRole">-->
<!-- <div id="UserRole" class="reviewBlock" data-content="List" style="padding-left:5px;">-->
<!---->
<!-- </div>-->
<!-- <div id="UserRoleForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">-->
<!---->
<!-- </div>-->
<!-- </div>-->
</div>
</div>

View File

@@ -13,10 +13,10 @@ if(!defined('HOME_LINK_OTHERS')){
}
//Version
define('VERSION', '26.2.0.OS');
define('CACHE_VALUE', '26.2.0.OS');
define('VERSION_NUMBER', '2620');
define('VERSION_DATE', '31/01/2019');
define('VERSION', '26.6.0.OS');
define('CACHE_VALUE', '26.6.0.OS');
define('VERSION_NUMBER', '2660');
define('VERSION_DATE', '23/07/2019');
if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');}
if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');}

View File

@@ -1,9 +1,5 @@
<?php
$logoFileName = CLIENT_BASE_PATH."data/logo.png";
$logoFileUrl = CLIENT_BASE_URL."data/logo.png";
if(!file_exists($logoFileName)){
$logoFileUrl = BASE_URL."images/logo.png";
}
$logoFileUrl = \Classes\UIManager::getInstance()->getCompanyLogoUrl();
?><!DOCTYPE html>
<html>
<head>

View File

@@ -15,7 +15,7 @@
<?php if(isset($emailTemplates)){?>
modJsList[prop].setEmailTemplates(<?=json_encode($emailTemplates)?>);
<?php } ?>
modJsList[prop].setUser(<?=json_encode($user)?>);
modJsList[prop].setUser(<?=json_encode(\Classes\BaseService::getInstance()->cleanUpUser($user))?>);
<?php if(isset($_REQUEST['action']) && $_REQUEST['action'] == "new"){?>
if(modJsList[prop].newInitObject == undefined || modJsList[prop].newInitObject == null){
modJsList[prop].initFieldMasterData(null,modJsList[prop].renderForm);

View File

@@ -1,25 +1,4 @@
<?php
/*
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 (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
if (!defined('MODULE_NAME')) {
define('MODULE_NAME', $moduleName);
}

View File

@@ -57,7 +57,7 @@ msgid "Help"
msgstr "Aiuto"
msgid "About"
msgstr "Info"
msgstr "di"
msgid "Version"
msgstr "Versione"
@@ -204,7 +204,7 @@ msgid "Attendance"
msgstr "Presenze"
msgid "Time Sheets"
msgstr "Fogli Attività"
msgstr "Fogli Attività"
msgid "Attendance Sheets"
msgstr "Fogli Presenze"
@@ -219,7 +219,7 @@ msgid "My Documents"
msgstr "I Miei Documenti"
msgid "Company"
msgstr "Società"
msgstr "Società"
msgid "Staff Directory"
msgstr "Elenco del Personale"
@@ -360,7 +360,7 @@ msgid "Hours worked Last Week"
msgstr "Ore lavorate ultima settimana"
msgid "Update Time Sheet"
msgstr "Gestione Foglio Attività"
msgstr "Gestione Foglio Attività"
msgid "My Projects"
msgstr "Miei Progetti"
@@ -495,7 +495,7 @@ msgid "Contact Email"
msgstr "email"
msgid "Company Url"
msgstr "URL Società"
msgstr "URL Società"
msgid "First Contact Date"
msgstr "Data Primo Contatto"
@@ -522,10 +522,10 @@ msgid "Leaves Group"
msgstr "Gruppo Permessi"
msgid "Leaves Per Leave Period"
msgstr "Quantità nel Periodo"
msgstr "Quantità nel Periodo"
msgid "Admin can assign leave to employees"
msgstr "L'amministratore può assegnare questo permesso ai dipendenti"
msgstr "L'amministratore può assegnare questo permesso ai dipendenti"
msgid "Employees can apply for this leave type"
msgstr "I dipendenti possono richiedere questo permesso"
@@ -1320,7 +1320,7 @@ msgid "Hours in Office vs Hours Worked Graph"
msgstr "Ore in Uffice / Grafico Ore Lavorate"
msgid "Company Graph"
msgstr "Struttura Società"
msgstr "Struttura Società"
msgid "Company Documents"
msgstr "Documenti Aziendali"
@@ -1365,7 +1365,7 @@ msgid "Expenses Categories"
msgstr "Categorie Spese"
msgid "Payment Methods"
msgstr "Modalità Pagamento"
msgstr "Modalità Pagamento"
msgid "Employee Expenses"
msgstr "Spese Dipendenti"
@@ -1377,7 +1377,7 @@ msgid "Employee Salary Components"
msgstr "Componenti Stipendio Dipendenti"
msgid "Company Payroll"
msgstr "Libro Paga Società"
msgstr "Libro Paga Società"
msgid "Calculation Groups"
msgstr "Gruppi di Calcoli"
@@ -1848,7 +1848,7 @@ msgid "Native or Bilingual Proficiency"
msgstr "Conoscenza madrelingua o bilingue"
msgid "Pending"
msgstr "In attesa"
msgstr "in attesa di"
msgid "Approved"
msgstr "Approvato"
@@ -1869,7 +1869,7 @@ msgid "Completed"
msgstr "Completato"
msgid "Discussions"
msgstr "Discussioni"
msgstr "discussioni"
msgid "Load More"
msgstr "Carica di più"
@@ -1899,7 +1899,7 @@ msgid "View Announcements"
msgstr "Visualizza annunci"
msgid "Conversations"
msgstr "Conversazioni"
msgstr "conversazioni"
msgid "Start Now"
msgstr "Avviare ora"

View File

@@ -1,5 +1,13 @@
<?php
$migrationList = [];
$migrationList[] = 'v20190707_260005_attendance_location';
$migrationList[] = 'v20190707_260004_attendance_out_map';
$migrationList[] = 'v20190630_260603_add_dept_leave_to_rule';
$migrationList[] = 'v20190630_260602_add_leave_period_to_rule';
$migrationList[] = 'v20190630_260601_update_module_names';
$migrationList[] = 'v20190510_260004_add_hiring_manager_job';
$migrationList[] = 'v20190509_260004_add_location_filed_to_job';
$migrationList[] = 'v20190508_260004_update_time_zones';
$migrationList[] = 'v20190125_260003_attendance_with_map';
$migrationList[] = 'v20181106_260002_add_arabic_lang';
$migrationList[] = 'v20181025_260001_dept_based_leave_periods';

View File

@@ -13,8 +13,8 @@ create table `AssetTypes` (
`name` varchar(35) NOT NULL,
`description` TEXT NULL,
`attachment` varchar(100) NULL,
`created` DATETIME default '0000-00-00 00:00:00',
`updated` DATETIME default '0000-00-00 00:00:00',
`created` DATETIME default NULL,
`updated` DATETIME default NULL,
primary key (`id`)
) engine=innodb default charset=utf8;
SQL;
@@ -30,8 +30,8 @@ create table `CompanyAssets` (
`employee` bigint(20) NULL,
`department` bigint(20) NULL,
`description` TEXT NULL,
`created` DATETIME default '0000-00-00 00:00:00',
`updated` DATETIME default '0000-00-00 00:00:00',
`created` DATETIME default NULL,
`updated` DATETIME default NULL,
primary key (`id`),
CONSTRAINT `Fk_CompanyAssets_AssetTypes` FOREIGN KEY (`type`) REFERENCES `AssetTypes` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `Fk_CompanyAssets_Employees` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,

View File

@@ -11,8 +11,8 @@ create table `ReviewTemplates` (
`name` varchar(50) not null,
`description` varchar(500) null,
`items` text null,
`created` DATETIME default '0000-00-00 00:00:00',
`updated` DATETIME default '0000-00-00 00:00:00',
`created` DATETIME default NULL,
`updated` DATETIME default NULL,
primary key (`id`)
) engine=innodb default charset=utf8;
SQL;
@@ -28,13 +28,13 @@ create table `PerformanceReviews` (
`attendees` VARCHAR(50) NOT NULL,
`form` bigint(20) NULL,
`status` varchar(20) NOT NULL,
`review_date` DATETIME default '0000-00-00 00:00:00',
`review_period_start` DATETIME default '0000-00-00 00:00:00',
`review_period_end` DATETIME default '0000-00-00 00:00:00',
`self_assessment_due` DATETIME default '0000-00-00 00:00:00',
`review_date` DATETIME default NULL,
`review_period_start` DATETIME default NULL,
`review_period_end` DATETIME default NULL,
`self_assessment_due` DATETIME default NULL,
`notes` TEXT NULL,
`created` DATETIME default '0000-00-00 00:00:00',
`updated` DATETIME default '0000-00-00 00:00:00',
`created` DATETIME default NULL,
`updated` DATETIME default NULL,
primary key (`id`),
CONSTRAINT `Fk_PerformanceReviews_ReviewTemplates` FOREIGN KEY (`form`) REFERENCES ReviewTemplates (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `Fk_PerformanceReviews_Employees1` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
@@ -51,9 +51,9 @@ create table `ReviewFeedbacks` (
`subject` bigint(20) NULL,
`form` bigint(20) NULL,
`status` varchar(20) NOT NULL,
`dueon` DATETIME default '0000-00-00 00:00:00',
`created` DATETIME default '0000-00-00 00:00:00',
`updated` DATETIME default '0000-00-00 00:00:00',
`dueon` DATETIME default NULL,
`created` DATETIME default NULL,
`updated` DATETIME default NULL,
primary key (`id`),
CONSTRAINT `Fk_ReviewFeedbacks_ReviewTemplates` FOREIGN KEY (`form`) REFERENCES ReviewTemplates (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `Fk_ReviewFeedbacks_PerformanceReviews` FOREIGN KEY (`review`) REFERENCES PerformanceReviews (`id`) ON DELETE SET NULL ON UPDATE CASCADE,

View File

@@ -0,0 +1,460 @@
<?php
namespace Classes\Migration;
class v20190508_260004_update_time_zones extends AbstractMigration{
public function up(){
$sql = <<<'SQL'
Alter table Timezones add CONSTRAINT UNIQUE KEY `TimezoneNameKey` (`name`);
SQL;
$this->executeQuery($sql);
$timeZones = [
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"Africa/Bamako",
"Africa/Bangui",
"Africa/Banjul",
"Africa/Bissau",
"Africa/Blantyre",
"Africa/Brazzaville",
"Africa/Bujumbura",
"Africa/Cairo",
"Africa/Casablanca",
"Africa/Ceuta",
"Africa/Conakry",
"Africa/Dakar",
"Africa/Dar_es_Salaam",
"Africa/Djibouti",
"Africa/Douala",
"Africa/El_Aaiun",
"Africa/Freetown",
"Africa/Gaborone",
"Africa/Harare",
"Africa/Johannesburg",
"Africa/Juba",
"Africa/Kampala",
"Africa/Khartoum",
"Africa/Kigali",
"Africa/Kinshasa",
"Africa/Lagos",
"Africa/Libreville",
"Africa/Lome",
"Africa/Luanda",
"Africa/Lubumbashi",
"Africa/Lusaka",
"Africa/Malabo",
"Africa/Maputo",
"Africa/Maseru",
"Africa/Mbabane",
"Africa/Mogadishu",
"Africa/Monrovia",
"Africa/Nairobi",
"Africa/Ndjamena",
"Africa/Niamey",
"Africa/Nouakchott",
"Africa/Ouagadougou",
"Africa/Porto-Novo",
"Africa/Sao_Tome",
"Africa/Tripoli",
"Africa/Tunis",
"Africa/Windhoek",
"America/Adak",
"America/Anchorage",
"America/Anguilla",
"America/Antigua",
"America/Araguaina",
"America/Argentina/Buenos_Aires",
"America/Argentina/Catamarca",
"America/Argentina/Cordoba",
"America/Argentina/Jujuy",
"America/Argentina/La_Rioja",
"America/Argentina/Mendoza",
"America/Argentina/Rio_Gallegos",
"America/Argentina/Salta",
"America/Argentina/San_Juan",
"America/Argentina/San_Luis",
"America/Argentina/Tucuman",
"America/Argentina/Ushuaia",
"America/Aruba",
"America/Asuncion",
"America/Atikokan",
"America/Bahia",
"America/Bahia_Banderas",
"America/Barbados",
"America/Belem",
"America/Belize",
"America/Blanc-Sablon",
"America/Boa_Vista",
"America/Bogota",
"America/Boise",
"America/Cambridge_Bay",
"America/Campo_Grande",
"America/Cancun",
"America/Caracas",
"America/Cayenne",
"America/Cayman",
"America/Chicago",
"America/Chihuahua",
"America/Costa_Rica",
"America/Creston",
"America/Cuiaba",
"America/Curacao",
"America/Danmarkshavn",
"America/Dawson",
"America/Dawson_Creek",
"America/Denver",
"America/Detroit",
"America/Dominica",
"America/Edmonton",
"America/Eirunepe",
"America/El_Salvador",
"America/Fort_Nelson",
"America/Fortaleza",
"America/Glace_Bay",
"America/Godthab",
"America/Goose_Bay",
"America/Grand_Turk",
"America/Grenada",
"America/Guadeloupe",
"America/Guatemala",
"America/Guayaquil",
"America/Guyana",
"America/Halifax",
"America/Havana",
"America/Hermosillo",
"America/Indiana/Indianapolis",
"America/Indiana/Knox",
"America/Indiana/Marengo",
"America/Indiana/Petersburg",
"America/Indiana/Tell_City",
"America/Indiana/Vevay",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
"America/Inuvik",
"America/Iqaluit",
"America/Jamaica",
"America/Juneau",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
"America/Kralendijk",
"America/La_Paz",
"America/Lima",
"America/Los_Angeles",
"America/Lower_Princes",
"America/Maceio",
"America/Managua",
"America/Manaus",
"America/Marigot",
"America/Martinique",
"America/Matamoros",
"America/Mazatlan",
"America/Menominee",
"America/Merida",
"America/Metlakatla",
"America/Mexico_City",
"America/Miquelon",
"America/Moncton",
"America/Monterrey",
"America/Montevideo",
"America/Montserrat",
"America/Nassau",
"America/New_York",
"America/Nipigon",
"America/Nome",
"America/Noronha",
"America/North_Dakota/Beulah",
"America/North_Dakota/Center",
"America/North_Dakota/New_Salem",
"America/Ojinaga",
"America/Panama",
"America/Pangnirtung",
"America/Paramaribo",
"America/Phoenix",
"America/Port-au-Prince",
"America/Port_of_Spain",
"America/Porto_Velho",
"America/Puerto_Rico",
"America/Punta_Arenas",
"America/Rainy_River",
"America/Rankin_Inlet",
"America/Recife",
"America/Regina",
"America/Resolute",
"America/Rio_Branco",
"America/Santarem",
"America/Santiago",
"America/Santo_Domingo",
"America/Sao_Paulo",
"America/Scoresbysund",
"America/Sitka",
"America/St_Barthelemy",
"America/St_Johns",
"America/St_Kitts",
"America/St_Lucia",
"America/St_Thomas",
"America/St_Vincent",
"America/Swift_Current",
"America/Tegucigalpa",
"America/Thule",
"America/Thunder_Bay",
"America/Tijuana",
"America/Toronto",
"America/Tortola",
"America/Vancouver",
"America/Whitehorse",
"America/Winnipeg",
"America/Yakutat",
"America/Yellowknife",
"Antarctica/Casey",
"Antarctica/Davis",
"Antarctica/DumontDUrville",
"Antarctica/Macquarie",
"Antarctica/Mawson",
"Antarctica/McMurdo",
"Antarctica/Palmer",
"Antarctica/Rothera",
"Antarctica/Syowa",
"Antarctica/Troll",
"Antarctica/Vostok",
"Arctic/Longyearbyen",
"Asia/Aden",
"Asia/Almaty",
"Asia/Amman",
"Asia/Anadyr",
"Asia/Aqtau",
"Asia/Aqtobe",
"Asia/Ashgabat",
"Asia/Atyrau",
"Asia/Baghdad",
"Asia/Bahrain",
"Asia/Baku",
"Asia/Bangkok",
"Asia/Barnaul",
"Asia/Beirut",
"Asia/Bishkek",
"Asia/Brunei",
"Asia/Chita",
"Asia/Choibalsan",
"Asia/Colombo",
"Asia/Damascus",
"Asia/Dhaka",
"Asia/Dili",
"Asia/Dubai",
"Asia/Dushanbe",
"Asia/Famagusta",
"Asia/Gaza",
"Asia/Hebron",
"Asia/Ho_Chi_Minh",
"Asia/Hong_Kong",
"Asia/Hovd",
"Asia/Irkutsk",
"Asia/Jakarta",
"Asia/Jayapura",
"Asia/Jerusalem",
"Asia/Kabul",
"Asia/Kamchatka",
"Asia/Karachi",
"Asia/Kathmandu",
"Asia/Khandyga",
"Asia/Kolkata",
"Asia/Krasnoyarsk",
"Asia/Kuala_Lumpur",
"Asia/Kuching",
"Asia/Kuwait",
"Asia/Macau",
"Asia/Magadan",
"Asia/Makassar",
"Asia/Manila",
"Asia/Muscat",
"Asia/Nicosia",
"Asia/Novokuznetsk",
"Asia/Novosibirsk",
"Asia/Omsk",
"Asia/Oral",
"Asia/Phnom_Penh",
"Asia/Pontianak",
"Asia/Pyongyang",
"Asia/Qatar",
"Asia/Qyzylorda",
"Asia/Riyadh",
"Asia/Sakhalin",
"Asia/Samarkand",
"Asia/Seoul",
"Asia/Shanghai",
"Asia/Singapore",
"Asia/Srednekolymsk",
"Asia/Taipei",
"Asia/Tashkent",
"Asia/Tbilisi",
"Asia/Tehran",
"Asia/Thimphu",
"Asia/Tokyo",
"Asia/Tomsk",
"Asia/Ulaanbaatar",
"Asia/Urumqi",
"Asia/Ust-Nera",
"Asia/Vientiane",
"Asia/Vladivostok",
"Asia/Yakutsk",
"Asia/Yangon",
"Asia/Yekaterinburg",
"Asia/Yerevan",
"Atlantic/Azores",
"Atlantic/Bermuda",
"Atlantic/Canary",
"Atlantic/Cape_Verde",
"Atlantic/Faroe",
"Atlantic/Madeira",
"Atlantic/Reykjavik",
"Atlantic/South_Georgia",
"Atlantic/St_Helena",
"Atlantic/Stanley",
"Australia/Adelaide",
"Australia/Brisbane",
"Australia/Broken_Hill",
"Australia/Currie",
"Australia/Darwin",
"Australia/Eucla",
"Australia/Hobart",
"Australia/Lindeman",
"Australia/Lord_Howe",
"Australia/Melbourne",
"Australia/Perth",
"Australia/Sydney",
"Europe/Amsterdam",
"Europe/Andorra",
"Europe/Astrakhan",
"Europe/Athens",
"Europe/Belgrade",
"Europe/Berlin",
"Europe/Bratislava",
"Europe/Brussels",
"Europe/Bucharest",
"Europe/Budapest",
"Europe/Busingen",
"Europe/Chisinau",
"Europe/Copenhagen",
"Europe/Dublin",
"Europe/Gibraltar",
"Europe/Guernsey",
"Europe/Helsinki",
"Europe/Isle_of_Man",
"Europe/Istanbul",
"Europe/Jersey",
"Europe/Kaliningrad",
"Europe/Kiev",
"Europe/Kirov",
"Europe/Lisbon",
"Europe/Ljubljana",
"Europe/London",
"Europe/Luxembourg",
"Europe/Madrid",
"Europe/Malta",
"Europe/Mariehamn",
"Europe/Minsk",
"Europe/Monaco",
"Europe/Moscow",
"Europe/Oslo",
"Europe/Paris",
"Europe/Podgorica",
"Europe/Prague",
"Europe/Riga",
"Europe/Rome",
"Europe/Samara",
"Europe/San_Marino",
"Europe/Sarajevo",
"Europe/Saratov",
"Europe/Simferopol",
"Europe/Skopje",
"Europe/Sofia",
"Europe/Stockholm",
"Europe/Tallinn",
"Europe/Tirane",
"Europe/Ulyanovsk",
"Europe/Uzhgorod",
"Europe/Vaduz",
"Europe/Vatican",
"Europe/Vienna",
"Europe/Vilnius",
"Europe/Volgograd",
"Europe/Warsaw",
"Europe/Zagreb",
"Europe/Zaporozhye",
"Europe/Zurich",
"Indian/Antananarivo",
"Indian/Chagos",
"Indian/Christmas",
"Indian/Cocos",
"Indian/Comoro",
"Indian/Kerguelen",
"Indian/Mahe",
"Indian/Maldives",
"Indian/Mauritius",
"Indian/Mayotte",
"Indian/Reunion",
"Pacific/Apia",
"Pacific/Auckland",
"Pacific/Bougainville",
"Pacific/Chatham",
"Pacific/Chuuk",
"Pacific/Easter",
"Pacific/Efate",
"Pacific/Enderbury",
"Pacific/Fakaofo",
"Pacific/Fiji",
"Pacific/Funafuti",
"Pacific/Galapagos",
"Pacific/Gambier",
"Pacific/Guadalcanal",
"Pacific/Guam",
"Pacific/Honolulu",
"Pacific/Kiritimati",
"Pacific/Kosrae",
"Pacific/Kwajalein",
"Pacific/Majuro",
"Pacific/Marquesas",
"Pacific/Midway",
"Pacific/Nauru",
"Pacific/Niue",
"Pacific/Norfolk",
"Pacific/Noumea",
"Pacific/Pago_Pago",
"Pacific/Palau",
"Pacific/Pitcairn",
"Pacific/Pohnpei",
"Pacific/Port_Moresby",
"Pacific/Rarotonga",
"Pacific/Saipan",
"Pacific/Tahiti",
"Pacific/Tarawa",
"Pacific/Tongatapu",
"Pacific/Wake",
"Pacific/Wallis",
"UTC"
];
$main = "REPLACE INTO Timezones (`name`, `details`) VALUES ";
$template = "('%s', '%s')";
$data = '';
for ($i = 0; $i < count($timeZones); $i++) {
$data .= sprintf($template, $timeZones[$i], $timeZones[$i]);
if ($i < count($timeZones) - 1) {
$data.= ',';
}
}
$data = $main.$data.';';
$this->executeQuery($data);
$sql = <<<'SQL'
DELETE from Timezones where name = 'Greenland';
SQL;
return $this->executeQuery($sql);
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Classes\Migration;
class v20190509_260004_add_location_filed_to_job extends AbstractMigration{
public function up(){
$sql = <<<'SQL'
Alter table Job add column `location` varchar(500) NULL;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Job add column `postalCode` varchar(20) NULL;
SQL;
return $this->executeQuery($sql);
}
}

View File

@@ -0,0 +1,91 @@
<?php
namespace Classes\Migration;
use Candidates\Common\Model\Application;
use Candidates\Common\Model\Candidate;
class v20190510_260004_add_hiring_manager_job extends AbstractMigration{
public function up(){
$sql = <<<'SQL'
Alter table Job add column `hiringManager` bigint(20) null;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Job add column `companyName` varchar(100) NULL;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Job add column `showHiringManager` enum('Yes','No') default NULL;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
create table `HiringPipeline` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NULL,
`type` enum('Short Listed','Phone Screen','Assessment','Interview','Offer','Hired','Rejected','Archived') default 'Short Listed',
`notes` text DEFAULT NULL,
primary key (`id`)
) engine=innodb default charset=utf8;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
INSERT INTO HiringPipeline (`name`, `type`) VALUES
('Sourced', 'Short Listed'),
('Applied', 'Short Listed'),
('Phone Screen', 'Phone Screen'),
('Assessment', 'Assessment'),
('First Interview', 'Interview'),
('Second Interview', 'Interview'),
('Final Interview', 'Interview'),
('Offer Sent', 'Offer'),
('Offer Accepted', 'Offer'),
('Offer Rejected', 'Offer'),
('Not Qualified', 'Rejected'),
('Archived', 'Archived'),
('Hired', 'Hired');
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Candidates add column `hiringStage` bigint(20) NULL;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Candidates add column `jobId` bigint(20) NULL;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Candidates add column `source` enum('Sourced','Applied') default 'Sourced';
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Candidates add column `emailSent` int(11) default 0;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Interviews add column `scheduleUpdated` int(11) default 0;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Interviews add column `interviewers` TEXT default NULL;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
CREATE INDEX source_emailSent ON Candidates (source, emailSent);
SQL;
$this->executeQuery($sql);
return true;
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Classes\Migration;
class v20190630_260601_update_module_names extends AbstractMigration {
public function up(){
$sql = <<<'SQL'
Update Settings set value = '1' where name = 'System: Reset Module Names';
SQL;
return $this->executeQuery($sql);
}
public function down(){
return true;
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Classes\Migration;
class v20190630_260602_add_leave_period_to_rule extends AbstractMigration {
public function up(){
$sql = <<<'SQL'
Alter table LeaveRules add column `leave_period` bigint(20) null;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table LeaveRules ADD CONSTRAINT `Fk_LeaveRules_leave_period` FOREIGN KEY (`leave_period`) REFERENCES `LeavePeriods` (`id`);
SQL;
return $this->executeQuery($sql);
}
public function down(){
return true;
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Classes\Migration;
class v20190630_260603_add_dept_leave_to_rule extends AbstractMigration {
public function up(){
$sql = <<<'SQL'
Alter table LeaveRules add column `department` bigint(20) null;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table LeaveRules ADD CONSTRAINT `Fk_LeaveRules_department` FOREIGN KEY (`department`) REFERENCES `CompanyStructures` (`id`);
SQL;
return $this->executeQuery($sql);
}
public function down(){
return true;
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace Classes\Migration;
class v20190707_260004_attendance_out_map extends AbstractMigration{
public function up(){
$sql = <<<'SQL'
Alter table Attendance add column `map_out_lat` DECIMAL(10, 8) NULL;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Attendance add column `map_out_lng` DECIMAL(10, 8) NULL;
SQL;
return $this->executeQuery($sql);
}
public function down(){
return true;
}
}

View File

@@ -0,0 +1,42 @@
<?php
namespace Classes\Migration;
class v20190707_260005_attendance_location extends AbstractMigration {
public function up(){
$sql = <<<'SQL'
REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
('Attendance: Request Attendance Location on Mobile', '1', 'Push attendance location when marking attendance via mobile app','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES
('System: Google Maps Api Key', '', 'Google Map Api Key','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]');
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Attendance add column `map_out_snapshot` longtext default null;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Attendance add column `in_ip` varchar(25) default null;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
Alter table Attendance add column `out_ip` varchar(25) default null;
SQL;
return $this->executeQuery($sql);
}
public function down(){
return true;
}
}

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'attendance';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label": "Attendance",
"menu": "Time Management",
"order": "2",
"icon": "fa-clock-o",
"icon": "fa-clock",
"user_levels": [
"Admin",
"Manager",
@@ -12,4 +12,4 @@
"permissions": [],
"model_namespace": "\\Attendance\\Common\\Model",
"manager": "\\Attendance\\User\\Api\\AttendanceModulesManager"
}
}

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'dashboard';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -4,7 +4,8 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'emergency_contact';
$moduleName = 'dependents';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label":"Dependents",
"menu":"Personal Information",
"order":"5",
"icon":"fa-sliders",
"icon":"fa-expand",
"user_levels":["Admin","Manager","Employee"],
"permissions":

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'emergency_contact';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'employees';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
@@ -30,7 +31,7 @@ if (defined('SYM_CLIENT')) {
} else if (defined('REST_API_BASE')){
$restApiBase = REST_API_BASE;
} else {
$restApiBase = CLIENT_BASE_PATH.'api/';
$restApiBase = CLIENT_BASE_URL.'api/';
}
?>
<script type="text/javascript" src="<?=BASE_URL.'js/d3js/d3.js?v='.$jsVersion?>"></script>

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'loans';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label": "Loans",
"menu": "Finance",
"order": "3",
"icon": "fa-shield",
"icon": "fa-money-check",
"user_levels": [
"Admin",
"Manager",
@@ -11,4 +11,4 @@
"permissions": [],
"model_namespace": "\\Loans\\Common\\Model",
"manager": "\\Loans\\User\\Api\\LoansModulesManager"
}
}

View File

@@ -1,13 +1,13 @@
{
"Discussions":"fa-comments",
"Personal Information":"fa-male",
"Leave":"fa-calendar-o",
"Time Management":"fa-clock-o",
"Documents":"fa-files-o",
"Personal Information":"fa-grip-horizontal",
"Leave":"fa-calendar-alt",
"Time Management":"fa-hourglass-half",
"Documents":"fa-file-alt",
"Company":"fa-building",
"Training":"fa-briefcase",
"Performance":"fa-crosshairs",
"Travel Management":"fa-plane",
"Finance":"fa-money",
"User Reports":"fa-file-text"
"Performance":"fa-bezier-curve",
"Travel Management":"fa-globe",
"Finance":"fa-calculator",
"User Reports":"fa-book-reader"
}

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'overtime';
$moduleGroup = 'modules';
$moduleMainName = "EmployeeOvertime"; // for creating module js lib
$subModuleMainName = "SubordinateEmployeeOvertime";
$moduleItemName = "Overtime Request"; // For permissions

View File

@@ -2,7 +2,7 @@
"label": "Overtime Requests",
"menu": "Time Management",
"order": "5",
"icon": "fa-align-center",
"icon": "fa-calendar-plus",
"user_levels": [
"Admin",
"Manager",
@@ -12,4 +12,4 @@
"permissions": [],
"model_namespace": "\\Overtime\\Common\\Model",
"manager": "\\Overtime\\User\\Api\\OvertimeModulesManager"
}
}

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'projects';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -2,7 +2,7 @@
"label": "Projects",
"menu": "Time Management",
"order": "1",
"icon": "fa-pencil-square",
"icon": "fa-project-diagram",
"user_levels": [
"Admin",
"Manager",
@@ -23,4 +23,4 @@
},
"model_namespace": "\\Projects\\Common\\Model",
"manager": "\\Projects\\User\\Api\\ProjectsModulesManager"
}
}

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'qualifications';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -1,24 +1,25 @@
<?php
<?php
$moduleName = 'Reports';
$moduleName = 'reports';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
$additionalJs = array();
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="tabUserReport" href="#tabPageUserReport"><?=t('Reports')?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageUserReport">
<div id="UserReport" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="UserReportForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
@@ -40,4 +41,4 @@ modJsList['tabReport'].setShowAddNew(false);
var modJs = modJsList['tabUserReport'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -2,7 +2,7 @@
"label": "Reports",
"menu": "User Reports",
"order": "1",
"icon": "fa-file-o",
"icon": "fa-window-maximize",
"user_levels": [
"Admin",
"Manager",
@@ -12,4 +12,4 @@
"permissions": [],
"model_namespace": "\\Reports\\Common\\Model",
"manager": "\\Reports\\User\\Api\\ReportsModulesManager"
}
}

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'salary';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -4,7 +4,8 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'salary';
$moduleName = 'staffdirectory';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';

View File

@@ -4,7 +4,8 @@
Developer: Thilina Hasantha (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
$moduleName = 'employee_TimeSheet';
$moduleName = 'time_sheets';
$moduleGroup = 'modules';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
@@ -97,7 +98,7 @@ modJsList['tabSubEmployeeTimeSheetAll'].setNeedStartEndTime(<?=$startEndTimeNeed
modJsList['tabEmployeeTimeEntry'] = new EmployeeTimeEntryAdapter('EmployeeTimeEntry','EmployeeTimeEntry','','');
modJsList['tabEmployeeTimeEntry'].setShowAddNew(false);
modJsList['tabQtsheet'] = new QtsheetAdapter('Qtsheet','Qtsheet');
modJsList['tabQtsheet'] = new QtsheetAdapter('Qtsheet','Qtsheet','','name');
modJsList['tabQtsheet'].setRemoteTable(false);
modJsList['tabQtsheet'].setShowAddNew(false);
modJsList['tabQtsheet'].setModulePath('modules=time_sheets');

View File

@@ -2,7 +2,7 @@
"label":"Time Sheets",
"menu":"Time Management",
"order":"3",
"icon":"fa-check-circle-o",
"icon":"fa-stopwatch",
"user_levels":["Admin","Manager","Employee"],
"dashboardPosition":104,

View File

@@ -5,6 +5,7 @@
*/
$moduleName = 'travel';
$moduleGroup = 'modules';
$moduleMainName = "EmployeeTravelRecord"; // for creating module js lib
$subModuleMainName = "SubordinateEmployeeTravelRecord";
$moduleItemName = "Travel Request"; // For permissions

View File

@@ -10,7 +10,7 @@ if(\Classes\SettingsManager::getInstance()->getSetting('Api: REST Api Enabled')
if (defined('SYM_CLIENT')) {
define('REST_API_PATH', '/'.SYM_CLIENT.'/');
} else {
} else if (!defined('REST_API_PATH')){
define('REST_API_PATH', '/');
}

View File

@@ -1,25 +1,4 @@
<?php
/*
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 (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
define('CLIENT_PATH',dirname(__FILE__));
include ("config.base.php");
include ("include.common.php");

View File

@@ -9,9 +9,11 @@ use Classes\IceResponse;
use Classes\LanguageManager;
use Classes\PermissionManager;
use Classes\RestEndPoint;
use Classes\SettingsManager;
use Employees\Common\Model\Employee;
use Users\Common\Model\User;
use Utils\LogManager;
use Utils\NetworkUtils;
class AttendanceRestEndPoint extends RestEndPoint
{
@@ -163,7 +165,7 @@ class AttendanceRestEndPoint extends RestEndPoint
$openPunch = $this->getOpenPunch($user, $body['employee'], $body['in_time']);
if ($openPunch->getStatus() === IceResponse::SUCCESS && !empty($openPunch->getData()['attendnace'])) {
if ($openPunch->getStatus() === IceResponse::SUCCESS && !empty($openPunch->getData()['attendance'])) {
return new IceResponse(IceResponse::ERROR, 'User has already punched in for the day ', 400);
}
@@ -172,7 +174,17 @@ class AttendanceRestEndPoint extends RestEndPoint
return $permissionResponse;
}
$response = BaseService::getInstance()->addElement(self::ELEMENT_NAME, $body);
$response = $this->savePunch(
$body['employee'],
$body['in_time'],
$body['note'],
null,
null,
$body['latitude'],
$body['longitude'],
NetworkUtils::getClientIp()
);
if ($response->getStatus() === IceResponse::SUCCESS) {
$attendance = $this->cleanObject($response->getData());
$response->setData($attendance);
@@ -211,7 +223,10 @@ class AttendanceRestEndPoint extends RestEndPoint
$attendance->in_time,
$body['note'],
$body['out_time'],
$attendance->id
$attendance->id,
$body['latitude'],
$body['longitude'],
NetworkUtils::getClientIp()
);
if ($response->getStatus() === IceResponse::SUCCESS) {
@@ -262,7 +277,7 @@ class AttendanceRestEndPoint extends RestEndPoint
}
}
protected function savePunch($employeeId, $inDateTime, $note = null, $outDateTime = null, $id = null)
protected function savePunch($employeeId, $inDateTime, $note = null, $outDateTime = null, $id = null, $latitude = null, $longitude = null, $ip = null)
{
$employee = BaseService::getInstance()->getElement(
'Employee',
@@ -339,8 +354,16 @@ class AttendanceRestEndPoint extends RestEndPoint
$attendance->in_time = $inDateTime;
if (empty($outDateTime)) {
$attendance->out_time = null;
$attendance->map_lat = $latitude;
$attendance->map_lng = $longitude;
$attendance->map_snapshot = $this->generateMapLocationImage($latitude, $longitude);
$attendance->in_ip = $ip;
} else {
$attendance->out_time = $outDateTime;
$attendance->map_out_lat = $latitude;
$attendance->map_out_lng = $longitude;
$attendance->map_out_snapshot = $this->generateMapLocationImage($latitude, $longitude);
$attendance->out_ip = $ip;
}
$attendance->employee = $employeeId;
@@ -352,4 +375,34 @@ class AttendanceRestEndPoint extends RestEndPoint
}
return new IceResponse(IceResponse::SUCCESS, $attendance);
}
protected function generateMapLocationImage($latitude, $longitude)
{
if (empty(SettingsManager::getInstance()->getSetting('System: Google Maps Api Key'))
|| empty($latitude)
|| empty($longitude)
) {
return null;
}
$location = sprintf('%s,%s', $latitude, $longitude);
$url = "https://maps.googleapis.com/maps/api/staticmap?&zoom=15&size=210x175&maptype=roadmap
&markers=color:blue%7Clabel:S%7C$location&markers=color:green%7Clabel:G%7C$location
&markers=color:red%7Clabel:C%7C$location
&key=".SettingsManager::getInstance()->getSetting('System: Google Maps Api Key');
LogManager::getInstance()->info('Url:'.$url);
$data = file_get_contents($url);
//LogManager::getInstance()->info('Data:'.$data);
if (!empty($data)) {
//LogManager::getInstance()->info('Data Base64:'.base64_encode($data));
return'data:image/png;base64,' . base64_encode($data);
}
return null;
}
}

View File

@@ -17,6 +17,7 @@ use Classes\SettingsManager;
use Classes\SubActionManager;
use TimeSheets\Common\Model\EmployeeTimeSheet;
use Utils\LogManager;
use Utils\NetworkUtils;
class AttendanceActionManager extends SubActionManager
{
@@ -132,6 +133,7 @@ class AttendanceActionManager extends SubActionManager
$openPunch->out_time = $dateTime;
$openPunch->note = $req->note;
$openPunch->image_out = $req->image;
$openPunch->out_ip = NetworkUtils::getClientIp();
$this->baseService->audit(IceConstants::AUDIT_ACTION, "Punch Out \ time:".$openPunch->out_time);
} else {
$openPunch->in_time = $dateTime;
@@ -139,6 +141,7 @@ class AttendanceActionManager extends SubActionManager
$openPunch->note = $req->note;
$openPunch->image_in = $req->image;
$openPunch->employee = $employee->id;
$openPunch->in_ip = NetworkUtils::getClientIp();
$this->baseService->audit(IceConstants::AUDIT_ACTION, "Punch In \ time:".$openPunch->in_time);
}
$ok = $openPunch->Save();

View File

@@ -1,25 +1,4 @@
<?php
/*
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 (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
namespace Classes;
abstract class AbstractInitialize

View File

@@ -1,27 +1,5 @@
<?php
/*
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 (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
/**
* BaseService class serves as the core logic for managing the application and for handling most
* of the tasks related to retriving and saving data. This can be referred within any module using
@@ -74,6 +52,8 @@ class BaseService
public $modelClassMap = array();
public $currentProfileId = false;
protected $pro = null;
private static $me = null;
private function __construct()
@@ -1098,6 +1078,42 @@ class BaseService
return $obj;
}
public function cleanUpIgnoreKeys($obj)
{
unset($obj->keysToIgnore);
return $obj;
}
public function cleanUpApprovalModelParameters($obj)
{
unset($obj->notificationModuleName);
unset($obj->notificationUnitName);
unset($obj->notificationUnitPrefix);
unset($obj->notificationUnitAdminUrl);
unset($obj->preApproveSettingName);
return $obj;
}
public function cleanUpAll($obj)
{
$obj = $this->cleanUpAdoDB($obj);
$obj = $this->cleanUpIgnoreKeys($obj);
return $obj;
}
public function cleanUpUser($obj)
{
$obj = $this->cleanUpAdoDB($obj);
unset($obj->password);
unset($obj->login_hash);
unset($obj->googleUserData);
return $obj;
}
public function setDB($db)
{
$this->db = $db;
@@ -1529,6 +1545,26 @@ class BaseService
return call_user_func_array(array(new $class(), $ch->method), $parameters);
}
public function initializePro()
{
$this->pro = null;
if (class_exists('\\Classes\\ProVersion')) {
$pro = new ProVersion();
if (method_exists($pro, 'isModuleEnabled')) {
$this->pro = $pro;
}
}
}
public function isModuleEnabled($type, $name)
{
if ($this->pro === null) {
return true;
}
return $this->pro->isModuleEnabled($type, $name);
}
public function cleanNonUTFChar($obj)
{
$regex = <<<'END'

View File

@@ -1,25 +1,4 @@
<?php
/*
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 (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
namespace Classes;
use Model\File;

View File

@@ -228,7 +228,7 @@ class MigrationManager
if (count($migrationList) > 0 && (empty($migration->id) || $migrationList[0].".php" != $migration->file)) {
LogManager::getInstance()->info("ensureMigrations - execute migrations");
$this->queueMigrations();
$this->runPendingMigrations();
}
$this->runPendingMigrations();
}
}

View File

@@ -3,6 +3,7 @@ namespace Classes;
use Classes\Data\DataReader;
use Classes\Data\Query\DataQuery;
use Classes\Upload\Uploader;
use Employees\Common\Model\Employee;
use Users\Common\Model\User;
use Utils\SessionUtils;
@@ -327,4 +328,26 @@ class RestEndPoint
$inputJSON = file_get_contents('php://input');
return json_decode($inputJSON, true);
}
protected function getFile()
{
return $_FILES;
}
public function uploadFile(User $user)
{
$fileData = $this->getFile();
$postData = [
'file_name' => '_NEW_',
'user' => $user->employee,
'file_group' => static::ELEMENT_NAME
];
$fileResponse = Uploader::upload($postData, $fileData);
if ($fileResponse->getStatus() === IceResponse::SUCCESS) {
return new IceResponse(IceResponse::SUCCESS, ['data' => $fileResponse->getData()], 201);
}
return $fileResponse;
}
}

View File

@@ -1,25 +1,4 @@
<?php
/*
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 (http://lk.linkedin.com/in/thilinah | https://github.com/thilinah)
*/
namespace Classes;
abstract class SubActionManager
@@ -56,16 +35,19 @@ abstract class SubActionManager
$this->emailTemplates = $emailTemplates;
}
public function getEmailTemplate($name)
public function getEmailTemplate($name, $modulePath = null)
{
if ($modulePath == null) {
$modulePath = MODULE_PATH;
}
//Read module email templates
if ($this->emailTemplates == null) {
$this->emailTemplates = array();
if (is_dir(MODULE_PATH.'/emailTemplates/')) {
$ams = scandir(MODULE_PATH.'/emailTemplates/');
if (is_dir($modulePath.'/emailTemplates/')) {
$ams = scandir($modulePath.'/emailTemplates/');
foreach ($ams as $am) {
if (!is_dir(MODULE_PATH.'/emailTemplates/'.$am) && $am != '.' && $am != '..') {
$this->emailTemplates[$am] = file_get_contents(MODULE_PATH.'/emailTemplates/'.$am);
if (!is_dir($modulePath.'/emailTemplates/'.$am) && $am != '.' && $am != '..') {
$this->emailTemplates[$am] = file_get_contents($modulePath.'/emailTemplates/'.$am);
}
}
}

View File

@@ -87,37 +87,43 @@ class UIManager
$this->currentProfileBlock = array(
"profileImage"=>$profileCurrent->image,
"firstName"=>$profileCurrent->first_name,
"lastName"=>$profileCurrent->last_name
"lastName"=>$profileCurrent->last_name,
"profile_url"=>CLIENT_BASE_URL.'?g=admin&n=employees&m=admin_Employees',
);
$this->switchedProfileBlock = array(
"profileImage"=>$profileSwitched->image,
"firstName"=>$profileSwitched->first_name,
"lastName"=>$profileSwitched->last_name
"lastName"=>$profileSwitched->last_name,
"profile_url"=>CLIENT_BASE_URL.'?g=modules&n=employees&m=module_Personal_Information',
);
} elseif (!empty($profileCurrent)) {
$this->currentProfileBlock = array(
"profileImage"=>$profileCurrent->image,
"firstName"=>$profileCurrent->first_name,
"lastName"=>$profileCurrent->last_name
"lastName"=>$profileCurrent->last_name,
"profile_url"=>CLIENT_BASE_URL.'?g=modules&n=employees&m=module_Personal_Information',
);
} elseif (!empty($profileSwitched)) {
$this->currentProfileBlock = array(
"profileImage"=>BASE_URL."images/user_male.png",
"firstName"=>$this->user->username,
"lastName"=>""
"lastName"=>"",
"profile_url"=>CLIENT_BASE_URL.'?g=admin&n=employees&m=admin_Employees',
);
$this->switchedProfileBlock = array(
"profileImage"=>$profileSwitched->image,
"firstName"=>$profileSwitched->first_name,
"lastName"=>$profileSwitched->last_name
"lastName"=>$profileSwitched->last_name,
"profile_url"=>CLIENT_BASE_URL.'?g=modules&n=employees&m=module_Personal_Information',
);
} else {
$this->currentProfileBlock = array(
"profileImage"=>BASE_URL."images/user_male.png",
"firstName"=>$this->user->username,
"lastName"=>""
"lastName"=>"",
"profile_url"=>CLIENT_BASE_URL.'?g=admin&n=employees&m=admin_Employees',
);
}
}

View File

@@ -21,4 +21,43 @@ class Timezone extends BaseModel
{
return array("get","element");
}
public function getTimezonesWithOffset()
{
$tz = new Timezone();
$tzs = $tz->Find("1 = 1");
$modifiedTimeZones = [];
foreach ($tzs as $tz) {
try {
$z = new \DateTimeZone($tz->name);
$c = new \DateTime(null, $z);
$tz->details = sprintf("(%s) %s", $this->formatOffset($z->getOffset($c)), $tz->name);
$modifiedTimeZones[] = $tz;
} catch (\Exception $e) {
}
}
usort($modifiedTimeZones, function ($a, $b) { return strcmp($a->details, $b->details); });
return $modifiedTimeZones;
}
public function formatOffset($offset) {
$hours = $offset / 3600;
$remainder = $offset % 3600;
$sign = $hours > 0 ? '+' : '-';
$hour = (int) abs($hours);
$minutes = (int) abs($remainder / 60);
if ($hour == 0 AND $minutes == 0) {
$sign = ' ';
}
return 'GMT' . $sign . str_pad($hour, 2, '0', STR_PAD_LEFT)
.':'. str_pad($minutes,2, '0');
}
public function fieldValueMethods()
{
return ['getTimezonesWithOffset'];
}
}

View File

@@ -1,6 +1,7 @@
<?php
namespace Metadata\Rest;
use Classes\BaseService;
use Classes\Data\Query\DataQuery;
use Classes\IceResponse;
use Classes\RestEndPoint;
@@ -44,6 +45,8 @@ class MetadataRestEndPoint extends RestEndPoint
$module = new Module();
$modules = $module->Find('name = ? and mod_group = ? and status = ?', [$name, 'user', 'Enabled']);
return count($modules) > 0;
BaseService::getInstance()->initializePro();
return count($modules) > 0 && BaseService::getInstance()->isModuleEnabled('modules', $name);
}
}

View File

@@ -8,6 +8,18 @@
namespace Model;
/**
* Class Cron
* @package Model
*
* @property int $id
* @property string $name
* @property string $class
* @property int $frequency
* @property int $time
* @property string $type
* @property string $status
*/
class Cron extends BaseModel
{
public $table = 'Crons';

View File

@@ -9,6 +9,7 @@
namespace Model;
use Classes\BaseService;
use Classes\IceResponse;
use Classes\RestApiManager;
use Users\Common\Model\User;
@@ -41,10 +42,10 @@ class Setting extends BaseModel
return $obj;
}
public function executePostSaveActions($obj)
public function validateSave($obj)
{
if (!defined('WEB_ADMIN_BASE_URL')) {
return;
return new IceResponse(IceResponse::SUCCESS, "");
}
if ($obj->name == 'Company: Country') {
@@ -57,12 +58,42 @@ class Setting extends BaseModel
$updateInvUrl = WEB_ADMIN_BASE_URL.'/app/update_instance.php?client='
.CLIENT_NAME.'&vatId='.$obj->value.'&key='.ADMIN_SEC_KEY;
$response = file_get_contents($updateInvUrl);
$response = json_decode($response, true);
if ($response['status'] === IceResponse::ERROR) {
return new IceResponse(IceResponse::ERROR, $response['data']);
}
}
return new IceResponse(IceResponse::SUCCESS, "");
}
public function executePreSaveActions($obj)
{
if ($obj->name == 'Leave: Select Leave Period from Employee Department Country') {
$oldSetting = new Setting();
$oldSetting->Load('name = ?', ['Leave: Select Leave Period from Employee Department Country']);
if (class_exists('\Leaves\Common\Model\EmployeeLeave')) {
$employeeLeave = new \Leaves\Common\Model\EmployeeLeave();
$employeeLeaves = $employeeLeave->Find("1 = 1 limit 1", []);
if (count($employeeLeaves) === 1) {
$obj->value = $oldSetting->value;
}
}
}
return new IceResponse(IceResponse::SUCCESS, $obj);
}
public function executePreUpdateActions($obj)
{
return $this->executePreSaveActions($obj);
}
public function executePostSaveActions($obj)
{
}
public function executePostUpdateActions($obj)
{
$this->executePostSaveActions($obj);
}
public $table = 'Settings';

View File

@@ -82,4 +82,9 @@ class Project extends BaseModel
return $employeeProjects;
}
public function fieldValueMethods()
{
return ['getEmployeeProjects'];
}
}

View File

@@ -9,6 +9,7 @@
namespace Settings\Admin\Api;
use Classes\AbstractModuleManager;
use Settings\Rest\SettingsRestEndPoint;
class SettingsAdminManager extends AbstractModuleManager
{
@@ -35,4 +36,12 @@ class SettingsAdminManager extends AbstractModuleManager
{
return new SettingsInitialize();
}
public function setupRestEndPoints()
{
\Classes\Macaw::get(REST_API_PATH.'settings', function () {
$restEndPoint = new SettingsRestEndPoint();
$restEndPoint->process('getMobileSettings', []);
});
}
}

View File

@@ -301,10 +301,10 @@ class TimeSheetsActionManager extends SubActionManager
$project = new $rowTable();
if (SettingsManager::getInstance()->getSetting("Projects: Make All Projects Available to Employees") == "1") {
$projectList = $project->Find("1 = 1");
$projectList = $project->Find("1 = 1 order by name");
} else {
$projectList = $project->Find(
"id in (select project from EmployeeProjects where employee = ?)",
"id in (select project from EmployeeProjects where employee = ?) order by name",
array(BaseService::getInstance()->getCurrentProfileId())
);
}

View File

@@ -47,7 +47,7 @@ class UsersEmailSender
} else {
LogManager::getInstance()->info("[sendWelcomeUserEmail] email is empty");
}
return false;
}
}

View File

@@ -8,7 +8,6 @@ namespace Users\Common\Model;
use Classes\BaseService;
use Model\BaseModel;
use Classes\IceResponse;
use Modules\Common\Model\Module;
class User extends BaseModel
{
@@ -57,23 +56,6 @@ class User extends BaseModel
}
}
//Check if the user have rights to the default module
if (!empty($obj->default_module)) {
$module = new Module();
$module->Load("id = ?", array($obj->default_module));
if ($module->mod_group == "user") {
$module->mod_group = "modules";
}
$moduleManager = BaseService::getInstance()->getModuleManager($module->mod_group, $module->name);
if (!BaseService::getInstance()->isModuleAllowedForGivenUser($moduleManager, $obj)) {
return new IceResponse(
IceResponse::ERROR,
"This module can not be set as the default module for
the user since the user do not have access to this module"
);
}
}
return new IceResponse(IceResponse::SUCCESS, "");
}

View File

@@ -65,11 +65,28 @@ class CalendarTools
return $time->format($format);
}
public static function getNumberOfDaysBetweenDates($first, $second)
public static function getNumberOfDaysBetweenDates($later, $earlier)
{
$timeFirst = new \DateTime($first);
$timeSecond = new \DateTime($second);
$timeFirst = new \DateTime($later);
$timeSecond = new \DateTime($earlier);
$interval = $timeSecond->diff($timeFirst);
return intval($interval->format('%a'));
return intval($interval->format('%a')) + 1;
}
public static function getNumberOfMonthsBetweenDates($date1, $date2)
{
$begin = new \DateTime($date1);
$end = new \DateTime($date2);
$end = $end->modify('+1 day');
$interval = \DateInterval::createFromDateString('1 month');
$period = new \DatePeriod($begin, $interval, $end);
$counter = 0;
foreach ($period as $dt) {
$counter++;
}
return $counter;
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace Utils;
class NetworkUtils
{
public static function getClientIp()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_X_FORWARDED']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
else if(isset($_SERVER['HTTP_FORWARDED']))
$ipaddress = $_SERVER['HTTP_FORWARDED'];
else if(isset($_SERVER['REMOTE_ADDR']))
$ipaddress = $_SERVER['REMOTE_ADDR'];
else
$ipaddress = 'UNKNOWN';
return $ipaddress;
}
}

View File

@@ -1,10 +1,10 @@
<div class="user-panel">
<div class="pull-left image">
<img src="#_profileImage_#" class="img-circle" alt="User Image" />
<img src="#_profileImage_#" class="img-circle" alt="User Image" onclick="location.href='#_profile_url_#'" style="cursor: pointer;"/>
</div>
<div class="pull-left info">
<p>#_firstName_# #_lastName_#</p>
<p><a href="#_profile_url_#">#_firstName_# #_lastName_#</a></p>
<a href="#"><i class="fa fa-circle text-success"></i> <t>Logged In</t></a>
<a href="#_profile_url_#"><i class="fa fa-circle text-success"></i> <t>Logged In</t></a>
</div>
</div>
</div>

View File

@@ -1,11 +1,11 @@
<div class="user-panel">
<button type="button" onclick="modJs.setAdminProfile('-1');return false;"><li class="fa fa-times"/></button>
<div class="pull-left image">
<img src="#_profileImage_#" class="img-circle" alt="User Image" />
<img src="#_profileImage_#" class="img-circle" alt="User Image" onclick="location.href='#_profile_url_#'" style="cursor: pointer;"/>
</div>
<div class="pull-left info">
<p>#_firstName_# #_lastName_#</p>
<p><a href="#_profile_url_#">#_firstName_# #_lastName_#</a></p>
<a href="#"><i class="fa fa-circle text-warning"></i> <t>Changed To</t> </a>
<a href="#_profile_url_#"><i class="fa fa-circle text-warning"></i> <t>Changed To</t> </a>
</div>
</div>
</div>

View File

@@ -61,10 +61,10 @@
You are receiving this email because your organization has added you as an employee <a href="#_url_#"><strong><font color="405A6A">#_url_#</font></strong></a>. If you are not the intended recipient please inform application admin #_adminEmail_#.
</p>
<p class="sub center" style="margin-top: 0; line-height: 1.5em; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box; color: #AEAEAE; font-size: 12px; text-align: center;">
IceHrm.com<br>TP: +44 33 0001 0210 </span>
IceHrm.com</span>
</p>
<p class="sub center" style="margin-top: 0; line-height: 1.5em; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box; color: #AEAEAE; font-size: 12px; text-align: center;">
&copy; 2018 <a href="https://icehrm.com" target="_blank" style="color: #3869D4; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box;">IceHrm</a>. All rights reserved.
&copy; 2018 <a href="https://icehrm.com" target="_blank" style="color: #3869D4; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; -webkit-box-sizing: border-box; box-sizing: border-box;">IceHrm</a>
</p>
</td>
</tr>

View File

@@ -1,4 +1,4 @@
<p>Hi,</p>
<p>A password reset request has been recieved for your login at #_url_#.</p>
<p>To reset your password, please follow this link: <a href="#_passurl_#">#_passurl_#</a>.</p>
<p>Thanks!</p>
<p>Hi,</p>
<p>A password reset request has been received for your login at #_url_#.</p>
<p>If you are the one who requested this, please click this link to set a new password: <a href="#_passurl_#">#_passurl_#</a>.</p>
<p>Thanks!</p>

View File

@@ -9,6 +9,6 @@
<div class="controls col-sm-3">
<div id="help__id_" class="fa fa-info-circle help-info _hidden_class_help_"
onclick="modJs.showMessage('Tip','_helpline_')"></div>
<span id="help_err__id_"></span>
<span id="help_err__id_" class="help_error_message"></span>
</div>
</div>

View File

@@ -11,6 +11,6 @@
<div class="controls col-sm-3">
<div id="help__id_" class="fa fa-info-circle help-info _hidden_class_help_"
onclick="modJs.showMessage('Tip','_helpline_')"></div>
<span id="help_err__id_"></span>
<span id="help_err__id_" class="help_error_message"></span>
</div>
</div>

View File

@@ -10,6 +10,6 @@
<div class="controls col-sm-3">
<div id="help__id_" class="fa fa-info-circle help-info _hidden_class_help_"
onclick="modJs.showMessage('Tip','_helpline_')"></div>
<span id="help_err__id_"></span>
<span id="help_err__id_" class="help_error_message"></span>
</div>
</div>

View File

@@ -12,6 +12,6 @@
<div class="controls col-sm-3">
<div id="help__id_" class="fa fa-info-circle help-info _hidden_class_help_"
onclick="modJs.showMessage('Tip','_helpline_')"></div>
<span id="help_err__id_"></span>
<span id="help_err__id_" class="help_error_message"></span>
</div>
</div>

View File

@@ -2,14 +2,14 @@
<label class="control-label col-sm-3" for="_id_">_label_</label>
<div class="controls col-sm-6">
<label id="_id_" name="_id_" type="fileupload" class="control-label uploadInput" style="display:none;" _validation_><t>Upload&nbsp;</t></label>
<span id="_id__remove" onclick="$('#_id_').attr('val','');$('#_id_').html('');$('#_id__download').hide();return false;" class="file-action-icon" style="display:none;"><i class="fa fa-remove text-red"></i></span>
<span id="_id__download" onclick="download($('#_id_').attr('val'));return false;" class="file-action-icon" type="button" style="display:none;"><i class="fa fa-cloud-download text-aqua"></i></span>
<span id="_id__upload" onclick="showUploadDialog('_id___rand_','Upload Attachment','_group_',_userId_,'_id_','html','name','_filetypes_');return false;" class="file-action-icon"><i class="fa fa-cloud-upload text-green"></i></span>
<span id="_id__remove" onclick="$('#_id_').attr('val','');$('#_id_').html('');$('#_id__download').hide();return false;" class="file-action-icon" style="display:none;"><i class="fa fa-trash-alt text-red"></i></span>
<span id="_id__download" onclick="download($('#_id_').attr('val'));return false;" class="file-action-icon" type="button" style="display:none;"><i class="fa fa-cloud-download-alt text-aqua"></i></span>
<span id="_id__upload" onclick="showUploadDialog('_id___rand_','Upload Attachment','_group_',_userId_,'_id_','html','name','_filetypes_');return false;" class="file-action-icon"><i class="fa fa-cloud-upload-alt text-green"></i></span>
</div>
<div class="controls col-sm-3">
<div id="help__id_" class="fa fa-info-circle help-info _hidden_class_help_"
onclick="modJs.showMessage('Tip','_helpline_')"></div>
<span id="help_err__id_"></span>
<span id="help_err__id_" class="help_error_message"></span>
</div>
</div>

View File

@@ -6,6 +6,6 @@
<div class="controls col-sm-3">
<div id="help__id_" class="fa fa-info-circle help-info _hidden_class_help_"
onclick="modJs.showMessage('Tip','_helpline_')"></div>
<span id="help_err__id_"></span>
<span id="help_err__id_" class="help_error_message"></span>
</div>
</div>

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