Various bugfixes, new template sub-docs
This commit is contained in:
@@ -59,7 +59,10 @@ class EquipmentUsage(QDialog):
|
||||
case _:
|
||||
pass
|
||||
logger.debug(f"parsed output of Equsage form: {pformat(output)}")
|
||||
return [item.strip() for item in output if item is not None]
|
||||
try:
|
||||
return [item.strip() for item in output if item is not None]
|
||||
except AttributeError:
|
||||
return [item for item in output if item is not None]
|
||||
|
||||
class LabelRow(QWidget):
|
||||
|
||||
@@ -131,8 +134,8 @@ class RoleComboBox(QWidget):
|
||||
"""
|
||||
Changes what tips are available when process is changed
|
||||
"""
|
||||
process = self.process.currentText()
|
||||
logger.debug(f"Checking process: {process}")
|
||||
process = self.process.currentText().strip()
|
||||
logger.debug(f"Checking process: {process} for equipment {self.role.name}")
|
||||
process = Process.query(name=process)
|
||||
if process.tip_roles:
|
||||
for iii, tip_role in enumerate(process.tip_roles):
|
||||
|
||||
@@ -54,9 +54,11 @@ class GelBox(QDialog):
|
||||
layout = QGridLayout()
|
||||
layout.addWidget(QLabel("DNA Core Submission Number"),0,1)
|
||||
self.core_number = QLineEdit()
|
||||
self.core_number.setText(self.submission.dna_core_submission_number)
|
||||
layout.addWidget(self.core_number, 0,2)
|
||||
layout.addWidget(QLabel("Gel Barcode"),0,3)
|
||||
self.gel_barcode = QLineEdit()
|
||||
self.gel_barcode.setText(self.submission.gel_barcode)
|
||||
layout.addWidget(self.gel_barcode, 0, 4)
|
||||
# setting this layout to the widget
|
||||
# plot window goes on right side, spanning 3 rows
|
||||
|
||||
@@ -10,7 +10,6 @@ from backend.db.models import BasicSubmission, BasicSample
|
||||
from tools import is_power_user, html_to_pdf
|
||||
from .functions import select_save_file
|
||||
from io import BytesIO
|
||||
from tempfile import TemporaryFile, TemporaryDirectory
|
||||
from pathlib import Path
|
||||
import logging, base64
|
||||
from getpass import getuser
|
||||
@@ -43,7 +42,7 @@ class SubmissionDetails(QDialog):
|
||||
self.layout = QVBoxLayout()
|
||||
self.setFixedSize(900, 500)
|
||||
# NOTE: button to export a pdf version
|
||||
btn = QPushButton("Export PDF")
|
||||
btn = QPushButton("Export DOCX")
|
||||
btn.setFixedWidth(875)
|
||||
btn.clicked.connect(self.export)
|
||||
self.layout.addWidget(btn)
|
||||
@@ -103,8 +102,6 @@ class SubmissionDetails(QDialog):
|
||||
logger.debug(f"Submission_details: {pformat(self.base_dict)}")
|
||||
self.html = self.template.render(sub=self.base_dict, signing_permission=is_power_user(), css=css)
|
||||
self.webview.setHtml(self.html)
|
||||
with open("test.html", "w") as f:
|
||||
f.write(self.html)
|
||||
self.setWindowTitle(f"Submission Details - {submission.rsl_plate_num}")
|
||||
|
||||
@pyqtSlot(str)
|
||||
|
||||
Reference in New Issue
Block a user