filter floor status aktif
This commit is contained in:
parent
9377bebcb4
commit
cd1f56e07b
|
@ -105,8 +105,6 @@ export class AddEditListComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
validateDouble(event: any, index: number) {
|
validateDouble(event: any, index: number) {
|
||||||
console.log(event);
|
|
||||||
|
|
||||||
const selectedRoomId = (event.target as HTMLSelectElement).value;
|
const selectedRoomId = (event.target as HTMLSelectElement).value;
|
||||||
if (this.isRoomDuplicate(index)) {
|
if (this.isRoomDuplicate(index)) {
|
||||||
this.disableButton = true;
|
this.disableButton = true;
|
||||||
|
@ -268,9 +266,9 @@ export class AddEditListComponent {
|
||||||
const newArray = data.data.map((item) => ({
|
const newArray = data.data.map((item) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: `${item.name} (${item.code})`,
|
name: `${item.name} (${item.code})`,
|
||||||
|
status: item.status_name
|
||||||
})).sort((a, b) => b.id - a.id);
|
})).sort((a, b) => b.id - a.id);
|
||||||
this.dataFloorList = newArray;
|
this.dataFloorList = newArray.filter((item) => item.status.toLowerCase() === "aktif");
|
||||||
|
|
||||||
if (this.lewatModal) {
|
if (this.lewatModal) {
|
||||||
this.projectInfo.patchValue({
|
this.projectInfo.patchValue({
|
||||||
floorId: this.dataFloorList[0],
|
floorId: this.dataFloorList[0],
|
||||||
|
|
Loading…
Reference in New Issue