UI: refactor mail template dialog for plaintext handling, improve logging, and update UI elements
This commit is contained in:
@@ -194,7 +194,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
appnr = self.tableWidget.item(tableposition, 2).text()
|
||||
if reminder.result() == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
data = reminder.return_message()
|
||||
# #print(data)
|
||||
# ##print(data)
|
||||
self.db.addMessage(
|
||||
data,
|
||||
"admin",
|
||||
@@ -222,7 +222,6 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
params = {key: value for key, value in params.items() if value is not None}
|
||||
log.info(params)
|
||||
retdata = self.db.searchBook(params)
|
||||
log.info(retdata)
|
||||
if retdata == [] or retdata is None:
|
||||
self.no_result.setText("Keine Ergebnisse gefunden")
|
||||
return
|
||||
@@ -235,7 +234,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.book_search_result.setItem(
|
||||
0, 1, QtWidgets.QTableWidgetItem(book[0].signature)
|
||||
)
|
||||
# #print(book[1])
|
||||
# ##print(book[1])
|
||||
self.book_search_result.setItem(
|
||||
0,
|
||||
2,
|
||||
@@ -281,7 +280,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.btn_notify_for_deletion.setEnabled(False)
|
||||
|
||||
def setStatisticTableSize(self):
|
||||
# # #print(self.statistics_table.size(), self.statistics_table.rowCount())
|
||||
# # ##print(self.statistics_table.size(), self.statistics_table.rowCount())
|
||||
size = self.statistics_table.size()
|
||||
h = size.height()
|
||||
w = size.width()
|
||||
@@ -402,7 +401,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
selected_apparats.append(self.tableWidget.item(i, 2).text())
|
||||
selected_apparat_rows.append(i)
|
||||
# delete all selected apparats
|
||||
# # #print(selected_apparats)
|
||||
# # ##print(selected_apparats)
|
||||
log.info(f"Deleting apparats: {selected_apparats}")
|
||||
for apparat in selected_apparats:
|
||||
self.db.deleteApparat(apparat, self.semester)
|
||||
@@ -594,13 +593,13 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
"Dieser Semesterapparat kann nicht gelöscht werden, da er bereits gelöscht wurde"
|
||||
)
|
||||
elif parent_depth == 2:
|
||||
# #print("depth", parent_depth)
|
||||
# ##print("depth", parent_depth)
|
||||
# apparat selected case - open the apparat in the frame
|
||||
self.apparat_open.emit(apparat)
|
||||
return
|
||||
|
||||
def emit_signal(self, *args):
|
||||
# #print("emit_signal", *args)
|
||||
# ##print("emit_signal", *args)
|
||||
self.apparat_open.emit(args[1])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user