Initial commit
This commit is contained in:
77
web/layouts/vehicles_management/_partials/bookings-list.html
Normal file
77
web/layouts/vehicles_management/_partials/bookings-list.html
Normal file
@@ -0,0 +1,77 @@
|
||||
{{define "bookings_list"}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<div class="mt-8 flex flex-col">
|
||||
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col"
|
||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 text-center">
|
||||
Statut
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Type
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Numéro (Immat / Bicycode)
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Beneficiaire
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Dates
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">Actions</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.bookings}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
{{if eq .Status 1 }}
|
||||
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
|
||||
A venir
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq .Status 0 }}
|
||||
<span class="p-1 bg-co-green text-white text-xs font-bold rounded-xl" >
|
||||
En cours
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq .Status -1 }}
|
||||
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
||||
Terminé
|
||||
</span>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >{{ (index $.ViewState.vehicles_map .Vehicleid).Type }}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >{{ (index $.ViewState.vehicles_map .Vehicleid).Data.licence_plate }}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" ><img class="h-6 w-6 rounded-co"
|
||||
src="/app/beneficiaries/{{.Driver}}/picture" alt=""></div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<a href="/app/vehicles-management/bookings/{{.ID}}"
|
||||
class="text-co-blue hover:text-co-blue">Voir</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
259
web/layouts/vehicles_management/_partials/calendar.html
Normal file
259
web/layouts/vehicles_management/_partials/calendar.html
Normal file
@@ -0,0 +1,259 @@
|
||||
{{define "calendar"}}
|
||||
<div class="flex items-center">
|
||||
<h2 class="flex-auto font-semibold text-gray-900">Août 2022</h2>
|
||||
<button type="button"
|
||||
class="-my-1.5 flex flex-none items-center justify-center p-1.5 text-gray-400 hover:text-gray-500">
|
||||
<span class="sr-only">Mois précédent</span>
|
||||
<!-- Heroicon name: solid/chevron-left -->
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="-my-1.5 -mr-1.5 ml-2 flex flex-none items-center justify-center p-1.5 text-gray-400 hover:text-gray-500">
|
||||
<span class="sr-only">Mois suivant</span>
|
||||
<!-- Heroicon name: solid/chevron-right -->
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-10 grid grid-cols-7 text-center text-xs leading-6 text-gray-500">
|
||||
<div>L</div>
|
||||
<div>M</div>
|
||||
<div>M</div>
|
||||
<div>J</div>
|
||||
<div>V</div>
|
||||
<div>S</div>
|
||||
<div>D</div>
|
||||
</div>
|
||||
<div class="mt-2 grid grid-cols-7 text-sm">
|
||||
<div class="py-2">
|
||||
<!--
|
||||
Always include: "mx-auto flex h-8 w-8 items-center justify-center rounded-full"
|
||||
Is selected, include: "text-white"
|
||||
Is not selected and is today, include: "text-indigo-600"
|
||||
Is not selected and is not today and is current month, include: "text-gray-900"
|
||||
Is not selected and is not today and is not current month, include: "text-gray-400"
|
||||
Is selected and is today, include: "bg-indigo-600"
|
||||
Is selected and is not today, include: "bg-gray-900"
|
||||
Is not selected, include: "hover:bg-gray-200"
|
||||
Is selected or is today, include: "font-semibold"
|
||||
-->
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-01">1</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-02">2</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-03">3</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-04">4</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-05">5</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-06">6</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-07">7</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-08">8</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-09">9</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-10">10</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-11">11</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full bg-gray-900 font-semibold text-white">
|
||||
<time datetime="2022-08-12">12</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-13">13</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-14">14</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-15">15</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-16">16</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-17">17</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-18">18</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-19">19</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-20">20</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-21">21</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-22">22</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-23">23</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-24">24</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-25">25</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-26">26</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-27">27</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-28">28</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-29">29</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-30">30</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-31">31</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-01">1</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-02">2</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-03">3</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-04">4</time>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,105 @@
|
||||
{{define "vehicle_type_select"}}
|
||||
<div x-data="{
|
||||
selectOpen: false,
|
||||
vehicle_type: 'car',
|
||||
vehicle_label: 'Voiture',
|
||||
selectType(type, label) {
|
||||
this.vehicle_type = type,
|
||||
this.vehicle_label = label
|
||||
this.selectOpen = false
|
||||
}
|
||||
}">
|
||||
<input type="hidden" name="vehicle_type" x-model="vehicle_type">
|
||||
<label id="listbox-label" class="block text-sm font-medium text-gray-700"> Type de véhicule </label>
|
||||
<div class="mt-1 relative">
|
||||
<button @click="selectOpen = ! selectOpen" type="button"
|
||||
class="relative w-full bg-white border border-gray-300 rounded-2xl shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-co-blue focus:border-co-blue sm:text-sm"
|
||||
aria-haspopup="listbox" aria-expanded="true" aria-labelledby="listbox-label">
|
||||
<span class="block truncate" x-text="vehicle_label"></span>
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none">
|
||||
{{$.IconSet.Icon "hero:solid/selector" "h-5 w-5 text-gray-400"}}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<ul class="absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-xl py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"
|
||||
tabindex="-1" role="listbox" aria-labelledby="listbox-label" aria-activedescendant="listbox-option-3"
|
||||
x-show="selectOpen" x-transition:leave="transition ease-in duration-100"
|
||||
x-transition:leave-start="transform opacity-100" x-transition:leave-end="transform opacity-0">
|
||||
|
||||
<li class="text-gray-900 cursor-default select-none relative py-2 pl-8 pr-4 hover:bg-co-blue hover:text-white" id="listbox-option-0"
|
||||
role="option" @click="selectType('car', 'Voiture')">
|
||||
<!-- Selected: "font-semibold", Not Selected: "font-normal" -->
|
||||
<span class="font-normal block truncate "> Voiture </span>
|
||||
<span x-show="vehicle_type == 'car'"
|
||||
class="text-co-blue absolute inset-y-0 left-0 flex items-center pl-1.5">
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</li>
|
||||
<li class="text-gray-900 cursor-default select-none relative py-2 pl-8 pr-4 hover:bg-co-blue hover:text-white" id="listbox-option-0"
|
||||
role="option" @click="selectType('no_licence_car', 'Voiture sans permis')">
|
||||
<!-- Selected: "font-semibold", Not Selected: "font-normal" -->
|
||||
<span class="font-normal block truncate "> Voiture sans permis </span>
|
||||
<span x-show="vehicle_type == 'no_licence_car'"
|
||||
class="text-co-blue absolute inset-y-0 left-0 flex items-center pl-1.5">
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</li>
|
||||
<li class="text-gray-900 cursor-default select-none relative py-2 pl-8 pr-4 hover:bg-co-blue hover:text-white" id="listbox-option-0"
|
||||
role="option" @click="selectType('scooter', 'Scooter')">
|
||||
<!-- Selected: "font-semibold", Not Selected: "font-normal" -->
|
||||
<span class="font-normal block truncate "> Scooter </span>
|
||||
<span x-show="vehicle_type == 'scooter'"
|
||||
class="text-co-blue absolute inset-y-0 left-0 flex items-center pl-1.5">
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</li>
|
||||
<li class="text-gray-900 cursor-default select-none relative py-2 pl-8 pr-4 hover:bg-co-blue hover:text-white" id="listbox-option-0"
|
||||
role="option" @click="selectType('trott', 'Trotinette')">
|
||||
<!-- Selected: "font-semibold", Not Selected: "font-normal" -->
|
||||
<span class="font-normal block truncate "> Trotinette </span>
|
||||
<span x-show="vehicle_type == 'trott'"
|
||||
class="text-co-blue absolute inset-y-0 left-0 flex items-center pl-1.5">
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</li>
|
||||
<li class="text-gray-900 cursor-default select-none relative py-2 pl-8 pr-4 hover:bg-co-blue hover:text-white" id="listbox-option-0"
|
||||
role="option" @click="selectType('electric_bike', 'Vélo électrique')">
|
||||
<!-- Selected: "font-semibold", Not Selected: "font-normal" -->
|
||||
<span class="font-normal block truncate "> Vélo électrique </span>
|
||||
<span x-show="vehicle_type == 'electric_bike'"
|
||||
class="text-co-blue hover:text-inherit absolute inset-y-0 left-0 flex items-center pl-1.5">
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<!-- More items... -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
56
web/layouts/vehicles_management/_partials/vehicles-list.html
Normal file
56
web/layouts/vehicles_management/_partials/vehicles-list.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{{define "vehicles_list"}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<div class="mt-8 flex flex-col">
|
||||
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col"
|
||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Numéro (Immat / Bicycode)
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Type
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Modèle
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Lieu
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">Actions</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.vehicles}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >{{.Data.licence_plate}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >{{if eq .Type "electric_bike"}}Vélo électrique{{else}}Voiture{{end}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >{{.Data.name}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<a href="/app/vehicles-management/fleet/{{.ID}}"
|
||||
class="text-co-blue hover:text-co-blue">Voir</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user