Organizando y comenzando con interfaces

This commit is contained in:
2025-01-11 20:10:14 -03:00
parent 07b62a07a0
commit b87ae08b9a
52 changed files with 9492 additions and 361 deletions

View File

@@ -0,0 +1,21 @@
<div>
<script>
document.addEventListener('alpine:initialized', () => {
const toast = @js(session()->get('toast', null));
if (!toast) {
return;
}
if (toast.type === 'success') {
$interaction('toast').success(toast.title ?? 'Éxito', toast.message).send();
} else if (toast.type === 'error') {
$interaction('toast').error(toast.title ?? 'Error', toast.message).send();
} else if (toast.type === 'warning') {
$interaction('toast').warning(toast.title ?? 'Advertencia', toast.message).send();
} else if (toast.type === 'info') {
$interaction('toast').info(toast.title ?? 'Información', toast.message).send();
}
});
</script>
</div>