Files
psp_panel/src/app.component.ts
T
ahasani 8c98e53427 feat: update app version and build details in ngsw-config.json
fix: add baseZIndex to p-toast component in app.component.ts

feat: enhance pagination support in saleInvoices list component

refactor: modify saleInvoices service to accept pagination query

feat: update API routes for saleInvoices to support pagination

fix: adjust layout for consumer accounts in partner module

style: improve layout for consumer business activities in partner module

fix: update license info display in dashboard component

fix: ensure price info card displays default values for discount and tax

refactor: clean up gold payload form component

fix: adjust root component layout for mobile view

refactor: unify consumer account list configuration across modules

chore: remove deprecated partner consumer account list config

chore: remove deprecated superAdmin consumer account list config

feat: add new consumer account list configuration

style: add summary list styling in customize.scss

chore: switch API base URL for TIS environment
2026-05-16 14:49:22 +03:30

38 lines
1.1 KiB
TypeScript

import { PwaInstallService } from '@/core/services/pwa-install.service';
import { Component, HostListener } from '@angular/core';
import { RouterModule } from '@angular/router';
import { ConfirmDialog } from 'primeng/confirmdialog';
import { ToastModule } from 'primeng/toast';
import { brandingConfig } from './app/branding/branding.config';
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterModule, ToastModule, ConfirmDialog],
template: `
<p-toast [position]="toastPosition" [baseZIndex]="3000" />
<p-confirmDialog />
<router-outlet />
`,
})
export class AppComponent {
toastPosition: 'top-center' | 'bottom-right' = 'bottom-right';
constructor(private readonly pwaInstallService: PwaInstallService) {
this.updateToastPosition();
if (brandingConfig.enableInstallPrompt) {
this.pwaInstallService.init();
}
}
@HostListener('window:resize')
onResize() {
this.updateToastPosition();
}
private updateToastPosition() {
this.toastPosition =
typeof window !== 'undefined' && window.innerWidth <= 768 ? 'top-center' : 'bottom-right';
}
}