Employee and applicant frontend and backend
This commit is contained in:
8
main.py
8
main.py
@@ -14,6 +14,7 @@ from lib.DB.UserManager import UserManager
|
||||
from lib.DB.AddressModel import AddressModel
|
||||
from lib.DB.BTypeModel import BTypeModel
|
||||
from lib.DB.ContactModel import ContactModel
|
||||
from lib.DB.EmployeeModel import EmployeeModel
|
||||
from lib.Printers import Printers
|
||||
|
||||
|
||||
@@ -37,12 +38,13 @@ address_model = None
|
||||
business_model = None
|
||||
business_type = None
|
||||
contact_model = None
|
||||
employee_model = None
|
||||
printers = None
|
||||
user = None
|
||||
|
||||
def initializeProgram():
|
||||
#print(f"In {__file__} file, initializeProgram()")
|
||||
global address_model, bad_config, business_model, user, business_type, contact_model, db_con, printers
|
||||
global address_model, bad_config, business_model, user, business_type, contact_model, employee_model, db_con, printers
|
||||
if not bad_config:
|
||||
dbconf = config.getConfig()['database']
|
||||
DbManager(dbconf)
|
||||
@@ -54,17 +56,19 @@ def initializeProgram():
|
||||
address_model = AddressModel()
|
||||
business_type = BTypeModel()
|
||||
contact_model = ContactModel()
|
||||
employee_model = EmployeeModel()
|
||||
publishContext()
|
||||
bad_config = False
|
||||
|
||||
def publishContext():
|
||||
# print(f"In {__file__} file, publishContext()")
|
||||
global engine, address_model, bad_config, business_model, user, business_type, contact_model, printers
|
||||
global engine, address_model, bad_config, business_model, user, business_type, contact_model, employee_model, printers
|
||||
engine.rootContext().setContextProperty("loggedin_user", user)
|
||||
engine.rootContext().setContextProperty("business_model", business_model)
|
||||
engine.rootContext().setContextProperty("address_model", address_model)
|
||||
engine.rootContext().setContextProperty("business_type", business_type)
|
||||
engine.rootContext().setContextProperty("contact_model", contact_model)
|
||||
engine.rootContext().setContextProperty("employee_model", employee_model)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user