From ee578553e6316cb425410f164b2da51565acd985 Mon Sep 17 00:00:00 2001 From: samuelmbabhazi Date: Thu, 19 Dec 2024 14:07:55 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Fix:=20Filters=20Not=20Working=20on=20?= =?UTF-8?q?=E2=80=9CTime=20Off=E2=80=9D=20Screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/gauzy/src/app/pages/time-off/time-off.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/gauzy/src/app/pages/time-off/time-off.component.ts b/apps/gauzy/src/app/pages/time-off/time-off.component.ts index 41494c9da5d..e4df295a9b3 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.component.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.component.ts @@ -136,6 +136,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O filter(() => this._isGridLayout), tap(() => this.refreshPagination()), tap(() => (this.timeOffs = [])), + tap(() => this.getTimeOffs()), untilDestroyed(this) ) .subscribe(); @@ -605,7 +606,9 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O } private async _loadGridLayoutData() { - if (this._isGridLayout) await this.sourceSmartTable.getElements(); + if (this._isGridLayout) { + this.timeOffs=await this.sourceSmartTable.getElements() + }; } private _createRecord() { From aa78eed7e0b4961204dd7e067dbf259f7cd62562 Mon Sep 17 00:00:00 2001 From: samuelmbabhazi Date: Thu, 19 Dec 2024 15:18:28 +0200 Subject: [PATCH 2/2] Format code --- apps/gauzy/src/app/pages/time-off/time-off.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/gauzy/src/app/pages/time-off/time-off.component.ts b/apps/gauzy/src/app/pages/time-off/time-off.component.ts index e4df295a9b3..21d74620dbc 100644 --- a/apps/gauzy/src/app/pages/time-off/time-off.component.ts +++ b/apps/gauzy/src/app/pages/time-off/time-off.component.ts @@ -607,7 +607,7 @@ export class TimeOffComponent extends PaginationFilterBaseComponent implements O private async _loadGridLayoutData() { if (this._isGridLayout) { - this.timeOffs=await this.sourceSmartTable.getElements() + this.timeOffs = await this.sourceSmartTable.getElements() }; }