create consumer domain accounts permissions

This commit is contained in:
2026-04-11 14:46:52 +03:30
parent d154a8402b
commit d4dff4ebfd
33 changed files with 480 additions and 37 deletions
+13 -17
View File
@@ -1,7 +1,7 @@
import { EntityState, EntityStore } from '@/core/state';
import { computed, inject, Injectable } from '@angular/core';
import { CookieService } from 'ngx-cookie-service';
import { catchError, finalize, throwError } from 'rxjs';
import { finalize, map } from 'rxjs';
import { IPosInfoResponse } from './models/pos.io';
import { PosService } from './modules/landing/services/main.service';
@@ -30,22 +30,18 @@ export class PosStore extends EntityStore<IPosInfoResponse, PosState> {
getData() {
this.patchState({ loading: true });
this.service
.getInfo()
.pipe(
finalize(() => {
this.patchState({ loading: false });
}),
catchError(() => {
this.patchState({
error: '',
});
return throwError('');
}),
)
.subscribe((entity) => {
this.patchState({ entity });
});
return this.service.getInfo().pipe(
finalize(() => {
this.patchState({ loading: false });
}),
map((entity: IPosInfoResponse) => {
if (entity) {
this.patchState({ entity: entity });
}
return entity;
}),
);
}
override reset(): void {