Skip to content

Commit 74af231

Browse files
fix: empty screen added in routing position page when no options are present (calcom#25170)
Co-authored-by: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com>
1 parent da9ee5c commit 74af231

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

apps/web/modules/insights/insights-virtual-queues-view.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Label } from "@calcom/ui/components/form";
99
import { Select } from "@calcom/ui/components/form";
1010

1111
import { TestForm } from "../../components/apps/routing-forms/TestForm";
12+
import { EmptyScreen } from "@calcom/ui/components/empty-screen";
1213

1314
export default function InsightsVirtualQueuesPage() {
1415
const { t } = useLocale();
@@ -23,6 +24,16 @@ export default function InsightsVirtualQueuesPage() {
2324
setSelectedForm(routingForms[0]);
2425
}
2526

27+
if (routingForms && routingForms.length === 0) {
28+
return (
29+
<EmptyScreen
30+
Icon="split"
31+
headline={t("no_routing_forms")}
32+
description={t("empty_routing_forms_description")}
33+
/>
34+
)
35+
}
36+
2637
return (
2738
<>
2839
<Label>{t("routing_form")}</Label>

apps/web/public/static/locales/en/common.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3274,6 +3274,8 @@
32743274
"calibration": "Calibration",
32753275
"shortfall": "Shortfall",
32763276
"routing_form": "Routing Form",
3277+
"no_routing_forms": "No Routing Forms created yet.",
3278+
"empty_routing_forms_description": "Create routing forms to select projects to view their routing positions",
32773279
"go_back_and_save": "Go back and save",
32783280
"save_changes": "Save changes",
32793281
"leave_without_saving": "Leave without saving",

0 commit comments

Comments
 (0)