Debugged reports.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Pane showing turnaround time summary.
|
||||
Pane showing BC control concentrations summary.
|
||||
"""
|
||||
from PyQt6.QtWidgets import QWidget, QPushButton, QComboBox, QLabel
|
||||
from PyQt6.QtWidgets import QWidget, QPushButton
|
||||
from .info_tab import InfoPane
|
||||
from backend.excel.reports import ConcentrationMaker
|
||||
from frontend.visualizations.concentrations_chart import ConcentrationsChart
|
||||
@@ -22,12 +22,6 @@ class Concentrations(InfoPane):
|
||||
self.layout.addWidget(self.export_button, 0, 3, 1, 1)
|
||||
self.fig = None
|
||||
self.report_object = None
|
||||
# self.submission_typer = QComboBox(self)
|
||||
# subs = ["All"] + [item.name for item in SubmissionType.query()]
|
||||
# self.submission_typer.addItems(subs)
|
||||
# self.layout.addWidget(QLabel("Submission Type"), 1, 0, 1, 1)
|
||||
# self.layout.addWidget(self.submission_typer, 1, 1, 1, 3)
|
||||
# self.submission_typer.currentTextChanged.connect(self.update_data)
|
||||
self.update_data()
|
||||
|
||||
def update_data(self) -> None:
|
||||
@@ -40,17 +34,6 @@ class Concentrations(InfoPane):
|
||||
super().update_data()
|
||||
months = self.diff_month(self.start_date, self.end_date)
|
||||
chart_settings = dict(start_date=self.start_date, end_date=self.end_date)
|
||||
# if self.submission_typer.currentText() == "All":
|
||||
# submission_type = None
|
||||
# subtype_obj = None
|
||||
# else:
|
||||
# submission_type = self.submission_typer.currentText()
|
||||
# subtype_obj = SubmissionType.query(name = submission_type)
|
||||
# self.report_obj = ConcentrationMaker(start_date=self.start_date, end_date=self.end_date)#, submission_type=submission_type)
|
||||
self.report_obj = ConcentrationMaker(**chart_settings)
|
||||
# if subtype_obj:
|
||||
# threshold = subtype_obj.defaults['turnaround_time'] + 0.5
|
||||
# else:
|
||||
# threshold = None
|
||||
self.fig = ConcentrationsChart(df=self.report_obj.df, settings=chart_settings, modes=[], months=months)
|
||||
self.webview.setHtml(self.fig.html)
|
||||
|
||||
Reference in New Issue
Block a user