From 221a2af32b99e5d70baf2ac2152b71af2feb8908 Mon Sep 17 00:00:00 2001 From: faris Aljohari <83524184+farisaljohari@users.noreply.github.com> Date: Mon, 3 Mar 2025 00:23:55 +0300 Subject: [PATCH] using new tags relation with space --- src/space/services/space.service.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/space/services/space.service.ts b/src/space/services/space.service.ts index 74523f5..70947ad 100644 --- a/src/space/services/space.service.ts +++ b/src/space/services/space.service.ts @@ -236,12 +236,8 @@ export class SpaceService { 'incomingConnections.disabled = :incomingConnectionDisabled', { incomingConnectionDisabled: false }, ) - .leftJoinAndSelect( - 'space.tags', - 'tags', - 'tags.disabled = :tagDisabled', - { tagDisabled: false }, - ) + .leftJoinAndSelect('space.productAllocations', 'productAllocations') + .leftJoinAndSelect('productAllocations.tags', 'tags') .leftJoinAndSelect('tags.product', 'tagProduct') .leftJoinAndSelect( 'space.subspaces', @@ -250,11 +246,10 @@ export class SpaceService { { subspaceDisabled: false }, ) .leftJoinAndSelect( - 'subspaces.tags', - 'subspaceTags', - 'subspaceTags.disabled = :subspaceTagsDisabled', - { subspaceTagsDisabled: false }, + 'subspaces.productAllocations', + 'subspaceProductAllocations', ) + .leftJoinAndSelect('subspaceProductAllocations.tags', 'subspaceTags') .leftJoinAndSelect('subspaceTags.product', 'subspaceTagProduct') .leftJoinAndSelect('space.spaceModel', 'spaceModel') .where('space.community_id = :communityUuid', { communityUuid })