Scheduling infrastructure for absolutely everyone.
fix: empty screen added in routing position page when no options are present (#25170)
spandev74af23136cb7
diff --git a/apps/web/modules/insights/insights-virtual-queues-view.tsx b/apps/web/modules/insights/insights-virtual-queues-view.tsxindex c82b0e733d6..8e366129413 100644--- a/apps/web/modules/insights/insights-virtual-queues-view.tsx+++ b/apps/web/modules/insights/insights-virtual-queues-view.tsx@@ -9,6 +9,7 @@ import { Label } from "@calcom/ui/components/form";import { Select } from "@calcom/ui/components/form";import { TestForm } from "../../components/apps/routing-forms/TestForm";+import { EmptyScreen } from "@calcom/ui/components/empty-screen";export default function InsightsVirtualQueuesPage() {const { t } = useLocale();@@ -23,6 +24,16 @@ export default function InsightsVirtualQueuesPage() {setSelectedForm(routingForms[0]);}+ if (routingForms && routingForms.length === 0) {+ return (+ <EmptyScreen+ Icon="split"+ headline={t("no_routing_forms")}+ description={t("empty_routing_forms_description")}+ />+ )+ }+return (<><Label>{t("routing_form")}</Label>diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.jsonindex bd4fab2bfe4..b72b8daf6f3 100644--- a/apps/web/public/static/locales/en/common.json+++ b/apps/web/public/static/locales/en/common.json@@ -3274,6 +3274,8 @@"calibration": "Calibration","shortfall": "Shortfall","routing_form": "Routing Form",+ "no_routing_forms": "No Routing Forms created yet.",+ "empty_routing_forms_description": "Create routing forms to select projects to view their routing positions","go_back_and_save": "Go back and save","save_changes": "Save changes","leave_without_saving": "Leave without saving",