init to partner panel
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
|
||||
import { Component, computed, inject, signal } from '@angular/core';
|
||||
import { ActivatedRoute, RouterOutlet } from '@angular/router';
|
||||
import { PartnerCustomerStore } from '../store/customer.store';
|
||||
|
||||
@Component({
|
||||
selector: 'partner-customer-layout',
|
||||
templateUrl: './layout.component.html',
|
||||
imports: [PageLoadingComponent, RouterOutlet],
|
||||
})
|
||||
export class PartnerCustomerLayoutComponent {
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
private readonly store = inject(PartnerCustomerStore);
|
||||
|
||||
readonly customerId = signal<string>(this.route.snapshot.paramMap.get('customerId')!);
|
||||
|
||||
readonly loading = computed(() => this.store.loading());
|
||||
|
||||
getData() {
|
||||
this.store.getData(this.customerId());
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getData();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user