mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 22:44:54 +00:00
Refactor filtering logic in UnitService
This commit is contained in:
@ -117,8 +117,9 @@ export class UnitService {
|
|||||||
(child) =>
|
(child) =>
|
||||||
child.spaceType.type !== 'unit' &&
|
child.spaceType.type !== 'unit' &&
|
||||||
child.spaceType.type !== 'floor' &&
|
child.spaceType.type !== 'floor' &&
|
||||||
child.spaceType.type !== 'community',
|
child.spaceType.type !== 'community' &&
|
||||||
) // Filter remaining unit and floor and community types
|
child.spaceType.type !== 'unit',
|
||||||
|
) // Filter remaining unit and floor and community and unit types
|
||||||
.map((child) => ({
|
.map((child) => ({
|
||||||
uuid: child.uuid,
|
uuid: child.uuid,
|
||||||
name: child.spaceName,
|
name: child.spaceName,
|
||||||
@ -132,8 +133,9 @@ export class UnitService {
|
|||||||
(child) =>
|
(child) =>
|
||||||
child.spaceType.type !== 'unit' &&
|
child.spaceType.type !== 'unit' &&
|
||||||
child.spaceType.type !== 'floor' &&
|
child.spaceType.type !== 'floor' &&
|
||||||
child.spaceType.type !== 'community',
|
child.spaceType.type !== 'community' &&
|
||||||
) // Filter remaining unit and floor and community types
|
child.spaceType.type !== 'unit',
|
||||||
|
) // Filter remaining unit and floor and community and unit types
|
||||||
.map(async (child) => ({
|
.map(async (child) => ({
|
||||||
uuid: child.uuid,
|
uuid: child.uuid,
|
||||||
name: child.spaceName,
|
name: child.spaceName,
|
||||||
|
|||||||
Reference in New Issue
Block a user