From e7efdc8481690cd960d87d0570d9512ac0ad4e3d Mon Sep 17 00:00:00 2001 From: WorldTeacher <41587052+WorldTeacher@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:48:02 +0200 Subject: [PATCH] changes --- icons/library_shelf.png | Bin 0 -> 2653 bytes src/ui/extendLoan.py | 4 ++-- src/ui/multiUserInfo.py | 2 +- src/ui/newentry.py | 4 ++-- src/ui/reportUi.py | 2 +- src/ui/user.py | 12 ++++++------ src/utils/createReport.py | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 icons/library_shelf.png diff --git a/icons/library_shelf.png b/icons/library_shelf.png new file mode 100644 index 0000000000000000000000000000000000000000..cb1961f452b2b64434711c434af685c7b03f5baf GIT binary patch literal 2653 zcma);cTf}97Kc-$B@~g~11iYU6gD7DiXcTm=@>VlfPm7QVZ}gjRd5jr)ukhbCQ=ew zAP5mzii#9NM_^rDNFV_z0fI?h+}W8oJ8yU9-MQzUx%d8a=A7Sr=RCORVkZKThX4Qo z5eIu4H=ZB-W`g{@v)-qnl;;k`T03|M^44v^z%<@nD9Zj)EC2wN_+~&rVX-Xljq6}z z<&jWK{}7(0G@&%`B{I9PueyIg7Cw=NpFC1O+M3}*Y4fnUtCrv0q$hvpPVJE=C;DZ^ z)5HWlYg@cVy9E)ra*CUjl(_9(e~Q;dd4)bip)_7WrSM#lM!TMR`~Wwl|A%NEo?7J5=a;-G>h7%1>;}K#EY0$?gt+)VpBr z<40``Y$;{1?_1>Epf%(b%?($E^?kSz3Yc}~F$n;Vk=>}Ax9wZmv>-+=J)E}mk6hDB%?ibRjD>^4F2qV=g zi3${)jhFt9TXSZdyNDBssn@9q&G(Y0G`TGjsj87@iZUNHmWrJCAWs4MC|iUAHWPlcTc+ zRQkc>I&u1AfVXW+4|H0;d>HOw1e2~41I|F^I4(v_P=E;qVHV0CD ze1YJNag5<(e@l}{-7hk&NaF8ts?p0*2UT}Y7{Q=7<}`qFF;dynzqQg2nmxykR{G*l zv?s-a&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SW93 zUlTa_HM!`j6MG|CC|ZVEqEs6fK7q?4tHj7WIrk2>xNS3LQWSRGkO!6WH&d{6z`&o% z7l`s6MDc0QgP9?6tB28{ z{sbQIgUW=o1sa~tn2|^|L8uvG=3<7c4#)T#?`wl1Jc6`pIVsM7NP*dmiCH)sVP3f& ztgs!=dFyf@ap9OrwNW*dyTgwzm99zbnvBq9;$pvxPm8zd?UvS9OYAhRyPrqvsw#E= znNz*m{GNx$i41VN9V1pKiguXJ02_*gH1nU<-Q0VX07!sWu#YS~OJky3&9mfUM3i0( z-0(pQ4tgz34x(Lxi5N3MGn4Y+do2>!)CZSS1NfqWGvuXZL)~97aSJ~zl@Fr-5Q)hC zVEyr(7Sox}HNujXPAs;8Ke;3%+8DlAR{yiI=8hWs(>z}bj%wSj#zX6H2Q*|TfdOJw z@p_b9E8PfVaCEmvfOrCFJoM0DU-I)m0pGAhJ;X5VD5Gm3v<{n{$IE*5|AqPgw%~HH zk)Mh!;i`y-Pv=e?OJOxLQ6MARH4-dZ=fy=HuX7aMRu>0TGM|O32-b%amRs46>(y%Q!8K0+s>Q2s~o9MiM5P##>ct!C~=pwd&|c_-FS_+!F5* zw-94qs>fH)T8i@NX3huiW9hnpe9@5ilYHDC`|hX4m#7n=s_D|h|_q(AN+ literal 0 HcmV?d00001 diff --git a/src/ui/extendLoan.py b/src/ui/extendLoan.py index 39e18e4..82e43ef 100644 --- a/src/ui/extendLoan.py +++ b/src/ui/extendLoan.py @@ -17,9 +17,9 @@ class ExtendLoan(QtWidgets.QDialog, Ui_Dialog): self.buttonBox.accepted.connect(self.extendLoan) def extendLoan(self): - # print("Extend Loan") + #print("Extend Loan") selectedDate = self.extenduntil.selectedDate() - # print(selectedDate) + #print(selectedDate) self.extendDate = selectedDate self.close() diff --git a/src/ui/multiUserInfo.py b/src/ui/multiUserInfo.py index ff03a85..6a4ede0 100644 --- a/src/ui/multiUserInfo.py +++ b/src/ui/multiUserInfo.py @@ -27,7 +27,7 @@ class MultiUserFound(QtWidgets.QDialog, Ui_Dialog): self.tableWidget.cellClicked.connect(self.selectUser) def selectUser(self, row, column): - # print(row, column) + #print(row, column) user = User( id=self.tableWidget.item(row, 0).text(), username=self.tableWidget.item(row, 1).text(), diff --git a/src/ui/newentry.py b/src/ui/newentry.py index 3a7b437..163e370 100644 --- a/src/ui/newentry.py +++ b/src/ui/newentry.py @@ -40,7 +40,7 @@ class NewEntry(QtWidgets.QDialog, Ui_Dialog): ) def populateTable(self): for title in self.titles: - # print(title) + #print(title) entries = self.db.getMediaSimilarSignatureByID(title) # sort by signature entries.sort(key=lambda x: x.signature, reverse=True) @@ -66,7 +66,7 @@ class NewEntry(QtWidgets.QDialog, Ui_Dialog): signature=signature, ppn=eval(ppn), ) - # print(book) + #print(book) if not self.db.checkMediaExists(book): newBookId = self.db.insertMedia(book) self.newIds.append(newBookId) diff --git a/src/ui/reportUi.py b/src/ui/reportUi.py index 9a1695c..2ca07b3 100644 --- a/src/ui/reportUi.py +++ b/src/ui/reportUi.py @@ -90,7 +90,7 @@ class ReportUi(QtWidgets.QDialog, Ui_Dialog): def report_generated(self): self.reportlink.setOpenExternalLinks(True) fileformat = self.rthread.format - print(fileformat) + #print(fileformat) self.reportlink.setText( f'Report' ) diff --git a/src/ui/user.py b/src/ui/user.py index 2076cd8..f74aca7 100644 --- a/src/ui/user.py +++ b/src/ui/user.py @@ -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 diff --git a/src/utils/createReport.py b/src/utils/createReport.py index 0c94f16..8c914d8 100644 --- a/src/utils/createReport.py +++ b/src/utils/createReport.py @@ -23,7 +23,7 @@ def generate_report(): report_path = os.path.join(config.report.path, f"report_{year}_{week}.tsv") day = QDate.currentDate().addDays(-7).toString("yyyy-MM-dd") query = f"""SELECT * FROM loans WHERE loan_date >= '{day}';""" - # print(query) + #print(query) colnames = ["UserId", "Title", "Action", "Datum"] table = PrettyTable(colnames) @@ -49,7 +49,7 @@ def generate_report(): loan_action_date, ] ) - # # print(table) + # #print(table) # # wruitng the table to a file # with open("report.txt", "w", encoding="utf-8") as f: # f.write(str(table))