diff --git a/web/layouts/agenda/history-event.html b/web/layouts/agenda/history-event.html
new file mode 100644
index 0000000..823413f
--- /dev/null
+++ b/web/layouts/agenda/history-event.html
@@ -0,0 +1,102 @@
+{{define "content"}}
+{{ if eq (index .ViewState.event.Owners 0) .Group.ID }}
+
+
+
+
+
Bénéficiaires désinscrits de l'évènement {{.ViewState.event.Name}}
+
+ {{if eq .ViewState.event.Startdate .ViewState.event.Enddate}}
+ Le {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}}
+ {{else}}
+ Du {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}} au {{(timeFrom
+ .ViewState.event.Enddate).Format "02/01/2006"}}
+ {{end}}
+
+
+
+
+
+
+
+
+{{else}}
+
+
+
+
+
+
+
+
+ {{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
+
+
+
Vous n'avez pas accès à
+ cette page
+
+
+
+
+
+
+{{end}}
+{{end}}
\ No newline at end of file
diff --git a/web/layouts/agenda/home.html b/web/layouts/agenda/home.html
index 9a5882a..06769e1 100644
--- a/web/layouts/agenda/home.html
+++ b/web/layouts/agenda/home.html
@@ -50,6 +50,7 @@
{{range .ViewState.events}}
+ {{if eq .Deleted false}}
@@ -99,6 +100,7 @@
{{end}}
+ {{end}}
diff --git a/web/layouts/agenda/updateEvent.html b/web/layouts/agenda/updateEvent.html
new file mode 100644
index 0000000..976a58e
--- /dev/null
+++ b/web/layouts/agenda/updateEvent.html
@@ -0,0 +1,255 @@
+{{ define "content" }}
+{{ if eq (index .ViewState.event.Owners 0) .Group.ID }}
+
+
+
Modifier votre agenda
+
+{{$sdate := (timeFrom .ViewState.event.Startdate).Format ("2006-01-02")}}
+{{$edate := (timeFrom .ViewState.event.Enddate).Format ("2006-01-02")}}
+
+{{else}}
+
+
+
+
+
+
+
+
+ {{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
+
+
+
Vous n'avez pas le droit de modifier cet événement
+
+
+
+
+
+
+{{end}}
+{{end}}
\ No newline at end of file
diff --git a/web/layouts/journeys/_partials/map.html b/web/layouts/journeys/_partials/map.html
index 61c0f49..3b8e1ae 100644
--- a/web/layouts/journeys/_partials/map.html
+++ b/web/layouts/journeys/_partials/map.html
@@ -25,6 +25,11 @@
+ {{range .ViewState.beneficiaries}}
+ {{if (index $.ViewState.groups .ID) }}
+
+ {{end}}
+ {{end}}
@@ -100,7 +105,7 @@ function errorRoute() {
var br = (wwr[0])
destCoord = [r, br]
map.setZoom(9);
- //console.log("Ici : " [depCoord[0],depCoord[1]],[destCoord[0],destCoord[1]])
+
map.fitBounds([[depCoord[0],depCoord[1]],[destCoord[0],destCoord[1]]],{padding: 40});
}
@@ -115,10 +120,8 @@ function errorRoute() {
if (rideDuration != null && rideDistance != null) {
document.getElementById("polyline-info-content").innerHTML = "Durée : " + (Math.round(((rideDuration / 60) + Number.EPSILON) * 100) / 100) + " min Distance : " + rideDistance + " km";
}
- // $("#polyline-str").val(polylineString);
- // $("#ride-duration").val(rideDuration);
- // $("#ride-distance").val(rideDistance);
- console.log("rideDuration :", rideDuration, ", rideDistance ",rideDistance)
+
+ // console.log("rideDuration :", rideDuration, ", rideDistance ",rideDistance)
if(polylineCoord != null && polylineCoord.length > 0 ){
drawPolylineOnMap(polylineCoord)
@@ -130,10 +133,9 @@ function createPolyline() {
destination = [r, br]
- console.log("origin : ", origin)
if(origin != null && destination != null && origin != "" && destination != ""){
- console.log("Get polyline infos")
+
var hash_locs = [];
hash_locs.push({
'lat' : (origin[1]),
@@ -156,17 +158,15 @@ function createPolyline() {
success : retrievePolylineInfo,
error: routeNotOptimized(body),
});
- console.log("JSON.stringify(body)",JSON.stringify(body))
+
}
}
var depCoord = []
var destCoord = []
+ var other = []
var a, b
depCoord = [a, b]
- console.log("yeeesss: ", a)
- //////////////////////////////
-
- //mapboxgl.accessToken = 'pk.eyJ1Ijoic291a2FpbmFsYWZkaWxpIiwiYSI6ImNsYjB1djUxNjAwaWQzdm82dnJ5OXJrZzcifQ.0i8xkskwRps3W1PFwApL_Q';
+
const map = new maplibregl.Map({
container: 'map',
style: 'https://api.maptiler.com/maps/streets/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL',
@@ -175,9 +175,24 @@ function createPolyline() {
});
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)}
+ }
- //destination
var i = document.getElementById('de').value
var words = i.split(' ');
const w = words[0].split('[')
@@ -185,8 +200,6 @@ function createPolyline() {
a = (w[1]);
b = (ww[0])
depCoord = [a, b]
- console.log("yeeesss: ", depCoord[0])
- console.log(b)
//arrive
var ar = document.getElementById('ar').value
var wordsr = ar.split(' ');
@@ -195,7 +208,7 @@ function createPolyline() {
var r = (wr[1]);
var br = (wwr[0])
destCoord = [r, br]
- console.log(br)
+
/////
{var marker = new maplibregl.Marker();
marker.setLngLat([a, b])//starting position
@@ -205,7 +218,7 @@ function createPolyline() {
center: [a, b]
});
- console.log("again: ", a , b)
+
markers.push(marker)
createPolyline()
}
diff --git a/web/layouts/journeys/create_groups.html b/web/layouts/journeys/create_groups.html
index 433ead7..c8eb5b8 100644
--- a/web/layouts/journeys/create_groups.html
+++ b/web/layouts/journeys/create_groups.html
@@ -63,7 +63,7 @@
Nombre maximum de personne
-
@@ -157,53 +157,31 @@
Informations liés a la planification de groupe, veuillez cocher la solution qui vous convient
-
-
-
+
  Recurrent   
  Ponctuelle
-
+
+
-
-
-
+
+
+
+
le
+
+
+
-
-
-
-
diff --git a/web/layouts/journeys/display_groups.html b/web/layouts/journeys/display_groups.html
index 90c2641..1a786df 100644
--- a/web/layouts/journeys/display_groups.html
+++ b/web/layouts/journeys/display_groups.html
@@ -1,5 +1,6 @@
{{define "content"}}
-
+
+
+
+
+
+
+
+
Ajouter un passager
+
+
+ {{if gt .ViewState.group.Data.number .ViewState.number}}
+
+
+
+
Passager
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $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 }}
+
+
+
+
+
+
+ Ajouter
+
+ {{else}}
+ Vous avez atteint le nombre maximum de passagers
+ {{end}}
+
+
+
+
+
+
+
-
-
-
+
+
-
@@ -172,172 +241,83 @@
Nom du bénéficiaire
- Téléphone
+ Départ
- Email
+ Déstination
+
+
+
-
+ {{range .ViewState.beneficiaries}}
+
+ {{if (index $.ViewState.groups .ID) }}
+
+
+
+ {{if (index $.ViewState.groups .ID).Data.depart}}
+ {{(index $.ViewState.groups .ID).Data.depart.properties.label}}
+ {{else}}
+ ...
+ {{end}}
+
-
-
-
+ {{if (index $.ViewState.groups .ID).Data.arrive}}
+ {{(index $.ViewState.groups .ID).Data.arrive.properties.label}}
+ {{else}}
+ ...
+ {{end}}
+
+
-
-
-
-
-
- Voir,
+
+
+
-
-
-
-
-
-
-
-
-
-
- Résultats
-
- à
-
- sur
-
-
-
-
-
+ {{end}}
+
+ {{end}}
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
Ajouter un passager
-
-
-
-
-
Passager
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Ajouter
-
-
-
-
-
-
-
diff --git a/web/layouts/journeys/group_management.html b/web/layouts/journeys/group_management.html
index b316645..205a158 100644
--- a/web/layouts/journeys/group_management.html
+++ b/web/layouts/journeys/group_management.html
@@ -62,16 +62,7 @@
-
-
-
+
@@ -99,7 +90,6 @@
-
diff --git a/web/layouts/journeys/update_groups.html b/web/layouts/journeys/update_groups.html
new file mode 100644
index 0000000..53c96d7
--- /dev/null
+++ b/web/layouts/journeys/update_groups.html
@@ -0,0 +1,32 @@
+{{define "content"}}
+
+
+
+
+
+
+
+
+
+
+
+ {{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
+
+
+
Confirmation de retrait
+
+
Vous etes sur de retirer ce passager
+
+
+
+
+
+
+
+
+
+
+{{end}}
\ No newline at end of file
diff --git a/web/layouts/members/display.html b/web/layouts/members/display.html
index 2d8d487..8e4a2e9 100644
--- a/web/layouts/members/display.html
+++ b/web/layouts/members/display.html
@@ -16,8 +16,6 @@
-
{{if eq .UserID .ViewState.admins.ID}}
Modifier
@@ -60,6 +58,13 @@
{{.ViewState.admins.Data.last_name}}
+
+
Organisations
+ {{range .ViewState.groups}}
+ {{.}}
+
+ {{end}}
+
diff --git a/web/layouts/members/membersList.html b/web/layouts/members/membersList.html
new file mode 100644
index 0000000..884a889
--- /dev/null
+++ b/web/layouts/members/membersList.html
@@ -0,0 +1,154 @@
+{{define "content"}}
+
+
+
+
La listes des référents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nom
+
+
+ Téléphone
+
+
+ Email
+
+
+ Organisations
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Voir,
+
+
+
+
+
+
+
+
+
+
+
+ Résultats
+
+ à
+
+ sur
+
+
+
+
+
+
+
+
+
+
+
+
+{{end}}
\ No newline at end of file
diff --git a/web/layouts/members/update.html b/web/layouts/members/update.html
index b7b28b0..13074f2 100644
--- a/web/layouts/members/update.html
+++ b/web/layouts/members/update.html
@@ -1,4 +1,5 @@
{{define "content"}}
+{{if eq .UserID .ViewState.ID}}
Modifier vos informations
@@ -17,8 +18,9 @@
first_name: ['required'],
last_name: ['required'],
email: ['required', 'email'],
- phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
+ phone_number: ['regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
},
+
formValidation: {
valid: false,
fields: {
@@ -128,4 +130,26 @@
+{{else}}
+
+
+
+
+
+
+
+
+ {{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
+
+
+
Vous n'avez pas le droit de modifier ce profil
+
+
+
+
+
+
+{{end}}
{{end}}
\ No newline at end of file
diff --git a/web/layouts/vehicles/bookings-list.html b/web/layouts/vehicles/bookings-list.html
index 4cb90c2..4f2ace9 100644
--- a/web/layouts/vehicles/bookings-list.html
+++ b/web/layouts/vehicles/bookings-list.html
@@ -1,6 +1,18 @@
{{define "content"}}
@@ -64,6 +76,11 @@
{{end}}
{{end}}
+ {{if not .bookings}}
+
+ Disponible
+
+ {{end}}
{{(index $.ViewState.vehicles_map .Vehicleid).Type}}
diff --git a/web/layouts/vehicles_management/_partials/bookings-list.html b/web/layouts/vehicles_management/_partials/bookings-list.html
index d2a4f98..122f9a0 100644
--- a/web/layouts/vehicles_management/_partials/bookings-list.html
+++ b/web/layouts/vehicles_management/_partials/bookings-list.html
@@ -34,7 +34,7 @@
{{range .ViewState.bookings}}
-
+
{{if .Data.administrator_unavailability}}
Retiré
diff --git a/web/layouts/vehicles_management/_partials/vehicles-list.html b/web/layouts/vehicles_management/_partials/vehicles-list.html
index f831521..c6b9759 100644
--- a/web/layouts/vehicles_management/_partials/vehicles-list.html
+++ b/web/layouts/vehicles_management/_partials/vehicles-list.html
@@ -7,6 +7,10 @@
+
+ Statut Réservation
+
Numéro (Immat / Bicycode)
@@ -28,6 +32,65 @@
{{range .ViewState.vehicles}}
+
+
+ {{if not .Bookings}}
+
+ Disponible
+
+ {{else if len .Bookings | eq 1}}
+ {{range .Bookings}}
+ {{if .Data.administrator_unavailability}}
+
+ Retiré
+
+ {{else if eq .Status -1 }}
+
+ Disponible
+
+ {{else if eq .Status 1 }}
+
+ A venir
+
+ {{else if eq .Status 0 }}
+
+ En cours
+
+ {{end}}
+ {{end}}
+ {{else if gt (len .Bookings) 1}}
+ {{range .Bookings}}
+ {{if .Data.administrator_unavailability}}
+
+ Retiré
+
+ {{else}}
+ {{if eq .Status 1 }}
+
+ A venir
+
+ {{else if eq .Status 0 }}
+
+ En cours
+
+ {{end}}
+ {{end}}
+ {{end}}
+ {{$allAvailable := true}}
+ {{range .Bookings}}
+ {{if ne .Status -1}}
+ {{ $allAvailable = false }}
+ {{break}}
+ {{end}}
+ {{end}}
+ {{if $allAvailable}}
+
+ Disponible
+
+ {{end}}
+ {{end}}
+
+
{{.Data.licence_plate}}