events are updated

This commit is contained in:
2024-11-08 18:23:28 +03:00
parent c5b771e5cb
commit df5927e5ac
37 changed files with 223 additions and 149 deletions

View File

@@ -15,7 +15,7 @@ from databases import (
from api_validations.validations_request import RegisterEvents2Occupant
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
from api_validations.core_response import return_json_response_from_alchemy
from api_validations.core_response import AlchemyJsonResponse
class EventBindOccupantEventMethods(MethodToEvent):

View File

@@ -14,7 +14,7 @@ from api_events.events.events.events_bind_services import (
ServiceBindOccupantEventMethods,
)
from api_library.date_time_actions.date_functions import system_arrow
from api_validations.core_response import return_json_response_from_alchemy
from api_validations.core_response import AlchemyJsonResponse
class ModulesBindOccupantEventMethods(MethodToEvent):

View File

@@ -21,7 +21,7 @@ from api_validations.validations_request import (
)
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
from api_validations.core_response import return_json_response_from_alchemy
from api_validations.core_response import AlchemyJsonResponse
class ServiceBindOccupantEventMethods(MethodToEvent):

View File

@@ -20,7 +20,7 @@ from api_validations.validations_request import (
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
from api_validations.core_response import return_json_response_from_alchemy
from api_validations.core_response import AlchemyJsonResponse
class EventsListEventMethods(MethodToEvent):
@@ -36,11 +36,14 @@ class EventsListEventMethods(MethodToEvent):
list_options: ListOptions,
token_dict: Union[EmployeeTokenObject, OccupantTokenObject],
):
Events.filter_attr = list_options
records = Events.filter_active(
*Events.get_smart_query(list_options.query),
)
return return_json_response_from_alchemy(
response=records, pagination=list_options
return AlchemyJsonResponse(
completed=True,
message="DecisionBook are listed successfully",
result=records,
)

View File

@@ -6,7 +6,7 @@ from api_validations.validations_request import (
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
from api_validations.core_response import return_json_response_from_alchemy
from api_validations.core_response import AlchemyJsonResponse
class ModelEvents(MethodToEvent):

View File

@@ -2,7 +2,7 @@ from api_validations.validations_request import DepartmentsPydantic, PatchRecord
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
from api_validations.core_response import return_json_response_from_alchemy
from api_validations.core_response import AlchemyJsonResponse
class ModulesEvents(MethodToEvent):

View File

@@ -6,7 +6,7 @@ from api_validations.validations_request import (
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
from api_validations.core_response import return_json_response_from_alchemy
from api_validations.core_response import AlchemyJsonResponse
class ServicesEvents(MethodToEvent):