27 lines
671 B
TypeScript
27 lines
671 B
TypeScript
|
|
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
|
||
|
|
import { Component, computed, inject } from '@angular/core';
|
||
|
|
import { RouterOutlet } from '@angular/router';
|
||
|
|
import { PosStore } from '../pos.store';
|
||
|
|
|
||
|
|
@Component({
|
||
|
|
selector: 'pos-layout',
|
||
|
|
templateUrl: './layout.component.html',
|
||
|
|
imports: [PageLoadingComponent, RouterOutlet],
|
||
|
|
})
|
||
|
|
export class PosLayoutComponent {
|
||
|
|
constructor() {}
|
||
|
|
|
||
|
|
private readonly store = inject(PosStore);
|
||
|
|
|
||
|
|
readonly loading = computed(() => this.store.loading());
|
||
|
|
readonly posInfo = computed(() => this.store.entity());
|
||
|
|
|
||
|
|
getData() {
|
||
|
|
this.store.getData();
|
||
|
|
}
|
||
|
|
|
||
|
|
ngOnInit() {
|
||
|
|
this.getData();
|
||
|
|
}
|
||
|
|
}
|