?
Current Path : /home1/savoy/public_html/savoyglobal.net/eduplus2/application/views/hr/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/eduplus2/application/views/hr/view_leave_application.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?> <!-- BEGIN PAGE LEVEL STYLES --> <link rel="stylesheet" href="<?= base_url(); ?>assets/plugins/data-tables/DT_bootstrap.css" /> <!-- END PAGE LEVEL STYLES --> <div class="row-fluid"> <div class="span12"> <!-- BEGIN EXAMPLE TABLE PORTLET--> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-cogs"></i>Leave Application</div> <div class="actions"> <a href="#" onclick="addformdisplay('add_leave_application','hr')" class="btn green"><i class="icon-plus"></i> Add</a> </div> </div> <div class="portlet-body"> <table class="table table-striped table-hover table-bordered" id="sample_3"> <thead> <tr> <th class="sl_th">Sl No</th> <th>Employee Name</th> <th>From Date</th> <th>To Date</th> <th>Leave Type</th> <th>Remarks</th> <th>Status</th> <th class="action_th">Edit</th> <th class="action_th">Delete</th> <th class="action_th">Change Status</th> </tr> </thead> <tbody> <?php $table=""; $field=""; $i=0; foreach($viewinfo->result() as $row) { $i++; ?> <tr class="odd gradeX"> <td><?= $i; ?></td> <td><?=$row->employee_name?></td> <td><?=$this->mastermodel->convertdatenormalformat($row->from_date);?></td> <td><?=$this->mastermodel->convertdatenormalformat($row->to_date);?></td> <td><?=$this->mastermodel->get_single_field_value('leave_type','leave_type_name','leave_type_id',$row->leave_type_id);?> <td><?=$row->remarks;?></td> <td><?=$row->leave_status;?></td> <td> <a class="edit" href="#" onclick="editformdata('hr','edit_page','<?=$row->leave_application_id;?>','leave_application','leave_application_id','edit_leave_application')">Edit</a> </td> <td> <a class="delete" href="#" onclick="deletedata('leave_application',<?=$row->leave_application_id;?>,'leave_application_id','hr','viewinhrsearch','search_leave_application','view_leave_application','<?=$table?>','<?=$field?>')">Delete</a> </td> <td> <?php if($row->employee_reporting_to ==$_SESSION['employee_id']) { ?> <a href="#" class="confirm_opener" data-id="<?=$row->leave_application_id;?>"> <img src="<?=base_url()?>/assets/img/documentinfo.png" title="Status" width="20" class="statusicon" height="20" alt="Status" align = "center"> </a> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <div style='display:none'> <div id="uploaddiv"></div> </div> <div id="ajax-modal" class="modal hide fade" tabindex="-1"></div> <div id="dialog_confirm" class="hide ui-dialog-content ui-widget-content" style="display: block;"> <p> <span class="icon icon-warning-sign"></span> Please change leave application status below </p> </div> <script> jQuery(document).ready(function() { UIModals.init(); TableManaged.init(); }); function change_leave_status(status,id) { $.ajax({ type: "GET", dataType:"json", url: "<?= site_url('hr/leave_approval/') ?>/"+id+"/"+status, success: function(msg){ viewdata('hr','viewinhrsearch','search_leave_application','view_leave_application','1'); approve_id = ''; } }); } var approve_id = ""; $("#dialog_confirm" ).dialog({ dialogClass: 'ui-dialog-green', autoOpen: false, resizable: false, height: 210, modal: true, buttons: [ { 'class' : 'btn green', "text" : "Approve", click: function() { if(approve_id != '') { change_leave_status('Approved',approve_id); $(this).dialog( "close" ); } } }, { 'class' : 'btn red', "text" : "Reject", click: function() { if(approve_id != '') { change_leave_status('Rejected',approve_id); $(this).dialog( "close" ); } } }, { 'class' : 'btn', "text" : "Cancel", click: function() { $(this).dialog( "close" ); } } ] }); $( ".confirm_opener").click(function() { approve_id = $(this).data('id'); $( "#dialog_confirm").dialog("open"); $('.ui-dialog button').blur(); }); </script>