web: fix sidebar being active when stage prompts is selected
This commit is contained in:
parent
f020b79384
commit
43bab840ec
|
@ -169,22 +169,22 @@ urlpatterns = [
|
||||||
),
|
),
|
||||||
# Stage Prompts
|
# Stage Prompts
|
||||||
path(
|
path(
|
||||||
"stages/prompts/",
|
"stages_prompts/",
|
||||||
stages_prompts.PromptListView.as_view(),
|
stages_prompts.PromptListView.as_view(),
|
||||||
name="stage-prompts",
|
name="stage-prompts",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"stages/prompts/create/",
|
"stages_prompts/create/",
|
||||||
stages_prompts.PromptCreateView.as_view(),
|
stages_prompts.PromptCreateView.as_view(),
|
||||||
name="stage-prompt-create",
|
name="stage-prompt-create",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"stages/prompts/<uuid:pk>/update/",
|
"stages_prompts/<uuid:pk>/update/",
|
||||||
stages_prompts.PromptUpdateView.as_view(),
|
stages_prompts.PromptUpdateView.as_view(),
|
||||||
name="stage-prompt-update",
|
name="stage-prompt-update",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"stages/prompts/<uuid:pk>/delete/",
|
"stages_prompts/<uuid:pk>/delete/",
|
||||||
stages_prompts.PromptDeleteView.as_view(),
|
stages_prompts.PromptDeleteView.as_view(),
|
||||||
name="stage-prompt-delete",
|
name="stage-prompt-delete",
|
||||||
),
|
),
|
||||||
|
|
|
@ -41,7 +41,7 @@ export const SIDEBAR_ITEMS: SidebarItem[] = [
|
||||||
new SidebarItem("Flows").children(
|
new SidebarItem("Flows").children(
|
||||||
new SidebarItem("Flows", "/administration/flows/").activeWhen(`^/flows/(?<slug>${SLUG_REGEX})$`),
|
new SidebarItem("Flows", "/administration/flows/").activeWhen(`^/flows/(?<slug>${SLUG_REGEX})$`),
|
||||||
new SidebarItem("Stages", "/administration/stages/"),
|
new SidebarItem("Stages", "/administration/stages/"),
|
||||||
new SidebarItem("Prompts", "/administration/stages/prompts/"),
|
new SidebarItem("Prompts", "/administration/stages_prompts/"),
|
||||||
new SidebarItem("Invitations", "/administration/stages/invitations/"),
|
new SidebarItem("Invitations", "/administration/stages/invitations/"),
|
||||||
).when((): Promise<boolean> => {
|
).when((): Promise<boolean> => {
|
||||||
return User.me().then(u => u.is_superuser);
|
return User.me().then(u => u.is_superuser);
|
||||||
|
|
Reference in New Issue