Refactor UI and remove unused tests

- Deleted the generated UI file `untitled_ui.py` as it is no longer needed.
- Updated `search_statistic_page.ui` to enhance table properties, including grid style and sort indicators.
- Modified `search_statistic_page_ui.py` to reflect changes in the UI file and improve table header settings.
- Improved cleanup logic in `richtext.py` to ensure files are only deleted if they exist.
- Adjusted spacing in document generation for better formatting.
- Removed obsolete test files: `database_test.py`, `many_webrequest_test.py`, `test_database.py`, and `webrequest_test.py` to clean up the test suite.
This commit is contained in:
2025-05-12 15:26:58 +02:00
parent d71de1bd1a
commit 8f90247e98
30 changed files with 79 additions and 2672 deletions

View File

@@ -54,7 +54,7 @@ class DocumentPrintDialog(QtWidgets.QDialog, Ui_Dialog):
self.tableWidget.setRowCount(0)
return
for row in data:
apparats.append(f"{row[1]} ({row[0]})")
apparats.append(f"{row[0]}")
self.tableWidget.setHorizontalHeaderLabels(["", "Semesterapparat"])
self.tableWidget.setColumnWidth(0, 50)
@@ -103,6 +103,7 @@ class DocumentPrintDialog(QtWidgets.QDialog, Ui_Dialog):
if item is not None:
checked_items.append(item.text())
document = SemapSchilder(checked_items)
document.send
def on_pushButton_clicked(self):
apparats: list[tuple[int, str]] = []
@@ -112,7 +113,7 @@ class DocumentPrintDialog(QtWidgets.QDialog, Ui_Dialog):
prof = self.db.getProfById(app[2])
data = (app[4], f"{prof.lastname} ({app[1]})")
apparats.append(data)
semapDocument = SemesterDocument(
SemesterDocument(
semester=self.semester.value,
filename="Semesterapparat",
full=True,
@@ -136,12 +137,12 @@ class DocumentPrintDialog(QtWidgets.QDialog, Ui_Dialog):
def get_valid_apparats_for_signs(self):
this_sem = self.db.query_db(
query="SELECT prof.lname, semesterapparat.name from semesterapparat INNER JOIN prof ON semesterapparat.prof_id = prof.id WHERE (erstellsemester = ? OR erstellsemester = ?) AND semesterapparat.deletion_status=0",
query="SELECT prof.lname || ' (' || semesterapparat.name || ')' AS formatted_result from semesterapparat INNER JOIN prof ON semesterapparat.prof_id = prof.id WHERE (erstellsemester = ? OR erstellsemester = ?) AND semesterapparat.deletion_status=0",
args=(str(self.semester.value), str(self.semester.previous)),
)
apparats: list[str] = []
for row in this_sem:
apparats.append(f"{row[0]} ({row[1]})")
apparats.append(f"{row[0]}")
return apparats