New features for modules
This commit is contained in:
@@ -1,50 +1,50 @@
|
||||
<?php
|
||||
if (!class_exists('AttendanceAdminManager')) {
|
||||
|
||||
class AttendanceAdminManager extends AbstractModuleManager{
|
||||
|
||||
public function initializeUserClasses(){
|
||||
|
||||
}
|
||||
|
||||
public function initializeFieldMappings(){
|
||||
|
||||
}
|
||||
|
||||
public function initializeDatabaseErrorMappings(){
|
||||
|
||||
}
|
||||
|
||||
public function setupModuleClassDefinitions(){
|
||||
$this->addModelClass('Attendance');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AttendanceAdminManager extends AbstractModuleManager{
|
||||
|
||||
public function initializeUserClasses(){
|
||||
|
||||
}
|
||||
|
||||
public function initializeFieldMappings(){
|
||||
|
||||
}
|
||||
|
||||
public function initializeDatabaseErrorMappings(){
|
||||
|
||||
}
|
||||
|
||||
public function setupModuleClassDefinitions(){
|
||||
$this->addModelClass('Attendance');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Model Classes
|
||||
|
||||
if (!class_exists('Attendance')) {
|
||||
class Attendance extends ICEHRM_Record {
|
||||
var $_table = 'Attendance';
|
||||
class Attendance extends ICEHRM_Record {
|
||||
var $_table = 'Attendance';
|
||||
|
||||
public function getAdminAccess(){
|
||||
return array("get","element","save","delete");
|
||||
}
|
||||
public function getAdminAccess(){
|
||||
return array("get","element","save","delete");
|
||||
}
|
||||
|
||||
public function getManagerAccess(){
|
||||
return array("get","element","save","delete");
|
||||
}
|
||||
public function getManagerAccess(){
|
||||
return array("get","element","save","delete");
|
||||
}
|
||||
|
||||
public function getUserAccess(){
|
||||
return array("get");
|
||||
}
|
||||
public function getUserAccess(){
|
||||
return array("get");
|
||||
}
|
||||
|
||||
public function getUserOnlyMeAccess(){
|
||||
return array("element","save","delete");
|
||||
}
|
||||
}
|
||||
public function getUserOnlyMeAccess(){
|
||||
return array("element","save","delete");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -158,6 +158,13 @@ AttendanceAdapter.method('saveFailCallback', function(callBackData) {
|
||||
this.showMessage("Error saving attendance entry", callBackData);
|
||||
});
|
||||
|
||||
AttendanceAdapter.method('isSubProfileTable', function() {
|
||||
if(this.user.user_level == "Admin"){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
@@ -215,4 +222,13 @@ AttendanceStatusAdapter.method('getActionButtonsHtml', function(id,data) {
|
||||
html = html.replace(/_COLOR_/g,'green');
|
||||
}
|
||||
return html;
|
||||
});
|
||||
|
||||
|
||||
AttendanceStatusAdapter.method('isSubProfileTable', function() {
|
||||
if(this.user.user_level == "Admin"){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -3,7 +3,7 @@
|
||||
"menu":"Employees",
|
||||
"order":"8",
|
||||
"icon":"fa-clock-o",
|
||||
"user_levels":["Admin"],
|
||||
"user_levels":["Admin","Manager"],
|
||||
|
||||
"permissions":
|
||||
{}
|
||||
|
||||
@@ -49,4 +49,24 @@ if (!class_exists('CompanyStructure')) {
|
||||
return new IceResponse(IceResponse::SUCCESS,"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!class_exists('Timezone')) {
|
||||
class Timezone extends ICEHRM_Record {
|
||||
var $_table = 'Timezones';
|
||||
|
||||
public function getAdminAccess(){
|
||||
return array("get","element","save","delete");
|
||||
}
|
||||
|
||||
public function getManagerAccess(){
|
||||
return array("get","element","save","delete");
|
||||
}
|
||||
|
||||
public function getUserAccess(){
|
||||
return array("get","element");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ CompanyStructureAdapter.method('getDataMapping', function() {
|
||||
"address",
|
||||
"type",
|
||||
"country",
|
||||
"timezone",
|
||||
"parent"
|
||||
];
|
||||
});
|
||||
@@ -28,6 +29,7 @@ CompanyStructureAdapter.method('getHeaders', function() {
|
||||
{ "sTitle": "Address","bSortable":false},
|
||||
{ "sTitle": "Type"},
|
||||
{ "sTitle": "Country", "sClass": "center" },
|
||||
{ "sTitle": "Time Zone"},
|
||||
{ "sTitle": "Parent Structure"}
|
||||
];
|
||||
});
|
||||
@@ -40,6 +42,7 @@ CompanyStructureAdapter.method('getFormFields', function() {
|
||||
[ "address", {"label":"Address","type":"textarea","validation":"none"}],
|
||||
[ "type", {"label":"Type","type":"select","source":[["Company","Company"],["Head Office","Head Office"],["Regional Office","Regional Office"],["Department","Department"],["Unit","Unit"],["Sub Unit","Sub Unit"],["Other","Other"]]}],
|
||||
[ "country", {"label":"Country","type":"select","remote-source":["Country","code","name"]}],
|
||||
[ "timezone", {"label":"Time Zone","type":"select","allow-null":false,"remote-source":["Timezone","name","details"]}],
|
||||
[ "parent", {"label":"Parent Structure","type":"select","allow-null":true,"remote-source":["CompanyStructure","id","title"]}]
|
||||
];
|
||||
});
|
||||
@@ -298,7 +301,7 @@ CompanyGraphAdapter.method('fixCyclicParent', function(sourceData) {
|
||||
});
|
||||
|
||||
CompanyGraphAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=61';
|
||||
return 'http://blog.icehrm.com/docs/companystructure/';
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ JobTitleAdapter.method('getFormFields', function() {
|
||||
});
|
||||
|
||||
JobTitleAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=80';
|
||||
return 'http://blog.icehrm.com/docs/jobdetails/';
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"label":"Company Loans",
|
||||
"menu":"Admin",
|
||||
"order":"7",
|
||||
"order":"81",
|
||||
"icon":"fa-shield",
|
||||
"user_levels":["Admin"],
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ ClientAdapter.method('getFormFields', function() {
|
||||
});
|
||||
|
||||
ClientAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=85';
|
||||
return 'http://blog.icehrm.com/docs/projects/';
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -116,7 +116,7 @@ ProjectAdapter.method('getFormFields', function() {
|
||||
});
|
||||
|
||||
ProjectAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=85';
|
||||
return 'http://blog.icehrm.com/docs/projects/';
|
||||
});
|
||||
|
||||
|
||||
@@ -172,6 +172,6 @@ EmployeeProjectAdapter.method('getFilters', function() {
|
||||
});
|
||||
|
||||
EmployeeProjectAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=85';
|
||||
return 'http://blog.icehrm.com/docs/projects/';
|
||||
});
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ SkillAdapter.method('getFormFields', function() {
|
||||
});
|
||||
|
||||
SkillAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=83';
|
||||
return 'http://blog.icehrm.com/docs/qualifications/';
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -162,6 +162,3 @@ ReportAdapter.method('fillForm', function(object) {
|
||||
}
|
||||
});
|
||||
|
||||
ReportAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=118';
|
||||
});
|
||||
|
||||
@@ -63,5 +63,5 @@ SettingAdapter.method('fillForm', function(object) {
|
||||
|
||||
|
||||
SettingAdapter.method('getHelpLink', function () {
|
||||
return 'http://blog.icehrm.com/?page_id=126';
|
||||
});
|
||||
return 'http://blog.icehrm.com/docs/settings/';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user