fix front
This commit is contained in:
		
							parent
							
								
									fd459c0d31
								
							
						
					
					
						commit
						8098d32260
					
				| 
						 | 
				
			
			@ -5,9 +5,6 @@
 | 
			
		|||
            Bénéficiaires Silvermobi
 | 
			
		||||
        </h1>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div>
 | 
			
		||||
        <div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
 | 
			
		||||
            <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">
 | 
			
		||||
                <form class="space-y-6" method="GET" name="driver_journeys" @submit="submit">                
 | 
			
		||||
                    <div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8" x-data="{
 | 
			
		||||
                                state: {{.ViewState.JSONWithLimits 0 10}},
 | 
			
		||||
| 
						 | 
				
			
			@ -27,7 +24,6 @@
 | 
			
		|||
                                    this.current=page-1
 | 
			
		||||
                                }
 | 
			
		||||
                            }">
 | 
			
		||||
                        <div class="bg-white shadow sm:rounded-2xl">
 | 
			
		||||
                            <div class="border-t border-gray-200 px-4 py-5 sm:px-6">
 | 
			
		||||
                                <div class="mt-8 flex flex-col">
 | 
			
		||||
                                    <div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
 | 
			
		||||
| 
						 | 
				
			
			@ -55,14 +51,7 @@
 | 
			
		|||
                                                                        </button>
 | 
			
		||||
                                                                    </div>
 | 
			
		||||
                                                                </td>
 | 
			
		||||
                                                                <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
 | 
			
		||||
                                                                    <template x-for="tag in beneficiary.data.tags">
 | 
			
		||||
                                                                        <span
 | 
			
		||||
                                                                            class="inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800"
 | 
			
		||||
                                                                            x-text="tag">
 | 
			
		||||
                                                                        </span>
 | 
			
		||||
                                                                    </template>
 | 
			
		||||
                                                                </td>
 | 
			
		||||
                                                               
 | 
			
		||||
                                                                <td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
 | 
			
		||||
                                                                    <a :href="'/app/solidarity_service/create/'+ beneficiary.id"
 | 
			
		||||
                                                                        class="text-co-blue hover:text-co-blue">Demande de trajet<span class="sr-only">
 | 
			
		||||
| 
						 | 
				
			
			@ -132,15 +121,9 @@
 | 
			
		|||
                                </div>
 | 
			
		||||
                            </div>
 | 
			
		||||
                            <input type="hidden" id="passenger_id" name="passenger_id" >
 | 
			
		||||
                            <input type="submit"
 | 
			
		||||
                                    class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto" 
 | 
			
		||||
                                    value="Chercher un Conducteurs">   
 | 
			
		||||
                        </div>
 | 
			
		||||
                           
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                </form>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</main>
 | 
			
		||||
{{end}}
 | 
			
		||||
