Compare commits
9 Commits
aa97b97f22
...
addInfoInC
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5382917cd | ||
|
|
ac413680e0 | ||
|
|
405038be3a | ||
|
|
4af0ffd3d6 | ||
|
|
9641f8e700 | ||
|
|
c46c03fc4f | ||
|
|
94b621e883 | ||
|
|
bc2f281e4c | ||
|
|
8156df8df1 |
25
config.yaml
25
config.yaml
@@ -27,13 +27,18 @@ views:
|
||||
- web/layouts/beneficiaries/_partials/beneficiary-journeys.html
|
||||
- web/layouts/beneficiaries/_partials/beneficiary-events.html
|
||||
- web/layouts/beneficiaries/_partials/beneficiary-files.html
|
||||
- web/layouts/beneficiaries/_partials/beneficiary-organizations.html
|
||||
- web/layouts/beneficiaries/display.html
|
||||
update:
|
||||
files:
|
||||
- web/layouts/_partials/address_autocomplete.html
|
||||
- web/layouts/beneficiaries/update.html
|
||||
|
||||
conseillers:
|
||||
display:
|
||||
files:
|
||||
- web/layouts/conseillers/display.html
|
||||
update:
|
||||
files:
|
||||
- web/layouts/conseillers/update.html
|
||||
vehicles:
|
||||
search:
|
||||
files:
|
||||
@@ -80,7 +85,6 @@ views:
|
||||
- web/layouts/agenda/home.html
|
||||
display_event:
|
||||
files:
|
||||
- web/layouts/agenda/_partials/subscribers-table.html
|
||||
- web/layouts/agenda/display-event.html
|
||||
create_event:
|
||||
files:
|
||||
@@ -99,6 +103,21 @@ views:
|
||||
- web/layouts/journeys/_partials/journeys-carpool.html
|
||||
- web/layouts/journeys/_partials/journeys-public-transit.html
|
||||
- web/layouts/journeys/search.html
|
||||
list:
|
||||
files:
|
||||
- web/layouts/journeys/group_management.html
|
||||
create:
|
||||
files:
|
||||
- web/layouts/journeys/create_groups.html
|
||||
- web/layouts/_partials/address_autocomplete.html
|
||||
display:
|
||||
files:
|
||||
- web/layouts/_partials/address_autocomplete.html
|
||||
- web/layouts/journeys/display_groups.html
|
||||
- web/layouts/journeys/_partials/map.html
|
||||
update:
|
||||
files:
|
||||
- web/layouts/journeys/update_groups.html
|
||||
support:
|
||||
request:
|
||||
files:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{define "content"}}
|
||||
<p>Bonjour,</p>
|
||||
<p>Vous avez demandé à réinitialiser votre mot de passe pour <b>{{.username}}</b></p>
|
||||
<p>Pour créer votre nouveau mot de passe, cliquez sur le lien suivant : <a href="https://spie06.parcoursmob.fr/auth/lost-password/recover?key={{.key}}">https://spie06.parcoursmob.fr/auth/lost-password/recover?key={{.key}}</a></p>
|
||||
<p>Pour créer votre nouveau mot de passe, cliquez sur le lien suivant : <a href="http://localhost:9000/auth/lost-password/recover?key={{.key}}">http://localhost:9000/auth/lost-password/recover?key={{.key}}</a></p>
|
||||
{{end}}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{define "content"}}
|
||||
<p>Vous avez une nouvelle réservation e véhicule sur PARCOURSMOB.</p>
|
||||
<p>Connectez vous sur <a href="https://spie06.parcoursmob.fr/app/vehicles-management/bookings/{{.bookingid}}">https://spie06.parcoursmob.fr/app/vehicles-management/bookings/{{.bookingid}}</a> pour y accéder</p>
|
||||
<p>Connectez vous sur <a href="http://localhost:9000/app/vehicles-management/bookings/{{.bookingid}}">http://localhost:9000/app/vehicles-management/bookings/{{.bookingid}}</a> pour y accéder</p>
|
||||
{{end}}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{define "content"}}
|
||||
<p>Vous avez été ajouté comme administrateur de l'organisation {{.group}} sur PARCOURSMOB.</p>
|
||||
<p>Connectez vous sur <a href="https://spie06.parcoursmob.fr">https://spie06.parcoursmob.fr</a> pour y accéder</p>
|
||||
<p>Connectez vous sur <a href="http://localhost:9000">http://localhost:9000</a> pour y accéder</p>
|
||||
{{end}}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{define "content"}}
|
||||
<p>Vous avez été ajouté à l'organisation {{.group}} sur PARCOURSMOB.</p>
|
||||
<p>Connectez vous sur <a href="https://spie06.parcoursmob.fr">https://spie06.parcoursmob.fr</a> pour y accéder</p>
|
||||
<p>Connectez vous sur <a href="http://localhost:9000">http://localhost:9000</a> pour y accéder</p>
|
||||
{{end}}
|
||||
@@ -1,5 +1,5 @@
|
||||
{{define "content"}}
|
||||
<p>Vous avez été ajouté comme administrateur de l'organisation {{.group}} sur PARCOURSMOB.</p>
|
||||
<p>Vous devez créer votre compte pour y accéder.</p>
|
||||
<p>Pour créer votre compte PARCOURSMOB, cliquez sur : <a href="https://spie06.parcoursmob.fr/auth/onboarding?key={{.key}}">https://spie06.parcoursmob.fr/auth/onboarding?key={{.key}}</a></p>
|
||||
<p>Pour créer votre compte PARCOURSMOB, cliquez sur : <a href="http://localhost:9000/auth/onboarding?key={{.key}}">http://localhost:9000/auth/onboarding?key={{.key}}</a></p>
|
||||
{{end}}
|
||||
@@ -1,5 +1,5 @@
|
||||
{{define "content"}}
|
||||
<p>Vous avez été ajouté à l'organisation {{.group}} sur PARCOURSMOB.</p>
|
||||
<p>Vous devez créer votre compte pour y accéder.</p>
|
||||
<p>Pour créer votre compte PARCOURSMOB, cliquez sur : <a href="https://spie06.parcoursmob.fr/auth/onboarding?key={{.key}}">https://spie06.parcoursmob.fr/auth/onboarding?key={{.key}}</a></p>
|
||||
<p>Pour créer votre compte PARCOURSMOB, cliquez sur : <a href="http://localhost:9000/auth/onboarding?key={{.key}}">http://localhost:9000/auth/onboarding?key={{.key}}</a></p>
|
||||
{{end}}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{define "content"}}
|
||||
<p>Vous avez reçu un message sur le support PARCOURSMOB de la part de <b>{{.user}}</b></p>
|
||||
<p>Vous avez reçu un commentaire sur PARCOURSMOB de la part de <b>{{.user}}</b></p>
|
||||
<p>{{.key}}</p>
|
||||
{{end}}
|
||||
@@ -11,7 +11,7 @@
|
||||
<img class="h-10 w-10 rounded-co" src="/app/beneficiaries/{{.ID}}/picture" alt="">
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<a href="#" class="focus:outline-none">
|
||||
<a href="/app/profile/{{.ID}}" class="focus:outline-none">
|
||||
<span class="absolute inset-0" aria-hidden="true"></span>
|
||||
<p class="text-sm font-medium text-gray-900">{{.Data.first_name}} {{.Data.last_name}}</p>
|
||||
<p class="text-sm text-gray-500 truncate">{{.Data.email}}</p>
|
||||
|
||||
@@ -122,6 +122,28 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-start">
|
||||
<div class="flex items-center h-5">
|
||||
<input id="support" name="modules.support" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="modules.support" class="font-medium text-gray-700">Support</label>
|
||||
<p class="text-gray-500">Contacter notre support en cas de problème.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-start">
|
||||
<div class="flex items-center h-5">
|
||||
<input id="group_module" name="modules.group_module" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="modules.group_module" class="font-medium text-gray-700">Groupes/Communautés</label>
|
||||
<p class="text-gray-500">Créer des groupes pour ses bénéficiaires.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -119,6 +119,28 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-start">
|
||||
<div class="flex items-center h-5">
|
||||
<input id="support" name="modules.support" type="checkbox" disabled {{if .ViewState.group.Data.modules.support}} checked{{end}}
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="modules.support" class="font-medium text-gray-700">Support</label>
|
||||
<p class="text-gray-500">Contacter notre support en cas de problème.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-start">
|
||||
<div class="flex items-center h-5">
|
||||
<input id="group_module" name="modules.group_module" type="checkbox" disabled {{if .ViewState.group.Data.modules.group_module}} checked{{end}}
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="modules.group_module" class="font-medium text-gray-700">Groupes/Communautés</label>
|
||||
<p class="text-gray-500">Créer des groupes pour ses bénéficiaires.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-start">
|
||||
<div class="flex items-center h-5">
|
||||
<input id="events" name="modules.events" type="checkbox" disabled {{if .ViewState.group.Data.modules.administration}} checked{{end}}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
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">Bénéficiaires</a>
|
||||
<p class="text-gray-500">{{len .ViewState.beneficiaries }} bénéficiaires</p>
|
||||
<p class="text-gray-500">{{len (index .ViewState.groups 0).Members}} bénéficiaires</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -43,7 +43,7 @@
|
||||
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">Référents</a>
|
||||
<p class="text-gray-500">{{len .ViewState.accounts}} membres</p>
|
||||
<p class="text-gray-500">1 membres</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -51,13 +51,13 @@
|
||||
<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 "tabler-icons:car" "h-6 w-6"}}
|
||||
{{.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">Véhicules</a>
|
||||
<p class="text-gray-500">{{len .ViewState.bookings}} réservations de véhicules</p>
|
||||
<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>
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{{define "subscribers_table"}}
|
||||
<table class="min-w-full divide-y divide-gray-300 border-t border-gray-200">
|
||||
<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 ">
|
||||
Bénéficiaire
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Prescripteur
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Date d'inscription
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">Actions</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.event.Subscriptions}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
<a href="/app/beneficiaries/{{.Subscriber}}" class="flex">
|
||||
<img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Subscriber}}/picture" alt=" "> {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="flex"><img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Data.subscribed_by.user.id}}/picture" alt=" "> {{.Data.subscribed_by.user.display_name}}</div>
|
||||
{{.Data.subscribed_by.group.name}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
{{(timeFormat .CreatedAt "02/01/2006")}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<!-- <a href=""
|
||||
class="text-co-blue hover:text-co-blue">Voir</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{end}}
|
||||
@@ -65,21 +65,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ if eq (index .ViewState.event.Owners 0) .Group.ID }}
|
||||
<section aria-labelledby="subscribers-table"></section>
|
||||
<div class="bg-white shadow sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<h2 id="event-information-title" class="text-lg leading-6 font-medium text-gray-900">Tous les inscrits</h2>
|
||||
</div>
|
||||
{{template "subscribers_table" .}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
</div>
|
||||
<section aria-labelledby="subscribers-title" class="lg:col-start-3 lg:col-span-1">
|
||||
<div class="bg-white px-4 py-5 shadow sm:rounded-lg sm:px-6" x-data="{
|
||||
<div class="bg-white px-4 py-5 shadow sm:rounded-lg sm:px-6">
|
||||
<h2 id="subscribers-title" class="text-lg font-medium text-gray-900">Inscrire un bénéficiaire</h2>
|
||||
{{if gt .ViewState.event.RemainingSubscriptions 0}}
|
||||
<form class="mt-4" action="/app/agenda/{{.ViewState.event.ID}}/subscribe" method="POST">
|
||||
<div class="relative mt-1 mb-4" x-data="{
|
||||
text: '',
|
||||
error: false,
|
||||
beneficiariesListOpen: false,
|
||||
beneficiaries: {{json .ViewState.beneficiaries}},
|
||||
filteredBeneficiaries: (text) => {
|
||||
@@ -94,19 +87,8 @@
|
||||
this.fields.beneficiaryid = beneficiary.id
|
||||
this.text = beneficiary.data.first_name + ' ' + beneficiary.data.last_name
|
||||
this.beneficiariesListOpen = false
|
||||
},
|
||||
submit(event) {
|
||||
if(!this.fields.beneficiaryid) {
|
||||
this.error = true
|
||||
event.preventDefault()
|
||||
}
|
||||
return this.formValidation.valid
|
||||
}
|
||||
}">
|
||||
<h2 id="subscribers-title" class="text-lg font-medium text-gray-900">Inscrire un bénéficiaire</h2>
|
||||
{{if gt .ViewState.event.RemainingSubscriptions 0}}
|
||||
<form class="mt-4" action="/app/agenda/{{.ViewState.event.ID}}/subscribe" method="POST" @submit="submit">
|
||||
<div class="relative mt-1 mb-4">
|
||||
<input @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">
|
||||
|
||||
<button @click="beneficiariesListOpen = ! beneficiariesListOpen" type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-2xl px-2 focus:outline-none">
|
||||
@@ -131,7 +113,6 @@
|
||||
</ul>
|
||||
<input type="hidden" name="subscriber" x-model="fields.beneficiaryid">
|
||||
</div>
|
||||
<p class="text-co-red text-xs mb-4" x-show="error">Vous devez sélectionner un bénéficiaire</p>
|
||||
<button type="submit"
|
||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 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">
|
||||
Inscrire le bénéficiaire
|
||||
@@ -141,20 +122,16 @@
|
||||
<p class="p-12 text-gray-500 text-center text-md">Il n'y a plus de place disponible</p>
|
||||
{{end}}
|
||||
{{if .ViewState.subscribers}}
|
||||
{{if ne (index .ViewState.event.Owners 0) .Group.ID}}
|
||||
<h2 id="subscribers-title" class="text-lg font-medium text-gray-900 mt-10">Bénéficiaires {{.Group.Data.name}} inscrits</h2>
|
||||
<h2 id="subscribers-title" class="text-lg font-medium text-gray-900 mt-10">Inscrits</h2>
|
||||
<div class="mt-2">
|
||||
{{range .ViewState.subscribers}}
|
||||
<ul class="p-1">
|
||||
{{range .ViewState.event.Subscriptions}}
|
||||
{{if eq $.Group.ID .Data.subscribed_by.group.id}}
|
||||
<a href="/app/beneficiaries/{{.Subscriber}}">
|
||||
<li class="inline-flex text-sm p-2"><img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Subscriber}}/picture"> {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }}</li>
|
||||
<a href="/app/beneficiaries/{{.ID}}">
|
||||
<li class="inline-flex text-sm p-2"><img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.ID}}/picture"> {{.Data.first_name}} {{.Data.last_name}}</li>
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html class="h-full bg-gray-50">
|
||||
<head>
|
||||
<title>PARCOURSMOB - Identification</title>
|
||||
<link rel="stylesheet" href="/public/css/main.css" />
|
||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
||||
</head>
|
||||
<body class="h-full">
|
||||
<form method="post">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html class="h-full bg-gray-50">
|
||||
<head>
|
||||
<title>PARCOURSMOB - Identification</title>
|
||||
<link rel="stylesheet" href="/public/css/main.css" />
|
||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
||||
</head>
|
||||
<body class="h-full">
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html class="h-full bg-gray-50">
|
||||
<head>
|
||||
<title>PARCOURSMOB - Identification</title>
|
||||
<link rel="stylesheet" href="/public/css/main.css" />
|
||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
||||
</head>
|
||||
<body class="h-full">
|
||||
<form method="post">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html class="h-full bg-gray-50">
|
||||
<head>
|
||||
<title>PARCOURSMOB - Identification</title>
|
||||
<link rel="stylesheet" href="/public/css/main.css" />
|
||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
||||
</head>
|
||||
<body class="h-full">
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html class="h-full bg-gray-50">
|
||||
<head>
|
||||
<title>PARCOURSMOB - Identification</title>
|
||||
<link rel="stylesheet" href="/public/css/main.css" />
|
||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
||||
</head>
|
||||
<body class="h-full">
|
||||
<form method="post">
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{{define "beneficiary_organizations"}}
|
||||
<div class="px-4 py-6 sm:px-6">
|
||||
<h3 class="text-lg">Organisations gestionnaires du bénéficiaire</h3>
|
||||
<ul class="my-8">
|
||||
{{range .ViewState.organizations}}
|
||||
<li class="text-sm ml-8">{{.Data.name}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -89,11 +89,11 @@
|
||||
class="block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
||||
<!-- <option value="notes">Notes</option> -->
|
||||
|
||||
<!-- <option value="journeys">Déplacements</option>
|
||||
<option value="journeys">Déplacements</option>
|
||||
|
||||
<option value="vehicles">Véhicules</option>
|
||||
|
||||
<option value="events">Dispositifs</option> -->
|
||||
<option value="events">Dispositifs</option>
|
||||
|
||||
<option value="documents">Documents</option>
|
||||
</select>
|
||||
@@ -107,7 +107,7 @@
|
||||
:class="tab == 'notes' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Notes </a> -->
|
||||
|
||||
<!-- <a href="#" @click="tab = 'journeys'"
|
||||
<a href="#" @click="tab = 'journeys'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'journeys' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Déplacements </a>
|
||||
@@ -120,25 +120,22 @@
|
||||
<a href="#" @click="tab = 'events'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'events' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Dispositifs </a> -->
|
||||
Dispositifs </a>
|
||||
|
||||
<a href="#" @click="tab = 'documents'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Documents </a>
|
||||
|
||||
<a href="#" @click="tab = 'organizations'"
|
||||
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'">
|
||||
Gestionnaires </a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div x-show="tab == 'journeys'">{{template "beneficiary_journeys" .}}</div>
|
||||
<div x-show="tab == 'vehicles'">{{template "beneficiary_vehicles" .}}</div>
|
||||
<div x-show="tab == 'events'">{{template "beneficiary_events" .}}</div>
|
||||
<div x-show="tab == 'documents'">{{template "beneficiary_files" .}}</div>
|
||||
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
||||
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
70
web/layouts/conseillers/display.html
Normal file
70
web/layouts/conseillers/display.html
Normal file
@@ -0,0 +1,70 @@
|
||||
{{define "content"}}
|
||||
<main class="py-10">
|
||||
<!-- Page header -->
|
||||
<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 class="flex-shrink-0">
|
||||
<div class="relative">
|
||||
<img class="h-16 w-16 rounded-co" src="/app/beneficiaries/{{.ViewState.admins.ID}}/picture" alt="">
|
||||
<span class="absolute inset-0 shadow-inner rounded-full" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold text-gray-900">{{.ViewState.admins.Data.first_name}}
|
||||
{{.ViewState.admins.Data.last_name}}</h1>
|
||||
</div>
|
||||
</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">
|
||||
<!-- <button type="button"
|
||||
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Supprimer</button> -->
|
||||
<a href="/app/profile/{{.ViewState.admins.ID}}/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>
|
||||
</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="admins-information-title">
|
||||
<div class="bg-white shadow sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<h2 id="admins-information-title" class="text-lg leading-6 font-medium text-gray-900">
|
||||
Informations personnelles</h2>
|
||||
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations générales sur le conseiller.</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">
|
||||
{{if .ViewState.admins.Data.email}}
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.email}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.admins.Data.phone_number}}
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Télephone</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.phone_number}}
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Nom</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.first_name}}</dd>
|
||||
</div>
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Prénon</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.last_name}}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
{{end}}
|
||||
131
web/layouts/conseillers/update.html
Normal file
131
web/layouts/conseillers/update.html
Normal file
@@ -0,0 +1,131 @@
|
||||
{{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">Modifier vos informations</h1>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
||||
x-data="{
|
||||
fields: {
|
||||
first_name: '{{ .ViewState.Data.first_name }}',
|
||||
last_name: '{{ .ViewState.Data.last_name }}',
|
||||
email: '{{ .ViewState.Data.email }}',
|
||||
phone_number: '{{ .ViewState.Data.phone_number }}',
|
||||
gender: {{.ViewState.Data.gender}}
|
||||
},
|
||||
rules: {
|
||||
first_name: ['required'],
|
||||
last_name: ['required'],
|
||||
email: ['required', 'email'],
|
||||
phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
|
||||
},
|
||||
formValidation: {
|
||||
valid: false,
|
||||
fields: {
|
||||
first_name: {valid: null},
|
||||
last_name: {valid: null},
|
||||
email: {valid: null},
|
||||
phone_number: {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 personnelles sur le conseiller obligatoires
|
||||
pour créer son profil 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="first_name" class="block text-sm font-medium text-gray-700">Prénom</label>
|
||||
<input type="text" value="{{.ViewState.Data.first_name}}" name="first_name" id="first_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"
|
||||
@blur="validateField('first_name')"
|
||||
:class="formValidation.fields.first_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="last_name" class="block text-sm font-medium text-gray-700">Nom</label>
|
||||
<input type="text" name="last_name" id="last_name" value="{{.ViewState.Data.last_name}}" autocomplete="family-name"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
@blur="validateField('last_name')"
|
||||
:class="formValidation.fields.last_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
|
||||
<input type="text" name="email" id="email" autocomplete="email" value="{{.ViewState.Data.email}}"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
@blur="validateField('email')"
|
||||
:class="formValidation.fields.email.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-3">
|
||||
<label for="phone_number" class="block text-sm font-medium text-gray-700">Numéro de
|
||||
téléphone</label>
|
||||
<input type="text" name="phone_number" id="phone_number" autocomplete="phone" placeholder="+33612345678"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
x-model="fields.phone_number" @blur="validateField('phone_number')"
|
||||
:class="formValidation.fields.phone_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 optionnelles</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Autres informations de profil optionnelles</p>
|
||||
</div>
|
||||
<div class="mt-5 space-y-6 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="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||
<div class="sm:mt-0 sm:col-span-2">
|
||||
<select id="gender" name="gender" autocomplete="gender" x-model="gender"
|
||||
class="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">
|
||||
<option value="0">Inconnu</option>
|
||||
<option value="1" :selected="fields.gender == '1'">Masculin</option>
|
||||
<option value="2" :selected="fields.gender == '2'">Féminin</option>
|
||||
<option value="9" :selected="fields.gender == '9'">Sans objet</option>
|
||||
</select>
|
||||
</div>
|
||||
</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/profile/{{.ViewState.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">Modifier</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -1,5 +1,5 @@
|
||||
{{define "beneficiaries_widget"}}
|
||||
<div class="col-span-1 bg-white rounded-2xl shadow divide-y divide-gray-200 flex flex-col">
|
||||
<div class="col-span-1 bg-white rounded-2xl shadow divide-y divide-gray-200">
|
||||
<div class="-ml-4 -mt-2 px-4 py-2 flex items-center justify-between flex-wrap sm:flex-nowrap">
|
||||
<div class="ml-4 mt-2">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Bénéficiaires</h3>
|
||||
@@ -9,7 +9,7 @@
|
||||
<button type="button" class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Voir</button>
|
||||
</div> -->
|
||||
</div>
|
||||
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
||||
<ul role="list" class="divide-y divide-gray-200">
|
||||
{{range .latest}}
|
||||
<li class="py-2 px-4 flex">
|
||||
<a href="/app/beneficiaries/{{.ID}}" class="flex w-full">
|
||||
|
||||
236
web/layouts/journeys/_partials/map.html
Normal file
236
web/layouts/journeys/_partials/map.html
Normal file
@@ -0,0 +1,236 @@
|
||||
{{define "map"}}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Add a default marker</title>
|
||||
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.min.js"
|
||||
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src='https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js'></script>
|
||||
<link href='https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.css' rel='stylesheet' />
|
||||
<script src=https://cdnjs.cloudflare.com/ajax/libs/mapbox-polyline/1.1.1/polyline.js></script>
|
||||
|
||||
<script src='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js'></script>
|
||||
<link href='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css' rel='stylesheet' />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input id="de" type="hidden" value="{{.ViewState.group.Data.depart.geometry.coordinates}}">
|
||||
<input id="ar" type="hidden" value="{{.ViewState.group.Data.arrive.geometry.coordinates}}">
|
||||
<input id="des" type="hidden" value="{{.ViewState.group.Data.depart.geometry.coordinates}}">
|
||||
<input id="arri" type="hidden" value="{{.ViewState.group.Data.arrive.geometry.coordinates}}">
|
||||
{{range .ViewState.beneficiaries}}
|
||||
{{if (index $.ViewState.groups .ID) }}
|
||||
<input id="passager" type="hidden"value="{{(index $.ViewState.groups .ID).Data.depart.geometry.coordinates}}">
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
<div>
|
||||
<span id="polyline-info-content"></span>
|
||||
<div id='map' style='width: 730px; height: 300px;'></div>
|
||||
<script>
|
||||
|
||||
function routeNotOptimized(body) {
|
||||
$.ajax({
|
||||
url: 'https://routing.geo.scity.coop/route?json=' + JSON.stringify(body),
|
||||
type: "GET",
|
||||
success : retrievePolylineInfo,
|
||||
error: errorRoute,
|
||||
});
|
||||
}
|
||||
|
||||
function errorRoute() {
|
||||
console.log("errorRoute : couldn't find a route")
|
||||
}
|
||||
|
||||
function reverseCoord(geojsonCoord){
|
||||
if(geojsonCoord != null) {
|
||||
var tmpGeojsonCoord =[];
|
||||
for (var i=0; i<geojsonCoord.length; i++) {
|
||||
tmpGeojsonCoord.push([geojsonCoord[i][1],geojsonCoord[i][0]]);
|
||||
}
|
||||
return tmpGeojsonCoord;
|
||||
}
|
||||
}
|
||||
|
||||
function drawPolylineOnMap(polylineCoord) {
|
||||
var memberSource;
|
||||
|
||||
var mapLayer = map.getLayer('route');
|
||||
var memberSource = map.getSource('route');
|
||||
if(typeof mapLayer !== 'undefined') {
|
||||
map.removeLayer('route')
|
||||
map.removeSource('route')
|
||||
}
|
||||
map.addLayer({
|
||||
'id': 'route',
|
||||
'type': 'line',
|
||||
'source': {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": reverseCoord(polylineCoord)
|
||||
},
|
||||
}
|
||||
},
|
||||
'layout': {
|
||||
'line-join': 'round',
|
||||
'line-cap': 'round'
|
||||
},
|
||||
'paint': {
|
||||
'line-color': '#03A9F4',
|
||||
'line-width': 7
|
||||
}
|
||||
});
|
||||
var i = document.getElementById('de').value
|
||||
var words = i.split(' ');
|
||||
const w = words[0].split('[')
|
||||
const ww = words[1].split(']')
|
||||
a = (w[1]);
|
||||
b = (ww[0])
|
||||
depCoord = [a, b]
|
||||
var ar = document.getElementById('ar').value
|
||||
var wordsr = ar.split(' ');
|
||||
const wr = wordsr[0].split('[')
|
||||
const wwr = wordsr[1].split(']')
|
||||
var r = (wr[1]);
|
||||
var br = (wwr[0])
|
||||
destCoord = [r, br]
|
||||
map.setZoom(9);
|
||||
|
||||
map.fitBounds([[depCoord[0],depCoord[1]],[destCoord[0],destCoord[1]]],{padding: 40});
|
||||
}
|
||||
|
||||
function retrievePolylineInfo(polylineInfo) {
|
||||
var polylineString = ""
|
||||
for (var i=0; i < polylineInfo.trip.legs.length ; i++){
|
||||
polylineString = polylineString + polylineInfo.trip.legs[i].shape
|
||||
}
|
||||
var polylineCoord = polyline.decode(polylineString, 6)
|
||||
var rideDuration = polylineInfo.trip.summary.time
|
||||
var rideDistance = polylineInfo.trip.summary.length
|
||||
if (rideDuration != null && rideDistance != null) {
|
||||
document.getElementById("polyline-info-content").innerHTML = "Durée : " + (Math.round(((rideDuration / 60) + Number.EPSILON) * 100) / 100) + " min<br/>Distance : " + rideDistance + " km";
|
||||
}
|
||||
|
||||
// console.log("rideDuration :", rideDuration, ", rideDistance ",rideDistance)
|
||||
if(polylineCoord != null && polylineCoord.length > 0 ){
|
||||
|
||||
drawPolylineOnMap(polylineCoord)
|
||||
}
|
||||
}
|
||||
|
||||
function createPolyline() {
|
||||
origin= [a, b]
|
||||
|
||||
destination = [r, br]
|
||||
|
||||
|
||||
if(origin != null && destination != null && origin != "" && destination != ""){
|
||||
|
||||
var hash_locs = [];
|
||||
hash_locs.push({
|
||||
'lat' : (origin[1]),
|
||||
'lon' : (origin[0])
|
||||
})
|
||||
hash_locs.push({
|
||||
'lat' : (destination[1]),
|
||||
'lon' : (destination[0])
|
||||
})
|
||||
var body = {"locations":[{
|
||||
'lat' : (origin[1]),
|
||||
'lon' : (origin[0])
|
||||
},{
|
||||
'lat' : (destination[1]),
|
||||
'lon' : (destination[0])
|
||||
}],"costing":"auto"}
|
||||
$.ajax({
|
||||
url: 'https://routing.geo.scity.coop/route?json=' + JSON.stringify(body),
|
||||
type: "GET",
|
||||
success : retrievePolylineInfo,
|
||||
error: routeNotOptimized(body),
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
var depCoord = []
|
||||
var destCoord = []
|
||||
var other = []
|
||||
var a, b
|
||||
depCoord = [a, b]
|
||||
|
||||
const map = new maplibregl.Map({
|
||||
container: 'map',
|
||||
style: 'https://api.maptiler.com/maps/streets/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL',
|
||||
center: [-74.5, 40],
|
||||
zoom: 9,
|
||||
});
|
||||
map.addControl(new maplibregl.NavigationControl(), 'bottom-right');
|
||||
var markers = []
|
||||
var pass = []
|
||||
|
||||
//////////////////Code to add position in the map///////////////
|
||||
var ii = document.querySelectorAll("#passager")
|
||||
for (var i = 0; i < ii.length; i++){
|
||||
var v = ii[i].value
|
||||
var val = ii[i].value.split(' ')
|
||||
const wl = val[0].split('[')
|
||||
const wwl = val[1].split(']')
|
||||
al = (wl[1]);
|
||||
bl = (wwl[0])
|
||||
other = [al, bl]
|
||||
{var marker = new maplibregl.Marker()
|
||||
.setLngLat([al, bl])//position of passager
|
||||
.addTo(map);
|
||||
pass.push(marker)}
|
||||
}
|
||||
|
||||
var i = document.getElementById('de').value
|
||||
var words = i.split(' ');
|
||||
const w = words[0].split('[')
|
||||
const ww = words[1].split(']')
|
||||
a = (w[1]);
|
||||
b = (ww[0])
|
||||
depCoord = [a, b]
|
||||
//arrive
|
||||
var ar = document.getElementById('ar').value
|
||||
var wordsr = ar.split(' ');
|
||||
const wr = wordsr[0].split('[')
|
||||
const wwr = wordsr[1].split(']')
|
||||
var r = (wr[1]);
|
||||
var br = (wwr[0])
|
||||
destCoord = [r, br]
|
||||
|
||||
/////
|
||||
{var marker = new maplibregl.Marker();
|
||||
marker.setLngLat([a, b])//starting position
|
||||
departureMarker = marker.addTo(map);
|
||||
|
||||
map.flyTo({
|
||||
center: [a, b]
|
||||
|
||||
});
|
||||
|
||||
markers.push(marker)
|
||||
createPolyline()
|
||||
}
|
||||
|
||||
{var marker = new maplibregl.Marker();
|
||||
marker.setLngLat([r, br])//ending position
|
||||
destinationMarker = marker.addTo(map);
|
||||
createPolyline()
|
||||
}
|
||||
markers.push(marker)
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
296
web/layouts/journeys/create_groups.html
Normal file
296
web/layouts/journeys/create_groups.html
Normal file
@@ -0,0 +1,296 @@
|
||||
{{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">Groups > Créer un group</h1>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8" x-data="{
|
||||
fields: {
|
||||
name: null,
|
||||
number: null,
|
||||
ponctuelle: false,
|
||||
recurrent: false,
|
||||
|
||||
},
|
||||
rules: {
|
||||
name: ['required'],
|
||||
number: ['required'],
|
||||
|
||||
},
|
||||
formValidation: {
|
||||
valid: false,
|
||||
fields: {
|
||||
name: {valid: null},
|
||||
number: {valid: null},
|
||||
ponctuelle: {valid: null},
|
||||
recurrent: {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">Nouveau groupe</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Informations de base sur le groupe à créer</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-5">
|
||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom de groupe</label>
|
||||
<input type="text" name="name" id="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 class="col-span-5">
|
||||
<label for="name" class="block text-sm font-medium text-gray-700">Nombre maximum de personne</label>
|
||||
<input type="number" name="number" id="number"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
x-model="fields.number" @blur="validateField('number')"
|
||||
:class="formValidation.fields.number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
<div class="col-span-5">
|
||||
<div x-data="{
|
||||
text: '{{if .ViewState.search}}{{.ViewState.search.beneficiary.Data.first_name}} {{.ViewState.search.beneficiary.Data.last_name}}{{end}}',
|
||||
beneficiariesListOpen: false,
|
||||
beneficiaries: {{json .ViewState.beneficiaries}},
|
||||
filteredBeneficiaries: (text) => {
|
||||
if(text=='') return beneficiaries
|
||||
return this.beneficiaries.filter(b => b['data']['first_name'].includes(text) || b['data']['last_name'].includes(text))
|
||||
},
|
||||
fields: {
|
||||
beneficiaryid: {{if .ViewState.search}}'{{.ViewState.search.beneficiary.ID}}'{{else}}null{{end}},
|
||||
},
|
||||
selectbeneficiary(beneficiary) {
|
||||
console.log(beneficiary)
|
||||
this.fields.beneficiaryid = beneficiary.id
|
||||
this.text = beneficiary.data.first_name + ' ' + beneficiary.data.last_name
|
||||
this.beneficiariesListOpen = false
|
||||
}
|
||||
}">
|
||||
<input type="hidden" name="beneficiaryid" x-model="fields.beneficiaryid" class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
>
|
||||
<label for="combobox" class="block text-sm font-medium text-gray-700">Conducteur</label>
|
||||
<div class="relative mt-1 mb-4">
|
||||
<input @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">
|
||||
|
||||
<button @click="beneficiariesListOpen = ! beneficiariesListOpen" type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-2xl px-2 focus:outline-none">
|
||||
|
||||
<svg class="h-5 w-5 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="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<ul x-show="beneficiariesListOpen" class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-xl bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" id="options" role="listbox">
|
||||
|
||||
<template x-for="beneficiary in beneficiaries">
|
||||
<li @click="selectbeneficiary(beneficiary)" class="relative cursor-default hover:bg-gray-100 select-none py-2 pl-3 pr-9 text-gray-900" id="option-0" role="option" tabindex="-1">
|
||||
|
||||
<span class="truncate" x-text="beneficiary.data.first_name"></span> <span class="truncate" x-text="beneficiary.data.last_name"></span>
|
||||
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-co-blue">
|
||||
|
||||
</span>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<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">Paramètres</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Paramètres liés au groupe, utiles pour exploiter les fonctionnalités de PARCOURSMOB</p>
|
||||
</div>
|
||||
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
||||
|
||||
|
||||
{{ $departureField := "departure" }}
|
||||
{{ $departureLabel := "Départ" }}
|
||||
{{ $departure := .ViewState.departure }}
|
||||
{{ template "address_autocomplete" dict "FieldName" $departureField "FieldLabel" $departureLabel "Address" $departure }}
|
||||
|
||||
{{ $destinationField := "destination" }}
|
||||
{{ $destinationLabel := "Destination" }}
|
||||
{{ $destination := .ViewState.destination }}
|
||||
{{ template "address_autocomplete" dict "FieldName" $destinationField "FieldLabel" $destinationLabel "Address" $destination }}
|
||||
<!-- will dolater : tags, groups, ... -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<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">Planification</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Informations liés a la planification de groupe, veuillez cocher la solution qui vous convient </p>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||
<div x-data="{selectedListID: ''}" x-init="$watch('selectedListID', value => console.log(value))">
|
||||
<input type="radio" value="recurrent" x-model="selectedListID">  Recurrent   
|
||||
<input type="radio" value="ponctuelle" x-model="selectedListID">  Ponctuelle
|
||||
|
||||
<input id="t" :name="selectedListID" type="hidden" :value="selectedListID">
|
||||
|
||||
<div class="sm:col-span-6" x-show="selectedListID == 'ponctuelle'" >
|
||||
<div class="py-4 grid grid-cols-2">
|
||||
<div class="lg:col-span-1">
|
||||
<label for="departdate" class="block text-sm font-medium text-gray-700">le</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="departdate" name="departdate"
|
||||
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="sr-only">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="lg:col-span-1">
|
||||
<label for="departtime" class="block text-sm font-medium text-gray-700">A</label>
|
||||
<div class="mt-1">
|
||||
<input type="time" id="departtime" name="departtime"
|
||||
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 x-show="selectedListID == 'recurrent'">
|
||||
<div class="flex items-start mt-6">
|
||||
<div class="flex items-center h-5">
|
||||
<input id="lundi" name="lundi" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="lundi" class="font-medium text-gray-700">Lundi  </label>
|
||||
|
||||
</div>
|
||||
<div class="flex items-center h-5">
|
||||
<input id="mardi" name="mardi" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="mardi" class="font-medium text-gray-700">Mardi  </label>
|
||||
|
||||
</div>
|
||||
<div class="flex items-center h-5">
|
||||
<input id="mercredi" name="mercredi" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="mercredi" class="font-medium text-gray-700">Mercredi  </label>
|
||||
|
||||
</div>
|
||||
<div class="flex items-center h-5">
|
||||
<input id="jeudi" name="jeudi" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="jeudi" class="font-medium text-gray-700">Jeudi  </label>
|
||||
|
||||
</div>
|
||||
<div class="flex items-center h-5">
|
||||
<input id="vendredi" name="vendredi" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="vendredi" class="font-medium text-gray-700">Vendredi  </label>
|
||||
|
||||
</div>
|
||||
<div class="flex items-center h-5">
|
||||
<input id="samedi" name="samedi" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="samedi" class="font-medium text-gray-700">Samedi  </label>
|
||||
|
||||
</div>
|
||||
<div class="flex items-center h-5">
|
||||
<input id="dimanche" name="dimanche" type="checkbox"
|
||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
||||
</div>
|
||||
<div class="ml-3 text-sm">
|
||||
<label for="dimanche" class="font-medium text-gray-700">Dimanche  </label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="py-4 grid grid-cols-2" >
|
||||
<div class="lg:col-span-1">
|
||||
<label for="date" class="block text-sm font-medium text-gray-700">Du</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="date" name="date"
|
||||
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 class="lg:col-span-1">
|
||||
<label for="enddate" class="block text-sm font-medium text-gray-700">Au</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="enddate" name="enddate"
|
||||
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 class="py-4 grid grid-cols-2" >
|
||||
<div class="lg:col-span-1">
|
||||
<label for="time" class="block text-sm font-medium text-gray-700">A</label>
|
||||
<div class="mt-1">
|
||||
<input type="time" id="time" name="time"
|
||||
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>
|
||||
|
||||
<!-- ************************************ -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<a href="/app/journeys">
|
||||
<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 groupe</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
324
web/layouts/journeys/display_groups.html
Normal file
324
web/layouts/journeys/display_groups.html
Normal file
@@ -0,0 +1,324 @@
|
||||
{{define "content"}}
|
||||
<div x-data="{dialog: false, id: ''}">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h1 class="text-2xl font-semibold text-gray-900">Gestion du groupe</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>
|
||||
|
||||
<!-- ****************************** -->
|
||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-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-1 ">
|
||||
<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">Info du groupe</h2>
|
||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||
<div>
|
||||
<div class="mt-5 border-gray-200">
|
||||
<dl class="sm:divide-y sm:divide-gray-200">
|
||||
<div class="sm:pb-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Nom</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.name}}</dd>
|
||||
</div>
|
||||
<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">Type de covoiturage</dt>
|
||||
{{if .ViewState.group.Data.recurrent}}
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
Recurrent </dd> {{else}}
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
Ponctuelle </dd>{{end}}
|
||||
</div>
|
||||
<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">Conducteur</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.driver_first_name}} 
|
||||
{{.ViewState.group.Data.driver_last_name}}</dd>
|
||||
</div>
|
||||
<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">N° de passager</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.number}}</dd>
|
||||
</div>
|
||||
<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">Départ</dt>
|
||||
<dd id="depart" class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.depart.properties.label}}</dd>
|
||||
</div>
|
||||
<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">Déstination</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.arrive.properties.label}}</dd>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{{if .ViewState.group.Data.recurrent}}
|
||||
<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">Les jours de covoiturage </dt>
|
||||
{{if .ViewState.group.Data.planDays.lundi}}
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2" >
|
||||
Lundi  
|
||||
{{if .ViewState.group.Data.planDays.mardi}}
|
||||
Mardi   {{end}}
|
||||
{{if .ViewState.group.Data.planDays.mercredi}}
|
||||
Mercredi   {{end}}
|
||||
{{if .ViewState.group.Data.planDays.jeudi}}
|
||||
Jeudi   {{end}}
|
||||
{{if .ViewState.group.Data.planDays.vendredi}}
|
||||
Vendredi   {{end}}
|
||||
{{if .ViewState.group.Data.planDays.samedi}}
|
||||
Samedi   {{end}}
|
||||
{{if .ViewState.group.Data.planDays.dimanche}}
|
||||
Dimanche  {{end}}
|
||||
</dd>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
{{if .ViewState.group.Data.recurrent}}
|
||||
<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 départ</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.date}}</dd>
|
||||
</div>
|
||||
{{else}}
|
||||
<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 départ</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.departdate}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
{{if .ViewState.group.Data.recurrent}}
|
||||
<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 fin</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.enddate}}</dd>
|
||||
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.group.Data.recurrent}}
|
||||
<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">Heure de départ</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.time}}</dd>
|
||||
</div>
|
||||
{{else}}
|
||||
<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">Heure de départ</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.group.Data.departtime}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-6 lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-1">
|
||||
<div class="space-y-6 lg:col-start-1 lg:col-span-1">
|
||||
|
||||
<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">Ajouter un passager</h2>
|
||||
|
||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||
{{if gt .ViewState.group.Data.number .ViewState.number}}
|
||||
<form method="GET" >
|
||||
<div x-data="{
|
||||
text: '{{if .ViewState.search}}{{.ViewState.search.beneficiary.Data.first_name}} {{.ViewState.search.beneficiary.Data.last_name}}{{end}}',
|
||||
beneficiariesListOpen: false,
|
||||
beneficiaries: {{json .ViewState.beneficiaries}},
|
||||
filteredBeneficiaries: (text) => {
|
||||
if(text=='') return beneficiaries
|
||||
return this.beneficiaries.filter(b => b['data']['first_name'].includes(text) || b['data']['last_name'].includes(text))
|
||||
},
|
||||
fields: {
|
||||
beneficiaryid: {{if .ViewState.search}}'{{.ViewState.search.beneficiary.ID}}'{{else}}null{{end}},
|
||||
},
|
||||
selectbeneficiary(beneficiary) {
|
||||
console.log(beneficiary)
|
||||
this.fields.beneficiaryid = beneficiary.id
|
||||
this.text = beneficiary.data.first_name + ' ' + beneficiary.data.last_name
|
||||
this.beneficiariesListOpen = false
|
||||
}
|
||||
}">
|
||||
<input type="hidden" name="beneficiaryid" x-model="fields.beneficiaryid">
|
||||
<label for="combobox" class="block text-sm font-medium text-gray-700">Passager</label>
|
||||
<div class="relative mt-1 mb-4">
|
||||
<input @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">
|
||||
|
||||
<button @click="beneficiariesListOpen = ! beneficiariesListOpen" type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-2xl px-2 focus:outline-none">
|
||||
|
||||
<svg class="h-5 w-5 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="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<ul x-show="beneficiariesListOpen" class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-xl bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" id="options" role="listbox">
|
||||
|
||||
<template x-for="beneficiary in beneficiaries">
|
||||
<li @click="selectbeneficiary(beneficiary)" class="relative cursor-default hover:bg-gray-100 select-none py-2 pl-3 pr-9 text-gray-900" id="option-0" role="option" tabindex="-1">
|
||||
|
||||
<span class="truncate" x-text="beneficiary.data.first_name"></span> <span class="truncate" x-text="beneficiary.data.last_name"></span>
|
||||
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-co-blue">
|
||||
|
||||
</span>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="space-y-6 lg:col-start-1 lg:col-span-1 ">
|
||||
|
||||
{{ $departureField := "departure" }}
|
||||
{{ $departureLabel := "Départ" }}
|
||||
{{ $departure := .ViewState.departure }}
|
||||
{{ template "address_autocomplete" dict "FieldName" $departureField "FieldLabel" $departureLabel "Address" $departure }}
|
||||
|
||||
{{ $destinationField := "destination" }}
|
||||
{{ $destinationLabel := "Destination" }}
|
||||
{{ $destination := .ViewState.destination }}
|
||||
{{ template "address_autocomplete" dict "FieldName" $destinationField "FieldLabel" $destinationLabel "Address" $destination }}
|
||||
|
||||
|
||||
</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
|
||||
</button>
|
||||
{{else}}
|
||||
<p>Vous avez atteint le nombre maximum de passagers</p>
|
||||
{{end}}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- *********************************** -->
|
||||
|
||||
<div class="lg:col-start-2 lg:col-span-2">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-2 mb-4">
|
||||
<div class="sm:flex sm:items-center">
|
||||
<div class="sm:flex-auto">
|
||||
{{template "map" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8 mt-2">
|
||||
<!-- -->
|
||||
<div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
|
||||
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
|
||||
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col"
|
||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Nom du bénéficiaire
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
Départ
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
Déstination
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.beneficiaries}}
|
||||
|
||||
{{if (index $.ViewState.groups .ID) }}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="flex items-center">
|
||||
<div class="h-10 w-10 flex-shrink-0">
|
||||
<img class="h-10 w-10 rounded-co"
|
||||
:src="'/app/beneficiaries/' + `{{.ID}}`+ '/picture'" alt="">
|
||||
</div>
|
||||
<a :href="'/app/beneficiaries/' + `{{.ID}}`">
|
||||
<div class="flex items-center">
|
||||
|
||||
<div class="ml-4">
|
||||
<div class="text-co-blue hover:text-co-blue"><span
|
||||
>{{.Data.first_name}}</span> <span
|
||||
>{{.Data.last_name}}</span></div>
|
||||
</div>
|
||||
</div></a>
|
||||
</td>
|
||||
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
|
||||
{{if (index $.ViewState.groups .ID).Data.depart}}
|
||||
<div class="text-gray-900" >{{(index $.ViewState.groups .ID).Data.depart.properties.label}}</div>
|
||||
{{else}}
|
||||
<div class="text-gray-900" >...</div>
|
||||
{{end}}
|
||||
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
{{if (index $.ViewState.groups .ID).Data.arrive}}
|
||||
<div class="text-gray-900" >{{(index $.ViewState.groups .ID).Data.arrive.properties.label}}</div>
|
||||
{{else}}
|
||||
<div class="text-gray-900" >...</div>
|
||||
{{end}}
|
||||
|
||||
</td>
|
||||
|
||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||
|
||||
<a :href="'/app/journeys/groups_covoiturage/create/{{(index $.ViewState.groups .ID).ID}}/{{(index $.ViewState.groups .ID).Groupid}}/{{(index $.ViewState.groups .ID).Memberid}}'">
|
||||
<div class="flex items-center">
|
||||
|
||||
<div class="ml-4">
|
||||
<div class="text-co-blue hover:text-co-blue"><span
|
||||
>retirer</span> </div>
|
||||
</div>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
148
web/layouts/journeys/group_management.html
Normal file
148
web/layouts/journeys/group_management.html
Normal file
@@ -0,0 +1,148 @@
|
||||
|
||||
{{define "content"}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h2 class="text-2xl font-semibold text-gray-900">Gestion des groupes de covoiturage</h2>
|
||||
|
||||
<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/journeys/groups_covoiturage/create">
|
||||
<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-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
||||
Ajouter un groupe
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8" x-data="{
|
||||
state: {{.ViewState.JSONWithLimits 0 10}},
|
||||
current: 0,
|
||||
nb_pages() {
|
||||
let nbEl = this.state.count
|
||||
return Math.ceil(nbEl/10)
|
||||
},
|
||||
async paginate(page) {
|
||||
let start = (page-1)*10
|
||||
if(start < 0|| start > this.state.count) {
|
||||
return
|
||||
}
|
||||
let resp = await fetch('/api/cache/' + this.state.cache_id + '?limits.min=' + start + '&limits.max=' + (start+10))
|
||||
let data = await resp.json()
|
||||
this.state.beneficiaries = data
|
||||
this.current=page-1
|
||||
}
|
||||
}">
|
||||
<div class="mt-8 flex flex-col">
|
||||
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col"
|
||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
|
||||
Nom de groupe
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
<template x-for="beneficiary in state.beneficiaries" >
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="flex items-center">
|
||||
<div class="h-10 w-10 flex-shrink-0">
|
||||
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
|
||||
<div class="truncate">
|
||||
<div class="flex text-sm">
|
||||
<p class="font-medium text-lg text-co-blue truncate" x-text="beneficiary.data.name"></p>
|
||||
<p class="ml-1 flex-shrink-0 font-normal text-gray-500"></p>
|
||||
</div>
|
||||
<div class="mt-2 flex">
|
||||
<div class="flex items-center text-sm text-gray-500" >
|
||||
{{$.IconSet.Icon "hero:outline/user-group" "flex-shrink-0 mr-1.5 h-5 w-5"}}
|
||||
<template x-if="beneficiary.members">
|
||||
<p x-text="beneficiary.members.length"> </p></template>
|
||||
<p >  passagères </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td
|
||||
>
|
||||
<a :href="'/app//journeys/groups_covoiturage/create/' + beneficiary.id"
|
||||
class="text-co-blue hover:text-co-blue">Voir<span class="sr-only">, <span
|
||||
x-text="beneficiary.data.name"></span> </a>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
||||
<div class="flex-1 flex justify-between sm:hidden">
|
||||
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||
@click="paginate(current)"> Previous </a>
|
||||
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||
@click="paginate(current+2)"> Next </a>
|
||||
</div>
|
||||
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||
<div>
|
||||
<p class="text-sm text-gray-700">
|
||||
Résultats
|
||||
<span class="font-medium" x-text="Math.min((current * 10)+1, state.count)"></span>
|
||||
Ă
|
||||
<span class="font-medium" x-text="Math.min((current * 10)+10, state.count)"></span>
|
||||
sur
|
||||
<span class="font-medium" x-text="state.count"></span>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
||||
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||
@click="paginate(current)">
|
||||
<span class="sr-only">Previous</span>
|
||||
<!-- Heroicon name: solid/chevron-left -->
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
<template x-for="i in nb_pages">
|
||||
<a href="#" @click="paginate(i)"
|
||||
class="relative inline-flex items-center px-4 py-2 border text-sm font-medium"
|
||||
:class="i == current+1 ? 'z-10 bg-indigo-50 border-co-blue text-co-blue' : 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50'"
|
||||
x-text="i"></a>
|
||||
</template>
|
||||
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
|
||||
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||
@click="paginate(current+2)">
|
||||
<span class="sr-only">Next</span>
|
||||
<!-- Heroicon name: solid/chevron-right -->
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -1,7 +1,20 @@
|
||||
{{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">Déplacements</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/journeys/groups_covoiturage">
|
||||
<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-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
||||
Gestion des groupes
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-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-1">
|
||||
@@ -116,5 +129,6 @@
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{end}}
|
||||
32
web/layouts/journeys/update_groups.html
Normal file
32
web/layouts/journeys/update_groups.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{{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">Vous etes sur de retirer ce passager </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/journeys/groups_covoiturage/create/{{.ViewState.groupid}}" 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}}
|
||||
@@ -22,7 +22,7 @@
|
||||
x-transition:enter="transition ease-in-out duration-300 transform" x-transition:enter-start="-translate-x-full"
|
||||
x-transition:enter-end="translate-x-0" x-transition:leave="transition ease-in-out duration-300 transform"
|
||||
x-transition:leave-start="translate-x-0" x-transition:leave-end="-translate-x-full">
|
||||
<div class="relative flex-1 flex flex-col max-w-xs w-full pb-4 bg-co-blue">
|
||||
<div class="relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-co-blue">
|
||||
<div class="absolute top-0 right-0 -mr-12 pt-2" @click="offCanvasMenu = false">
|
||||
<button type="button"
|
||||
class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white">
|
||||
@@ -31,8 +31,7 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="bg-white flex items-center shadow"><img class="h-16 w-auto m-auto" src="/public/images/departement06.png"></div>
|
||||
<div class="flex-shrink-0 flex items-center px-4 pt-5">
|
||||
<div class="flex-shrink-0 flex items-center px-4">
|
||||
<img class="h-8 w-auto" src="/public/images/main_logo.svg" alt="PARCOURSMOB">
|
||||
</div>
|
||||
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
||||
@@ -51,10 +50,9 @@
|
||||
<!-- Static sidebar for desktop -->
|
||||
<div class="hidden md:flex md:w-64 md:flex-col md:fixed md:inset-y-0">
|
||||
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
||||
<div class="flex flex-col flex-grow bg-co-blue overflow-y-auto">
|
||||
<div class="bg-white flex items-center shadow"><img class="h-16 w-auto m-auto" src="/public/images/departement06.png"></div>
|
||||
<div class="flex items-center flex-shrink-0 px-4 pt-5">
|
||||
<img class="h-8 w-auto m-auto" src="/public/images/main_logo.svg" alt="PARCOURSMOB">
|
||||
<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">
|
||||
<img class="h-8 w-auto" src="/public/images/parcoursmob_logo_whitered.svg" alt="PARCOURSMOB">
|
||||
</div>
|
||||
<div class="mt-5 flex-1 flex flex-col">
|
||||
{{ template "mainmenu" . }}
|
||||
@@ -133,12 +131,12 @@
|
||||
<div class="ml-3 relative" x-data="{ profileMenuOpen: false }">
|
||||
<div>
|
||||
<!-- <button @click="profileMenuOpen = ! profileMenuOpen" type="button" -->
|
||||
<button type="button"
|
||||
<button @click="profileMenuOpen = ! profileMenuOpen" type="button"
|
||||
class="max-w-xs bg-white flex items-center text-sm rounded-co focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue"
|
||||
id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img class="h-8 w-8 rounded-co"
|
||||
src="http://localhost:9000/app/beneficiaries/e7616eac-4a87-4396-a505-23e0421b9c4c/picture"
|
||||
src="/app/beneficiaries/{{.UserID}}/picture"
|
||||
alt="Menu utilisateur">
|
||||
</button>
|
||||
</div>
|
||||
@@ -153,14 +151,14 @@
|
||||
x-transition:leave-start="transform opacity-100 scale-100"
|
||||
x-transition:leave-end="transform opacity-0 scale-95">
|
||||
<!-- Active: "bg-gray-100", Not Active: "" -->
|
||||
<a href="/app/profile" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
<a href="/app/profile/{{.UserID}}" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
id="user-menu-item-0">Votre profil</a>
|
||||
|
||||
<a href="/app/settings/" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
<a href="/app/profile/{{.UserID}}/update" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
id="user-menu-item-1">Paramètres</a>
|
||||
|
||||
<a href="/app/disconnect" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
id="user-menu-item-2">Se déconnecter</a>
|
||||
<!-- <a href="/app/disconnect" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
id="user-menu-item-2">Se déconnecter</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,16 +11,13 @@
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
<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">
|
||||
Statut
|
||||
</th>
|
||||
</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">
|
||||
Véhicule
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Beneficiaire
|
||||
</th>
|
||||
@@ -36,50 +33,21 @@
|
||||
|
||||
{{range .ViewState.bookings}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
{{if .Data.administrator_unavailability}}
|
||||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||
Retiré
|
||||
</span>
|
||||
{{else}}
|
||||
{{if eq .Status 1 }}
|
||||
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
|
||||
A venir
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq .Status 0 }}
|
||||
<span class="p-1 bg-co-green text-white text-xs font-bold rounded-xl" >
|
||||
En cours
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq .Status -1 }}
|
||||
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
||||
Terminé
|
||||
</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</td>
|
||||
<!-- <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
</td> -->
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >Voiture</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >{{.Vehicle.Data.name}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
{{if not .Data.administrator_unavailability}}
|
||||
<div class="text-gray-900" ><img class="h-6 w-6 rounded-co"
|
||||
src="/app/beneficiaries/{{.Driver}}/picture" alt=""></div>
|
||||
{{end}}
|
||||
</td>
|
||||
<!-- <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
</td> -->
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
{{if not .Data.administrator_unavailability}}
|
||||
<div class="text-gray-900" >Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</div>
|
||||
{{else}}
|
||||
<div class="text-gray-900" >Du {{(timeFrom .Unavailablefrom).Format "02/01/2006"}} au {{(timeFrom .Unavailableto).Format "02/01/2006"}}</div>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<a href="/app/vehicles/bookings/{{.ID}}"
|
||||
|
||||
@@ -6,50 +6,18 @@
|
||||
<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"
|
||||
x-data="{
|
||||
changeVehicle: false,
|
||||
selectedvehicle: ''
|
||||
}">
|
||||
<button type="button" @click="changeVehicle = ! changeVehicle"
|
||||
<!-- <div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
||||
Changer de véhicule
|
||||
</button>
|
||||
<!-- <a href="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/delete">
|
||||
<a href="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/delete">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-red px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-red focus:ring-offset-2 sm:w-auto">
|
||||
Annuler
|
||||
</button>
|
||||
</a> -->
|
||||
|
||||
<div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="changeVehicle">
|
||||
<div class="fixed inset-0 bg-gray-900 bg-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-3xl 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="text-center">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Changer de véhicule</h3>
|
||||
</div>
|
||||
<form method="POST" action="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/change-vehicle" class="mt-4">
|
||||
<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>
|
||||
{{range .ViewState.alternative_vehicles }}
|
||||
<option value="{{.ID}}">{{.Data.name}} ({{.Type}})</option>
|
||||
{{end}}
|
||||
</select>
|
||||
<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">Changer de véhicule</button>
|
||||
</div>
|
||||
</form>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-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-1">
|
||||
@@ -161,7 +129,7 @@
|
||||
<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">Type</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.vehicle.Type}}</dd>
|
||||
Voiture</dd>
|
||||
</div>
|
||||
{{if .ViewState.vehicle.Data.address}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
|
||||
@@ -834,18 +834,14 @@ html {
|
||||
grid-column: span 5 / span 5;
|
||||
}
|
||||
|
||||
.m-auto {
|
||||
margin: auto;
|
||||
.m-2 {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.m-4 {
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
.m-2 {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.-mx-4 {
|
||||
margin-left: -1rem;
|
||||
margin-right: -1rem;
|
||||
@@ -981,10 +977,6 @@ html {
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.ml-8 {
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.-mt-2 {
|
||||
margin-top: -0.5rem;
|
||||
}
|
||||
@@ -1061,10 +1053,6 @@ html {
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
.h-16 {
|
||||
height: 4rem;
|
||||
}
|
||||
|
||||
.h-8 {
|
||||
height: 2rem;
|
||||
}
|
||||
@@ -1073,6 +1061,10 @@ html {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.h-16 {
|
||||
height: 4rem;
|
||||
}
|
||||
|
||||
.h-5 {
|
||||
height: 1.25rem;
|
||||
}
|
||||
@@ -1232,6 +1224,16 @@ html {
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.translate-y-4 {
|
||||
--tw-translate-y: 1rem;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.translate-y-0 {
|
||||
--tw-translate-y: 0px;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.scale-95 {
|
||||
--tw-scale-x: .95;
|
||||
--tw-scale-y: .95;
|
||||
@@ -1595,7 +1597,7 @@ html {
|
||||
|
||||
.border-co-red {
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(222 21 129 / var(--tw-border-opacity));
|
||||
border-color: rgb(255 19 0 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.border-indigo-500 {
|
||||
@@ -1605,7 +1607,7 @@ html {
|
||||
|
||||
.border-co-blue {
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(0 114 126 / var(--tw-border-opacity));
|
||||
border-color: rgb(36 56 135 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-100 {
|
||||
@@ -1620,7 +1622,7 @@ html {
|
||||
|
||||
.bg-co-blue {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(0 114 126 / var(--tw-bg-opacity));
|
||||
background-color: rgb(36 56 135 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-white {
|
||||
@@ -1635,7 +1637,7 @@ html {
|
||||
|
||||
.bg-co-red {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(222 21 129 / var(--tw-bg-opacity));
|
||||
background-color: rgb(255 19 0 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-co-yellow {
|
||||
@@ -1663,11 +1665,6 @@ html {
|
||||
background-color: rgb(238 242 255 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-black {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-indigo-600 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(79 70 229 / var(--tw-bg-opacity));
|
||||
@@ -1683,6 +1680,11 @@ html {
|
||||
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-black {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-opacity-75 {
|
||||
--tw-bg-opacity: 0.75;
|
||||
}
|
||||
@@ -1798,6 +1800,10 @@ html {
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
.pt-5 {
|
||||
padding-top: 1.25rem;
|
||||
}
|
||||
|
||||
.pb-4 {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
@@ -1806,10 +1812,6 @@ html {
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
.pt-5 {
|
||||
padding-top: 1.25rem;
|
||||
}
|
||||
|
||||
.pl-8 {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
@@ -2012,12 +2014,12 @@ html {
|
||||
|
||||
.text-co-blue {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(0 114 126 / var(--tw-text-opacity));
|
||||
color: rgb(36 56 135 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-co-red {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(222 21 129 / var(--tw-text-opacity));
|
||||
color: rgb(255 19 0 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-indigo-600 {
|
||||
@@ -2045,6 +2047,11 @@ html {
|
||||
color: rgb(0 0 0 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-green-600 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(22 163 74 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.placeholder-gray-500::-moz-placeholder {
|
||||
--tw-placeholder-opacity: 1;
|
||||
color: rgb(107 114 128 / var(--tw-placeholder-opacity));
|
||||
@@ -2257,7 +2264,7 @@ html {
|
||||
|
||||
.focus-within\:ring-co-blue:focus-within {
|
||||
--tw-ring-opacity: 1;
|
||||
--tw-ring-color: rgb(0 114 126 / var(--tw-ring-opacity));
|
||||
--tw-ring-color: rgb(36 56 135 / var(--tw-ring-opacity));
|
||||
}
|
||||
|
||||
.focus-within\:ring-offset-2:focus-within {
|
||||
@@ -2286,7 +2293,7 @@ html {
|
||||
|
||||
.hover\:bg-co-blue:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(0 114 126 / var(--tw-bg-opacity));
|
||||
background-color: rgb(36 56 135 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-gray-100:hover {
|
||||
@@ -2299,6 +2306,11 @@ html {
|
||||
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-indigo-700:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(67 56 202 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-opacity-5:hover {
|
||||
--tw-bg-opacity: 0.05;
|
||||
}
|
||||
@@ -2310,7 +2322,7 @@ html {
|
||||
|
||||
.hover\:text-co-blue:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(0 114 126 / var(--tw-text-opacity));
|
||||
color: rgb(36 56 135 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-white:hover {
|
||||
@@ -2343,7 +2355,7 @@ html {
|
||||
|
||||
.focus\:border-co-blue:focus {
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(0 114 126 / var(--tw-border-opacity));
|
||||
border-color: rgb(36 56 135 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.focus\:border-indigo-500:focus {
|
||||
@@ -2405,7 +2417,7 @@ html {
|
||||
|
||||
.focus\:ring-co-blue:focus {
|
||||
--tw-ring-opacity: 1;
|
||||
--tw-ring-color: rgb(0 114 126 / var(--tw-ring-opacity));
|
||||
--tw-ring-color: rgb(36 56 135 / var(--tw-ring-opacity));
|
||||
}
|
||||
|
||||
.focus\:ring-indigo-500:focus {
|
||||
@@ -2415,7 +2427,7 @@ html {
|
||||
|
||||
.focus\:ring-co-red:focus {
|
||||
--tw-ring-opacity: 1;
|
||||
--tw-ring-color: rgb(222 21 129 / var(--tw-ring-opacity));
|
||||
--tw-ring-color: rgb(255 19 0 / var(--tw-ring-opacity));
|
||||
}
|
||||
|
||||
.focus\:ring-blue-500:focus {
|
||||
@@ -2482,14 +2494,14 @@ html {
|
||||
grid-column: span 4 / span 4;
|
||||
}
|
||||
|
||||
.sm\:col-start-1 {
|
||||
grid-column-start: 1;
|
||||
}
|
||||
|
||||
.sm\:col-start-2 {
|
||||
grid-column-start: 2;
|
||||
}
|
||||
|
||||
.sm\:col-start-1 {
|
||||
grid-column-start: 1;
|
||||
}
|
||||
|
||||
.sm\:-mx-6 {
|
||||
margin-left: -1.5rem;
|
||||
margin-right: -1.5rem;
|
||||
@@ -2561,6 +2573,10 @@ html {
|
||||
max-width: 24rem;
|
||||
}
|
||||
|
||||
.sm\:max-w-lg {
|
||||
max-width: 32rem;
|
||||
}
|
||||
|
||||
.sm\:flex-auto {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -2573,6 +2589,23 @@ html {
|
||||
flex: 1 1 0%;
|
||||
}
|
||||
|
||||
.sm\:translate-y-0 {
|
||||
--tw-translate-y: 0px;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.sm\:scale-95 {
|
||||
--tw-scale-x: .95;
|
||||
--tw-scale-y: .95;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.sm\:scale-100 {
|
||||
--tw-scale-x: 1;
|
||||
--tw-scale-y: 1;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.sm\:grid-flow-row-dense {
|
||||
grid-auto-flow: row dense;
|
||||
}
|
||||
@@ -2613,6 +2646,10 @@ html {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.sm\:gap-3 {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) {
|
||||
--tw-space-y-reverse: 0;
|
||||
margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB |
@@ -1,91 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
viewBox="0 0 374.2 33.2"
|
||||
version="1.1"
|
||||
id="svg30"
|
||||
sodipodi:docname="main_logo.svg"
|
||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview32"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.0700159"
|
||||
inkscape:cx="317.93488"
|
||||
inkscape:cy="16.707551"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1011"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Calque_1-2" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:#ff1300;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<g
|
||||
id="Calque_2"
|
||||
data-name="Calque 2">
|
||||
<g
|
||||
id="Calque_1-2"
|
||||
data-name="Calque 1">
|
||||
<path
|
||||
class="cls-1"
|
||||
d="M300.9.6a4.7,4.7,0,0,1,4.9,4.9V32.6h-8.6a4.7,4.7,0,0,1-4.9-4.9V14.1h-.9c-.6,0-1,.6-1,1.5v17H282a4.7,4.7,0,0,1-4.9-4.9V14.1h-1a1.4,1.4,0,0,0-.9,1.5v17H263a1.2,1.2,0,0,1-1.2-1.2V5.5A4.7,4.7,0,0,1,266.7.6h17.9l-.7,5a.9.9,0,0,0,.7,1.1.9.9,0,0,0,1-.8l.8-4.6a.9.9,0,0,1,.9-.7Z"
|
||||
id="path6"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
class="cls-1"
|
||||
d="M341.1,16.4c0,9.1-1.9,16.8-16.5,16.8S307.8,25,307.8,16.4,310.6,0,324.6,0,341.1,7.8,341.1,16.4Z"
|
||||
id="path8"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
class="cls-1"
|
||||
d="M344.3,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,344.3.6h18.8c6.9,0,10.4,2.9,10.4,8.1s-1.6,6.9-4.5,7.5h0c2.9.6,5.2,3.2,5.2,7.7s-3.5,8.6-10.4,8.6Z"
|
||||
id="path10"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M16.2,11.6c0-.6-.4-.9-1-.9h-.8V31.4a1.2,1.2,0,0,1-1.2,1.2H1.2A1.2,1.2,0,0,1,0,31.4V1.8A1.2,1.2,0,0,1,1.2.6H16.8C25.7.6,30.9,4.2,31,10.7s-4.1,9.9-9.4,10H16.1Z"
|
||||
id="path12" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M44.9,23.1H43.2L40,31.9a1.1,1.1,0,0,1-1.2.7H26.9a1.3,1.3,0,0,1-1.3-1.9L37,3.4A4.5,4.5,0,0,1,41.3.6h5.8a4.1,4.1,0,0,1,4,2.6L62.6,30.8c.5,1-.2,1.8-1.3,1.8H41.7Z"
|
||||
id="path14" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M66.1,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,66.1.6H83.2C92.7.6,95.5,7,95.6,12.3c0,3.3-.8,6.9-3.4,8.3l3.4,12H84.4c-2.3,0-5.2-.7-5.9-2.7L71.9,10.7a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"
|
||||
id="path16" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M129.6,17.1c.8,0,1.3.5,1.2,1.2-.2,8.3-2.9,14.9-16.4,14.9-15.8.1-16.8-8.2-16.8-16.8S100.5,0,114.4,0c15.7,0,16.5,8,16.5,15.4H115.3V11.3c0-.8-.4-1.2-1-1.2s-.9.4-.9,1.2V21.9c0,.9.4,1.2.9,1.2s1-.3,1-1.2V17.1Z"
|
||||
id="path18" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M166.2,16.4c0,9.1-2,16.8-16.6,16.8S132.8,25,132.8,16.4,135.7,0,149.6,0,166.2,7.8,166.2,16.4Z"
|
||||
id="path20" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M200.5,1.8V12.2c0,12.7-1.4,21-16.3,21s-16-8.4-16-20.9V1.8A1.2,1.2,0,0,1,169.4.6h13a.9.9,0,0,1,.9.9V21.8c0,.9.4,1.2,1,1.2s.9-.3.9-1.2V1.5a.9.9,0,0,1,.9-.9h13.1A1.2,1.2,0,0,1,200.5,1.8Z"
|
||||
id="path22" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M203.9,32.6a1.2,1.2,0,0,1-1.3-1.2V1.8A1.2,1.2,0,0,1,203.8.6h17.1c9.5,0,12.3,6.4,12.4,11.7,0,3.3-.8,6.9-3.4,8.3l3.4,12H222.1c-2.3,0-5.2-.7-5.9-2.7l-6.6-19.2a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"
|
||||
id="path24" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="M235.8,29.2v-10a1,1,0,0,1,1.5-1l11.1,5.1a1,1,0,0,0,1.2-.4.9.9,0,0,0-.6-1.2l-9.3-4.4c-4.5-2.2-4.4-5.5-4.4-8.2,0-7.6,7.4-9.1,14.6-9.1,5.4,0,12.1,1.8,14.3,4.4v9.2a1,1,0,0,1-1.5,1L252.3,9.8a1,1,0,0,0-1.3.4q-.3.8.6,1.2l8.5,4.1c5.3,2.6,4.7,4.9,4.7,9.2s-6.3,8.5-14.9,8.5C244.7,33.2,238,31.6,235.8,29.2Z"
|
||||
id="path26" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 374.2 33.2"><defs><style>.cls-1{fill:#ff1300;}.cls-2{fill:#fff;}</style></defs><g id="Calque_2" data-name="Calque 2"><g id="Calque_1-2" data-name="Calque 1"><path class="cls-1" d="M300.9.6a4.7,4.7,0,0,1,4.9,4.9V32.6h-8.6a4.7,4.7,0,0,1-4.9-4.9V14.1h-.9c-.6,0-1,.6-1,1.5v17H282a4.7,4.7,0,0,1-4.9-4.9V14.1h-1a1.4,1.4,0,0,0-.9,1.5v17H263a1.2,1.2,0,0,1-1.2-1.2V5.5A4.7,4.7,0,0,1,266.7.6h17.9l-.7,5a.9.9,0,0,0,.7,1.1.9.9,0,0,0,1-.8l.8-4.6a.9.9,0,0,1,.9-.7Z"/><path class="cls-1" d="M341.1,16.4c0,9.1-1.9,16.8-16.5,16.8S307.8,25,307.8,16.4,310.6,0,324.6,0,341.1,7.8,341.1,16.4Z"/><path class="cls-1" d="M344.3,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,344.3.6h18.8c6.9,0,10.4,2.9,10.4,8.1s-1.6,6.9-4.5,7.5h0c2.9.6,5.2,3.2,5.2,7.7s-3.5,8.6-10.4,8.6Z"/><path class="cls-2" d="M16.2,11.6c0-.6-.4-.9-1-.9h-.8V31.4a1.2,1.2,0,0,1-1.2,1.2H1.2A1.2,1.2,0,0,1,0,31.4V1.8A1.2,1.2,0,0,1,1.2.6H16.8C25.7.6,30.9,4.2,31,10.7s-4.1,9.9-9.4,10H16.1Z"/><path class="cls-2" d="M44.9,23.1H43.2L40,31.9a1.1,1.1,0,0,1-1.2.7H26.9a1.3,1.3,0,0,1-1.3-1.9L37,3.4A4.5,4.5,0,0,1,41.3.6h5.8a4.1,4.1,0,0,1,4,2.6L62.6,30.8c.5,1-.2,1.8-1.3,1.8H41.7Z"/><path class="cls-2" d="M66.1,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,66.1.6H83.2C92.7.6,95.5,7,95.6,12.3c0,3.3-.8,6.9-3.4,8.3l3.4,12H84.4c-2.3,0-5.2-.7-5.9-2.7L71.9,10.7a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"/><path class="cls-2" d="M129.6,17.1c.8,0,1.3.5,1.2,1.2-.2,8.3-2.9,14.9-16.4,14.9-15.8.1-16.8-8.2-16.8-16.8S100.5,0,114.4,0c15.7,0,16.5,8,16.5,15.4H115.3V11.3c0-.8-.4-1.2-1-1.2s-.9.4-.9,1.2V21.9c0,.9.4,1.2.9,1.2s1-.3,1-1.2V17.1Z"/><path class="cls-2" d="M166.2,16.4c0,9.1-2,16.8-16.6,16.8S132.8,25,132.8,16.4,135.7,0,149.6,0,166.2,7.8,166.2,16.4Z"/><path class="cls-2" d="M200.5,1.8V12.2c0,12.7-1.4,21-16.3,21s-16-8.4-16-20.9V1.8A1.2,1.2,0,0,1,169.4.6h13a.9.9,0,0,1,.9.9V21.8c0,.9.4,1.2,1,1.2s.9-.3.9-1.2V1.5a.9.9,0,0,1,.9-.9h13.1A1.2,1.2,0,0,1,200.5,1.8Z"/><path class="cls-2" d="M203.9,32.6a1.2,1.2,0,0,1-1.3-1.2V1.8A1.2,1.2,0,0,1,203.8.6h17.1c9.5,0,12.3,6.4,12.4,11.7,0,3.3-.8,6.9-3.4,8.3l3.4,12H222.1c-2.3,0-5.2-.7-5.9-2.7l-6.6-19.2a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"/><path class="cls-2" d="M235.8,29.2v-10a1,1,0,0,1,1.5-1l11.1,5.1a1,1,0,0,0,1.2-.4.9.9,0,0,0-.6-1.2l-9.3-4.4c-4.5-2.2-4.4-5.5-4.4-8.2,0-7.6,7.4-9.1,14.6-9.1,5.4,0,12.1,1.8,14.3,4.4v9.2a1,1,0,0,1-1.5,1L252.3,9.8a1,1,0,0,0-1.3.4q-.3.8.6,1.2l8.5,4.1c5.3,2.6,4.7,4.9,4.7,9.2s-6.3,8.5-14.9,8.5C244.7,33.2,238,31.6,235.8,29.2Z"/></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -4,9 +4,9 @@ module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
'co-blue': '#00727e',
|
||||
'co-blue': '#243887',
|
||||
'co-lightblue': '#907eff',
|
||||
'co-red': '#de1581',
|
||||
'co-red': '#ff1300',
|
||||
'co-green': '#6cc11f',
|
||||
'co-yellow': '#ffdd00',
|
||||
'co-orange': 'ff5300',
|
||||
|
||||
Reference in New Issue
Block a user