Scheduling infrastructure for absolutely everyone.
fixed labels for seats, removes shadow from event-type inputs (#2862)
Peer Richelseneacfdac016b2
diff --git a/apps/admin b/apps/adminnew file mode 160000index 00000000000..8474e2baa27--- /dev/null+++ b/apps/admin@@ -0,0 +1 @@+Subproject commit 8474e2baa27ef665b69491fa000ccb5d94257363diff --git a/apps/api b/apps/apiindex 44f0830b16d..be2d4338ee1 160000--- a/apps/api+++ b/apps/api@@ -1 +1 @@-Subproject commit 44f0830b16d42c555ea8631d3e795abab5097b0f+Subproject commit be2d4338ee1023a2d2862978ccf91554d47ff51fdiff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsxindex b9baf5bb0f1..9ddd425979b 100644--- a/apps/web/pages/event-types/[type].tsx+++ b/apps/web/pages/event-types/[type].tsx@@ -173,7 +173,7 @@ const SuccessRedirectEdit = <T extends UseFormReturn<FormValues>>({}}readOnly={proUpgradeRequired}type="url"- className=" block w-full rounded-sm border-gray-300 shadow-sm sm:text-sm"+ className=" block w-full rounded-sm border-gray-300 sm:text-sm"placeholder={t("external_redirect_url")}defaultValue={eventType.successRedirectUrl || ""}{...formMethods.register("successRedirectUrl")}@@ -435,7 +435,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {{...locationFormMethods.register("locationAddress")}id="address"required- className=" block w-full rounded-sm border-gray-300 text-sm shadow-sm"+ className=" block w-full rounded-sm border-gray-300 text-sm"defaultValue={formMethods.getValues("locations")@@ -457,7 +457,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {{...locationFormMethods.register("locationLink")}id="address"required- className=" block w-full rounded-sm border-gray-300 shadow-sm sm:text-sm"+ className=" block w-full rounded-sm border-gray-300 sm:text-sm"defaultValue={formMethods.getValues("locations").find((location) => location.type === LocationType.Link)?.link@@ -630,9 +630,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {{formMethods.getValues("locations").length > 0 && (<ul>{formMethods.getValues("locations").map((location) => (- <li- key={location.type}- className="mb-2 rounded-sm border border-neutral-300 py-1.5 px-2 shadow-sm">+ <li key={location.type} className="mb-2 rounded-sm border border-neutral-300 py-1.5 px-2"><div className="flex justify-between">{location.type === LocationType.InPerson && (<div className="flex flex-grow items-center">@@ -1048,7 +1046,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {</label></div><div className="w-full">- <div className="flex rounded-sm shadow-sm">+ <div className="flex rounded-sm"><span className="inline-flex items-center rounded-l-sm border border-r-0 border-gray-300 bg-gray-50 px-3 text-sm text-gray-500">{process.env.NEXT_PUBLIC_WEBSITE_URL?.replace(/^(https?:|)\/\//, "")}/{team ? "team/" + team.slug : eventType.users[0].username}/@@ -1124,7 +1122,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {<div className="w-full"><textareaid="description"- className=" block w-full rounded-sm border-gray-300 text-sm shadow-sm"+ className=" block w-full rounded-sm border-gray-300 text-sm"placeholder={t("quick_video_meeting")}{...formMethods.register("description")}defaultValue={asStringOrUndefined(eventType.description)}></textarea>@@ -1254,7 +1252,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {</label></div><div className="w-full">- <div className="relative mt-1 rounded-sm shadow-sm">+ <div className="relative mt-1 rounded-sm"><Controllercontrol={formMethods.control}name="destinationCalendar"@@ -1278,10 +1276,10 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {</label></div><div className="w-full">- <div className="relative mt-1 rounded-sm shadow-sm">+ <div className="relative mt-1 rounded-sm"><inputtype="text"- className=" block w-full rounded-sm border-gray-300 text-sm shadow-sm"+ className=" block w-full rounded-sm border-gray-300 text-sm"placeholder={t("meeting_with_user")}defaultValue={eventType.eventName || ""}{...formMethods.register("eventName")}@@ -1299,11 +1297,11 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {</label></div><div className="w-full">- <div className="relative mt-1 rounded-sm shadow-sm">+ <div className="relative mt-1 rounded-sm">{<inputtype="text"- className=" block w-full rounded-sm border-gray-300 text-sm shadow-sm"+ className=" block w-full rounded-sm border-gray-300 text-sm"placeholder={t("Example: 0x71c7656ec7ab88b098defb751b7401b5f6d8976f")}defaultValue={(eventType.metadata.smartContractAddress || "") as string}{...formMethods.register("smartContractAddress")}@@ -1616,7 +1614,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {<div className="inline-flex"><inputtype="number"- className="block w-16 rounded-sm border-gray-300 shadow-sm [appearance:textfield] ltr:mr-2 rtl:ml-2 sm:text-sm"+ className="block w-16 rounded-sm border-gray-300 [appearance:textfield] ltr:mr-2 rtl:ml-2 sm:text-sm"placeholder="30"{...formMethods.register("periodDays", { valueAsNumber: true })}defaultValue={eventType.periodDays || 30}@@ -1763,6 +1761,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {<CheckboxFieldid="seats"name="seats"+ descriptionAsLabellabel={t("offer_seats")}description={t("offer_seats_description")}defaultChecked={!!eventType.seatsPerTimeSlot}@@ -1802,10 +1801,12 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {{ value: 5, label: "5" },{value: -1,- isDisabled: !eventType.users.some((user) => user.plan === "PRO"),+ isDisabled: !eventType.users.some(+ (user) => user.plan === ("PRO" || "TRIAL")+ ),label: (<div className="flex flex-row justify-between">- <span>6 +</span>+ <span>6+</span><Badge variant="default">PRO</Badge></div>) as unknown as string,@@ -1815,54 +1816,65 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {<><div className="block sm:flex"><div className="flex-auto">- <label- htmlFor="beforeBufferTime"- className="mb-2 flex text-sm font-medium text-neutral-700">- Number of seats per booking- </label>- <Select- isSearchable={false}- classNamePrefix="react-select"- className="react-select-container focus:border-primary-500 focus:ring-primary-500 block w-full min-w-0 flex-auto rounded-sm border border-gray-300 sm:text-sm "- onChange={(val) => {- if (val!.value === -1) {- formMethods.setValue(- "seatsPerTimeSlot",- defaultSeatsInput- );- setInputSeatNumber(true);- } else {- setInputSeatNumber(false);- formMethods.setValue("seatsPerTimeSlot", val!.value);- }- }}- defaultValue={{- value: eventType.seatsPerTimeSlot || defaultSeats,- label: `${eventType.seatsPerTimeSlot || defaultSeats}`,- }}- options={selectSeatsPerTimeSlotOptions}- />+ {eventType.users.some(+ (user) => user.plan === ("PRO" || "TRIAL")+ ) ? (+ <div className="flex-auto">+ <label+ htmlFor="beforeBufferTime"+ className="mb-2 flex text-sm font-medium text-neutral-700">+ {t("enter_number_of_seats")}+ </label>+ <input+ type="number"+ className="focus:border-primary-500 focus:ring-primary-500 py- block w-20 rounded-sm border-gray-300 shadow-sm [appearance:textfield] ltr:mr-2 rtl:ml-2 sm:text-sm"+ placeholder={`${defaultSeatsInput}`}+ {...formMethods.register("seatsPerTimeSlot", {+ valueAsNumber: true,+ min: defaultSeatsInput,+ })}+ defaultValue={+ eventType.seatsPerTimeSlot || defaultSeatsInput+ }+ />+ </div>+ ) : (+ <>+ <label+ htmlFor="beforeBufferTime"+ className="mb-2 flex text-sm font-medium text-neutral-700">+ {t("number_of_seats")}+ </label>+ <Select+ isSearchable={false}+ classNamePrefix="react-select"+ className="react-select-container focus:border-primary-500 focus:ring-primary-500 block w-full min-w-0 flex-auto rounded-sm border border-gray-300 sm:text-sm "+ onChange={(val) => {+ if (val!.value === -1) {+ formMethods.setValue(+ "seatsPerTimeSlot",+ defaultSeatsInput+ );+ setInputSeatNumber(true);+ } else {+ setInputSeatNumber(false);+ formMethods.setValue(+ "seatsPerTimeSlot",+ val!.value+ );+ }+ }}+ defaultValue={{+ value: eventType.seatsPerTimeSlot || defaultSeats,+ label: `${+ eventType.seatsPerTimeSlot || defaultSeats+ }`,+ }}+ options={selectSeatsPerTimeSlotOptions}+ />+ </>+ )}</div>-- {inputSeatNumber && (- <div className="flex-auto md:ml-5">- <label- htmlFor="beforeBufferTime"- className="mb-2 flex text-sm font-medium text-neutral-700">- Enter number of seats- </label>- <input- type="number"- className="focus:border-primary-500 focus:ring-primary-500 py- block w-20 rounded-sm border-gray-300 shadow-sm [appearance:textfield] ltr:mr-2 rtl:ml-2 sm:text-sm"- placeholder={`${defaultSeatsInput}`}- {...formMethods.register("seatsPerTimeSlot", {- valueAsNumber: true,- min: defaultSeatsInput,- })}- defaultValue={defaultSeatsInput}- />- </div>- )}</div></>);@@ -1873,7 +1885,6 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {</div>)}</div>- <hr className="border-neutral-200" /></><SuccessRedirectEdit<typeof formMethods>@@ -1936,7 +1947,7 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {<div className="w-full"><div className="block items-center sm:flex"><div className="w-full">- <div className="relative mt-1 rounded-sm shadow-sm">+ <div className="relative mt-1 rounded-sm"><ControllerdefaultValue={eventType.price}control={formMethods.control}diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.jsonindex fba6efb2d21..56f74193ae0 100644--- a/apps/web/public/static/locales/en/common.json+++ b/apps/web/public/static/locales/en/common.json@@ -770,6 +770,8 @@"offer_seats": "Offer seats","offer_seats_description": "Offer seats to bookings (This disables guests)","seats_available": "Seats available",+ "number_of_seats": "Number of seats per booking",+ "enter_number_of_seats": "Enter number of seats","you_can_manage_your_schedules": "You can manage your schedules on the Availability page.","booking_full": "No more seats available","api_keys": "API Keys",diff --git a/apps/website b/apps/websiteindex 271f6bdd9f0..752ac529411 160000--- a/apps/website+++ b/apps/website@@ -1 +1 @@-Subproject commit 271f6bdd9f08898d25563ef5f33d21c534b830fe+Subproject commit 752ac529411a23830c24f6f121699c769109863b