| 
						 | 
				
			
			@ -145,62 +145,70 @@
 | 
			
		|||
                    <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 conducteur, utiles pour exploiter les fonctionnalités de PARCOURSMOB</p>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div> 
 | 
			
		||||
 | 
			
		||||
                    {{ $fieldName := "address" }}
 | 
			
		||||
                    {{ template "address_autocomplete" dict "FieldName" $fieldName }}
 | 
			
		||||
 | 
			
		||||
                    <!-- will dolater : tags, groups, ... -->
 | 
			
		||||
        <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 conducteur solidaire</h3>
 | 
			
		||||
                    <p class="mt-1 text-sm text-gray-500">Informations personnelles sur le conducteur 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="model" class="block text-sm font-medium text-gray-700">Model</label>
 | 
			
		||||
                            <input type="text" name="model" id="model" 
 | 
			
		||||
                                class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm  rounded-2xl"
 | 
			
		||||
                                :class="border-gray-300">
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="col-span-6 sm:col-span-3">
 | 
			
		||||
                            <label for="brand" class="block text-sm font-medium text-gray-700">Marque</label>
 | 
			
		||||
                            <input type="text" name="brand" id="brand" 
 | 
			
		||||
                                class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm  rounded-2xl"
 | 
			
		||||
                                :class="border-gray-300">
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="col-span-6 sm:col-span-3">
 | 
			
		||||
                            <label for="radius" class="block text-sm font-medium text-gray-700">Périmètre de service </label>
 | 
			
		||||
                            <input type="number" name="radius" id="radius" 
 | 
			
		||||
                                class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm  rounded-2xl"
 | 
			
		||||
                                :class="border-gray-300">
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="col-span-6 sm:col-span-3">
 | 
			
		||||
                            <label for="alias" class="block text-sm font-medium text-gray-700">Alias</label>
 | 
			
		||||
                            <input type="text" name="alias" id="alias" 
 | 
			
		||||
                                class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm  rounded-2xl"
 | 
			
		||||
                                :class="border-gray-300">
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="col-span-6 sm:col-span-3">
 | 
			
		||||
                            <label for="grade" class="block text-sm font-medium text-gray-700">Grade</label>
 | 
			
		||||
                            <input type="text" name="grade" id="grade" 
 | 
			
		||||
                                class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm  rounded-2xl"
 | 
			
		||||
                                :class="border-gray-100">
 | 
			
		||||
                        </div>  
 | 
			
		||||
                        <div class="col-span-6 sm:col-span-3">
 | 
			
		||||
 | 
			
		||||
                            {{ $fieldName := "address" }}
 | 
			
		||||
                            {{ template "address_autocomplete" dict "FieldName" $fieldName }}
 | 
			
		||||
        
 | 
			
		||||
                            <!-- will dolater : tags, groups, ... -->
 | 
			
		||||
        
 | 
			
		||||
                        </div>                     
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div> 
 | 
			
		||||
 | 
			
		||||
        <div class="lg:col-span-1">
 | 
			
		||||
            <label for="model" class="block text-sm font-medium text-gray-700">Model</label>
 | 
			
		||||
            <div class="mt-1">
 | 
			
		||||
                <input type="text" id="model" name="model" 
 | 
			
		||||
                    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="brand" class="block text-sm font-medium text-gray-700">Brand</label>
 | 
			
		||||
            <div class="mt-1">
 | 
			
		||||
                <input type="text" id="brand" name="brand" 
 | 
			
		||||
                    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="radius" class="block text-sm font-medium text-gray-700">Radius</label>
 | 
			
		||||
            <div class="mt-1">
 | 
			
		||||
                <input type="number" id="radius" name="radius" 
 | 
			
		||||
                    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="alias" class="block text-sm font-medium text-gray-700">Alias</label>
 | 
			
		||||
            <div class="mt-1">
 | 
			
		||||
                <input type="text" id="alias" name="alias" 
 | 
			
		||||
                    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="grade" class="block text-sm font-medium text-gray-700">Grade</label>
 | 
			
		||||
            <div class="mt-1">
 | 
			
		||||
                <input type="number" id="grade" name="grade" 
 | 
			
		||||
                    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 x-data="{
 | 
			
		||||
            days : [
 | 
			
		||||
            'monday' ,
 | 
			
		||||
            'tuesday' ,
 | 
			
		||||
            'wednesday' ,
 | 
			
		||||
            'thursday' ,
 | 
			
		||||
            'friday' ,
 | 
			
		||||
            'saturday' ,
 | 
			
		||||
            'sunday' ,
 | 
			
		||||
            'Monday' ,
 | 
			
		||||
            'Tuesday' ,
 | 
			
		||||
            'Wednesday' ,
 | 
			
		||||
            'Thursday' ,
 | 
			
		||||
            'Friday' ,
 | 
			
		||||
            'Saturday' ,
 | 
			
		||||
            'Sunday' ,
 | 
			
		||||
            ],
 | 
			
		||||
 | 
			
		||||
            hours : [
 | 
			
		||||
| 
						 | 
				
			
			@ -257,19 +265,29 @@
 | 
			
		|||
                
 | 
			
		||||
            }
 | 
			
		||||
        }">
 | 
			
		||||
        <template x-for="day in days" :key="day">
 | 
			
		||||
            <div class="mb-4"> 
 | 
			
		||||
                <label :for="'day-select-'+ day" class="block text-sm font-medium text-gray-700" x-text="day"></label><br>
 | 
			
		||||
                <div :name="day" :id="'day-select-' + day" multiple>
 | 
			
		||||
                    <template x-for="hour in hours" :key="hour">
 | 
			
		||||
                        <input :id="'hour-' + day + '-' + hour" type="checkbox" x-text="hour" x-value="hour" class="mr-4"></input>
 | 
			
		||||
                        <label :for="'hour-' + day + '-' + hour" x-text="hour" class="text-sm text-gray-700"></label>
 | 
			
		||||
                    </template>
 | 
			
		||||
        <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">Disponibilitées</h3>
 | 
			
		||||
                    <p class="mt-1 text-sm text-gray-500">La définition de vos horraires permet de vous proposer des trajés uniquement quand vous serai disponible.  </p>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="grid grid-cols-1 grid-rows-7 gap-4">
 | 
			
		||||
        <template x-for="day in days" :key="day" >
 | 
			
		||||
            <div class="mb-4 gap-2 mt-4 bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6"> 
 | 
			
		||||
                <label :for="'day-select-'+ day" class="block text-sm font-medium select-none transition-colors duration-200 hover:text-gray-900 text-center mb-4" x-text="day"></label>
 | 
			
		||||
                <div :name="day" :id="'day-select-' + day" class="grid grid-cols-6 grid-rows-2">
 | 
			
		||||
                        <template x-for="hour in hours" :key="hour">
 | 
			
		||||
                            <div class="flex flex-col items-center mb-4 ">
 | 
			
		||||
                                <input :id="'hour-' + day + '-' + hour" type="checkbox"  x-value="hour" class="mt-1 focus:ring-co-blue focus:border-co-blue block shadow-sm sm:text-sm text-xl py-2 px-4 h-12 rounded-2xl w-auto"></input>
 | 
			
		||||
                                <label :for="'hour-' + day + '-' + hour" x-text="hour" class="block text-sm font-medium text-gray-700 select-none transition-colors duration-200 hover:text-gray-900 text-center "></label>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </template>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </template>
 | 
			
		||||
        <button type="button" @click="confirmAvailabilities()"
 | 
			
		||||
        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">Confirmer les disponibilitées</button>
 | 
			
		||||
    </div>
 | 
			
		||||
        <input type="hidden" id="availabilities" name="availabilities" >
 | 
			
		||||
        <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>
 | 
			
		||||
| 
						 | 
				
			
			@ -277,6 +295,8 @@
 | 
			
		|||
                <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="button" @click="confirmAvailabilities()"
 | 
			
		||||
        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">Confirmer les disponibilitées</button>
 | 
			
		||||
            <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 conducteur</button>
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,7 +25,9 @@
 | 
			
		|||
            Conducteurs
 | 
			
		||||
        </h2>
 | 
			
		||||
        <div class="border-t border-gray-200 px-4 py-5 sm:px-6">
 | 
			
		||||
 | 
			
		||||
            <a
 | 
			
		||||
             class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto" 
 | 
			
		||||
             href="driver/create">Ajouter un conducteur solidaire</a>
 | 
			
		||||
            <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">
 | 
			
		||||
| 
						 | 
				
			
			@ -116,7 +118,6 @@
 | 
			
		|||
            </div>
 | 
			
		||||
            <p id="driver_name"></p>
 | 
			
		||||
            <input type="hidden" id="driver_id" name="driver_id" >
 | 
			
		||||
            <a href="driver/create">Ajouter un conducteur solidaire</a>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
</main>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue