* refactor: UserAvatarGroupWithOrg.tsx remove unecessary profile prop * chore: define event-type types in platform/types * feat: event-type transformes in lib and re-exported through platform-libraries * chore: define user types in platform/types * chore: add users endpoint to platform-constants * refactor: app-store use narrowed down booker event type * chore: version old event-types module * fix: old event-types e2e test * fix: libraries add missing export * fix: reset libraries version to 0 * feat: new event-types module and users endpoints * feat: make booker atom work with v2 event-types * updating event type * refactor: remove guard for get event-types * refactor: move private hook to public * Revert "refactor: remove guard for get event-types" This reverts commit d41204069f1d5bb1305b388ce53399f9175f4249. * Revert "refactor: move private hook to public" This reverts commit 09322e8fba102e57104959f79ed6bfa9a677dc9d. * refactor: get by username and slug in /event-types * remove console log * feat: locations handle displayEventPublicly * test e2e event-types * revert: user output from types * refactor: event-types hooks have private and public folders * refactor: require event-type.slug in input * refactor: demand that all labels of booking fields are unique * refactor: remove unused import * refactor: only have email and name by default in booker * refactor: add booking field slug * fix: display event-type location publicly / hide it in booker * fix: display event-type location publicly / hide it in booker * fix: packages/lib tests * fix: typescript in e2e test * fix: dynamic event types input * refactor: use IsIn instead of IsEnum * refactor: simplify getEventTypes * fix: use ApiAuthGuard instead of AccessTokenGuard * chore: export more stuff from libraries * refactor: SchedulingTypeEnum and Type --------- Co-authored-by: Morgan <[email protected]>
68 lines
1.8 KiB
TypeScript
68 lines
1.8 KiB
TypeScript
import type { Meta, StoryObj } from "@storybook/react";
|
|
import type { ComponentProps } from "react";
|
|
|
|
import { Examples, Example, VariantsTable, VariantRow } from "@calcom/storybook/components";
|
|
|
|
import { EventDetails } from "./Details";
|
|
import { EventMembers } from "./Members";
|
|
import { EventTitle } from "./Title";
|
|
import { mockEvent } from "./event.mock";
|
|
|
|
type StoryArgs = ComponentProps<typeof EventDetails>;
|
|
|
|
const meta: Meta<StoryArgs> = {
|
|
component: EventDetails,
|
|
parameters: {
|
|
nextjs: {
|
|
appDirectory: true,
|
|
},
|
|
},
|
|
title: "Features/Events/Meta",
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<StoryArgs>;
|
|
|
|
export const ExampleStory: Story = {
|
|
name: "Examples",
|
|
render: () => (
|
|
<Examples title="Combined event meta block">
|
|
<div style={{ maxWidth: 300 }}>
|
|
<Example title="Event Title">
|
|
<EventTitle>{mockEvent.title}</EventTitle>
|
|
</Example>
|
|
<Example title="Event Details">
|
|
<EventDetails event={mockEvent} />
|
|
</Example>
|
|
</div>
|
|
</Examples>
|
|
),
|
|
};
|
|
|
|
export const AllVariants: Story = {
|
|
name: "All variants",
|
|
render: () => (
|
|
<VariantsTable titles={["Event Meta Components"]} columnMinWidth={150}>
|
|
<VariantRow variant="">
|
|
<div style={{ maxWidth: 300 }}>
|
|
<EventMembers
|
|
users={mockEvent.users}
|
|
schedulingType="COLLECTIVE"
|
|
entity={{
|
|
considerUnpublished: false,
|
|
fromRedirectOfNonOrgLink: true,
|
|
teamSlug: null,
|
|
name: "Example",
|
|
orgSlug: null,
|
|
}}
|
|
// TODO remove type assertion
|
|
profile={{ bookerLayouts: null }}
|
|
/>
|
|
<EventTitle>Quick catch-up</EventTitle>
|
|
<EventDetails event={mockEvent} />
|
|
</div>
|
|
</VariantRow>
|
|
</VariantsTable>
|
|
),
|
|
};
|