225 lines
12 KiB
Twig
225 lines
12 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block body %}
|
|
<!-- BEGIN: Subheader -->
|
|
<div class="m-subheader">
|
|
<div class="d-flex align-items-center">
|
|
<div class="mr-auto">
|
|
<h3 class="m-subheader__title">
|
|
{% if mode == 'form' %}
|
|
Search
|
|
{% else %}
|
|
Search results for "<span class="text-primary">{{ search_term }}</span>"
|
|
{% endif %}
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- END: Subheader -->
|
|
<div class="m-content">
|
|
<!--Begin::Section-->
|
|
<div class="row">
|
|
<div class="col-xl-6">
|
|
<div class="m-portlet m-portlet--mobile">
|
|
<div class="m-portlet__head">
|
|
<div class="m-portlet__head-caption">
|
|
<div class="m-portlet__head-title">
|
|
<span class="m-portlet__head-icon">
|
|
<i class="fa fa-search"></i>
|
|
</span>
|
|
<h3 class="m-portlet__head-text">
|
|
Enter a search term
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<form id="search-form" autocomplete="off" class="m-form m-form--fit m-form--label-align-right m-form--group-seperator-dashed" method="get" action="{{ url('search_history') }}">
|
|
<div class="m-portlet__body">
|
|
<div class="form-group m-form__group row">
|
|
<input name="search" type="search" class="form-control" placeholder="Search for..." value="{{ search_term|default("") }}" required>
|
|
</div>
|
|
</div>
|
|
<div class="m-portlet__foot m-portlet__foot--fit">
|
|
<div class="m-form__actions m-form__actions--solid m-form__actions--right">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<button type="submit" class="btn btn-success">Search</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if mode == 'results' %}
|
|
<!-- legacy job orders -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="m-portlet m-portlet--mobile">
|
|
<div class="m-portlet__head">
|
|
<div class="m-portlet__head-caption">
|
|
<div class="m-portlet__head-title">
|
|
<h3 class="m-portlet__head-text">
|
|
Legacy Job Orders
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="m-portlet__body">
|
|
{% if data.legacy_job_orders is empty %}
|
|
<div class="m-alert m-alert--icon m-alert--icon-solid m-alert--outline alert alert-brand" role="alert">
|
|
<div class="m-alert__icon">
|
|
<i class="flaticon-exclamation-2"></i>
|
|
<span></span>
|
|
</div>
|
|
<div class="m-alert__text">
|
|
No records for legacy job orders.
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<table class="table table-striped m-table">
|
|
<thead>
|
|
<tr class="m-table__row--brand">
|
|
<th>ID</th>
|
|
<th>Last Name</th>
|
|
<th>First Name</th>
|
|
<th>Plate Number</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key, result in data.legacy_job_orders %}
|
|
<tr>
|
|
<td>{{ result.getID|default("") }}</td>
|
|
<td>{{ result.getCustLastName|default('') }}</td>
|
|
<td>{{ result.getCustFirstName|default('') }}</td>
|
|
<td>{{ result.getPlateNumber|default('') }}</td>
|
|
<td> Details </td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end legacy job orders -->
|
|
|
|
<!-- job orders -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="m-portlet m-portlet--mobile">
|
|
<div class="m-portlet__head">
|
|
<div class="m-portlet__head-caption">
|
|
<div class="m-portlet__head-title">
|
|
<h3 class="m-portlet__head-text">
|
|
Job Orders
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="m-portlet__body">
|
|
{% if data.job_orders is empty %}
|
|
<div class="m-alert m-alert--icon m-alert--icon-solid m-alert--outline alert alert-brand" role="alert">
|
|
<div class="m-alert__icon">
|
|
<i class="flaticon-exclamation-2"></i>
|
|
<span></span>
|
|
</div>
|
|
<div class="m-alert__text">
|
|
No records for job orders.
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<table class="table table-striped m-table">
|
|
<thead>
|
|
<tr class="m-table__row--brand">
|
|
<th>ID</th>
|
|
<th>Last Name</th>
|
|
<th>First Name</th>
|
|
<th>Plate Number</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key, result in data.job_orders %}
|
|
<tr>
|
|
<td>{{ result.getID|default("") }}</td>
|
|
<td>{{ result.getCustomer.getLastName|default("") }}</td>
|
|
<td>{{ result.getCustomer.getFirstName|default("") }}</td>
|
|
<td>{{ result.getCustomerVehicle.getPlateNumber|default("") }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end job orders -->
|
|
|
|
|
|
<!-- warranties -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="m-portlet m-portlet--mobile">
|
|
<div class="m-portlet__head">
|
|
<div class="m-portlet__head-caption">
|
|
<div class="m-portlet__head-title">
|
|
<h3 class="m-portlet__head-text">
|
|
Warranties
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="m-portlet__body">
|
|
{% if data.warranties is empty %}
|
|
<div class="m-alert m-alert--icon m-alert--icon-solid m-alert--outline alert alert-brand" role="alert">
|
|
<div class="m-alert__icon">
|
|
<i class="flaticon-exclamation-2"></i>
|
|
<span></span>
|
|
</div>
|
|
<div class="m-alert__text">
|
|
No records for warranties.
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<table class="table table-striped m-table">
|
|
<thead>
|
|
<tr class="m-table__row--brand">
|
|
<th>ID</th>
|
|
<th>Last Name</th>
|
|
<th>First Name</th>
|
|
<th>Plate Number</th>
|
|
<th>Warranty Class</th>
|
|
<th>Expiry Date</th>
|
|
<th>Serial</th>
|
|
<th>Battery</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key, result in data.warranties %}
|
|
<tr>
|
|
<td>{{ result.getID|default("") }}</td>
|
|
<td>{{ result.getLastName|default("") }}</td>
|
|
<td>{{ result.getFirstName|default("") }}</td>
|
|
<td>{{ result.getPlateNumber|default("") }}</td>
|
|
<td>{{ result.getWarrantyClass|default("") }}</td>
|
|
<td>{{ result.getDateExpire|default("")|date('d M Y') }}</td>
|
|
<td>{{ result.getSerial|default("") }}</td>
|
|
<td>{{ result.getSAPBattery.getID|default("") }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end warranties -->
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|