Revert "Merge branch 'feat/add-chat-presupuesto-cliente' into 'main'"

This reverts merge request !352
This commit is contained in:
Alvaro
2024-10-23 05:18:00 +00:00
parent 47e6cbb5f7
commit 7ce2723a09
147 changed files with 5666 additions and 9809 deletions

View File

@ -21,13 +21,10 @@ if (session()->has('error')) {
<div id="sk-alert">
</div>
<div id="sk-alert-2">
</div>
<?= $this->section('globalJsFunctions') ?>
function popAlert(message, alertClass, alertIcon, containerId = 'sk-alert', fade = true){
function popAlert(message, alertClass, alertIcon, containerId = 'sk-alert'){
var htmlString = `
<div class="alert ${alertClass} d-flex align-items-baseline" role="alert">
<span class="alert-icon alert-icon-lg text-primary me-2">
@ -40,39 +37,25 @@ function popAlert(message, alertClass, alertIcon, containerId = 'sk-alert', fade
if(containerId == 'sk-alert'){
$(window).scrollTop(0);
}
if(fade){
$('#' + containerId).hide().empty().html(htmlString).fadeIn("slow", function(){
setTimeout(function(){
$('#' + containerId).fadeOut("slow");
}, 5000);
});
}
else{
$('#' + containerId).hide().empty().html(htmlString).fadeIn("slow");
$('html, body').animate({ scrollTop: 0 }, 500);
}
}
function popSuccessAlert(successMsg, containerId = 'sk-alert', fade = true){
popAlert(successMsg, "alert-success", "ti-check", containerId, fade);
}
function popWarningAlert(warningMsg, containerId = 'sk-alert', fade = true){
popAlert(warningMsg, "alert-warning", "ti-bell", containerId, fade);
}
function popErrorAlert(errorMsg, containerId = 'sk-alert', fade = true){
popAlert(errorMsg, "alert-danger", "ti-ban", containerId, fade);
}
function popAlert2Hide(containerId = 'sk-alert-2'){
$('#' + containerId).hide().empty().fadeIn("slow", function(){
$('#' + containerId).hide().empty().html(htmlString).fadeIn("slow", function(){
setTimeout(function(){
$('#' + containerId).fadeOut("slow");
}, 2000);
}, 5000);
});
}
function popSuccessAlert(successMsg, containerId = 'sk-alert'){
popAlert(successMsg, "alert-success", "ti-check", containerId);
}
function popWarningAlert(warningMsg, containerId = 'sk-alert'){
popAlert(warningMsg, "alert-warning", "ti-bell", containerId);
}
function popErrorAlert(errorMsg, containerId = 'sk-alert'){
popAlert(errorMsg, "alert-danger", "ti-ban", containerId);
}
<?php if (isset($successMessage) && $successMessage){ ?>
popSuccessAlert(`<?= $successMessage ?>`);
<?php } ?>