project events updated
This commit is contained in:
@@ -124,14 +124,17 @@ from api_events.events.decision_book.decision_book_decision_book_items import (
|
||||
DecisionBookDecisionBookItemsPatchEventMethod,
|
||||
)
|
||||
from api_events.events.decision_book.project_decision_book import (
|
||||
ProjectDecisionBookCreateEvents,
|
||||
ProjectDecisionBookUpdateEvents,
|
||||
ProjectDecisionBookPatchEvents,
|
||||
ProjectDecisionBookListEventMethod,
|
||||
ProjectDecisionBookCreateEventMethod,
|
||||
ProjectDecisionBookUpdateEventMethod,
|
||||
ProjectDecisionBookApprovalEventMethod,
|
||||
ProjectDecisionBookPatchEventMethod,
|
||||
)
|
||||
from api_events.events.decision_book.project_decision_book_person import (
|
||||
ProjectDecisionBookPersonCreateEvents,
|
||||
ProjectDecisionBookPersonUpdateEvents,
|
||||
ProjectDecisionBookPersonPatchEvents,
|
||||
ProjectDecisionBookPersonListEventMethod,
|
||||
ProjectDecisionBookPersonCreateEventMethod,
|
||||
ProjectDecisionBookPersonUpdateEventMethod,
|
||||
ProjectDecisionBookPersonPatchEventMethod,
|
||||
)
|
||||
from api_events.events.events.events_bind_events import (
|
||||
EventBindOccupantEventMethod,
|
||||
@@ -218,12 +221,15 @@ __all__ = [
|
||||
"DecisionBookDecisionBookItemsCreateEventMethod",
|
||||
"DecisionBookDecisionBookItemsUpdateEventMethod",
|
||||
"DecisionBookDecisionBookItemsPatchEventMethod",
|
||||
"ProjectDecisionBookCreateEvents",
|
||||
"ProjectDecisionBookUpdateEvents",
|
||||
"ProjectDecisionBookPatchEvents",
|
||||
"ProjectDecisionBookPersonCreateEvents",
|
||||
"ProjectDecisionBookPersonUpdateEvents",
|
||||
"ProjectDecisionBookPersonPatchEvents",
|
||||
"ProjectDecisionBookListEventMethod",
|
||||
"ProjectDecisionBookCreateEventMethod",
|
||||
"ProjectDecisionBookUpdateEventMethod",
|
||||
"ProjectDecisionBookApprovalEventMethod",
|
||||
"ProjectDecisionBookPatchEventMethod",
|
||||
"ProjectDecisionBookPersonListEventMethod",
|
||||
"ProjectDecisionBookPersonCreateEventMethod",
|
||||
"ProjectDecisionBookPersonUpdateEventMethod",
|
||||
"ProjectDecisionBookPersonPatchEventMethod",
|
||||
"CompanyPatchEventMethod",
|
||||
"CompanyCreateEventMethod",
|
||||
"CompanyUpdateEventMethod",
|
||||
|
||||
@@ -64,7 +64,9 @@ class CompanyCreateEventMethods(MethodToEvent):
|
||||
token_dict: EmployeeTokenObject,
|
||||
):
|
||||
created_company = Companies.create_action(data=data, token=token_dict)
|
||||
created_company.related_company = token_dict.selected_company.company_uu_id
|
||||
created_company.update(
|
||||
related_company=token_dict.selected_company.company_uu_id
|
||||
)
|
||||
created_company.save()
|
||||
return JSONResponse(
|
||||
content={
|
||||
|
||||
@@ -26,7 +26,7 @@ from databases import (
|
||||
from databases.sql_models.building.decision_book import BuildDecisionBookProjectItems, BuildDecisionBookItems
|
||||
|
||||
|
||||
class ProjectDecisionBookPersonListEvents(MethodToEvent):
|
||||
class ProjectDecisionBookListEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "LIST"
|
||||
|
||||
@@ -62,7 +62,7 @@ class ProjectDecisionBookPersonListEvents(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
class ProjectDecisionBookCreateEvents(MethodToEvent):
|
||||
class ProjectDecisionBookCreateEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "CREATE"
|
||||
|
||||
@@ -118,7 +118,7 @@ class ProjectDecisionBookCreateEvents(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
class ProjectDecisionBookUpdateEvents(MethodToEvent):
|
||||
class ProjectDecisionBookUpdateEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "UPDATE"
|
||||
|
||||
@@ -194,7 +194,7 @@ class ProjectDecisionBookUpdateEvents(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
class ProjectDecisionBookApprovalEvents(MethodToEvent):
|
||||
class ProjectDecisionBookApprovalEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "UPDATE"
|
||||
|
||||
@@ -310,7 +310,7 @@ class ProjectDecisionBookApprovalEvents(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
class ProjectDecisionBookPatchEvents(MethodToEvent):
|
||||
class ProjectDecisionBookPatchEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "PATCH"
|
||||
|
||||
@@ -325,3 +325,31 @@ class ProjectDecisionBookPatchEvents(MethodToEvent):
|
||||
token_dict: Union[EmployeeTokenObject, OccupantTokenObject],
|
||||
):
|
||||
return
|
||||
|
||||
|
||||
ProjectDecisionBookListEventMethod = (
|
||||
ProjectDecisionBookListEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/person/list")
|
||||
)
|
||||
)
|
||||
ProjectDecisionBookCreateEventMethod = (
|
||||
ProjectDecisionBookCreateEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/create")
|
||||
)
|
||||
)
|
||||
ProjectDecisionBookUpdateEventMethod = (
|
||||
ProjectDecisionBookUpdateEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/update")
|
||||
)
|
||||
)
|
||||
ProjectDecisionBookApprovalEventMethod = (
|
||||
ProjectDecisionBookApprovalEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/approval")
|
||||
)
|
||||
)
|
||||
ProjectDecisionBookPatchEventMethod = (
|
||||
ProjectDecisionBookPatchEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/patch")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObj
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ProjectDecisionBookPersonListEvents(MethodToEvent):
|
||||
class ProjectDecisionBookPersonListEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "LIST"
|
||||
|
||||
@@ -52,7 +52,7 @@ class ProjectDecisionBookPersonListEvents(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
class ProjectDecisionBookPersonCreateEvents(MethodToEvent):
|
||||
class ProjectDecisionBookPersonCreateEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "CREATE"
|
||||
|
||||
@@ -85,7 +85,7 @@ class ProjectDecisionBookPersonCreateEvents(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
class ProjectDecisionBookPersonUpdateEvents(MethodToEvent):
|
||||
class ProjectDecisionBookPersonUpdateEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "UPDATE"
|
||||
|
||||
@@ -119,7 +119,7 @@ class ProjectDecisionBookPersonUpdateEvents(MethodToEvent):
|
||||
)
|
||||
|
||||
|
||||
class ProjectDecisionBookPersonPatchEvents(MethodToEvent):
|
||||
class ProjectDecisionBookPersonPatchEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "PATCH"
|
||||
|
||||
@@ -151,3 +151,24 @@ class ProjectDecisionBookPersonPatchEvents(MethodToEvent):
|
||||
result=decision_book_project_person,
|
||||
)
|
||||
|
||||
|
||||
ProjectDecisionBookPersonListEventMethod = (
|
||||
ProjectDecisionBookPersonListEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/people/list")
|
||||
)
|
||||
)
|
||||
ProjectDecisionBookPersonCreateEventMethod = (
|
||||
ProjectDecisionBookPersonCreateEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/people/create")
|
||||
)
|
||||
)
|
||||
ProjectDecisionBookPersonUpdateEventMethod = (
|
||||
ProjectDecisionBookPersonUpdateEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/people/update")
|
||||
)
|
||||
)
|
||||
ProjectDecisionBookPersonPatchEventMethod = (
|
||||
ProjectDecisionBookPersonPatchEventMethods(
|
||||
action=ActionsSchema(endpoint="/build/decision_book/project/people/patch")
|
||||
)
|
||||
)
|
||||
|
||||
@@ -86,9 +86,6 @@ class SuperUserEventBlock(AddEventFunctionality):
|
||||
{"function_code": "36961d8a-cefa-46cc-9f7c-9d841d6351b6"},
|
||||
{"function_code": "46d90119-3b23-4784-8053-fe11da4a3584"},
|
||||
{"function_code": "c786e15c-c03e-4e8f-936c-7e5e5ec9bbcc"},
|
||||
{"function_code": "f6900cb5-ac5b-478e-8e7c-fa87e65cd2e5"},
|
||||
{"function_code": "76f11a08-5f4a-4e1f-961f-aaef21699acd"},
|
||||
{"function_code": "41ea7f29-006a-4310-b5c4-b2a0e1a504bd"},
|
||||
{"function_code": "5344d03c-fc47-43ec-8c44-6c2acd7e5d9f"},
|
||||
{"function_code": "31f4f32f-0cd4-4995-8a6a-f9f56335848a"},
|
||||
{"function_code": "7192c2aa-5352-4e36-98b3-dafb7d036a3d"},
|
||||
|
||||
Reference in New Issue
Block a user