filter floor status aktif

This commit is contained in:
Fuzi_fauzia 2024-08-20 11:37:45 +07:00
parent 9377bebcb4
commit cd1f56e07b
1 changed files with 2 additions and 4 deletions

View File

@ -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],