cal/packages/lib/defaultEvents.ts

174 lines
4.4 KiB
TypeScript
Raw Permalink Normal View History

import type { EventTypeCustomInput } from "@prisma/client";
2022-06-10 15:38:46 -03:00
import { PeriodType, Prisma, SchedulingType, UserPlan } from "@prisma/client";
AppStore CLI: Making video app creation a breeze with major cleanup of locations code throughout (#3825) * Fix breadcrumb colors * HorizontalTabs * Team List Item WIP * Horizontal Tabs * Cards * Remove team list item WIP * Login Page * Add welcome back i118n * EventType page work * Update EventType Icons * WIP Availability * Horizontal Tab Work * Add build command for in root * Update build DIr/command * Add Edit Button + change buttons to v2 * Availablitiy page * Fix IPAD * Make mobile look a little nicer * WIP bookingshell * Remove list items from breaking build * Add Embed ModalBox for routing forms * Mian bulk of Booking Page. * Few updates to components * Fix chormatic feedback * Add duplicate form support * Fix duplication logic * Change to feathericons everywhere and other fixes * Dont allow routes for fallback route * Fix banner * Fix Empty Screen * Text area + embded window fixes * Semi fix avatar * Fix all TS issues * Fix tests * Troubleshoot container + Active on count * Support routing using query params * Improve mobile * NITS * Fix padding on input * Support multiselect in router endpoint * Fix the issue where app goes in embed mode after viewing embed once * Fix icons * Add router url tests * Add Responses download and form toggling tests * Add required validation test * Change Icons everywhere * App typeform app * Improvements in cli * Starting to move event types settings to tabs * Begin migration to single page form * Single page tabs * Limits Page * Advanced tab * Add RHF to dependancies * Add typeform how-to-use page * Add typeform how-to-use page and screenshots * Most of advanced tab * Solved RHF mismtach * Build fixes * RHF conditionals fixes * Improved legibility * Fix TS error * Add missing image * Update CliApp.tsx * Major refactor/organisation into optional V2 UI * Portal EditLocationModal * Fix dialoug form * Update imports * Auto Animate + custom inputs WIP * Custom Inputs * WIP Apps * Fixing stories imports * Stripe app * Remove duplicate dialog * Remove duplicate dialog * Major locations cleanup, 10s of bug fixes and app-store improvements * Fix missing pieces * More fixes * Fix embed URL * Fix app toggles + number of active apps * Fix container padding on disabledBorder prop * Removes strict * more fixes * EventType Team page WIP * Fix embed * NIT * Add Darkmode gray color * V2 Shell WIP * Fix headings on shell V2 * Fix mobile layout with V2 shell * V2 create event type button * Checked Team Select * Hidden to happen on save - not on toggle * Team Attendee Select animation * Fix scheduling type and remove multi select label * Fix overflow on teams url * Revert console * Revert api * Fix Embed TS errors * Fix TS errors * Fix Eslint errors * Fix TS errors for UI * Fix ESLINT error * Fix TS errors * Add missing import * Fix CLI * Add a default placeholder * Remove hardcoded daily:integrations * Fix message for payment page * Revert api and console to main * Update README * Fix TS errors * Fix Lint warnings * Fix Tests * Fix conflict issues * Fix conflict issues Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com>
2022-08-25 21:48:50 -03:00
import { DailyLocationType } from "@calcom/app-store/locations";
import { userSelect } from "@calcom/prisma/selects";
2022-06-10 15:38:46 -03:00
type User = Prisma.UserGetPayload<typeof userSelect>;
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
type UsernameSlugLinkProps = {
users: {
id?: number;
username: string | null;
email?: string;
name?: string | null;
bio?: string | null;
avatar?: string | null;
theme?: string | null;
plan?: UserPlan;
away?: boolean;
verified?: boolean | null;
allowDynamicBooking?: boolean | null;
}[];
slug: string;
};
const user: User = {
theme: null,
credentials: [],
username: "john.doe",
timeZone: "",
bufferTime: 0,
availability: [],
id: 0,
startTime: 0,
endTime: 0,
selectedCalendars: [],
schedules: [],
defaultScheduleId: null,
locale: "en",
email: "john.doe@example.com",
name: "John doe",
avatar: "",
destinationCalendar: null,
plan: UserPlan.PRO,
hideBranding: true,
brandColor: "#797979",
darkBrandColor: "#efefef",
allowDynamicBooking: true,
};
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
const customInputs: EventTypeCustomInput[] = [];
const commons = {
isDynamic: true,
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
periodCountCalendarDays: true,
periodStartDate: null,
periodEndDate: null,
beforeEventBuffer: 0,
afterEventBuffer: 0,
periodType: PeriodType.UNLIMITED,
periodDays: null,
slotInterval: null,
AppStore CLI: Making video app creation a breeze with major cleanup of locations code throughout (#3825) * Fix breadcrumb colors * HorizontalTabs * Team List Item WIP * Horizontal Tabs * Cards * Remove team list item WIP * Login Page * Add welcome back i118n * EventType page work * Update EventType Icons * WIP Availability * Horizontal Tab Work * Add build command for in root * Update build DIr/command * Add Edit Button + change buttons to v2 * Availablitiy page * Fix IPAD * Make mobile look a little nicer * WIP bookingshell * Remove list items from breaking build * Add Embed ModalBox for routing forms * Mian bulk of Booking Page. * Few updates to components * Fix chormatic feedback * Add duplicate form support * Fix duplication logic * Change to feathericons everywhere and other fixes * Dont allow routes for fallback route * Fix banner * Fix Empty Screen * Text area + embded window fixes * Semi fix avatar * Fix all TS issues * Fix tests * Troubleshoot container + Active on count * Support routing using query params * Improve mobile * NITS * Fix padding on input * Support multiselect in router endpoint * Fix the issue where app goes in embed mode after viewing embed once * Fix icons * Add router url tests * Add Responses download and form toggling tests * Add required validation test * Change Icons everywhere * App typeform app * Improvements in cli * Starting to move event types settings to tabs * Begin migration to single page form * Single page tabs * Limits Page * Advanced tab * Add RHF to dependancies * Add typeform how-to-use page * Add typeform how-to-use page and screenshots * Most of advanced tab * Solved RHF mismtach * Build fixes * RHF conditionals fixes * Improved legibility * Fix TS error * Add missing image * Update CliApp.tsx * Major refactor/organisation into optional V2 UI * Portal EditLocationModal * Fix dialoug form * Update imports * Auto Animate + custom inputs WIP * Custom Inputs * WIP Apps * Fixing stories imports * Stripe app * Remove duplicate dialog * Remove duplicate dialog * Major locations cleanup, 10s of bug fixes and app-store improvements * Fix missing pieces * More fixes * Fix embed URL * Fix app toggles + number of active apps * Fix container padding on disabledBorder prop * Removes strict * more fixes * EventType Team page WIP * Fix embed * NIT * Add Darkmode gray color * V2 Shell WIP * Fix headings on shell V2 * Fix mobile layout with V2 shell * V2 create event type button * Checked Team Select * Hidden to happen on save - not on toggle * Team Attendee Select animation * Fix scheduling type and remove multi select label * Fix overflow on teams url * Revert console * Revert api * Fix Embed TS errors * Fix TS errors * Fix Eslint errors * Fix TS errors for UI * Fix ESLINT error * Fix TS errors * Add missing import * Fix CLI * Add a default placeholder * Remove hardcoded daily:integrations * Fix message for payment page * Revert api and console to main * Update README * Fix TS errors * Fix Lint warnings * Fix Tests * Fix conflict issues * Fix conflict issues Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com>
2022-08-25 21:48:50 -03:00
locations: [{ type: DailyLocationType }],
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
customInputs,
disableGuests: true,
minimumBookingNotice: 120,
schedule: null,
timeZone: null,
successRedirectUrl: "",
teamId: null,
scheduleId: null,
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
availability: [],
price: 0,
currency: "usd",
schedulingType: SchedulingType.COLLECTIVE,
seatsPerTimeSlot: null,
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
id: 0,
hideCalendarNotes: false,
recurringEvent: null,
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
destinationCalendar: null,
team: null,
requiresConfirmation: false,
hidden: false,
userId: 0,
Workflows (#3236) * build basic database structure and basic design * create simple workflow list * add editing dots to list * add mutation to create workflows * add createMutation on submit + redirect to editing page * redirect to edit page when clicking on row * add functionality to delete workflow * add timeUnit + input validation * add empty screen view * add time before it triggers to description * add multi select with checkboxes * remove getServerSideProps * set default time period to 24 * fetch eventypes and display in dropdown * add functionality to update workflows + many-to-many relationship * fix all checked event types * add SMS reminders * fix bug with trigger + relocate sms template * clean code * add model for unscheduled reminders * fix selected eventTypes * fixing value to show how many event types selected * fix plural of event types in select * add onDelete cascade for all relations * fix errors * add functionality to send SMS to specific number * fix type error for timeUnit * set default value for time unit + fix type issues * remove console.logs * fix error in checking if scheduled date is more than 1h in advance * fix build errors * add migration for workflows * add basic UI for editing workflow steps * add formSchema * improve functionality to update a step * remove console logs * fix issue with active event types * allow null value for time and timeUnit * sort steps asc step number * add action to workflow (frontend) * add phone number input for SMS to specific number * use PhoneInput for number input + input validation * improve invalid input for phone number * improve UI of phoneInput * Improve design and validation * fix undefined error * set default action when adding action * include all team event types * fix phone number input for editing steps * fix update muation to add steps * remove console logs * fix order of steps * functionality to delete steps * add trigger when event is cancelled * add custom email body * sms and email reminder updates * add custom emails * add custom email subject * send reminder email to all attendees * update migration * fix default value for time and timeUnit * save email reminders to database * clean code * add custom template to SMS actions * schedule emails with sendgrid * clean code * add workflow templates * keep custom template saved when changing templates * create reminder template for email * add dot at the end of sentace for email template * fix merge error * fix issue that template was not saved * include sending emails for when event is cancelled * fix bug that email was always sent * add templates to sms reminders * add info that sending sms to attendees won't trigger for already exisitng bookings * only schedule sms for attendees when smsReminderNumber exists * only schedule sms for attendees when smsReminderNumber exists * set scheduled of workflow reminder to false when longer than 72 hours * add cron for email scheduling + fixes for for sms an email scheduling * adjust step number when deleting a step * cast to boolean with !! * update cron job for email reminders * update sms template * send reminder email not to guests * remove sendTo from workflow reminder * fixes sending sms without name + removing sendTo everywhere * fix undefined name in sms template * set user name to undefined for sending sms to a specific number * fix singular and plural for time unit * set to edit mode when changing action and custom template is selected * delete reminders when booking cancelled or not active anymore * fix type errors * fix error that deleted reminders twice * create booking reminders for existing bookings when eventType is set active * improve email and sms templates * use BookingInfo type instead of calendarEvent for reminder emails * schedule emails for already existing bookings * add and remove reminders for new active event types and cancelled events * connect add action button with last step * fix step container width for mobile view * helper functions that return options for select * fix typo and remove comment * clean code * add/improve error messages for forms * fix typo * clean code * improve email template * clean code * fix missing prop * save reference id when scheduling reminder * fix step not added because of changed id for new steps * small fixes + code cleanup * code cleanup * show error message when number is invalid * fix typo * fix phone number input when location is already phone * set multi select checkbox to read only * change email scheduling in cron job from 7 days to 72 hours * show active event types in workflow list * fix trigger information for workflow list * improve layout for small screens in workflow list * remove optional from zod type for workflow name * order workflows by id * use link icon to show active event types * fix plural and add translation for showing nr of active eventtypes * fix text for sms reminder template * add reminders for added steps * remove optional for activeOn * improve reminder templates * improve design of custom input fields * set edit mode to false when phone number isn't needed anymore * set sendTo in workflow step only for SMS_NUMBER action * set email body and subject only when custom template * only delete reminders that belong to workflow steps * improve text for new event book trigger * move reminders folder to workflows * fix issue that save button was sometimes enabled in edit mode * fix form issues for send to * delete all scheduled reminders when workflow is deleted * use enum for method * fix imports for workflow methods * add missing import * fix edit mode * create reminders when event is confirmed * add reminderScheduler to reduce duplicate code * make workflow enterprise and pro only feature * move all files to /ee/ folder * move package.json change to /ee/ folder * add pro badge to shell * set to edit mode to true if email subject is missing when action changes * fix loading bug * add migration * fix old imports * don't schedule reminders for opt-ins * fix style of email body * code clean up * Update yarn.lock * fix isLoading for active on dropdown * update import for prisma Co-authored-by: Omar López <zomars@me.com> * update imports * remove console * use session to check if user has valid license * use defaultHandler * clean up code * Create db-staging-snapshot.yml * move LisenceRequired inside shell * update import for FormValues * fix phone input design * fix disabled save button for edit mode * squah all migration into a single one * use isAfter and isBefore instead of isBetween * import dayjs from @calcom * validate phone number for sms reminders when booking event * Allows auto approvals for crowdin Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com>
2022-07-13 21:10:45 -03:00
workflows: [],
users: [user],
metadata: {},
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
};
const min15Event = {
length: 15,
slug: "15",
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
title: "15min",
eventName: "Dynamic Collective 15min Event",
description: "Dynamic Collective 15min Event",
descriptionAsSafeHTML: "Dynamic Collective 15min Event",
position: 0,
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
...commons,
};
const min30Event = {
length: 30,
slug: "30",
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
title: "30min",
eventName: "Dynamic Collective 30min Event",
description: "Dynamic Collective 30min Event",
descriptionAsSafeHTML: "Dynamic Collective 30min Event",
position: 1,
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
...commons,
};
const min60Event = {
length: 60,
slug: "60",
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
title: "60min",
eventName: "Dynamic Collective 60min Event",
description: "Dynamic Collective 60min Event",
descriptionAsSafeHTML: "Dynamic Collective 60min Event",
position: 2,
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
...commons,
};
const defaultEvents = [min15Event, min30Event, min60Event];
export const getDynamicEventDescription = (dynamicUsernames: string[], slug: string): string => {
return `Book a ${slug} min event with ${dynamicUsernames.join(", ")}`;
};
export const getDynamicEventName = (dynamicNames: string[], slug: string): string => {
const lastUser = dynamicNames.pop();
return `Dynamic Collective ${slug} min event with ${dynamicNames.join(", ")} & ${lastUser}`;
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
};
export const getDefaultEvent = (slug: string) => {
const event = defaultEvents.find((obj) => {
return obj.slug === slug;
});
return event || min15Event;
};
export const getGroupName = (usernameList: string[]): string => {
return usernameList.join(", ");
};
export const getUsernameSlugLink = ({ users, slug }: UsernameSlugLinkProps): string => {
let slugLink = ``;
if (users.length > 1) {
const combinedUsername = users.map((user) => user.username).join("+");
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
slugLink = `/${combinedUsername}/${slug}`;
} else {
slugLink = `/${users[0].username}/${slug}`;
}
return slugLink;
};
Feature/booking page refactor (#3035) * Extracted UI related logic on the DatePicker, stripped out all logic * wip * fixed small regression due to merge * Fix alignment of the chevrons * Added isToday dot, added onMonthChange so we can fetch this month slots * Added includedDates to inverse excludedDates * removed trpcState * Improvements to the state * All params are now dynamic * This builds the flat map so not all paths block on every new build * Added requiresConfirmation * Correctly take into account getFilteredTimes to make the calendar function * Rewritten team availability, seems to work * Circumvent i18n flicker by showing the loader instead * 'You can remove this code. Its not being used now' - Hariom * Nailed a persistent little bug, new Date() caused the current day to flicker on and off * TS fixes * Fix some eventType details in AvailableTimes * '5 / 6 Seats Available' instead of '6 / Seats Available' * More type fixes * Removed unrelated merge artifact * Use WEBAPP_URL instead of hardcoded * Next round of TS fixes * I believe this was mistyped * Temporarily disabled rescheduling 'this is when you originally scheduled', so removed dep * Sorting some dead code * This page has a lot of red, not all related to this PR * A PR to your PR (#3067) * Cleanup * Cleanup * Uses zod to parse params * Type fixes * Fixes ISR * E2E fixes * Disabled dynamic bookings until post v1.7 * More test fixes * Fixed border position (transparent border) to prevent dot from jumping - and possibly fix spacing * Disabled style nitpicks * Delete useSlots.ts Removed early design artifact * Unlock DatePicker locale * Adds mini spinner to DatePicker Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com>
2022-06-15 17:54:31 -03:00
const arrayCast = (value: unknown | unknown[]) => {
return Array.isArray(value) ? value : value ? [value] : [];
};
export const getUsernameList = (users: string | string[] | undefined): string[] => {
// Multiple users can come in case of a team round-robin booking and in that case dynamic link won't be a user.
// So, even though this code handles even if individual user is dynamic link, that isn't a possibility right now.
Feature/booking page refactor (#3035) * Extracted UI related logic on the DatePicker, stripped out all logic * wip * fixed small regression due to merge * Fix alignment of the chevrons * Added isToday dot, added onMonthChange so we can fetch this month slots * Added includedDates to inverse excludedDates * removed trpcState * Improvements to the state * All params are now dynamic * This builds the flat map so not all paths block on every new build * Added requiresConfirmation * Correctly take into account getFilteredTimes to make the calendar function * Rewritten team availability, seems to work * Circumvent i18n flicker by showing the loader instead * 'You can remove this code. Its not being used now' - Hariom * Nailed a persistent little bug, new Date() caused the current day to flicker on and off * TS fixes * Fix some eventType details in AvailableTimes * '5 / 6 Seats Available' instead of '6 / Seats Available' * More type fixes * Removed unrelated merge artifact * Use WEBAPP_URL instead of hardcoded * Next round of TS fixes * I believe this was mistyped * Temporarily disabled rescheduling 'this is when you originally scheduled', so removed dep * Sorting some dead code * This page has a lot of red, not all related to this PR * A PR to your PR (#3067) * Cleanup * Cleanup * Uses zod to parse params * Type fixes * Fixes ISR * E2E fixes * Disabled dynamic bookings until post v1.7 * More test fixes * Fixed border position (transparent border) to prevent dot from jumping - and possibly fix spacing * Disabled style nitpicks * Delete useSlots.ts Removed early design artifact * Unlock DatePicker locale * Adds mini spinner to DatePicker Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com>
2022-06-15 17:54:31 -03:00
users = arrayCast(users);
const allUsers = users.map((user) =>
user
.toLowerCase()
.replace(/( |%20)/g, "+")
.split("+")
);
return Array.prototype.concat(...allUsers);
dynamic group links (#2239) * --init * added default event types * updated lib path * updated group link design * fixed collective description * added default minimum booking notice * Accept multi user query for a default event type * check types * check types --WIP * check types still --WIP * --WIP * --WIP * fixed single user type not working * check fix * --import path fix * functional collective eventtype page * fixed check type * minor fixes and --WIP * typefix * custominput in defaultevent fix * added booking page compatibility for dynamic group links * added /book compatibility for dynamic group links * checktype fix --WIP * checktype fix * Success page compatibility added * added migrations * added dynamic group booking slug to booking creation * reschedule and database fix * daily integration * daily integration --locationtype fetch * fixed reschedule * added index to key parameter in eventtype list * fix + added after last group slug * added user setting option for dynamic booking * changed defaultEvents location based on recent changes * updated default event name in updated import * disallow booking when one in group disallows it * fixed setting checkbox association * cleanup * udded better error handling for disabled dynamic group bookings * cleanup * added tooltip to allow dynamic setting and enable by default * Update yarn.lock * Fix: Embed Fixes, UI configuration PRO Only, Tests (#2341) * #2325 Followup (#2369) * Adds initial MDX implementation for App Store pages * Adds endpoint to serve app store static files * Replaces zoom icon with dynamic-served one * Fixes zoom icon * Makes Slider reusable * Adds gray-matter for MDX * Adds zoom screenshots * Update yarn.lock * Slider improvements * WIP * Update TrendingAppsSlider.tsx * WIP * Adds MS teams screenshots * Adds stripe screenshots * Cleanup * Update index.ts * WIP * Cleanup * Cleanup * Adds jitsi screenshot * Adds Google meet screenshots * Adds office 365 calendar screenshots * Adds google calendar screenshots * Follow #2325 Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * requested changes * further requested changes * more changes * type fix * fixed prisma/client import path * added e2e test * test-fix * E2E fixes * Fixes circular dependency * Fixed paid bookings seeder * Added missing imports * requested changes * added username slugs as part of event description * updated event description Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-04-06 14:20:30 -03:00
};
export default defaultEvents;