Files
psp_panel/src/app/domains/pos/layouts/layout.component.ts
T

36 lines
1.0 KiB
TypeScript
Raw Normal View History

2026-03-29 18:07:10 +03:30
import { AuthService } from '@/core';
2026-03-18 13:35:57 +03:30
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
2026-03-29 18:07:10 +03:30
import { JalaliDateDirective } from '@/shared/directives';
2026-03-18 13:35:57 +03:30
import { Component, computed, inject } from '@angular/core';
import { RouterOutlet } from '@angular/router';
2026-03-29 18:07:10 +03:30
import images from 'src/assets/images';
2026-03-18 13:35:57 +03:30
import { PosStore } from '../pos.store';
@Component({
selector: 'pos-layout',
templateUrl: './layout.component.html',
2026-03-29 18:07:10 +03:30
imports: [PageLoadingComponent, RouterOutlet, JalaliDateDirective],
2026-03-18 13:35:57 +03:30
})
export class PosLayoutComponent {
constructor() {}
private readonly store = inject(PosStore);
2026-03-29 18:07:10 +03:30
private readonly authService = inject(AuthService);
2026-03-18 13:35:57 +03:30
readonly loading = computed(() => this.store.loading());
readonly posInfo = computed(() => this.store.entity());
2026-03-29 18:07:10 +03:30
readonly userInfo = computed(() => this.authService.currentAccount());
placeholderLogo = images.placeholders.logo;
now = new Date();
2026-03-18 13:35:57 +03:30
getData() {
2026-04-11 14:46:52 +03:30
this.store.getData().subscribe();
2026-03-18 13:35:57 +03:30
}
ngOnInit() {
this.getData();
}
}