From 6b5c8935c56167e28ea563a6a4267bcc00b80a93 Mon Sep 17 00:00:00 2001 From: zomars Date: Tue, 18 Jul 2023 13:27:54 -0700 Subject: [PATCH] fix: formatting --- .github/ISSUE_TEMPLATE/bug_report.md | 12 +- .github/PULL_REQUEST_TEMPLATE.md | 25 ++- README.md | 1 - apps/api/README.md | 2 +- .../components/eventtype/EventAdvancedTab.tsx | 6 +- packages/app-store/skiff/DESCRIPTION.md | 1 + packages/features/bookings/Booker/Booker.tsx | 8 +- packages/features/bookings/Booker/store.ts | 2 +- .../components/event-meta/Locations.tsx | 20 +- .../ee/payments/components/Payment.tsx | 3 +- .../workflows/api/scheduleEmailReminders.ts | 3 +- .../workflows/components/AddActionDialog.tsx | 25 +-- .../components/WorkflowStepContainer.tsx | 212 +++++++++--------- .../ee/workflows/lib/actionHelperFunctions.ts | 49 ++-- .../features/ee/workflows/lib/constants.ts | 9 +- .../ee/workflows/lib/getActionIcon.tsx | 2 +- .../features/ee/workflows/lib/getOptions.ts | 11 +- .../lib/reminders/reminderScheduler.ts | 9 +- .../reminders/smsProviders/twilioProvider.ts | 14 +- .../lib/reminders/templates/whatsapp/index.ts | 8 +- .../whatsappEventCancelledTemplate.ts | 7 +- .../whatsappEventCompletedTemplate.ts | 3 +- .../whatsappEventRescheduledTemplate.ts | 4 +- .../lib/reminders/whatsappReminderManager.ts | 61 ++++- .../features/ee/workflows/pages/workflow.tsx | 2 +- .../form-builder/FormBuilderFieldsSchema.ts | 4 +- 26 files changed, 286 insertions(+), 217 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1fcdd70905..ad92b4bf11 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -22,18 +22,18 @@ Any other relevant information. For example, why do you consider this a bug and ### Actual Results - - What's happening right now that is different from what is expected +- What's happening right now that is different from what is expected ### Expected Results - - This is an ideal result that the system should get after the tests are performed +- This is an ideal result that the system should get after the tests are performed ### Technical details - - Browser version, screen recording, console logs, network requests: You can make a recording with [Bird Eats Bug](https://birdeatsbug.com/). - - Node.js version - - Anything else that you think could be an issue. +- Browser version, screen recording, console logs, network requests: You can make a recording with [Bird Eats Bug](https://birdeatsbug.com/). +- Node.js version +- Anything else that you think could be an issue. ### Evidence - - How was this tested? This is quite mandatory in terms of bugs. Providing evidence of your testing with screenshots or/and videos is an amazing way to prove the bug and a troubleshooting chance to find the solution. +- How was this tested? This is quite mandatory in terms of bugs. Providing evidence of your testing with screenshots or/and videos is an amazing way to prove the bug and a troubleshooting chance to find the solution. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a4059e40d0..2ef5c789ea 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,31 +11,32 @@ Fixes # (issue) ## Requirement/Documentation - - If there is a requirement document, please, share it here. - - If there is ab UI/UX design document, please, share it here. + +- If there is a requirement document, please, share it here. +- If there is ab UI/UX design document, please, share it here. ## Type of change - - [ ] Bug fix (non-breaking change which fixes an issue) - - [ ] Chore (refactoring code, technical debt, workflow improvements) - - [ ] New feature (non-breaking change which adds functionality) - - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - - [ ] This change requires a documentation update +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] Chore (refactoring code, technical debt, workflow improvements) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update ## How should this be tested? - - Are there environment variables that should be set? - - What are the minimal test data to have? - - What is expected (happy path) to have (input and output)? - - Any other important info that could help to test that PR +- Are there environment variables that should be set? +- What are the minimal test data to have? +- What is expected (happy path) to have (input and output)? +- Any other important info that could help to test that PR ## Mandatory Tasks - - [ ] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected. +- [ ] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected. ## Checklist diff --git a/README.md b/README.md index 4ebb532fa7..2f5cdc8eae 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,6 @@ That's where Cal.com comes in. Self-hosted or hosted by us. White-label by desig - [Prisma.io](https://prisma.io/?ref=cal.com) - [Daily.co](https://go.cal.com/daily) - ## Contact us Meet our sales team for any commercial inquiries. diff --git a/apps/api/README.md b/apps/api/README.md index cd53e722fd..1a3e1a7c49 100644 --- a/apps/api/README.md +++ b/apps/api/README.md @@ -7,7 +7,7 @@ Read the API docs -# Commercial Cal.com Public API +# Commercial Cal.com Public API Welcome to the Public API ("/apps/api") of the Cal.com. diff --git a/apps/web/components/eventtype/EventAdvancedTab.tsx b/apps/web/components/eventtype/EventAdvancedTab.tsx index 3ac5f6e2dd..8e416b3884 100644 --- a/apps/web/components/eventtype/EventAdvancedTab.tsx +++ b/apps/web/components/eventtype/EventAdvancedTab.tsx @@ -17,7 +17,7 @@ import { allowDisablingHostConfirmationEmails, } from "@calcom/features/ee/workflows/lib/allowDisablingStandardEmails"; import { FormBuilder } from "@calcom/features/form-builder/FormBuilder"; -import { EditableSchema } from "@calcom/features/form-builder/FormBuilderFieldsSchema" +import { EditableSchema } from "@calcom/features/form-builder/FormBuilderFieldsSchema"; import { BookerLayoutSelector } from "@calcom/features/settings/BookerLayoutSelector"; import { classNames } from "@calcom/lib"; import { APP_NAME, CAL_URL } from "@calcom/lib/constants"; @@ -87,7 +87,9 @@ export const EventAdvancedTab = ({ eventType, team }: Pick + editable: (!enabled ? "system-but-hidden" : "system-but-optional") as z.infer< + typeof EditableSchema + >, }; } return field; diff --git a/packages/app-store/skiff/DESCRIPTION.md b/packages/app-store/skiff/DESCRIPTION.md index 519a9b409a..b5c0c0f781 100644 --- a/packages/app-store/skiff/DESCRIPTION.md +++ b/packages/app-store/skiff/DESCRIPTION.md @@ -12,6 +12,7 @@ items: Skiff is a privacy-first, end-to-end encrypted workspace with Mail, Pages, Drive, and Calendar applications. Skiff Calendar integrates with Cal.com, enabling you to schedule appointments, organize events, and use your preferred video conferencing product. ## Features + - **Full workspace** — beyond email and calendar, Skiff enables writing and collaborating on end-to-end encrypted notes or wikis. You can also upload, preview, and share files. - **Native applications** — Skiff has native macOS, Windows, iOS, and Android applications, ensuring you can stay on top of your schedule from any device. - **Multiple accounts** — all Skiff products support multiple accounts, or sharing your entire team to collaborate inside one workspace. diff --git a/packages/features/bookings/Booker/Booker.tsx b/packages/features/bookings/Booker/Booker.tsx index d018c46295..2950239c7e 100644 --- a/packages/features/bookings/Booker/Booker.tsx +++ b/packages/features/bookings/Booker/Booker.tsx @@ -23,7 +23,7 @@ import { useBookerStore, useInitializeBookerStore } from "./store"; import type { BookerLayout, BookerProps } from "./types"; import { useEvent } from "./utils/event"; import { validateLayout } from "./utils/layout"; -import { getQueryParam } from './utils/query-param'; +import { getQueryParam } from "./utils/query-param"; import { useBrandColors } from "./utils/use-brand-colors"; const PoweredBy = dynamic(() => import("@calcom/ee/components/PoweredBy")); @@ -120,9 +120,9 @@ const BookerComponent = ({ layout !== _layout ) { const validLayout = bookerLayouts.enabledLayouts.find((userLayout) => userLayout === layout); - validLayout && setLayout(validLayout) + validLayout && setLayout(validLayout); } - }, [bookerLayouts, validateLayout, setLayout,_layout]); + }, [bookerLayouts, validateLayout, setLayout, _layout]); useEffect(() => { if (event.isLoading) return setBookerState("loading"); @@ -302,4 +302,4 @@ export const Booker = (props: BookerProps) => { ); -}; \ No newline at end of file +}; diff --git a/packages/features/bookings/Booker/store.ts b/packages/features/bookings/Booker/store.ts index 31cab2e4ab..6f39c136b2 100644 --- a/packages/features/bookings/Booker/store.ts +++ b/packages/features/bookings/Booker/store.ts @@ -128,7 +128,7 @@ export const useBookerStore = create((set, get) => ({ if (["week_view", "column_view"].includes(layout) && !get().selectedDate) { set({ selectedDate: dayjs().format("YYYY-MM-DD") }); } - updateQueryParam("layout", layout) + updateQueryParam("layout", layout); return set({ layout }); }, selectedDate: getQueryParam("date") || null, diff --git a/packages/features/bookings/components/event-meta/Locations.tsx b/packages/features/bookings/components/event-meta/Locations.tsx index 1e9709b0c1..26d144d832 100644 --- a/packages/features/bookings/components/event-meta/Locations.tsx +++ b/packages/features/bookings/components/event-meta/Locations.tsx @@ -1,8 +1,8 @@ import { getEventLocationType, getTranslatedLocation } from "@calcom/app-store/locations"; +import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Tooltip } from "@calcom/ui"; import { MapPin } from "@calcom/ui/components/icon"; -import { classNames } from "@calcom/lib"; import type { PublicEvent } from "../../types"; import { EventMetaBlock } from "./Details"; @@ -20,7 +20,7 @@ export const EventLocations = ({ event }: { event: PublicEvent }) => { return translatedLocation; }; const eventLocationType = getEventLocationType(locations[0].type); - const icon = (locations.length > 1 || !eventLocationType?.iconUrl) ? MapPin : eventLocationType.iconUrl; + const icon = locations.length > 1 || !eventLocationType?.iconUrl ? MapPin : eventLocationType.iconUrl; return ( @@ -44,13 +44,15 @@ export const EventLocations = ({ event }: { event: PublicEvent }) => {
  • {`${getEventLocationType(location.type)?.label} + src={getEventLocationType(location.type)?.iconUrl} + className={classNames( + "h-3 w-3 opacity-70 ltr:mr-[10px] rtl:ml-[10px] dark:opacity-100 ", + !getEventLocationType(location.type)?.iconUrl?.startsWith("/app-store") + ? "dark:invert-[.65]" + : "" + )} + alt={`${getEventLocationType(location.type)?.label} icon`} + /> {getLocationToDisplay(location)}
  • diff --git a/packages/features/ee/payments/components/Payment.tsx b/packages/features/ee/payments/components/Payment.tsx index 3ec57cbadd..510c601bd4 100644 --- a/packages/features/ee/payments/components/Payment.tsx +++ b/packages/features/ee/payments/components/Payment.tsx @@ -116,8 +116,7 @@ const PaymentForm = (props: Props) => { color="minimal" disabled={!holdAcknowledged || ["processing", "error"].includes(state.status)} id="cancel" - onClick={() => router.back()} - > + onClick={() => router.back()}> {t("cancel")}