Initial checkin v13.0

This commit is contained in:
Thilina Hasantha
2015-10-10 20:18:50 +05:30
parent 5fdd19b2c5
commit eb3439b29d
1396 changed files with 318492 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
<?php
if (!class_exists('QualificationsModulesManager')) {
class QualificationsModulesManager extends AbstractModuleManager{
public function initializeUserClasses(){
if(defined('MODULE_TYPE') && MODULE_TYPE != 'admin'){
$this->addUserClass("EmployeeSkill");
$this->addUserClass("EmployeeEducation");
$this->addUserClass("EmployeeCertification");
$this->addUserClass("EmployeeLanguage");
}
}
public function initializeFieldMappings(){
}
public function initializeDatabaseErrorMappings(){
}
public function setupModuleClassDefinitions(){
$this->addModelClass('EmployeeSkill');
$this->addModelClass('EmployeeEducation');
$this->addModelClass('EmployeeCertification');
$this->addModelClass('EmployeeLanguage');
}
}
}
if (!class_exists('EmployeeSkill')) {
class EmployeeSkill extends ICEHRM_Record {
var $_table = 'EmployeeSkills';
public function getAdminAccess(){
return array("get","element","save","delete");
}
public function getManagerAccess(){
return array("get","element","save","delete");
}
public function getUserAccess(){
return array("get");
}
public function getUserOnlyMeAccess(){
return array("element","save","delete");
}
}
class EmployeeEducation extends ICEHRM_Record {
var $_table = 'EmployeeEducations';
public function getAdminAccess(){
return array("get","element","save","delete");
}
public function getManagerAccess(){
return array("get","element","save","delete");
}
public function getUserAccess(){
return array("get");
}
public function getUserOnlyMeAccess(){
return array("element","save","delete");
}
}
class EmployeeCertification extends ICEHRM_Record {
var $_table = 'EmployeeCertifications';
public function getAdminAccess(){
return array("get","element","save","delete");
}
public function getManagerAccess(){
return array("get","element","save","delete");
}
public function getUserAccess(){
return array("get");
}
public function getUserOnlyMeAccess(){
return array("element","save","delete");
}
}
class EmployeeLanguage extends ICEHRM_Record {
var $_table = 'EmployeeLanguages';
public function getAdminAccess(){
return array("get","element","save","delete");
}
public function getManagerAccess(){
return array("get","element","save","delete");
}
public function getUserAccess(){
return array("get");
}
public function getUserOnlyMeAccess(){
return array("element","save","delete");
}
}
}

View File

