IceHrm v18.0

This commit is contained in:
Thilina Hasantha
2016-08-04 14:27:59 +05:30
parent 9e243073df
commit a10fbba14a
882 changed files with 90619 additions and 2546 deletions

View File

@@ -145,6 +145,8 @@ if (!class_exists('EmployeeTimeSheet')) {
}
return new IceResponse(IceResponse::SUCCESS,"");
}
}
}

View File

@@ -9,8 +9,8 @@
_fields_
<div class="control-group row">
<div class="controls col-sm-9">
<button onclick="try{modJs.save()}catch(e){};return false;" class="saveBtn btn btn-primary pull-right"><i class="fa fa-save"></i> Save</button>
<button onclick="modJs.cancel();return false;" class="cancelBtn btn pull-right" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> Cancel</button>
<button onclick="try{modJs.save()}catch(e){};return false;" class="saveBtn btn btn-primary pull-right"><i class="fa fa-save"></i> <t>Save</t></button>
<button onclick="modJs.cancel();return false;" class="cancelBtn btn pull-right" style="margin-right:5px;"><i class="fa fa-times-circle-o"></i> <t>Cancel</t></button>
</div>
<div class="controls col-sm-3">
</div>

View File

@@ -4,14 +4,14 @@
<div class="inner">
<h3>#_timeSheetHoursWorked_#</h3>
<p>
Hours worked Last Week
<t>Hours worked Last Week</t>
</p>
</div>
<div class="icon">
<i class="ion ion-clock"></i>
</div>
<a href="#_moduleLink_#" class="small-box-footer" id="timesheetLink">
Update Time Sheet <i class="fa fa-arrow-circle-right"></i>
<t>Update Time Sheet</t> <i class="fa fa-arrow-circle-right"></i>
</a>
</div>
</div>
</div>

View File

@@ -26,31 +26,13 @@ define('MODULE_PATH',dirname(__FILE__));
include APP_BASE_PATH.'header.php';
include APP_BASE_PATH.'modulejslibs.inc.php';
//custom code
$employeeProjects = array();
$allowAllProjects = $settingsManager->getSetting("Projects: Make All Projects Available to Employees");
if($allowAllProjects == 0){
$employeeProjects = array();
$employeeProjectsTemp = $baseService->get("EmployeeProject");
foreach($employeeProjectsTemp as $p){
$project = new Project();
$project->Load("id = ?",$p->project);
$p->name = $project->name;
$employeeProjects[] = $p;
}
}else{
$employeeProjects = $baseService->get("Project");
}
?><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="tabEmployeeTimeSheetAll" href="#tabPageEmployeeTimeSheetAll">All My TimeSheets</a></li>
<li class=""><a id="tabEmployeeTimeSheetApproved" href="#tabPageEmployeeTimeSheetApproved">Approved TimeSheets</a></li>
<li class=""><a id="tabEmployeeTimeSheetPending" href="#tabPageEmployeeTimeSheetPending">Pending TimeSheets</a></li>
<li class=""><a id="tabSubEmployeeTimeSheetAll" href="#tabPageSubEmployeeTimeSheetAll">Subordinate TimeSheets</a></li>
<li class="active"><a id="tabEmployeeTimeSheetAll" href="#tabPageEmployeeTimeSheetAll"><?=LanguageManager::tran('All My TimeSheets')?></a></li>
<li class=""><a id="tabEmployeeTimeSheetApproved" href="#tabPageEmployeeTimeSheetApproved"><?=LanguageManager::tran('Approved TimeSheets')?></a></li>
<li class=""><a id="tabEmployeeTimeSheetPending" href="#tabPageEmployeeTimeSheetPending"><?=LanguageManager::tran('Pending TimeSheets')?></a></li>
<li class=""><a id="tabSubEmployeeTimeSheetAll" href="#tabPageSubEmployeeTimeSheetAll"><?=LanguageManager::tran('Subordinate TimeSheets')?></a></li>
</ul>
<div class="tab-content">
@@ -110,8 +92,6 @@ modJsList['tabSubEmployeeTimeSheetAll'].setRemoteTable(true);
modJsList['tabEmployeeTimeEntry'] = new EmployeeTimeEntryAdapter('EmployeeTimeEntry','EmployeeTimeEntry','','');
modJsList['tabEmployeeTimeEntry'].setShowAddNew(false);
modJsList['tabEmployeeTimeEntry'].setAllProjectsAllowed(<?=$allowAllProjects?>);
modJsList['tabEmployeeTimeEntry'].setEmployeeProjects(<?=json_encode($employeeProjects)?>);
var modJs = modJsList['tabEmployeeTimeSheetAll'];
@@ -160,4 +140,4 @@ var modJs = modJsList['tabEmployeeTimeSheetAll'];
</div>
</div>
<?php include APP_BASE_PATH.'footer.php';?>
<?php include APP_BASE_PATH.'footer.php';?>

View File

@@ -464,13 +464,10 @@ EmployeeTimeEntryAdapter.method('getHeaders', function() {
EmployeeTimeEntryAdapter.method('getFormFields', function() {
return [
[ "id", {"label":"ID","type":"hidden"}],
[ "project", {"label":"Project","type":"select2","allow-null":true,"remote-source":["Project","id","name"]}],
//[ "project", {"label":"Project","type":"select","source":[]}],
[ "project", {"label":"Project","type":"select2","allow-null":false,"remote-source":["Project","id","name","getEmployeeProjects"]}],
[ "date_select", {"label":"Date","type":"select","source":[]}],
[ "date_start", {"label":"Start Time","type":"time","validation":""}],
/*[ "time_start", {"label":"Start Time","type":"time"}],*/
[ "date_end", {"label":"End Time","type":"time","validation":""}],
/*[ "time_end", {"label":"End Time","type":"time"}],*/
[ "details", {"label":"Details","type":"textarea","validation":""}]
];
});
@@ -567,7 +564,8 @@ EmployeeTimeEntryAdapter.method('renderForm', function(object) {
$("#"+this.getTableName()+'Form .select2Field').select2();
$("#date_select").html(optionList);
/*
var projectOptionList = "";
projectOptionList += '<option value="NULL">None</option>';
if(this.allProjectsAllowed == 0){
@@ -581,7 +579,8 @@ EmployeeTimeEntryAdapter.method('renderForm', function(object) {
}
$("#project").html(projectOptionList);
*/
if(object != undefined && object != null){
this.fillForm(object);
}

View File

@@ -17,7 +17,7 @@
</tbody>
</table>
<div class="control-group">
<button id="add_time_sheet_entry" style="margin-left:5px;display:none;" onclick="try{modJs.openTimeEntryDialog()}catch(e){};return false;" class="btn"><span class="icon-plus-sign"></span> Add Time Entry</button>
<button id="submit_sheet" onclick="modJs.changeTimeSheetStatusWithId(modJs.currentId,'Submitted');return false;" class="btn" style="display:none;"><span class="icon-ok"></span> Submit Timesheet</button>
<button id="add_time_sheet_entry" style="margin-left:5px;display:none;" onclick="try{modJs.openTimeEntryDialog()}catch(e){};return false;" class="btn"><span class="icon-plus-sign"></span> <t>Add Time Entry</t></button>
<button id="submit_sheet" onclick="modJs.changeTimeSheetStatusWithId(modJs.currentId,'Submitted');return false;" class="btn" style="display:none;"><span class="icon-ok"></span> <t>Submit</t></button>
</div>
</form>
</form>