Skip to content

Commit

Permalink
feat: added building relation with tc via be
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed Dec 19, 2024
1 parent 811263d commit 5b0d81d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions backend/api/services/buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ async def _makeRelations(self, entity: Building) -> list[str]:
relations = (await self.session.exec(select(ProfessionalBuilding).where(ProfessionalBuilding.building_id == entity.id))).all()
relates_to.extend(
[f"professional:{rel.professional_id}" for rel in relations])
relations = (await self.session.exec(select(BuildingElement).where(BuildingElement.building_id == entity.id))).all()
relates_to.extend(
[f"technical-construction:{rel.technical_construction_id}" for rel in relations])
return relates_to

async def _get_building_materials(self, ids: list[int]):
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/components/PhysicalParametersPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
<template v-for="section in sections" :key="section">
<div v-if="hasValues(section)">
<div class="text-h6">{{ $t(section) }}</div>
<q-list class="q-mb-md">
<q-list dense class="q-mb-md">
<template v-for="field in fields[section]" :key="field">
<q-item v-if="hasFieldValue(field)" class="q-pa-none">
<q-item
v-if="hasFieldValue(field)"
class="q-pa-none"
style="padding: 0 !important"
>
<q-item-section>
<q-item-label>{{ $t(field) }}</q-item-label>
</q-item-section>
Expand Down

0 comments on commit 5b0d81d

Please sign in to comment.