From 5519cf36e39dc94aacae745c5fd1ebf4d0a6c503 Mon Sep 17 00:00:00 2001 From: zomars Date: Tue, 1 Mar 2022 09:58:02 -0700 Subject: [PATCH] WIP --- .../components/CalendarListContainer.tsx | 1 + apps/web/lib/apps/utils/AppUtils.ts | 3 +- apps/web/pages/apps/installed.tsx | 6 +- apps/web/pages/event-types/[type].tsx | 68 +- packages/app-store/zoomvideo/.env.example | 4 + .../app-store/zoomvideo/components/Select.tsx | 0 packages/app-store/zoomvideo/index.ts | 12 +- yarn.lock | 1318 ++++++++++++++++- 8 files changed, 1324 insertions(+), 88 deletions(-) create mode 100644 packages/app-store/zoomvideo/.env.example create mode 100644 packages/app-store/zoomvideo/components/Select.tsx diff --git a/apps/web/lib/apps/calendar/components/CalendarListContainer.tsx b/apps/web/lib/apps/calendar/components/CalendarListContainer.tsx index 88c38ed2c4..246f469093 100644 --- a/apps/web/lib/apps/calendar/components/CalendarListContainer.tsx +++ b/apps/web/lib/apps/calendar/components/CalendarListContainer.tsx @@ -191,6 +191,7 @@ function CalendarList(props: Props) { /> ); } + export function CalendarListContainer(props: { heading?: false }) { const { t } = useLocale(); const { heading = true } = props; diff --git a/apps/web/lib/apps/utils/AppUtils.ts b/apps/web/lib/apps/utils/AppUtils.ts index df2c03b3ff..5e914eb1f4 100644 --- a/apps/web/lib/apps/utils/AppUtils.ts +++ b/apps/web/lib/apps/utils/AppUtils.ts @@ -13,7 +13,7 @@ const ALL_APPS_MAP = { ...CalendarApps, ...ConferencingApps, ...PaymentApps, -}; +} as App[]; const credentialData = Prisma.validator()({ select: { id: true, type: true }, @@ -54,6 +54,7 @@ export function hasIntegration(apps: AppMeta, type: string): boolean { (type === "jitsi_video" || type === "huddle01_video" || app.credentials.length > 0) ); } + export function hasIntegrationInstalled(type: App["type"]): boolean { return ALL_APPS.some((app) => app.type === type && !!app.installed); } diff --git a/apps/web/pages/apps/installed.tsx b/apps/web/pages/apps/installed.tsx index b55612f733..3da81aa937 100644 --- a/apps/web/pages/apps/installed.tsx +++ b/apps/web/pages/apps/installed.tsx @@ -2,7 +2,7 @@ import { ChevronRightIcon, PencilAltIcon, SwitchHorizontalIcon, TrashIcon } from import { ClipboardIcon } from "@heroicons/react/solid"; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@radix-ui/react-collapsible"; import Image from "next/image"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { Controller, useForm, useWatch } from "react-hook-form"; import { JSONObject } from "superjson/dist/types"; @@ -21,7 +21,7 @@ import Loader from "@components/Loader"; import Shell, { ShellSubHeading } from "@components/Shell"; import { Tooltip } from "@components/Tooltip"; import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent"; -import { FieldsetLegend, Form, InputGroupBox, TextField, TextArea } from "@components/form/fields"; +import { FieldsetLegend, Form, InputGroupBox, TextArea, TextField } from "@components/form/fields"; import ConnectIntegration from "@components/integrations/ConnectIntegrations"; import DisconnectIntegration from "@components/integrations/DisconnectIntegration"; import IntegrationListItem from "@components/integrations/IntegrationListItem"; @@ -122,7 +122,7 @@ function WebhookTestDisclosure() { return ( setOpen(!open)}> - + {t("webhook_test")} diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index 829a8b41e6..379f9b17fe 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -404,7 +404,7 @@ const EventTypePage = (props: inferSSRProps) => { {formMethods.getValues("locations").map((location) => (
  • + className="border-neutral-300 mb-2 rounded-sm border py-1.5 px-2 shadow-sm">
    {location.type === LocationType.InPerson && (
    @@ -625,8 +625,8 @@ const EventTypePage = (props: inferSSRProps) => { type="button" className="flex rounded-sm px-3 py-2 hover:bg-gray-100" onClick={() => setShowLocationModal(true)}> - - {t("add_location")} + + {t("add_location")}
  • )} @@ -659,7 +659,7 @@ const EventTypePage = (props: inferSSRProps) => { autoFocus style={{ top: -6, fontSize: 22 }} required - className="relative h-10 w-full cursor-pointer border-none bg-transparent pl-0 text-gray-900 hover:text-gray-700 focus:text-black focus:outline-none focus:ring-0" + className="focus:outline-none relative h-10 w-full cursor-pointer border-none bg-transparent pl-0 text-gray-900 hover:text-gray-700 focus:text-black focus:ring-0" placeholder={t("quick_chat")} {...formMethods.register("title")} defaultValue={eventType.title} @@ -671,7 +671,7 @@ const EventTypePage = (props: inferSSRProps) => { subtitle={eventType.description || ""}>
    -
    +
    { @@ -695,8 +695,8 @@ const EventTypePage = (props: inferSSRProps) => {
    -
    @@ -726,7 +726,7 @@ const EventTypePage = (props: inferSSRProps) => { - {" "} + {" "} {t("duration")} } @@ -746,8 +746,8 @@ const EventTypePage = (props: inferSSRProps) => {
    -
    @@ -763,8 +763,8 @@ const EventTypePage = (props: inferSSRProps) => {
    -
    @@ -785,8 +785,8 @@ const EventTypePage = (props: inferSSRProps) => {
    @@ -809,8 +809,8 @@ const EventTypePage = (props: inferSSRProps) => {
    -
    @@ -846,9 +846,9 @@ const EventTypePage = (props: inferSSRProps) => { - + {t("show_advanced_settings")} @@ -863,7 +863,7 @@ const EventTypePage = (props: inferSSRProps) => {
    @@ -887,7 +887,7 @@ const EventTypePage = (props: inferSSRProps) => { )}
    -
    @@ -908,7 +908,7 @@ const EventTypePage = (props: inferSSRProps) => {
    @@ -931,7 +931,7 @@ const EventTypePage = (props: inferSSRProps) => {
    @@ -1037,7 +1037,7 @@ const EventTypePage = (props: inferSSRProps) => { )} /> -
    +
    ) => {
    -
    @@ -1107,7 +1107,7 @@ const EventTypePage = (props: inferSSRProps) => {
    @@ -1127,7 +1127,7 @@ const EventTypePage = (props: inferSSRProps) => { + className="focus:outline-none flex h-4 w-4 cursor-pointer items-center rounded-full border border-black bg-white focus:border-2 ltr:mr-2 rtl:ml-2"> {period.prefix ? {period.prefix}  : null} @@ -1142,7 +1142,7 @@ const EventTypePage = (props: inferSSRProps) => { />