fix: empty screen added in routing position page when no options are present (#25170)
Co-authored-by: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com>
This commit is contained in:
co-authored by
Dhairyashil Shinde
parent
da9ee5c186
commit
74af23136c
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user