Fetch applicant from database
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user