diff --git a/backend/services/falukantService.js b/backend/services/falukantService.js index c2643dd..d6abcfd 100644 --- a/backend/services/falukantService.js +++ b/backend/services/falukantService.js @@ -485,12 +485,30 @@ class FalukantService extends BaseService { where: { falukantUserId: u.id }, include: [ { model: BranchType, as: 'branchType', attributes: ['labelTr'] }, - { model: RegionData, as: 'region', attributes: ['name'] } + { + model: RegionData, + as: 'region', + attributes: ['name'], + include: [ + { + model: Weather, + as: 'weather', + include: [ + { model: WeatherType, as: 'weatherType', attributes: ['tr'] } + ], + required: false + } + ] + } ], attributes: ['id', 'regionId'], order: [['branchTypeId', 'ASC']] }); - return bs.map(b => ({ ...b.toJSON(), isMainBranch: u.mainBranchRegionId === b.regionId })); + return bs.map(b => ({ + ...b.toJSON(), + isMainBranch: u.mainBranchRegionId === b.regionId, + weather: b.region?.weather?.weatherType?.tr || null + })); } async createBranch(hashedUserId, cityId, branchTypeId) { diff --git a/frontend/src/components/falukant/BranchSelection.vue b/frontend/src/components/falukant/BranchSelection.vue index 5bcae5a..81d1cdc 100644 --- a/frontend/src/components/falukant/BranchSelection.vue +++ b/frontend/src/components/falukant/BranchSelection.vue @@ -1,15 +1,21 @@