fix: show empty screen from event type availability tab (#26396)
* fix * update * fix * Remove copying of App Store static files step Removed step to copy App Store static files from the workflow.
This commit is contained in:
@@ -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"];
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user