Implement month-based date formatting and filtering in PowerClamp service

This commit is contained in:
faris Aljohari
2025-05-07 12:17:17 +03:00
parent d40fb7a762
commit 91abfb41ab
4 changed files with 53 additions and 21 deletions
+2 -2
View File
@@ -133,7 +133,7 @@ export class SpaceDeviceService {
async getAllDevicesBySpace(spaceUuid: string): Promise<DeviceEntity[]> {
const space = await this.spaceRepository.findOne({
where: { uuid: spaceUuid },
relations: ['children', 'devices'],
relations: ['children', 'devices', 'devices.productDevice'],
});
if (!space) {
@@ -146,7 +146,7 @@ export class SpaceDeviceService {
const fetchChildren = async (parentSpace: SpaceEntity) => {
const children = await this.spaceRepository.find({
where: { parent: { uuid: parentSpace.uuid } },
relations: ['children', 'devices'],
relations: ['children', 'devices', 'devices.productDevice'],
});
for (const child of children) {