add history-diags and edit display-diag, home and booking-diags
This commit is contained in:
		
							parent
							
								
									153e832649
								
							
						
					
					
						commit
						95afa20373
					
				| 
						 | 
				
			
			@ -197,6 +197,9 @@ views:
 | 
			
		|||
    update:
 | 
			
		||||
      files:
 | 
			
		||||
        - web/layouts/diags/update-diag.html
 | 
			
		||||
    history:
 | 
			
		||||
      files:
 | 
			
		||||
        - web/layouts/diags/history-diags.html
 | 
			
		||||
 | 
			
		||||
  administration:
 | 
			
		||||
    home:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,11 +9,12 @@
 | 
			
		|||
        </div>
 | 
			
		||||
        <div
 | 
			
		||||
        class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
 | 
			
		||||
       
 | 
			
		||||
            {{if eq .ViewState.diag.Deleted false}}
 | 
			
		||||
            <a href="/app/diags/{{$diag}}/update" class="inline-flex"><button type="button"
 | 
			
		||||
                class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Modifier</button></a>
 | 
			
		||||
            <a href="/app/diags/{{$diag}}/delete" class="inline-flex"><button type="button"
 | 
			
		||||
                class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Retirer</button></a>
 | 
			
		||||
            {{end}}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-6 sm:px-6 lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-3">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,73 @@
 | 
			
		|||
{{define "content"}}
 | 
			
		||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
 | 
			
		||||
    <h1 class="text-2xl font-semibold text-gray-900">Diagnostics retirés</h1>
 | 
			
		||||
 | 
			
		||||
    <div class="sm:flex sm:items-center">
 | 
			
		||||
        <div class="sm:flex-auto">
 | 
			
		||||
            <p class="mt-2 text-sm text-gray-700"></p>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
 | 
			
		||||
            <a href="/app/diags/">
 | 
			
		||||
                <button type="button"
 | 
			
		||||
                    class="inline-flex items-center justify-center mr-3 bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
 | 
			
		||||
                    Retour
 | 
			
		||||
                </button>
 | 
			
		||||
            </a>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
 | 
			
		||||
    <div class="mt-8 flex flex-col">
 | 
			
		||||
        <div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
 | 
			
		||||
            <div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
 | 
			
		||||
                <div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
 | 
			
		||||
                    <table class="min-w-full divide-y divide-gray-300">
 | 
			
		||||
                        <thead class="bg-gray-50">
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
 | 
			
		||||
                                    Nom du diagnostic
 | 
			
		||||
                                </th>
 | 
			
		||||
                                <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
 | 
			
		||||
                                    Type
 | 
			
		||||
                                </th>
 | 
			
		||||
                                <th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
 | 
			
		||||
                                    <span class="sr-only">Actions</span>
 | 
			
		||||
                                </th>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            <tbody class="divide-y divide-gray-200 bg-white">
 | 
			
		||||
                                {{range .ViewState.diags}}
 | 
			
		||||
                                {{if eq .Deleted true}}
 | 
			
		||||
                                <a href="/app/diags/{{.ID}}">
 | 
			
		||||
                                <tr>
 | 
			
		||||
                                    <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
 | 
			
		||||
 | 
			
		||||
                                        <div class="font-medium text-gray-900">{{.Name}}</div>
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                    <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
 | 
			
		||||
                                        {{if eq .Namespace "parcoursmob_beneficiaries"}}
 | 
			
		||||
                                        <div class="text-gray-500">Diagnostic personnelle</div>
 | 
			
		||||
                                        {{end}}
 | 
			
		||||
                                        {{if eq .Namespace "parcoursmob_vehicles"}}
 | 
			
		||||
                                        <div class="text-gray-500">Diagnostic automobile</div>
 | 
			
		||||
                                        {{end}}
 | 
			
		||||
                                        {{if eq .Namespace "parcoursmob_bookings"}}
 | 
			
		||||
                                        <div class="text-gray-500">Diagnostic véhicule réservé</div>
 | 
			
		||||
                                        {{end}}
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                    <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
 | 
			
		||||
                                        <a href="/app/diags/{{.ID}}" class="text-co-blue hover:text-co-blue">Voir</a>
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                </tr>
 | 
			
		||||
                                </a>
 | 
			
		||||
                                {{end}}
 | 
			
		||||
                                {{end}}
 | 
			
		||||
                            </tbody>
 | 
			
		||||
                        </thead>
 | 
			
		||||
                    </table>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
{{end}}
 | 
			
		||||
| 
						 | 
				
			
			@ -35,10 +35,12 @@
 | 
			
		|||
                                <th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
 | 
			
		||||
                                    <span class="sr-only">Actions</span>
 | 
			
		||||
                                </th>
 | 
			
		||||
                                <th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
 | 
			
		||||
                                    <span class="sr-only">Actions</span>
 | 
			
		||||
                                </th>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            <tbody class="divide-y divide-gray-200 bg-white">
 | 
			
		||||
                                {{range .ViewState.diags}}
 | 
			
		||||
                                {{if eq .Deleted false}}
 | 
			
		||||
                                <a href="/app/diags/{{.ID}}">
 | 
			
		||||
                                <tr>
 | 
			
		||||
                                    <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
 | 
			
		||||
| 
						 | 
				
			
			@ -56,13 +58,17 @@
 | 
			
		|||
                                        <div class="text-gray-500">Diagnostic véhicule réservé</div>
 | 
			
		||||
                                        {{end}}
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                    <td class="whitespace nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
 | 
			
		||||
                                        {{if eq .Deleted true}}
 | 
			
		||||
                                        <div class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Diagnostic retiré</div>
 | 
			
		||||
                                        {{end}}
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                    <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
 | 
			
		||||
                                        <a href="/app/diags/{{.ID}}" class="text-co-blue hover:text-co-blue">Voir</a>
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                </tr>
 | 
			
		||||
                                </a>
 | 
			
		||||
                                {{end}}
 | 
			
		||||
                                {{end}}
 | 
			
		||||
                            </tbody>
 | 
			
		||||
                        </thead>
 | 
			
		||||
                    </table>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,7 +25,7 @@
 | 
			
		|||
                {{if eq .Deleted false}}
 | 
			
		||||
                    <li class="py-5 px-4 flex">
 | 
			
		||||
                            <div class="flex-1 ml-3">
 | 
			
		||||
                                <a href="app/diags/{{$diags}}" class="mt-1 text-sm text-gray-900">{{.Name}}</a>
 | 
			
		||||
                                <a href="/app/diags/{{$diags}}" class="mt-1 text-sm text-gray-900">{{.Name}}</a>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        <a href="/app/diags/{{$diags}}/delete" class="inline-flex"><button type="button"
 | 
			
		||||
                            class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Retirer</button></a>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue