whoami7 - Manager
:
/
home
/
gracious
/
employeeportal.graciousphils.com
/
Upload File:
files >> /home/gracious/employeeportal.graciousphils.com/leaveedit.php
<?php include_once('includes/config.php'); if (!isset($_SESSION['eid'])) { header("Location: index.php"); exit(); } else { ?> <!DOCTYPE html> <html lang="en"> <head> <title>Employee Portal</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="bootstrap/bootstrap.min.css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-dark@4/dark.css" rel="stylesheet"> <link rel="stylesheet" href="cssfiles/loading.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.5.0/css/responsive.dataTables.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <style> #sidebar { width: 250px; transition: width 0.3s ease-in-out; } @media (max-width: 768px) { #sidebar { width: 60px; text-align: center; } #sidebar ul.nav li a { display: flex; justify-content: center; } #sidebar ul.nav li a span { display: none; } } .field-toggle-row { border-bottom: 1px solid #dee2e6; padding: 6px 0; align-items: center; } .field-toggle-row:last-child { border-bottom: none; } .editable-field { display: none; } .editable-field.show { display: block; } .toggle-check:checked + label { color: #198754; font-weight: 600; } .field-label { font-weight: 500; } .card-fields { max-height: 420px; overflow-y: auto; } </style> </head> <?php include 'header.php'; ?> <body style="background-color: #EFE9D5;"> <div id="loading-screen"> <div class="loader"> <div class="loading-text"> Loading<span class="dot">.</span><span class="dot">.</span><span class="dot">.</span> </div> <div class="loading-bar-background"> <div class="loading-bar"> <div class="white-bars-container"> <div class="white-bar"></div> <div class="white-bar"></div> <div class="white-bar"></div> </div> </div> </div> </div> </div> <div class="container" style="padding-top: 20px;"> <div class="row"> <div class="row"> <!-- LEFT: Form --> <div class="col-md-5 mt-2"> <div class="card"> <div class="card-header text-white bg-primary d-flex align-items-center gap-2"> <i class="fas fa-edit"></i> Leave Edit Request </div> <div class="card-body"> <div class="row g-2"> <div class="col-md-12"> <div class="form-floating"> <input type="text" class="form-control" id="requestnum" name="requestnum" placeholder="Ticket Number" autocomplete="off" readonly> <label for="requestnum" class="text-success">Request Ticket Number</label> </div> <label id="ticketstatus" class="mt-2"></label> </div> <!-- Step 1: Pick the leave by date range --> <div class="col-md-12 mt-2"> <div class="alert alert-info py-2 mb-1"> <small><i class="fas fa-info-circle"></i> Enter the dates of the leave you want to edit, then select which fields to change.</small> </div> </div> <div class="col-md-6"> <div class="form-floating"> <input type="date" name="datefrom" id="datefrom" class="form-control" required> <label for="datefrom">Leave Date From</label> </div> </div> <div class="col-md-6"> <div class="form-floating"> <input type="date" name="dateto" id="dateto" class="form-control" required> <label for="dateto">Leave Date To</label> </div> </div> <!-- Step 2: Selectable fields to edit --> <div class="col-md-12 mt-2"> <div class="card border-warning"> <div class="card-header bg-warning text-dark py-2"> <small class="fw-bold"><i class="fas fa-list-check"></i> Select fields you want to edit</small> </div> <div class="card-body py-2 card-fields"> <!-- Leave Type --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_leave_type"> <label for="chk_leave_type" class="small">Leave Type</label> </div> <div class="col-7 editable-field" id="ef_leave_type"> <select class="form-select form-select-sm" id="new_leave_type" name="new_leave_type"> <option value="Vacation">Vacation</option> <option value="Sick">Sick</option> <option value="Emergency">Emergency</option> <option value="Birthday">Birthday</option> <option value="Paternity">Paternity</option> <option value="Maternity">Maternity</option> <option value="Bereavement">Bereavement</option> </select> </div> </div> <!-- Leave Category --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_leave_category"> <label for="chk_leave_category" class="small">Leave Category</label> </div> <div class="col-7 editable-field" id="ef_leave_category"> <select class="form-select form-select-sm" id="new_leave_category" name="new_leave_category"> <option value="WD">Whole Day</option> <option value="HA">Half Day Morning</option> <option value="HP">Half Day Afternoon</option> <option value="UT">Undertime</option> </select> </div> </div> <!-- Leave Reason --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_description"> <label for="chk_description" class="small">Leave Reason</label> </div> <div class="col-7 editable-field" id="ef_description"> <textarea class="form-control form-control-sm" id="new_description" rows="2" placeholder="New reason"></textarea> </div> </div> <!-- Date From --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_filed_date_from"> <label for="chk_filed_date_from" class="small">Date From</label> </div> <div class="col-7 editable-field" id="ef_filed_date_from"> <input type="date" class="form-control form-control-sm" id="new_filed_date_from"> </div> </div> <!-- Date To --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_filed_date_to"> <label for="chk_filed_date_to" class="small">Date To</label> </div> <div class="col-7 editable-field" id="ef_filed_date_to"> <input type="date" class="form-control form-control-sm" id="new_filed_date_to"> </div> </div> <!-- Total Days --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_total_days"> <label for="chk_total_days" class="small">Total Days</label> </div> <div class="col-7 editable-field" id="ef_total_days"> <input type="number" step="0.5" class="form-control form-control-sm" id="new_total_days" placeholder="e.g. 1"> </div> </div> <!-- Time From --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_time_from"> <label for="chk_time_from" class="small">Time 1</label> </div> <div class="col-7 editable-field" id="ef_time_from"> <input type="time" class="form-control form-control-sm" id="new_time_from"> </div> </div> <!-- Time To --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_time_to"> <label for="chk_time_to" class="small">Time 2</label> </div> <div class="col-7 editable-field" id="ef_time_to"> <input type="time" class="form-control form-control-sm" id="new_time_to"> </div> </div> <!-- Total Time --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_total_time"> <label for="chk_total_time" class="small">Total Time</label> </div> <div class="col-7 editable-field" id="ef_total_time"> <input type="number" step="0.5" class="form-control form-control-sm" id="new_total_time" placeholder="hours"> </div> </div> <!-- Reliever --> <div class="row field-toggle-row"> <div class="col-5 field-label"> <input class="form-check-input toggle-check me-1" type="checkbox" id="chk_reliever"> <label for="chk_reliever" class="small">Reliever</label> </div> <div class="col-7 editable-field" id="ef_reliever"> <select class="form-select form-select-sm" id="new_reliever" name="new_reliever"> <option value="">-- Select new reliever --</option> </select> <div id="current_reliever_info" class="mt-1" style="display:none;"> <small class="text-muted"> <i class="fas fa-user-clock"></i> Current reliever: <span id="current_reliever_name" class="fw-semibold text-secondary"></span> </small> </div> <div id="reliever_loading" class="mt-1" style="display:none;"> <small class="text-muted"><i class="fas fa-spinner fa-spin"></i> Loading...</small> </div> </div> </div> </div><!-- end card-fields --> </div> </div> <!-- Reason for request --> <div class="col-md-12 mt-2"> <div class="form-floating"> <input type="text" name="remarks2" id="remarks2" class="form-control" required> <label for="remarks2">Reason for requesting edit</label> </div> </div> <div class="col-md-12 mt-2"> <button type="button" class="btn btn-success form-control" id="submitleaveedit"> <i class="fas fa-paper-plane"></i> Submit Edit Request </button> </div> </div> </div> </div> </div> <!-- RIGHT: Request Status Table --> <div class="col-md-7 mt-2"> <div class="card"> <div class="card-header text-white bg-primary"></div> <div class="card-body"> <div class="col-md-12"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header bg-success text-white"> Request Status </div> <div class="card-body"> <table class="table table-bordered nowrap Responsive text-black" style="width:100%;" id="leaveEditTable"> <thead class="table-primary"> <tr> <th><img src="https://img.icons8.com/stickers/24/train-ticket.png" alt="ticket"/> Ticket</th> <th><img src="https://img.icons8.com/stickers/24/overtime.png" alt="date"/> Date From</th> <th><img src="https://img.icons8.com/stickers/24/overtime.png" alt="date"/> Date To</th> <th><img src="https://img.icons8.com/stickers/24/info-squared.png" alt="info"/> Fields Requested</th> <th><img src="https://img.icons8.com/stickers/24/info-squared.png" alt="info"/> Reason</th> <th><img src="https://img.icons8.com/stickers/24/spinner-frame-5.png" alt="status"/> Status</th> <th><img src="https://img.icons8.com/stickers/24/info-squared.png" alt="info"/> HR Remarks</th> </tr> </thead> <tbody></tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/responsive/2.5.0/js/dataTables.responsive.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <script src="employee_profile_js/loading.js"></script> <script src="profileupdate_js/load_ticket.js"></script> <script src="leaveedit_js/insert_leave_edit.js"></script> <script src="leaveedit_js/leaveedit_table.js"></script> </body> </html> <?php } ?>
Copyright ©2021 || Defacer Indonesia