feat: add refresh functionality to various components

- Implemented refresh event emission in multiple list components across partner and superAdmin modules.
- Updated consumers and customers list components to handle refresh actions.
- Enhanced dashboard component to fetch partner info on initialization.
- Introduced new API method in PartnerService to retrieve current partner data.
- Modified PartnerStore to utilize the new API method for fetching partner information.
- Updated UI elements to reflect changes in partner and license management, including new fields for license renewals.
- Added a new POS display component for better presentation of POS terminal information.
- Updated layout service and top bar to reflect new titles and improve user experience.
- Refactored existing components to ensure consistency and maintainability.
This commit is contained in:
2026-04-24 23:01:44 +03:30
parent 5bb5f10dbf
commit a816c05777
73 changed files with 559 additions and 97 deletions
+5 -5
View File
@@ -2,15 +2,15 @@ import { EntityState, EntityStore } from '@/core/state';
import { LayoutService } from '@/layout/service/layout.service';
import { inject, Injectable } from '@angular/core';
import { catchError, finalize } from 'rxjs';
import { IPartnerInfoResponse } from '../models';
import { IPartnerResponse } from '../models';
import { PartnerService } from '../services/main.service';
interface PartnerState extends EntityState<IPartnerInfoResponse> {}
interface PartnerState extends EntityState<IPartnerResponse> {}
@Injectable({
providedIn: 'root',
})
export class PartnerStore extends EntityStore<IPartnerInfoResponse, PartnerState> {
export class PartnerStore extends EntityStore<IPartnerResponse, PartnerState> {
private readonly service = inject(PartnerService);
private readonly layoutService = inject(LayoutService);
@@ -27,7 +27,7 @@ export class PartnerStore extends EntityStore<IPartnerInfoResponse, PartnerState
getData() {
this.patchState({ loading: true });
this.service
.getInfo()
.getMe()
.pipe(
finalize(() => {
this.patchState({ loading: false });
@@ -39,7 +39,7 @@ export class PartnerStore extends EntityStore<IPartnerInfoResponse, PartnerState
)
.subscribe((entity) => {
this.layoutService.setPanelInfo({
title: `پنل مدیریتی ${entity.name}`,
title: `پنل مدیریتی ${entity.partner.name}`,
});
this.setEntity(entity);
});