e58bcbef57
- Added ConsumerStore and PosStore to manage state and data fetching for consumers and POS entities. - Implemented breadcrumb functionality in both stores to enhance navigation. - Created views for consumer accounts, business activities, complexes, and poses with respective components. - Developed single view components for detailed display and editing of consumer and POS data. - Introduced charge account management components in the super admin module, including forms and lists for charge transactions. - Established API routes and services for handling charge account transactions.
28 lines
873 B
TypeScript
28 lines
873 B
TypeScript
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
|
|
import { Component, computed, inject, signal } from '@angular/core';
|
|
import { ActivatedRoute, RouterOutlet } from '@angular/router';
|
|
import { ConsumerStore } from '../store/consumer.store';
|
|
|
|
@Component({
|
|
selector: 'partner-consumer-layout',
|
|
templateUrl: './layout.component.html',
|
|
imports: [PageLoadingComponent, RouterOutlet],
|
|
})
|
|
export class ConsumerLayoutComponent {
|
|
private readonly store = inject(ConsumerStore);
|
|
private readonly route = inject(ActivatedRoute);
|
|
|
|
readonly consumerId = signal<string>(this.route.snapshot.paramMap.get('consumerId')!);
|
|
|
|
readonly loading = computed(() => this.store.loading());
|
|
readonly consumer = computed(() => this.store.entity());
|
|
|
|
getData() {
|
|
this.store.getData(this.consumerId());
|
|
}
|
|
|
|
ngOnInit() {
|
|
this.getData();
|
|
}
|
|
}
|