refactor: streamline state initialization across stores using defaultBaseStateData
- Replaced individual state properties (loading, error, entity, initialized, isRefreshing) with a spread of defaultBaseStateData in various entity stores including AccountStore, BusinessActivityStore, ConsumerComplexStore, PosStore, and others. - Updated imports to include defaultBaseStateData in relevant store files. - Enhanced consistency in state management across multiple stores. feat: add partner profile management components and services - Introduced PartnerProfileFormComponent and PartnerResetPasswordCardComponent for profile editing and password reset functionalities. - Created ProfileService to handle API interactions for partner profile management. - Added routes and constants for partner profile API and navigation. - Implemented UI components for displaying and editing partner profile information in single.component.html and single.component.ts.
This commit is contained in:
@@ -23,6 +23,7 @@ interface LayoutState {
|
||||
menuHoverActive?: boolean;
|
||||
isFixedContentSize?: boolean;
|
||||
isFullPage?: boolean;
|
||||
profilePageRoute?: string;
|
||||
}
|
||||
|
||||
interface MenuChangeEvent {
|
||||
@@ -51,6 +52,7 @@ export class LayoutService {
|
||||
menuHoverActive: false,
|
||||
isFixedContentSize: true,
|
||||
isFullPage: false,
|
||||
profilePageRoute: '',
|
||||
};
|
||||
|
||||
layoutConfig = signal<layoutConfig>(this._config);
|
||||
@@ -68,7 +70,7 @@ export class LayoutService {
|
||||
public menuItems = signal<MenuItem[]>([]);
|
||||
|
||||
public panelInfo = signal<IPanelInfo>({
|
||||
title: 'پنل مدیریت صورتحسابهای مالیاتی',
|
||||
title: '',
|
||||
});
|
||||
|
||||
menuSource$ = this.menuSource.asObservable();
|
||||
@@ -95,6 +97,7 @@ export class LayoutService {
|
||||
|
||||
isFixedContentSize = computed(() => this.layoutState().isFixedContentSize);
|
||||
isFullPage = computed(() => this.layoutState().isFullPage);
|
||||
profilePageRoute = computed(() => this.layoutState().profilePageRoute || '');
|
||||
|
||||
transitionComplete = signal<boolean>(false);
|
||||
|
||||
@@ -264,4 +267,10 @@ export class LayoutService {
|
||||
setTopbarEndSlot(tpl: TemplateRef<any> | null) {
|
||||
this.topbarEndSlot.next(tpl);
|
||||
}
|
||||
setProfilePageRoute(route: string) {
|
||||
this.layoutState.update((prev) => ({
|
||||
...prev,
|
||||
profilePageRoute: route,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user