Refactor filtering logic in FloorService

This commit is contained in:
faris Aljohari
2024-04-13 17:23:56 +03:00
parent d5f396e4f5
commit 9e3544756e
+6 -4
View File
@@ -116,8 +116,9 @@ export class FloorService {
.filter(
(child) =>
child.spaceType.type !== 'floor' &&
child.spaceType.type !== 'building',
) // Filter remaining floor and building types
child.spaceType.type !== 'building' &&
child.spaceType.type !== 'community',
) // Filter remaining floor and building and community types
.map((child) => ({
uuid: child.uuid,
name: child.spaceName,
@@ -130,8 +131,9 @@ export class FloorService {
.filter(
(child) =>
child.spaceType.type !== 'floor' &&
child.spaceType.type !== 'building',
) // Filter remaining floor and building types
child.spaceType.type !== 'building' &&
child.spaceType.type !== 'community',
) // Filter remaining floor and building and community types
.map(async (child) => ({
uuid: child.uuid,
name: child.spaceName,