185 lines
7.3 KiB
PHP
185 lines
7.3 KiB
PHP
<link href="/assets/css/transport_provider/list.css" rel="stylesheet" type="text/css" />
|
||
|
||
<!-- Start Content-->
|
||
<div class="container-fluid">
|
||
|
||
<!-- start page title -->
|
||
<div class="row align-items-center">
|
||
<div class="col-12">
|
||
<div class="page-title-box">
|
||
<div class="page-title-right text-right action">
|
||
<a href="/automation_jobs/create" class="btn btn-success">New automation job</a>
|
||
</div>
|
||
<h4 class="page-title">Automation Jobs</h4>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- end page title -->
|
||
|
||
<!-- start alert -->
|
||
<?php if ($this->session->flashdata('success')) { ?>
|
||
<div class="col-12">
|
||
<div class="alert alert-success alert-dismissible bg-success text-white border-0" role="alert">
|
||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||
<span aria-hidden="true">×</span>
|
||
</button>
|
||
<?php echo $this->session->flashdata('success') ?>
|
||
</div>
|
||
</div>
|
||
<?php } ?>
|
||
<!-- end alert -->
|
||
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<div class="row">
|
||
<form class="search-block form-inline" id="searchForm" action="/automation_jobs" method="get">
|
||
<div class="form-group mr-sm-3">
|
||
<label style="width: 110px" for="transport-provider">Transport Provider</label>
|
||
<select
|
||
class="form-control"
|
||
id="transport-provider"
|
||
name="transport_provider_id"
|
||
placeholder="Enter transport provider"
|
||
>
|
||
<?php
|
||
if (isset($transport_provider_id) && isset($transport_provider_name)) {
|
||
echo '<option value="' . $transport_provider_id . '" selected >' . $transport_provider_name . '</option>';
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="form-group mr-sm-3" style="margin-top: 1rem">
|
||
<label style="width: 95px" for="location_start">Location</label>
|
||
<input class="form-control"
|
||
id="location_start"
|
||
name="location_start"
|
||
placeholder="Location"
|
||
value="<?= isset($location_start) ? $location_start : '' ?>"
|
||
/>
|
||
<input class="form-control"
|
||
id="location_end"
|
||
name="location_end"
|
||
placeholder="Location"
|
||
value="<?= isset($location_end) ? $location_end : '' ?>"
|
||
/>
|
||
</div>
|
||
|
||
<div class="form-group mr-sm-3" style="margin-top: 1rem">
|
||
<label style="width: 95px" for="from_complete">Complete Date</label>
|
||
<input class="form-control"
|
||
id="from_complete"
|
||
name="from_complete"
|
||
placeholder="Complete"
|
||
value="<?= isset($from_complete) ? $from_complete : '' ?>"
|
||
/>
|
||
<input class="form-control"
|
||
id="to_complete"
|
||
name="to_complete"
|
||
placeholder="Complete"
|
||
value="<?= isset($to_complete) ? $to_complete : '' ?>"
|
||
/>
|
||
</div>
|
||
|
||
<button class="btn btn-primary btn-search" id="btnSearch" type="submit">Search</button>
|
||
</form>
|
||
</div>
|
||
|
||
<div class="table-responsive-sm">
|
||
<table id="trips-datatable" class="table table-sm table-centered mb-0" width="100%">
|
||
<thead>
|
||
<tr>
|
||
<td>Id</td>
|
||
<td>Location Start</td>
|
||
<td>Location End</td>
|
||
<td>Cost Raw</td>
|
||
<td>Trackedemail Item</td>
|
||
<td>Cost</td>
|
||
<td>Transport Provider</td>
|
||
<td>Request Date</td>
|
||
<td>Started</td>
|
||
<td>Complete</td>
|
||
<td>Status</td>
|
||
<td>Action</td>
|
||
</tr>
|
||
</thead>
|
||
|
||
<tbody class="table-striped">
|
||
<?php foreach($list as $item): ?>
|
||
<tr>
|
||
<td><?php echo $item['id'] ?></td>
|
||
<td><?php echo $item['location_start'] ?></td>
|
||
<td><?php echo $item['location_end'] ?></td>
|
||
<td><?php echo $item['cost_raw'] ?></td>
|
||
<td><?php echo $item['trackedemail_item_id'] ?></td>
|
||
<td><?php echo $item['cost'] ?></td>
|
||
<td><?php echo isSet($item['transport_provider_name']) ? $item['transport_provider_name'] : '' ?></td>
|
||
<td><?php echo $item['request_date'] ?></td>
|
||
<td><?php echo date('Y-m-d', strtotime($item['started'])) ?></td>
|
||
<td><?php echo date('Y-m-d', strtotime($item['complete'])) ?></td>
|
||
<td><?php echo $item['status'] ?></td>
|
||
<td class="actions">
|
||
<a href="/automation_jobs/edit/<?php echo $item['id']; ?>" class="btn btn-primary">View</a>
|
||
<button
|
||
type="button"
|
||
class="btn btn-danger btn-remove"
|
||
data-id="<?php echo $item['id'] ?>"
|
||
data-job="<?php echo $item['id'] ?>"
|
||
data-toggle="modal"
|
||
data-target="#remove-job-warning-modal"
|
||
>Remove</button>
|
||
</td>
|
||
</tr>
|
||
<?php endforeach ?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<?php echo $pagination ?>
|
||
</div> <!-- end card body-->
|
||
</div> <!-- end card -->
|
||
</div><!-- end col-->
|
||
</div>
|
||
<!-- end row-->
|
||
</div> <!-- container -->
|
||
|
||
<div id="remove-job-warning-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="warning-header-modalLabel" aria-hidden="true">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header modal-colored-header bg-warning">
|
||
<h4 class="modal-title" id="warning-header-modalLabel"></h4>
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<h5 class="mt-0">Remove warning</h5>
|
||
<p>This can not be undone. Do you want to conitnue?</p>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-light" data-dismiss="modal">Close</button>
|
||
<button type="button" class="btn btn-warning" id="removeBtn" data-id="">Continue</button>
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div><!-- /.modal-dialog -->
|
||
</div><!-- /.modal -->
|
||
|
||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||
<script src="/assets/js/app.js" type="text/javascript"></script>
|
||
<script src="/assets/js/plugins/forms/selects/select2.min.js"></script>
|
||
<script src="/assets/js/pages/automation_jobs/list.js" type="text/javascript"></script>
|
||
|
||
<style>
|
||
#searchForm {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
span.select2-container {
|
||
width: 37%;
|
||
}
|
||
#btnSearch {
|
||
width: 100px;
|
||
margin-top: 1rem;
|
||
margin-left: 12rem;
|
||
}
|
||
</style>
|