From cd1f56e07b3e60791e64b2850a53039e1978ad72 Mon Sep 17 00:00:00 2001 From: Fuzi_fauzia Date: Tue, 20 Aug 2024 11:37:45 +0700 Subject: [PATCH] filter floor status aktif --- .../add-edit-list/add-edit-list.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts b/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts index 3e1e949..98e55f7 100644 --- a/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts +++ b/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts @@ -105,8 +105,6 @@ export class AddEditListComponent { } validateDouble(event: any, index: number) { - console.log(event); - const selectedRoomId = (event.target as HTMLSelectElement).value; if (this.isRoomDuplicate(index)) { this.disableButton = true; @@ -268,9 +266,9 @@ export class AddEditListComponent { const newArray = data.data.map((item) => ({ id: item.id, name: `${item.name} (${item.code})`, + status: item.status_name })).sort((a, b) => b.id - a.id); - this.dataFloorList = newArray; - + this.dataFloorList = newArray.filter((item) => item.status.toLowerCase() === "aktif"); if (this.lewatModal) { this.projectInfo.patchValue({ floorId: this.dataFloorList[0],