fix: display flash messages on admin users index to show generated passwords

This commit is contained in:
jeremy bayse
2026-04-14 18:24:44 +02:00
parent 4a137fc511
commit 8c577cfaa7

View File

@@ -1,9 +1,10 @@
<script setup> <script setup>
import { Head, useForm, Link, usePage } from '@inertiajs/vue3'; import { Head, useForm, Link, usePage } from '@inertiajs/vue3';
import { ref } from 'vue'; import { ref, computed } from 'vue';
import AdminLayout from '@/Layouts/AdminLayout.vue'; import AdminLayout from '@/Layouts/AdminLayout.vue';
const page = usePage(); const page = usePage();
const flashSuccess = computed(() => page.props.flash?.success);
const props = defineProps({ const props = defineProps({
users: Array, users: Array,
@@ -71,6 +72,19 @@ const cancel = () => {
<AdminLayout> <AdminLayout>
<template #header>Équipe / Utilisateurs Admin</template> <template #header>Équipe / Utilisateurs Admin</template>
<!-- Flash Messages -->
<div v-if="flashSuccess" class="mb-8 p-6 bg-emerald-50 dark:bg-emerald-900/20 border border-emerald-200 dark:border-emerald-800 rounded-xl flex items-center gap-4 animate-in fade-in slide-in-from-top-4 duration-500">
<div class="p-2 bg-emerald-500 rounded-lg text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
</div>
<div class="flex-1">
<p class="font-bold text-emerald-800 dark:text-emerald-400">Action réussie !</p>
<p class="text-emerald-700 dark:text-emerald-500 text-sm">{{ flashSuccess }}</p>
</div>
</div>
<div class="mb-6 flex justify-between items-center"> <div class="mb-6 flex justify-between items-center">
<h1 class="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-indigo-500"> <h1 class="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-indigo-500">
Administrateurs Plateforme Administrateurs Plateforme