Skip to content

Scheduling infrastructure for absolutely everyone.

fix: use slug in options (#7523)

Udit Takkarc8956680ad91
diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx
index f5b6d180a09..3ee9dad439a 100644
--- a/apps/web/pages/event-types/index.tsx
+++ b/apps/web/pages/event-types/index.tsx
@@ -637,7 +637,12 @@ const CTA = () => {
const profileOptions = query.data.profiles
.filter((profile) => !profile.readOnly)
.map((profile) => {
- return { teamId: profile.teamId, label: profile.name || profile.slug, image: profile.image };
+ return {
+ teamId: profile.teamId,
+ label: profile.name || profile.slug,
+ image: profile.image,
+ slug: profile.slug,
+ };
});
return (
diff --git a/packages/features/ee/workflows/components/EmptyScreen.tsx b/packages/features/ee/workflows/components/EmptyScreen.tsx
index b0de24999fe..fdbf2a945e7 100644
--- a/packages/features/ee/workflows/components/EmptyScreen.tsx
+++ b/packages/features/ee/workflows/components/EmptyScreen.tsx
@@ -38,6 +38,7 @@ export default function EmptyScreen(props: {
label: string | null;
image?: string | null;
teamId: number | null | undefined;
+ slug: string | null;
}[];
isFilteredView: boolean;
}) {
diff --git a/packages/features/ee/workflows/components/WorkflowListPage.tsx b/packages/features/ee/workflows/components/WorkflowListPage.tsx
index 92201ac0aef..5919e5d825f 100644
--- a/packages/features/ee/workflows/components/WorkflowListPage.tsx
+++ b/packages/features/ee/workflows/components/WorkflowListPage.tsx
@@ -46,6 +46,7 @@ interface Props {
image?: string | null;
label: string | null;
teamId: number | null | undefined;
+ slug: string | null;
}[];
hasNoWorkflows?: boolean;
}
diff --git a/packages/features/ee/workflows/pages/index.tsx b/packages/features/ee/workflows/pages/index.tsx
index 55c95eff844..99283ba05c8 100644
--- a/packages/features/ee/workflows/pages/index.tsx
+++ b/packages/features/ee/workflows/pages/index.tsx
@@ -83,7 +83,12 @@ function WorkflowsPage() {
const profileOptions = query.data.profiles
.filter((profile) => !profile.readOnly)
.map((profile) => {
- return { teamId: profile.teamId, label: profile.name || profile.slug, image: profile.image };
+ return {
+ teamId: profile.teamId,
+ label: profile.name || profile.slug,
+ image: profile.image,
+ slug: profile.slug,
+ };
});
return (
diff --git a/packages/ui/components/createButton/CreateButton.tsx b/packages/ui/components/createButton/CreateButton.tsx
index 192e6d31537..a0eb1fc8569 100644
--- a/packages/ui/components/createButton/CreateButton.tsx
+++ b/packages/ui/components/createButton/CreateButton.tsx
@@ -18,6 +18,7 @@ export interface Option {
teamId: number | null | undefined; // if undefined, then it's a profile
label: string | null;
image?: string | null;
+ slug: string | null;
}
interface CreateBtnProps {
@@ -43,7 +44,7 @@ export function CreateButton(props: CreateBtnProps) {
const query = {
...router.query,
dialog: "new",
- eventPage: option.label,
+ eventPage: option.slug,
teamId: option.teamId,
};
if (!option.teamId) {