services are checked

This commit is contained in:
2024-11-08 17:14:02 +03:00
parent a5b1e0b2f4
commit c5b771e5cb
82 changed files with 1720 additions and 869 deletions

View File

@@ -27,7 +27,9 @@ class EmployeeListEventMethods(MethodToEvent):
@classmethod
def employee_list(
cls, list_options: ListOptions, token_dict: Union[EmployeeTokenObject, OccupantTokenObject]
cls,
list_options: ListOptions,
token_dict: Union[EmployeeTokenObject, OccupantTokenObject],
):
Employees.filter_attr = list_options
records = Employees.filter_active(
@@ -48,7 +50,9 @@ class EmployeeCreateEventMethods(MethodToEvent):
@classmethod
def employee_create(
cls, data: InsertEmployees, token_dict: Union[EmployeeTokenObject, OccupantTokenObject]
cls,
data: InsertEmployees,
token_dict: Union[EmployeeTokenObject, OccupantTokenObject],
):
person = People.find_one(uu_id=data.people_uu_id)
staff = Staff.find_one(uu_id=data.staff_uu_id)
@@ -124,7 +128,10 @@ class EmployeePatchEventMethods(MethodToEvent):
@classmethod
def employee_patch(
cls, employee_uu_id: str, data: PatchRecord, token_dict: Union[EmployeeTokenObject, OccupantTokenObject]
cls,
employee_uu_id: str,
data: PatchRecord,
token_dict: Union[EmployeeTokenObject, OccupantTokenObject],
):
find_one_employee = Employees.find_one_or_abort(uu_id=employee_uu_id)
access_authorized_employee = Employees.select_action(