update files, bring to latest code

This commit is contained in:
WorldTeacher
2024-07-18 11:57:20 +02:00
parent 891eb3e90a
commit ae2e588780
14 changed files with 686 additions and 60 deletions

31
src/ui/extendLoan.py Normal file
View File

@@ -0,0 +1,31 @@
from .sources.Ui_dialog_extendLoanDuration import Ui_Dialog
from PyQt6 import QtWidgets, QtCore
class ExtendLoan(QtWidgets.QDialog, Ui_Dialog):
def __init__(self, user, media):
super(ExtendLoan, self).__init__()
self.setupUi(self)
self.user = user
self.media = media
self.currentDate = QtCore.QDate.currentDate().addDays(1)
self.extendDate = None
self.extenduntil.setMinimumDate(self.currentDate)
self.show()
self.buttonBox.accepted.connect(self.extendLoan)
def extendLoan(self):
print("Extend Loan")
selectedDate = self.extenduntil.selectedDate()
print(selectedDate)
self.extendDate = selectedDate
self.close()
pass
def launch(user, media):
import sys
app = QtWidgets.QApplication(sys.argv)
window = ExtendLoan(user, media)
sys.exit(app.exec())