@@ -0,0 +1,84 @@
<?php
/*
This file is part of iCE Hrm.
iCE Hrm 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 Hrm 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 Hrm. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
$moduleName = 'qualifications';
define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
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="tabEmployeeSkill" href="#tabPageEmployeeSkill">Skills</a></li>
<li><a id="tabEmployeeEducation" href="#tabPageEmployeeEducation">Education</a></li>
<li><a id="tabEmployeeCertification" href="#tabPageEmployeeCertification">Certifications</a></li>
<li><a id="tabEmployeeLanguage" href="#tabPageEmployeeLanguage">Languages</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabPageEmployeeSkill">
<div id="EmployeeSkill" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeSkillForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageEmployeeEducation">
<div id="EmployeeEducation" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeEducationForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageEmployeeCertification">
<div id="EmployeeCertification" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeCertificationForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
<div class="tab-pane" id="tabPageEmployeeLanguage">
<div id="EmployeeLanguage" class="reviewBlock" data-content="List" style="padding-left:5px;">
</div>
<div id="EmployeeLanguageForm" class="reviewBlock" data-content="Form" style="padding-left:5px;display:none;">
</div>
</div>
</div>
</div>
<script>
var modJsList = new Array();
modJsList['tabEmployeeSkill'] = new EmployeeSkillAdapter('EmployeeSkill');
modJsList['tabEmployeeEducation'] = new EmployeeEducationAdapter('EmployeeEducation');
modJsList['tabEmployeeCertification'] = new EmployeeCertificationAdapter('EmployeeCertification');
modJsList['tabEmployeeLanguage'] = new EmployeeLanguageAdapter('EmployeeLanguage');
var modJs = modJsList['tabEmployeeSkill'];
</script>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -0,0 +1,200 @@
/*
This file is part of iCE Hrm.
iCE Hrm 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 Hrm 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 Hrm. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------
Original work Copyright (c) 2012 [Gamonoid Media Pvt. Ltd]
Developer: Thilina Hasantha (thilina.hasantha[at]gmail.com / facebook.com/thilinah)
*/
function EmployeeSkillAdapter(endPoint) {
this.initAdapter(endPoint);
}
EmployeeSkillAdapter.inherits(AdapterBase);
EmployeeSkillAdapter.method('getDataMapping', function() {
return [
"id",
"skill_id",
"details"
];
});
EmployeeSkillAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID" ,"bVisible":false},
{ "sTitle": "Skill" },
{ "sTitle": "Details"}
];
});
EmployeeSkillAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "skill_id", {"label":"Skill","type":"select2","allow-null":true,"remote-source":["Skill","id","name"]}],
[ "details", {"label":"Details","type":"textarea","validation":""}]
];
});
/**
* EmployeeEducationAdapter
*/
function EmployeeEducationAdapter(endPoint) {
this.initAdapter(endPoint);
}
EmployeeEducationAdapter.inherits(AdapterBase);
EmployeeEducationAdapter.method('getDataMapping', function() {
return [
"id",
"education_id",
"institute",
"date_start",
"date_end"
];
});
EmployeeEducationAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID", "bVisible":false},
{ "sTitle": "Qualification" },
{ "sTitle": "Institute"},
{ "sTitle": "Start Date"},
{ "sTitle": "Completed On"},
];
});
EmployeeEducationAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "education_id", {"label":"Qualification","type":"select2","allow-null":false,"remote-source":["Education","id","name"]}],
[ "institute", {"label":"Institute","type":"text","validation":""}],
[ "date_start", {"label":"Start Date","type":"date","validation":"none"}],
[ "date_end", {"label":"Completed On","type":"date","validation":"none"}]
];
});
/**
* EmployeeCertificationAdapter
*/
function EmployeeCertificationAdapter(endPoint) {
this.initAdapter(endPoint);
}
EmployeeCertificationAdapter.inherits(AdapterBase);
EmployeeCertificationAdapter.method('getDataMapping', function() {
return [
"id",
"certification_id",
"institute",
"date_start",
"date_start"
];
});
EmployeeCertificationAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID","bVisible":false},
{ "sTitle": "Certification" },
{ "sTitle": "Institute"},
{ "sTitle": "Granted On"},
{ "sTitle": "Valid Thru"},
];
});
EmployeeCertificationAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "certification_id", {"label":"Certification","type":"select2","allow-null":false,"remote-source":["Certification","id","name"]}],
[ "institute", {"label":"Institute","type":"text","validation":""}],
[ "date_start", {"label":"Granted On","type":"date","validation":"none"}],
[ "date_end", {"label":"Valid Thru","type":"date","validation":"none"}]
];
});
/**
* EmployeeLanguageAdapter
*/
function EmployeeLanguageAdapter(endPoint) {
this.initAdapter(endPoint);
}
EmployeeLanguageAdapter.inherits(AdapterBase);
EmployeeLanguageAdapter.method('getDataMapping', function() {
return [
"id",
"language_id",
"reading",
"speaking",
"writing",
"understanding"
];
});
EmployeeLanguageAdapter.method('getHeaders', function() {
return [
{ "sTitle": "ID", "bVisible":false },
{ "sTitle": "Language" },
{ "sTitle": "Reading"},
{ "sTitle": "Speaking"},
{ "sTitle": "Writing"},
{ "sTitle": "Understanding"}
];
});
EmployeeLanguageAdapter.method('getFormFields', function() {
var compArray = [["Elementary Proficiency","Elementary Proficiency"],
["Limited Working Proficiency","Limited Working Proficiency"],
["Professional Working Proficiency","Professional Working Proficiency"],
["Full Professional Proficiency","Full Professional Proficiency"],
["Native or Bilingual Proficiency","Native or Bilingual Proficiency"]];
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "language_id", {"label":"Language","type":"select2","allow-null":false,"remote-source":["Language","id","name"]}],
[ "reading", {"label":"Reading","type":"select","source":compArray}],
[ "speaking", {"label":"Speaking","type":"select","source":compArray}],
[ "writing", {"label":"Writing","type":"select","source":compArray}],
[ "understanding", {"label":"Understanding","type":"select","source":compArray}]
];
});

View File

@@ -0,0 +1,11 @@
{
"label":"Qualifications",
"menu":"Personal Information",
"order":"3",
"icon":"fa-graduation-cap",
"user_levels":["Admin","Manager","Employee"],
"permissions":
{
}
}