183 lines
5.4 KiB
PHP
183 lines
5.4 KiB
PHP
|
<?php include('techsyn_header.php'); ?>
|
||
|
<!-- Main Content Container for side bar and body-->
|
||
|
<div class="main-container ace-save-state" id="main-container">
|
||
|
<script type="text/javascript">
|
||
|
try{ace.settings.loadState('main-container')}catch(e){}
|
||
|
</script>
|
||
|
<?php include('techsyn_sidebar.php'); ?>
|
||
|
|
||
|
<!--breadcrumb-->
|
||
|
<div class="main-content">
|
||
|
<div class="main-content-inner">
|
||
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
||
|
<ul class="breadcrumb">
|
||
|
|
||
|
<li class="#">Training Mgmt</li><li class="#">Employee Complete Training List</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<!-- End of breadcrumb -->
|
||
|
|
||
|
<div class="page-content">
|
||
|
<div id="flexigridDiv" class="table-responsive">
|
||
|
|
||
|
<form name="f1" method="post" action=""id="">
|
||
|
<div id="flex1" style="width:100%">
|
||
|
</div>
|
||
|
<input type="hidden" name="flex_schedule_id" id="flex_schedule_id"/>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</div><!-- /.page-content -->
|
||
|
</div>
|
||
|
</div><!-- /.main-content -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
$(function () {
|
||
|
var w=screen.width*.50;
|
||
|
var h =0;
|
||
|
h =(window.innerHeight-($("#navbar").height()+$(".breadcrumbs").height()))*.75;
|
||
|
$("#flex1").flexigrid({
|
||
|
url: 'emp_complete_training.php',
|
||
|
dataType: 'json',
|
||
|
colModel: [
|
||
|
{display: 'Sr', name: 'count', width: w*.05, sortable: false, align: 'left'},
|
||
|
|
||
|
{display: 'Employee Name', name: '', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'Training Name', name: '', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'From Date (Schedule)', name: 'assign_date', width: w*.17, sortable: true, align: 'left'},
|
||
|
{display: 'To Date (Schedule)', name: '', width: w*.17, sortable: true, align: 'left'},
|
||
|
{display: 'Trainer Name', name: '', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'Training Location', name: '', width: w*.2, sortable: true, align: 'left'},
|
||
|
{display: 'Status', name: '', width: w*.1, sortable: true, align: 'left'},
|
||
|
{display: 'Date Completion', name: '', width: w*.15, sortable: true, align: 'left'},
|
||
|
|
||
|
// {display: '', name: '', width: w*.1, sortable: false, align: 'left'},
|
||
|
|
||
|
],
|
||
|
buttons: [
|
||
|
{name: 'PDF', bclass: 'print', onpress : pdf},
|
||
|
{separator: true},
|
||
|
{name: 'Excel', bclass: 'print_excel', onpress : excel},
|
||
|
{separator: true}
|
||
|
|
||
|
],
|
||
|
searchitems: [
|
||
|
|
||
|
{display: 'Training Name', name: 'training_name'},
|
||
|
{display: 'From Date(DD/MM/YYYY)', name : 'from_date'},
|
||
|
{display: 'Trainer Name', name : 'trainer_name'},
|
||
|
{display: 'Location', name : 'location'},
|
||
|
{display: 'Completion Date', name : 'completion_date'}
|
||
|
],
|
||
|
sortname: "completion_date",
|
||
|
sortorder: "desc",
|
||
|
usepager: true, //pagination
|
||
|
|
||
|
useRp: true,
|
||
|
rp: 50, //records per page
|
||
|
showTableToggleBtn: false, //toggle button for the whole table
|
||
|
resizable: true,
|
||
|
//width: w,
|
||
|
height: h,
|
||
|
singleSelect: true
|
||
|
});
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function pdf(){
|
||
|
window.open('pdf_employee_training_schedule_list.php');
|
||
|
}
|
||
|
function excel(){
|
||
|
window.location = 'excel_employee_training_schedule_list.php';
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function open_assign_training_schedule(emp_assign_training_id){
|
||
|
$("#schedule").val("");
|
||
|
$("#location").val("");
|
||
|
$("#status").val("");
|
||
|
$("#completion_date").val("");
|
||
|
$('#status').trigger('chosen:updated');
|
||
|
|
||
|
$.ajax({
|
||
|
url : 'select_emp_assign_training.php',
|
||
|
type : 'POST',
|
||
|
data:{emp_assign_training_id:emp_assign_training_id},
|
||
|
dataType:'json',
|
||
|
success : function(data) {
|
||
|
//alert(data);
|
||
|
$("#emp_assign_training_id").val(data.emp_assign_training_id);
|
||
|
//alert(data);
|
||
|
var schedule= data.training_name+" ("+data.trainer_name+' '+myDateFormatter(data.from_date)+' '+myDateFormatter(data.to_date)+")";
|
||
|
getEmployeeDetails(data.emp_id);
|
||
|
$("#schedule").val(schedule);
|
||
|
$("#location").val(data.location);
|
||
|
$('#modal-emp-assign-schedule-status').modal("show");
|
||
|
|
||
|
},
|
||
|
error : function(data) {
|
||
|
BootstrapDialog.alert('Error Populating Training Schedule');
|
||
|
return;
|
||
|
}
|
||
|
});
|
||
|
$('.close').click();
|
||
|
|
||
|
}
|
||
|
function getEmployeeDetails(emp_id){
|
||
|
$.ajax({
|
||
|
url:'select_employee.php',
|
||
|
data:{employeeId:emp_id},
|
||
|
async:false,
|
||
|
dataType:'json',
|
||
|
success:function(data){
|
||
|
$("#emp_id").val(data.fname+' '+data.lname);
|
||
|
|
||
|
},error:function(data){
|
||
|
BootstrapDialog.alert('Error Populating Employee Details');
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
function save_emp_assign_schedule_status_form(){
|
||
|
$('#modal-emp-assign-schedule-status').modal("hide");
|
||
|
$.ajax({
|
||
|
url:'save_emp_assign_status_form.php',
|
||
|
data:$("#emp_assign_schedule_status_form").serialize(),
|
||
|
type:'POST',
|
||
|
success:function(data){
|
||
|
|
||
|
BootstrapDialog.alert('Employee Assign Training Status Saved Successfully');
|
||
|
$("#flex1").flexReload();
|
||
|
|
||
|
}
|
||
|
,error:function(data){
|
||
|
BootstrapDialog.alert('Error In Saving Employee Assign Training Status');
|
||
|
}
|
||
|
|
||
|
|
||
|
});
|
||
|
}
|
||
|
function myDateFormatter( d){
|
||
|
var date= new Date(d);
|
||
|
return date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear();
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<?php include('techsyn_footer.php'); ?>
|
||
|
|
||
|
<?php include('form/assign_training_status_form.php');?>
|