From 9d3b512ef653e7532285387689630dbe5d0e92c9 Mon Sep 17 00:00:00 2001 From: Ryukemeister Date: Mon, 16 Oct 2023 15:21:32 +0530 Subject: [PATCH] update props and add schedule list item to view --- .../availabilitylist/AvailabilityList.tsx | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/atoms/availabilitylist/AvailabilityList.tsx b/packages/atoms/availabilitylist/AvailabilityList.tsx index 4620cb0e47..e1c59df488 100644 --- a/packages/atoms/availabilitylist/AvailabilityList.tsx +++ b/packages/atoms/availabilitylist/AvailabilityList.tsx @@ -4,17 +4,24 @@ import type { HttpError } from "@calcom/lib/http-error"; import { Clock } from "@calcom/ui/components/icon"; import { EmptyScreen } from "./EmptyScreen"; +import ScheduleListItem from "./ScheduleListItem"; import type { Schedule } from ".prisma/client"; export function AvailabilityList({ schedules, onCreateMutation, + updateMutation, + duplicateMutation, + deleteMutation, }: { schedules: Schedule[] | []; onCreateMutation: (values: { onSucess: (schedule: Schedule) => void; onError: (err: HttpError) => void; }) => void; + updateMutation: ({ scheduleId, isDefault }: { scheduleId: number; isDefault: boolean }) => void; + duplicateMutation: ({ scheduleId }: { scheduleId: number }) => void; + deleteMutation: ({ scheduleId }: { scheduleId: number }) => void; }) { return ( <> @@ -29,15 +36,19 @@ export function AvailabilityList({ /> ) : ( -
- Render availability list here -
+
+
    {schedules.map((schedule) => ( -

    -

    {schedule?.name}

    - + ))} -
+
)}