diff --git a/.vscode/settings.json b/.vscode/settings.json index eddb56d..ad819d2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,7 +25,8 @@ "Translations", "Services", "Sidebar", - "LanguageSelect" + "LanguageSelect", + "CommonState" ], "cSpell.words": [ "cascadeselect", diff --git a/src/app/shared/state/common/common.effects.ts b/src/app/shared/state/common/common.effects.ts index 1dc459f..0f5eb4e 100644 --- a/src/app/shared/state/common/common.effects.ts +++ b/src/app/shared/state/common/common.effects.ts @@ -8,7 +8,7 @@ export abstract class CommonEffect { loadAll$ = createEffect(() => { return this.actions$.pipe( ofType(this.actions.loadAll), - delay(1500), + delay(0), map((action: any) => action.payload), exhaustMap((requestFilter) => { return from(this.service.getAll(requestFilter)).pipe( @@ -22,7 +22,7 @@ export abstract class CommonEffect { loadMore$ = createEffect(() => { return this.actions$.pipe( ofType(this.actions.loadMore), - delay(1500), + delay(0), map((action: any) => action.payload), exhaustMap((requestFilter) => { return from(this.service.getAll(requestFilter)).pipe( @@ -36,7 +36,7 @@ export abstract class CommonEffect { loadOne$ = createEffect(() => { return this.actions$.pipe( ofType(this.actions.loadOne), - delay(1500), + delay(0), mergeMap((action: any) => from(this.service.getOne(action.id)).pipe( map((item: any) => this.actions.loadOneSuccess({ payload: item })), @@ -49,7 +49,7 @@ export abstract class CommonEffect { createOne$ = createEffect(() => { return this.actions$.pipe( ofType(this.actions.create), - delay(1500), + delay(0), mergeMap((action: any) => from(this.service.create(action.payload)).pipe( map((created) => this.actions.createSuccess({ payload: created })), @@ -62,7 +62,7 @@ export abstract class CommonEffect { updateOne$ = createEffect(() => { return this.actions$.pipe( ofType(this.actions.update), - delay(1500), + delay(0), mergeMap((action: any) => from(this.service.update(action.payload)).pipe( map((updated) => { @@ -79,7 +79,7 @@ export abstract class CommonEffect { deleteOne$ = createEffect(() => { return this.actions$.pipe( ofType(this.actions.delete), - delay(1500), + delay(0), mergeMap((action: any) => from(this.service.delete(action.id)).pipe( map(() => this.actions.deleteSuccess({ id: action.id })), @@ -92,7 +92,7 @@ export abstract class CommonEffect { count$ = createEffect(() => { return this.actions$.pipe( ofType(this.actions.count), - delay(1500), + delay(0), mergeMap(() => from(this.service.count()).pipe( map((count: any) => this.actions.countSuccess({ payload: count })),