the_mechanic/app/Views/dashboard.php
2024-09-25 09:12:05 +05:30

91 lines
3.8 KiB
PHP
Executable File

<?php include('layout/header.php'); ?>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"><?php echo 'Dashboard' ?></h4>
<div class="page-title-right">
<ol class="breadcrumb m-0"></ol>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<!-- <h4 class="header-title">Job Card LIVE</h4> -->
<p class="sub-header mb-1">
Current List of Job Cards
</p>
<table class="tablesaw table mb-0" data-tablesaw-mode="swipe">
<thead>
<tr>
<th class="title" scope="col" data-tablesaw-sortable-col data-tablesaw-priority="persist">Bike Details</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-sortable-default-col data-tablesaw-priority="3">Job Card No</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="2">Created Time</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="1">Client</th>
<th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="4">Workers</th>
</tr>
</thead>
<tbody>
<?php foreach ($dashboard_data as $key => $value) { ?>
<tr>
<td><?= $value['reg_no'] ?>, <br><?= $value['bike_name'] ?> <?= $value['bike_modal_name'] ?>,<br> <?= $value['colour'] ?> color</td>
<td><?= $value['order_number'] ?></td>
<td><?php
$date = new DateTime($value['created_at']);
$formattedTime = $date->format('h:iA');
echo $formattedTime;
?>
(TODAY)</td>
<td><?= $value['client_name'] ?><br><?= $value['client_mobile_no'] ?></td>
<td><?php echo (isset($value['username']) && $value['username'] != '' ? $value['username']: 'Not Assigned') ?> </td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div> <!-- end card -->
</div> <!-- end col-->
<div class="col-xl-7">
<div class="row">
<div class="col-lg-6">
<div class="card">
<div class="card-body">
<div class="dropdown float-right">
</div>
<h4 class="header-title mb-4">Delivery Today</h4>
<?php foreach ($delivery_data as $key => $value) { ?>
<div class="media">
<div class="media-body">
<span class="badge badge-soft-warning float-right" style="font-size:15px;"><?= $value['order_number'] ?></span>
<h5 class="mt-0 mb-1"><?= $value['client_name'] ?></h5>
<span class="font-13"><?= $value['client_mobile_no'] ?></span>
</div>
</div>
<?php } ?>
</div>
<!-- end card-body -->
</div>
<!-- end card-->
</div>
<!-- end col -->
<div class="col-lg-6">
</div><!-- end col -->
</div><!-- end row-->
</div>
</div>
<?php include('layout/footer.php'); ?>