Employee/Applicant GUI and DB

This commit is contained in:
2025-02-14 12:05:45 +01:00
parent 80bd2c9be2
commit 5ff4749247
10 changed files with 199 additions and 52 deletions

View File

@@ -105,7 +105,7 @@ class BusinessModel(QAbstractTableModel):
def columnCount(self, parent= QModelIndex()):
return len(self.__visible_columns) - 1
def data(self, index, role= Qt.DisplayRole):
def data(self, index, role = Qt.DisplayRole):
if role == Qt.DisplayRole:
row = self.__data[index.row()]
return row[index.column() + 1]
@@ -132,6 +132,7 @@ class BusinessModel(QAbstractTableModel):
@Slot(int)
def onRowClicked(self, row):
#print(self.__data)
#print(f"Selected table row: {row}, corresponding DB ID: {self.__data[row][0]}")
if not self.__business_dict['business'] or self.__data[row][0] != self.__business_dict['business']['id']:
self.__business = self.__business_dao.getOneBusiness(self.__data[row][0], self.__key)