Add permissions

This commit is contained in:
2024-11-07 14:26:57 +01:00
parent a392841012
commit 41951d7603
20 changed files with 523 additions and 16 deletions

View File

@@ -1,6 +1,10 @@
<script setup lang="ts">
definePageMeta({
rights: ['admin'],
})
const job = ref<string>('');
const toaster = useToast();
const data = ref(), status = ref<'idle' | 'pending' | 'success' | 'error'>('idle'), success = ref(false), err = ref(false), error = ref();
async function fetch()
{
@@ -19,6 +23,8 @@ async function fetch()
error.value = null;
err.value = false;
success.value = true;
toaster.add({ duration: 10000, content: data.value ?? 'Job executé avec succès', type: 'success', timer: true, });
}
catch(e)
{
@@ -26,6 +32,8 @@ async function fetch()
error.value = e;
err.value = true;
success.value = false;
toaster.add({ duration: 10000, content: error.value, type: 'error', timer: true, });
}
}
</script>