Files
psp_panel/src/app/domains/consumer/modules/poses/components/layout.component.ts
T

29 lines
902 B
TypeScript
Raw Normal View History

2026-04-14 15:56:32 +03:30
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
import pageParamsUtils from '@/utils/page-params.utils';
import { Component, computed, inject } from '@angular/core';
import { ActivatedRoute, RouterOutlet } from '@angular/router';
import { ConsumerPosStore } from '../store/pos.store';
@Component({
selector: 'consumer-pos-layout',
templateUrl: './layout.component.html',
imports: [PageLoadingComponent, RouterOutlet],
})
export class ConsumerPosLayoutComponent {
private readonly store = inject(ConsumerPosStore);
private readonly route = inject(ActivatedRoute);
readonly loading = computed(() => this.store.loading());
readonly pageParams = computed(() => pageParamsUtils(this.route));
readonly posId = computed(() => this.pageParams()['posId']!);
getData() {
this.store.getData(this.posId());
}
ngOnInit() {
this.getData();
}
}