the_mechanic/app/Views/layout/header.php
venba-Inspriron-3558 e36d04770b FIX_Remaining issues
2025-11-03 10:57:17 +05:30

725 lines
35 KiB
PHP
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Mechanic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
<meta content="Coderthemes" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="<?php echo base_url()?>public/assets/images/favicon.ico">
<!-- third party css -->
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url()?>public/assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" />
<!-- third party css end -->
<!-- App css -->
<link href="<?php echo base_url()?>public/assets/css/bootstrap-modern.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
<link href="<?php echo base_url()?>public/assets/css/app-modern.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
<link href="<?php echo base_url()?>public/assets/css/bootstrap-modern-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
<link href="<?php echo base_url()?>public/assets/css/app-modern-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
<!-- icons -->
<link href="<?php echo base_url()?>public/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<!-- toster alert -->
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css" rel="stylesheet">
<style>
.select2-container--default .select2-selection--single {
height: 37px !important;
line-height: 37px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
padding-top: 3px !important;
}
/* Override toastr font color */
.toast-warning {
color: black !important;
background-color: #edd179 !important; /* Set background color to a solid color */
opacity: 1 !important; /* Set opacity to 1 to remove transparency */
}
.toast-success {
color: black !important;
background-color: #2aa762 !important; /* Set background color to a solid color */
opacity: 1 !important; /* Set opacity to 1 to remove transparency */
}
.icon-large {
font-size: 1.5em; /* Adjust the font size as needed */
}
.dataTables_wrapper button{
background: #f1f5f7;
color: #343a40;
border-width: 0;
}
.dataTables_wrapper .dt-buttons{
float:left;
}
.cancelled-status {
color: red;
}
.created-status {
color: blue;
}
.paid-status {
color: green;
}
.highlight_datatable {
background-color: lightpink; /* Change this color to whatever you like */
}
.gear {
position: absolute;
width: 80px;
height: 80px;
margin: auto;
background: #198;
border-radius: 50%;
animation-name: spin;
animation-duration:6s;
animation-iteration-count: infinite;
animation-timing-function: linear;
top: 50%;
left: 0;
right: 0;
}
.gear .center {
position: absolute;
top: 20px;
left: 20px;
z-index: 10;
width: 40px;
height: 40px;
background: #fff;
border-radius: 50%;
}
.bar {
position: absolute;
top: -10px;
left: 28px;
z-index: 1;
width: 22px;
height: 100px;
background: #198;
}
.bar:nth-child(2) {
transform: rotate(45deg);
}
.bar:nth-child(3) {
transform: rotate(90deg);
}
.bar:nth-child(4) {
transform: rotate(135deg);
}
.gear-two {
left: -90px;
top: 68px;
width: 55px;
height: 55px;
background: #f58bb6;
animation-name: spin-reverse;
}
.gear-two .bar {
background: #f58bb6;
width: 14px;
height: 70px;
left: 20px;
top: -8px;
}
.gear-two .center {
width: 28px;
height: 28px;
left: 13px;
top: 13px;
}
.gear-three {
left: 90px;
top: 68px;
width: 55px;
height: 55px;
background: #576e81;
animation-name: spin-reverse;
}
.gear-three .bar {
background: #576e81;
width: 14px;
height: 70px;
left: 20px;
top: -8px;
}
.gear-three .center {
width: 28px;
height: 28px;
left: 13px;
top: 13px;
}
@-webkit-keyframes spin {
50% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
50% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes spin-reverse {
50% {
-webkit-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
@keyframes spin-reverse {
50% {
-webkit-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
#loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgb(0 0 0 / 5%);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999; /* Ensure it appears on top of other content */
}
</style>
<script>
toastr.options = {
"timeOut": 5000,
"closeButton": true,
};
</script>
</head>
<body class="loading" data-layout-mode="detached" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "sidebar": { "color": "light", "size": "default", "showuser": true}, "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'>
<!-- Begin page -->
<div id="wrapper">
<!-- ========== Left Sidebar Start ========== -->
<div class="left-side-menu">
<!-- LOGO -->
<div class="logo-box">
<a href="index.html" class="logo logo-dark text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="24">
<!-- <span class="logo-lg-text-light">Minton</span> -->
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20">
<!-- <span class="logo-lg-text-light">M</span> -->
</span>
</a>
<a href="index.html" class="logo logo-light text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="24">
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20">
</span>
</a>
</div>
<div class="h-100" data-simplebar>
<!-- User box -->
<!-- <div class="user-box text-center">
<p class="text-reset"><?php echo session()->get("logged_user_role") ?></p>
</div> -->
<!--- Sidemenu -->
<div id="sidebar-menu">
<ul id="side-menu">
<li>
<a href="<?= base_url("dashboard") ?>" class="dropdown-item notify-item">
<i class="ri-layout-line"></i>
<span>Dashboard</span>
</a>
</li>
<?php if(session()->get('logged_user_role') == 'Super Admin') {
?>
<li>
<a href="<?= base_url("business_index") ?>" class="dropdown-item notify-item">
<i class="ri-layout-line"></i>
<span>Business</span>
</a>
</li>
<?php } ?>
<?php if(session()->get('logged_user_role') == 'Floor Manager' ||
session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Sales' ||
session()->get('logged_user_role') == 'Store Manager') {
?>
<li>
<a href="#sidebarLayouts1" data-toggle="collapse">
<!-- <i class="mdi mdi-sale"></i> -->
<i class="ri-file-chart-fill"></i>
<span> Sales </span>
<span class="menu-arrow"></span>
</a>
<div class="collapse" id="sidebarLayouts1">
<ul class="nav-second-level">
<li>
<a href="<?php echo base_url('sales_order_index') ?>">Sales Order</a>
</li>
<!-- Pavithira Told
Move Client and Vehicle under Masters for reuse across Sales and Job Card as these are common entities used in multiple modules, so centralizing them under Masters will improve consistency and usability.
<li>
<a href="<?php echo base_url('vehicle_index') ?>">Vehicles</a>
</li>
<li>
<a href="<?php echo base_url('client_index') ?>">Clients</a>
</li>
Pavithira Told -->
</ul>
</div>
</li>
<?php } ?>
<?php if(session()->get('logged_user_role') == 'Floor Manager' ||
session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Job Card Manager' ||
session()->get('logged_user_role') == 'Store Manager' ||
session()->get('logged_user_role') == 'Senior Mechanic' ||
session()->get('logged_user_role') == 'Mechanic') {
?>
<li>
<a href="#sidebarLayouts2" data-toggle="collapse">
<i class="fa fa-wrench"></i>
<span> Job Card </span>
<span class="menu-arrow"></span>
</a>
<div class="collapse" id="sidebarLayouts2">
<ul class="nav-second-level">
<li>
<a href="<?php echo base_url('job_card_index') ?>">Job Card</a>
</li>
<!-- Pavithira Told
Move Client and Vehicle under Masters for reuse across Sales and Job Card as these are common entities used in multiple modules, so centralizing them under Masters will improve consistency and usability.
<li>
<a href="<?php echo base_url('vehicle_index') ?>">Vehicles</a>
</li>
<li>
<a href="<?php echo base_url('client_index') ?>">Clients</a>
</li>
Pavithira Told -->
<li>
<a href="<?php echo base_url('service_index') ?>">
<!-- <i class="ri-e-bike-fill"></i> -->
<span>Services</span>
</a>
</li>
<li>
<a href="<?php echo base_url('complaint_index') ?>">
<!-- <i class="fas fa-exclamation-circle"></i> -->
<span>Complaints Master</span>
</a>
</li>
<li>
<a href="<?php echo base_url('outsourcing_index') ?>">
<!-- <i class="ri-logout-circle-line"></i> -->
<span>Outsourcing Master</span>
</a>
</li>
</ul>
</div>
</li>
<?php } ?>
<?php if(session()->get('logged_user_role') == 'Floor Manager' ||
session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Store Manager') {
?>
<li>
<a href="#sidebarLayouts3" data-toggle="collapse">
<i class="fa fa-shopping-cart"></i>
<span> Purchase </span>
<span class="menu-arrow"></span>
</a>
<div class="collapse" id="sidebarLayouts3">
<ul class="nav-second-level">
<li>
<a href="<?php echo base_url('purchase_index') ?>">Purchase Order</a>
</li>
<li>
<a href="<?php echo base_url('return_order') ?>"> Purchase Return</a>
</li>
<li>
<a href="<?php echo base_url('reorder_level_index') ?>">Low Stock Items</a>
</li>
</ul>
</div>
</li>
<?php } ?>
<?php if(session()->get('logged_user_role') == 'Floor Manager' ||
session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Store Manager') {
?>
<li>
<a href="#sidebarLayouts" data-toggle="collapse">
<i class="fa fa-archive"></i>
<span> Inventory </span>
<span class="menu-arrow"></span>
</a>
<div class="collapse" id="sidebarLayouts">
<ul class="nav-second-level">
<li>
<a href="<?php echo base_url('product_index') ?>">Products</a>
<!-- <a href="<?php echo base_url('product_categories') ?>">Products</a> -->
</li>
<li>
<a href="<?php echo base_url('product_category_index') ?>">Product Category</a>
</li>
</ul>
</div>
</li>
<li>
<a href="<?php echo base_url('vendor_index') ?>">
<i class="fas fa-shopping-bag"></i>
<span> Vendor </span>
</a>
</li>
<li>
<a href="<?php echo base_url('spare_manufacturer_index') ?>">
<i class="fas fa-cogs"></i>
<span> Manufacturer </span>
</a>
</li>
<?php } ?>
<?php if(session()->get('logged_user_role') == 'Administrator' ) { ?>
<li>
<a href="<?php echo base_url('index') ?>">
<i class="fas fa-user"></i>
<span> Staff </span>
</a>
</li>
<?php } ?>
<li>
<a href="<?php echo base_url('invoices') ?>">
<i class="fas fa-file-invoice"></i>
<span> Invoices </span>
</a>
</li>
<!-- <li>
<a href="#sidebarLayouts4" data-toggle="collapse">
<i class="fas fa-file-invoice"></i>
<span> Invoices </span>
<span class="menu-arrow"></span>
</a>
<div class="collapse" id="sidebarLayouts4">
<ul class="nav-second-level">
<li>
<a href="<?php echo base_url('invoices') ?>">Invoice</a>
</li>
</ul>
</div>
</li> -->
<!-- Pavithira Told
Move Client and Vehicle under Masters for reuse across Sales and Job Card as these are common entities used in multiple modules, so centralizing them under Masters will improve consistency and usability.
-->
<?php
$role = session()->get('logged_user_role');
$allowed_roles = [ 'Floor Manager', 'Administrator', 'Job Card Manager',
'Store Manager', 'Senior Mechanic', 'Mechanic', 'Sales'
];
if (in_array($role, $allowed_roles)):
?>
<li class="menu-title">Masters</li>
<li>
<?php
$vehicle_roles = ['Floor Manager', 'Administrator', 'Job Card Manager', 'Store Manager', 'Senior Mechanic', 'Mechanic'];
if (in_array($role, $vehicle_roles)): ?>
<a href="<?= base_url('vehicle_index') ?>">
<i class="fas fa-motorcycle"></i>
<span> Vehicles</span>
</a>
<?php endif; ?>
<?php
$make_roles = ['Administrator', 'Floor Manager', 'Store Manager'];
if (in_array($role, $make_roles)): ?>
<a href="<?= base_url('make_index') ?>">
<i class="fas fa-tags"></i>
<span> Make & Models</span>
</a>
<?php endif; ?>
<?php
$client_roles = ['Floor Manager', 'Administrator', 'Job Card Manager', 'Store Manager', 'Senior Mechanic', 'Sales', 'Mechanic'];
if (in_array($role, $client_roles)): ?>
<a href="<?= base_url('client_index') ?>">
<i class="fas fa-id-card"></i>
<span> Clients</span>
</a>
<?php endif; ?>
</li>
<?php endif; ?>
<!-- Pavithira Told -->
<!-- Pavithira Told
Move Client and Vehicle under Masters for reuse across Sales and Job Card as these are common entities used in multiple modules, so centralizing them under Masters will improve consistency and usability.
<?php if(session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Floor Manager' ||
session()->get('logged_user_role') == 'Store Manager' ||
session()->get('logged_user_role') == 'Sales') { ?>
<?php if(session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Floor Manager' ||
session()->get('logged_user_role') == 'Store Manager' ) { ?>
<?php } ?>
<?php if(session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Floor Manager'
// session()->get('logged_user_role') == 'Sales'
) { ?>
<li class="menu-title">Masters</li>
<li>
<a href="<?php echo base_url('make_index') ?>">
<i class="fas fa-motorcycle"></i>
<span> Make & Models</span>
</a>
</li>
<?php } ?>
<?php } ?>
Pavithira Told -->
</ul>
</div>
<!-- End Sidebar -->
<div class="clearfix"></div>
</div>
<!-- Sidebar -left -->
</div>
<!-- Left Sidebar End -->
<!-- ============================================================== -->
<!-- Start Page Content here -->
<!-- ============================================================== -->
<div class="content-page">
<div class="content">
<!-- Topbar Start -->
<div class="navbar-custom">
<div class="container-fluid">
<ul class="list-unstyled topnav-menu float-right mb-0">
<?php if(session()->get('logged_user_role') == 'Floor Manager' ||
session()->get('logged_user_role') == 'Administrator' ||
session()->get('logged_user_role') == 'Job Card Manager' ||
session()->get('logged_user_role') == 'Store Manager' ||
session()->get('logged_user_role') == 'Senior Mechanic' ||
session()->get('logged_user_role') == 'Mechanic') { ?>
<li class="dropdown d-none d-lg-inline-block">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" href="<?php echo base_url('job_card_index') ?>" title="Job Card">
<i class="fa fa-wrench" style="font-size:20px;"></i>
</a>
</li>
<?php } ?>
<!-- <li class="dropdown d-none d-lg-inline-block">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
<i class="fe-maximize noti-icon"></i>
</a>
</li> -->
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<span class="pro-user-name ml-1">
<?php echo session()->get('logged_user_name'); ?><i class="mdi mdi-chevron-down"></i>
</span>
</a>
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
<!-- item-->
<!-- item-->
<a href="<?= base_url("edit_account/". session()->get("logged_user")); ?>" class="dropdown-item notify-item">
<i class="ri-account-circle-line"></i>
<span>My Account</span>
</a>
<?php if(session()->get('logged_user_role') == 'Administrator') { ?>
<a href="<?= base_url("new_business/". session()->get("logged_user_business_id")); ?>" class="dropdown-item notify-item">
<i class="ri-layout-line"></i>
<span>Business</span>
</a>
<a href="<?= base_url("get_branch_edit_form/".session()->get('logged_user_branch_id')); ?>" class="dropdown-item notify-item">
<i class="fas fa-code-branch"></i>
<span>Branches</span>
</a>
<?php } ?>
<!-- item-->
<a href="<?php echo base_url("log_out")?>" class="dropdown-item notify-item">
<i class="ri-logout-box-line"></i>
<span>Logout</span>
</a>
</div>
</li>
</ul>
<!-- LOGO -->
<div class="logo-box">
<a class="logo logo-dark text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>public/assets/images/favicon.ico" alt="" height="24" style="width: 50px; height: 45px;" >
<!-- <span class="logo-lg-text-light">Minton</span> -->
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20" style="width: 170px; height: 55px;">
<!-- <span class="logo-lg-text-light">M</span> -->
</span>
</a>
<a class="logo logo-light text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>public/assets/images/favicon.ico" alt="" height="24" style="width: 50px; height: 45px;">
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>public/assets/images/The-Mechanic-Yellow.png" alt="" height="20" style="width: 170px; height: 55px;">
</span>
</a>
</div>
<ul class="list-unstyled topnav-menu topnav-menu-left m-0">
<li>
<button class="button-menu-mobile waves-effect waves-light">
<i class="fe-menu"></i>
</button>
</li>
<li>
<!-- Mobile menu toggle (Horizontal Layout)-->
<a class="navbar-toggle nav-link" data-toggle="collapse" data-target="#topnav-menu-content">
<div class="lines">
<span></span>
<span></span>
<span></span>
</div>
</a>
<!-- End mobile menu toggle-->
</li>
</ul>
<div class="clearfix"></div>
</div>
</div>
<!-- end Topbar -->
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<!-- <div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Datatables</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Minton</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
<li class="breadcrumb-item active">Datatables</li>
</ol>
</div>
</div>
</div>
</div> -->
<!-- end page title -->
</div>
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
</div>
<!-- END wrapper -->