465 lines
12 KiB
PHP
465 lines
12 KiB
PHP
<?php include('techsyn_header.php');
|
|
include('log_entry.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>
|
|
<i class="ace-icon fa fa-home home-icon"></i>
|
|
<a href="#">Home</a>
|
|
</li>
|
|
<li class="#">SHIFT STATUS</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
|
|
|
|
<div class="page-content">
|
|
<div class="box box-primary"
|
|
style="padding: 10px; margin: 2px 0px 50px 5px; width: 99.5%; ">
|
|
<form id="task_form_shift" method="post">
|
|
<!-- box-body-->
|
|
<div class="box-body">
|
|
|
|
|
|
<div class="row" >
|
|
<div class="col-sm-12">
|
|
<table id="myTable" class="table table-bordered order-list" >
|
|
<thead>
|
|
<tr>
|
|
<th>SELECT SHIFT</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
|
|
<?php $sql1="select * from shift_status_details where current_status='R' and ohc_location_id='".$_SESSION['current_ohcttype']."'";
|
|
$result1 = @mysqli_query($conn,$sql1);
|
|
$total=mysqli_num_rows($result1);
|
|
error_log("asfasfasfaf".$total);
|
|
|
|
?>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
<center> <select
|
|
class="form-control select2" id="shift_id"
|
|
name="shift_id" <?php if($total!=0){echo "disabled";}?>>
|
|
<option disabled selected><?php if($total==0){
|
|
echo "Please
|
|
select SHIFT";
|
|
}
|
|
else{
|
|
echo "Please
|
|
End the CURRENT Shift";
|
|
|
|
}?></option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php echo generateOptionWithWhereClause1('shift_status', 'status_name', 'shift_status_id', '', '', 'is_shift', 'Y'); ?>
|
|
</select>
|
|
</center>
|
|
|
|
<td>
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<!-- End box-body-->
|
|
<!--box-footer-->
|
|
<div class="box-footer" style="text-align: center;">
|
|
|
|
<button class="btn btn-success new_button" id="start_button" type="reset" onclick="start_shift();" <?php if($total!=0){echo "disabled";}?>>
|
|
START SHIFT
|
|
</button>
|
|
|
|
|
|
<button class="btn btn-info save_button" id="end_button" type="reset" onclick="end_shift();" <?php if($total==0){echo "disabled";}?> >
|
|
|
|
END SHIFT
|
|
</button>
|
|
|
|
|
|
</div>
|
|
<!--End box-footer-->
|
|
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<!-- 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>
|
|
|
|
|
|
|
|
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
|
|
<!-- End of breadcrumb -->
|
|
|
|
<div class="page-content" style="
|
|
margin-top: -47px;">
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
|
|
<form name="f1" method="post" id="flex_appointment_form" action="bio_medical_waste_generation_excel.php">
|
|
<div id="flex1" style="width:100%">
|
|
<input type="hidden" name="flex_ambulance_id" id="flex_ambulance_id"/>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<form name="export_form" method="post" id="export_form" action="">
|
|
|
|
<input type="hidden" name="pdf_actions" id="pdf_actions" value="bio_medical_waste_generation_pdf.php"/>
|
|
<input type="hidden" name="excel_actions" id="excel_actions" value="bio_medical_waste_generation_excel.php"/>
|
|
<input type="hidden" name="pdf_action" id="pdf_action" value="biowaste_pdf.php"/>
|
|
<input type="hidden" name="excel_action" id="excel_action" value="excel_ambulance.php"/>
|
|
</form>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div><!-- /.page-content -->
|
|
</div>
|
|
</div><!-- /.main-content -->
|
|
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
var w=screen.width*.90;
|
|
var h =0;
|
|
h =(window.innerHeight-($("#navbar").height()+$(".breadcrumbs").height()))*.75;
|
|
$("#flex1").flexigrid({
|
|
url: 'shift_status_script.php',
|
|
dataType: 'json',
|
|
colModel : [
|
|
{display: 'Sr', name : 'count', width : w*.10, sortable : false, align: 'left'},
|
|
{display: 'SHIFT NAME', name : 'shift_name', width : w*.25, sortable : true, align: 'left'},
|
|
{display: 'Start DATE/TIME', name : 'start_shift', width : w*.25, sortable : true, align: 'left'},
|
|
// {display: 'End', name : 'end_shift', width : w*.30, sortable : true, align: 'left'},
|
|
{display: 'Current Status', name : 'status', width : w*.30, sortable : true, align: 'left'},
|
|
|
|
],
|
|
// buttons : [
|
|
|
|
// // {name: 'Add', bclass: 'add', onpress : add},
|
|
// //{separator: true},
|
|
// //{name: 'PDFReport', bclass: 'print', onpress : pdfReport},
|
|
// // {separator: true},
|
|
// {name: 'PDF', bclass: 'print', onpress : pdf},
|
|
// {separator: true},
|
|
// {name: 'Excel', bclass: 'print_excel', onpress : excel},
|
|
// {separator: true}
|
|
// ],
|
|
searchitems : [
|
|
//{display: 'Appointment Id', name : 'appointment_id',isdefault: true},
|
|
|
|
|
|
{display: 'Frequency Name', name : 'frequency_name'},
|
|
{display: 'Frequency Code', name : 'frequency_code'},
|
|
|
|
|
|
|
|
],
|
|
sortname: "frequency_id",
|
|
sortorder: "asc",
|
|
usepager: true,//pagination
|
|
//title:"Employee OPD",
|
|
useRp: true,
|
|
rp: 50,//records per page
|
|
showTableToggleBtn: false,//toggle button for the whole table
|
|
resizable: true,
|
|
// width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
// function open_frequency(flex_ambulance_id,action){
|
|
// if(action=="V"){
|
|
// //$(".save_button").hide()
|
|
// location.href="ambulance_details.php?flex_ambulance_id="+flex_ambulance_id+"";
|
|
// $(".save_button").hide()
|
|
// }else{
|
|
// location.href="ambulance_details.php?flex_ambulance_id="+flex_ambulance_id+"";
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
function delete_frequency(frequency_id){
|
|
|
|
$.ajax({
|
|
url : 'delete_task_frequency.php',
|
|
data: {frequency_id:frequency_id},
|
|
type : 'POST',
|
|
dataType:'json',
|
|
success : function(data) {
|
|
|
|
if(data=='SUCCESS') {
|
|
|
|
BootstrapDialog.alert('Deleted Task Frequency Details Successfully');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Task Frequency Details Successfully');
|
|
return;
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
function show_save_button(){
|
|
$("#save_button").show()
|
|
}
|
|
|
|
|
|
|
|
|
|
function pdf(){
|
|
window.open('task_frequency_list_pdf.php','Task Frequency List');
|
|
}
|
|
function excel(){
|
|
window.open('task_frequency_list_excel.php','Task Frequency List');
|
|
}
|
|
|
|
function myDateFormat(date){
|
|
|
|
var d=new Date(date);
|
|
var day=d.getDate();
|
|
var m=d.getMonth()+1;
|
|
var y=d.getFullYear();
|
|
|
|
|
|
return day+"-"+m+"-"+y;
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- End of page-content -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
|
|
function validate(){
|
|
|
|
|
|
|
|
var frequency_name = $('#frequency_name0').val();
|
|
|
|
if(frequency_name == ''){
|
|
|
|
BootstrapDialog.alert('Please Enter Frequency Name.!!!');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
var frequency_code = $('#frequency_code0').val();
|
|
|
|
if(frequency_code == ''){
|
|
|
|
BootstrapDialog.alert('Please Enter Frequency Code.!!!');
|
|
|
|
return false;
|
|
|
|
}
|
|
save();
|
|
}
|
|
|
|
</script>
|
|
|
|
<style>
|
|
#modal-add-ailment{
|
|
overflow-y:scroll;
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<script type="text/javascript">
|
|
|
|
$('.select2').select2()
|
|
|
|
function start_shift(){
|
|
|
|
var shift_id = $('#shift_id').val();
|
|
if(shift_id ==null){
|
|
BootstrapDialog.alert('Please Select the shift.!!!');
|
|
return false;
|
|
}
|
|
|
|
$.ajax({
|
|
url : 'save_shift_status.php ',
|
|
type : "POST",
|
|
data : $("#task_form_shift").serialize(),
|
|
dataType : 'json',
|
|
success : function(data) {
|
|
console.log(data);
|
|
|
|
// alert(data);
|
|
BootstrapDialog.alert('Shift started successfully.');
|
|
document.getElementById("shift_id").disabled = true;
|
|
document.getElementById("end_button").disabled = false;
|
|
document.getElementById("start_button").disabled = true;
|
|
|
|
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Starting Shift');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
|
|
}
|
|
function end_shift(){
|
|
|
|
|
|
$.ajax({
|
|
url : 'save_shift_status.php ',
|
|
type : "POST",
|
|
data : $("#task_form_shift").serialize(),
|
|
dataType : 'json',
|
|
success : function(data) {
|
|
console.log(data);
|
|
|
|
|
|
BootstrapDialog.alert('Shift ended Successfully.');
|
|
|
|
|
|
document.getElementById("shift_id").disabled = false;
|
|
document.getElementById("end_button").disabled = true;
|
|
document.getElementById("start_button").disabled = false;
|
|
|
|
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error : function(data) {
|
|
BootstrapDialog.alert('Error Ending Shift');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
|
|
}
|
|
$('.date-picker').datepicker({
|
|
autoclose:true,
|
|
format:'dd/mm/yyyy'
|
|
}).next().on(ace.click_event,function(){
|
|
$(this).prev().focus();
|
|
});
|
|
|
|
</script>
|
|
<!-- bootstrap & fontawesome -->
|
|
<link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />
|
|
|
|
<!-- page specific plugin styles -->
|
|
<link rel="stylesheet" href="assets/css/jquery-ui.custom.min.css" />
|
|
<link rel="stylesheet" href="assets/css/chosen.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-timepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/daterangepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-datetimepicker.min.css" />
|
|
<link rel="stylesheet" href="assets/css/bootstrap-colorpicker.min.css" />
|
|
<script type="text/javascript" src="js/typeahead.bundle.js"></script>
|
|
<script src="assets/js/jquery-ui.custom.min.js"></script>
|
|
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
|
|
<script src="assets/js/chosen.jquery.min.js"></script>
|
|
<script src="assets/js/spinbox.min.js"></script>
|
|
<script src="assets/js/bootstrap-datepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-timepicker.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.min.js"></script>
|
|
<script src="assets/js/jquery.dataTables.bootstrap.min.js"></script>
|
|
<script src="assets/js/dataTables.buttons.min.js"></script>
|
|
<script src="assets/js/buttons.flash.min.js"></script>
|
|
<script src="assets/js/buttons.html5.min.js"></script>
|
|
<script src="assets/js/buttons.print.min.js"></script>
|
|
<script src="assets/js/buttons.colVis.min.js"></script>
|
|
<script src="assets/js/dataTables.select.min.js"></script>
|
|
|
|
|
|
<script src="assets/js/moment.min.js"></script>
|
|
<script src="assets/js/daterangepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-datetimepicker.min.js"></script>
|
|
<script src="assets/js/bootstrap-colorpicker.min.js"></script>
|
|
<script src="assets/js/jquery.knob.min.js"></script>
|
|
<script src="assets/js/autosize.min.js"></script>
|
|
<script src="assets/js/jquery.inputlimiter.min.js"></script>
|
|
<script src="assets/js/jquery.maskedinput.min.js"></script>
|
|
<script src="assets/js/bootstrap-tag.min.js"></script>
|
|
<script src="assets/js/ace-elements.min.js"></script>
|
|
|