localization, assign data-base, tenant domain, plan and subscription and data-base connection screen added
This commit is contained in:
@@ -5,14 +5,7 @@ import Swal, { SweetAlertIcon, SweetAlertOptions } from 'sweetalert2';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NotificationService {
|
||||
/**
|
||||
* Triggers a top-right SweetAlert notification programmatically.
|
||||
* Matches structure: position: 'top-end', showConfirmButton: false, timer: 1500
|
||||
*
|
||||
* @param message Dynamic message text to display
|
||||
* @param icon SweetAlert icon type ('success' | 'error' | 'warning' | 'info')
|
||||
* @param timer Notification display duration in ms (default 1500ms)
|
||||
*/
|
||||
|
||||
notify(message: string, icon: SweetAlertIcon = 'success', timer = 1500): void {
|
||||
Swal.fire({
|
||||
position: 'top-end',
|
||||
@@ -23,21 +16,11 @@ export class NotificationService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers top-right success notification
|
||||
*/
|
||||
|
||||
success(message: string, timer = 1500): void {
|
||||
this.notify(message, 'success', timer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays Danger Sweetalert error modal centered on screen.
|
||||
* Matches template design: icon: 'error', title: 'Oops...', text: message & DangerSweetalert class
|
||||
*
|
||||
* @param message Dynamic error text
|
||||
* @param title Error title (defaults to 'Oops...')
|
||||
* @param footer Optional footer HTML link (defaults to null)
|
||||
*/
|
||||
error(
|
||||
message: string,
|
||||
title = 'Oops...',
|
||||
@@ -57,23 +40,16 @@ export class NotificationService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers top-right warning notification
|
||||
*/
|
||||
|
||||
warning(message: string, timer = 2500): void {
|
||||
this.notify(message, 'warning', timer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers top-right info notification
|
||||
*/
|
||||
|
||||
info(message: string, timer = 2000): void {
|
||||
this.notify(message, 'info', timer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom SweetAlert call with top-right defaults preset
|
||||
*/
|
||||
custom(options: SweetAlertOptions): void {
|
||||
Swal.fire({
|
||||
position: 'top-end',
|
||||
|
||||
Reference in New Issue
Block a user