Skip to content

Commit acee514

Browse files
authored
fix: show empty screen from event type availability tab (calcom#26396)
* fix * update * fix * Remove copying of App Store static files step Removed step to copy App Store static files from the workflow.
1 parent 64b2cf0 commit acee514

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

apps/web/modules/event-types/components/tabs/availability/EventAvailabilityTab.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { SettingsToggle } from "@calcom/ui/components/form";
3434
import { Icon } from "@calcom/ui/components/icon";
3535
import { Spinner } from "@calcom/ui/components/icon";
3636
import { SkeletonText } from "@calcom/ui/components/skeleton";
37+
import { EmptyScreen } from "@calcom/ui/components/empty-screen";
3738

3839
export type ScheduleQueryData = RouterOutputs["viewer"]["availability"]["schedule"]["get"];
3940

@@ -476,6 +477,20 @@ const EventTypeSchedule = ({
476477
return <SelectSkeletonLoader />;
477478
}
478479

480+
if (schedulesQueryData.length === 0) {
481+
return (
482+
<EmptyScreen
483+
Icon="clock"
484+
headline={t("create_availability_schedule")}
485+
description={t("no_schedules_created_yet")}
486+
className="w-full"
487+
buttonRaw={<Button href="/availability" StartIcon="plus">
488+
{t("create")}
489+
</Button>}
490+
/>
491+
);
492+
}
493+
479494
const options = schedulesQueryData.map((schedule) => ({
480495
value: schedule.id,
481496
label: schedule.name,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,8 @@
12981298
"schedule_deleted_successfully": "Schedule deleted successfully",
12991299
"default_schedule_name": "Working Hours",
13001300
"new_schedule_heading": "Create an availability schedule",
1301+
"no_schedules_created_yet": "You haven't created any availability schedules yet. Create one to get started.",
1302+
"create_availability_schedule": "Create availability schedule",
13011303
"new_schedule_description": "Creating availability schedules allows you to manage availability across event types. They can be applied to one or more event types.",
13021304
"requires_ownership_of_a_token": "Requires ownership of a token belonging to the following address:",
13031305
"example_name": "John Doe",

0 commit comments

Comments
 (0)