From 95f92cac28726fd72f05e6bb39f869d891cce31c Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Thu, 17 Mar 2022 19:13:39 +0000 Subject: [PATCH] added emptyscreen component to availability and event-types (#2187) * added emptyscreen component to availability * added emptyscreen for event-types too * added placeholder for adding new schedule * didnt realise we had a Working Hours string alredy * nit * remove white background from empty availability --- apps/api | 2 +- .../availability/NewScheduleButton.tsx | 2 +- .../ui/svg/UserCalendarIllustration.tsx | 229 ------------------ apps/web/pages/availability/index.tsx | 133 +++++----- apps/web/pages/event-types/index.tsx | 16 +- apps/website | 2 +- 6 files changed, 74 insertions(+), 310 deletions(-) delete mode 100644 apps/web/components/ui/svg/UserCalendarIllustration.tsx diff --git a/apps/api b/apps/api index 79d65a46..378cbf8f 160000 --- a/apps/api +++ b/apps/api @@ -1 +1 @@ -Subproject commit 79d65a46fab8a351b8e7f91dfd30e93aff155e7f +Subproject commit 378cbf8f3a67ea7877296f1da02edb2b6e3efbce diff --git a/apps/web/components/availability/NewScheduleButton.tsx b/apps/web/components/availability/NewScheduleButton.tsx index a9259f9c..fceef26e 100644 --- a/apps/web/components/availability/NewScheduleButton.tsx +++ b/apps/web/components/availability/NewScheduleButton.tsx @@ -60,7 +60,7 @@ export function NewScheduleButton({ name = "new-schedule" }: { name?: string }) createMutation.mutate(values); }}>
- +
- - - -
- - ))} - - + <> + {schedules.length === 0 ? ( + + ) : ( +
+ +
+ )} + ); } diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx index a44b1b69..5787d50b 100644 --- a/apps/web/pages/event-types/index.tsx +++ b/apps/web/pages/event-types/index.tsx @@ -1,3 +1,4 @@ +import { CalendarIcon } from "@heroicons/react/outline"; import { ArrowDownIcon, ArrowUpIcon, @@ -34,6 +35,7 @@ import classNames from "@lib/classNames"; import { HttpError } from "@lib/core/http/error"; import { inferQueryOutput, trpc } from "@lib/trpc"; +import EmptyScreen from "@components/EmptyScreen"; import Shell from "@components/Shell"; import { Tooltip } from "@components/Tooltip"; import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent"; @@ -42,7 +44,6 @@ import EventTypeDescription from "@components/eventtype/EventTypeDescription"; import Avatar from "@components/ui/Avatar"; import AvatarGroup from "@components/ui/AvatarGroup"; import Badge from "@components/ui/Badge"; -import UserCalendarIllustration from "@components/ui/svg/UserCalendarIllustration"; type Profiles = inferQueryOutput<"viewer.eventTypes">["profiles"]; @@ -477,14 +478,11 @@ const CreateFirstEventTypeView = ({ canAddEvents, profiles }: CreateEventTypePro const { t } = useLocale(); return ( -
- -
-

{t("new_event_type_heading")}

-

{t("new_event_type_description")}

- -
-
+ ); }; diff --git a/apps/website b/apps/website index 4f26ead0..e54a7cc0 160000 --- a/apps/website +++ b/apps/website @@ -1 +1 @@ -Subproject commit 4f26ead0921916561724f58b93fbe1a3b8671da1 +Subproject commit e54a7cc0ecbb36a5a6838f77d8c19ec008c8849a