feat: implement tenant branding system and global toast notification service

This commit is contained in:
2026-07-01 11:54:11 -03:00
parent 2764201ca0
commit 0363280ede
17 changed files with 294 additions and 5 deletions

View File

@@ -0,0 +1,38 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { NgClass } from '@angular/common';
import { ToastService, Toast } from '../../../core/services/toast.service';
@Component({
selector: 'app-toast-container',
imports: [NgClass],
templateUrl: './toast-container.component.html',
styleUrl: './toast-container.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ToastContainerComponent {
private readonly toastService = inject(ToastService);
readonly toasts = this.toastService.toasts;
dismiss(id: string): void {
this.toastService.dismiss(id);
}
getToastIconClass(type: Toast['type']): string {
const icons: Record<Toast['type'], string> = {
success: 'fa-solid fa-circle-check',
danger: 'fa-solid fa-circle-exclamation',
info: 'fa-solid fa-circle-info'
};
return icons[type] || 'fa-solid fa-bell';
}
getToastBgClass(type: Toast['type']): string {
const classes: Record<Toast['type'], string> = {
success: 'text-bg-success',
danger: 'text-bg-danger',
info: 'text-bg-primary'
};
return classes[type] || 'text-bg-primary';
}
}