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() {
|
|
|
|
|
this.store.getData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
this.getData();
|
|
|
|
|
}
|
|
|
|
|
}
|