Feature #13 : Fiture Notify
This commit is contained in:
parent
b545c0c85b
commit
caa8f39c91
@ -21,7 +21,9 @@
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"jquery": "^3.7.1",
|
||||
"mini-svg-data-uri": "^1.4.4",
|
||||
"notie": "^4.3.1",
|
||||
"sweetalert2": "^11.12.4",
|
||||
"toastr": "^2.1.4",
|
||||
"tom-select": "^2.3.1"
|
||||
}
|
||||
}
|
||||
|
@ -19,3 +19,19 @@ document.querySelectorAll(".tomselect").forEach((el) => {
|
||||
|
||||
new TomSelect(el, settings);
|
||||
});
|
||||
|
||||
import toast from "toastr";
|
||||
import "toastr/build/toastr.css";
|
||||
|
||||
document.querySelectorAll(".toastr").forEach((el) => {
|
||||
toast.options = {
|
||||
closeButton: true,
|
||||
timeOut: 5000,
|
||||
showMethod: "slideDown",
|
||||
closeMethod: "slideUp",
|
||||
preventDuplication: true,
|
||||
newestOnTop: true,
|
||||
closeDuration: 300,
|
||||
};
|
||||
toast[el.dataset.type](el.dataset.message);
|
||||
});
|
||||
|
@ -15,6 +15,20 @@
|
||||
</head>
|
||||
|
||||
<body class="flex h-full metronic sidebar-fixed header-fixed bg-[#fefefe] dark:bg-coal-500">
|
||||
|
||||
@if (session('error'))
|
||||
<em class="hidden toastr" data-type="error" data-message=" {{ session('status') }}"></em>
|
||||
@endif
|
||||
|
||||
@if (session('info'))
|
||||
<em class="hidden toastr" data-type="info" data-message=" {{ session('info') }}"></em>
|
||||
@endif
|
||||
|
||||
@if (session('success'))
|
||||
<em class="hidden toastr" data-type="success" data-message=" {{ session('success') }}"></em>
|
||||
@endif
|
||||
|
||||
|
||||
<!--begin::Theme mode setup on page load-->
|
||||
<script>
|
||||
const defaultThemeMode = 'dark'; // light|dark|system
|
||||
@ -41,6 +55,8 @@
|
||||
|
||||
@yield('main')
|
||||
@stack('scripts')
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user