add update profile

This commit is contained in:
soukainna 2022-12-15 17:11:28 +01:00
parent 94b621e883
commit c46c03fc4f
4 changed files with 26 additions and 10 deletions

View File

@ -36,6 +36,9 @@ views:
display:
files:
- web/layouts/conseillers/display.html
update:
files:
- web/layouts/conseillers/update.html
vehicles:
search:
files:

View File

@ -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="/app/conseillers/{{.ID}}" 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>

View File

@ -14,6 +14,13 @@
{{.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">
@ -34,7 +41,14 @@
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.email}}</dd>
</div>
{{end}}
<br>
{{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>
@ -44,6 +58,7 @@
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.admins.Data.last_name}}
</dd>
</div>
</dl>
</div>
</div>

View File

@ -8,8 +8,6 @@
<!-- <script defer type="text/javascript" src="/public/js/main.js" defer></script> -->
<script src="https://cdn.jsdelivr.net/npm/@kingshott/iodine@8.1.0/dist/iodine.min.umd.js" defer></script>
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js" defer></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 class="h-full" x-data="{ offCanvasMenu: false }">
@ -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>