Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nextjs-bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/yarn-install
- run: yarn prisma generate
- uses: ./.github/actions/cache-build
- name: Analyze bundle
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/production-build-without-database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/dangerous-git-checkout
- uses: ./.github/actions/yarn-install
- run: yarn prisma generate
- name: Generate cache key
id: cache-key
uses: ./.github/actions/cache-build-key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { SettingsToggle } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { Spinner } from "@calcom/ui/components/icon";
import { SkeletonText } from "@calcom/ui/components/skeleton";
import { EmptyScreen } from "@calcom/ui/components/empty-screen";

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

Expand Down Expand Up @@ -476,6 +477,20 @@ const EventTypeSchedule = ({
return <SelectSkeletonLoader />;
}

if (schedulesQueryData.length === 0) {
return (
<EmptyScreen
Icon="clock"
headline={t("create_availability_schedule")}
description={t("no_schedules_created_yet")}
className="w-full"
buttonRaw={<Button href="/availability" StartIcon="plus">
{t("create")}
</Button>}
/>
);
}

const options = schedulesQueryData.map((schedule) => ({
value: schedule.id,
label: schedule.name,
Expand Down
2 changes: 2 additions & 0 deletions apps/web/public/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,8 @@
"schedule_deleted_successfully": "Schedule deleted successfully",
"default_schedule_name": "Working Hours",
"new_schedule_heading": "Create an availability schedule",
"no_schedules_created_yet": "You haven't created any availability schedules yet. Create one to get started.",
"create_availability_schedule": "Create availability schedule",
"new_schedule_description": "Creating availability schedules allows you to manage availability across event types. They can be applied to one or more event types.",
"requires_ownership_of_a_token": "Requires ownership of a token belonging to the following address:",
"example_name": "John Doe",
Expand Down
Loading