From 2fbb62eb749e516a7fa1a4cbda11299c706f1b63 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Tue, 10 Sep 2019 10:07:59 -0700 Subject: [PATCH] SHIBUI-1476 Fixed saving indicator on save button for resolvers --- .../resolver/effect/collection.effects.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ui/src/app/metadata/resolver/effect/collection.effects.ts b/ui/src/app/metadata/resolver/effect/collection.effects.ts index ff5c5ea9c..2a92b0242 100644 --- a/ui/src/app/metadata/resolver/effect/collection.effects.ts +++ b/ui/src/app/metadata/resolver/effect/collection.effects.ts @@ -35,6 +35,7 @@ import { I18nService } from '../../../i18n/service/i18n.service'; import * as fromRoot from '../../../app.reducer'; import * as fromI18n from '../../../i18n/reducer'; import { FileBackedHttpMetadataResolver } from '../../domain/entity'; +import { UpdateSaving } from '../action/entity.action'; /* istanbul ignore next */ @@ -79,6 +80,21 @@ export class ResolverCollectionEffects { }) ); + @Effect() + updateResolverSavingOnRequest$ = this.actions$.pipe( + ofType(ResolverCollectionActionTypes.UPDATE_RESOLVER_REQUEST), + map(action => new UpdateSaving(true)), + ); + + @Effect() + updateResolverSavingOnResult$ = this.actions$.pipe( + ofType( + ResolverCollectionActionTypes.UPDATE_RESOLVER_SUCCESS, + ResolverCollectionActionTypes.UPDATE_RESOLVER_FAIL + ), + map(action => new UpdateSaving(false)), + ); + @Effect({ dispatch: false }) updateResolverSuccessRedirect$ = this.actions$.pipe( ofType(ResolverCollectionActionTypes.UPDATE_RESOLVER_SUCCESS),