Updates from pro v19

This commit is contained in:
Gamonoid
2016-11-25 17:20:39 +01:00
parent 4c171bfce3
commit e6b4245334
273 changed files with 867 additions and 67718 deletions

View File

@@ -102,4 +102,4 @@ class AttendanceActionManager extends SubActionManager{
}
}
}

View File

@@ -15,4 +15,4 @@
<t>Monitor Attendance</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -62,4 +62,4 @@ modJsList['tabAttendanceStatus'].setShowAddNew(false);
var modJs = modJsList['tabAttendance'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -14,4 +14,4 @@
<t>Manage</t> <t>Company</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -93,4 +93,4 @@ modJsList['tabCompanyGraph'] = new CompanyGraphAdapter('CompanyStructure');
var modJs = modJsList['tabCompanyStructure'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -17,7 +17,7 @@ along with iCE Hrm. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
@@ -26,73 +26,120 @@ define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
if (!class_exists('BillingActionManager')) {
include APP_BASE_PATH.'admin/billing/api/BillingActionManager.php';
}
$billingActionManager = new BillingActionManager();
$invoices = $billingActionManager->getInvoices(null)->getData();
if(!empty($invoices)){
$invoices = json_decode(json_encode($invoices));
}
$numOfUnpaidInvoices = 0;
foreach($invoices as $inv){
if($inv->status == "Sent"){
$numOfUnpaidInvoices++;
}
}
?><div class="span9">
<div class="row">
<?php
$moduleManagers = BaseService::getInstance()->getModuleManagers();
$dashBoardList = array();
foreach($moduleManagers as $moduleManagerObj){
//Check if this is not an admin module
if($moduleManagerObj->getModuleType() != 'admin'){
continue;
}
$allowed = BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj);
if(!$allowed){
continue;
}
$item = $moduleManagerObj->getDashboardItem();
if(!empty($item)) {
$index = $moduleManagerObj->getDashboardItemIndex();
$dashBoardList[$index] = $item;
}
}
ksort($dashBoardList);
foreach($dashBoardList as $k=>$v){
echo LanguageManager::translateTnrText($v);
}
?>
<div class="row">
<?php if($numOfUnpaidInvoices == 1){?>
<div class="callout callout-warning lead" style="font-size: 14px;">
<h4>You have a pending invoice</h4>
<p style="font-weight: bold;">
You have a pending invoice. Please make you complete the payment so we can provide a better service.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System#tabInvoice" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Make a Payment</a>
</p>
</div>
<div id="iceannon">
<div class="callout callout-danger lead" style="font-size: 14px;font-weight: bold;">
<h4>Why not upgrade to IceHrm Pro Version</h4>
<p>
IceHrm Pro is the feature rich upgrade to IceHrm open source version. It comes with improved modules for
employee management, leave management and number of other features over open source version.
Hit this <a href="http://icehrm.com/#compare" class="btn btn-primary btn-xs target="_blank">link</a> to do a full one to one comparison.
<?php }else if($numOfUnpaidInvoices > 1){?>
<div class="callout callout-danger lead" style="font-size: 14px;">
<h4>You have <?=$numOfUnpaidInvoices?> pending invoices</h4>
<p style="font-weight: bold;">
You have <?=$numOfUnpaidInvoices?> pending invoice. None of your employees are currently allowed to login. Please make sure you complete payments to all the invoices to restore your service.
Please logout and login after completing the payment to get your service restored.
<br/>
<br/>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System#tabInvoice" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Make a Payment</a>
</p>
</div>
<?php }?>
Also you can learn more about IceHrm Pro <a href="http://blog.icehrm.com/docs/icehrm-pro/" class="btn btn-primary btn-xs" target="_blank">here</a>
<?php if(SessionUtils::getSessionObject('account_locked') == "1"){?>
<div class="callout callout-danger lead" style="font-size: 14px;">
<h4>Your Trial Has Expired</h4>
<p style="font-weight: bold;">
Your Icehrm Trial has expired. Please upgrade subscription to continue. If not upgraded your account will be deleted with in few days.
<br/>
<br/>
<a href="http://icehrm.com/modules.php" class="btn btn-success btm-xs" target="_blank"><i class="fa fa-checkout"></i> Buy IceHrm Pro</a>
<a href="<?=CLIENT_BASE_URL?>?g=admin&n=billing&m=admin_System" class="btn btn-success btm-xs"><i class="fa fa-checkout"></i> Upgrade Subscription</a>
</p>
</div>
</div>
<?php }?>
<?php
$moduleManagers = BaseService::getInstance()->getModuleManagers();
$dashBoardList = array();
foreach($moduleManagers as $moduleManagerObj){
//Check if this is not an admin module
if($moduleManagerObj->getModuleType() != 'admin'){
continue;
}
$allowed = BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj);
if(!$allowed){
continue;
}
$item = $moduleManagerObj->getDashboardItem();
if(!empty($item)) {
$index = $moduleManagerObj->getDashboardItemIndex();
$dashBoardList[$index] = $item;
}
}
ksort($dashBoardList);
foreach($dashBoardList as $k=>$v){
echo LanguageManager::translateTnrText($v);
}
?>
</div>
</div>
<script>
var modJsList = new Array();
var modJsList = new Array();
modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');
modJsList['tabDashboard'] = new DashboardAdapter('Dashboard','Dashboard');
var modJs = modJsList['tabDashboard'];
var modJs = modJsList['tabDashboard'];
$(document).ready(function() {
try {
$.ajax({
url: "https://icehrm-public.s3.amazonaws.com/icehrmnews.html",
success: function (result) {
$('#iceannon').html(result);
}
});
} catch (e) {
}
/*
$("#employeeLink").attr("href",modJs.getCustomUrl('?g=admin&n=employees&m=admin_Admin'));
$("#companyLink").attr("href",modJs.getCustomUrl('?g=admin&n=company_structure&m=admin_Admin'));
$("#usersLink").attr("href",modJs.getCustomUrl('?g=admin&n=users&m=admin_System'));
$("#projectsLink").attr("href",modJs.getCustomUrl('?g=admin&n=projects&m=admin_Admin'));
$("#attendanceLink").attr("href",modJs.getCustomUrl('?g=admin&n=attendance&m=admin_Admin'));
$("#leaveLink").attr("href",modJs.getCustomUrl('?g=admin&n=leaves&m=admin_Admin'));
$("#reportsLink").attr("href",modJs.getCustomUrl('?g=admin&n=reports&m=admin_Reports'));
$("#settingsLink").attr("href",modJs.getCustomUrl('?g=admin&n=settings&m=admin_System'));
$("#jobsLink").attr("href",modJs.getCustomUrl('?g=admin&n=jobpositions&m=admin_Recruitment'));
$("#candidatesLink").attr("href",modJs.getCustomUrl('?g=admin&n=candidates&m=admin_Recruitment'));
$("#trainingLink").attr("href",modJs.getCustomUrl('?g=admin&n=training&m=admin_Admin'));
$("#travelLink").attr("href",modJs.getCustomUrl('?g=admin&n=travel&m=admin_Employees'));
$("#documentLink").attr("href",modJs.getCustomUrl('?g=admin&n=documents&m=admin_Employees'));
$("#expenseLink").attr("href",modJs.getCustomUrl('?g=admin&n=expenses&m=admin_Employees'));
$("#permissionLink").attr("href",modJs.getCustomUrl('?g=admin&n=permissions&m=admin_System'));
$("#upgradeLink").attr("href",modJs.getCustomUrl('?g=admin&n=billing&m=admin_System'));
modJs.getInitData();
*/
});
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -102,12 +102,13 @@ class EmployeesActionManager extends SubActionManager{
$ok = $archived->Save();
if(!$ok){
return new IceResponse(IceResponse::ERROR, "Error occured while archiving employee");
return new IceResponse(IceResponse::ERROR, "Error occurred while archiving employee");
}
$ok = $employee->Delete();
if(!$ok){
return new IceResponse(IceResponse::ERROR, "Error occured while deleting employee");
return new IceResponse(IceResponse::ERROR, "Error occurred while deleting employee");
}
return new IceResponse(IceResponse::SUCCESS, $archived);

View File

@@ -16,10 +16,6 @@ if (!class_exists('EmployeesAdminManager')) {
$empRestEndPoint->process('get',$pathParams);
});
\NoahBuscher\Macaw\Macaw::get(REST_API_PATH.'employees', function() {
$empRestEndPoint = new EmployeesRestEndPoint();
$empRestEndPoint->process('get',NULL);
});
}
public function initializeDatabaseErrorMappings(){
@@ -231,11 +227,11 @@ if (!class_exists('Employee')) {
}
public static function cleanEmployeeData($obj){
unset($obj->keysToIgnore);
unset($obj->historyFieldsToTrack);
unset($obj->historyUpdateList);
unset($obj->oldObjOrig);
unset($obj->oldObj);
unset($obj->oldObj);
return $obj;
}
@@ -312,48 +308,39 @@ if (!class_exists('EmployeeApproval')) {
if (!class_exists('EmployeeRestEndPoint')) {
class EmployeeRestEndPoint extends RestEndPoint{
public function get($parameter){
if(empty($parameter)){
return new IceResponse(IceResponse::ERROR, "Employee ID not provided");
}
$accessTokenValidation = $this->validateAccessToken();
if($accessTokenValidation->getStatus() == IceResponse::ERROR){
return $accessTokenValidation;
if($parameter === 'list'){
$emp = new Employee();
$emps = $emp->Find("1=1");
$newEmps = array();
foreach($emps as $emp){
$employee = new stdClass();
$employee->id = $emp->id;
$employee->employee_id = $emp->employee_id;
$employee->first_name = $emp->first_name;
$employee->middle_name = $emp->middle_name;
$employee->last_name = $emp->last_name;
$newEmps[] = $employee;
}
return new IceResponse(IceResponse::SUCCESS, $newEmps);
}else{
$mapping = '{"nationality":["Nationality","id","name"],"ethnicity":["Ethnicity","id","name"],"immigration_status":["ImmigrationStatus","id","name"],"employment_status":["EmploymentStatus","id","name"],"job_title":["JobTitle","id","name"],"pay_grade":["PayGrade","id","name"],"country":["Country","code","name"],"province":["Province","id","name"],"department":["CompanyStructure","id","title"],"supervisor":["Employee","id","first_name+last_name"]}';
$emp = BaseService::getInstance()->getElement('Employee',$parameter,$mapping,true);
if(!empty($emp)){
$emp = Employee::cleanEmployeeData($emp);
return new IceResponse(IceResponse::SUCCESS,$emp);
}
return new IceResponse(IceResponse::ERROR, "Employee not found" ,404);
}
$mapping = '{"nationality":["Nationality","id","name"],"ethnicity":["Ethnicity","id","name"],"immigration_status":["ImmigrationStatus","id","name"],"employment_status":["EmploymentStatus","id","name"],"job_title":["JobTitle","id","name"],"pay_grade":["PayGrade","id","name"],"country":["Country","code","name"],"province":["Province","id","name"],"department":["CompanyStructure","id","title"],"supervisor":["Employee","id","first_name+last_name"]}';
$employeeResp = BaseService::getInstance()->getElement('Employee',$parameter,$mapping,true);
if($employeeResp->getStatus() == IceResponse::SUCCESS){
$emp = $employeeResp->getObject();
$emp = Employee::cleanEmployeeData($emp);
return new IceResponse(IceResponse::SUCCESS,$emp);
}
return $employeeResp;
}
}
}
if (!class_exists('EmployeesRestEndPoint')) {
class EmployeesRestEndPoint extends RestEndPoint{
public function get($parameter){
$accessTokenValidation = $this->validateAccessToken();
if($accessTokenValidation->getStatus() == IceResponse::ERROR){
return $accessTokenValidation;
}
$emp = new Employee();
$emps = $emp->Find("1=1");
$newEmps = array();
foreach($emps as $emp){
$newEmps[] = Employee::cleanEmployeeData($emp);
}
return new IceResponse(IceResponse::SUCCESS, $newEmps);
}
}
}

View File

@@ -4,30 +4,30 @@
<div class="col-xs-12" style="text-align: center;">
<img id="profile_image__id_" src="" class="img-polaroid img-thumbnail" style="max-width: 140px;max-height: 140px;">
</div>
</div>
</div>
<div class="col-xs-12 col-md-10">
<div class="row-fluid">
<div class="col-xs-12 col-md-10">
<div class="row-fluid">
<div class="col-md-12"><h2 id="name"></h2></div>
</div>
</div>
<div class="row-fluid">
<div class="col-md-12">
<p>
<i class="fa fa-phone"></i> <span id="mobile_phone"></span>&nbsp;&nbsp;
<i class="fa fa-envelope"></i> <span id="work_email"></span>
</p>
<p>
<i class="fa fa-phone"></i> <span id="mobile_phone"></span>&nbsp;&nbsp;
<i class="fa fa-envelope"></i> <span id="work_email"></span>
</p>
</div>
</div>
<div class="row-fluid">
<div class="col-xs-12" style="font-size:18px;border-bottom: 1px solid #DDD;margin-bottom: 10px;padding-bottom: 10px;">
<div class="row-fluid">
<div class="col-xs-12" style="font-size:18px;border-bottom: 1px solid #DDD;margin-bottom: 10px;padding-bottom: 10px;">
<button id="employeeProfileEditInfo" class="btn btn-small btn-success" onclick="modJs.edit(_id_);" style="margin-right:10px;"><i class="fa fa-edit"></i> Edit Info</button>
<button id="employeeUploadProfileImage" onclick="showUploadDialog('profile_image__id_','Upload Profile Image','profile_image',_id_,'profile_image__id_','src','url','image');return false;" class="btn btn-small btn-primary" type="button" style="margin-right:10px;"><i class="fa fa-upload"></i> Upload Profile Image</button>
<button id="employeeDeleteProfileImage" onclick="modJs.deleteProfileImage(_id_);return false;" class="btn btn-small btn-warning" type="button" style="margin-right:10px;"><i class="fa fa-times"></i> Delete Profile Image</button>
</div>
</div>
<div class="row-fluid" style="border-top: 1px;">
</div>
<div class="row-fluid" style="border-top: 1px;">
<div class="col-xs-6 col-md-4" style="font-size:16px;">
<label class="control-label col-xs-12" style="font-size:13px;font-size:13px;">#_label_employee_id_#</label>
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="employee_id"></label>
@@ -40,19 +40,20 @@
<label class="control-label col-xs-12" style="font-size:13px;">#_label_ssn_num_#</label>
<label class="control-label col-xs-12 iceLabel" style="font-size:13px;font-weight: bold;" id="ssn_num"></label>
</div>
</div>
</div>
</div>
</div>
</div>
<ul class="nav nav-tabs" id="subModTab" style="margin-bottom:0px;margin-left:5px;border-bottom: none;">
<li class="active"><a id="tabBasic" href="#tabPageBasic">Basic Information</a></li>
<li class=""><a id="tabQualifications" href="#tabPageQualifications">Qualifications</a></li>
<li class=""><a id="tabFamily" href="#tabPageFamily">Family</a></li>
<li class=""><a id="tabDocuments" href="#tabPageDocuments">Documents</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageBasic" style="border:1px solid #DDD;">
<div class="tab-pane sub-tab active" id="tabPageBasic">
<div class="row" style="margin-left:10px;margin-top:20px;">
<div class="panel panel-default" style="width:97.5%;">
<div class="panel-heading"><h4>Personal Information</h4></div>
@@ -202,31 +203,45 @@
</div>
</div>
</div><!-- End tabPageBasic -->
<div class="tab-pane" id="tabPageQualifications" style="border:1px solid #DDD;">
<div class="tab-pane sub-tab" id="tabPageQualifications">
<div class="row" style="margin-top:20px;">
<div class="col-md-3">
<div class="col-md-3 sub-column">
<div id="EmployeeSkillSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3">
<div class="col-md-3 sub-column">
<div id="EmployeeEducationSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3">
<div class="col-md-3 sub-column">
<div id="EmployeeCertificationSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-3">
<div class="col-md-3 sub-column">
<div id="EmployeeLanguageSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div><!-- End tabPageQualifications -->
</div>
<div class="tab-pane" id="tabPageDocuments" style="border:1px solid #DDD;">
<div class="tab-pane sub-tab" id="tabPageFamily">
<div class="row" style="margin-top:20px;">
<div class="col-md-6 sub-column">
<div id="EmployeeEmergencyContactSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
<div class="col-md-6 sub-column">
<div id="EmployeeDependentSubTab" class="" data-content="List" style="padding-left:5px;">
</div>
</div>
</div>
</div>
<div class="tab-pane sub-tab" id="tabPageDocuments">
<div class="row" style="margin-top:20px;">
<div class="col-md-12">
<div id="EmployeeDocumentSubTab" class="" data-content="List" style="padding-left:5px;">
@@ -235,4 +250,4 @@
</div>
</div><!-- End tabPageQualifications -->
</div>
</div><!-- End tab-content -->
</div><!-- End tab-content -->

View File

@@ -16,4 +16,4 @@
<t>Manage</t> <t>Employees</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -197,6 +197,9 @@ EmployeeAdapter.method('getFormFields', function() {
[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"]}],
[ "supervisor", {"label":"Direct Supervisor","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
[ "indirect_supervisors", {"label":"Indirect Supervisors","type":"select2multi","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
[ "approver1", {"label":"First Level Approver","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
[ "approver2", {"label":"Second Level Approver","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
[ "approver3", {"label":"Third Level Approver","type":"select2","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}],
[ "notes", {"label":"Notes","type":"datagroup",
"form":[
[ "note", {"label":"Note","type":"textarea","validation":""}]
@@ -413,7 +416,7 @@ EmployeeAdapter.method('renderEmployee', function(data) {
}
}
html = html.replace(/#_.+_#/i,"");
html = html.replace(/#_.+_#/gi,"");
html = html.replace(/_id_/g,data.id);
$("#"+this.getTableName()).html(html);
@@ -506,6 +509,12 @@ EmployeeAdapter.method('renderEmployee', function(data) {
modJs.subModJsList['tabEmployeeLanguageSubTab'] = new EmployeeSubLanguageAdapter('EmployeeLanguage','EmployeeLanguageSubTab',{"employee":data.id});
modJs.subModJsList['tabEmployeeLanguageSubTab'].parent = this;
modJs.subModJsList['tabEmployeeDependentSubTab'] = new EmployeeSubDependentAdapter('EmployeeDependent','EmployeeDependentSubTab',{"employee":data.id});
modJs.subModJsList['tabEmployeeDependentSubTab'].parent = this;
modJs.subModJsList['tabEmployeeEmergencyContactSubTab'] = new EmployeeSubEmergencyContactAdapter('EmergencyContact','EmployeeEmergencyContactSubTab',{"employee":data.id});
modJs.subModJsList['tabEmployeeEmergencyContactSubTab'].parent = this;
if(this.isModuleInstalled("admin","documents")) {
modJs.subModJsList['tabEmployeeDocumentSubTab'] = new EmployeeSubDocumentAdapter('EmployeeDocument', 'EmployeeDocumentSubTab', {"employee": data.id});
modJs.subModJsList['tabEmployeeDocumentSubTab'].parent = this;
@@ -547,6 +556,16 @@ EmployeeAdapter.method('renderEmployee', function(data) {
modJs.subModJsList['tabEmployeeLanguageSubTab'].setShowCancel(false);
modJs.subModJsList['tabEmployeeLanguageSubTab'].get([]);
modJs.subModJsList['tabEmployeeDependentSubTab'].setShowFormOnPopup(true);
modJs.subModJsList['tabEmployeeDependentSubTab'].setShowAddNew(false);
modJs.subModJsList['tabEmployeeDependentSubTab'].setShowCancel(false);
modJs.subModJsList['tabEmployeeDependentSubTab'].get([]);
modJs.subModJsList['tabEmployeeEmergencyContactSubTab'].setShowFormOnPopup(true);
modJs.subModJsList['tabEmployeeEmergencyContactSubTab'].setShowAddNew(false);
modJs.subModJsList['tabEmployeeEmergencyContactSubTab'].setShowCancel(false);
modJs.subModJsList['tabEmployeeEmergencyContactSubTab'].get([]);
if(this.isModuleInstalled("admin","documents")) {
modJs.subModJsList['tabEmployeeDocumentSubTab'].setShowFormOnPopup(true);
modJs.subModJsList['tabEmployeeDocumentSubTab'].setShowAddNew(false);
@@ -1372,7 +1391,7 @@ EmployeeSubSkillsAdapter.method('getSubHeaderTitle', function() {
});
EmployeeSubSkillsAdapter.method('getSubItemHtml', function(item, itemDelete, itemEdit) {
var itemHtml = $('<a href="#" class="list-group-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text">'+nl2br(item[3])+'</p></a>');
var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text">'+nl2br(item[3])+'</p></div>');
return itemHtml;
});
@@ -1451,8 +1470,8 @@ EmployeeSubEducationAdapter.method('getSubItemHtml', function(item, itemDelete,
try{
end = Date.parse(item[5]).toString('MMM d, yyyy');
}catch(e){}
//var itemHtml = $('<a href="#" class="list-group-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text">'+nl2br(item[3])+'</p></a>');
var itemHtml = $('<a href="#" class="list-group-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-calendar"></i> Start: <b>'+start+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-calendar"></i> Completed: <b>'+end+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-building-o"></i> Institute: <b>'+item[3]+'</b></p></a>');
//var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text">'+nl2br(item[3])+'</p></div>');
var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-calendar"></i> Start: <b>'+start+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-calendar"></i> Completed: <b>'+end+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-building-o"></i> Institute: <b>'+item[3]+'</b></p></div>');
return itemHtml;
});
@@ -1529,7 +1548,7 @@ EmployeeSubCertificationAdapter.method('getSubItemHtml', function(item, itemDele
try{
end = Date.parse(item[5]).toString('MMM d, yyyy');
}catch(e){}
var itemHtml = $('<a href="#" class="list-group-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-calendar"></i> Granted On: <b>'+start+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-calendar"></i> Valid Thru: <b>'+end+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-building-o"></i> Institute: <b>'+item[3]+'</b></p></a>');
var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-calendar"></i> Granted On: <b>'+start+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-calendar"></i> Valid Thru: <b>'+end+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-building-o"></i> Institute: <b>'+item[3]+'</b></p></div>');
return itemHtml;
});
@@ -1607,7 +1626,7 @@ EmployeeSubLanguageAdapter.method('getSubHeaderTitle', function() {
});
EmployeeSubLanguageAdapter.method('getSubItemHtml', function(item, itemDelete, itemEdit) {
var itemHtml = $('<a href="#" class="list-group-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-asterisk"></i> Reading: <b>'+item[3]+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-asterisk"></i> Speaking: <b>'+ item[4] +'</b></p><p class="list-group-item-text">'+'<i class="fa fa-asterisk"></i> Writing: <b>'+item[5]+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-asterisk"></i> Understanding: <b>'+item[6]+'</b></p></a>');
var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-asterisk"></i> Reading: <b>'+item[3]+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-asterisk"></i> Speaking: <b>'+ item[4] +'</b></p><p class="list-group-item-text">'+'<i class="fa fa-asterisk"></i> Writing: <b>'+item[5]+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-asterisk"></i> Understanding: <b>'+item[6]+'</b></p></div>');
return itemHtml;
});
@@ -1619,6 +1638,154 @@ EmployeeSubLanguageAdapter.method('isSubProfileTable', function() {
}
});
/**
* @class EmployeeSubDependentAdapter
* @param endPoint
* @param tab
* @param filter
* @param orderBy
* @returns
*/
function EmployeeSubDependentAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
EmployeeSubDependentAdapter.inherits(SubAdapterBase);
EmployeeSubDependentAdapter.method('getDataMapping', function() {
return [
"id",
"employee",
"name",
"relationship",
"dob",
"id_number"
];
});
EmployeeSubDependentAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Employee" },
{ "sTitle": "Name" },
{ "sTitle": "Relationship"},
{ "sTitle": "Date of Birth"},
{ "sTitle": "Id Number"}
];
});
EmployeeSubDependentAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "employee", {"label":"Employee","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "relationship", {"label":"Relationship","type":"select","source":[["Child","Child"],["Spouse","Spouse"],["Parent","Parent"],["Other","Other"]]}],
[ "dob", {"label":"Date of Birth","type":"date","validation":""}],
[ "id_number", {"label":"Id Number","type":"text","validation":"none"}]
];
});
EmployeeSubDependentAdapter.method('forceInjectValuesBeforeSave', function(params) {
params['employee'] = this.parent.currentId;
return params;
});
EmployeeSubDependentAdapter.method('getSubHeaderTitle', function() {
var addBtn = '<button class="btn btn-small btn-success" onclick="modJs.subModJsList[\'tab'+this.tab+'\'].renderForm();" style="margin-right:10px;"><i class="fa fa-plus"></i></button>';
return addBtn + "Dependents";
});
EmployeeSubDependentAdapter.method('getSubItemHtml', function(item, itemDelete, itemEdit) {
var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-users"></i> Relationship: <b>'+item[3]+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-user"></i> Name: <b>'+item[2]+'</b></p></div>');
return itemHtml;
});
/**
* @class EmployeeSubEmergencyContactAdapter
* @param endPoint
* @param tab
* @param filter
* @param orderBy
* @returns
*/
function EmployeeSubEmergencyContactAdapter(endPoint,tab,filter,orderBy) {
this.initAdapter(endPoint,tab,filter,orderBy);
}
EmployeeSubEmergencyContactAdapter.inherits(SubAdapterBase);
EmployeeSubEmergencyContactAdapter.method('getDataMapping', function() {
return [
"id",
"employee",
"name",
"relationship",
"home_phone",
"work_phone",
"mobile_phone"
];
});
EmployeeSubEmergencyContactAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Employee" },
{ "sTitle": "Name" },
{ "sTitle": "Relationship"},
{ "sTitle": "Home Phone"},
{ "sTitle": "Work Phone"},
{ "sTitle": "Mobile Phone"}
];
});
EmployeeSubEmergencyContactAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "employee", {"label":"Employee","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "relationship", {"label":"Relationship","type":"text","validation":"none"}],
[ "home_phone", {"label":"Home Phone","type":"text","validation":"none"}],
[ "work_phone", {"label":"Work Phone","type":"text","validation":"none"}],
[ "mobile_phone", {"label":"Mobile Phone","type":"text","validation":"none"}]
];
});
EmployeeSubEmergencyContactAdapter.method('forceInjectValuesBeforeSave', function(params) {
params['employee'] = this.parent.currentId;
return params;
});
EmployeeSubEmergencyContactAdapter.method('getSubHeaderTitle', function() {
var addBtn = '<button class="btn btn-small btn-success" onclick="modJs.subModJsList[\'tab'+this.tab+'\'].renderForm();" style="margin-right:10px;"><i class="fa fa-plus"></i></button>';
return addBtn + "Emergency Contacts";
});
EmployeeSubEmergencyContactAdapter.method('getSubItemHtml', function(item, itemDelete, itemEdit) {
var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text"><i class="fa fa-users"></i> Relationship: <b>'+item[3]+'</b></p><p class="list-group-item-text">'+'<i class="fa fa-user"></i> Name: <b>'+item[2]+'</b></p><p class="list-group-item-text"><i class="fa fa-phone"></i> Home Phone: <b>'+item[4]+'</b></p><p class="list-group-item-text"><i class="fa fa-phone"></i> Mobile Phone: <b>'+item[6]+'</b></p></div>');
return itemHtml;
});
/**
* @class EmployeeSubDocumentAdapter
@@ -1692,10 +1859,15 @@ EmployeeSubDocumentAdapter.method('getSubItemHtml', function(item, itemDelete, i
try{
expire = Date.parse(item[5]).toString('MMM d, yyyy');
}catch(e){}
var itemHtml = $('<a href="#" class="list-group-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+itemDelete+itemEdit+'</h5><p class="list-group-item-text">'+nl2br(item[3])+'</p><p class="list-group-item-text">'+'<i class="fa fa-calendar"></i> Expire On: <b>'+expire+'</b></p></a>');
var downloadButton = '<button id="#_id_#_download" onclick="download(\''+item[7]+'\');return false;" type="button" style="position: absolute;bottom: 5px;right: 70px;font-size: 13px;" tooltip="Download"><li class="fa fa-cloud-download"></li></button>';
var itemHtml = $('<div class="list-group-item sub-tab-item"><h5 class="list-group-item-heading" style="font-weight:bold;">'+item[2]+downloadButton+itemDelete+itemEdit+'</h5><p class="list-group-item-text">'+nl2br(item[3])+'</p><p class="list-group-item-text">'+'<i class="fa fa-calendar"></i> Expire On: <b>'+expire+'</b></p></div>');
return itemHtml;
});
EmployeeSubDocumentAdapter.method('isSubProfileTable', function() {
if(this.user.user_level == "Admin"){
return false;

View File

@@ -79,4 +79,4 @@ if (!class_exists('CustomField')) {
}
}
}
}

View File

@@ -54,4 +54,4 @@ modJsList['tabEmployeeCustomField'].setTableType("Employee");
var modJs = modJsList['tabEmployeeFieldName'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -70,4 +70,4 @@ modJsList['tabEmploymentStatus'] = new EmploymentStatusAdapter('EmploymentStatus
var modJs = modJsList['tabJobTitles'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -61,4 +61,4 @@ modJsList['tabEmployeeCompanyLoan'] = new EmployeeCompanyLoanAdapter('EmployeeCo
var modJs = modJsList['tabCompanyLoan'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -3,5 +3,6 @@
"Employees":"fa-users",
"Admin Reports":"fa-file-text",
"System":"fa-cogs",
"Insights":"fa-bar-chart-o",
"Payroll":"fa-money"
}

View File

@@ -16,4 +16,4 @@
<t>Manage</t> <t>Permissions</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -51,4 +51,4 @@ modJsList['tabPermission'].setShowAddNew(false);
var modJs = modJsList['tabPermission'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -14,4 +14,4 @@
<t>Update Clients/Projects</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -110,4 +110,4 @@ modJsList['tabEmployeeProject'].setShowEdit(false);
var modJs = modJsList['tabClient'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -124,4 +124,4 @@ modJsList['tabLanguage'].setShowEdit(false);
var modJs = modJsList['tabSkill'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -14,4 +14,4 @@
<t>Generate a Report</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -35,4 +35,4 @@ modJsList['tabReport'].setRemoteTable(true);
var modJs = modJsList['tabReport'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -205,4 +205,4 @@ class PDFReportBuilder extends ReportBuilder{
}
return array($fileFirstPart, $fileName, $fileFullName);
}
}
}

View File

@@ -11,4 +11,4 @@
<button onclick="modJs.cancel();return false;" class="btn"><t>Cancel</t></button>
</div>
</div>
</form>
</form>

View File

@@ -14,4 +14,4 @@ $moduleBuilder->addModuleOrGroup(new ModuleTab('EmployeeSalary','EmployeeSalary'
echo UIManager::getInstance()->renderModule($moduleBuilder);
include APP_BASE_PATH.'footer.php';
include APP_BASE_PATH.'footer.php';

View File

@@ -37,6 +37,8 @@ class SettingsInitialize extends AbstractInitialize{
}
}
BaseService::getInstance()->getMigrationManager()->ensureMigrations();
}
}

View File

@@ -14,4 +14,4 @@
<t>Update</t> <t>Settings</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -34,7 +34,10 @@ $options1['setShowAddNew'] = 'false';
$moduleBuilder->addModuleOrGroup(new ModuleTab('CompanySetting','Setting','Company','SettingAdapter','{"name":["Company:"]}','name',true,$options1));
$moduleBuilder->addModuleOrGroup(new ModuleTab('SystemSetting','Setting','System','SettingAdapter','{"name":["System:"]}','name',false,$options1));
$moduleBuilder->addModuleOrGroup(new ModuleTab('EmailSetting','Setting','Email','SettingAdapter','{"name":["Email:"]}','name',false,$options1));
$moduleBuilder->addModuleOrGroup(new ModuleTab('LDAPSetting','Setting','LDAP','SettingAdapter','{"name":["LDAP:"]}','name',false,$options1));
$moduleBuilder->addModuleOrGroup(new ModuleTab('LeaveSetting','Setting','Leave / PTO','SettingAdapter','{"name":["Leave:"]}','name',false,$options1));
if(!defined('LDAP_ENABLED') || LDAP_ENABLED == true){
$moduleBuilder->addModuleOrGroup(new ModuleTab('LDAPSetting','Setting','LDAP','SettingAdapter','{"name":["LDAP:"]}','name',false,$options1));
}
$moduleBuilder->addModuleOrGroup(new ModuleTab('AttendanceSetting','Setting','Attendance','SettingAdapter','{"name":["Attendance:"]}','name',false,$options1));
$moduleBuilder->addModuleOrGroup(new ModuleTab('OtherSetting','Setting','Other','SettingAdapter','{"name":["Projects:","Recruitment:","Notifications:","Expense:","Travel:","Api:","Overtime:"]}','name',false,$options1));
echo UIManager::getInstance()->renderModule($moduleBuilder);
@@ -47,4 +50,4 @@ $(window).load(function() {
});
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -108,4 +108,4 @@ SettingAdapter.method('loadRemoteDataForSettings', function () {
SettingAdapter.method('getHelpLink', function () {
return 'http://blog.icehrm.com/docs/settings/';
});
});

View File

@@ -13,4 +13,4 @@
<button onclick="modJs.cancel();return false;" class="btn"><t>Cancel</t></button>
</div>
</div>
</form>
</form>

View File

@@ -152,4 +152,4 @@ if (!class_exists('EmployeeTravelRecordApproval')) {
return $this->findApprovals(new EmployeeTravelRecord(), $whereOrderBy,$bindarr,$pkeysArr,$extra);
}
}
}
}

View File

@@ -16,4 +16,4 @@
<t>Manage</t> <t>Travel</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -38,4 +38,4 @@ $itemName = 'TravelRequest';
$moduleName = 'Travel Management';
$itemNameLower = strtolower($itemName);
include APP_BASE_PATH.'footer.php';
include APP_BASE_PATH.'footer.php';

View File

@@ -14,4 +14,4 @@
<t>Manage</t> <t>Users</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -63,4 +63,4 @@ modJsList['tabUserRole'] = new UserRoleAdapter('UserRole');
var modJs = modJsList['tabUser'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>