Commit Graph
197 Commits
Author SHA1 Message Date
ZaydSkaff a17a271213 add validation checks (#466) 2025-07-10 14:41:50 +03:00
ZaydSkaff 3cfed2b452 fix: check if subspaces not exists in update space (#463) 2025-07-10 10:56:27 +03:00
ZaydSkaff 74d3620d0e Chore/space link tag cleanup (#462)
* chore: remove unused imports and dead code for space link

* chore: remove unused imports and dead code

* chore: remove unused imports and dead code of tag service
2025-07-09 14:25:26 +03:00
ZaydSkaff 83be80d9f6 add order space API (#459) 2025-07-09 11:44:14 +03:00
ZaydSkaff 2589e391ed fix: add unique validation on subspaces in update space dto (#460) 2025-07-09 11:33:04 +03:00
faris Aljohari 9bebcb2f3e feat: implement scheduler for periodic data updates and optimize database procedures
- Added SchedulerModule and SchedulerService to handle hourly data updates for AQI, occupancy, and energy consumption.
- Refactored existing services to remove unused device repository dependencies and streamline procedure execution.
- Updated SQL procedures to use correct parameter indexing.
- Enhanced error handling and logging for scheduled tasks.
- Integrated new repositories for presence sensor and AQI pollutant stats across multiple modules.
- Added NestJS schedule package for task scheduling capabilities.
2025-06-25 03:20:25 -06:00
ZaydSkaff 0a1ccad120 add check if not space not found (#430) 2025-06-24 12:18:15 +03:00
ZaydSkaff 3160773c2a fix: spaces structure in communities (#420) 2025-06-23 10:21:55 +03:00
ZaydSkaff 689a38ee0c Revamp/space management (#409)
* task: add getCommunitiesV2

* task: update getOneSpace API to match revamp structure

* refactor: implement modifications to pace management APIs

* refactor: remove space link
2025-06-18 10:34:29 +03:00
ZaydSkaff 8503ee728d Refactor/space management (#404)
* refactor: reducing used queries on get communities (#385)

* refactor: fix create space logic (#394)

* Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity

* refactor: fix create space logic

* device model updated to include the fixes and final columns

* updated space models to include suggested fixes, update final logic and column names

* task: removing old references of the old tag-product relation

* task: remove old use of tags

* task: remove old tag & tag model usage

* refactor: delete space

* task: remove unused functions

* fix lint rule
2025-06-11 13:15:21 +03:00
faris Aljohari c86be27576 Add AQI module and related services, controllers, and DTOs
- Introduced AqiModule with AqiService and AqiController for handling AQI data.
- Added DTOs for AQI requests: GetAqiDailyBySpaceDto and GetAqiPollutantBySpaceDto.
- Implemented AqiDataService for managing AQI sensor historical data.
- Updated existing modules to include AqiDataService where necessary.
- Defined new routes for AQI data retrieval in ControllerRoute.
2025-06-10 18:19:34 -06:00
faris Aljohari cd3e9016f2 fix: improve error handling in fetchWeatherDetails method 2025-06-04 01:08:33 -06:00
faris Aljohari 0fe6c80731 Add utility function to associate space UUID with devices in community and device services 2025-06-01 21:56:08 -06:00
faris Aljohari 4aa3d04478 feat: update device and space services to use productType instead of deviceType and add query support for device retrieval by product type 2025-05-13 03:19:21 +03:00
faris Aljohari 7ec4171e1a feat: add occupancy module with controller, service, and related DTOs for heat map data retrieval 2025-05-12 02:15:57 +03:00
faris Aljohari 91abfb41ab Implement month-based date formatting and filtering in PowerClamp service 2025-05-07 12:17:17 +03:00
faris Aljohari d197bf2bb4 feat: implement date formatting function and enhance PowerClampService with space-based data retrieval 2025-05-04 22:28:38 +03:00
hannathkadher 6b8aa6836d fixed commission device 2025-04-27 22:42:03 +04:00
hannathkadher 488943338b removed tags from validate space 2025-04-25 10:58:35 +04:00
faris Aljohari f3fd6646a1 feat: add SqlLoaderService to multiple modules for improved SQL data handling 2025-04-24 02:31:35 +03:00
faris Aljohari 7f43ef5de5 feat: integrate PowerClamp service and repositories across multiple modules 2025-04-24 02:14:58 +03:00
hannathkadher 055518d672 Merge pull request #339 from SyncrowIOT/feat/commission-device
Feat/commission device
2025-04-22 11:04:15 +04:00
faris Aljohari 2f12189eef feat: add device name field to DeviceEntity and update related DTOs and services 2025-04-22 01:53:03 +03:00
hannathkadher ed3c526efd fix commissioning 2025-04-21 10:58:14 +04:00
hannathkadher 4810cc6f35 added controller to export 2025-04-16 10:28:57 +04:00
faris Aljohari 777105fc28 refactor: improve error handling for missing space in device listing 2025-04-14 13:24:40 +03:00
hannathkadher 5f45876516 Merge pull request #319 from SyncrowIOT/SP-1322
added search for spaces
2025-03-25 21:55:56 +04:00
hannathkadher b0a403b0cf added search for spaces 2025-03-19 10:51:38 +04:00
faris Aljohari 1a313c103d finished return the last three parents 2025-03-19 00:50:24 +03:00
faris Aljohari 9902b02700 finished return the spaces in get community 2025-03-18 01:52:01 +03:00
hannathkadher d24b1d88d7 added disabled check 2025-03-13 14:03:59 +04:00
hannathkadher c6f314e5c4 fixed unliking tags on tags created via space models 2025-03-13 11:04:23 +04:00
hannathkadher 1ce2f3c3cc fix issues 2025-03-12 01:36:10 +04:00
hannathkadher 1403a670e3 added validation for space model 2025-03-11 22:11:25 +04:00
faris Aljohari 5204cd5504 fix tag relation in device entity 2025-03-11 20:03:30 +03:00
hannathkadher 7fae1bf407 fix the issue in unliking 2025-03-11 15:45:21 +04:00
hannathkadher f9f9592603 fix duplication 2025-03-11 13:43:23 +04:00
faris Aljohari f9878ff272 remove duplicate issue 2025-03-11 12:19:26 +03:00
hannathkadher 6e329d096d unused import 2025-03-11 12:35:54 +04:00
hannathkadher cacaa105ed added validation for subspaces 2025-03-10 21:12:47 +04:00
faris Aljohari 7dc2a8d0c9 Merge pull request #297 from SyncrowIOT/fix-get-spaces-issue
return tags name
2025-03-10 15:41:43 +03:00
faris Aljohari 7e513f0d31 return tags name 2025-03-10 15:40:58 +03:00
hannathkadher a8fbf2b510 fixed issue in create space with space model 2025-03-10 15:52:11 +04:00
hannathkadher b9f0987bb0 added validation for product allocations 2025-03-10 15:20:15 +04:00
faris Aljohari ea09f633ee remove tags relation from device table 2025-03-10 11:23:51 +03:00
hannathkadher c459cadb41 Merge pull request #293 from SyncrowIOT/remove-old-tag-flow-from-update-space
remove old tag flow
2025-03-10 11:55:28 +04:00
faris Aljohari c8d72a90b6 remove old tag flow 2025-03-10 10:42:00 +03:00
hannathkadher d1a976d152 removed old tags 2025-03-10 10:57:27 +04:00
hannathkadher 3bbc39734b Merge branch 'dev' of https://github.com/SyncrowIOT/backend into feat/fix-propagation 2025-03-10 05:58:50 +04:00
hannathkadher 054df46936 fix create space 2025-03-09 20:12:19 +04:00