Compare commits
25 Commits
e2e4286858
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29bc3a8bfa | ||
|
|
764b301dbb | ||
|
|
2fa405edb0 | ||
|
|
11ddd89133 | ||
|
|
3f209fe461 | ||
|
|
702cbf67f1 | ||
|
|
bf15e114f3 | ||
|
|
ee0bcd01b7 | ||
|
|
62a3095f91 | ||
|
|
c442ef9d92 | ||
|
|
c7d263fded | ||
|
|
5d546c0efc | ||
|
|
88de6206c5 | ||
|
|
1739bdcb2e | ||
|
|
96bab36fde | ||
|
|
e4b8b486ed | ||
|
|
2e5351847d | ||
|
|
3cc4d9452a | ||
|
|
b9d343dd08 | ||
|
|
49aff4318b | ||
|
|
80c40759bb | ||
|
|
878200058b | ||
|
|
45ea7ccaa4 | ||
|
|
ed726b610f | ||
|
|
73d99e7ad7 |
52
config.yaml
52
config.yaml
@@ -78,6 +78,7 @@ views:
|
|||||||
- web/layouts/dashboard/_partials/agenda-widget.html
|
- web/layouts/dashboard/_partials/agenda-widget.html
|
||||||
- web/layouts/dashboard/_partials/beneficiaries-widget.html
|
- web/layouts/dashboard/_partials/beneficiaries-widget.html
|
||||||
- web/layouts/dashboard/_partials/bookings-widget.html
|
- web/layouts/dashboard/_partials/bookings-widget.html
|
||||||
|
- web/layouts/dashboard/_partials/drivers-map-widget.html
|
||||||
- web/layouts/dashboard/dashboard.html
|
- web/layouts/dashboard/dashboard.html
|
||||||
beneficiaries:
|
beneficiaries:
|
||||||
list:
|
list:
|
||||||
@@ -99,6 +100,7 @@ views:
|
|||||||
- web/layouts/beneficiaries/_partials/beneficiary-organizations.html
|
- web/layouts/beneficiaries/_partials/beneficiary-organizations.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-wallet.html
|
- web/layouts/beneficiaries/_partials/beneficiary-wallet.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-solidarity-transport.html
|
- web/layouts/beneficiaries/_partials/beneficiary-solidarity-transport.html
|
||||||
|
- web/layouts/beneficiaries/_partials/beneficiary-organized-carpool.html
|
||||||
- web/layouts/beneficiaries/display.html
|
- web/layouts/beneficiaries/display.html
|
||||||
update:
|
update:
|
||||||
files:
|
files:
|
||||||
@@ -131,14 +133,10 @@ views:
|
|||||||
booking_display:
|
booking_display:
|
||||||
files:
|
files:
|
||||||
- web/layouts/vehicles/booking-display.html
|
- web/layouts/vehicles/booking-display.html
|
||||||
- web/layouts/vehicles_management/_partials/booking-diags.html
|
|
||||||
bookings_list:
|
bookings_list:
|
||||||
files:
|
files:
|
||||||
- web/layouts/vehicles_management/_partials/bookings-list.html
|
- web/layouts/vehicles_management/_partials/bookings-list.html
|
||||||
- web/layouts/vehicles/bookings-list.html
|
- web/layouts/vehicles/bookings-list.html
|
||||||
create_booking_diag:
|
|
||||||
files:
|
|
||||||
- web/layouts/vehicles/create-booking-diag.html
|
|
||||||
vehicles_management:
|
vehicles_management:
|
||||||
overview:
|
overview:
|
||||||
files:
|
files:
|
||||||
@@ -147,6 +145,7 @@ views:
|
|||||||
- web/layouts/vehicles_management/overview.html
|
- web/layouts/vehicles_management/overview.html
|
||||||
bookings_list:
|
bookings_list:
|
||||||
files:
|
files:
|
||||||
|
- web/layouts/vehicles_management/_partials/booking_filters.html
|
||||||
- web/layouts/vehicles_management/_partials/bookings-list.html
|
- web/layouts/vehicles_management/_partials/bookings-list.html
|
||||||
- web/layouts/vehicles_management/bookings-list.html
|
- web/layouts/vehicles_management/bookings-list.html
|
||||||
fleet_add:
|
fleet_add:
|
||||||
@@ -158,7 +157,6 @@ views:
|
|||||||
files:
|
files:
|
||||||
- web/layouts/vehicles_management/_partials/calendar.html
|
- web/layouts/vehicles_management/_partials/calendar.html
|
||||||
- web/layouts/vehicles_management/fleet-display.html
|
- web/layouts/vehicles_management/fleet-display.html
|
||||||
- web/layouts/vehicles_management/_partials/vehicle-diags.html
|
|
||||||
fleet_update:
|
fleet_update:
|
||||||
files:
|
files:
|
||||||
- web/layouts/_partials/address_autocomplete.html
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
@@ -168,16 +166,9 @@ views:
|
|||||||
booking_display:
|
booking_display:
|
||||||
files:
|
files:
|
||||||
- web/layouts/vehicles_management/booking-display.html
|
- web/layouts/vehicles_management/booking-display.html
|
||||||
- web/layouts/vehicles_management/_partials/booking-diags.html
|
|
||||||
delete_booking:
|
delete_booking:
|
||||||
files:
|
files:
|
||||||
- web/layouts/vehicles_management/delete-booking.html
|
- web/layouts/vehicles_management/delete-booking.html
|
||||||
create_vehicle_diag:
|
|
||||||
files:
|
|
||||||
- web/layouts/vehicles_management/create-vehicle-diag.html
|
|
||||||
create_booking_diag:
|
|
||||||
files:
|
|
||||||
- web/layouts/vehicles_management/create-booking-diag.html
|
|
||||||
agenda:
|
agenda:
|
||||||
list:
|
list:
|
||||||
files:
|
files:
|
||||||
@@ -227,6 +218,10 @@ views:
|
|||||||
- web/layouts/journeys/_partials/journeys-organized-carpools.html
|
- web/layouts/journeys/_partials/journeys-organized-carpools.html
|
||||||
- web/layouts/journeys/_partials/saved-searches.html
|
- web/layouts/journeys/_partials/saved-searches.html
|
||||||
- web/layouts/journeys/search.html
|
- web/layouts/journeys/search.html
|
||||||
|
search_compact:
|
||||||
|
files:
|
||||||
|
- web/layouts/_partials/orb_address_autocomplete.html
|
||||||
|
- web/layouts/journeys/search-compact.html
|
||||||
list:
|
list:
|
||||||
files:
|
files:
|
||||||
- web/layouts/journeys/group_management.html
|
- web/layouts/journeys/group_management.html
|
||||||
@@ -258,23 +253,6 @@ views:
|
|||||||
display_group:
|
display_group:
|
||||||
files:
|
files:
|
||||||
- web/layouts/group_module/display_group.html
|
- web/layouts/group_module/display_group.html
|
||||||
diags:
|
|
||||||
list:
|
|
||||||
files:
|
|
||||||
- web/layouts/diags/home.html
|
|
||||||
display_diag:
|
|
||||||
files:
|
|
||||||
- web/layouts/diags/display-diag.html
|
|
||||||
- web/layouts/diags/_partials/diags-files.html
|
|
||||||
delete:
|
|
||||||
files:
|
|
||||||
- web/layouts/diags/delete-diag.html
|
|
||||||
update:
|
|
||||||
files:
|
|
||||||
- web/layouts/diags/update-diag.html
|
|
||||||
history:
|
|
||||||
files:
|
|
||||||
- web/layouts/diags/history-diags.html
|
|
||||||
|
|
||||||
solidarity_transport:
|
solidarity_transport:
|
||||||
overview:
|
overview:
|
||||||
@@ -310,6 +288,7 @@ views:
|
|||||||
- web/layouts/solidarity_transport/driver_journey.html
|
- web/layouts/solidarity_transport/driver_journey.html
|
||||||
booking_display:
|
booking_display:
|
||||||
files:
|
files:
|
||||||
|
- sms/solidarity_transport/request_driver.tmpl
|
||||||
- web/layouts/solidarity_transport/_partials/journey_map.html
|
- web/layouts/solidarity_transport/_partials/journey_map.html
|
||||||
- web/layouts/solidarity_transport/_partials/journey_preview.html
|
- web/layouts/solidarity_transport/_partials/journey_preview.html
|
||||||
- web/layouts/solidarity_transport/booking_display.html
|
- web/layouts/solidarity_transport/booking_display.html
|
||||||
@@ -345,6 +324,8 @@ views:
|
|||||||
- web/layouts/_partials/address_autocomplete.html
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
- web/layouts/organized_carpool/_partials/driver_availabilities.html
|
- web/layouts/organized_carpool/_partials/driver_availabilities.html
|
||||||
- web/layouts/organized_carpool/_partials/driver_documents.html
|
- web/layouts/organized_carpool/_partials/driver_documents.html
|
||||||
|
- web/layouts/organized_carpool/_partials/driver_wallet.html
|
||||||
|
- web/layouts/organized_carpool/_partials/driver_history.html
|
||||||
- web/layouts/organized_carpool/driver_display.html
|
- web/layouts/organized_carpool/driver_display.html
|
||||||
journey:
|
journey:
|
||||||
files:
|
files:
|
||||||
@@ -380,6 +361,7 @@ views:
|
|||||||
- web/layouts/administration/vehicles_stats.html
|
- web/layouts/administration/vehicles_stats.html
|
||||||
bookings_list:
|
bookings_list:
|
||||||
files:
|
files:
|
||||||
|
- web/layouts/vehicles_management/_partials/booking_filters.html
|
||||||
- web/layouts/administration/_partials/bookings_list.html
|
- web/layouts/administration/_partials/bookings_list.html
|
||||||
- web/layouts/administration/bookings_stats.html
|
- web/layouts/administration/bookings_stats.html
|
||||||
settings:
|
settings:
|
||||||
@@ -414,6 +396,7 @@ icons:
|
|||||||
svg:
|
svg:
|
||||||
coopgo:parcoursmob/monogram: <svg xmlns="http://www.w3.org/2000/svg" class="%s" viewBox="0 0 61.85 33.58"><defs><style>.cls-1{fill:#ff1300;}.cls-2{fill:#243887;}</style></defs><g id="Calque_2" data-name="Calque 2"><g id="Calque_1-2" data-name="Calque 1"><path class="cls-1" d="M44.978,0C31.337,0,28.1,6.824,27.875,15.505H39.536V9.434a.727.727,0,0,1,1.123-.607L52.6,16.453,40.659,24.08a.729.729,0,0,1-1.123-.608v-6.1H27.865c.075,8.427,1.527,16.213,17.113,16.213,14.867,0,16.872-7.764,16.872-17.032C61.85,7.91,59.894,0,44.978,0Z"/><polygon class="cls-1" points="41.412 21.385 49.133 16.453 41.412 11.521 41.412 21.385"/><path class="cls-2" d="M14.175,11.4l-.019,4.151H26.311a14.781,14.781,0,0,0,.819-5.141C27.046,3.767,22.545,0,14.764,0H1.052A1.147,1.147,0,0,0,0,1.24V31.87a1.149,1.149,0,0,0,1.094,1.239H11.525a1.145,1.145,0,0,0,1.051-1.239V10.41h.758C13.88,10.41,14.175,10.756,14.175,11.4Z"/><path class="cls-2" d="M14.148,17.3l-.015,3.514H18.97A7.521,7.521,0,0,0,25.458,17.3Z"/></g></g></svg>
|
coopgo:parcoursmob/monogram: <svg xmlns="http://www.w3.org/2000/svg" class="%s" viewBox="0 0 61.85 33.58"><defs><style>.cls-1{fill:#ff1300;}.cls-2{fill:#243887;}</style></defs><g id="Calque_2" data-name="Calque 2"><g id="Calque_1-2" data-name="Calque 1"><path class="cls-1" d="M44.978,0C31.337,0,28.1,6.824,27.875,15.505H39.536V9.434a.727.727,0,0,1,1.123-.607L52.6,16.453,40.659,24.08a.729.729,0,0,1-1.123-.608v-6.1H27.865c.075,8.427,1.527,16.213,17.113,16.213,14.867,0,16.872-7.764,16.872-17.032C61.85,7.91,59.894,0,44.978,0Z"/><polygon class="cls-1" points="41.412 21.385 49.133 16.453 41.412 11.521 41.412 21.385"/><path class="cls-2" d="M14.175,11.4l-.019,4.151H26.311a14.781,14.781,0,0,0,.819-5.141C27.046,3.767,22.545,0,14.764,0H1.052A1.147,1.147,0,0,0,0,1.24V31.87a1.149,1.149,0,0,0,1.094,1.239H11.525a1.145,1.145,0,0,0,1.051-1.239V10.41h.758C13.88,10.41,14.175,10.756,14.175,11.4Z"/><path class="cls-2" d="M14.148,17.3l-.015,3.514H18.97A7.521,7.521,0,0,0,25.458,17.3Z"/></g></g></svg>
|
||||||
hero:outline/archive-box: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" /></svg>
|
hero:outline/archive-box: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" /></svg>
|
||||||
|
hero:outline/archive-box-x-mark: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" /></svg>
|
||||||
hero:outline/arrow-long-right: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3" /></svg>
|
hero:outline/arrow-long-right: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3" /></svg>
|
||||||
hero:outline/arrow-path-rounded-square: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 12c0-1.232-.046-2.453-.138-3.662a4.006 4.006 0 0 0-3.7-3.7 48.678 48.678 0 0 0-7.324 0 4.006 4.006 0 0 0-3.7 3.7c-.017.22-.032.441-.046.662M19.5 12l3-3m-3 3-3-3m-12 3c0 1.232.046 2.453.138 3.662a4.006 4.006 0 0 0 3.7 3.7 48.656 48.656 0 0 0 7.324 0 4.006 4.006 0 0 0 3.7-3.7c.017-.22.032-.441.046-.662M4.5 12l3 3m-3-3-3 3" /></svg>
|
hero:outline/arrow-path-rounded-square: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 12c0-1.232-.046-2.453-.138-3.662a4.006 4.006 0 0 0-3.7-3.7 48.678 48.678 0 0 0-7.324 0 4.006 4.006 0 0 0-3.7 3.7c-.017.22-.032.441-.046.662M19.5 12l3-3m-3 3-3-3m-12 3c0 1.232.046 2.453.138 3.662a4.006 4.006 0 0 0 3.7 3.7 48.656 48.656 0 0 0 7.324 0 4.006 4.006 0 0 0 3.7-3.7c.017-.22.032-.441.046-.662M4.5 12l3 3m-3-3-3 3" /></svg>
|
||||||
hero:outline/briefcase: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /></svg>
|
hero:outline/briefcase: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /></svg>
|
||||||
@@ -422,6 +405,7 @@ icons:
|
|||||||
hero:outline/calendar: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>
|
hero:outline/calendar: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>
|
||||||
hero:outline/chevron-right: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
hero:outline/chevron-right: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
||||||
hero:outline/cog: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
|
hero:outline/cog: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
|
||||||
|
hero:outline/document: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" /></svg>
|
||||||
hero:outline/document-arrow-down: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m.75 12l3 3m0 0l3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>
|
hero:outline/document-arrow-down: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m.75 12l3 3m0 0l3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>
|
||||||
hero:outline/document-text: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>
|
hero:outline/document-text: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>
|
||||||
hero:outline/folder-plus: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z" /></svg>
|
hero:outline/folder-plus: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z" /></svg>
|
||||||
@@ -434,8 +418,10 @@ icons:
|
|||||||
hero:outline/plus-circle: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
hero:outline/plus-circle: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||||
hero:outline/shield-check: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" /></svg>
|
hero:outline/shield-check: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" /></svg>
|
||||||
hero:outline/table-cells: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0112 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5" /></svg>
|
hero:outline/table-cells: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0112 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5" /></svg>
|
||||||
|
hero:outline/user: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" /></svg>
|
||||||
hero:outline/user-group: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" /></svg>
|
hero:outline/user-group: <svg xmlns="http://www.w3.org/2000/svg" class="%s" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" /></svg>
|
||||||
hero:outline/x: <svg class="%s text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>
|
hero:outline/x: <svg class="%s text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>
|
||||||
|
hero:solid/check-circle: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="%s"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z" clip-rule="evenodd" /></svg>
|
||||||
hero:solid/chevron-right: <svg class="%s text-gray-400" 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>
|
hero:solid/chevron-right: <svg class="%s text-gray-400" 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>
|
||||||
hero:solid/question-mark-icon: <svg class="%s" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>
|
hero:solid/question-mark-icon: <svg class="%s" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>
|
||||||
hero:solid/search: <svg class="%s" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd" /></svg>
|
hero:solid/search: <svg class="%s" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" clip-rule="evenodd" /></svg>
|
||||||
@@ -489,6 +475,12 @@ emails:
|
|||||||
files:
|
files:
|
||||||
- emails/layout.html
|
- emails/layout.html
|
||||||
- emails/onboarding/support_emailing.html
|
- emails/onboarding/support_emailing.html
|
||||||
|
contact:
|
||||||
|
request:
|
||||||
|
subject: PARCOURSMOB - Nouveau message de contact
|
||||||
|
files:
|
||||||
|
- emails/layout.html
|
||||||
|
- emails/contact/request.html
|
||||||
delete_subscriber:
|
delete_subscriber:
|
||||||
request:
|
request:
|
||||||
subject: PARCOURSMOB - Un bénéficiaire a été retiré d'un dispositif
|
subject: PARCOURSMOB - Un bénéficiaire a été retiré d'un dispositif
|
||||||
@@ -502,7 +494,7 @@ emails:
|
|||||||
- emails/layout.html
|
- emails/layout.html
|
||||||
- emails/solidarity_transport/booking_driver_accept.html
|
- emails/solidarity_transport/booking_driver_accept.html
|
||||||
booking_driver_decline:
|
booking_driver_decline:
|
||||||
subject: Trajet accepté par un conducteur
|
subject: Trajet refusé par un conducteur
|
||||||
files:
|
files:
|
||||||
- emails/layout.html
|
- emails/layout.html
|
||||||
- emails/solidarity_transport/booking_driver_decline.html
|
- emails/solidarity_transport/booking_driver_decline.html
|
||||||
|
|||||||
17
emails/contact/request.html
Normal file
17
emails/contact/request.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{{define "content"}}
|
||||||
|
<h2>Nouveau message de contact</h2>
|
||||||
|
|
||||||
|
<table style="width: 100%; border-collapse: collapse; margin-top: 20px;">
|
||||||
|
{{range $key, $value := .fields}}
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px; border-bottom: 1px solid #eee; font-weight: bold; vertical-align: top; width: 30%;">{{$key}}</td>
|
||||||
|
<td style="padding: 10px; border-bottom: 1px solid #eee;">{{$value}}</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr style="margin-top: 30px; border: none; border-top: 1px solid #ccc;" />
|
||||||
|
<p style="font-size: 12px; color: #666;">
|
||||||
|
Ce message a été envoyé via le formulaire de contact du site public.
|
||||||
|
</p>
|
||||||
|
{{end}}
|
||||||
@@ -20,8 +20,9 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w-96 {
|
.logo {
|
||||||
width: 24rem/* 384px */;
|
max-width: 300px;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-10 {
|
.p-10 {
|
||||||
@@ -52,7 +53,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="bg-co-blue text-center text-white p-10">
|
<div class="bg-co-blue text-center text-white p-10">
|
||||||
<img class="w-96" src="https://coopgo.fr/images/coopgo-logo-bluegreen.svg" alt="PARCOURSMOB" />
|
<img class="logo" src="{{.baseUrl}}/public/images/mobicoop-solidaire.png" alt="Mobicoop solidaire" />
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-3xl m-auto">
|
<div class="max-w-3xl m-auto">
|
||||||
{{template "content" .}}
|
{{template "content" .}}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
this.responselength = 0
|
this.responselength = 0
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input)
|
result = await fetch("https://data.geopf.fr/geocodage/search/?q=" + encodeURIComponent(this.input))
|
||||||
json = await result.json()
|
json = await result.json()
|
||||||
console.log(json)
|
console.log(json)
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
this.responselength = 0
|
this.responselength = 0
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
result = await fetch("https://api-adresse.data.gouv.fr/search/?q=" + this.input)
|
result = await fetch("https://data.geopf.fr/geocodage/search/?q=" + encodeURIComponent(this.input))
|
||||||
json = await result.json()
|
json = await result.json()
|
||||||
console.log(json)
|
console.log(json)
|
||||||
|
|
||||||
|
|||||||
@@ -7,31 +7,27 @@
|
|||||||
<div class="sm:flex-auto">
|
<div class="sm:flex-auto">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none flex gap-2">
|
||||||
<a href="/exports/fleets/bookings">
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
|
||||||
Export
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
<a href="/app/administration/stats/vehicles">
|
<a href="/app/administration/stats/vehicles">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-co-blue hover:bg-blue-700 border-co-blue border px-4 py-2 text-white text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{$.IconSet.Icon "hero:outline/document-arrow-left" "h-5 w-5 mr-3"}}
|
{{$.IconSet.Icon "hero:outline/document-arrow-left" "h-5 w-5 mr-3"}}
|
||||||
Liste des véhicules
|
Liste des véhicules
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
<!-- <a href="/api/cache/{{.ViewState.cacheid}}/export">
|
<a href="/exports/fleets/bookings/all_bookings.xlsx?status={{.ViewState.filters.status}}&date_start={{.ViewState.filters.date_start}}&date_end={{.ViewState.filters.date_end}}">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
||||||
Exporter
|
Export
|
||||||
</button>
|
</button>
|
||||||
</a> -->
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{template "vehicle_booking_filters" .}}
|
||||||
|
|
||||||
{{template "bookings_list" .}}
|
{{template "bookings_list" .}}
|
||||||
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
this.responselength = 0
|
this.responselength = 0
|
||||||
this.address = this.def
|
this.address = this.def
|
||||||
this.input = `{{ .Default.properties.label}}`
|
this.input = `{{ .Default.properties.label}}`
|
||||||
result = await fetch('https://api-adresse.data.gouv.fr/search/?q=' + this.input)
|
result = await fetch('https://data.geopf.fr/geocodage/search/?q=' + this.input)
|
||||||
json = await result.json()
|
json = await result.json()
|
||||||
|
|
||||||
bb = json['features'][0]
|
bb = json['features'][0]
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
return [bb]
|
return [bb]
|
||||||
}
|
}
|
||||||
|
|
||||||
result = await fetch('https://api-adresse.data.gouv.fr/search/?q=' + this.input)
|
result = await fetch('https://data.geopf.fr/geocodage/search/?q=' + this.input)
|
||||||
json = await result.json()
|
json = await result.json()
|
||||||
|
|
||||||
this.responselength = json['features'].length
|
this.responselength = json['features'].length
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
{{define "beneficiary_diags"}}
|
|
||||||
{{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }}
|
|
||||||
{{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
|
|
||||||
<div class="bg-white shadow sm:rounded-lg">
|
|
||||||
<div class="px-4 py-5 sm:px-6">
|
|
||||||
<div class="flex items-center space-x-5">
|
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Diagnostics réalisés</h2>
|
|
||||||
<a href="{{.ViewState.beneficiary.ID}}/create-diag">
|
|
||||||
<button type="button"
|
|
||||||
class="flex justify-around rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
|
||||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
|
||||||
Créer un diagnostic
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="border-t border-gray-200">
|
|
||||||
{{ $diagCount := len .ViewState.diags }}
|
|
||||||
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
|
||||||
{{if eq $diagCount 0}}
|
|
||||||
<li class="py-2 px-4">
|
|
||||||
<p class="py-5 mt-1 max-w-2xl text-sm text-gray-500">Aucun diagnostique effectué pour le moment.</p>
|
|
||||||
</li>
|
|
||||||
{{else}}
|
|
||||||
{{range .ViewState.diags}}
|
|
||||||
{{ $diags := .ID }}
|
|
||||||
{{if eq .Deleted false}}
|
|
||||||
<li class="py-5 px-4 flex">
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<a href="/app/diags/{{$diags}}"class="mt-1 text-sm text-gray-900">{{.Name}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{(timeFrom .Diagdate).Format "02/01/2006"}}</p>
|
|
||||||
</div>
|
|
||||||
<a href="/app/diags/{{$diags}}" target="_blank">
|
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Voir<span class="sr-only"> le diagnostic</span></button>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Deleted true}}
|
|
||||||
<li class="py-5 px-4 flex">
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{.Name}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{(timeFrom .Diagdate).Format "02/01/2006"}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">Ce diagnostic a été retiré</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -65,9 +65,20 @@ x-data="{
|
|||||||
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
||||||
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
||||||
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
||||||
|
<div class="flex gap-2 justify-end">
|
||||||
<a href="/app/beneficiaries/{{$.ViewState.beneficiary.ID}}/documents/{{.FileName}}" target="_blank">
|
<a href="/app/beneficiaries/{{$.ViewState.beneficiary.ID}}/documents/{{.FileName}}" target="_blank">
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Télécharger<span class="sr-only"> le document</span></button>
|
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-4 w-4 mr-1"}}
|
||||||
|
Télécharger<span class="sr-only"> le document</span>
|
||||||
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
<button type="button"
|
||||||
|
onclick="if(confirm('Êtes-vous sûr de vouloir supprimer ce document ?')) { window.location.href='/app/beneficiaries/{{$.ViewState.beneficiary.ID}}/documents/{{.FileName}}/delete'; }"
|
||||||
|
class="inline-flex items-center rounded-md border border-transparent bg-co-red px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-co-red focus:ring-offset-2">
|
||||||
|
{{$.IconSet.Icon "hero:outline/trash" "h-4 w-4 mr-1"}}
|
||||||
|
Supprimer<span class="sr-only"> le document</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{{define "beneficiary_journeys"}}
|
{{define "beneficiary_journeys"}}
|
||||||
<div class="px-4 py-6 sm:px-6">
|
<div class="px-4 py-6 sm:px-6">
|
||||||
<form action="/app/journeys/" method="GET">
|
<form action="{{if eq $.ViewState.search_view "compact"}}/app/journeys/search{{else}}/app/journeys/{{end}}" method="GET">
|
||||||
|
|
||||||
{{ $departureField := "departure" }}
|
{{ $departureField := "departure" }}
|
||||||
{{ $departureLabel := "Départ" }}
|
{{ $departureLabel := "Départ" }}
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
{{define "beneficiary_organized_carpool"}}
|
||||||
|
<div class="py-6">
|
||||||
|
{{if .ViewState.organized_carpool_stats}}
|
||||||
|
<div class="py-5 text-center">
|
||||||
|
<p class="text-lg">Trajets réalisés : {{ .ViewState.organized_carpool_stats.count }}</p>
|
||||||
|
<p class="text-lg">Kilomètres réalisés : {{ .ViewState.organized_carpool_stats.km}} km</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<div class="text-center py-5">
|
||||||
|
<a href="/app/journeys/?passengerid={{.ViewState.beneficiary.ID}}" class="inline-flex">
|
||||||
|
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Chercher un trajet</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{if .ViewState.organized_carpool_bookings}}
|
||||||
|
<div class="py-5">
|
||||||
|
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des covoiturages solidaires</h4>
|
||||||
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
|
<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">Date</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Conducteur</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Départ</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Arrivée</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Statut</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{range .ViewState.organized_carpool_bookings}}
|
||||||
|
{{if or (eq .Status.String "CONFIRMED") (eq .Status.String "WAITING_DRIVER_CONFIRMATION")}}
|
||||||
|
<tr>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04"}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Driver}}
|
||||||
|
<a class="text-co-blue" href="/app/organized-carpool/drivers/{{.Driver.Id}}">
|
||||||
|
{{ (index $.ViewState.organized_carpool_drivers_map .Driver.Id).Data.first_name }}
|
||||||
|
{{ (index $.ViewState.organized_carpool_drivers_map .Driver.Id).Data.last_name }}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{.PassengerPickupAddress}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{.PassengerDropAddress}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if eq .Status.String "CONFIRMED"}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Confirmé</span>
|
||||||
|
{{else if eq .Status.String "WAITING_DRIVER_CONFIRMATION"}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-gray-300 rounded-2xl">Attente confirmation</span>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a class="text-co-blue" href="/app/organized-carpool/bookings/{{.Id}}">Voir</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="py-5">
|
||||||
|
<p class="text-sm text-gray-500 text-center">Aucun covoiturage solidaire enregistré</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
@@ -1,10 +1,75 @@
|
|||||||
{{define "beneficiary_solidarity_transport"}}
|
{{define "beneficiary_solidarity_transport"}}
|
||||||
<div class="px-4 py-6 sm:px-6 text-center">
|
<div class="py-6">
|
||||||
<p class="text-center text-lg">Trajets réalisés : {{ .ViewState.solidarity_transport_stats.count }}</p>
|
{{if .ViewState.solidarity_transport_stats}}
|
||||||
<p class="text-center text-lg">Kilomètres réalisés : {{ .ViewState.solidarity_transport_stats.km}} km</p>
|
<div class="py-5 text-center">
|
||||||
|
<p class="text-lg">Trajets réalisés : {{ .ViewState.solidarity_transport_stats.count }}</p>
|
||||||
<a href="/app/journeys/?passengerid={{.ViewState.beneficiary.ID}}" class="inline-flex">
|
<p class="text-lg">Kilomètres réalisés : {{ .ViewState.solidarity_transport_stats.km}} km</p>
|
||||||
<button type="button" class="m-10 w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Chercher un trajet</button>
|
</div>
|
||||||
</a>
|
{{end}}
|
||||||
|
|
||||||
|
<div class="text-center py-5">
|
||||||
|
<a href="/app/journeys/?passengerid={{.ViewState.beneficiary.ID}}" class="inline-flex">
|
||||||
|
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Chercher un trajet</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{if .ViewState.solidarity_transport_bookings}}
|
||||||
|
<div class="py-5">
|
||||||
|
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des transports solidaires</h4>
|
||||||
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
|
<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">Date</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Conducteur</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Départ</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Arrivée</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Statut</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{range .ViewState.solidarity_transport_bookings}}
|
||||||
|
{{if or (eq .Status "VALIDATED") (eq .Status "WAITING_CONFIRMATION")}}
|
||||||
|
<tr>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Journey}}
|
||||||
|
{{timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04"}}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .DriverId}}
|
||||||
|
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{.DriverId}}">
|
||||||
|
{{ (index $.ViewState.solidarity_transport_drivers_map .DriverId).Data.first_name }}
|
||||||
|
{{ (index $.ViewState.solidarity_transport_drivers_map .DriverId).Data.last_name }}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Journey}}{{if .Journey.PassengerPickup}}{{.Journey.PassengerPickup.Properties.label}}{{end}}{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Journey}}{{if .Journey.PassengerDrop}}{{.Journey.PassengerDrop.Properties.label}}{{end}}{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if eq .Status "VALIDATED"}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Validé</span>
|
||||||
|
{{else if eq .Status "WAITING_CONFIRMATION"}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-gray-300 rounded-2xl">Attente confirmation</span>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a class="text-co-blue" href="/app/solidarity-transport/bookings/{{.Id}}">Voir</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="py-5">
|
||||||
|
<p class="text-sm text-gray-500 text-center">Aucun transport solidaire enregistré</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Ajouter un diagnostic</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
|
||||||
x-data="{
|
|
||||||
fields: {
|
|
||||||
name: null,
|
|
||||||
namespace: 'parcoursmob_beneficiaries',
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: ['required'],
|
|
||||||
namespace: ['required'],
|
|
||||||
},
|
|
||||||
formValidation: {
|
|
||||||
valid: false,
|
|
||||||
fields: {
|
|
||||||
name: {valid: null},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isFormValid: true,
|
|
||||||
validate() {
|
|
||||||
this.formValidation = Iodine.assert(this.fields, this.rules)
|
|
||||||
},
|
|
||||||
validateField(field) {
|
|
||||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
|
||||||
},
|
|
||||||
submit(event) {
|
|
||||||
this.validate()
|
|
||||||
if(!this.formValidation.valid) {
|
|
||||||
this.isFormValid = false
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
return this.formValidation.valid
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
<form class="space-y-6" method="POST" @submit="submit">
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Informations obligatoires</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations obligatoires
|
|
||||||
pour créer un diagnostic dans PARCOURSMOB</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom</label>
|
|
||||||
<input type="text" name="name" id="name" autocomplete="name"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.name" @blur="validateField('name')"
|
|
||||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="namespace" value="parcoursmob_beneficiaries" />
|
|
||||||
<!-- <div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma JSON</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma JSON pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="json_schema" class="block text-sm font-medium text-gray-700">Schéma JSON</label>
|
|
||||||
<textarea name="json_schema" id="json_schema" autocomplete="json_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.json_schema" @blur="validateField('json_schema')"
|
|
||||||
:class="formValidation.fields.json_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma UI</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma UI pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="ui_schema" class="block text-sm font-medium text-gray-700">Schéma UI</label>
|
|
||||||
<textarea name="ui_schema" id="ui_schema" autocomplete="ui_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.ui_schema" @blur="validateField('ui_schema')"
|
|
||||||
:class="formValidation.fields.ui_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="flex justify-end">
|
|
||||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
|
||||||
<a href="/app/beneficiaries/{{.ViewState.beneficiary}}">
|
|
||||||
<button type="button"
|
|
||||||
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
|
||||||
</a>
|
|
||||||
<button type="submit"
|
|
||||||
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Créer le diagnostique</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -189,16 +189,17 @@
|
|||||||
Transport solidaire </a>
|
Transport solidaire </a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
{{if moduleAvailable "organized_carpool"}}
|
||||||
|
<a href="#" @click="tab = 'organized_carpool'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'organized_carpool' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Covoiturage solidaire </a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<a href="#" @click="tab = 'organizations'"
|
<a href="#" @click="tab = 'organizations'"
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
:class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Gestionnaires </a>
|
Gestionnaires </a>
|
||||||
|
|
||||||
<!--<a href="#" @click="tab = 'diags'"
|
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
||||||
:class="tab == 'diags' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
||||||
Diagnostics </a>-->
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -208,6 +209,7 @@
|
|||||||
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
||||||
<div x-show="tab == 'wallet'">{{template "beneficiary_wallet" .}}</div>
|
<div x-show="tab == 'wallet'">{{template "beneficiary_wallet" .}}</div>
|
||||||
{{if moduleAvailable "solidarity_transport"}}<div x-show="tab == 'solidarity_transport'">{{template "beneficiary_solidarity_transport" .}}</div>{{end}}
|
{{if moduleAvailable "solidarity_transport"}}<div x-show="tab == 'solidarity_transport'">{{template "beneficiary_solidarity_transport" .}}</div>{{end}}
|
||||||
|
{{if moduleAvailable "organized_carpool"}}<div x-show="tab == 'organized_carpool'">{{template "beneficiary_organized_carpool" .}}</div>{{end}}
|
||||||
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,15 @@
|
|||||||
Exporter
|
Exporter
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
{{if .ViewState.Archived}}
|
||||||
|
<a href="/app/beneficiaries/">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
{{$.IconSet.Icon "hero:outline/archive-box-x-mark" "h-5 w-5 mr-3"}}
|
||||||
|
Bénéficiaires actifs
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
<a href="/app/beneficiaries/?archived=true">
|
<a href="/app/beneficiaries/?archived=true">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
@@ -21,6 +30,7 @@
|
|||||||
Bénéficiaires archivés
|
Bénéficiaires archivés
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
<a href="/app/beneficiaries/create">
|
<a href="/app/beneficiaries/create">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
||||||
|
|||||||
@@ -10,12 +10,12 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
||||||
{{range .latest}}
|
{{range $index, $el := .latest}}{{if gt $index 4}}{{break}}{{end}}
|
||||||
<li class="py-2 px-4 flex">
|
<li class="py-2 px-4 flex">
|
||||||
<a href="/app/beneficiaries/{{.ID}}" class="flex w-full">
|
<a href="/app/beneficiaries/{{$el.ID}}" class="flex w-full">
|
||||||
<img class="h-6 w-6 rounded-co" src="/app/beneficiaries/{{.ID}}/picture" alt="">
|
<img class="h-6 w-6 rounded-co" src="/app/beneficiaries/{{$el.ID}}/picture" alt="">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
<p class="text-sm font-medium text-gray-900">{{.Data.first_name}} {{.Data.last_name}}</p>
|
<p class="text-sm font-medium text-gray-900">{{$el.Data.first_name}} {{$el.Data.last_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
190
web/layouts/dashboard/_partials/drivers-map-widget.html
Normal file
190
web/layouts/dashboard/_partials/drivers-map-widget.html
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
{{define "drivers_map_widget"}}
|
||||||
|
<div class="bg-white overflow-hidden shadow rounded-2xl">
|
||||||
|
<div class="p-6">
|
||||||
|
<div class="flex items-center justify-between mb-4">
|
||||||
|
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||||
|
Carte des conducteurs
|
||||||
|
</h3>
|
||||||
|
{{if .geography_filters_enabled}}
|
||||||
|
<form>
|
||||||
|
<div class="grid grid-cols-1">
|
||||||
|
<select id="driver_address_geo" name="driver_address_geo" class="col-start-1 row-start-1 w-48 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range .geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.filters.driver_address_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="drivers-map" class="w-full rounded-lg overflow-hidden border border-gray-200" style="height: 500px;"></div>
|
||||||
|
|
||||||
|
<div class="mt-4 flex items-center justify-center gap-6 text-sm">
|
||||||
|
{{if moduleAvailable "solidarity_transport"}}
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="w-6 h-6 rounded-co bg-co-blue border border-white shadow-md mr-2"></div>
|
||||||
|
<span class="text-gray-700">Transport solidaire ({{len .solidarity_drivers}})</span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{if moduleAvailable "organized_carpool"}}
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="w-6 h-6 rounded-co bg-co-green border border-white shadow-md mr-2"></div>
|
||||||
|
<span class="text-gray-700">Covoiturage solidaire ({{len .organized_carpool_drivers}})</span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// Check if map libraries are available
|
||||||
|
if (typeof maplibregl === 'undefined' || typeof pmtiles === 'undefined') {
|
||||||
|
console.warn('Map libraries not available');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize PMTiles protocol
|
||||||
|
let protocol = new pmtiles.Protocol();
|
||||||
|
maplibregl.addProtocol("pmtiles", protocol.tile);
|
||||||
|
|
||||||
|
// Initialize map centered on France with protomaps style
|
||||||
|
const map = new maplibregl.Map({
|
||||||
|
container: 'drivers-map',
|
||||||
|
style: '/public/maps/protomaps-light/style.json',
|
||||||
|
center: [2.3522, 48.8566], // Paris
|
||||||
|
zoom: 5
|
||||||
|
});
|
||||||
|
|
||||||
|
map.addControl(new maplibregl.NavigationControl(), 'top-right');
|
||||||
|
|
||||||
|
const bounds = new maplibregl.LngLatBounds();
|
||||||
|
let hasMarkers = false;
|
||||||
|
|
||||||
|
map.on('load', function() {
|
||||||
|
// Add solidarity transport drivers
|
||||||
|
{{if moduleAvailable "solidarity_transport"}}
|
||||||
|
const solidarityDrivers = [
|
||||||
|
{{range .solidarity_drivers}}
|
||||||
|
{{if .Data.address}}
|
||||||
|
{
|
||||||
|
name: '{{.Data.first_name}} {{.Data.last_name}}',
|
||||||
|
coordinates: {{if and .Data.address.geometry .Data.address.geometry.coordinates}}[{{index .Data.address.geometry.coordinates 0}}, {{index .Data.address.geometry.coordinates 1}}]{{else}}null{{end}},
|
||||||
|
address: {{if .Data.address.properties}}'{{.Data.address.properties.label}}'{{else}}''{{end}},
|
||||||
|
type: 'solidarity-transport',
|
||||||
|
driverId: '{{.ID}}'
|
||||||
|
},
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
].filter(d => d.coordinates !== null);
|
||||||
|
|
||||||
|
solidarityDrivers.forEach(function(driver) {
|
||||||
|
// Create custom marker element matching compact search style
|
||||||
|
const el = document.createElement('div');
|
||||||
|
el.className = 'w-8 h-8 rounded-co bg-co-blue border border-white shadow-md flex items-center justify-center cursor-pointer';
|
||||||
|
|
||||||
|
// User icon matching compact search
|
||||||
|
el.innerHTML = `
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
|
</svg>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const marker = new maplibregl.Marker({element: el})
|
||||||
|
.setLngLat(driver.coordinates)
|
||||||
|
.setPopup(new maplibregl.Popup({offset: 25, className: 'rounded-lg'})
|
||||||
|
.setHTML(`
|
||||||
|
<div class="p-3">
|
||||||
|
<a href="/app/solidarity-transport/drivers/${driver.driverId}" class="font-semibold text-sm text-gray-900 hover:text-co-blue">${driver.name}</a>
|
||||||
|
<p class="text-xs text-gray-600 mt-1">${driver.address}</p>
|
||||||
|
<p class="text-xs text-co-blue font-medium mt-2">Transport solidaire</p>
|
||||||
|
</div>
|
||||||
|
`))
|
||||||
|
.addTo(map);
|
||||||
|
|
||||||
|
bounds.extend(driver.coordinates);
|
||||||
|
hasMarkers = true;
|
||||||
|
});
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
// Add organized carpool drivers
|
||||||
|
{{if moduleAvailable "organized_carpool"}}
|
||||||
|
const organizedCarpoolDrivers = [
|
||||||
|
{{range .organized_carpool_drivers}}
|
||||||
|
{{if .Data.address}}
|
||||||
|
{
|
||||||
|
name: '{{.Data.first_name}} {{.Data.last_name}}',
|
||||||
|
coordinates: {{if and .Data.address.geometry .Data.address.geometry.coordinates}}[{{index .Data.address.geometry.coordinates 0}}, {{index .Data.address.geometry.coordinates 1}}]{{else}}null{{end}},
|
||||||
|
address: {{if .Data.address.properties}}'{{.Data.address.properties.label}}'{{else}}''{{end}},
|
||||||
|
type: 'organized-carpool',
|
||||||
|
driverId: '{{.ID}}'
|
||||||
|
},
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
].filter(d => d.coordinates !== null);
|
||||||
|
|
||||||
|
organizedCarpoolDrivers.forEach(function(driver) {
|
||||||
|
// Create custom marker element matching compact search style
|
||||||
|
const el = document.createElement('div');
|
||||||
|
el.className = 'w-8 h-8 rounded-co bg-co-green border border-white shadow-md flex items-center justify-center cursor-pointer';
|
||||||
|
|
||||||
|
// User icon matching compact search
|
||||||
|
el.innerHTML = `
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
|
</svg>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const marker = new maplibregl.Marker({element: el})
|
||||||
|
.setLngLat(driver.coordinates)
|
||||||
|
.setPopup(new maplibregl.Popup({offset: 25, className: 'rounded-lg'})
|
||||||
|
.setHTML(`
|
||||||
|
<div class="p-3">
|
||||||
|
<a href="/app/organized-carpool/drivers/${driver.driverId}" class="font-semibold text-sm text-gray-900 hover:text-co-green">${driver.name}</a>
|
||||||
|
<p class="text-xs text-gray-600 mt-1">${driver.address}</p>
|
||||||
|
<p class="text-xs text-co-green font-medium mt-2">Covoiturage solidaire</p>
|
||||||
|
</div>
|
||||||
|
`))
|
||||||
|
.addTo(map);
|
||||||
|
|
||||||
|
bounds.extend(driver.coordinates);
|
||||||
|
hasMarkers = true;
|
||||||
|
});
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
// Fit map to markers bounds with padding
|
||||||
|
if (hasMarkers) {
|
||||||
|
map.fitBounds(bounds, {
|
||||||
|
padding: 50,
|
||||||
|
maxZoom: 12
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.maplibregl-popup-content {
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||||
|
}
|
||||||
|
.maplibregl-popup-close-button {
|
||||||
|
font-size: 20px;
|
||||||
|
padding: 4px;
|
||||||
|
color: #6B7280;
|
||||||
|
}
|
||||||
|
.maplibregl-popup-close-button:hover {
|
||||||
|
background-color: #F3F4F6;
|
||||||
|
color: #111827;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{{end}}
|
||||||
@@ -14,40 +14,12 @@
|
|||||||
<div
|
<div
|
||||||
class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
|
class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
|
||||||
<div class="flex-1 px-4 py-2 text-sm truncate">
|
<div class="flex-1 px-4 py-2 text-sm truncate">
|
||||||
<a href="#" class="text-gray-900 font-medium hover:text-gray-600">Bénéficiaires</a>
|
<a href="/app/beneficiaries/" class="text-gray-900 font-medium hover:text-gray-600">Bénéficiaires</a>
|
||||||
<p class="text-gray-500">{{.ViewState.beneficiaries.count}} bénéficiaires</p>
|
<p class="text-gray-500">{{.ViewState.beneficiaries.count}} bénéficiaires</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
|
||||||
<div
|
|
||||||
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-green text-white text-sm font-medium rounded-l-3xl">
|
|
||||||
{{.IconSet.Icon "hero:outline/shield-check" "h-6 w-6"}}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
|
|
||||||
<div class="flex-1 px-4 py-2 text-sm truncate">
|
|
||||||
<a href="#" class="text-gray-900 font-medium hover:text-gray-600">Accompagnement</a>
|
|
||||||
<p class="text-gray-500">0 actions réalisées</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
|
||||||
<div
|
|
||||||
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-yellow text-white text-sm font-medium rounded-l-3xl">
|
|
||||||
{{.IconSet.Icon "hero:outline/office-building" "h-6 w-6"}}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
|
|
||||||
<div class="flex-1 px-4 py-2 text-sm truncate">
|
|
||||||
<a href="#" class="text-gray-900 font-medium hover:text-gray-600">Groupes</a>
|
|
||||||
<p class="text-gray-500">0 groupes créés</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
||||||
<div
|
<div
|
||||||
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-red text-white text-sm font-medium rounded-l-3xl">
|
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-red text-white text-sm font-medium rounded-l-3xl">
|
||||||
@@ -61,6 +33,44 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
{{if moduleAvailable "solidarity_transport"}}
|
||||||
|
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
||||||
|
<div
|
||||||
|
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-orange text-white text-sm font-medium rounded-l-3xl">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
|
||||||
|
<div class="flex-1 px-4 py-2 text-sm truncate">
|
||||||
|
<a href="/app/solidarity-transport/?tab=drivers" class="text-gray-900 font-medium hover:text-gray-600">Conducteurs solidaires</a>
|
||||||
|
<p class="text-gray-500">{{len .ViewState.solidarity_drivers}} conducteurs</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if moduleAvailable "organized_carpool"}}
|
||||||
|
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
||||||
|
<div
|
||||||
|
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-green text-white text-sm font-medium rounded-l-3xl">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
|
||||||
|
<div class="flex-1 px-4 py-2 text-sm truncate">
|
||||||
|
<a href="/app/organized-carpool/?tab=drivers" class="text-gray-900 font-medium hover:text-gray-600">Covoitureurs solidaires</a>
|
||||||
|
<p class="text-gray-500">{{len .ViewState.organized_carpool_drivers}} covoitureurs</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -79,5 +89,11 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if or (moduleAvailable "solidarity_transport") (moduleAvailable "organized_carpool")}}
|
||||||
|
<div class="py-4">
|
||||||
|
{{template "drivers_map_widget" .ViewState}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,132 +0,0 @@
|
|||||||
{{define "diags_files"}}
|
|
||||||
<div class="px-4 py-6 sm:px-6"
|
|
||||||
x-data="{
|
|
||||||
fields: {
|
|
||||||
name: null,
|
|
||||||
type: diagnostic,
|
|
||||||
file: null,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: ['required'],
|
|
||||||
type: ['required'],
|
|
||||||
file: ['required'],
|
|
||||||
},
|
|
||||||
formValidation: {
|
|
||||||
valid: false,
|
|
||||||
fields: {
|
|
||||||
name: {valid: null},
|
|
||||||
type: {valid: null},
|
|
||||||
file: {valid: null},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isFormValid: true,
|
|
||||||
validate() {
|
|
||||||
this.formValidation = Iodine.assert(this.fields, this.rules)
|
|
||||||
},
|
|
||||||
validateField(field) {
|
|
||||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
|
||||||
},
|
|
||||||
submit(event) {
|
|
||||||
this.validate()
|
|
||||||
if(!this.formValidation.valid) {
|
|
||||||
this.isFormValid = false
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
return this.formValidation.valid
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
{{if eq (len .ViewState.documents) 0}}
|
|
||||||
<p class="p-12 text-gray-500 text-center text-md">Aucun document</p>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if gt (len .ViewState.documents) 0}}
|
|
||||||
|
|
||||||
<div class="-mx-4 mb-10 ring-1 ring-gray-300 sm:-mx-6 md:mx-0 md:rounded-lg">
|
|
||||||
<table class="min-w-full divide-y divide-gray-300">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Type</th>
|
|
||||||
<th scope="col" class="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell">Nom du document</th>
|
|
||||||
<th scope="col" class="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell">Ajouté le</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>
|
|
||||||
{{range .ViewState.documents}}
|
|
||||||
<tr>
|
|
||||||
<td class="relative py-4 pl-4 sm:pl-6 pr-3 text-sm">
|
|
||||||
<div class="font-medium text-gray-900">
|
|
||||||
<span class="bg-co-blue text-xs text-white rounded-xl p-1 mr-2">{{index $.ViewState.file_types_map .Metadata.Type}}</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
|
||||||
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
|
||||||
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
|
||||||
<a href="/app/diags/{{$.ViewState.diag.ID}}/documents/{{.FileName}}" target="_blank">
|
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Voir<span class="sr-only"> le document</span></button>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
|
|
||||||
<!-- More plans... -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{end}}
|
|
||||||
<h3 class="text-lg">Ajouter un document</h3>
|
|
||||||
<form method="POST" action="/app/diags/{{.ViewState.diag.ID}}/documents" @submit="submit" enctype="multipart/form-data">
|
|
||||||
<div class="md:grid md:grid-cols-6 p-2">
|
|
||||||
<div class="sm:col-span-2">
|
|
||||||
<label for="type" class="block text-sm font-medium text-gray-700">Type</label>
|
|
||||||
<select id="type" name="type" class="mt-1 block w-full rounded-l-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
|
|
||||||
x-model="fields.type" @blur="validateField('type')"
|
|
||||||
:class="formValidation.fields.type.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
<option value="" selected>Sélectionner un type</option>
|
|
||||||
{{range .ViewState.events_file_types}}
|
|
||||||
<option value="{{.}}">{{index $.ViewState.file_types_map .}}</option>
|
|
||||||
{{end}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="sm:col-span-4">
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom</label>
|
|
||||||
<input type="text" name="name" id="name"
|
|
||||||
placeholder="Nom du fichier"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-r-2xl"
|
|
||||||
x-model="fields.name" @blur="validateField('name')"
|
|
||||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'" />
|
|
||||||
</div>
|
|
||||||
<div class="sm:col-span-6 mt-4">
|
|
||||||
<label for="cover-photo" class="block text-sm font-medium text-gray-700">Téléchargement</label>
|
|
||||||
<div class="mt-1 flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6"
|
|
||||||
x-on:drop="console.log('toto')"
|
|
||||||
:class="formValidation.fields.file.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
<div class="space-y-1 text-center">
|
|
||||||
{{.IconSet.Icon "hero:outline/folder-plus" "mx-auto h-12 w-12 text-gray-400"}}
|
|
||||||
<div class="flex text-sm text-gray-600">
|
|
||||||
<label for="file-upload" class="relative cursor-pointer rounded-md bg-white font-medium text-co-blue focus-within:outline-none focus-within:ring-2 focus-within:ring-co-blue focus-within:ring-offset-2 hover:text-co-blue">
|
|
||||||
<span>Sélectionnez un fichier </span>
|
|
||||||
<input id="file-upload" name="file-upload" type="file" class="sr-only"
|
|
||||||
x-model="fields.file" @blur="validateField('file')">
|
|
||||||
</label>
|
|
||||||
<!-- <p class="pl-1">ou glissez-déposez</p> -->
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<p class="text-xs text-gray-500">Jusqu'Ă 10MB</p>
|
|
||||||
<p class="text-co-blue p-2" x-text="fields.file" x-if="fields.file"></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="submit"
|
|
||||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
|
||||||
Ajouter le document
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
<div>
|
|
||||||
<form method="POST" >
|
|
||||||
|
|
||||||
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
|
|
||||||
|
|
||||||
<div class="fixed inset-0 z-10 overflow-y-auto">
|
|
||||||
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
|
||||||
|
|
||||||
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full max-w-lg sm:p-6">
|
|
||||||
<div>
|
|
||||||
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
|
||||||
{{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
|
|
||||||
</div>
|
|
||||||
<div class="mt-3 text-center sm:mt-5">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Confirmation de retrait</h3>
|
|
||||||
<div class="mt-2">
|
|
||||||
<p class="text-sm text-gray-500">Voulez-vous vraiment retirer ce dignostique ?</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
|
||||||
<a href="/app/diags/{{.ViewState.diag.ID}}" class="mt-3 inline-flex w-full justify-center rounded-l-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">Annuler</a>
|
|
||||||
<button type="submit" class="inline-flex w-full justify-center rounded-r-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-2 sm:text-sm">Confirmation</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
{{ define "content" }}
|
|
||||||
<main class="py-10">
|
|
||||||
<div class="max-w-3xl mx-auto px-4 sm:px-6 md:flex md:items-center md:justify-between md:space-x-5 lg:max-w-7xl lg:px-8">
|
|
||||||
<div class="flex items-center space-x-5">
|
|
||||||
<div>
|
|
||||||
<h1 class="text-2xl font-bold text-gray-900">{{.ViewState.diag.Name}}</h1>
|
|
||||||
</div>
|
|
||||||
{{$diag := .ViewState.diag.ID}}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
|
|
||||||
{{if eq .ViewState.diag.Deleted false}}
|
|
||||||
<a href="/app/diags/{{$diag}}/update" class="inline-flex"><button type="button"
|
|
||||||
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Modifier</button></a>
|
|
||||||
<a href="/app/diags/{{$diag}}/delete" class="inline-flex"><button type="button"
|
|
||||||
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Retirer</button></a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-6 sm:px-6 lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-3">
|
|
||||||
<div class="space-y-6 lg:col-start-1 lg:col-span-2">
|
|
||||||
<section aria-labelledby="diag-information-title">
|
|
||||||
<div class="bg-white shadow sm:rounded-lg">
|
|
||||||
<div class="px-4 py-5 sm:px-6">
|
|
||||||
<h2 id="diag" class="text-lg leading-6 font-medium text-gray-900">Informations</h2>
|
|
||||||
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations sur le diagnostic.</p>
|
|
||||||
</div>
|
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
|
||||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Date du diagnostic</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{(timeFrom .ViewState.diag.Diagdate).Format "02/01/2006"}}</dd>
|
|
||||||
</div>
|
|
||||||
{{if eq .ViewState.diag.Namespace "parcoursmob_beneficiaries"}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">Diagnostic personnelle</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .ViewState.diag.Namespace "parcoursmob_vehicles"}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">Diagnostic automobile</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .ViewState.diag.Namespace "parcoursmob_bookings"}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">Diagnostic véhicule réservé</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<!-- {{if .ViewState.diag.Json_schema}}
|
|
||||||
<div class="sm:col-span-2">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">JSON_schema</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.diag.Json_schema}}</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{if .ViewState.diag.Ui_schema}}
|
|
||||||
<div class="sm:col-span-2">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">UI_schema</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.diag.Ui_schema}}</dd>
|
|
||||||
</div>
|
|
||||||
{{end}} -->
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-6 sm:px-6 lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-3">
|
|
||||||
<div class="space-y-6 lg:col-start-1 lg:col-span-2">
|
|
||||||
<section aria-labelledby="event-documents">
|
|
||||||
<div class="bg-white mt-4 px-4 py-5 shadow sm:rounded-lg sm:px-6">
|
|
||||||
<h2 id="documents-title" class="text-lg font-medium text-gray-900">Documents</h2>
|
|
||||||
<div class="flex justify-between items-center">
|
|
||||||
<div>{{template "diags_files" .}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Diagnostics retirés</h1>
|
|
||||||
|
|
||||||
<div class="sm:flex sm:items-center">
|
|
||||||
<div class="sm:flex-auto">
|
|
||||||
<p class="mt-2 text-sm text-gray-700"></p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
|
||||||
<a href="/app/diags/">
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex items-center justify-center mr-3 bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
|
||||||
Retour
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Nom du diagnostic
|
|
||||||
</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="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
|
||||||
<span class="sr-only">Actions</span>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{range .ViewState.diags}}
|
|
||||||
{{if eq .Deleted true}}
|
|
||||||
<a href="/app/diags/{{.ID}}">
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
|
|
||||||
<div class="font-medium text-gray-900">{{.Name}}</div>
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if eq .Namespace "parcoursmob_beneficiaries"}}
|
|
||||||
<div class="text-gray-500">Diagnostic personnelle</div>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Namespace "parcoursmob_vehicles"}}
|
|
||||||
<div class="text-gray-500">Diagnostic automobile</div>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Namespace "parcoursmob_bookings"}}
|
|
||||||
<div class="text-gray-500">Diagnostic véhicule réservé</div>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a href="/app/diags/{{.ID}}" class="text-co-blue hover:text-co-blue">Voir</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</thead>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Diagnostics effectués</h1>
|
|
||||||
|
|
||||||
<div class="sm:flex sm:items-center">
|
|
||||||
<div class="sm:flex-auto">
|
|
||||||
<p class="mt-2 text-sm text-gray-700"></p>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
|
||||||
<a href="/app/diags/history">
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex items-center justify-center mr-3 bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
|
||||||
{{$.IconSet.Icon "hero:outline/calendar" "h-5 w-5 mr-3"}}
|
|
||||||
Historique
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Nom du diagnostic
|
|
||||||
</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">
|
|
||||||
Date
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
|
||||||
<span class="sr-only">Actions</span>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{range .ViewState.diags}}
|
|
||||||
<a href="/app/diags/{{.ID}}">
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<div class="font-medium text-gray-900">{{.Name}}</div>
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if eq .Namespace "parcoursmob_beneficiaries"}}
|
|
||||||
<div class="text-gray-500">Diagnostic personnelle</div>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Namespace "parcoursmob_vehicles"}}
|
|
||||||
<div class="text-gray-500">Diagnostic automobile</div>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Namespace "parcoursmob_bookings"}}
|
|
||||||
<div class="text-gray-500">Diagnostic véhicule réservé</div>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<div class="font-medium text-gray-900">{{(timeFrom .Diagdate).Format "02/01/2006"}}</div>
|
|
||||||
</td>
|
|
||||||
<td class="whitespace nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if eq .Deleted true}}
|
|
||||||
<div class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Diagnostic retiré</div>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a href="/app/diags/{{.ID}}" target="_blank">
|
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Voir<span class="sr-only"> le diagnostic</span></button>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</thead>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Éditer un diagnostique</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
|
||||||
x-data="{
|
|
||||||
fields: {
|
|
||||||
name: '{{.ViewState.diag.Name}}',
|
|
||||||
namespace: '{{.ViewState.diag.Namespace}}',
|
|
||||||
json_schema: '{{.ViewState.diag.Json_schema}}',
|
|
||||||
ui_schema: '{{.ViewState.diag.Ui_schema}}',
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: ['required'],
|
|
||||||
namespace: ['required'],
|
|
||||||
json_schema: ['required'],
|
|
||||||
ui_schema: ['required']
|
|
||||||
},
|
|
||||||
formValidation: {
|
|
||||||
valid: false,
|
|
||||||
fields: {
|
|
||||||
name: {valid: null},
|
|
||||||
json_schema: {valid: null},
|
|
||||||
ui_schema: {valid: null},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isFormValid: true,
|
|
||||||
validate() {
|
|
||||||
this.formValidation = Iodine.assert(this.fields, this.rules)
|
|
||||||
},
|
|
||||||
validateField(field) {
|
|
||||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
|
||||||
},
|
|
||||||
submit(event) {
|
|
||||||
this.validate()
|
|
||||||
if(!this.formValidation.valid) {
|
|
||||||
this.isFormValid = false
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
return this.formValidation.valid
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
<form class="space-y-6" method="POST" @submit="submit">
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Informations obligatoires</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations obligatoires
|
|
||||||
pour éditer un diagnostique dans PARCOURSMOB</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom</label>
|
|
||||||
<input type="text" name="name" id="name" autocomplete="given-name"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.name" @blur="validateField('name')"
|
|
||||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'"
|
|
||||||
value="{{.ViewState.diag.Name}}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="namespace" value="{{.ViewState.diag.Namespace}}" />
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma JSON</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma JSON pour le diagnostique</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="json_schema" class="block text-sm font-medium text-gray-700">Schéma JSON</label>
|
|
||||||
<textarea name="json_schema" id="json_schema" autocomplete="json_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.json_schema" @blur="validateField('json_schema')"
|
|
||||||
:class="formValidation.fields.json_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma UI</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma UI pour le diagnostique</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="ui_schema" class="block text-sm font-medium text-gray-700">Schéma UI</label>
|
|
||||||
<textarea name="ui_schema" id="ui_schema" autocomplete="ui_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.ui_schema" @blur="validateField('ui_schema')"
|
|
||||||
:class="formValidation.fields.ui_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-end">
|
|
||||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
|
||||||
<a href="/app/diags/{{.ViewState.diag.ID}}">
|
|
||||||
<button type="button"
|
|
||||||
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
|
||||||
</a>
|
|
||||||
<button type="submit"
|
|
||||||
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Éditer le diagnostique</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -7,36 +7,53 @@
|
|||||||
{{$first := true}}
|
{{$first := true}}
|
||||||
{{$i := 0}}
|
{{$i := 0}}
|
||||||
{{range .ViewState.carpools}}
|
{{range .ViewState.carpools}}
|
||||||
|
{{$carpoolData := index .ExtraMembers "ocss"}}
|
||||||
{{if $first}}
|
{{if $first}}
|
||||||
{{$first = false}}
|
{{$first = false}}
|
||||||
<div class="p-4 pb-8">
|
<div class="p-4 pb-8">
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="p-4 border-t-2 pb-8">
|
<div class="p-4 border-t-2 pb-8">
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="flex text-sm text-grey-900 font-bold">
|
<div class="flex items-center justify-between mb-3">
|
||||||
<div class="flex-1">Trajet en covoiturage avec {{.ExtraMembers.ocss.Driver.Alias}}</div>
|
<div class="flex-1">
|
||||||
|
<div class="text-sm text-grey-900 font-bold">Trajet en covoiturage avec {{$carpoolData.Driver.Alias}}</div>
|
||||||
|
{{$pickupDate := timeFrom $carpoolData.PassengerPickupDate}}
|
||||||
|
{{if $pickupDate}}<div class="text-xs text-gray-600">Départ {{$pickupDate}}</div>{{end}}
|
||||||
</div>
|
</div>
|
||||||
<!--{{if .ExtraMembers.ocss.PassengerPickupDate}}<div class="text-xs">Départ {{(timeFrom .ExtraMembers.ocss.PassengerPickupDate)}}</div>{{end}}-->
|
{{if and $carpoolData.Price $carpoolData.Price.Amount}}
|
||||||
<!--<div class="flex items-center justify-center text-sm my-4">
|
<div class="text-lg font-bold text-co-blue">{{printf "%.2f" (round2 $carpoolData.Price.Amount)}}€</div>
|
||||||
<span class="ml-2 mt-1">
|
{{end}}
|
||||||
</span>
|
</div>
|
||||||
{{$.IconSet.Icon "hero:outline/chevron-right" "h-3 w-3 stroke-gray-800 m-2"}}
|
|
||||||
<span class="ml-2 mt-1">
|
<!-- Pickup and Drop addresses -->
|
||||||
</span>
|
<div class="mb-4 space-y-2">
|
||||||
</div>-->
|
{{if $carpoolData.PassengerPickupAddress}}
|
||||||
|
<div class="flex items-start gap-2 text-sm">
|
||||||
<div class="p-4 pb-8 flex items-center justify-center">
|
{{$.IconSet.Icon "hero:outline/map-pin" "h-4 w-4 text-co-green mt-0.5"}}
|
||||||
<!--<span class="text-xs text-md">Avec </span>
|
<div>
|
||||||
<span class="ml-2 mt-1 h-5 rounded-xl bg-gray-200 flex items-center justify-center ring-8 ring-white text-black p-2 text-sm">
|
<div class="text-xs text-gray-500">Départ</div>
|
||||||
</span>-->
|
<div class="text-gray-900">{{$carpoolData.PassengerPickupAddress}}</div>
|
||||||
|
</div>
|
||||||
<span class="text-xs text-md"> sur l'application </span>
|
</div>
|
||||||
<span class="ml-2 rounded-xl px-2 py-1 bg-co-blue flex items-center justify-center ring-8 ring-white text-sm text-white whitespace-nowrap">
|
{{end}}
|
||||||
Blablacar Daily
|
{{if $carpoolData.PassengerDropAddress}}
|
||||||
</span>
|
<div class="flex items-start gap-2 text-sm">
|
||||||
|
{{$.IconSet.Icon "hero:outline/flag" "h-4 w-4 text-co-red mt-0.5"}}
|
||||||
|
<div>
|
||||||
|
<div class="text-xs text-gray-500">Arrivée</div>
|
||||||
|
<div class="text-gray-900">{{$carpoolData.PassengerDropAddress}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
{{if $carpoolData.WebUrl}}
|
||||||
|
<a href="{{$carpoolData.WebUrl}}" target="_blank" class="inline-block rounded-xl px-4 py-1 bg-co-blue text-white text-sm hover:bg-co-darkblue transition-colors">
|
||||||
|
<span>Voir l'offre sur </span><span>{{$carpoolData.Operator}}</span>
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<p class=" text-center text-xs">Accéder au trajet :<br /> <a href="{{.ExtraMembers.ocss.WebUrl}}" class="text-co-blue">{{.ExtraMembers.ocss.WebUrl}}</a></p>
|
|
||||||
<div x-data="{dialog{{$i}}: false}" class="text-center">
|
<div x-data="{dialog{{$i}}: false}" class="text-center">
|
||||||
<button @click="dialog{{$i}} = !dialog{{$i}}" class="m-4 rounded-xl px-4 py-1 mt-8 bg-gray-200 text-co-blue text-sm">Envoyer le lien par SMS</button>
|
<button @click="dialog{{$i}} = !dialog{{$i}}" class="m-4 rounded-xl px-4 py-1 mt-8 bg-gray-200 text-co-blue text-sm">Envoyer le lien par SMS</button>
|
||||||
<div x-show="dialog{{$i}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
<div x-show="dialog{{$i}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
Distance passager
|
Distance passager
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col"
|
||||||
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Dernier trajet (-{{.ViewState.last_trip_days}}j)
|
||||||
|
</th>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
Commentaire
|
Commentaire
|
||||||
@@ -38,11 +42,21 @@
|
|||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{ range .ViewState.driver_journeys }}
|
{{ range .ViewState.driver_journeys }}
|
||||||
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
||||||
|
{{ $lastTrip := (index $.ViewState.driver_last_trips .DriverId)}}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ $driver.Data.first_name }} {{ $driver.Data.last_name }}</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ $driver.Data.first_name }} {{ $driver.Data.last_name }}</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverDistance }} km</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverDistance }} km</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .PassengerDistance }} km</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .PassengerDistance }} km</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if $lastTrip.IsZero}}
|
||||||
|
<span class="text-gray-400">-</span>
|
||||||
|
{{else if eq ($lastTrip.Format "2006-01-02") ($.ViewState.departuredatetime.Format "2006-01-02")}}
|
||||||
|
<span class="text-red-600 font-semibold">{{ $lastTrip.Format "02/01/2006" }}</span>
|
||||||
|
{{else}}
|
||||||
|
{{ $lastTrip.Format "02/01/2006" }}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{if $driver.Data.other_properties}}{{ $driver.Data.other_properties.comment }}{{end}}</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{if $driver.Data.other_properties}}{{ $driver.Data.other_properties.comment }}{{end}}</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td class="relative py-3 px-3 text-right text-sm font-medium whitespace-nowrap">
|
<td class="relative py-3 px-3 text-right text-sm font-medium whitespace-nowrap">
|
||||||
<a href="/app/journeys/?departure={{json .Departure}}&destination={{json .Destination}}&departuredate={{timeFormat .DateTime "2006-01-02"}}&departuretime={{timeFormat .DateTime "15:04"}}{{if and .Data .Data.passenger_id}}&passengerid={{.Data.passenger_id}}{{end}}" class="text-co-blue hover:text-co-blue-dark mr-4">
|
<a href="{{if eq $.ViewState.search_view "compact"}}/app/journeys/search{{else}}/app/journeys/{{end}}?departure={{json .Departure}}&destination={{json .Destination}}&departuredate={{timeFormat .DateTime "2006-01-02"}}&departuretime={{timeFormat .DateTime "15:04"}}{{if and .Data .Data.passenger_id}}&passengerid={{.Data.passenger_id}}{{end}}" class="text-co-blue hover:text-co-blue-dark mr-4">
|
||||||
Rechercher
|
Rechercher
|
||||||
</a>
|
</a>
|
||||||
<a href="/app/journeys/saved-searches/{{.ID}}/delete"
|
<a href="/app/journeys/saved-searches/{{.ID}}/delete"
|
||||||
|
|||||||
2066
web/layouts/journeys/search-compact.html
Normal file
2066
web/layouts/journeys/search-compact.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@
|
|||||||
<div class="bg-white shadow sm:rounded-2xl">
|
<div class="bg-white shadow sm:rounded-2xl">
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Chercher une solution</h2>
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Chercher une solution</h2>
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
<form method="GET" x-data="journeySearch()">
|
<form method="GET" action="{{if eq .ViewState.search_view "compact"}}/app/journeys/search{{else}}/app/journeys/{{end}}" x-data="journeySearch()">
|
||||||
|
|
||||||
<div class="py-4">
|
<div class="py-4">
|
||||||
<label for="beneficiary" class="block text-sm font-medium text-gray-700">Bénéficiaire (optionnel)</label>
|
<label for="beneficiary" class="block text-sm font-medium text-gray-700">Bénéficiaire (optionnel)</label>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-shrink-0 flex items-center px-4">
|
<div class="flex-shrink-0 flex items-center px-4">
|
||||||
<img class="h-8 w-auto" src="/public/images/main_logo.svg" alt="PARCOURSMOB">
|
<img class="h-8 w-auto" src="/public/images/mobicoop-solidaire.png" alt="Mobicoop Solidaire">
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
||||||
<div class="flex flex-col flex-grow pt-5 bg-co-blue overflow-y-auto">
|
<div class="flex flex-col flex-grow pt-5 bg-co-blue overflow-y-auto">
|
||||||
<div class="flex items-center flex-shrink-0 px-4">
|
<div class="flex items-center flex-shrink-0 px-4">
|
||||||
<img class="h-8 w-auto" src="/public/images/parcoursmob_logo_whitered.svg" alt="PARCOURSMOB">
|
<img class="h-8 w-auto" src="/public/images/mobicoop-solidaire.png" alt="Mobicoop Solidaire">
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-5 flex-1 flex flex-col">
|
<div class="mt-5 flex-1 flex flex-col">
|
||||||
{{ template "mainmenu" . }}
|
{{ template "mainmenu" . }}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
<input type="hidden" name="tab" value="{{$tab}}" />
|
<input type="hidden" name="tab" value="{{$tab}}" />
|
||||||
|
|
||||||
<div class="flex flex-row justify-end flex-wrap">
|
<div class="flex flex-row justify-end items-end">
|
||||||
|
|
||||||
<div class="m-4">
|
<div class="m-2">
|
||||||
<div>
|
<div>
|
||||||
<label for="{{$tab}}_date_start" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Dates (début / fin)</label>
|
<label for="{{$tab}}_date_start" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Dates (début / fin)</label>
|
||||||
<div class="mt-2 flex">
|
<div class="mt-2 flex">
|
||||||
@@ -17,16 +17,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="m-4">
|
<div class="m-2">
|
||||||
<label for="{{$tab}}_status" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Statut</label>
|
<label for="{{$tab}}_status" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Statut</label>
|
||||||
<div class="mt-2 grid grid-cols-1">
|
<div class="mt-2 grid grid-cols-1">
|
||||||
<select id="{{$tab}}_status" name="status" class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
<select id="{{$tab}}_status" name="status" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
<option></option>
|
<option></option>
|
||||||
<option value="VALIDATED"{{if eq .filters.status "VALIDATED"}} selected{{end}}>Validé</option>
|
<option value="WAITING_DRIVER_CONFIRMATION"{{if eq .filters.status "WAITING_DRIVER_CONFIRMATION"}} selected{{end}}>Attente confirmation conducteur</option>
|
||||||
<option value="CONFIRMED"{{if eq .filters.status "CONFIRMED"}} selected{{end}}>Confirmé</option>
|
<option value="CONFIRMED"{{if eq .filters.status "CONFIRMED"}} selected{{end}}>Confirmé</option>
|
||||||
<option value="CANCELLED"{{if eq .filters.status "CANCELLED"}} selected{{end}}>Annulé</option>
|
<option value="CANCELLED"{{if eq .filters.status "CANCELLED"}} selected{{end}}>Annulé</option>
|
||||||
<option value="WAITING_CONFIRMATION"{{if eq .filters.status "WAITING_CONFIRMATION"}} selected{{end}}>Attente confirmation</option>
|
|
||||||
<option value="WAITING_DRIVER_CONFIRMATION"{{if eq .filters.status "WAITING_DRIVER_CONFIRMATION"}} selected{{end}}>Attente confirmation conducteur</option>
|
|
||||||
</select>
|
</select>
|
||||||
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
@@ -34,10 +32,55 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if $.geography_filters_enabled}}
|
||||||
<div class="m-4">
|
<div class="m-2">
|
||||||
|
<label for="{{$tab}}_passenger_address_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Adresse passager</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="{{$tab}}_passenger_address_geo" name="passenger_address_geo" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.filters.passenger_address_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="m-2">
|
||||||
|
<label for="{{$tab}}_departure_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Départ</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="{{$tab}}_departure_geo" name="departure_geo" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.filters.departure_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="m-2">
|
||||||
|
<label for="{{$tab}}_destination_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Destination</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="{{$tab}}_destination_geo" name="destination_geo" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.filters.destination_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,57 @@
|
|||||||
|
|
||||||
{{ define "carpool_bookings_history" }}
|
{{ define "carpool_bookings_history" }}
|
||||||
{{template "booking_filters" dict "tab" "carpoolHistory" "filters" .ViewState.hist_filters }}
|
{{template "booking_filters" dict "tab" "carpoolHistory" "filters" .ViewState.hist_filters "geography_filters_enabled" .ViewState.geography_filters_enabled "geography_filters_list" .ViewState.geography_filters_list }}
|
||||||
{{if eq (len .ViewState.bookings_history) 0}}
|
{{if eq (len .ViewState.bookings_history) 0}}
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
|
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{$inrange := false}}
|
||||||
|
|
||||||
|
<div x-data="{
|
||||||
|
bookings: [
|
||||||
|
{{range .ViewState.bookings_history}}{{if $inrange}},{{end}}{{$inrange = true}}{{$driver := index $.ViewState.drivers_map .Driver.Id}}{{$passenger := index $.ViewState.passengers_map .Passenger.Id}}{
|
||||||
|
id: '{{.Id}}',
|
||||||
|
driverId: '{{if .Driver}}{{.Driver.Id}}{{end}}',
|
||||||
|
driverFirstName: '{{if $driver.ID}}{{ jsEscape $driver.Data.first_name }}{{end}}',
|
||||||
|
driverLastName: '{{if $driver.ID}}{{ jsEscape $driver.Data.last_name }}{{end}}',
|
||||||
|
passengerId: '{{if .Passenger}}{{.Passenger.Id}}{{end}}',
|
||||||
|
passengerFirstName: '{{if $passenger.Data}}{{ jsEscape $passenger.Data.first_name }}{{end}}',
|
||||||
|
passengerLastName: '{{if $passenger.Data}}{{ jsEscape $passenger.Data.last_name }}{{end}}',
|
||||||
|
pickupAddress: '{{ jsEscape .PassengerPickupAddress }}',
|
||||||
|
dropAddress: '{{ jsEscape .PassengerDropAddress }}',
|
||||||
|
pickupDate: '{{if .PassengerPickupDate}}{{ timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04" }}{{end}}',
|
||||||
|
status: '{{.Status.String}}',
|
||||||
|
price: '{{if .Price}}{{ printf "%.2f" (round2 .Price.Amount) }}{{else}}N/A{{end}}',
|
||||||
|
currency: '{{if .Price}}{{.Price.Currency}}{{end}}'
|
||||||
|
}{{end}}
|
||||||
|
],
|
||||||
|
currentPage: 1,
|
||||||
|
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
||||||
|
get totalPages() {
|
||||||
|
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
||||||
|
},
|
||||||
|
get paginatedBookings() {
|
||||||
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
||||||
|
const end = start + this.itemsPerPage;
|
||||||
|
return this.bookings.slice(start, end);
|
||||||
|
},
|
||||||
|
nextPage() {
|
||||||
|
if (this.currentPage < this.totalPages) this.currentPage++;
|
||||||
|
},
|
||||||
|
prevPage() {
|
||||||
|
if (this.currentPage > 1) this.currentPage--;
|
||||||
|
},
|
||||||
|
goToPage(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
},
|
||||||
|
getStatusBadge(status) {
|
||||||
|
if (status === 'WAITING_DRIVER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
||||||
|
if (status === 'CONFIRMED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Confirmé' };
|
||||||
|
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
||||||
|
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
||||||
|
return { class: '', text: '' };
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -42,55 +90,86 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{range .ViewState.bookings_history}}
|
<template x-for="booking in paginatedBookings" :key="booking.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" href="/app/organized-carpool/drivers/{{.Driver.Id}}">
|
<a class="text-co-blue" :href="'/app/organized-carpool/drivers/' + booking.driverId">
|
||||||
{{ (index $.ViewState.drivers_map .Driver.Id).Data.first_name }}
|
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
||||||
{{ (index $.ViewState.drivers_map .Driver.Id).Data.last_name }}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{.Passenger.Id}}">
|
<a class="text-co-blue" :href="'/app/beneficiaries/' + booking.passengerId">
|
||||||
{{ (index $.ViewState.passengers_map .Passenger.Id).Data.first_name }}
|
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
||||||
{{ (index $.ViewState.passengers_map .Passenger.Id).Data.last_name }}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupAddress"></td>
|
||||||
{{ .PassengerPickupAddress }}
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropAddress"></td>
|
||||||
</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ .PassengerDropAddress }}
|
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04" }}
|
<span x-text="booking.price !== 'N/A' ? booking.price + ' ' + booking.currency : 'N/A'"></span>
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ if eq .Status.String "WAITING_DRIVER_CONFIRMATION"}}
|
<a class="text-co-blue" :href="'/app/organized-carpool/bookings/' + booking.id">Voir</a>
|
||||||
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation</span>
|
|
||||||
{{ else if eq .Status.String "CONFIRMED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-green rounded-xl">Confirmé</span>
|
|
||||||
{{ else if eq .Status.String "VALIDATED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-green rounded-xl">Validé</span>
|
|
||||||
{{ else if eq .Status.String "CANCELLED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
|
|
||||||
{{ end }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ if .Price }}
|
|
||||||
{{ printf "%.2f" (round2 .Price.Amount) }} {{ .Price.Currency }}
|
|
||||||
{{ else }}
|
|
||||||
N/A
|
|
||||||
{{ end }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a class="text-co-blue" href="/app/organized-carpool/bookings/{{.Id}}">
|
|
||||||
Voir
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- Pagination -->
|
||||||
|
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
||||||
|
<div class="flex flex-1 justify-between sm:hidden">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Précédent
|
||||||
|
</button>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Suivant
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Affichage de
|
||||||
|
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
||||||
|
Ă
|
||||||
|
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="bookings.length"></span>
|
||||||
|
résultats
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Précédent</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<template x-for="page in totalPages" :key="page">
|
||||||
|
<button @click="goToPage(page)"
|
||||||
|
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
||||||
|
x-text="page"></button>
|
||||||
|
</template>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Suivant</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,9 +1,58 @@
|
|||||||
|
|
||||||
{{ define "carpool_bookings_list" }}
|
{{ define "carpool_bookings_list" }}
|
||||||
{{template "booking_filters" dict "tab" "carpoolService" "filters" .ViewState.filters }}
|
{{template "booking_filters" dict "tab" "carpoolService" "filters" .ViewState.filters "geography_filters_enabled" .ViewState.geography_filters_enabled "geography_filters_list" .ViewState.geography_filters_list }}
|
||||||
{{if eq (len .ViewState.bookings) 0}}
|
{{if eq (len .ViewState.bookings) 0}}
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{$inrange := false}}
|
||||||
|
|
||||||
|
<div x-data="{
|
||||||
|
bookings: [
|
||||||
|
{{range .ViewState.bookings}}{{if $inrange}},{{end}}{{$inrange = true}}{{$driver := index $.ViewState.drivers_map .Driver.Id}}{{$passenger := index $.ViewState.passengers_map .Passenger.Id}}{
|
||||||
|
id: '{{.Id}}',
|
||||||
|
driverId: '{{if .Driver}}{{.Driver.Id}}{{end}}',
|
||||||
|
driverFirstName: '{{if $driver.ID}}{{ jsEscape $driver.Data.first_name }}{{end}}',
|
||||||
|
driverLastName: '{{if $driver.ID}}{{ jsEscape $driver.Data.last_name }}{{end}}',
|
||||||
|
passengerId: '{{if .Passenger}}{{.Passenger.Id}}{{end}}',
|
||||||
|
passengerFirstName: '{{if $passenger.Data}}{{ jsEscape $passenger.Data.first_name }}{{end}}',
|
||||||
|
passengerLastName: '{{if $passenger.Data}}{{ jsEscape $passenger.Data.last_name }}{{end}}',
|
||||||
|
pickupAddress: '{{ jsEscape .PassengerPickupAddress }}',
|
||||||
|
dropAddress: '{{ jsEscape .PassengerDropAddress }}',
|
||||||
|
pickupDate: '{{if .PassengerPickupDate}}{{ timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04" }}{{end}}',
|
||||||
|
status: '{{.Status.String}}',
|
||||||
|
price: '{{if .Price}}{{ printf "%.2f" (round2 .Price.Amount) }}{{else}}N/A{{end}}',
|
||||||
|
currency: '{{if .Price}}{{.Price.Currency}}{{end}}'
|
||||||
|
}{{end}}
|
||||||
|
],
|
||||||
|
currentPage: 1,
|
||||||
|
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
||||||
|
get totalPages() {
|
||||||
|
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
||||||
|
},
|
||||||
|
get paginatedBookings() {
|
||||||
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
||||||
|
const end = start + this.itemsPerPage;
|
||||||
|
return this.bookings.slice(start, end);
|
||||||
|
},
|
||||||
|
nextPage() {
|
||||||
|
if (this.currentPage < this.totalPages) this.currentPage++;
|
||||||
|
},
|
||||||
|
prevPage() {
|
||||||
|
if (this.currentPage > 1) this.currentPage--;
|
||||||
|
},
|
||||||
|
goToPage(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
},
|
||||||
|
getStatusBadge(status) {
|
||||||
|
if (status === 'WAITING_DRIVER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
||||||
|
if (status === 'WAITING_PASSENGER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation passager' };
|
||||||
|
if (status === 'CONFIRMED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Confirmé' };
|
||||||
|
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
||||||
|
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
||||||
|
return { class: '', text: '' };
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -42,57 +91,86 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{range .ViewState.bookings}}
|
<template x-for="booking in paginatedBookings" :key="booking.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" href="/app/organized-carpool/drivers/{{.Driver.Id}}">
|
<a class="text-co-blue" :href="'/app/organized-carpool/drivers/' + booking.driverId">
|
||||||
{{ (index $.ViewState.drivers_map .Driver.Id).Data.first_name }}
|
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
||||||
{{ (index $.ViewState.drivers_map .Driver.Id).Data.last_name }}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{.Passenger.Id}}">
|
<a class="text-co-blue" :href="'/app/beneficiaries/' + booking.passengerId">
|
||||||
{{ (index $.ViewState.passengers_map .Passenger.Id).Data.first_name }}
|
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
||||||
{{ (index $.ViewState.passengers_map .Passenger.Id).Data.last_name }}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupAddress"></td>
|
||||||
{{ .PassengerPickupAddress }}
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropAddress"></td>
|
||||||
</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ .PassengerDropAddress }}
|
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04" }}
|
<span x-text="booking.price !== 'N/A' ? booking.price + ' ' + booking.currency : 'N/A'"></span>
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ if eq .Status.String "WAITING_DRIVER_CONFIRMATION"}}
|
<a class="text-co-blue" :href="'/app/organized-carpool/bookings/' + booking.id">Voir</a>
|
||||||
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation</span>
|
|
||||||
{{ else if eq .Status.String "WAITING_PASSENGER_CONFIRMATION"}}
|
|
||||||
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation passager</span>
|
|
||||||
{{ else if eq .Status.String "CONFIRMED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-green rounded-xl">Confirmé</span>
|
|
||||||
{{ else if eq .Status.String "VALIDATED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-green rounded-xl">Validé</span>
|
|
||||||
{{ else if eq .Status.String "CANCELLED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
|
|
||||||
{{ end }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ if .Price }}
|
|
||||||
{{ printf "%.2f" (round2 .Price.Amount) }} {{ .Price.Currency }}
|
|
||||||
{{ else }}
|
|
||||||
N/A
|
|
||||||
{{ end }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a class="text-co-blue" href="/app/organized-carpool/bookings/{{.Id}}">
|
|
||||||
Voir
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- Pagination -->
|
||||||
|
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
||||||
|
<div class="flex flex-1 justify-between sm:hidden">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Précédent
|
||||||
|
</button>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Suivant
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Affichage de
|
||||||
|
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
||||||
|
Ă
|
||||||
|
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="bookings.length"></span>
|
||||||
|
résultats
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Précédent</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<template x-for="page in totalPages" :key="page">
|
||||||
|
<button @click="goToPage(page)"
|
||||||
|
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
||||||
|
x-text="page"></button>
|
||||||
|
</template>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Suivant</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -65,9 +65,20 @@ x-data="{
|
|||||||
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
||||||
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
||||||
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
||||||
|
<div class="flex gap-2 justify-end">
|
||||||
<a href="/app/organized-carpool/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}" target="_blank">
|
<a href="/app/organized-carpool/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}" target="_blank">
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Télécharger<span class="sr-only"> le document</span></button>
|
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-4 w-4 mr-1"}}
|
||||||
|
Télécharger<span class="sr-only"> le document</span>
|
||||||
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
<button type="button"
|
||||||
|
onclick="if(confirm('Êtes-vous sûr de vouloir supprimer ce document ?')) { window.location.href='/app/organized-carpool/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}/delete'; }"
|
||||||
|
class="inline-flex items-center rounded-md border border-transparent bg-co-red px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-co-red focus:ring-offset-2">
|
||||||
|
{{$.IconSet.Icon "hero:outline/trash" "h-4 w-4 mr-1"}}
|
||||||
|
Supprimer<span class="sr-only"> le document</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
61
web/layouts/organized_carpool/_partials/driver_history.html
Normal file
61
web/layouts/organized_carpool/_partials/driver_history.html
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{{define "organized_carpool_driver_history"}}
|
||||||
|
<div class="py-6">
|
||||||
|
{{if .ViewState.stats}}
|
||||||
|
<div class="py-5 text-center">
|
||||||
|
<p class="text-lg">Covoiturages réalisés : {{ .ViewState.stats.bookings.confirmed }}</p>
|
||||||
|
<p class="text-lg">Kilomètres parcourus : {{ .ViewState.stats.bookings.km }} km</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if .ViewState.bookings}}
|
||||||
|
<div class="py-5">
|
||||||
|
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des covoiturages</h4>
|
||||||
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
|
<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">Date</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Passager</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Départ</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Arrivée</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{range .ViewState.bookings}}
|
||||||
|
{{if eq .Status.String "CONFIRMED"}}
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .PassengerPickupDate}}
|
||||||
|
{{timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04"}}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Passenger}}
|
||||||
|
<a class="text-co-blue" href="/app/beneficiaries/{{.Passenger.Id}}">
|
||||||
|
{{ (index $.ViewState.beneficiaries_map .Passenger.Id).Data.first_name }}
|
||||||
|
{{ (index $.ViewState.beneficiaries_map .Passenger.Id).Data.last_name }}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{.PassengerPickupAddress}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{.PassengerDropAddress}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a class="text-co-blue" href="/app/organized-carpool/bookings/{{.Id}}">Voir</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="py-5">
|
||||||
|
<p class="text-sm text-gray-500 text-center">Aucun covoiturage enregistré</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
113
web/layouts/organized_carpool/_partials/driver_wallet.html
Normal file
113
web/layouts/organized_carpool/_partials/driver_wallet.html
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
{{define "organized_carpool_driver_wallet"}}
|
||||||
|
<div class="py-6"
|
||||||
|
x-data="{
|
||||||
|
walletdialog: false
|
||||||
|
}">
|
||||||
|
<div class="py-5 text-center">
|
||||||
|
<p class="text-lg">Solde : {{ printf "%.2f" .ViewState.wallet_balance }} €</p>
|
||||||
|
<button @click="walletdialog = !walletdialog"
|
||||||
|
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||||
|
Créditer le compte
|
||||||
|
</button>
|
||||||
|
<div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true"
|
||||||
|
x-show="walletdialog">
|
||||||
|
<div class="fixed inset-0 bg-gray-900 opacity-30 transition-opacity"></div>
|
||||||
|
|
||||||
|
<div class="fixed inset-0 z-10 overflow-y-auto">
|
||||||
|
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
||||||
|
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6">
|
||||||
|
<div>
|
||||||
|
<div class="mt-3 text-center sm:mt-5">
|
||||||
|
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Créditer le compte</h3>
|
||||||
|
<div class="mt-2">
|
||||||
|
<p class="text-sm text-gray-500">Créditer le compte mobilité du conducteur</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form method="POST" action="/app/wallets/{{.ViewState.driver.ID}}/credit" class="my-4">
|
||||||
|
<div class="my-8">
|
||||||
|
<input type="number" step="0.01" id="amount" name="amount" value="0"
|
||||||
|
class="w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-2 p-1 sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 sm:mt-6">
|
||||||
|
<button type="submit" class="inline-flex w-full justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:text-sm">Ajouter</button>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 sm:mt-6">
|
||||||
|
<button @click="walletdialog=false" type="button" class="inline-flex w-full justify-center max-w-xs bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Wallet Operations History -->
|
||||||
|
{{if .ViewState.driver.Data.wallet_history}}
|
||||||
|
<div class="py-5">
|
||||||
|
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des opérations</h4>
|
||||||
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
|
<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">Date</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Crédit</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Débit</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Moyen de paiement</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
<!-- Initial Balance Row -->
|
||||||
|
<tr class="bg-gray-50">
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm text-gray-500 italic sm:pl-6">
|
||||||
|
Solde initial
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
||||||
|
{{if .ViewState.driver.Data.wallet}}{{ printf "%.2f" .ViewState.driver.Data.wallet }} €{{else}}0.00 €{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
||||||
|
-
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
||||||
|
-
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
||||||
|
-
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{range $index, $operation := .ViewState.driver.Data.wallet_history}}
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if $operation.timestamp}}{{timeFormat $operation.timestamp "02/01/2006 15:04"}}{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-green-600 sm:pl-6">
|
||||||
|
{{if $operation.amount}}
|
||||||
|
{{if or (eq $operation.operation_type "credit") (not $operation.operation_type)}}
|
||||||
|
{{ printf "%.2f" $operation.amount }} €
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-red-600 sm:pl-6">
|
||||||
|
{{if eq $operation.operation_type "debit"}}
|
||||||
|
{{ printf "%.2f" $operation.amount }} €
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{$operation.payment_method}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{$operation.description}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="py-5">
|
||||||
|
<p class="text-sm text-gray-500 text-center">Aucune opération enregistrée</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
@@ -1,24 +1,59 @@
|
|||||||
|
|
||||||
{{ define "carpool_drivers_list" }}
|
{{ define "carpool_drivers_list" }}
|
||||||
<div class="sm:flex sm:items-center">
|
|
||||||
|
<div class="sm:flex sm:items-center sm:justify-between">
|
||||||
|
{{if $.ViewState.geography_filters_enabled}}
|
||||||
|
<form class="flex flex-row items-end m-4">
|
||||||
|
<input type="hidden" name="tab" value="drivers" />
|
||||||
|
{{if $.ViewState.archived}}<input type="hidden" name="archived" value="true" />{{end}}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="drivers_driver_address_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Adresse conducteur</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="drivers_driver_address_geo" name="driver_address_geo" class="col-start-1 row-start-1 w-48 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.ViewState.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.ViewState.filters.driver_address_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{{else}}
|
||||||
<div class="sm:flex-auto">
|
<div class="sm:flex-auto">
|
||||||
<p class="mt-2 text-sm text-gray-700"></p>
|
<p class="mt-2 text-sm text-gray-700"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-4 sm:ml-16 sm:flex-none">
|
{{end}}
|
||||||
<!--<a href="/api/cache/{{.ViewState.CacheId}}/export">
|
|
||||||
|
<div class="m-4 sm:flex-none">
|
||||||
|
<a href="/exports/organized-carpool/drivers.xlsx?{{if $.ViewState.archived}}archived=true&{{end}}{{if $.ViewState.filters.driver_address_geo}}driver_address_geo={{$.ViewState.filters.driver_address_geo}}{{end}}">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
||||||
Exporter
|
Exporter
|
||||||
</button>
|
</button>
|
||||||
</a>-->
|
</a>
|
||||||
<a href="/app/organized-carpool/?archived=true">
|
{{if .ViewState.archived}}
|
||||||
|
<a href="/app/organized-carpool/?tab=drivers">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
{{$.IconSet.Icon "hero:outline/archive-box-x-mark" "h-5 w-5 mr-3"}}
|
||||||
|
Covoitureurs actifs
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
<a href="/app/organized-carpool/?tab=drivers&archived=true">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{$.IconSet.Icon "hero:outline/archive-box" "h-5 w-5 mr-3"}}
|
{{$.IconSet.Icon "hero:outline/archive-box" "h-5 w-5 mr-3"}}
|
||||||
Covoitureurs archivés
|
Covoitureurs archivés
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
<a href="/app/organized-carpool/drivers/create">
|
<a href="/app/organized-carpool/drivers/create">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
||||||
@@ -28,6 +63,39 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div x-data="{
|
||||||
|
drivers: [
|
||||||
|
{{range $index, $driver := .ViewState.drivers}}{{if $index}},{{end}}{
|
||||||
|
id: '{{$driver.ID}}',
|
||||||
|
firstName: '{{ jsEscape $driver.Data.first_name }}',
|
||||||
|
lastName: '{{ jsEscape $driver.Data.last_name }}',
|
||||||
|
address: '{{if $driver.Data.address}}{{ jsEscape $driver.Data.address.properties.label }}{{end}}',
|
||||||
|
addressDestination: '{{if $driver.Data.address_destination}}{{ jsEscape $driver.Data.address_destination.properties.label }}{{end}}',
|
||||||
|
phoneNumber: '{{ jsEscape $driver.Data.phone_number }}',
|
||||||
|
validated: {{if carpoolDriverValidatedProfile $driver (carpoolDocuments $driver.ID)}}true{{else}}false{{end}}
|
||||||
|
}{{end}}
|
||||||
|
],
|
||||||
|
currentPage: 1,
|
||||||
|
itemsPerPage: {{ if .ViewState.drivers_items_per_page }}{{ .ViewState.drivers_items_per_page }}{{ else }}10{{ end }},
|
||||||
|
get totalPages() {
|
||||||
|
return Math.ceil(this.drivers.length / this.itemsPerPage);
|
||||||
|
},
|
||||||
|
get paginatedDrivers() {
|
||||||
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
||||||
|
const end = start + this.itemsPerPage;
|
||||||
|
return this.drivers.slice(start, end);
|
||||||
|
},
|
||||||
|
nextPage() {
|
||||||
|
if (this.currentPage < this.totalPages) this.currentPage++;
|
||||||
|
},
|
||||||
|
prevPage() {
|
||||||
|
if (this.currentPage > 1) this.currentPage--;
|
||||||
|
},
|
||||||
|
goToPage(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -58,27 +126,76 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{ range .ViewState.drivers }}
|
<template x-for="driver in paginatedDrivers" :key="driver.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.first_name }} {{ .Data.last_name }}</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.firstName + ' ' + driver.lastName"></td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.address"></td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if .Data.address_destination}}{{.Data.address_destination.properties.label}}{{end}}</td>
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.addressDestination"></td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.phone_number }}</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.phoneNumber"></td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{if carpoolDriverValidatedProfile . (carpoolDocuments .ID) }}
|
<span x-show="driver.validated" class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
||||||
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
<span x-show="!driver.validated" class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
||||||
{{else}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue hover:text-co-blue"
|
<a class="text-co-blue hover:text-co-blue" :href="'/app/organized-carpool/drivers/' + driver.id">
|
||||||
href="/app/organized-carpool/drivers/{{.ID}}">
|
|
||||||
Voir
|
Voir
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- Pagination -->
|
||||||
|
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
||||||
|
<div class="flex flex-1 justify-between sm:hidden">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Précédent
|
||||||
|
</button>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Suivant
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Affichage de
|
||||||
|
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
||||||
|
Ă
|
||||||
|
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, drivers.length)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="drivers.length"></span>
|
||||||
|
résultats
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Précédent</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<template x-for="page in totalPages" :key="page">
|
||||||
|
<button @click="goToPage(page)"
|
||||||
|
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
||||||
|
x-text="page"></button>
|
||||||
|
</template>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Suivant</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -134,6 +134,14 @@
|
|||||||
{{ timeFormat .ViewState.booking.PassengerPickupDate.AsTime "02/01/2006 15:04" }}
|
{{ timeFormat .ViewState.booking.PassengerPickupDate.AsTime "02/01/2006 15:04" }}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
{{if .ViewState.booking.Distance}}
|
||||||
|
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||||
|
<dt class="text-sm font-medium text-gray-500">Distance</dt>
|
||||||
|
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||||
|
{{ .ViewState.booking.Distance }} km
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||||
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section aria-labelledby="functionalities-title" x-data="{
|
<section aria-labelledby="functionalities-title" x-data="{
|
||||||
tab: 'documents',
|
tab: '{{ if .ViewState.tab }}{{ .ViewState.tab }}{{ else }}documents{{ end }}',
|
||||||
to(event) {
|
to(event) {
|
||||||
this.tab = event.target.value
|
this.tab = event.target.value
|
||||||
}
|
}
|
||||||
@@ -118,6 +118,10 @@
|
|||||||
<option value="events">Dispositifs</option> -->
|
<option value="events">Dispositifs</option> -->
|
||||||
|
|
||||||
<option value="documents">Documents</option>
|
<option value="documents">Documents</option>
|
||||||
|
|
||||||
|
<option value="wallet">Compte mobilité</option>
|
||||||
|
|
||||||
|
<option value="history">Covoiturage solidaire</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
@@ -134,12 +138,24 @@
|
|||||||
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Documents </a>
|
Documents </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'wallet'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'wallet' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Compte mobilité </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'history'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'history' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Covoiturage solidaire </a>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="tab == 'documents'">{{template "driver_files" .}}</div>
|
<div x-show="tab == 'documents'">{{template "driver_files" .}}</div>
|
||||||
|
<div x-show="tab == 'wallet'">{{template "organized_carpool_driver_wallet" .}}</div>
|
||||||
|
<div x-show="tab == 'history'">{{template "organized_carpool_driver_history" .}}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="divide-y divide-gray-200">
|
<div class="divide-y divide-gray-200">
|
||||||
<div>
|
<div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
<div class="border-b border-gray-200 pl-4">
|
<div class="border-b border-gray-200 pl-4 flex justify-between items-center">
|
||||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||||
<a href="#" @click="tab = 'carpoolService'"
|
<a href="#" @click="tab = 'carpoolService'"
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
@@ -29,6 +29,27 @@
|
|||||||
:class="tab == 'carpoolHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'carpoolHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Trajets passés </a>
|
Trajets passés </a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<div class="pr-4" x-show="tab == 'carpoolHistory'">
|
||||||
|
{{$exportURL := "/exports/organized-carpool/bookings.xlsx"}}
|
||||||
|
{{$hasParams := false}}
|
||||||
|
{{if .ViewState.hist_filters.date_start}}{{$exportURL = printf "%s?start_date=%s" $exportURL .ViewState.hist_filters.date_start}}{{$hasParams = true}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.date_end}}{{if $hasParams}}{{$exportURL = printf "%s&end_date=%s" $exportURL .ViewState.hist_filters.date_end}}{{else}}{{$exportURL = printf "%s?end_date=%s" $exportURL .ViewState.hist_filters.date_end}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.status}}{{if $hasParams}}{{$exportURL = printf "%s&status=%s" $exportURL .ViewState.hist_filters.status}}{{else}}{{$exportURL = printf "%s?status=%s" $exportURL .ViewState.hist_filters.status}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.departure_geo}}{{if $hasParams}}{{$exportURL = printf "%s&departure_geo=%s" $exportURL .ViewState.hist_filters.departure_geo}}{{else}}{{$exportURL = printf "%s?departure_geo=%s" $exportURL .ViewState.hist_filters.departure_geo}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.destination_geo}}{{if $hasParams}}{{$exportURL = printf "%s&destination_geo=%s" $exportURL .ViewState.hist_filters.destination_geo}}{{else}}{{$exportURL = printf "%s?destination_geo=%s" $exportURL .ViewState.hist_filters.destination_geo}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.passenger_address_geo}}{{if $hasParams}}{{$exportURL = printf "%s&passenger_address_geo=%s" $exportURL .ViewState.hist_filters.passenger_address_geo}}{{else}}{{$exportURL = printf "%s?passenger_address_geo=%s" $exportURL .ViewState.hist_filters.passenger_address_geo}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
|
||||||
|
<a href="{{$exportURL}}">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||||
|
</svg>
|
||||||
|
Exporter
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
<input type="hidden" name="tab" value="{{$tab}}" />
|
<input type="hidden" name="tab" value="{{$tab}}" />
|
||||||
|
|
||||||
<div class="flex flex-row justify-end flex-wrap">
|
<div class="flex flex-row justify-end items-end">
|
||||||
|
|
||||||
<div class="m-4">
|
<div class="m-2">
|
||||||
<div>
|
<div>
|
||||||
<label for="{{$tab}}_date_start" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Dates (début / fin)</label>
|
<label for="{{$tab}}_date_start" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Dates (début / fin)</label>
|
||||||
<div class="mt-2 flex">
|
<div class="mt-2 flex">
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="m-4">
|
<div class="m-2">
|
||||||
<label for="{{$tab}}_status" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Statut</label>
|
<label for="{{$tab}}_status" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Statut</label>
|
||||||
<div class="mt-2 grid grid-cols-1">
|
<div class="mt-2 grid grid-cols-1">
|
||||||
<select id="{{$tab}}_status" name="status" class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
<select id="{{$tab}}_status" name="status" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
<option></option>
|
<option></option>
|
||||||
<option value="VALIDATED"{{if eq .filters.status "VALIDATED"}} selected{{end}}>Validé</option>
|
<option value="VALIDATED"{{if eq .filters.status "VALIDATED"}} selected{{end}}>Validé</option>
|
||||||
<option value="CANCELLED"{{if eq .filters.status "CANCELLED"}} selected{{end}}>Annulé</option>
|
<option value="CANCELLED"{{if eq .filters.status "CANCELLED"}} selected{{end}}>Annulé</option>
|
||||||
@@ -33,9 +33,58 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="m-4">
|
{{if $.geography_filters_enabled}}
|
||||||
|
<div class="m-2">
|
||||||
|
<label for="{{$tab}}_passenger_address_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Adresse passager</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="{{$tab}}_passenger_address_geo" name="passenger_address_geo" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.filters.passenger_address_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if $.geography_filters_enabled}}
|
||||||
|
<div class="m-2">
|
||||||
|
<label for="{{$tab}}_departure_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Départ</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="{{$tab}}_departure_geo" name="departure_geo" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.filters.departure_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="m-2">
|
||||||
|
<label for="{{$tab}}_destination_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Destination</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="{{$tab}}_destination_geo" name="destination_geo" class="col-start-1 row-start-1 w-36 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.filters.destination_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,90 +1,161 @@
|
|||||||
|
|
||||||
{{ define "solidarity_bookings_history" }}
|
{{ define "solidarity_bookings_history" }}
|
||||||
{{template "booking_filters" dict "tab" "solidarityHistory" "filters" .ViewState.hist_filters }}
|
{{template "booking_filters" dict "tab" "solidarityHistory" "filters" .ViewState.hist_filters "geography_filters_enabled" .ViewState.geography_filters_enabled "geography_filters_list" .ViewState.geography_filters_list }}
|
||||||
{{if eq (len .ViewState.bookings_history) 0}}
|
{{if eq (len .ViewState.bookings_history) 0}}
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
|
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{$inrange := false}}
|
||||||
|
|
||||||
|
<div x-data="{
|
||||||
|
bookings: [
|
||||||
|
{{range .ViewState.bookings_history}}{{if $inrange}},{{end}}{{$inrange = true}}{{$driver := index $.ViewState.drivers_map .DriverId}}{{$passenger := index $.ViewState.passengers_map .PassengerId}}{
|
||||||
|
id: '{{.Id}}',
|
||||||
|
driverId: '{{.DriverId}}',
|
||||||
|
driverFirstName: '{{if $driver.ID}}{{ jsEscape $driver.Data.first_name }}{{end}}',
|
||||||
|
driverLastName: '{{if $driver.ID}}{{ jsEscape $driver.Data.last_name }}{{end}}',
|
||||||
|
passengerId: '{{.PassengerId}}',
|
||||||
|
passengerFirstName: '{{if $passenger.Data}}{{ jsEscape $passenger.Data.first_name }}{{end}}',
|
||||||
|
passengerLastName: '{{if $passenger.Data}}{{ jsEscape $passenger.Data.last_name }}{{end}}',
|
||||||
|
pickupLabel: '{{if .Journey}}{{ jsEscape .Journey.PassengerPickup.Properties.label }}{{end}}',
|
||||||
|
dropLabel: '{{if .Journey}}{{ jsEscape .Journey.PassengerDrop.Properties.label }}{{end}}',
|
||||||
|
pickupDate: '{{if .Journey}}{{ timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04" }}{{end}}',
|
||||||
|
status: '{{.Status}}',
|
||||||
|
price: '{{if .Journey}}{{ printf "%.2f" (round2 .Journey.Price.Amount) }}{{end}}',
|
||||||
|
currency: '{{if .Journey}}{{.Journey.Price.Currency}}{{end}}',
|
||||||
|
motivation: {{ if .Data.motivation }}'{{ jsEscape .Data.motivation }}'{{ else }}''{{ end }},
|
||||||
|
replacedBy: {{ if .Data.replaced_by }}'{{ .Data.replaced_by }}'{{ else }}''{{ end }}
|
||||||
|
}{{end}}
|
||||||
|
],
|
||||||
|
currentPage: 1,
|
||||||
|
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
||||||
|
get totalPages() {
|
||||||
|
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
||||||
|
},
|
||||||
|
get paginatedBookings() {
|
||||||
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
||||||
|
const end = start + this.itemsPerPage;
|
||||||
|
return this.bookings.slice(start, end);
|
||||||
|
},
|
||||||
|
nextPage() {
|
||||||
|
if (this.currentPage < this.totalPages) this.currentPage++;
|
||||||
|
},
|
||||||
|
prevPage() {
|
||||||
|
if (this.currentPage > 1) this.currentPage--;
|
||||||
|
},
|
||||||
|
goToPage(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
},
|
||||||
|
getStatusBadge(status) {
|
||||||
|
if (status === 'WAITING_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
||||||
|
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
||||||
|
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
||||||
|
return { class: '', text: '' };
|
||||||
|
},
|
||||||
|
guaranteedMotivations: {{ json .ViewState.guaranteed_trip_motivations }},
|
||||||
|
isGuaranteedTrip(motivation) {
|
||||||
|
return this.guaranteedMotivations.includes(motivation);
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Passager</th>
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Conducteur</th>
|
||||||
Conducteur
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Départ</th>
|
||||||
</th>
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Destination</th>
|
||||||
<th scope="col"
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Date</th>
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Statut</th>
|
||||||
Passager
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Prix</th>
|
||||||
</th>
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"> </th>
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Départ
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Destination
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Date
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Statut
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Prix
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{range .ViewState.bookings_history}}
|
<template x-for="booking in paginatedBookings" :key="booking.id">
|
||||||
<tr>
|
<tr :class="booking.replacedBy ? 'bg-gray-200' : ''">
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{.DriverId}}">
|
<a class="text-co-blue" :href="'/app/beneficiaries/' + booking.passengerId">
|
||||||
{{ (index $.ViewState.drivers_map .DriverId).Data.first_name }}
|
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
||||||
{{ (index $.ViewState.drivers_map .DriverId).Data.last_name }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
|
|
||||||
{{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }}
|
|
||||||
{{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ .Journey.PassengerPickup.Properties.label }}
|
<a class="text-co-blue" :href="'/app/solidarity-transport/drivers/' + booking.driverId">
|
||||||
</td>
|
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ .Journey.PassengerDrop.Properties.label }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ .Journey.PassengerPickupDate.Format "02/01/2006 15:04" }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ if eq .Status "WAITING_CONFIRMATION"}}
|
|
||||||
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation</span>
|
|
||||||
{{ else if eq .Status "VALIDATED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-green rounded-xl">Validé</span>
|
|
||||||
{{ else if eq .Status "CANCELLED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
|
|
||||||
{{ end }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ printf "%.2f" (round2 .Journey.Price.Amount) }} {{ .Journey.Price.Currency }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a class="text-co-blue" href="/app/solidarity-transport/bookings/{{.Id}}">
|
|
||||||
Voir
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupLabel"></td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropLabel"></td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
||||||
|
<template x-if="booking.motivation && isGuaranteedTrip(booking.motivation)">
|
||||||
|
<div class="mt-4">
|
||||||
|
<span class="text-xs p-2 bg-co-green text-white rounded-2xl" x-text="'Trajet garanti : ' + booking.motivation"></span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<span x-text="booking.price + ' ' + booking.currency"></span>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a class="text-co-blue" :href="'/app/solidarity-transport/bookings/' + booking.id">Voir</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- Pagination -->
|
||||||
|
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
||||||
|
<div class="flex flex-1 justify-between sm:hidden">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Précédent
|
||||||
|
</button>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Suivant
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Affichage de
|
||||||
|
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
||||||
|
Ă
|
||||||
|
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="bookings.length"></span>
|
||||||
|
résultats
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Précédent</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<template x-for="page in totalPages" :key="page">
|
||||||
|
<button @click="goToPage(page)"
|
||||||
|
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
||||||
|
x-text="page"></button>
|
||||||
|
</template>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Suivant</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,85 +1,155 @@
|
|||||||
|
|
||||||
{{ define "solidarity_bookings_list" }}
|
{{ define "solidarity_bookings_list" }}
|
||||||
{{template "booking_filters" dict "tab" "solidarityService" "filters" .ViewState.filters }}
|
{{template "booking_filters" dict "tab" "solidarityService" "filters" .ViewState.filters "geography_filters_enabled" .ViewState.geography_filters_enabled "geography_filters_list" .ViewState.geography_filters_list }}
|
||||||
|
|
||||||
{{if eq (len .ViewState.bookings) 0}}
|
{{if eq (len .ViewState.bookings) 0}}
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{$inrange := false}}
|
||||||
|
|
||||||
|
<div x-data="{
|
||||||
|
bookings: [
|
||||||
|
{{range .ViewState.bookings}}{{if $inrange}},{{end}}{{$inrange = true}}{{$driver := index $.ViewState.drivers_map .DriverId}}{{$passenger := index $.ViewState.passengers_map .PassengerId}}{
|
||||||
|
id: '{{.Id}}',
|
||||||
|
driverId: '{{.DriverId}}',
|
||||||
|
driverFirstName: '{{if $driver.Data.first_name}}{{ jsEscape $driver.Data.first_name }}{{end}}',
|
||||||
|
driverLastName: '{{if $driver.Data.last_name}}{{ jsEscape $driver.Data.last_name }}{{end}}',
|
||||||
|
passengerId: '{{ .PassengerId }}',
|
||||||
|
passengerFirstName: '{{if $passenger.Data.first_name}}{{ jsEscape $passenger.Data.first_name }}{{end}}',
|
||||||
|
passengerLastName: '{{if $passenger.Data.last_name}}{{ jsEscape $passenger.Data.last_name }}{{end}}',
|
||||||
|
pickupLabel: '{{if .Journey}}{{ jsEscape .Journey.PassengerPickup.Properties.label }}{{end}}',
|
||||||
|
dropLabel: '{{if .Journey}}{{ jsEscape .Journey.PassengerDrop.Properties.label }}{{end}}',
|
||||||
|
pickupDate: '{{if .Journey}}{{ timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04" }}{{end}}',
|
||||||
|
status: '{{.Status}}',
|
||||||
|
motivation: {{ if .Data.motivation }}'{{ jsEscape .Data.motivation }}'{{ else }}''{{ end }}
|
||||||
|
}{{end}}
|
||||||
|
],
|
||||||
|
currentPage: 1,
|
||||||
|
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
||||||
|
get totalPages() {
|
||||||
|
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
||||||
|
},
|
||||||
|
get paginatedBookings() {
|
||||||
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
||||||
|
const end = start + this.itemsPerPage;
|
||||||
|
return this.bookings.slice(start, end);
|
||||||
|
},
|
||||||
|
nextPage() {
|
||||||
|
if (this.currentPage < this.totalPages) this.currentPage++;
|
||||||
|
},
|
||||||
|
prevPage() {
|
||||||
|
if (this.currentPage > 1) this.currentPage--;
|
||||||
|
},
|
||||||
|
goToPage(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
},
|
||||||
|
getStatusBadge(status) {
|
||||||
|
if (status === 'WAITING_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
||||||
|
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
||||||
|
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
||||||
|
return { class: '', text: '' };
|
||||||
|
},
|
||||||
|
guaranteedMotivations: {{ json .ViewState.guaranteed_trip_motivations }},
|
||||||
|
isGuaranteedTrip(motivation) {
|
||||||
|
return this.guaranteedMotivations.includes(motivation);
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Passager</th>
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Conducteur</th>
|
||||||
Conducteur
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Départ</th>
|
||||||
</th>
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Destination</th>
|
||||||
<th scope="col"
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Date</th>
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Statut</th>
|
||||||
Passager
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"> </th>
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Départ
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Destination
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Date
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Statut
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{range .ViewState.bookings}}
|
<template x-for="booking in paginatedBookings" :key="booking.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{.DriverId}}">
|
<a class="text-co-blue" :href="'/app/beneficiaries/' + booking.passengerId">
|
||||||
{{ (index $.ViewState.drivers_map .DriverId).Data.first_name }}
|
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
||||||
{{ (index $.ViewState.drivers_map .DriverId).Data.last_name }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
|
|
||||||
{{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }}
|
|
||||||
{{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ .Journey.PassengerPickup.Properties.label }}
|
<a class="text-co-blue" :href="'/app/solidarity-transport/drivers/' + booking.driverId">
|
||||||
</td>
|
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ .Journey.PassengerDrop.Properties.label }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04" }}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{ if eq .Status "WAITING_CONFIRMATION"}}
|
|
||||||
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation</span>
|
|
||||||
{{ else if eq .Status "VALIDATED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-green rounded-xl">Validé</span>
|
|
||||||
{{ else if eq .Status "CANCELLED"}}
|
|
||||||
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
|
|
||||||
{{ end }}
|
|
||||||
{{if and .Data.motivation (or (or (eq .Data.motivation "Santé") (eq .Data.motivation "Insertion")) (eq .Data.motivation "Administratif"))}}<div class="mt-4"><span class="text-xs p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.Data.motivation}}</span></div>{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<a class="text-co-blue" href="/app/solidarity-transport/bookings/{{.Id}}">
|
|
||||||
Voir
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupLabel"></td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropLabel"></td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
||||||
|
<template x-if="booking.motivation && isGuaranteedTrip(booking.motivation)">
|
||||||
|
<div class="mt-4">
|
||||||
|
<span class="text-xs p-2 bg-co-green text-white rounded-2xl" x-text="'Trajet garanti : ' + booking.motivation"></span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a class="text-co-blue" :href="'/app/solidarity-transport/bookings/' + booking.id">Voir</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- Pagination -->
|
||||||
|
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
||||||
|
<div class="flex flex-1 justify-between sm:hidden">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Précédent
|
||||||
|
</button>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Suivant
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Affichage de
|
||||||
|
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
||||||
|
Ă
|
||||||
|
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="bookings.length"></span>
|
||||||
|
résultats
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Précédent</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<template x-for="page in totalPages" :key="page">
|
||||||
|
<button @click="goToPage(page)"
|
||||||
|
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
||||||
|
x-text="page"></button>
|
||||||
|
</template>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Suivant</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -66,9 +66,20 @@ x-data="{
|
|||||||
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
||||||
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
||||||
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
||||||
|
<div class="flex gap-2 justify-end">
|
||||||
<a href="/app/solidarity-transport/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}" target="_blank">
|
<a href="/app/solidarity-transport/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}" target="_blank">
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Télécharger<span class="sr-only"> le document</span></button>
|
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-4 w-4 mr-1"}}
|
||||||
|
Télécharger<span class="sr-only"> le document</span>
|
||||||
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
<button type="button"
|
||||||
|
onclick="if(confirm('Êtes-vous sûr de vouloir supprimer ce document ?')) { window.location.href='/app/solidarity-transport/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}/delete'; }"
|
||||||
|
class="inline-flex items-center rounded-md border border-transparent bg-co-red px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-co-red focus:ring-offset-2">
|
||||||
|
{{$.IconSet.Icon "hero:outline/trash" "h-4 w-4 mr-1"}}
|
||||||
|
Supprimer<span class="sr-only"> le document</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,7 +1,69 @@
|
|||||||
{{define "driver_history"}}
|
{{define "driver_history"}}
|
||||||
<div class="px-4 py-6 sm:px-6 text-center">
|
<div class="py-6">
|
||||||
<p class="text-center text-lg">Trajets réalisés : {{ .ViewState.stats.bookings.count }}</p>
|
{{if .ViewState.stats}}
|
||||||
<p class="text-center text-lg">Kilomètres réalisés : {{ .ViewState.stats.bookings.km}} km</p>
|
<div class="py-5 text-center">
|
||||||
|
<p class="text-lg">Trajets réalisés : {{ .ViewState.stats.bookings.count }}</p>
|
||||||
|
<p class="text-lg">Kilomètres réalisés : {{ .ViewState.stats.bookings.km}} km</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if .ViewState.bookings}}
|
||||||
|
<div class="py-5">
|
||||||
|
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des transports solidaires</h4>
|
||||||
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
|
<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">Date</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Passager</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Départ</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Arrivée</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Statut</th>
|
||||||
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{range .ViewState.bookings}}
|
||||||
|
{{if or (eq .Status "VALIDATED") (eq .Status "WAITING_CONFIRMATION")}}
|
||||||
|
<tr>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Journey}}
|
||||||
|
{{timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04"}}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .PassengerId}}
|
||||||
|
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
|
||||||
|
{{ (index $.ViewState.beneficiaries_map .PassengerId).Data.first_name }}
|
||||||
|
{{ (index $.ViewState.beneficiaries_map .PassengerId).Data.last_name }}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Journey}}{{if .Journey.PassengerPickup}}{{.Journey.PassengerPickup.Properties.label}}{{end}}{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Journey}}{{if .Journey.PassengerDrop}}{{.Journey.PassengerDrop.Properties.label}}{{end}}{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if eq .Status "VALIDATED"}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Validé</span>
|
||||||
|
{{else if eq .Status "WAITING_CONFIRMATION"}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-gray-300 rounded-2xl">Attente confirmation</span>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a class="text-co-blue" href="/app/solidarity-transport/bookings/{{.Id}}">Voir</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="py-5">
|
||||||
|
<p class="text-sm text-gray-500 text-center">Aucun transport solidaire enregistré</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,23 +1,58 @@
|
|||||||
{{ define "solidarity_drivers_list" }}
|
{{ define "solidarity_drivers_list" }}
|
||||||
<div class="sm:flex sm:items-center">
|
|
||||||
|
<div class="sm:flex sm:items-center sm:justify-between">
|
||||||
|
{{if $.ViewState.geography_filters_enabled}}
|
||||||
|
<form class="flex flex-row items-end m-4">
|
||||||
|
<input type="hidden" name="tab" value="drivers" />
|
||||||
|
{{if $.ViewState.archived}}<input type="hidden" name="archived" value="true" />{{end}}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="drivers_driver_address_geo" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Adresse conducteur</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="drivers_driver_address_geo" name="driver_address_geo" class="col-start-1 row-start-1 w-48 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option value="">Toutes les zones</option>
|
||||||
|
{{range $.ViewState.geography_filters_list}}
|
||||||
|
{{$geoValue := printf "%s:%s" .layer .code}}
|
||||||
|
<option value="{{$geoValue}}"{{if eq $.ViewState.filters.driver_address_geo $geoValue}} selected{{end}}>{{.name}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{{else}}
|
||||||
<div class="sm:flex-auto">
|
<div class="sm:flex-auto">
|
||||||
<p class="mt-2 text-sm text-gray-700"></p>
|
<p class="mt-2 text-sm text-gray-700"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-4 sm:ml-16 sm:flex-none">
|
{{end}}
|
||||||
<!--<a href="/api/cache/{{.ViewState.CacheId}}/export">
|
|
||||||
|
<div class="m-4 sm:flex-none">
|
||||||
|
<a href="/exports/solidarity-transport/drivers.xlsx?{{if $.ViewState.archived}}archived=true&{{end}}{{if $.ViewState.filters.driver_address_geo}}driver_address_geo={{$.ViewState.filters.driver_address_geo}}{{end}}">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
||||||
Exporter
|
Exporter
|
||||||
</button>
|
</button>
|
||||||
</a>-->
|
</a>
|
||||||
<a href="/app/solidarity-transport/?archived=true">
|
{{if .ViewState.archived}}
|
||||||
|
<a href="/app/solidarity-transport/?tab=drivers">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
{{$.IconSet.Icon "hero:outline/archive-box-x-mark" "h-5 w-5 mr-3"}}
|
||||||
|
Conducteurs actifs
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
<a href="/app/solidarity-transport/?tab=drivers&archived=true">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{$.IconSet.Icon "hero:outline/archive-box" "h-5 w-5 mr-3"}}
|
{{$.IconSet.Icon "hero:outline/archive-box" "h-5 w-5 mr-3"}}
|
||||||
Conducteurs archivés
|
Conducteurs archivés
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
<a href="/app/solidarity-transport/drivers/create">
|
<a href="/app/solidarity-transport/drivers/create">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
||||||
@@ -27,6 +62,38 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div x-data="{
|
||||||
|
drivers: [
|
||||||
|
{{range $index, $driver := .ViewState.drivers}}{{if $index}},{{end}}{
|
||||||
|
id: '{{$driver.ID}}',
|
||||||
|
firstName: '{{ jsEscape $driver.Data.first_name }}',
|
||||||
|
lastName: '{{ jsEscape $driver.Data.last_name }}',
|
||||||
|
address: '{{if $driver.Data.address}}{{ jsEscape $driver.Data.address.properties.label }}{{end}}',
|
||||||
|
phoneNumber: '{{ jsEscape $driver.Data.phone_number }}',
|
||||||
|
validated: {{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID)}}true{{else}}false{{end}}
|
||||||
|
}{{end}}
|
||||||
|
],
|
||||||
|
currentPage: 1,
|
||||||
|
itemsPerPage: {{ if .ViewState.drivers_items_per_page }}{{ .ViewState.drivers_items_per_page }}{{ else }}10{{ end }},
|
||||||
|
get totalPages() {
|
||||||
|
return Math.ceil(this.drivers.length / this.itemsPerPage);
|
||||||
|
},
|
||||||
|
get paginatedDrivers() {
|
||||||
|
const start = (this.currentPage - 1) * this.itemsPerPage;
|
||||||
|
const end = start + this.itemsPerPage;
|
||||||
|
return this.drivers.slice(start, end);
|
||||||
|
},
|
||||||
|
nextPage() {
|
||||||
|
if (this.currentPage < this.totalPages) this.currentPage++;
|
||||||
|
},
|
||||||
|
prevPage() {
|
||||||
|
if (this.currentPage > 1) this.currentPage--;
|
||||||
|
},
|
||||||
|
goToPage(page) {
|
||||||
|
this.currentPage = page;
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -53,26 +120,75 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{ range .ViewState.drivers }}
|
<template x-for="driver in paginatedDrivers" :key="driver.id">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.first_name }} {{ .Data.last_name }}</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.firstName + ' ' + driver.lastName"></td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.address"></td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.phone_number }}</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.phoneNumber"></td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{if solidarityDriverValidatedProfile . (solidarityDocuments .ID) }}
|
<span x-show="driver.validated" class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
||||||
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
<span x-show="!driver.validated" class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
||||||
{{else}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue hover:text-co-blue"
|
<a class="text-co-blue hover:text-co-blue" :href="'/app/solidarity-transport/drivers/' + driver.id">
|
||||||
href="/app/solidarity-transport/drivers/{{.ID}}">
|
|
||||||
Voir
|
Voir
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
</template>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- Pagination -->
|
||||||
|
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
||||||
|
<div class="flex flex-1 justify-between sm:hidden">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Précédent
|
||||||
|
</button>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
Suivant
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Affichage de
|
||||||
|
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
||||||
|
Ă
|
||||||
|
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, drivers.length)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="drivers.length"></span>
|
||||||
|
résultats
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
||||||
|
<button @click="prevPage()" :disabled="currentPage === 1"
|
||||||
|
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Précédent</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<template x-for="page in totalPages" :key="page">
|
||||||
|
<button @click="goToPage(page)"
|
||||||
|
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
||||||
|
x-text="page"></button>
|
||||||
|
</template>
|
||||||
|
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
||||||
|
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
|
<span class="sr-only">Suivant</span>
|
||||||
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -17,21 +17,6 @@
|
|||||||
{{ json .driver_journey.DriverArrival }}
|
{{ json .driver_journey.DriverArrival }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
const driverGeojsonPoints = {
|
|
||||||
"type": "FeatureCollection",
|
|
||||||
"features": [
|
|
||||||
{{ json .driver_journey.DriverDeparture }},
|
|
||||||
{{ json .driver_journey.DriverArrival }}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
const passengerGeojsonPoints = {
|
|
||||||
"type": "FeatureCollection",
|
|
||||||
"features": [
|
|
||||||
{{ json .driver_journey.PassengerPickup }},
|
|
||||||
{{ json .driver_journey.PassengerDrop }},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
map.on('load', async () => {
|
map.on('load', async () => {
|
||||||
{{if .driver_journey.JourneyPolyline}}
|
{{if .driver_journey.JourneyPolyline}}
|
||||||
@@ -49,37 +34,62 @@
|
|||||||
'line-cap': 'round',
|
'line-cap': 'round',
|
||||||
},
|
},
|
||||||
'paint': {
|
'paint': {
|
||||||
'line-color': '#243887',
|
'line-color': getComputedStyle(document.documentElement).getPropertyValue('--color-co-blue').trim(),
|
||||||
'line-width': 3
|
'line-width': 4
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
map.addSource('driver_points', {
|
// Driver departure marker
|
||||||
type: "geojson",
|
const driverDepartureEl = document.createElement('div');
|
||||||
data: driverGeojsonPoints
|
driverDepartureEl.className = 'w-8 h-8 rounded-co bg-co-blue border border-white shadow-md flex items-center justify-center';
|
||||||
})
|
driverDepartureEl.innerHTML = `
|
||||||
map.addLayer({
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
'id': 'driver_points',
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
'type': 'circle',
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
'source': 'driver_points',
|
</svg>
|
||||||
'paint': {
|
`;
|
||||||
'circle-color': '#000'
|
new maplibregl.Marker({element: driverDepartureEl})
|
||||||
},
|
.setLngLat({{ json .driver_journey.DriverDeparture }}.geometry.coordinates)
|
||||||
});
|
.addTo(map);
|
||||||
map.addSource('passenger_points', {
|
|
||||||
type: "geojson",
|
// Driver arrival marker
|
||||||
data: passengerGeojsonPoints
|
const driverArrivalEl = document.createElement('div');
|
||||||
})
|
driverArrivalEl.className = 'w-8 h-8 rounded-co bg-co-blue border border-white shadow-md flex items-center justify-center';
|
||||||
map.addLayer({
|
driverArrivalEl.innerHTML = `
|
||||||
'id': 'passenger_points',
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
'type': 'circle',
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
'source': 'passenger_points',
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
'paint': {
|
</svg>
|
||||||
'circle-color': '#243887',
|
`;
|
||||||
'circle-radius': 8
|
new maplibregl.Marker({element: driverArrivalEl})
|
||||||
},
|
.setLngLat({{ json .driver_journey.DriverArrival }}.geometry.coordinates)
|
||||||
});
|
.addTo(map);
|
||||||
|
|
||||||
|
// Passenger pickup marker
|
||||||
|
const passengerPickupEl = document.createElement('div');
|
||||||
|
passengerPickupEl.className = 'w-8 h-8 rounded-co bg-co-green border border-white shadow-md flex items-center justify-center';
|
||||||
|
passengerPickupEl.innerHTML = `
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="16" height="16">
|
||||||
|
<path fill-rule="evenodd" d="M11.54 22.351l.07.04.028.016a.76.76 0 00.723 0l.028-.015.071-.041a16.975 16.975 0 001.144-.742 19.58 19.58 0 002.683-2.282c1.944-1.99 3.963-4.98 3.963-8.827a8.25 8.25 0 00-16.5 0c0 3.846 2.02 6.837 3.963 8.827a19.58 19.58 0 002.682 2.282 16.975 16.975 0 001.145.742zM12 13.5a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
`;
|
||||||
|
new maplibregl.Marker({element: passengerPickupEl})
|
||||||
|
.setLngLat({{ json .driver_journey.PassengerPickup }}.geometry.coordinates)
|
||||||
|
.addTo(map);
|
||||||
|
|
||||||
|
// Passenger drop marker
|
||||||
|
const passengerDropEl = document.createElement('div');
|
||||||
|
passengerDropEl.className = 'w-8 h-8 rounded-co bg-co-red border border-white shadow-md flex items-center justify-center';
|
||||||
|
passengerDropEl.innerHTML = `
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="16" height="16">
|
||||||
|
<path fill-rule="evenodd" d="M3 2.25a.75.75 0 01.75.75v.54l1.838-.46a9.75 9.75 0 016.725.738l.108.054a8.25 8.25 0 005.58.652l3.109-.732a.75.75 0 01.917.81 47.784 47.784 0 00.005 10.337.75.75 0 01-.574.812l-3.114.733a9.75 9.75 0 01-6.594-.77l-.108-.054a8.25 8.25 0 00-5.69-.625l-2.202.55V21a.75.75 0 01-1.5 0V3A.75.75 0 013 2.25z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
`;
|
||||||
|
new maplibregl.Marker({element: passengerDropEl})
|
||||||
|
.setLngLat({{ json .driver_journey.PassengerDrop }}.geometry.coordinates)
|
||||||
|
.addTo(map);
|
||||||
|
|
||||||
var bbox=turf.bbox(geojsonPoints)
|
var bbox=turf.bbox(geojsonPoints)
|
||||||
|
|
||||||
map.fitBounds(bbox, { padding: 50 })
|
map.fitBounds(bbox, { padding: 50 })
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Transport solidaire
|
Transport solidaire
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{{if and .ViewState.booking.Data.motivation (or (or (eq .ViewState.booking.Data.motivation "Santé") (eq .ViewState.booking.Data.motivation "Insertion")) (eq .ViewState.booking.Data.motivation "Administratif"))}}
|
{{if and .ViewState.booking.Data.motivation (isGuaranteedTripMotivation .ViewState.booking.Data.motivation)}}
|
||||||
<div class="mt-4"><span class="text-sm p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.ViewState.booking.Data.motivation}}</span></div>
|
<div class="mt-4"><span class="text-sm p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.ViewState.booking.Data.motivation}}</span></div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
@@ -17,6 +17,15 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="mt-6 flex justify-end space-x-3">
|
<div class="mt-6 flex justify-end space-x-3">
|
||||||
|
{{if .ViewState.booking.Data.replaced_by}}
|
||||||
|
<!-- Booking has been replaced, show link to replacement -->
|
||||||
|
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Data.replaced_by}}" class="inline-flex">
|
||||||
|
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
||||||
|
Remplacé par →
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
<!-- Normal action buttons -->
|
||||||
{{if eq .ViewState.booking.Status "WAITING_CONFIRMATION" }}
|
{{if eq .ViewState.booking.Status "WAITING_CONFIRMATION" }}
|
||||||
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/confirm" class="inline-flex">
|
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/confirm" class="inline-flex">
|
||||||
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
||||||
@@ -86,11 +95,129 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{if eq .ViewState.booking.Status "CANCELLED" }}
|
{{if eq .ViewState.booking.Status "CANCELLED" }}
|
||||||
<a href="/app/journeys/?departure={{json .ViewState.booking.Journey.PassengerPickup}}&destination={{ json .ViewState.booking.Journey.PassengerDrop }}&departuredate={{ .ViewState.booking.Journey.PassengerPickupDate.Format "2006-01-02"}}&departuretime={{ (timeFrom .ViewState.booking.Journey.PassengerPickupDate).Format "15:04"}}&passengerid={{.ViewState.booking.PassengerId}}&solidarity_transport_exclude_driver={{.ViewState.booking.DriverId}}" class="inline-flex">
|
{{$dialogReplace := "replace_driver"}}
|
||||||
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
<div x-data="{ {{ $dialogReplace }}: false}">
|
||||||
|
<button @click="{{ $dialogReplace }} = !{{ $dialogReplace }}" type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
||||||
Solliciter un autre conducteur
|
Solliciter un autre conducteur
|
||||||
</button>
|
</button>
|
||||||
</a>
|
|
||||||
|
<!-- Modal for replacement drivers -->
|
||||||
|
<div x-show="{{$dialogReplace}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
|
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
|
||||||
|
|
||||||
|
<div class="fixed inset-0 z-10 overflow-y-auto">
|
||||||
|
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-6">
|
||||||
|
|
||||||
|
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full max-w-6xl sm:p-6 m-4">
|
||||||
|
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
||||||
|
{{$.IconSet.Icon "hero:outline/users" "h-6 w-6"}}
|
||||||
|
</div>
|
||||||
|
<div class="mt-3 text-center sm:mt-5">
|
||||||
|
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Conducteurs disponibles</h3>
|
||||||
|
<div class="mt-2">
|
||||||
|
<p class="text-sm text-gray-500">Sélectionnez un conducteur de remplacement</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-4">
|
||||||
|
{{if .ViewState.replacement_drivers}}
|
||||||
|
<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">Conducteur</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Lieu de départ</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Distance conducteur</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Distance passager</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Dernier trajet (-{{$.ViewState.last_trip_days}}j)</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Prix passager</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Indemnité conducteur</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Commentaire</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Profil validé</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 $index, $journey := .ViewState.replacement_drivers}}
|
||||||
|
{{$driver := index $.ViewState.replacement_drivers_map $journey.DriverId}}
|
||||||
|
{{$pricing := index $.ViewState.replacement_pricing $journey.Id}}
|
||||||
|
{{$location := index $.ViewState.replacement_locations $journey.Id}}
|
||||||
|
{{$lastTrip := index $.ViewState.driver_last_trips $journey.DriverId}}
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
||||||
|
{{$driver.Data.first_name}} {{$driver.Data.last_name}}
|
||||||
|
</td>
|
||||||
|
<td class="px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{if $location}}{{$location}}{{else}}-{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{$journey.DriverDistance}} km
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{$journey.PassengerDistance}} km
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{if $lastTrip.IsZero}}
|
||||||
|
<span class="text-gray-400">-</span>
|
||||||
|
{{else if eq ($lastTrip.Format "2006-01-02") ($.ViewState.booking.Journey.PassengerPickupDate.Format "2006-01-02")}}
|
||||||
|
<span class="text-red-600 font-semibold">{{ $lastTrip.Format "02/01/2006" }}</span>
|
||||||
|
{{else}}
|
||||||
|
{{ $lastTrip.Format "02/01/2006" }}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{if $pricing}}
|
||||||
|
{{printf "%.2f" $pricing.passenger.amount}} {{$pricing.passenger.currency}}
|
||||||
|
{{else}}-{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{if $pricing}}
|
||||||
|
{{printf "%.2f" $pricing.driver.amount}} {{$pricing.driver.currency}}
|
||||||
|
{{else}}-{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{if $driver.Data.other_properties}}{{$driver.Data.other_properties.comment}}{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID)}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-co-green text-white rounded-2xl">Oui</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
<form method="POST" action="/app/solidarity-transport/bookings/{{$.ViewState.booking.Id}}/create-replacement" class="inline">
|
||||||
|
<input type="hidden" name="driver_id" value="{{$journey.DriverId}}" />
|
||||||
|
<input type="hidden" name="journey_id" value="{{$journey.Id}}" />
|
||||||
|
<input type="hidden" name="message" value="{{template "sms_template" (dict "name" ($.ViewState.config.GetString "service_name") "datetime" (timeFormat $journey.PassengerPickupDate.AsTime "02/01/2006 15:04") "baseUrl" ($.ViewState.config.GetString "base_url"))}}" />
|
||||||
|
<button type="submit" class="text-co-blue hover:text-co-blue-dark underline">
|
||||||
|
Solliciter
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{{else}}
|
||||||
|
<div class="text-center py-8">
|
||||||
|
<p class="text-sm text-gray-500">Aucun conducteur disponible pour ce trajet</p>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-5 sm:mt-6">
|
||||||
|
<button @click="{{$dialogReplace}} = !{{$dialogReplace}}" type="button" class="inline-flex w-full justify-center rounded-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:text-sm">
|
||||||
|
Fermer
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section aria-labelledby="functionalities-title" x-data="{
|
<section aria-labelledby="functionalities-title" x-data="{
|
||||||
tab: 'documents',
|
tab: '{{ if .ViewState.tab }}{{ .ViewState.tab }}{{ else }}documents{{ end }}',
|
||||||
to(event) {
|
to(event) {
|
||||||
this.tab = event.target.value
|
this.tab = event.target.value
|
||||||
}
|
}
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
|
|
||||||
<option value="wallet">Compte mobilité</option>
|
<option value="wallet">Compte mobilité</option>
|
||||||
|
|
||||||
<option value="history">Historique</option>
|
<option value="history">Transports solidaires</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
<a href="#" @click="tab = 'history'"
|
<a href="#" @click="tab = 'history'"
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
:class="tab == 'history' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'history' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Transport solidaires </a>
|
Transports solidaires </a>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||||
<form method="POST" action="/app/solidarity-transport/drivers/{{.ViewState.driver.ID}}/journeys/{{.ViewState.driver_journey.Id}}/noreturn">
|
<form method="POST" action="/app/solidarity-transport/drivers/{{.ViewState.driver.ID}}/journeys/{{.ViewState.driver_journey.Id}}/noreturn">
|
||||||
|
{{if .ViewState.passenger.ID}}
|
||||||
|
<input type="hidden" name="passengerid" value="{{.ViewState.passenger.ID}}" />
|
||||||
|
{{end}}
|
||||||
{{if .ViewState.driver_journey.Noreturn}}
|
{{if .ViewState.driver_journey.Noreturn}}
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||||
@@ -31,9 +34,12 @@
|
|||||||
<div class="max-w-7xl m-auto px-4 sm:px-6 md:px-8 flex flex-col justify-items-center">
|
<div class="max-w-7xl m-auto px-4 sm:px-6 md:px-8 flex flex-col justify-items-center">
|
||||||
{{if .ViewState.passenger}}
|
{{if .ViewState.passenger}}
|
||||||
{{if lt .ViewState.passenger_wallet_balance .ViewState.pricing_result.passenger.Amount}}
|
{{if lt .ViewState.passenger_wallet_balance .ViewState.pricing_result.passenger.Amount}}
|
||||||
<p class="text-xl text-co-red text-center p-4">Le solde du compte mobilité est insuffisant.</p>
|
<p class="text-xl text-co-red text-center p-4">Le solde du compte mobilité est insuffisant. <a href="/app/beneficiaries/{{.ViewState.passenger.ID}}?tab=wallet" class="underline text-co-blue">Créditer le compte</a></p>
|
||||||
{{end}}
|
{{end}}
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
|
{{if .ViewState.replaces_booking_id}}
|
||||||
|
<input type="hidden" name="replaces_booking_id" value="{{.ViewState.replaces_booking_id}}" />
|
||||||
|
{{end}}
|
||||||
{{if not .ViewState.driver_journey.Noreturn}}
|
{{if not .ViewState.driver_journey.Noreturn}}
|
||||||
<div class="m-auto text-center">
|
<div class="m-auto text-center">
|
||||||
<label for="return_waiting_time" class="block text-sm font-medium text-gray-700">Durée d'attente à destination (minutes)</label>
|
<label for="return_waiting_time" class="block text-sm font-medium text-gray-700">Durée d'attente à destination (minutes)</label>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
birthdate: {{if .ViewState.driver.Data.birthdate}}'{{ (timeFrom .ViewState.driver.Data.birthdate).Format "2006-01-02" }}'{{else}}null{{end}},
|
birthdate: {{if .ViewState.driver.Data.birthdate}}'{{ (timeFrom .ViewState.driver.Data.birthdate).Format "2006-01-02" }}'{{else}}null{{end}},
|
||||||
},
|
},
|
||||||
other_properties: {{if .ViewState.driver.Data.other_properties}}{{ json .ViewState.driver.Data.other_properties }}{{else}}{}{{end}},
|
other_properties: {{if .ViewState.driver.Data.other_properties}}{{ json .ViewState.driver.Data.other_properties }}{{else}}{}{{end}},
|
||||||
other_properties_serialized: '{{ json .ViewState.driver.Data.other_properties }}',
|
other_properties_serialized: {{ json .ViewState.driver.Data.other_properties }},
|
||||||
rules: {
|
rules: {
|
||||||
first_name: ['required'],
|
first_name: ['required'],
|
||||||
last_name: ['required'],
|
last_name: ['required'],
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="divide-y divide-gray-200">
|
<div class="divide-y divide-gray-200">
|
||||||
<div>
|
<div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
<div class="border-b border-gray-200 pl-4">
|
<div class="border-b border-gray-200 pl-4 flex justify-between items-center">
|
||||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||||
<a href="#" @click="tab = 'solidarityService'"
|
<a href="#" @click="tab = 'solidarityService'"
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
@@ -34,6 +34,27 @@
|
|||||||
:class="tab == 'solidarityHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'solidarityHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Trajets passés </a>
|
Trajets passés </a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<div class="pr-4" x-show="tab == 'solidarityHistory'">
|
||||||
|
{{$exportURL := "/exports/solidarity-transport/bookings.xlsx"}}
|
||||||
|
{{$hasParams := false}}
|
||||||
|
{{if .ViewState.hist_filters.date_start}}{{$exportURL = printf "%s?start_date=%s" $exportURL .ViewState.hist_filters.date_start}}{{$hasParams = true}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.date_end}}{{if $hasParams}}{{$exportURL = printf "%s&end_date=%s" $exportURL .ViewState.hist_filters.date_end}}{{else}}{{$exportURL = printf "%s?end_date=%s" $exportURL .ViewState.hist_filters.date_end}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.status}}{{if $hasParams}}{{$exportURL = printf "%s&status=%s" $exportURL .ViewState.hist_filters.status}}{{else}}{{$exportURL = printf "%s?status=%s" $exportURL .ViewState.hist_filters.status}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.departure_geo}}{{if $hasParams}}{{$exportURL = printf "%s&departure_geo=%s" $exportURL .ViewState.hist_filters.departure_geo}}{{else}}{{$exportURL = printf "%s?departure_geo=%s" $exportURL .ViewState.hist_filters.departure_geo}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.destination_geo}}{{if $hasParams}}{{$exportURL = printf "%s&destination_geo=%s" $exportURL .ViewState.hist_filters.destination_geo}}{{else}}{{$exportURL = printf "%s?destination_geo=%s" $exportURL .ViewState.hist_filters.destination_geo}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
{{if .ViewState.hist_filters.passenger_address_geo}}{{if $hasParams}}{{$exportURL = printf "%s&passenger_address_geo=%s" $exportURL .ViewState.hist_filters.passenger_address_geo}}{{else}}{{$exportURL = printf "%s?passenger_address_geo=%s" $exportURL .ViewState.hist_filters.passenger_address_geo}}{{$hasParams = true}}{{end}}{{end}}
|
||||||
|
|
||||||
|
<a href="{{$exportURL}}">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||||
|
</svg>
|
||||||
|
Exporter
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -132,14 +132,14 @@
|
|||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||||
<dt class="text-sm font-medium text-gray-500">Date de récupération</dt>
|
<dt class="text-sm font-medium text-gray-500">Date et heure de prise en charge</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Startdate).Format
|
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Startdate).Format
|
||||||
"02/01/2006"}}</dd>
|
"02/01/2006 Ă 15:04"}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||||
<dt class="text-sm font-medium text-gray-500">Date de retour</dt>
|
<dt class="text-sm font-medium text-gray-500">Date et heure de restitution</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Enddate).Format
|
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Enddate).Format
|
||||||
"02/01/2006"}}</dd>
|
"02/01/2006 Ă 15:04"}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm font-medium text-gray-500 my-4">Documents</p>
|
<p class="text-sm font-medium text-gray-500 my-4">Documents</p>
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Ajouter un diagnostic</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
|
||||||
x-data="{
|
|
||||||
fields: {
|
|
||||||
name: null,
|
|
||||||
namespace: 'parcoursmob_bookings',
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: ['required'],
|
|
||||||
namespace: ['required'],
|
|
||||||
},
|
|
||||||
formValidation: {
|
|
||||||
valid: false,
|
|
||||||
fields: {
|
|
||||||
name: {valid: null},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isFormValid: true,
|
|
||||||
validate() {
|
|
||||||
this.formValidation = Iodine.assert(this.fields, this.rules)
|
|
||||||
},
|
|
||||||
validateField(field) {
|
|
||||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
|
||||||
},
|
|
||||||
submit(event) {
|
|
||||||
this.validate()
|
|
||||||
if(!this.formValidation.valid) {
|
|
||||||
this.isFormValid = false
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
return this.formValidation.valid
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
<form class="space-y-6" method="POST" @submit="submit">
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Informations obligatoires</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations obligatoires
|
|
||||||
pour créer un diagnostic dans PARCOURSMOB</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom</label>
|
|
||||||
<input type="text" name="name" id="name" autocomplete="given-name"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.name" @blur="validateField('name')"
|
|
||||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="namespace" value="parcoursmob_bookings" />
|
|
||||||
<!-- <div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma JSON</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma JSON pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="json_schema" class="block text-sm font-medium text-gray-700">Schéma JSON</label>
|
|
||||||
<textarea name="json_schema" id="json_schema" autocomplete="json_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.json_schema" @blur="validateField('json_schema')"
|
|
||||||
:class="formValidation.fields.json_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma UI</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma UI pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="ui_schema" class="block text-sm font-medium text-gray-700">Schéma UI</label>
|
|
||||||
<textarea name="ui_schema" id="ui_schema" autocomplete="ui_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.ui_schema" @blur="validateField('ui_schema')"
|
|
||||||
:class="formValidation.fields.ui_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="flex justify-end">
|
|
||||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
|
||||||
<a href="/app/vehicles/bookings/{{.ViewState.booking}}">
|
|
||||||
<button type="button"
|
|
||||||
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
|
||||||
</a>
|
|
||||||
<button type="submit"
|
|
||||||
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Créer le diagnostique</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -21,9 +21,8 @@
|
|||||||
<div class="bg-white shadow sm:rounded-2xl">
|
<div class="bg-white shadow sm:rounded-2xl">
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Chercher un véhicule</h2>
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Chercher un véhicule</h2>
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
<form method="GET">
|
<form method="GET" x-data="{
|
||||||
|
beneficiarySelected: {{if .ViewState.search}}true{{else}}false{{end}},
|
||||||
<div x-data="{
|
|
||||||
text: '{{if .ViewState.search}}{{.ViewState.search.beneficiary.Data.first_name}} {{.ViewState.search.beneficiary.Data.last_name}}{{end}}',
|
text: '{{if .ViewState.search}}{{.ViewState.search.beneficiary.Data.first_name}} {{.ViewState.search.beneficiary.Data.last_name}}{{end}}',
|
||||||
beneficiariesListOpen: false,
|
beneficiariesListOpen: false,
|
||||||
beneficiaries: {{json .ViewState.beneficiaries}},
|
beneficiaries: {{json .ViewState.beneficiaries}},
|
||||||
@@ -40,10 +39,13 @@
|
|||||||
this.fields.beneficiaryid = beneficiary.id
|
this.fields.beneficiaryid = beneficiary.id
|
||||||
this.text = beneficiary.data.first_name + ' ' + beneficiary.data.last_name
|
this.text = beneficiary.data.first_name + ' ' + beneficiary.data.last_name
|
||||||
this.beneficiariesListOpen = false
|
this.beneficiariesListOpen = false
|
||||||
|
this.beneficiarySelected = true
|
||||||
},
|
},
|
||||||
}">
|
}" @submit="if(!beneficiarySelected) { $event.preventDefault(); alert('Veuillez sélectionner un bénéficiaire'); }">
|
||||||
|
|
||||||
|
<div>
|
||||||
<input type="hidden" name="beneficiaryid" x-model="fields.beneficiaryid">
|
<input type="hidden" name="beneficiaryid" x-model="fields.beneficiaryid">
|
||||||
<label for="combobox" class="block text-sm font-medium text-gray-700">Bénéficiaire</label>
|
<label for="combobox" class="block text-sm font-medium text-gray-700">Bénéficiaire <span class="text-red-600">*</span></label>
|
||||||
<div class="relative mt-1 mb-4">
|
<div class="relative mt-1 mb-4">
|
||||||
<input autocomplete="off" @focus="beneficiariesListOpen = true" x-model="text" id="combobox" type="text" class="w-full rounded-2xl border border-gray-300 bg-white py-2 pl-3 pr-12 shadow-sm focus:border-co-blue focus:outline-none focus:ring-1 focus:ring-co-blue sm:text-sm" role="combobox" aria-controls="options" aria-expanded="false">
|
<input autocomplete="off" @focus="beneficiariesListOpen = true" x-model="text" id="combobox" type="text" class="w-full rounded-2xl border border-gray-300 bg-white py-2 pl-3 pr-12 shadow-sm focus:border-co-blue focus:outline-none focus:ring-1 focus:ring-co-blue sm:text-sm" role="combobox" aria-controls="options" aria-expanded="false">
|
||||||
|
|
||||||
@@ -89,21 +91,37 @@
|
|||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName }} -->
|
{{ template "address_autocomplete" dict "FieldName" $fieldName }} -->
|
||||||
<div class="py-4 grid grid-cols-2">
|
<div class="py-4 grid grid-cols-2">
|
||||||
<div class="lg:col-span-1">
|
<div class="lg:col-span-1">
|
||||||
<label for="startdate" class="block text-sm font-medium text-gray-700">Du</label>
|
<label for="startdate" class="block text-sm font-medium text-gray-700">Du <span class="text-red-600">*</span></label>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<input type="date" id="startdate" name="startdate" value="{{.ViewState.search.startdate}}"
|
<input type="date" id="startdate" name="startdate" value="{{if .ViewState.search}}{{(timeFrom .ViewState.search.startdate).Format "2006-01-02"}}{{end}}" required
|
||||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-l-2xl border-r-1">
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-l-2xl border-r-1">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lg:col-span-1">
|
<div class="lg:col-span-1">
|
||||||
<label for="enddate" class="block text-sm font-medium text-gray-700">Au</label>
|
<label for="enddate" class="block text-sm font-medium text-gray-700">Au <span class="text-red-600">*</span></label>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<input type="date" id="enddate" name="enddate" value="{{.ViewState.search.enddate}}"
|
<input type="date" id="enddate" name="enddate" value="{{if .ViewState.search}}{{(timeFrom .ViewState.search.enddate).Format "2006-01-02"}}{{end}}" required
|
||||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="py-4 grid grid-cols-2 gap-4">
|
||||||
|
<div class="lg:col-span-1">
|
||||||
|
<label for="starttime" class="block text-sm font-medium text-gray-700">Prise en charge</label>
|
||||||
|
<div class="mt-1">
|
||||||
|
<input type="time" id="starttime" name="starttime" value="{{if .ViewState.search}}{{(timeFrom .ViewState.search.startdate).Format "15:04"}}{{else}}09:00{{end}}"
|
||||||
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="lg:col-span-1">
|
||||||
|
<label for="endtime" class="block text-sm font-medium text-gray-700">Restitution</label>
|
||||||
|
<div class="mt-1">
|
||||||
|
<input type="time" id="endtime" name="endtime" value="{{if .ViewState.search}}{{(timeFrom .ViewState.search.enddate).Format "15:04"}}{{else}}18:00{{end}}"
|
||||||
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="py-4"
|
<div class="py-4"
|
||||||
x-data="{
|
x-data="{
|
||||||
type: {{if .ViewState.searched}}'{{.ViewState.search.selected_type}}'{{else}}null{{end}},
|
type: {{if .ViewState.searched}}'{{.ViewState.search.selected_type}}'{{else}}null{{end}},
|
||||||
@@ -147,20 +165,6 @@
|
|||||||
<div class="lg:col-start-2 lg:col-span-2">
|
<div class="lg:col-start-2 lg:col-span-2">
|
||||||
{{if .ViewState.searched}}
|
{{if .ViewState.searched}}
|
||||||
<div class="bg-white px-4 py-5 shadow sm:rounded-2xl sm:px-6">
|
<div class="bg-white px-4 py-5 shadow sm:rounded-2xl sm:px-6">
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Documents demandés</h2>
|
|
||||||
<table>
|
|
||||||
<tbody>
|
|
||||||
{{range .ViewState.search.mandatory_documents}}
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">
|
|
||||||
{{index $.ViewState.search.file_types_map .}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white mt-8 px-4 py-5 shadow sm:rounded-2xl sm:px-6">
|
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Véhicules disponibles</h2>
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Véhicules disponibles</h2>
|
||||||
<div class="mt-8 flex flex-col">
|
<div class="mt-8 flex flex-col">
|
||||||
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||||
@@ -169,7 +173,6 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:pl-0">Véhicule</th>
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:pl-0">Véhicule</th>
|
||||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Numéro</th>
|
|
||||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Gestionnaire</th>
|
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Gestionnaire</th>
|
||||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Lieu</th>
|
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Lieu</th>
|
||||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6 md:pr-0">
|
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6 md:pr-0">
|
||||||
@@ -180,7 +183,7 @@
|
|||||||
<tbody class="divide-y divide-gray-200">
|
<tbody class="divide-y divide-gray-200">
|
||||||
{{range .ViewState.search.vehicles}}
|
{{range .ViewState.search.vehicles}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 md:pl-0">
|
<td class="py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 md:pl-0">
|
||||||
<div class="font-medium text-gray-900">{{.Data.name}}</div>
|
<div class="font-medium text-gray-900">{{.Data.name}}</div>
|
||||||
<div class="text-gray-500">
|
<div class="text-gray-500">
|
||||||
{{.Type}}
|
{{.Type}}
|
||||||
@@ -188,10 +191,12 @@
|
|||||||
{{ if .Data.automatic}} (boite auto){{ end }}
|
{{ if .Data.automatic}} (boite auto){{ end }}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
{{if .Data.licence_plate}}
|
||||||
|
<div class="text-gray-500 text-xs mt-1">{{.Data.licence_plate}}</div>
|
||||||
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{.Data.licence_plate}}</td>
|
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{(index $.ViewState.search.admingroups (index .Administrators 0)).Data.name}}</td>
|
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{(index $.ViewState.search.admingroups (index .Administrators 0)).Data.name}}</td>
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
<td class="py-4 px-3 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
||||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 md:pr-0"
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 md:pr-0"
|
||||||
x-data="{
|
x-data="{
|
||||||
documentsdialog: false
|
documentsdialog: false
|
||||||
@@ -204,46 +209,103 @@
|
|||||||
|
|
||||||
<div class="fixed inset-0 z-10 overflow-y-auto">
|
<div class="fixed inset-0 z-10 overflow-y-auto">
|
||||||
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
||||||
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6">
|
<div class="relative transform overflow-hidden rounded-2xl bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg">
|
||||||
<div>
|
<!-- Header -->
|
||||||
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue">
|
<div class="bg-co-blue px-6 py-5">
|
||||||
{{$.IconSet.Icon "hero:outline/folder-plus" "h-6 w-6 text-white"}}
|
<div class="flex items-center">
|
||||||
|
<div class="flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-xl bg-white/20 backdrop-blur">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document-text" "h-6 w-6 text-white"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 text-center sm:mt-5">
|
<div class="ml-4">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Documents demandés</h3>
|
<h3 class="text-lg font-semibold text-white" id="modal-title">Documents demandés</h3>
|
||||||
<div class="mt-2">
|
<p class="text-sm text-white/70">{{len $.ViewState.search.mandatory_documents}} document(s) requis pour cette réservation</p>
|
||||||
<p class="text-sm text-gray-500">Ajoutez des documents pour finaliser</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form enctype="multipart/form-data" method="POST" action="/app/vehicles/v/{{.ID}}/b/{{$.ViewState.search.beneficiary.ID}}?startdate={{$.ViewState.search.startdate}}&enddate={{$.ViewState.search.enddate}}">
|
|
||||||
{{range $.ViewState.search.mandatory_documents}}
|
<form enctype="multipart/form-data" method="POST" action="/app/vehicles/v/{{.ID}}/b/{{$.ViewState.search.beneficiary.ID}}?startdate={{(timeFrom $.ViewState.search.startdate).Format "2006-01-02"}}&enddate={{(timeFrom $.ViewState.search.enddate).Format "2006-01-02"}}&starttime={{(timeFrom $.ViewState.search.startdate).Format "15:04"}}&endtime={{(timeFrom $.ViewState.search.enddate).Format "15:04"}}">
|
||||||
{{$type := .}}
|
<div class="px-6 py-5 space-y-4 max-h-96 overflow-y-auto">
|
||||||
<div class="p-2"
|
{{range $type := $.ViewState.search.mandatory_documents}}
|
||||||
|
<div class="bg-gray-50 rounded-2xl p-4 border border-gray-200"
|
||||||
x-data="{
|
x-data="{
|
||||||
select: '{{index $.ViewState.search.documents_defaults $type}}'
|
select: '{{index $.ViewState.search.documents_defaults $type}}',
|
||||||
|
dragover: false
|
||||||
}">
|
}">
|
||||||
<label for="type" class="block text-sm font-medium text-gray-700">{{index $.ViewState.search.file_types_map $type}}</label>
|
<div class="flex items-start justify-between mb-3">
|
||||||
<select x-model="select" id="type-{{$type}}" name="type-{{$type}}" class="mt-1 block w-full rounded-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
|
<div class="flex items-center">
|
||||||
|
<span class="flex-shrink-0 inline-flex items-center justify-center h-8 w-8 rounded-xl bg-co-blue text-white">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document" "h-4 w-4"}}
|
||||||
|
</span>
|
||||||
|
<div class="ml-3">
|
||||||
|
<label for="type-{{$type}}" class="block text-sm font-semibold text-gray-900">{{index $.ViewState.search.file_types_map $type}}</label>
|
||||||
|
<p class="text-xs text-gray-500">Document obligatoire</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span x-show="select !== ''" class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-co-green/20 text-co-green">
|
||||||
|
{{$.IconSet.Icon "hero:solid/check-circle" "h-3.5 w-3.5 mr-1"}}
|
||||||
|
Sélectionné
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<select x-model="select" id="type-{{$type}}" name="type-{{$type}}"
|
||||||
|
class="block w-full rounded-2xl border-gray-300 py-2.5 pl-3 pr-10 text-sm focus:border-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue/20 transition-shadow">
|
||||||
{{range $.ViewState.search.beneficiary_documents}}
|
{{range $.ViewState.search.beneficiary_documents}}
|
||||||
{{if eq $type .Metadata.Type}}
|
{{if eq $type .Metadata.Type}}
|
||||||
<option value="{{.Key}}">Fichier bénéficiaire : {{.Metadata.Name}}</option>
|
<option value="{{.Key}}">{{.Metadata.Name}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<option value="">Ajouter un fichier</option>
|
<option value="">Téléverser un nouveau fichier</option>
|
||||||
</select>
|
</select>
|
||||||
<div x-show="select == ''" class="p-2">
|
|
||||||
<input type="file" name="doc-{{$type}}" />
|
<!-- File upload area -->
|
||||||
|
<div x-show="select == ''" x-transition class="mt-3"
|
||||||
|
x-data="{ fileName: '' }">
|
||||||
|
<input type="file" name="doc-{{$type}}" x-ref="fileInput"
|
||||||
|
@change="fileName = $event.target.files[0]?.name || ''"
|
||||||
|
class="hidden" />
|
||||||
|
<!-- Empty state: drop zone -->
|
||||||
|
<div x-show="!fileName"
|
||||||
|
class="relative border-2 border-dashed rounded-2xl p-4 text-center transition-colors cursor-pointer"
|
||||||
|
:class="dragover ? 'border-co-blue bg-co-blue/5' : 'border-gray-300 hover:border-gray-400'"
|
||||||
|
@click="$refs.fileInput.click()"
|
||||||
|
@dragover.prevent="dragover = true"
|
||||||
|
@dragleave.prevent="dragover = false"
|
||||||
|
@drop.prevent="dragover = false; $refs.fileInput.files = $event.dataTransfer.files; fileName = $event.dataTransfer.files[0]?.name || ''">
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{$.IconSet.Icon "hero:outline/cloud-arrow-up" "mx-auto h-8 w-8 text-gray-400"}}
|
||||||
|
<p class="text-sm text-gray-600">Glissez un fichier ou <span class="text-co-blue font-medium">parcourir</span></p>
|
||||||
|
<p class="text-xs text-gray-400">PDF, JPG, PNG jusqu'Ă 10Mo</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- File selected state -->
|
||||||
|
<div x-show="fileName" class="flex items-center justify-between p-3 bg-co-green/10 border border-co-green/30 rounded-2xl">
|
||||||
|
<div class="flex items-center min-w-0 cursor-pointer flex-1" @click="$refs.fileInput.click()">
|
||||||
|
{{$.IconSet.Icon "hero:solid/document-check" "h-5 w-5 text-co-green flex-shrink-0"}}
|
||||||
|
<span class="ml-2 text-sm text-gray-800 truncate" x-text="fileName"></span>
|
||||||
|
<span class="ml-2 text-xs text-co-green hover:text-co-green/80">(modifier)</span>
|
||||||
|
</div>
|
||||||
|
<button type="button" @click="fileName = ''; $refs.fileInput.value = ''" class="ml-2 flex-shrink-0 text-co-red hover:text-co-red/80">
|
||||||
|
{{$.IconSet.Icon "hero:outline/x-mark" "h-5 w-5"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="mt-5 sm:mt-6">
|
</div>
|
||||||
<button type="submit" class="inline-flex w-full justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:text-sm">Réserver</button>
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div class="bg-gray-50 px-6 py-4 flex flex-col-reverse sm:flex-row sm:justify-end gap-3 border-t border-gray-200">
|
||||||
|
<button @click="documentsdialog=false" type="button"
|
||||||
|
class="w-full sm:w-auto inline-flex justify-center items-center px-4 py-2.5 border border-gray-300 rounded-2xl text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue transition-colors">
|
||||||
|
Annuler
|
||||||
|
</button>
|
||||||
|
<button type="submit"
|
||||||
|
class="w-full sm:w-auto inline-flex justify-center items-center px-6 py-2.5 border border-transparent rounded-2xl text-sm font-medium text-white bg-co-blue hover:bg-co-blue/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue shadow-sm transition-colors">
|
||||||
|
{{$.IconSet.Icon "hero:outline/check" "h-4 w-4 mr-2"}}
|
||||||
|
Confirmer la réservation
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="mt-5 sm:mt-6">
|
|
||||||
<button @click="documentsdialog=false" type="button" class="inline-flex w-full justify-center max-w-xs bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
{{define "booking_diags"}}
|
|
||||||
{{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }}
|
|
||||||
{{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
|
|
||||||
<div class="bg-white shadow sm:rounded-lg">
|
|
||||||
<div class="px-4 py-5 flex items-center space-x-5 sm:px-6">
|
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Diagnostics réalisés</h2>
|
|
||||||
<a href="{{.ViewState.booking.ID}}/create-diag">
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
|
||||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
|
||||||
Créer un diagnostic
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="border-t border-gray-200">
|
|
||||||
{{ $diagCount := len .ViewState.diags }}
|
|
||||||
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
|
||||||
{{if eq $diagCount 0}}
|
|
||||||
<li class="py-2 px-4">
|
|
||||||
<p class="py-5 mt-1 max-w-2xl text-sm text-gray-500">Aucun diagnostique effectué pour le moment.</p>
|
|
||||||
</li>
|
|
||||||
{{else}}
|
|
||||||
{{range .ViewState.diags}}
|
|
||||||
{{ $diags := .ID }}
|
|
||||||
{{if eq .Deleted false}}
|
|
||||||
<li class="py-5 px-4 flex">
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<a href="/app/diags/{{$diags}}" class="mt-1 text-sm text-gray-900">{{.Name}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{(timeFrom .Diagdate).Format "02/01/2006"}}</p>
|
|
||||||
</div>
|
|
||||||
<a href="/app/diags/{{$diags}}" target="_blank">
|
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Voir<span class="sr-only"> le diagnostic</span></button>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Deleted true}}
|
|
||||||
<li class="py-5 px-4 flex">
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{.Name}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{(timeFrom .Diagdate).Format "02/01/2006"}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">Ce diagnostique a été retiré</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
{{ define "vehicle_booking_filters" }}
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<div class="flex flex-row justify-end flex-wrap">
|
||||||
|
|
||||||
|
<div class="m-4">
|
||||||
|
<div>
|
||||||
|
<label for="vehicles_date_start" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Dates (début / fin)</label>
|
||||||
|
<div class="mt-2 flex">
|
||||||
|
<input id="vehicles_date_start" type="date" name="date_start" class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-co-blue" value="{{.ViewState.filters.date_start}}" onchange="this.form.submit()" />
|
||||||
|
<input id="vehicles_date_end" type="date" name="date_end" class="mx-2 block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-co-blue" value="{{.ViewState.filters.date_end}}" onchange="this.form.submit()" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="m-4">
|
||||||
|
<label for="vehicles_status" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Statut</label>
|
||||||
|
<div class="mt-2 grid grid-cols-1">
|
||||||
|
<select id="vehicles_status" name="status" class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
||||||
|
<option></option>
|
||||||
|
<option value="FORTHCOMING"{{if eq .ViewState.filters.status "FORTHCOMING"}} selected{{end}}>A venir</option>
|
||||||
|
<option value="ONGOING"{{if eq .ViewState.filters.status "ONGOING"}} selected{{end}}>En cours</option>
|
||||||
|
<option value="TERMINATED"{{if eq .ViewState.filters.status "TERMINATED"}} selected{{end}}>Terminé</option>
|
||||||
|
<option value="CANCELLED"{{if eq .ViewState.filters.status "CANCELLED"}} selected{{end}}>Annulé</option>
|
||||||
|
</select>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
||||||
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="m-4">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
@@ -78,11 +78,14 @@
|
|||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{if .Data.administrator_unavailability}}
|
{{if .Data.administrator_unavailability}}
|
||||||
<div class="text-gray-900" >Retiré du {{(timeFrom .Unavailablefrom).Format "02/01/2006"}} au {{(timeFrom .Unavailableto).Format "02/01/2006"}}</div>
|
<div class="text-gray-900" >Retiré du {{(timeFrom .Unavailablefrom).Format "02/01/2006"}} au {{(timeFrom .Unavailableto).Format "02/01/2006"}}</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="text-gray-900" >Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</div>
|
<div class="text-gray-900" >
|
||||||
|
<div>Du {{(timeFrom .Startdate).Format "02/01/2006 Ă 15:04"}}</div>
|
||||||
|
<div>au {{(timeFrom .Enddate).Format "02/01/2006 Ă 15:04"}}</div>
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
{{define "vehicle_diags"}}
|
|
||||||
{{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }}
|
|
||||||
{{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
|
|
||||||
<div class="bg-white shadow sm:rounded-lg">
|
|
||||||
<div class="px-4 py-5 flex items-center space-x-5 sm:px-6">
|
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Diagnostics réalisés</h2>
|
|
||||||
<a href="{{.ViewState.vehicle.ID}}/create-diag">
|
|
||||||
<button type="button"
|
|
||||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
|
|
||||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
|
||||||
Créer un diagnostic
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="border-t border-gray-200">
|
|
||||||
{{ $diagCount := len .ViewState.diags }}
|
|
||||||
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
|
||||||
{{if eq $diagCount 0}}
|
|
||||||
<li class="py-2 px-4">
|
|
||||||
<p class="py-5 mt-1 max-w-2xl text-sm text-gray-500">Aucun diagnostique effectué pour le moment.</p>
|
|
||||||
</li>
|
|
||||||
{{else}}
|
|
||||||
{{range .ViewState.diags}}
|
|
||||||
{{ $diags := .ID }}
|
|
||||||
{{if eq .Deleted false}}
|
|
||||||
<li class="py-5 px-4 flex">
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<a href="app/diags/{{$diags}}" class="mt-1 text-sm text-gray-900">{{.Name}}</a>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{(timeFrom .Diagdate).Format "02/01/2006"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a href="/app/diags/{{$diags}}" target="_blank">
|
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Voir<span class="sr-only"> le diagnostic</span></button>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Deleted true}}
|
|
||||||
<li class="py-5 px-4 flex">
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{.Name}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">{{(timeFrom .Diagdate).Format "02/01/2006"}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 ml-3">
|
|
||||||
<p class="mt-1 text-sm text-gray-900">Ce diagnostique a été retiré</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -39,6 +39,11 @@
|
|||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Changer de véhicule</h3>
|
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Changer de véhicule</h3>
|
||||||
</div>
|
</div>
|
||||||
|
{{if eq (len .ViewState.alternative_vehicles) 0}}
|
||||||
|
<div class="mt-4 text-center">
|
||||||
|
<p class="text-sm text-gray-500">Aucun véhicule disponible pour les dates de cette réservation.</p>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
<form method="POST" action="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/change-vehicle" class="mt-4" @submit="submitSelectedvehicle">
|
<form method="POST" action="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/change-vehicle" class="mt-4" @submit="submitSelectedvehicle">
|
||||||
<select x-model="selectedvehicle" id="vehicle" name="vehicle" class="mt-1 block w-full rounded-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
|
<select x-model="selectedvehicle" id="vehicle" name="vehicle" class="mt-1 block w-full rounded-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
@@ -50,6 +55,7 @@
|
|||||||
<button type="submit" class="inline-flex w-full justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:text-sm">Changer de véhicule</button>
|
<button type="submit" class="inline-flex w-full justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:text-sm">Changer de véhicule</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
{{end}}
|
||||||
<div class="mt-5 sm:mt-6">
|
<div class="mt-5 sm:mt-6">
|
||||||
<button @click="changeVehicle=false" type="button" class="inline-flex w-full justify-center max-w-xs bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
<button @click="changeVehicle=false" type="button" class="inline-flex w-full justify-center max-w-xs bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -126,9 +132,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--<div>
|
|
||||||
{{template "booking_diags" .}}
|
|
||||||
</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="lg:col-start-2 lg:col-span-2">
|
<div class="lg:col-start-2 lg:col-span-2">
|
||||||
<div class="bg-white shadow sm:rounded-2xl sm:px-6">
|
<div class="bg-white shadow sm:rounded-2xl sm:px-6">
|
||||||
@@ -215,44 +218,48 @@
|
|||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||||
<dt class="text-sm font-medium text-gray-500">Date de récupération</dt>
|
<dt class="text-sm font-medium text-gray-500">Date et heure de prise en charge</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2 inline-flex"
|
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"
|
||||||
x-data="{ updateOpen: false }">
|
x-data="{ updateOpen: false }">
|
||||||
<div class="w-full inline-flex" x-show="!updateOpen">
|
<div class="w-full inline-flex" x-show="!updateOpen">
|
||||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Startdate).Format "02/01/2006"}}</div>
|
<div class="flex-1">{{(timeFrom .ViewState.booking.Startdate).Format "02/01/2006 Ă 15:04"}}</div>
|
||||||
{{if (not .ViewState.booking.Deleted)}}
|
{{if (not .ViewState.booking.Deleted)}}
|
||||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<form method="POST" class="inline-flex" x-show="updateOpen">
|
<form method="POST" class="inline-flex flex-col gap-2" x-show="updateOpen">
|
||||||
<div class="flex-1">
|
<div class="flex gap-2">
|
||||||
<input type="date" name="startdate" value="{{(timeFrom .ViewState.booking.Startdate).Format "2006-01-02"}}"
|
<input type="date" name="startdate" value="{{(timeFrom .ViewState.booking.Startdate).Format "2006-01-02"}}"
|
||||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
<input type="time" name="starttime" value="{{(timeFrom .ViewState.booking.Startdate).Format "15:04"}}"
|
||||||
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
class=" justify-center text-co-blue px-4">
|
class="justify-center text-co-blue px-4 self-start">
|
||||||
OK
|
OK
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||||
<dt class="text-sm font-medium text-gray-500">Date de retour</dt>
|
<dt class="text-sm font-medium text-gray-500">Date et heure de restitution</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"
|
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"
|
||||||
x-data="{ updateOpen: false }">
|
x-data="{ updateOpen: false }">
|
||||||
<div class="w-full inline-flex" x-show="!updateOpen">
|
<div class="w-full inline-flex" x-show="!updateOpen">
|
||||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Enddate).Format "02/01/2006"}}</div>
|
<div class="flex-1">{{(timeFrom .ViewState.booking.Enddate).Format "02/01/2006 Ă 15:04"}}</div>
|
||||||
{{if (not .ViewState.booking.Deleted)}}
|
{{if (not .ViewState.booking.Deleted)}}
|
||||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<form method="POST" class="inline-flex" x-show="updateOpen">
|
<form method="POST" class="inline-flex flex-col gap-2" x-show="updateOpen">
|
||||||
<div class="flex-1">
|
<div class="flex gap-2">
|
||||||
<input type="date" name="enddate" value="{{(timeFrom .ViewState.booking.Enddate).Format "2006-01-02"}}"
|
<input type="date" name="enddate" value="{{(timeFrom .ViewState.booking.Enddate).Format "2006-01-02"}}"
|
||||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
<input type="time" name="endtime" value="{{(timeFrom .ViewState.booking.Enddate).Format "15:04"}}"
|
||||||
|
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
class=" justify-center text-co-blue px-4">
|
class="justify-center text-co-blue px-4 self-start">
|
||||||
OK
|
OK
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||||
|
|
||||||
<a href="/exports/fleets/bookings">
|
<a href="/exports/fleets/bookings/group_bookings.xlsx?status={{.ViewState.filters.status}}&date_start={{.ViewState.filters.date_start}}&date_end={{.ViewState.filters.date_end}}">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
||||||
@@ -20,6 +20,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{template "vehicle_booking_filters" .}}
|
||||||
|
|
||||||
{{template "bookings_list" .}}
|
{{template "bookings_list" .}}
|
||||||
|
|
||||||
{{end}}
|
{{end}}
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Ajouter un diagnostic</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
|
||||||
x-data="{
|
|
||||||
fields: {
|
|
||||||
name: null,
|
|
||||||
namespace: 'parcoursmob_bookings',
|
|
||||||
json_schema: null,
|
|
||||||
ui_schema: null,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: ['required']
|
|
||||||
namespace: ['required']
|
|
||||||
json_schema: ['required']
|
|
||||||
ui_schema: ['required']
|
|
||||||
},
|
|
||||||
formValidation: {
|
|
||||||
valid: false,
|
|
||||||
fields: {
|
|
||||||
name: {valid: null},
|
|
||||||
json_schema: {valid: null},
|
|
||||||
ui_schema: {valid: null},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isFormValid: true,
|
|
||||||
validate() {
|
|
||||||
this.formValidation = Iodine.assert(this.fields, this.rules)
|
|
||||||
},
|
|
||||||
validateField(field) {
|
|
||||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
|
||||||
},
|
|
||||||
submit(event) {
|
|
||||||
this.validate()
|
|
||||||
if(!this.formValidation.valid) {
|
|
||||||
this.isFormValid = false
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
return this.formValidation.valid
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
<form class="space-y-6" method="POST" @submit="submit">
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Informations obligatoires</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations obligatoires
|
|
||||||
pour créer un diagnostic dans PARCOURSMOB</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom</label>
|
|
||||||
<input type="text" name="name" id="name" autocomplete="given-name"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.name" @blur="validateField('name')"
|
|
||||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="namespace" value="parcoursmob_bookings" />
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma JSON</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma JSON pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="json_schema" class="block text-sm font-medium text-gray-700">Schéma JSON</label>
|
|
||||||
<textarea name="json_schema" id="json_schema" autocomplete="json_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.json_schema" @blur="validateField('json_schema')"
|
|
||||||
:class="formValidation.fields.json_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma UI</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma UI pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="ui_schema" class="block text-sm font-medium text-gray-700">Schéma UI</label>
|
|
||||||
<textarea name="ui_schema" id="ui_schema" autocomplete="ui_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.ui_schema" @blur="validateField('ui_schema')"
|
|
||||||
:class="formValidation.fields.ui_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-end">
|
|
||||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
|
||||||
<a href="/app/vehicles-management/bookings/{{.ViewState.booking}}">
|
|
||||||
<button type="button"
|
|
||||||
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
|
||||||
</a>
|
|
||||||
<button type="submit"
|
|
||||||
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Créer le diagnostique</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
{{define "content"}}
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Ajouter un diagnostic</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
|
||||||
x-data="{
|
|
||||||
fields: {
|
|
||||||
name: null,
|
|
||||||
namespace: 'parcoursmob_vehicles',
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: ['required'],
|
|
||||||
namespace: ['required'],
|
|
||||||
},
|
|
||||||
formValidation: {
|
|
||||||
valid: false,
|
|
||||||
fields: {
|
|
||||||
name: {valid: null},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isFormValid: true,
|
|
||||||
validate() {
|
|
||||||
this.formValidation = Iodine.assert(this.fields, this.rules)
|
|
||||||
},
|
|
||||||
validateField(field) {
|
|
||||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
|
||||||
},
|
|
||||||
submit(event) {
|
|
||||||
this.validate()
|
|
||||||
if(!this.formValidation.valid) {
|
|
||||||
this.isFormValid = false
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
return this.formValidation.valid
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
<form class="space-y-6" method="POST" @submit="submit">
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Informations obligatoires</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations obligatoires
|
|
||||||
pour créer un diagnostic dans PARCOURSMOB</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom</label>
|
|
||||||
<input type="text" name="name" id="name" autocomplete="given-name"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.name" @blur="validateField('name')"
|
|
||||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="namespace" value="parcoursmob_vehicles" />
|
|
||||||
<!-- <div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma JSON</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma JSON pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="json_schema" class="block text-sm font-medium text-gray-700">Schéma JSON</label>
|
|
||||||
<textarea name="json_schema" id="json_schema" autocomplete="json_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.json_schema" @blur="validateField('json_schema')"
|
|
||||||
:class="formValidation.fields.json_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6 mt-6">
|
|
||||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
|
||||||
<div class="md:col-span-1">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Schéma UI</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Schéma UI pour le diagnostic</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="ui_schema" class="block text-sm font-medium text-gray-700">Schéma UI</label>
|
|
||||||
<textarea name="ui_schema" id="ui_schema" autocomplete="ui_schema"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.ui_schema" @blur="validateField('ui_schema')"
|
|
||||||
:class="formValidation.fields.ui_schema.valid == false ? 'border-co-red border-2' : 'border-gray-300'"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="flex justify-end">
|
|
||||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
|
||||||
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle}}">
|
|
||||||
<button type="button"
|
|
||||||
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
|
||||||
</a>
|
|
||||||
<button type="submit"
|
|
||||||
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Créer le diagnostique</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -138,6 +138,48 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if .ViewState.vehicle_optional_fields}}
|
||||||
|
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
||||||
|
<div class="md:grid md:grid-cols-3 md:gap-6">
|
||||||
|
<div class="md:col-span-1">
|
||||||
|
<h3 class="text-lg font-medium leading-6 text-gray-900">Autres propriétés</h3>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">Informations complémentaires sur le véhicule</p>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||||
|
<div class="grid grid-cols-6 gap-6">
|
||||||
|
{{range .ViewState.vehicle_optional_fields}}
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
||||||
|
{{if eq .type "select"}}
|
||||||
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
|
<select id="{{.name}}" name="{{.name}}"
|
||||||
|
class="p-2 max-w-lg mt-1 block focus:ring-co-blue focus:border-co-blue w-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{range .options}}
|
||||||
|
<option value="{{.value}}">{{.label}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{else if eq .type "textarea"}}
|
||||||
|
<textarea id="{{.name}}" name="{{.name}}" rows="3"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
||||||
|
{{else if eq .type "date"}}
|
||||||
|
<input type="date" id="{{.name}}" name="{{.name}}"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{else if eq .type "number"}}
|
||||||
|
<input type="number" id="{{.name}}" name="{{.name}}"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{else}}
|
||||||
|
<input type="text" id="{{.name}}" name="{{.name}}"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||||
<a href="/app/vehicles-management/">
|
<a href="/app/vehicles-management/">
|
||||||
|
|||||||
@@ -170,26 +170,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<section aria-labelledby="timeline-title" class="lg:col-start-3 lg:col-span-1">
|
{{if .ViewState.vehicle_optional_fields}}
|
||||||
<div class="bg-white px-4 py-5 shadow sm:rounded-lg sm:px-6">
|
<section aria-labelledby="vehicle-other-properties-title" class="lg:col-start-3 lg:col-span-1">
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Réservations à venir</h2>
|
<div class="bg-white shadow sm:rounded-lg">
|
||||||
{{if eq (len .ViewState.vehicle.Bookings) 0}}
|
<div class="px-4 py-5 sm:px-6">
|
||||||
<p class="p-12 text-gray-500 text-center text-md">Aucune réservation à venir</p>
|
<h2 id="vehicle-other-properties-title" class="text-lg leading-6 font-medium text-gray-900">Autres propriétés</h2>
|
||||||
{{end}}
|
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations complémentaires sur le véhicule</p>
|
||||||
<ul role="list" class="divide-y divide-gray-200">
|
|
||||||
{{range .ViewState.vehicle.Bookings}}
|
|
||||||
<li class="py-4 flex">
|
|
||||||
<div class="ml-3">
|
|
||||||
<a href="/app/vehicles-management/bookings/{{.ID}}" class="hover:bg-gray-200">
|
|
||||||
<p class="text-sm font-medium text-gray-900">Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</p>
|
|
||||||
<p class="text-sm text-gray-500"></p>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
|
<dl class="space-y-4">
|
||||||
|
{{range .ViewState.vehicle_optional_fields}}
|
||||||
|
{{if index $.ViewState.vehicle.Data .name}}
|
||||||
|
<div>
|
||||||
|
<dt class="text-sm font-medium text-gray-500">{{.label}}</dt>
|
||||||
|
<dd class="mt-1 text-sm text-gray-900">
|
||||||
|
{{if eq .type "select"}}
|
||||||
|
{{$fieldValue := index $.ViewState.vehicle.Data .name}}
|
||||||
|
{{range .options}}
|
||||||
|
{{if eq .value $fieldValue}}{{.label}}{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
{{else}}
|
||||||
|
{{index $.ViewState.vehicle.Data .name}}
|
||||||
|
{{end}}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,9 @@
|
|||||||
fields: {
|
fields: {
|
||||||
licence_plate: '{{ .ViewState.vehicle.Data.licence_plate }}',
|
licence_plate: '{{ .ViewState.vehicle.Data.licence_plate }}',
|
||||||
name: '{{ .ViewState.vehicle.Data.name }}',
|
name: '{{ .ViewState.vehicle.Data.name }}',
|
||||||
|
type: '{{ .ViewState.vehicle.Type }}',
|
||||||
kilometers: '{{ .ViewState.vehicle.Data.kilometers }}',
|
kilometers: '{{ .ViewState.vehicle.Data.kilometers }}',
|
||||||
informations: '{{ .ViewState.vahicle.Data.informations}}',
|
informations: '{{ .ViewState.vehicle.Data.informations}}',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
licence_plate: ['required', 'regexMatch:^[A-Z]{1,2}-[0-9]{1,3}-[A-Z]{1,2}$'],
|
licence_plate: ['required', 'regexMatch:^[A-Z]{1,2}-[0-9]{1,3}-[A-Z]{1,2}$'],
|
||||||
@@ -86,7 +87,7 @@
|
|||||||
<legend class="sr-only">Automatique</legend>
|
<legend class="sr-only">Automatique</legend>
|
||||||
<div class="relative flex items-start">
|
<div class="relative flex items-start">
|
||||||
<div class="flex h-5 items-center">
|
<div class="flex h-5 items-center">
|
||||||
<input id="automatic" aria-describedby="automatic-description" name="automatic" type="checkbox" class="h-4 w-4 rounded border-gray-300 text-co-blue focus:ring-co-blue">
|
<input id="automatic" aria-describedby="automatic-description" name="automatic" type="checkbox" {{if .ViewState.vehicle.Data.automatic}}checked{{end}} class="h-4 w-4 rounded border-gray-300 text-co-blue focus:ring-co-blue">
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-3 text-sm">
|
<div class="ml-3 text-sm">
|
||||||
<label for="automatic" class="font-medium text-gray-700">Automatique</label>
|
<label for="automatic" class="font-medium text-gray-700">Automatique</label>
|
||||||
@@ -126,8 +127,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||||
{{ $fieldName := "address" }}
|
{{ $fieldName := "address" }}
|
||||||
{{if .ViewState.Data.address}}
|
{{if .ViewState.vehicle.Data.address}}
|
||||||
{{$default := .ViewState.Data.address}}
|
{{$default := .ViewState.vehicle.Data.address}}
|
||||||
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
||||||
@@ -144,6 +145,48 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if .ViewState.vehicle_optional_fields}}
|
||||||
|
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
||||||
|
<div class="md:grid md:grid-cols-3 md:gap-6">
|
||||||
|
<div class="md:col-span-1">
|
||||||
|
<h3 class="text-lg font-medium leading-6 text-gray-900">Autres propriétés</h3>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">Informations complémentaires sur le véhicule</p>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||||
|
<div class="grid grid-cols-6 gap-6">
|
||||||
|
{{range .ViewState.vehicle_optional_fields}}
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
||||||
|
{{if eq .type "select"}}
|
||||||
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
|
<select id="{{.name}}" name="{{.name}}"
|
||||||
|
class="p-2 max-w-lg mt-1 block focus:ring-co-blue focus:border-co-blue w-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{range .options}}
|
||||||
|
<option value="{{.value}}" {{if eq .value (index $.ViewState.vehicle.Data .name)}}selected{{end}}>{{.label}}</option>
|
||||||
|
{{end}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{else if eq .type "textarea"}}
|
||||||
|
<textarea id="{{.name}}" name="{{.name}}" rows="3"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">{{index $.ViewState.vehicle.Data .name}}</textarea>
|
||||||
|
{{else if eq .type "date"}}
|
||||||
|
<input type="date" id="{{.name}}" name="{{.name}}" value="{{index $.ViewState.vehicle.Data .name}}"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{else if eq .type "number"}}
|
||||||
|
<input type="number" id="{{.name}}" name="{{.name}}" value="{{index $.ViewState.vehicle.Data .name}}"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{else}}
|
||||||
|
<input type="text" id="{{.name}}" name="{{.name}}" value="{{index $.ViewState.vehicle.Data .name}}"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||||
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle.ID}}">
|
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle.ID}}">
|
||||||
|
|||||||
@@ -8,12 +8,23 @@
|
|||||||
"Courier New", monospace;
|
"Courier New", monospace;
|
||||||
--color-red-500: oklch(0.637 0.237 25.331);
|
--color-red-500: oklch(0.637 0.237 25.331);
|
||||||
--color-red-600: oklch(0.577 0.245 27.325);
|
--color-red-600: oklch(0.577 0.245 27.325);
|
||||||
|
--color-red-700: oklch(0.505 0.213 27.518);
|
||||||
--color-red-900: oklch(0.396 0.141 25.723);
|
--color-red-900: oklch(0.396 0.141 25.723);
|
||||||
|
--color-orange-50: oklch(0.98 0.016 73.684);
|
||||||
|
--color-orange-200: oklch(0.901 0.076 70.697);
|
||||||
|
--color-yellow-50: oklch(0.987 0.026 102.212);
|
||||||
|
--color-green-50: oklch(0.982 0.018 155.826);
|
||||||
--color-green-100: oklch(0.962 0.044 156.743);
|
--color-green-100: oklch(0.962 0.044 156.743);
|
||||||
|
--color-green-200: oklch(0.925 0.084 155.995);
|
||||||
--color-green-600: oklch(0.627 0.194 149.214);
|
--color-green-600: oklch(0.627 0.194 149.214);
|
||||||
--color-green-800: oklch(0.448 0.119 151.328);
|
--color-green-800: oklch(0.448 0.119 151.328);
|
||||||
|
--color-blue-50: oklch(0.97 0.014 254.604);
|
||||||
|
--color-blue-100: oklch(0.932 0.032 255.585);
|
||||||
|
--color-blue-200: oklch(0.882 0.059 254.128);
|
||||||
--color-blue-500: oklch(0.623 0.214 259.815);
|
--color-blue-500: oklch(0.623 0.214 259.815);
|
||||||
|
--color-blue-600: oklch(0.546 0.245 262.881);
|
||||||
--color-blue-700: oklch(0.488 0.243 264.376);
|
--color-blue-700: oklch(0.488 0.243 264.376);
|
||||||
|
--color-blue-800: oklch(0.424 0.199 265.638);
|
||||||
--color-indigo-50: oklch(0.962 0.018 272.314);
|
--color-indigo-50: oklch(0.962 0.018 272.314);
|
||||||
--color-indigo-500: oklch(0.585 0.233 277.117);
|
--color-indigo-500: oklch(0.585 0.233 277.117);
|
||||||
--color-indigo-600: oklch(0.511 0.262 276.966);
|
--color-indigo-600: oklch(0.511 0.262 276.966);
|
||||||
@@ -36,6 +47,7 @@
|
|||||||
--container-lg: 32rem;
|
--container-lg: 32rem;
|
||||||
--container-2xl: 42rem;
|
--container-2xl: 42rem;
|
||||||
--container-3xl: 48rem;
|
--container-3xl: 48rem;
|
||||||
|
--container-6xl: 72rem;
|
||||||
--container-7xl: 80rem;
|
--container-7xl: 80rem;
|
||||||
--text-xs: 0.75rem;
|
--text-xs: 0.75rem;
|
||||||
--text-xs--line-height: calc(1 / 0.75);
|
--text-xs--line-height: calc(1 / 0.75);
|
||||||
@@ -81,9 +93,11 @@
|
|||||||
--font-mono--font-variation-settings
|
--font-mono--font-variation-settings
|
||||||
);
|
);
|
||||||
--color-co-blue: #243887;
|
--color-co-blue: #243887;
|
||||||
|
--color-co-lightblue: #907eff;
|
||||||
--color-co-red: #ff1300;
|
--color-co-red: #ff1300;
|
||||||
--color-co-green: #6cc11f;
|
--color-co-green: #6cc11f;
|
||||||
--color-co-yellow: #ffdd00;
|
--color-co-yellow: #ffdd00;
|
||||||
|
--color-co-orange: #ff5300;
|
||||||
--radius-co: 40%;
|
--radius-co: 40%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,6 +321,9 @@
|
|||||||
.right-0 {
|
.right-0 {
|
||||||
right: calc(var(--spacing) * 0);
|
right: calc(var(--spacing) * 0);
|
||||||
}
|
}
|
||||||
|
.right-4 {
|
||||||
|
right: calc(var(--spacing) * 4);
|
||||||
|
}
|
||||||
.left-0 {
|
.left-0 {
|
||||||
left: calc(var(--spacing) * 0);
|
left: calc(var(--spacing) * 0);
|
||||||
}
|
}
|
||||||
@@ -472,6 +489,9 @@
|
|||||||
.mx-auto {
|
.mx-auto {
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
}
|
}
|
||||||
|
.-my-1 {
|
||||||
|
margin-block: calc(var(--spacing) * -1);
|
||||||
|
}
|
||||||
.-my-1\.5 {
|
.-my-1\.5 {
|
||||||
margin-block: calc(var(--spacing) * -1.5);
|
margin-block: calc(var(--spacing) * -1.5);
|
||||||
}
|
}
|
||||||
@@ -496,6 +516,12 @@
|
|||||||
.-mt-4 {
|
.-mt-4 {
|
||||||
margin-top: calc(var(--spacing) * -4);
|
margin-top: calc(var(--spacing) * -4);
|
||||||
}
|
}
|
||||||
|
.mt-0 {
|
||||||
|
margin-top: calc(var(--spacing) * 0);
|
||||||
|
}
|
||||||
|
.mt-0\.5 {
|
||||||
|
margin-top: calc(var(--spacing) * 0.5);
|
||||||
|
}
|
||||||
.mt-1 {
|
.mt-1 {
|
||||||
margin-top: calc(var(--spacing) * 1);
|
margin-top: calc(var(--spacing) * 1);
|
||||||
}
|
}
|
||||||
@@ -520,6 +546,9 @@
|
|||||||
.mt-10 {
|
.mt-10 {
|
||||||
margin-top: calc(var(--spacing) * 10);
|
margin-top: calc(var(--spacing) * 10);
|
||||||
}
|
}
|
||||||
|
.-mr-1 {
|
||||||
|
margin-right: calc(var(--spacing) * -1);
|
||||||
|
}
|
||||||
.-mr-1\.5 {
|
.-mr-1\.5 {
|
||||||
margin-right: calc(var(--spacing) * -1.5);
|
margin-right: calc(var(--spacing) * -1.5);
|
||||||
}
|
}
|
||||||
@@ -547,6 +576,15 @@
|
|||||||
.-mb-px {
|
.-mb-px {
|
||||||
margin-bottom: -1px;
|
margin-bottom: -1px;
|
||||||
}
|
}
|
||||||
|
.mb-1 {
|
||||||
|
margin-bottom: calc(var(--spacing) * 1);
|
||||||
|
}
|
||||||
|
.mb-2 {
|
||||||
|
margin-bottom: calc(var(--spacing) * 2);
|
||||||
|
}
|
||||||
|
.mb-3 {
|
||||||
|
margin-bottom: calc(var(--spacing) * 3);
|
||||||
|
}
|
||||||
.mb-4 {
|
.mb-4 {
|
||||||
margin-bottom: calc(var(--spacing) * 4);
|
margin-bottom: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
@@ -677,9 +715,15 @@
|
|||||||
.h-0 {
|
.h-0 {
|
||||||
height: calc(var(--spacing) * 0);
|
height: calc(var(--spacing) * 0);
|
||||||
}
|
}
|
||||||
|
.h-2 {
|
||||||
|
height: calc(var(--spacing) * 2);
|
||||||
|
}
|
||||||
.h-3 {
|
.h-3 {
|
||||||
height: calc(var(--spacing) * 3);
|
height: calc(var(--spacing) * 3);
|
||||||
}
|
}
|
||||||
|
.h-3\.5 {
|
||||||
|
height: calc(var(--spacing) * 3.5);
|
||||||
|
}
|
||||||
.h-4 {
|
.h-4 {
|
||||||
height: calc(var(--spacing) * 4);
|
height: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
@@ -713,6 +757,9 @@
|
|||||||
.max-h-60 {
|
.max-h-60 {
|
||||||
max-height: calc(var(--spacing) * 60);
|
max-height: calc(var(--spacing) * 60);
|
||||||
}
|
}
|
||||||
|
.max-h-96 {
|
||||||
|
max-height: calc(var(--spacing) * 96);
|
||||||
|
}
|
||||||
.max-h-none {
|
.max-h-none {
|
||||||
max-height: none;
|
max-height: none;
|
||||||
}
|
}
|
||||||
@@ -728,9 +775,15 @@
|
|||||||
.min-h-screen {
|
.min-h-screen {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
.w-0 {
|
||||||
|
width: calc(var(--spacing) * 0);
|
||||||
|
}
|
||||||
.w-0\.5 {
|
.w-0\.5 {
|
||||||
width: calc(var(--spacing) * 0.5);
|
width: calc(var(--spacing) * 0.5);
|
||||||
}
|
}
|
||||||
|
.w-1 {
|
||||||
|
width: calc(var(--spacing) * 1);
|
||||||
|
}
|
||||||
.w-1\/2 {
|
.w-1\/2 {
|
||||||
width: calc(1/2 * 100%);
|
width: calc(1/2 * 100%);
|
||||||
}
|
}
|
||||||
@@ -740,9 +793,15 @@
|
|||||||
.w-1\/6 {
|
.w-1\/6 {
|
||||||
width: calc(1/6 * 100%);
|
width: calc(1/6 * 100%);
|
||||||
}
|
}
|
||||||
|
.w-2 {
|
||||||
|
width: calc(var(--spacing) * 2);
|
||||||
|
}
|
||||||
.w-3 {
|
.w-3 {
|
||||||
width: calc(var(--spacing) * 3);
|
width: calc(var(--spacing) * 3);
|
||||||
}
|
}
|
||||||
|
.w-3\.5 {
|
||||||
|
width: calc(var(--spacing) * 3.5);
|
||||||
|
}
|
||||||
.w-4 {
|
.w-4 {
|
||||||
width: calc(var(--spacing) * 4);
|
width: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
@@ -770,9 +829,24 @@
|
|||||||
.w-16 {
|
.w-16 {
|
||||||
width: calc(var(--spacing) * 16);
|
width: calc(var(--spacing) * 16);
|
||||||
}
|
}
|
||||||
|
.w-32 {
|
||||||
|
width: calc(var(--spacing) * 32);
|
||||||
|
}
|
||||||
|
.w-36 {
|
||||||
|
width: calc(var(--spacing) * 36);
|
||||||
|
}
|
||||||
|
.w-40 {
|
||||||
|
width: calc(var(--spacing) * 40);
|
||||||
|
}
|
||||||
.w-48 {
|
.w-48 {
|
||||||
width: calc(var(--spacing) * 48);
|
width: calc(var(--spacing) * 48);
|
||||||
}
|
}
|
||||||
|
.w-80 {
|
||||||
|
width: calc(var(--spacing) * 80);
|
||||||
|
}
|
||||||
|
.w-96 {
|
||||||
|
width: calc(var(--spacing) * 96);
|
||||||
|
}
|
||||||
.w-auto {
|
.w-auto {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
@@ -788,6 +862,9 @@
|
|||||||
.max-w-3xl {
|
.max-w-3xl {
|
||||||
max-width: var(--container-3xl);
|
max-width: var(--container-3xl);
|
||||||
}
|
}
|
||||||
|
.max-w-6xl {
|
||||||
|
max-width: var(--container-6xl);
|
||||||
|
}
|
||||||
.max-w-7xl {
|
.max-w-7xl {
|
||||||
max-width: var(--container-7xl);
|
max-width: var(--container-7xl);
|
||||||
}
|
}
|
||||||
@@ -797,6 +874,9 @@
|
|||||||
.max-w-lg {
|
.max-w-lg {
|
||||||
max-width: var(--container-lg);
|
max-width: var(--container-lg);
|
||||||
}
|
}
|
||||||
|
.max-w-md {
|
||||||
|
max-width: var(--container-md);
|
||||||
|
}
|
||||||
.max-w-none {
|
.max-w-none {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
@@ -1246,9 +1326,15 @@
|
|||||||
.justify-items-stretch {
|
.justify-items-stretch {
|
||||||
justify-items: stretch;
|
justify-items: stretch;
|
||||||
}
|
}
|
||||||
|
.gap-1 {
|
||||||
|
gap: calc(var(--spacing) * 1);
|
||||||
|
}
|
||||||
.gap-2 {
|
.gap-2 {
|
||||||
gap: calc(var(--spacing) * 2);
|
gap: calc(var(--spacing) * 2);
|
||||||
}
|
}
|
||||||
|
.gap-3 {
|
||||||
|
gap: calc(var(--spacing) * 3);
|
||||||
|
}
|
||||||
.gap-4 {
|
.gap-4 {
|
||||||
gap: calc(var(--spacing) * 4);
|
gap: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
@@ -1499,6 +1585,9 @@
|
|||||||
.rounded-md {
|
.rounded-md {
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
}
|
}
|
||||||
|
.rounded-none {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
.rounded-xl {
|
.rounded-xl {
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
}
|
}
|
||||||
@@ -1538,6 +1627,10 @@
|
|||||||
border-top-left-radius: var(--radius-3xl);
|
border-top-left-radius: var(--radius-3xl);
|
||||||
border-bottom-left-radius: var(--radius-3xl);
|
border-bottom-left-radius: var(--radius-3xl);
|
||||||
}
|
}
|
||||||
|
.rounded-l-lg {
|
||||||
|
border-top-left-radius: var(--radius-lg);
|
||||||
|
border-bottom-left-radius: var(--radius-lg);
|
||||||
|
}
|
||||||
.rounded-l-md {
|
.rounded-l-md {
|
||||||
border-top-left-radius: var(--radius-md);
|
border-top-left-radius: var(--radius-md);
|
||||||
border-bottom-left-radius: var(--radius-md);
|
border-bottom-left-radius: var(--radius-md);
|
||||||
@@ -1557,6 +1650,10 @@
|
|||||||
border-top-right-radius: var(--radius-3xl);
|
border-top-right-radius: var(--radius-3xl);
|
||||||
border-bottom-right-radius: var(--radius-3xl);
|
border-bottom-right-radius: var(--radius-3xl);
|
||||||
}
|
}
|
||||||
|
.rounded-r-lg {
|
||||||
|
border-top-right-radius: var(--radius-lg);
|
||||||
|
border-bottom-right-radius: var(--radius-lg);
|
||||||
|
}
|
||||||
.rounded-r-md {
|
.rounded-r-md {
|
||||||
border-top-right-radius: var(--radius-md);
|
border-top-right-radius: var(--radius-md);
|
||||||
border-bottom-right-radius: var(--radius-md);
|
border-bottom-right-radius: var(--radius-md);
|
||||||
@@ -1642,6 +1739,10 @@
|
|||||||
border-left-style: var(--tw-border-style);
|
border-left-style: var(--tw-border-style);
|
||||||
border-left-width: 0px;
|
border-left-width: 0px;
|
||||||
}
|
}
|
||||||
|
.border-l-4 {
|
||||||
|
border-left-style: var(--tw-border-style);
|
||||||
|
border-left-width: 4px;
|
||||||
|
}
|
||||||
.border-dashed {
|
.border-dashed {
|
||||||
--tw-border-style: dashed;
|
--tw-border-style: dashed;
|
||||||
border-style: dashed;
|
border-style: dashed;
|
||||||
@@ -1666,9 +1767,24 @@
|
|||||||
--tw-border-style: solid;
|
--tw-border-style: solid;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
}
|
}
|
||||||
|
.border-blue-200 {
|
||||||
|
border-color: var(--color-blue-200);
|
||||||
|
}
|
||||||
.border-co-blue {
|
.border-co-blue {
|
||||||
border-color: var(--color-co-blue);
|
border-color: var(--color-co-blue);
|
||||||
}
|
}
|
||||||
|
.border-co-green {
|
||||||
|
border-color: var(--color-co-green);
|
||||||
|
}
|
||||||
|
.border-co-green\/30 {
|
||||||
|
border-color: color-mix(in oklab, var(--color-co-green) 30%, transparent);
|
||||||
|
}
|
||||||
|
.border-co-lightblue {
|
||||||
|
border-color: var(--color-co-lightblue);
|
||||||
|
}
|
||||||
|
.border-co-orange {
|
||||||
|
border-color: var(--color-co-orange);
|
||||||
|
}
|
||||||
.border-co-red {
|
.border-co-red {
|
||||||
border-color: var(--color-co-red);
|
border-color: var(--color-co-red);
|
||||||
}
|
}
|
||||||
@@ -1678,12 +1794,21 @@
|
|||||||
.border-gray-300 {
|
.border-gray-300 {
|
||||||
border-color: var(--color-gray-300);
|
border-color: var(--color-gray-300);
|
||||||
}
|
}
|
||||||
|
.border-green-200 {
|
||||||
|
border-color: var(--color-green-200);
|
||||||
|
}
|
||||||
.border-indigo-500 {
|
.border-indigo-500 {
|
||||||
border-color: var(--color-indigo-500);
|
border-color: var(--color-indigo-500);
|
||||||
}
|
}
|
||||||
|
.border-orange-200 {
|
||||||
|
border-color: var(--color-orange-200);
|
||||||
|
}
|
||||||
.border-transparent {
|
.border-transparent {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
}
|
}
|
||||||
|
.border-white {
|
||||||
|
border-color: var(--color-white);
|
||||||
|
}
|
||||||
.bg-\(--my_variable\) {
|
.bg-\(--my_variable\) {
|
||||||
background-color: var(--my_variable);
|
background-color: var(--my_variable);
|
||||||
}
|
}
|
||||||
@@ -1702,12 +1827,36 @@
|
|||||||
.bg-black {
|
.bg-black {
|
||||||
background-color: var(--color-black);
|
background-color: var(--color-black);
|
||||||
}
|
}
|
||||||
|
.bg-blue-50 {
|
||||||
|
background-color: var(--color-blue-50);
|
||||||
|
}
|
||||||
|
.bg-blue-100 {
|
||||||
|
background-color: var(--color-blue-100);
|
||||||
|
}
|
||||||
|
.bg-blue-600 {
|
||||||
|
background-color: var(--color-blue-600);
|
||||||
|
}
|
||||||
.bg-co-blue {
|
.bg-co-blue {
|
||||||
background-color: var(--color-co-blue);
|
background-color: var(--color-co-blue);
|
||||||
}
|
}
|
||||||
|
.bg-co-blue\/5 {
|
||||||
|
background-color: color-mix(in oklab, var(--color-co-blue) 5%, transparent);
|
||||||
|
}
|
||||||
.bg-co-green {
|
.bg-co-green {
|
||||||
background-color: var(--color-co-green);
|
background-color: var(--color-co-green);
|
||||||
}
|
}
|
||||||
|
.bg-co-green\/10 {
|
||||||
|
background-color: color-mix(in oklab, var(--color-co-green) 10%, transparent);
|
||||||
|
}
|
||||||
|
.bg-co-green\/20 {
|
||||||
|
background-color: color-mix(in oklab, var(--color-co-green) 20%, transparent);
|
||||||
|
}
|
||||||
|
.bg-co-lightblue {
|
||||||
|
background-color: var(--color-co-lightblue);
|
||||||
|
}
|
||||||
|
.bg-co-orange {
|
||||||
|
background-color: var(--color-co-orange);
|
||||||
|
}
|
||||||
.bg-co-red {
|
.bg-co-red {
|
||||||
background-color: var(--color-co-red);
|
background-color: var(--color-co-red);
|
||||||
}
|
}
|
||||||
@@ -1735,15 +1884,24 @@
|
|||||||
.bg-gray-900 {
|
.bg-gray-900 {
|
||||||
background-color: var(--color-gray-900);
|
background-color: var(--color-gray-900);
|
||||||
}
|
}
|
||||||
|
.bg-green-50 {
|
||||||
|
background-color: var(--color-green-50);
|
||||||
|
}
|
||||||
.bg-green-100 {
|
.bg-green-100 {
|
||||||
background-color: var(--color-green-100);
|
background-color: var(--color-green-100);
|
||||||
}
|
}
|
||||||
|
.bg-green-600 {
|
||||||
|
background-color: var(--color-green-600);
|
||||||
|
}
|
||||||
.bg-indigo-50 {
|
.bg-indigo-50 {
|
||||||
background-color: var(--color-indigo-50);
|
background-color: var(--color-indigo-50);
|
||||||
}
|
}
|
||||||
.bg-indigo-600 {
|
.bg-indigo-600 {
|
||||||
background-color: var(--color-indigo-600);
|
background-color: var(--color-indigo-600);
|
||||||
}
|
}
|
||||||
|
.bg-orange-50 {
|
||||||
|
background-color: var(--color-orange-50);
|
||||||
|
}
|
||||||
.bg-red-500 {
|
.bg-red-500 {
|
||||||
background-color: var(--color-red-500);
|
background-color: var(--color-red-500);
|
||||||
}
|
}
|
||||||
@@ -1753,9 +1911,18 @@
|
|||||||
.bg-red-500\/\[50\%\] {
|
.bg-red-500\/\[50\%\] {
|
||||||
background-color: color-mix(in oklab, var(--color-red-500) 50%, transparent);
|
background-color: color-mix(in oklab, var(--color-red-500) 50%, transparent);
|
||||||
}
|
}
|
||||||
|
.bg-red-600 {
|
||||||
|
background-color: var(--color-red-600);
|
||||||
|
}
|
||||||
.bg-white {
|
.bg-white {
|
||||||
background-color: var(--color-white);
|
background-color: var(--color-white);
|
||||||
}
|
}
|
||||||
|
.bg-white\/20 {
|
||||||
|
background-color: color-mix(in oklab, var(--color-white) 20%, transparent);
|
||||||
|
}
|
||||||
|
.bg-yellow-50 {
|
||||||
|
background-color: var(--color-yellow-50);
|
||||||
|
}
|
||||||
.-bg-conic {
|
.-bg-conic {
|
||||||
--tw-gradient-position: in oklab;
|
--tw-gradient-position: in oklab;
|
||||||
background-image: conic-gradient(var(--tw-gradient-stops));
|
background-image: conic-gradient(var(--tw-gradient-stops));
|
||||||
@@ -1764,6 +1931,10 @@
|
|||||||
--tw-gradient-position: in oklab;
|
--tw-gradient-position: in oklab;
|
||||||
background-image: conic-gradient(var(--tw-gradient-stops));
|
background-image: conic-gradient(var(--tw-gradient-stops));
|
||||||
}
|
}
|
||||||
|
.bg-gradient-to-r {
|
||||||
|
--tw-gradient-position: to right in oklab;
|
||||||
|
background-image: linear-gradient(var(--tw-gradient-stops));
|
||||||
|
}
|
||||||
.bg-radial {
|
.bg-radial {
|
||||||
--tw-gradient-position: in oklab;
|
--tw-gradient-position: in oklab;
|
||||||
background-image: radial-gradient(var(--tw-gradient-stops));
|
background-image: radial-gradient(var(--tw-gradient-stops));
|
||||||
@@ -1774,6 +1945,14 @@
|
|||||||
.via-none {
|
.via-none {
|
||||||
--tw-gradient-via-stops: initial;
|
--tw-gradient-via-stops: initial;
|
||||||
}
|
}
|
||||||
|
.from-co-blue {
|
||||||
|
--tw-gradient-from: var(--color-co-blue);
|
||||||
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
||||||
|
}
|
||||||
|
.to-blue-600 {
|
||||||
|
--tw-gradient-to: var(--color-blue-600);
|
||||||
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
||||||
|
}
|
||||||
.box-decoration-clone {
|
.box-decoration-clone {
|
||||||
-webkit-box-decoration-break: clone;
|
-webkit-box-decoration-break: clone;
|
||||||
box-decoration-break: clone;
|
box-decoration-break: clone;
|
||||||
@@ -1877,6 +2056,9 @@
|
|||||||
.fill-none {
|
.fill-none {
|
||||||
fill: none;
|
fill: none;
|
||||||
}
|
}
|
||||||
|
.stroke-gray-700 {
|
||||||
|
stroke: var(--color-gray-700);
|
||||||
|
}
|
||||||
.stroke-gray-800 {
|
.stroke-gray-800 {
|
||||||
stroke: var(--color-gray-800);
|
stroke: var(--color-gray-800);
|
||||||
}
|
}
|
||||||
@@ -1940,9 +2122,18 @@
|
|||||||
.p-2 {
|
.p-2 {
|
||||||
padding: calc(var(--spacing) * 2);
|
padding: calc(var(--spacing) * 2);
|
||||||
}
|
}
|
||||||
|
.p-3 {
|
||||||
|
padding: calc(var(--spacing) * 3);
|
||||||
|
}
|
||||||
.p-4 {
|
.p-4 {
|
||||||
padding: calc(var(--spacing) * 4);
|
padding: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
|
.p-6 {
|
||||||
|
padding: calc(var(--spacing) * 6);
|
||||||
|
}
|
||||||
|
.p-8 {
|
||||||
|
padding: calc(var(--spacing) * 8);
|
||||||
|
}
|
||||||
.p-10 {
|
.p-10 {
|
||||||
padding: calc(var(--spacing) * 10);
|
padding: calc(var(--spacing) * 10);
|
||||||
}
|
}
|
||||||
@@ -1967,6 +2158,9 @@
|
|||||||
.px-6 {
|
.px-6 {
|
||||||
padding-inline: calc(var(--spacing) * 6);
|
padding-inline: calc(var(--spacing) * 6);
|
||||||
}
|
}
|
||||||
|
.py-0 {
|
||||||
|
padding-block: calc(var(--spacing) * 0);
|
||||||
|
}
|
||||||
.py-0\.5 {
|
.py-0\.5 {
|
||||||
padding-block: calc(var(--spacing) * 0.5);
|
padding-block: calc(var(--spacing) * 0.5);
|
||||||
}
|
}
|
||||||
@@ -1979,6 +2173,9 @@
|
|||||||
.py-2 {
|
.py-2 {
|
||||||
padding-block: calc(var(--spacing) * 2);
|
padding-block: calc(var(--spacing) * 2);
|
||||||
}
|
}
|
||||||
|
.py-2\.5 {
|
||||||
|
padding-block: calc(var(--spacing) * 2.5);
|
||||||
|
}
|
||||||
.py-3 {
|
.py-3 {
|
||||||
padding-block: calc(var(--spacing) * 3);
|
padding-block: calc(var(--spacing) * 3);
|
||||||
}
|
}
|
||||||
@@ -2003,6 +2200,9 @@
|
|||||||
.py-12 {
|
.py-12 {
|
||||||
padding-block: calc(var(--spacing) * 12);
|
padding-block: calc(var(--spacing) * 12);
|
||||||
}
|
}
|
||||||
|
.pt-1 {
|
||||||
|
padding-top: calc(var(--spacing) * 1);
|
||||||
|
}
|
||||||
.pt-1\.5 {
|
.pt-1\.5 {
|
||||||
padding-top: calc(var(--spacing) * 1.5);
|
padding-top: calc(var(--spacing) * 1.5);
|
||||||
}
|
}
|
||||||
@@ -2260,8 +2460,11 @@
|
|||||||
.\[color\:red\]\/50\! {
|
.\[color\:red\]\/50\! {
|
||||||
color: color-mix(in oklab, red 50%, transparent) !important;
|
color: color-mix(in oklab, red 50%, transparent) !important;
|
||||||
}
|
}
|
||||||
.text-black {
|
.text-blue-100 {
|
||||||
color: var(--color-black);
|
color: var(--color-blue-100);
|
||||||
|
}
|
||||||
|
.text-blue-800 {
|
||||||
|
color: var(--color-blue-800);
|
||||||
}
|
}
|
||||||
.text-co-blue {
|
.text-co-blue {
|
||||||
color: var(--color-co-blue);
|
color: var(--color-co-blue);
|
||||||
@@ -2269,6 +2472,12 @@
|
|||||||
.text-co-green {
|
.text-co-green {
|
||||||
color: var(--color-co-green);
|
color: var(--color-co-green);
|
||||||
}
|
}
|
||||||
|
.text-co-lightblue {
|
||||||
|
color: var(--color-co-lightblue);
|
||||||
|
}
|
||||||
|
.text-co-orange {
|
||||||
|
color: var(--color-co-orange);
|
||||||
|
}
|
||||||
.text-co-red {
|
.text-co-red {
|
||||||
color: var(--color-co-red);
|
color: var(--color-co-red);
|
||||||
}
|
}
|
||||||
@@ -2305,6 +2514,9 @@
|
|||||||
.text-white {
|
.text-white {
|
||||||
color: var(--color-white);
|
color: var(--color-white);
|
||||||
}
|
}
|
||||||
|
.text-white\/70 {
|
||||||
|
color: color-mix(in oklab, var(--color-white) 70%, transparent);
|
||||||
|
}
|
||||||
.capitalize {
|
.capitalize {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
@@ -2466,6 +2678,9 @@
|
|||||||
.opacity-30 {
|
.opacity-30 {
|
||||||
opacity: 30%;
|
opacity: 30%;
|
||||||
}
|
}
|
||||||
|
.opacity-90 {
|
||||||
|
opacity: 90%;
|
||||||
|
}
|
||||||
.opacity-100 {
|
.opacity-100 {
|
||||||
opacity: 100%;
|
opacity: 100%;
|
||||||
}
|
}
|
||||||
@@ -2487,6 +2702,10 @@
|
|||||||
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
||||||
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
||||||
}
|
}
|
||||||
|
.shadow-md {
|
||||||
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
||||||
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
||||||
|
}
|
||||||
.shadow-sm {
|
.shadow-sm {
|
||||||
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
||||||
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
||||||
@@ -2878,6 +3097,16 @@
|
|||||||
outline-style: none;
|
outline-style: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hover\:scale-110 {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
--tw-scale-x: 110%;
|
||||||
|
--tw-scale-y: 110%;
|
||||||
|
--tw-scale-z: 110%;
|
||||||
|
scale: var(--tw-scale-x) var(--tw-scale-y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.hover\:border-gray-300 {
|
.hover\:border-gray-300 {
|
||||||
&:hover {
|
&:hover {
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
@@ -2885,6 +3114,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hover\:border-gray-400 {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
border-color: var(--color-gray-400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.hover\:bg-blue-700 {
|
.hover\:bg-blue-700 {
|
||||||
&:hover {
|
&:hover {
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
@@ -2899,6 +3135,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hover\:bg-co-blue\/90 {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
background-color: color-mix(in oklab, var(--color-co-blue) 90%, transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.hover\:bg-co-red {
|
.hover\:bg-co-red {
|
||||||
&:hover {
|
&:hover {
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
@@ -2927,6 +3170,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hover\:bg-red-700 {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
background-color: var(--color-red-700);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.hover\:bg-white {
|
.hover\:bg-white {
|
||||||
&:hover {
|
&:hover {
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
@@ -2941,6 +3191,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hover\:text-co-green {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
color: var(--color-co-green);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hover\:text-co-green\/80 {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
color: color-mix(in oklab, var(--color-co-green) 80%, transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hover\:text-co-red\/80 {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
color: color-mix(in oklab, var(--color-co-red) 80%, transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.hover\:text-gray-500 {
|
.hover\:text-gray-500 {
|
||||||
&:hover {
|
&:hover {
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
@@ -2969,6 +3240,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hover\:text-green-800 {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
color: var(--color-green-800);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.hover\:text-inherit {
|
.hover\:text-inherit {
|
||||||
&:hover {
|
&:hover {
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
@@ -2990,6 +3268,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hover\:underline {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
text-decoration-line: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hover\:shadow-md {
|
||||||
|
&:hover {
|
||||||
|
@media (hover: hover) {
|
||||||
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
||||||
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.focus\:z-20 {
|
||||||
|
&:focus {
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
}
|
||||||
.focus\:border-blue-500 {
|
.focus\:border-blue-500 {
|
||||||
&:focus {
|
&:focus {
|
||||||
border-color: var(--color-blue-500);
|
border-color: var(--color-blue-500);
|
||||||
@@ -3045,6 +3343,11 @@
|
|||||||
--tw-ring-color: var(--color-co-blue);
|
--tw-ring-color: var(--color-co-blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.focus\:ring-co-blue\/20 {
|
||||||
|
&:focus {
|
||||||
|
--tw-ring-color: color-mix(in oklab, var(--color-co-blue) 20%, transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
.focus\:ring-co-red {
|
.focus\:ring-co-red {
|
||||||
&:focus {
|
&:focus {
|
||||||
--tw-ring-color: var(--color-co-red);
|
--tw-ring-color: var(--color-co-red);
|
||||||
@@ -3082,6 +3385,11 @@
|
|||||||
outline-offset: calc(2px * -1);
|
outline-offset: calc(2px * -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.focus\:outline-offset-0 {
|
||||||
|
&:focus {
|
||||||
|
outline-offset: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.focus\:outline-indigo-600 {
|
.focus\:outline-indigo-600 {
|
||||||
&:focus {
|
&:focus {
|
||||||
outline-color: var(--color-indigo-600);
|
outline-color: var(--color-indigo-600);
|
||||||
@@ -3098,6 +3406,12 @@
|
|||||||
--tw-ring-inset: inset;
|
--tw-ring-inset: inset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.focus-visible\:outline {
|
||||||
|
&:focus-visible {
|
||||||
|
outline-style: var(--tw-outline-style);
|
||||||
|
outline-width: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.focus-visible\:outline-2 {
|
.focus-visible\:outline-2 {
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
outline-style: var(--tw-outline-style);
|
outline-style: var(--tw-outline-style);
|
||||||
@@ -3109,6 +3423,16 @@
|
|||||||
outline-offset: calc(2px * -1);
|
outline-offset: calc(2px * -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.focus-visible\:outline-offset-2 {
|
||||||
|
&:focus-visible {
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.focus-visible\:outline-co-blue {
|
||||||
|
&:focus-visible {
|
||||||
|
outline-color: var(--color-co-blue);
|
||||||
|
}
|
||||||
|
}
|
||||||
.focus-visible\:outline-indigo-600 {
|
.focus-visible\:outline-indigo-600 {
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
outline-color: var(--color-indigo-600);
|
outline-color: var(--color-indigo-600);
|
||||||
@@ -3124,6 +3448,11 @@
|
|||||||
opacity: 30%;
|
opacity: 30%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.disabled\:opacity-50 {
|
||||||
|
&:disabled {
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
.sm\:col-span-1 {
|
.sm\:col-span-1 {
|
||||||
@media (width >= 40rem) {
|
@media (width >= 40rem) {
|
||||||
grid-column: span 1 / span 1;
|
grid-column: span 1 / span 1;
|
||||||
@@ -3851,6 +4180,48 @@
|
|||||||
inherits: false;
|
inherits: false;
|
||||||
initial-value: 0;
|
initial-value: 0;
|
||||||
}
|
}
|
||||||
|
@property --tw-gradient-position {
|
||||||
|
syntax: "*";
|
||||||
|
inherits: false;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-from {
|
||||||
|
syntax: "<color>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: #0000;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-via {
|
||||||
|
syntax: "<color>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: #0000;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-to {
|
||||||
|
syntax: "<color>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: #0000;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-stops {
|
||||||
|
syntax: "*";
|
||||||
|
inherits: false;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-via-stops {
|
||||||
|
syntax: "*";
|
||||||
|
inherits: false;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-from-position {
|
||||||
|
syntax: "<length-percentage>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: 0%;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-via-position {
|
||||||
|
syntax: "<length-percentage>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: 50%;
|
||||||
|
}
|
||||||
|
@property --tw-gradient-to-position {
|
||||||
|
syntax: "<length-percentage>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: 100%;
|
||||||
|
}
|
||||||
@property --tw-leading {
|
@property --tw-leading {
|
||||||
syntax: "*";
|
syntax: "*";
|
||||||
inherits: false;
|
inherits: false;
|
||||||
|
|||||||
Reference in New Issue
Block a user