events cluster updated with PageInfo
This commit is contained in:
@@ -50,6 +50,51 @@ class RedisCategoryKeys:
|
||||
MENU_MAPPER: str = "MENU_MAPPER"
|
||||
|
||||
|
||||
class RedisCategoryPageInfoKeys:
|
||||
"""
|
||||
### /create?site=BuildingCluster, #/update?site=BuildingCluster, #/dashboard?site=BuildingCluster
|
||||
PAGE_URL: /dashboard?site=BuildingCluster
|
||||
PAGE_NAME: BuildingCluster
|
||||
PAGE_INFO: {LANGUAGE_MODELS: "", ICON: "", URL: ""}
|
||||
PAGE_MENU_INDEX: 1 # {build_living_space: "uuid4", LAYER: 1, MENU_INDEX: 1}
|
||||
|
||||
PAGE_MENU_COMPONENT: {..., lang: {"tr"}: {...}, lang: {"en"}: {...}}
|
||||
PAGE_LANGUAGE: {{"tr"}: {...},{"en"}: {...}}
|
||||
"""
|
||||
|
||||
PAGE_URL: str = "PAGE_URL"
|
||||
PAGE_NAME: str = "PAGE_NAME"
|
||||
PAGE_INFO: str = "PAGE_INFO"
|
||||
PAGE_COMPONENT: str = "PAGE_COMPONENT"
|
||||
PAGE_MENU_INDEX: str = "PAGE_MENU_INDEX"
|
||||
PAGE_MENU_COMPONENT: str = "PAGE_MENU_COMPONENT"
|
||||
PAGE_LANGUAGE: str = "PAGE_LANGUAGE"
|
||||
|
||||
|
||||
class RedisCategoryPageInfoKeysAction:
|
||||
"""
|
||||
PAGE_MAPPER: {PAGE_URL: /dashboard?site=BuildingCluster, PAGE_NAME: BuildingCluster, PAGE_INFO: {LANGUAGE_MODELS: "", ICON: "", URL: ""}}
|
||||
value : {RedisCategoryPageInfoKeys.PAGE_INFO}
|
||||
MENU_MAPPER: {PAGE_MENU_INDEX: 1, PAGE_MENU_COMPONENT: {..., lang: {"tr"}: {...}, lang: {"en"}: {...}}}
|
||||
value : {RedisCategoryPageInfoKeys.PAGE_INFO}
|
||||
"""
|
||||
|
||||
page_index: str = f"{RedisCategoryPageInfoKeys.PAGE_MENU_INDEX}:{RedisCategoryPageInfoKeys.PAGE_URL}"
|
||||
|
||||
page_mapper_key: str = (
|
||||
f"{RedisCategoryPageInfoKeys.PAGE_MENU_INDEX}:{RedisCategoryPageInfoKeys.PAGE_URL}"
|
||||
)
|
||||
page_mapper_key: str = (
|
||||
f"{page_mapper_key}:{RedisCategoryPageInfoKeys.PAGE_LANGUAGE}"
|
||||
)
|
||||
menu_mapper_key: str = (
|
||||
f"{RedisCategoryPageInfoKeys.PAGE_URL}:{RedisCategoryPageInfoKeys.PAGE_MENU_INDEX}"
|
||||
)
|
||||
menu_mapper_key: str = (
|
||||
f"{menu_mapper_key}:{RedisCategoryPageInfoKeys.PAGE_MENU_COMPONENT}"
|
||||
)
|
||||
|
||||
|
||||
class RedisValidationKeysAction:
|
||||
# LANGUAGE_MODELS:DYNAMIC:VALIDATIONS:
|
||||
dynamic_validation_key: str = (
|
||||
|
||||
@@ -9,7 +9,9 @@ class CreateRouterFromCluster:
|
||||
self.prefix = kwargs.get("prefix")
|
||||
self.tags = kwargs.get("tags")
|
||||
self.include_in_schema = bool(kwargs.get("include_in_schema", True))
|
||||
self.router = APIRouter(prefix=self.prefix, tags=self.tags, include_in_schema=self.include_in_schema)
|
||||
self.router = APIRouter(
|
||||
prefix=self.prefix, tags=self.tags, include_in_schema=self.include_in_schema
|
||||
)
|
||||
|
||||
|
||||
class CreateEndpointFromCluster:
|
||||
|
||||
@@ -62,6 +62,7 @@ class TokenService:
|
||||
) -> Dict[str, Any]:
|
||||
"""Handle employee login process and return login information."""
|
||||
from ApiLayers.Schemas.identity.identity import UsersTokens, People
|
||||
|
||||
db_session = Employees.new_session()
|
||||
list_employee = Employees.filter_all(
|
||||
Employees.people_id == user.person_id, db=db_session
|
||||
|
||||
@@ -26,7 +26,13 @@ class EndpointSuccessListResponse(BaseEndpointResponse): # 200 OK
|
||||
def as_dict(self, data: Optional[dict] = None, pagination: Optional[dict] = None):
|
||||
return JSONResponse(
|
||||
status_code=status.HTTP_200_OK,
|
||||
content=dict(completed=True, **self.response, lang=self.lang, pagination=pagination, data=data),
|
||||
content=dict(
|
||||
completed=True,
|
||||
**self.response,
|
||||
lang=self.lang,
|
||||
pagination=pagination,
|
||||
data=data,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
accountResponses = {
|
||||
"ACCOUNTS_LIST": {
|
||||
"tr": {
|
||||
@@ -25,4 +23,4 @@ accountResponses = {
|
||||
"message": "Account information updated successfully.",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user