changes
This commit is contained in:
@@ -72,11 +72,11 @@ class UserUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
extend.exec()
|
||||
if extend.result() == 1:
|
||||
extendDate = extend.extendDate.toString("yyyy-MM-dd")
|
||||
# # print columns of selected rows
|
||||
# #print columns of selected rows
|
||||
for item in self.UserMediaTable.selectedItems():
|
||||
if item.column() == 1:
|
||||
signature = item.text()
|
||||
# print(signature)
|
||||
#print(signature)
|
||||
self.db.extendLoanDuration(signature, extendDate)
|
||||
self.userMedia = []
|
||||
self.UserMediaTable.setRowCount(0)
|
||||
@@ -91,7 +91,7 @@ class UserUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
|
||||
self.UserMediaTable.setRowCount(0)
|
||||
for loan in self.userMedia:
|
||||
# print("looping loans")
|
||||
#print("looping loans")
|
||||
fielddata = eval(f"loan.{searchfield}")
|
||||
if isinstance(fielddata, str):
|
||||
fielddata = fielddata.lower()
|
||||
@@ -141,12 +141,12 @@ class UserUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
if self.radio_currentlyLoaned.isChecked()
|
||||
else "overdue"
|
||||
)
|
||||
print(mode)
|
||||
#print(mode)
|
||||
if self.userMedia == []:
|
||||
books = self.db.getAllMedia(self.user_id)
|
||||
for book in books:
|
||||
self.userMedia.append(book)
|
||||
# print(self.userMedia)
|
||||
#print(self.userMedia)
|
||||
self.UserMediaTable.setRowCount(0)
|
||||
|
||||
for book in self.userMedia:
|
||||
@@ -166,7 +166,7 @@ class UserUI(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
continue
|
||||
|
||||
self.addBookToTable(book)
|
||||
print(book.title)
|
||||
#print(book.title)
|
||||
def addBookToTable(self, book):
|
||||
self.UserMediaTable.insertRow(0)
|
||||
# item0 = isbn
|
||||
|
||||
Reference in New Issue
Block a user