Trabajando

This commit is contained in:
Jaime Jimenez
2023-08-16 19:44:00 +02:00
parent 3b84839fc0
commit d8afcf9c32
9 changed files with 158 additions and 87 deletions

View File

@ -24,9 +24,7 @@ if (session()->has('error')) {
<?= $this->section('additionalInlineJs') ?>
function popAlert(message, alertType){
var alertClass = "alert-" + alertType;
var alertIcon = alertType == "success" ? "ti-check" : "ti-" + alertType;
function popAlert(message, alertClass, alertIcon){
var htmlString = `
<div class="alert ${alertClass} d-flex align-items-baseline" role="alert">
<span class="alert-icon alert-icon-lg text-primary me-2">
@ -45,15 +43,15 @@ function popAlert(message, alertType){
}
function popSuccessAlert(successMsg){
popAlert(successMsg, "success");
popAlert(successMsg, "alert-success", "ti-check");
}
function popWarningAlert(warningMsg){
popAlert(warningMsg, "warning");
popAlert(warningMsg, "alert-warning", "ti-bell");
}
function popErrorAlert(errorMsg){
popAlert(errorMsg, "error");
popAlert(errorMsg, "alert-danger", "ti-ban");
}
<?php if (isset($successMessage) && $successMessage){ ?>