Fetch applicant from database

This commit is contained in:
Yuri Becker
2025-04-19 00:55:12 +02:00
parent 2832becccf
commit 0ae153617b
5 changed files with 45 additions and 61 deletions

View File

@@ -1,10 +1,7 @@
import json
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, Signal, QJsonDocument
from PySide6.QtCore import QAbstractTableModel, QModelIndex, Qt, Slot, Signal
from PySide6.QtQml import QJSValue
from .EmployeeDAO import EmployeeDAO
# from ..PyqcrmFlags import PyqcrmFlags, PyqcrmAppliEmpyFlags
from ..ConfigLoader import ConfigLoader
import re
@@ -97,13 +94,7 @@ class EmployeeModel(QAbstractTableModel):
return self.__col_name
return super().headerData(section, orientation, role)
@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.__employee_dict['employee'] or self.__data[row][0] != self.__employee_dict['employee']['id']:
# self.__employee = self.__employee_dao.getEmployee(self.__data[row][0], self.__key)
# print(self.__business)
# self.__getEmployeeInfo()
# self.__getContactInfo()
# print(self.__business_dict)
@Slot(int, result=dict)
def fetchApplicant(self, row) -> dict:
employee_id = self.__data[row][0]
return self.__employee_dao.fetchApplicant(employee_id, self.__key)