feat(orion): extend report layout settings to version 1.1
This commit is contained in:
parent
12e1761a5b
commit
613ffdc8b7
591 changed files with 3601 additions and 999 deletions
|
|
@ -18,6 +18,7 @@ from app.models.report_template import (
|
|||
ReportSection,
|
||||
TextBlock,
|
||||
)
|
||||
from app.models.report_settings import OrionReportSettings
|
||||
from app.models.location import Location
|
||||
from app.models.validation import Validation
|
||||
from app.modules.orion.template_service import ReportTemplateService
|
||||
|
|
@ -36,6 +37,7 @@ class ReportContext:
|
|||
text_blocks: dict[str, TextBlock]
|
||||
checklist_templates: list[ChecklistTemplate]
|
||||
confirmed_measurements: list[MeasurementImportValue]
|
||||
report_settings: OrionReportSettings
|
||||
|
||||
|
||||
class OrionContextBuilder:
|
||||
|
|
@ -63,6 +65,9 @@ class OrionContextBuilder:
|
|||
)
|
||||
)
|
||||
template_bundle = ReportTemplateService(self.session).ensure_default_template()
|
||||
from app.services.report_settings import OrionReportSettingsService
|
||||
|
||||
report_settings = OrionReportSettingsService(self.session).get_global()
|
||||
confirmed_measurements = list(
|
||||
self.session.scalars(
|
||||
select(MeasurementImportValue)
|
||||
|
|
@ -87,4 +92,5 @@ class OrionContextBuilder:
|
|||
text_blocks=template_bundle.text_blocks,
|
||||
checklist_templates=template_bundle.checklists,
|
||||
confirmed_measurements=confirmed_measurements,
|
||||
report_settings=report_settings,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue