Commit 43e768b7 authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

refactor: implement new solidify feature

parent 241fe9a9
......@@ -15,18 +15,17 @@ import {FundingAgency} from "@models";
import {
Action,
Actions,
ofActionCompleted,
Selector,
State,
StateContext,
Store,
} from "@ngxs/store";
import {ApiEnum} from "@shared/enums/api.enum";
import {StateEnum} from "@shared/enums/state.enum";
import {
RoutesEnum,
urlSeparator,
} from "@shared/enums/routes.enum";
import {StateEnum} from "@shared/enums/state.enum";
import {SharedOrgUnitAction} from "@shared/stores/organizational-unit/shared-organizational-unit.action";
import {Observable} from "rxjs";
import {tap} from "rxjs/operators";
......@@ -37,6 +36,7 @@ import {
isNullOrUndefined,
MARK_AS_TRANSLATABLE,
NotificationService,
ofSolidifyActionCompleted,
OverrideDefaultAction,
ResourceState,
ResourceStateModel,
......@@ -119,8 +119,8 @@ export class AdminFundingAgenciesState extends ResourceState<AdminFundingAgencie
{
action: new SharedOrgUnitAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedOrgUnitAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedOrgUnitAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedOrgUnitAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedOrgUnitAction.GetAllFail)),
],
},
]).pipe(
......@@ -177,8 +177,8 @@ export class AdminFundingAgenciesState extends ResourceState<AdminFundingAgencie
return StoreUtil.dispatchParallelActionAndWaitForSubActionsCompletion(ctx, [{
action: new AdminFundingAgenciesOrgUnitAction.Update(fundingAgencyId, newOrgUnit),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminFundingAgenciesOrgUnitAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminFundingAgenciesOrgUnitAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminFundingAgenciesOrgUnitAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminFundingAgenciesOrgUnitAction.UpdateFail)),
],
}]);
}
......@@ -194,8 +194,8 @@ export class AdminFundingAgenciesState extends ResourceState<AdminFundingAgencie
{
action: new adminFundingAgenciesOrgUnitActionNameSpace.DeleteList(action.resId, oldOrgUnit),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(adminFundingAgenciesOrgUnitActionNameSpace.DeleteListSuccess)),
this.actions$.pipe(ofActionCompleted(adminFundingAgenciesOrgUnitActionNameSpace.DeleteListFail)),
this.actions$.pipe(ofSolidifyActionCompleted(adminFundingAgenciesOrgUnitActionNameSpace.DeleteListSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(adminFundingAgenciesOrgUnitActionNameSpace.DeleteListFail)),
],
},
],
......
......@@ -8,7 +8,6 @@ import {Language} from "@models";
import {
Action,
Actions,
ofActionCompleted,
Selector,
State,
StateContext,
......@@ -26,6 +25,7 @@ import {
isNullOrUndefined,
MARK_AS_TRANSLATABLE,
NotificationService,
ofSolidifyActionCompleted,
ResourceState,
ResourceStateModel,
StoreUtil,
......@@ -99,8 +99,8 @@ export class AdminLanguageState extends ResourceState<AdminLanguageStateModel, L
{
action: new SharedLanguageAction.GetAll(null, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedLanguageAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedLanguageAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedLanguageAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedLanguageAction.GetAllFail)),
],
},
]).pipe(
......
......@@ -11,7 +11,6 @@ import {NotificationDlcm} from "@models";
import {
Action,
Actions,
ofActionCompleted,
Selector,
State,
StateContext,
......@@ -33,6 +32,7 @@ import {
isNullOrUndefined,
MARK_AS_TRANSLATABLE,
NotificationService,
ofSolidifyActionCompleted,
OverrideDefaultAction,
ResourceState,
ResourceStateModel,
......@@ -114,8 +114,8 @@ export class AdminNotificationState extends ResourceState<AdminNotificationState
{
action: new SharedRoleAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedRoleAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedRoleAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedRoleAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedRoleAction.GetAllFail)),
],
},
]).pipe(
......
......@@ -7,7 +7,6 @@ import {OaiSet} from "@models";
import {
Action,
Actions,
ofActionCompleted,
Selector,
State,
StateContext,
......@@ -28,6 +27,7 @@ import {
isNullOrUndefined,
MARK_AS_TRANSLATABLE,
NotificationService,
ofSolidifyActionCompleted,
ResourceState,
ResourceStateModel,
StoreUtil,
......@@ -103,8 +103,8 @@ export class AdminOaiSetState extends ResourceState<AdminOaiSetStateModel, OaiSe
{
action: new SharedOrgUnitAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedOrgUnitAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedOrgUnitAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedOrgUnitAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedOrgUnitAction.GetAllFail)),
],
},
]).pipe(
......@@ -140,8 +140,8 @@ export class AdminOaiSetState extends ResourceState<AdminOaiSetStateModel, OaiSe
model: oaiSet,
}),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminOaiSetAction.CreateDuringBulkSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOaiSetAction.CreateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOaiSetAction.CreateDuringBulkSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOaiSetAction.CreateFail)),
],
});
});
......
......@@ -20,22 +20,17 @@ import {
} from "@models";
import {
Actions,
ofActionCompleted,
Store,
} from "@ngxs/store";
import {SharedAbstractDialog} from "@shared/components/dialogs/shared-abstract/shared-abstract.dialog";
import {FormControlKey} from "@shared/models/form-control-key.model";
import {Observable} from "rxjs";
import {
take,
tap,
} from "rxjs/operators";
import {
AbstractFormPresentational,
isTrue,
MARK_AS_TRANSLATABLE,
MemoizedUtil,
ModelFormControlEvent,
StoreUtil,
} from "solidify-frontend";
@Component({
......@@ -44,7 +39,7 @@ import {
styleUrls: ["./admin-organizational-unit-additional-fields-detail-create-update.dialog.scss"],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AdminOrganizationalUnitAdditionalFieldsDetailCreateUpdateDialog extends SharedAbstractDialog implements OnInit {
export class AdminOrganizationalUnitAdditionalFieldsDetailCreateUpdateDialog extends SharedAbstractDialog<AdminOrganizationalUnitAdditionalFieldsDetailCreateEditDialogData, AdditionalFieldsForm> implements OnInit {
isLoadingObs: Observable<boolean> = MemoizedUtil.isLoading(this._store, AdminOrganizationalUnitAdditionalFieldsFormState);
confirmToTranslate: string;
......@@ -58,7 +53,7 @@ export class AdminOrganizationalUnitAdditionalFieldsDetailCreateUpdateDialog ext
protected readonly _dialog: MatDialog,
protected readonly _dialogRef: MatDialogRef<AdminOrganizationalUnitAdditionalFieldsDetailCreateUpdateDialog>,
@Inject(MAT_DIALOG_DATA) readonly data: AdminOrganizationalUnitAdditionalFieldsDetailCreateEditDialogData) {
super();
super(_dialogRef, data);
}
ngOnInit(): void {
......@@ -89,16 +84,12 @@ export class AdminOrganizationalUnitAdditionalFieldsDetailCreateUpdateDialog ext
}
confirm(additionalFieldsForm: AdditionalFieldsForm): void {
this.subscribe(this._actions$.pipe(
ofActionCompleted(AdminOrganizationalUnitAdditionalFieldsFormAction.CreateSuccess),
take(1),
tap((result) => {
if (isTrue(result.result.successful)) {
this._dialogRef.close();
}
}),
));
this._store.dispatch(new AdminOrganizationalUnitAdditionalFieldsFormAction.Create(this.data.parentResId, additionalFieldsForm));
this.subscribe(StoreUtil.dispatchActionAndWaitForSubActionCompletion(this._store, this._actions$,
new AdminOrganizationalUnitAdditionalFieldsFormAction.Create(this.data.parentResId, additionalFieldsForm),
AdminOrganizationalUnitAdditionalFieldsFormAction.CreateSuccess,
resultAction => {
this._dialogRef.close();
}));
}
}
......
......@@ -18,7 +18,6 @@ import {
import {AdditionalFieldsForm} from "@models";
import {
Actions,
ofActionCompleted,
Store,
} from "@ngxs/store";
import {SharedAbstractContainer} from "@shared/components/containers/shared-abstract/shared-abstract.container";
......@@ -32,8 +31,10 @@ import {
FormValidationHelper,
isTrue,
MemoizedUtil,
ofSolidifyActionCompleted,
PropertyName,
SolidifyValidator,
StoreUtil,
} from "solidify-frontend";
@Component({
......@@ -68,21 +69,18 @@ export class AdminOrganizationalUnitAdditionalFieldsRenameDialog extends SharedA
}
onSubmit(): void {
this._store.dispatch(new AdminOrganizationalUnitAdditionalFieldsFormAction.Update(this.data.parentResId, {
const action = new AdminOrganizationalUnitAdditionalFieldsFormAction.Update(this.data.parentResId, {
resId: this.data.additionalFieldsForm.resId,
name: this.form.get(this.formDefinition.name).value,
}));
});
this.subscribe(this._actions$.pipe(
ofActionCompleted(AdminOrganizationalUnitAdditionalFieldsFormAction.UpdateSuccess),
take(1),
tap((result) => {
if (isTrue(result.result.successful)) {
this._dialogRef.close();
this._store.dispatch(new AdminOrganizationalUnitAdditionalFieldsFormAction.GetAll(this.data.parentResId));
}
}),
));
this.subscribe(StoreUtil.dispatchActionAndWaitForSubActionCompletion(this._store, this._actions$,
action,
AdminOrganizationalUnitAdditionalFieldsFormAction.UpdateSuccess,
resultAction => {
this._dialogRef.close();
this._store.dispatch(new AdminOrganizationalUnitAdditionalFieldsFormAction.GetAll(this.data.parentResId));
}));
}
getFormControl(key: string): AbstractControl {
......
......@@ -46,7 +46,6 @@ import {OrganizationalUnit} from "@models";
import {
Action,
Actions,
ofActionCompleted,
Selector,
State,
StateContext,
......@@ -83,6 +82,7 @@ import {
ModelAttributeEnum,
NotificationService,
ObjectUtil,
ofSolidifyActionCompleted,
OverrideDefaultAction,
Relation3TiersForm,
StoreUtil,
......@@ -198,29 +198,29 @@ export class AdminOrganizationalUnitState extends ResourceLogoState<AdminOrganiz
{
action: new SharedPreservationPolicyAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedPreservationPolicyAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedPreservationPolicyAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedPreservationPolicyAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedPreservationPolicyAction.GetAllFail)),
],
},
{
action: new SharedSubmissionPolicyAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedSubmissionPolicyAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedSubmissionPolicyAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedSubmissionPolicyAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedSubmissionPolicyAction.GetAllFail)),
],
},
{
action: new SharedDisseminationPolicyAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedDisseminationPolicyAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedDisseminationPolicyAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedDisseminationPolicyAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedDisseminationPolicyAction.GetAllFail)),
],
},
{
action: new SharedRoleAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedRoleAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedRoleAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedRoleAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedRoleAction.GetAllFail)),
],
},
]).pipe(
......@@ -311,43 +311,43 @@ export class AdminOrganizationalUnitState extends ResourceLogoState<AdminOrganiz
{
action: new AdminOrganizationalUnitPreservationPolicyAction.Update(orgUnitId, newPreservationPoliciesIds, oldDefaultPreservationPolicyId, newDefaultPreservationPolicyId),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateFail)),
],
},
{
action: new AdminOrganizationalUnitSubmissionPolicyAction.Update(orgUnitId, newSubmissionPoliciesIds, oldDefaultSubmissionPolicyId, newDefaultSubmissionPolicyId),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateFail)),
],
},
{
action: new AdminOrganizationalUnitDisseminationPolicyAction.Update(orgUnitId, newDisseminationPoliciesIds, oldDefaultDisseminationPolicyId, newDefaultDisseminationPolicyId),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateFail)),
],
},
{
action: new AdminOrganizationalUnitPersonRoleAction.Update(orgUnitId, newPersonRole),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitPersonRoleAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitPersonRoleAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitPersonRoleAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitPersonRoleAction.UpdateFail)),
],
},
{
action: new AdminOrganizationalUnitFundingAgencyAction.Update(orgUnitId, newFundingAgencyIds),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitFundingAgencyAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitFundingAgencyAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitFundingAgencyAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitFundingAgencyAction.UpdateFail)),
],
},
{
action: new AdminOrganizationalUnitInstitutionAction.Update(orgUnitId, newInstitutionsIds),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitInstitutionAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitInstitutionAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitInstitutionAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitInstitutionAction.UpdateFail)),
],
},
]);
......
......@@ -10,7 +10,6 @@ import {
Action,
ActionCompletion,
Actions,
ofActionCompleted,
State,
StateContext,
Store,
......@@ -31,6 +30,7 @@ import {
isEmptyArray,
isNotNullNorUndefined,
NotificationService,
ofSolidifyActionCompleted,
OverrideDefaultAction,
Relation2TiersState,
Relation2TiersStateModel,
......@@ -112,8 +112,8 @@ export class AdminOrganizationalUnitDisseminationPolicyState extends Relation2Ti
private getSubActionCompletions(): Observable<ActionCompletion<BaseSubAction<AdminOrganizationalUnitDisseminationPolicyAction.UpdateRelation>, Error>>[] | undefined {
return [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateRelationSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateRelationFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateRelationSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitDisseminationPolicyAction.UpdateRelationFail)),
];
}
}
......@@ -10,7 +10,6 @@ import {
Action,
ActionCompletion,
Actions,
ofActionCompleted,
State,
StateContext,
Store,
......@@ -31,6 +30,7 @@ import {
isEmptyArray,
isNotNullNorUndefined,
NotificationService,
ofSolidifyActionCompleted,
OverrideDefaultAction,
Relation2TiersState,
Relation2TiersStateModel,
......@@ -112,8 +112,8 @@ export class AdminOrganizationalUnitPreservationPolicyState extends Relation2Tie
private getSubActionCompletions(): Observable<ActionCompletion<BaseSubAction<AdminOrganizationalUnitPreservationPolicyAction.UpdateRelation>, Error>>[] | undefined {
return [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateRelationSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateRelationFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateRelationSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitPreservationPolicyAction.UpdateRelationFail)),
];
}
}
......@@ -10,7 +10,6 @@ import {
Action,
ActionCompletion,
Actions,
ofActionCompleted,
State,
StateContext,
Store,
......@@ -31,6 +30,7 @@ import {
isEmptyArray,
isNotNullNorUndefined,
NotificationService,
ofSolidifyActionCompleted,
OverrideDefaultAction,
Relation2TiersState,
Relation2TiersStateModel,
......@@ -112,8 +112,8 @@ export class AdminOrganizationalUnitSubmissionPolicyState extends Relation2Tiers
private getSubActionCompletions(): Observable<ActionCompletion<BaseSubAction<AdminOrganizationalUnitSubmissionPolicyAction.UpdateRelation>, Error>>[] | undefined {
return [
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateRelationSuccess)),
this.actions$.pipe(ofActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateRelationFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateRelationSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminOrganizationalUnitSubmissionPolicyAction.UpdateRelationFail)),
];
}
}
......@@ -19,7 +19,6 @@ import {Person} from "@models";
import {
Action,
Actions,
ofActionCompleted,
Selector,
State,
StateContext,
......@@ -43,6 +42,7 @@ import {
isNullOrUndefined,
MARK_AS_TRANSLATABLE,
NotificationService,
ofSolidifyActionCompleted,
OverrideDefaultAction,
Relation3TiersForm,
ResourceState,
......@@ -131,8 +131,8 @@ export class AdminPersonState extends ResourceState<AdminPersonStateModel, Perso
{
action: new SharedRoleAction.GetAll(undefined, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedRoleAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedRoleAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedRoleAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedRoleAction.GetAllFail)),
],
},
]).pipe(
......@@ -196,15 +196,15 @@ export class AdminPersonState extends ResourceState<AdminPersonStateModel, Perso
{
action: new AdminPersonOrgUnitRoleAction.Update(personId, newOrgUnitRole),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminPersonOrgUnitRoleAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminPersonOrgUnitRoleAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminPersonOrgUnitRoleAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminPersonOrgUnitRoleAction.UpdateFail)),
],
},
{
action: new AdminPersonInstitutionsAction.Update(personId, newInstitutions),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(AdminPersonInstitutionsAction.UpdateSuccess)),
this.actions$.pipe(ofActionCompleted(AdminPersonInstitutionsAction.UpdateFail)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminPersonInstitutionsAction.UpdateSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(AdminPersonInstitutionsAction.UpdateFail)),
],
},
]);
......
......@@ -8,7 +8,6 @@ import {ResearchDomain} from "@models";
import {
Action,
Actions,
ofActionCompleted,
Selector,
State,
StateContext,
......@@ -26,6 +25,7 @@ import {
isNullOrUndefined,
MARK_AS_TRANSLATABLE,
NotificationService,
ofSolidifyActionCompleted,
ResourceState,
ResourceStateModel,
StoreUtil,
......@@ -99,8 +99,8 @@ export class AdminResearchDomainState extends ResourceState<AdminResearchDomainS
{
action: new SharedLanguageAction.GetAll(null, false, false),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedLanguageAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedLanguageAction.GetAllFail)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedLanguageAction.GetAllSuccess)),
this.actions$.pipe(ofSolidifyActionCompleted(SharedLanguageAction.GetAllFail)),
],
},
]).pipe(
......
......@@ -28,7 +28,6 @@ import {
import {Navigate} from "@ngxs/router-plugin";
import {
Actions,
ofActionCompleted,
Select,
Store,
} from "@ngxs/store";
......@@ -50,6 +49,7 @@ import {
isTrue,
MemoizedUtil,
ModelFormControlEvent,
ofSolidifyActionCompleted,
OverrideProperty,
ResourceNameSpace,
} from "solidify-frontend";
......@@ -128,7 +128,7 @@ export class AdminUserDetailEditRoutable extends AbstractDetailEditCommonRoutabl
private updateAndLogout(model: ModelFormControlEvent<User>): void {
super.update(model);
this.subscribe(this._actions$.pipe(
ofActionCompleted(AdminUserAction.UpdateSuccess),
ofSolidifyActionCompleted(AdminUserAction.UpdateSuccess),
tap((result) => {
if (isTrue(result.result.successful)) {
this._store.dispatch(new appActionNameSpace.Logout());
......
......@@ -8,7 +8,6 @@ import {User} from "@models";
import {