Merge remote-tracking branch 'origin/feature/SUPPORT-9324_fixes' into develop

This commit is contained in:
adel.ka 2025-08-19 12:59:09 +03:00
commit 0639e1ccbb
2 changed files with 33 additions and 1 deletions

View file

@ -8,6 +8,7 @@ import {
BpmnModule,
ComponentsModule,
CoreModule,
LocalStorageService,
ProgressIndicationService,
SecurityModule
} from "@webbpm/base-package";
@ -26,6 +27,7 @@ import {DropdownTreeviewSelectComponent} from "../../account_applications/compon
import {TreeviewModule} from "ngx-treeview";
import {ErvuStaticGrid} from "../../account_applications/component/grid/ErvuStaticGrid";
import {AuthorizationService} from "./service/authorization.service";
import {UserScopeLocalStorageService} from "./service/user-scope-local-storage.service";
registerLocaleData(localeRu);
export const DIRECTIVES = [
@ -62,7 +64,14 @@ export const DIRECTIVES = [
],
providers: [
TokenInterceptor, AuthorizationService,
{provide: ProgressIndicationService, useClass: AppProgressIndicationService }
{
provide: ProgressIndicationService,
useClass: AppProgressIndicationService
},
{
provide: LocalStorageService,
useClass: UserScopeLocalStorageService
}
],
bootstrap: [],
entryComponents: [AppProgressIndicationComponent]

View file

@ -0,0 +1,23 @@
import {LocalStorageService, WebbpmStorage} from "@webbpm/base-package";
import {AuthorizationService} from "./authorization.service";
import {Injectable} from "@angular/core";
@Injectable({providedIn: 'root'})
export class UserScopeLocalStorageService extends LocalStorageService {
constructor(protected authService: AuthorizationService) {
super();
}
readWebbpmStorage(storageId: string): WebbpmStorage {
const userId: string = this.authService.getUserId();
const userStorageId = `user_${userId}_${storageId}`;
return super.readWebbpmStorage(userStorageId);
}
readTemporalWebbpmStorage(storageId: string): WebbpmStorage {
const userId: string = this.authService.getUserId();
const userStorageId = `user_${userId}_${storageId}`;
return super.readTemporalWebbpmStorage(userStorageId);
}
}