Skip to content

Commit

Permalink
SHIBUI-1476 Fixed saving indicator on save button for resolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 10, 2019
1 parent 965054d commit 2fbb62e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ui/src/app/metadata/resolver/effect/collection.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -79,6 +80,21 @@ export class ResolverCollectionEffects {
})
);

@Effect()
updateResolverSavingOnRequest$ = this.actions$.pipe(
ofType<UpdateResolverRequest>(ResolverCollectionActionTypes.UPDATE_RESOLVER_REQUEST),
map(action => new UpdateSaving(true)),
);

@Effect()
updateResolverSavingOnResult$ = this.actions$.pipe(
ofType<UpdateResolverSuccess | UpdateResolverFail>(
ResolverCollectionActionTypes.UPDATE_RESOLVER_SUCCESS,
ResolverCollectionActionTypes.UPDATE_RESOLVER_FAIL
),
map(action => new UpdateSaving(false)),
);

@Effect({ dispatch: false })
updateResolverSuccessRedirect$ = this.actions$.pipe(
ofType<UpdateResolverSuccess>(ResolverCollectionActionTypes.UPDATE_RESOLVER_SUCCESS),
Expand Down

0 comments on commit 2fbb62e

Please sign in to comment.