services are checked
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user