Skip to content

Commit

Permalink
prod (#4633)
Browse files Browse the repository at this point in the history
* fix isSelectedProp for settings/calendars switches (#4589)

* Hotfix/ Embed Tabs (#4593)

* Fixing installed app navigation (#4595)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Embed width increase to allow preview to work in desktop mode (#4547)

* fixed settings teams rewrite

* fixed 404 signup page (#4603)

* New Crowdin translations by Github Action (#4599)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Fix event type navigation (#4565)

* Fix event type navigation

* Fix dropdown focus styling

* Fix border radius

* Remove stray classname

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>

* typo in /more (#4610)

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Olusanya Timothy <48022904+seunexplicit@users.noreply.github.com>
Co-authored-by: Grace Nshokano <grace.devolop@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>

* Return 401 on null keys (#4616)

* Fix wrong team link (#4620)

* Fixes #4380 (#4615)

* fix: positioning of arrows (#4478)

Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Fixes #4606 - Add guests cannot be removed (#4609)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* feat: animate event list while reordering (#4611)

* fix: prevent waiting while invalidating

* feat: add auto animate

* static postion is added to animation container because auto animate adding
a inline style of position relative, which breaks arrow buttons
position.

* fix: wait until query get cancelled

* fix: set querydata correctly

Co-authored-by: Alex van Andel <me@alexvanandel.com>

Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Afzal Sayed <14029371+afzalsayed96@users.noreply.github.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Olusanya Timothy <48022904+seunexplicit@users.noreply.github.com>
Co-authored-by: Grace Nshokano <grace.devolop@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Nafees Nazik <84864519+G3root@users.noreply.github.com>
  • Loading branch information
20 people authored Sep 20, 2022
1 parent ee3e1a9 commit 4ea0be8
Show file tree
Hide file tree
Showing 16 changed files with 126 additions and 114 deletions.
108 changes: 52 additions & 56 deletions apps/web/components/booking/pages/BookingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -734,62 +734,58 @@ const BookingPage = ({
)}
</div>
))}
{!eventType.disableGuests && (
{!eventType.disableGuests && guestToggle && (
<div className="mb-4">
{guestToggle && (
<div>
<label
htmlFor="guests"
className="mb-1 block text-sm font-medium text-gray-700 dark:text-white">
{t("guests")}
</label>
{!disableInput && (
<Controller
control={bookingForm.control}
name="guests"
render={({ field: { onChange, value } }) => (
<ReactMultiEmail
className="relative"
placeholder={
<span className="dark:text-darkgray-600">guest@example.com</span>
}
emails={value}
onChange={onChange}
getLabel={(
email: string,
index: number,
removeEmail: (index: number) => void
) => {
return (
<div data-tag key={index} className="cursor-pointer">
{email}
{!disableInput && (
<span data-tag-handle onClick={() => removeEmail(index)}>
×
</span>
)}
</div>
);
}}
/>
)}
/>
)}
{/* Custom code when guest emails should not be editable */}
{disableInput && guestListEmails && guestListEmails.length > 0 && (
<div data-tag className="react-multi-email">
{/* // @TODO: user owners are appearing as guest here when should be only user input */}
{guestListEmails.map((email, index) => {
return (
<div key={index} className="cursor-pointer">
<span data-tag>{email}</span>
</div>
);
})}
</div>
)}
</div>
)}
<div>
<label
htmlFor="guests"
className="mb-1 block text-sm font-medium text-gray-700 dark:text-white">
{t("guests")}
</label>
{!disableInput && (
<Controller
control={bookingForm.control}
name="guests"
render={({ field: { onChange, value } }) => (
<ReactMultiEmail
className="relative"
placeholder={<span className="dark:text-darkgray-600">guest@example.com</span>}
emails={value}
onChange={onChange}
getLabel={(
email: string,
index: number,
removeEmail: (index: number) => void
) => {
return (
<div data-tag key={index} className="cursor-pointer">
{email}
{!disableInput && (
<span data-tag-handle onClick={() => removeEmail(index)}>
×
</span>
)}
</div>
);
}}
/>
)}
/>
)}
{/* Custom code when guest emails should not be editable */}
{disableInput && guestListEmails && guestListEmails.length > 0 && (
<div data-tag className="react-multi-email">
{/* // @TODO: user owners are appearing as guest here when should be only user input */}
{guestListEmails.map((email, index) => {
return (
<div key={index} className="cursor-pointer">
<span data-tag>{email}</span>
</div>
);
})}
</div>
)}
</div>
</div>
)}
{isSmsReminderNumberNeeded && selectedLocationType !== LocationType.Phone && (
Expand Down Expand Up @@ -845,7 +841,7 @@ const BookingPage = ({
</div>

<div className="flex justify-end space-x-2 rtl:space-x-reverse">
{!guestToggle && (
{!eventType.disableGuests && !guestToggle && (
<Button
type="button"
color="secondary"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/v2/eventtype/EventTypeSingleLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function EventTypeSingleLayout({
if (team)
navigation.splice(2, 0, {
name: "scheduling_type",
href: `team`,
href: `/event-types/${eventType.id}?tabName=team`,
icon: Icon.FiUsers,
info: eventType.schedulingType === "COLLECTIVE" ? "collective" : "round_robin",
});
Expand Down
14 changes: 13 additions & 1 deletion apps/web/pages/v2/availability/[schedule].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { availabilityAsString } from "@calcom/lib/availability";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { stringOrNumber } from "@calcom/prisma/zod-utils";
import { trpc } from "@calcom/trpc/react";
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
import type { Schedule as ScheduleType } from "@calcom/types/schedule";
import { Icon } from "@calcom/ui";
import TimezoneSelect from "@calcom/ui/form/TimezoneSelect";
Expand Down Expand Up @@ -39,6 +40,7 @@ export default function Availability({ schedule }: { schedule: number }) {
const { t, i18n } = useLocale();
const router = useRouter();
const utils = trpc.useContext();
const me = useMeQuery();

const { data, isLoading } = trpc.useQuery(["viewer.availability.schedule", { scheduleId: schedule }]);

Expand Down Expand Up @@ -132,7 +134,17 @@ export default function Availability({ schedule }: { schedule: number }) {
<h3 className="mb-5 text-base font-medium leading-6 text-gray-900">
{t("change_start_end")}
</h3>
<Schedule control={control} name="schedule" />
{typeof me.data?.weekStart === "string" && (
<Schedule
control={control}
name="schedule"
weekStart={
["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].indexOf(
me.data?.weekStart
) as 0 | 1 | 2 | 3 | 4 | 5 | 6
}
/>
)}
</div>
</div>
<div className="min-w-40 col-span-3 space-y-2 lg:col-span-1">
Expand Down
37 changes: 17 additions & 20 deletions apps/web/pages/v2/event-types/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import { UserPlan } from "@prisma/client";
import Head from "next/head";
import Link from "next/link";
Expand Down Expand Up @@ -82,6 +83,7 @@ const MemoizedItem = React.memo(Item);
export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeListProps): JSX.Element => {
const { t } = useLocale();
const router = useRouter();
const [parent] = useAutoAnimate<HTMLUListElement>();
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
const [deleteDialogTypeId, setDeleteDialogTypeId] = useState(0);
const utils = trpc.useContext();
Expand All @@ -91,8 +93,8 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
await utils.cancelQuery(["viewer.eventTypes"]);
await utils.invalidateQueries(["viewer.eventTypes"]);
},
onSettled: async () => {
await utils.invalidateQueries(["viewer.eventTypes"]);
onSettled: () => {
utils.invalidateQueries(["viewer.eventTypes"]);
},
});

Expand All @@ -107,7 +109,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
},
});

function moveEventType(index: number, increment: 1 | -1) {
async function moveEventType(index: number, increment: 1 | -1) {
const newList = [...types];

const type = types[index];
Expand All @@ -117,24 +119,19 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
newList[index + increment] = type;
}

utils.cancelQuery(["viewer.eventTypes"]);
utils.setQueryData(["viewer.eventTypes"], (data) => {
// tRPC is very strict with the return signature...
if (!data)
return {
eventTypeGroups: [],
profiles: [],
viewer: { canAddEvents: true, plan: UserPlan.PRO },
};
return {
...data,
eventTypesGroups: [
...data.eventTypeGroups.slice(0, groupIndex),
await utils.cancelQuery(["viewer.eventTypes"]);

const previousValue = utils.getQueryData(["viewer.eventTypes"]);
if (previousValue) {
utils.setQueryData(["viewer.eventTypes"], {
...previousValue,
eventTypeGroups: [
...previousValue.eventTypeGroups.slice(0, groupIndex),
{ ...group, eventTypes: newList },
...data.eventTypeGroups.slice(groupIndex + 1),
...previousValue.eventTypeGroups.slice(groupIndex + 1),
],
};
});
});
}

mutation.mutate({
ids: newList.map((type) => type.id),
Expand Down Expand Up @@ -201,7 +198,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
const lastItem = types[types.length - 1];
return (
<div className="mb-16 flex overflow-hidden rounded-md border border-gray-200 bg-white">
<ul className="w-full divide-y divide-neutral-200" data-testid="event-types">
<ul ref={parent} className="!static w-full divide-y divide-neutral-200" data-testid="event-types">
{types.map((type, index) => {
const embedLink = `${group.profile.slug}/${type.slug}`;
const calLink = `${CAL_URL}/${embedLink}`;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@
"delete_team": "Delete Team",
"team_members": "Team members",
"more": "More",
"more_page_footer": "We view the mobile application as an extension of the web application. If you are performing any complication actions, please refer back to the web application.",
"more_page_footer": "We view the mobile application as an extension of the web application. If you are performing any complicated actions, please refer back to the web application.",
"workflow_example_1": "Send SMS reminder 24 hours before event starts to attendee",
"workflow_example_2": "Send custom SMS when event is rescheduled to attendee",
"workflow_example_3": "Send custom email when new event is booked to host",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/static/locales/it/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
"api_key": "Chiave API",
"test_api_key": "Prova chiave API",
"test_passed": "Test superato!",
"test_failed": "Test non superato",
"test_failed": "Prova non superata",
"provide_api_key": "Fornisci chiave API",
"api_key_modal_subtitle": "Le chiavi API consentono di effettuare chiamate API per il proprio account.",
"api_keys_subtitle": "Genera chiavi API da usare per accedere al tuo account.",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/public/static/locales/pl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,8 @@
"workflow_deleted_successfully": "Przepływ pracy usunięty pomyślnie",
"how_long_before": "Ile czasu przed rozpoczęciem wydarzenia?",
"day_timeUnit": "dni",
"hour_timeUnit": "godziny",
"minute_timeUnit": "minuty",
"hour_timeUnit": "godz.",
"minute_timeUnit": "min",
"new_workflow_heading": "Utwórz swój pierwszy przepływ pracy",
"new_workflow_description": "Przepływy pracy umożliwiają automatyzację wysyłania przypomnień i powiadomień.",
"active_on": "Aktywny dnia",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/static/locales/pt-BR/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
"add_new_event_type": "Adicionar um novo tipo de evento",
"new_event_type_to_book_description": "Crie um novo tipo de evento para as pessoas agendarem horários.",
"length": "Comprimento",
"minimum_booking_notice": "Aviso de reserva mínima",
"minimum_booking_notice": "Aviso mínimo",
"slot_interval": "Intervalos de tempo",
"slot_interval_default": "Usar a duração do evento (padrão)",
"delete_event_type_description": "Você tem certeza que deseja apagar este evento? Qualquer pessoa que você tenha compartilhado o link não conseguirá mais utilizá-lo para novos agendamentos.",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/public/static/locales/pt/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
"add_new_event_type": "Adicionar um novo tipo de evento",
"new_event_type_to_book_description": "Crie um novo tipo de evento para as pessoas reservarem uma hora.",
"length": "Comprimento",
"minimum_booking_notice": "Aviso mínimo",
"minimum_booking_notice": "Aviso de mínimo",
"slot_interval": "Intervalos do horário",
"slot_interval_default": "Usar duração do evento (por omissão)",
"delete_event_type_description": "De certeza que quer eliminar este tipo de evento? Qualquer pessoa com quem tenha partilhado esta ligação deixará de poder fazer reservas através da respectiva ligação.",
Expand Down Expand Up @@ -850,7 +850,7 @@
"edit_booking": "Editar reserva",
"reschedule_booking": "Reagendar reserva",
"former_time": "Horário anterior",
"confirmation_page_gif": "Gif para a página de confirmação",
"confirmation_page_gif": "Adicionar um GIF à página de confirmação",
"search": "Pesquisar",
"impersonate": "Representar",
"user_impersonation_heading": "Representação de utilizador",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/public/static/locales/ru/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@
"edit_booking": "Редактировать бронирование",
"reschedule_booking": "Перенести бронирование",
"former_time": "Прежнее время",
"confirmation_page_gif": "Добавьте GIF на страницу подтверждения",
"confirmation_page_gif": "Добавить GIF на страницу подтверждения",
"search": "Искать",
"impersonate": "Войти от имени пользователя",
"user_impersonation_heading": "Вход от имени пользователя",
Expand All @@ -877,7 +877,7 @@
"choose_ways_put_cal_site": "Выберите способ размещения Cal на сайте.",
"setting_up_zapier": "Настройка интеграции с Zapier",
"generate_api_key": "Сгенерировать ключ API",
"generate_api_key_description": "Сгенерировать ключ API для использования на Cal.com в",
"generate_api_key_description": "Сгенерируйте ключ API, чтобы использовать его в Cal.com, по адресу",
"your_unique_api_key": "Ваш уникальный ключ API",
"copy_safe_api_key": "Скопируйте этот ключ API и сохраните его в надежном месте. Если ключ потеряется, вам придется создать новый.",
"zapier_setup_instructions": "<0>Войдите в свой аккаунт Zapier и создайте новый Zap.</0><1>Выберите в качестве приложения-триггера Cal.com. Также выберите событие-триггер. </1><2>Выберите свою учетную запись и введите уникальный ключ API.</2><3>Проверьте триггер.</3><4>Готово!</4>",
Expand Down
8 changes: 4 additions & 4 deletions apps/web/public/static/locales/sv/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
"cannot_cancel_booking": "Du kan inte avboka denna bokning",
"reschedule_instead": "Du kan även boka om den.",
"event_is_in_the_past": "Händelsen har redan ägt rum",
"cancelling_event_recurring": "Händelsen är en instans av en återkommande händelse.",
"cancelling_event_recurring": "Händelsen är i en återkommande händelse.",
"cancelling_all_recurring": "Dessa är alla kvarvarande instanser i den återkommande händelsen.",
"error_with_status_code_occured": "Ett fel med statuskoden {{status}} inträffade.",
"booking_already_cancelled": "Denna bokning har redan avbokats",
Expand Down Expand Up @@ -679,7 +679,7 @@
"add_new_event_type": "Lägg till en ny händelsetyp",
"new_event_type_to_book_description": "Skapa en ny händelsetyp som personer kan boka tider med.",
"length": "Längd",
"minimum_booking_notice": "Senaste tid för att underrätta",
"minimum_booking_notice": "Senaste tid för att boka",
"slot_interval": "Tid mellan bokningar",
"slot_interval_default": "Använd händelsens längd (standard)",
"delete_event_type_description": "Är du säker på att du vill ta bort denna händelsetyp? Alla som du har delat den här länken med kommer inte längre att kunna boka med den.",
Expand Down Expand Up @@ -850,7 +850,7 @@
"edit_booking": "Redigera bokning",
"reschedule_booking": "Boka om bokning",
"former_time": "Tidigare tid",
"confirmation_page_gif": "Lägg till GIF för bekräftelsesida",
"confirmation_page_gif": "Lägg till GIF bekräftelsesida",
"search": "Sök",
"impersonate": "Imitera",
"user_impersonation_heading": "Användarpersonifiering",
Expand Down Expand Up @@ -1016,7 +1016,7 @@
"event_date_workflow": "Händelsedatum",
"event_time_workflow": "Händelsetid",
"location_workflow": "Plats",
"additional_notes_workflow": "Extra anteckningar",
"additional_notes_workflow": "Ytterligare inmatning",
"app_upgrade_description": "För att kunna använda den här funktionen måste du uppgradera till ett Pro-konto.",
"invalid_number": "Ogiltigt telefonnummer",
"navigate": "Navigera",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/public/static/locales/zh-CN/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
"add_new_event_type": "新增活动类型",
"new_event_type_to_book_description": "新建一个活动类型以让他人预约。",
"length": "时长",
"minimum_booking_notice": "最小预约通知",
"minimum_booking_notice": "最小预约通知提前时间",
"slot_interval": "时间段间隔",
"slot_interval_default": "使用活动时长 (默认)",
"delete_event_type_description": "您确定要删除此活动类型吗? 任何曾使用该链接的人都将无法再使用它和您预约。",
Expand Down
6 changes: 3 additions & 3 deletions apps/web/public/static/locales/zh-TW/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@
"cannot_cancel_booking": "無法取消這次的預約",
"reschedule_instead": "您也可以重新預約。",
"event_is_in_the_past": "活動時間已過",
"cancelling_event_recurring": "此活動為定期活動的一個例項",
"cancelling_all_recurring": "這些是定期活動中的所有剩餘例項",
"cancelling_event_recurring": "此活動為定期活動的一個實例",
"cancelling_all_recurring": "這些是定期活動中的所有剩餘實例",
"error_with_status_code_occured": "發生代號是 {{status}} 的錯誤。",
"booking_already_cancelled": "預約已經取消",
"go_back_home": "回到首頁",
Expand Down Expand Up @@ -1016,7 +1016,7 @@
"event_date_workflow": "活動日期",
"event_time_workflow": "活動時間",
"location_workflow": "地點",
"additional_notes_workflow": "額外提醒",
"additional_notes_workflow": "備註",
"app_upgrade_description": "您必須升級至專業版帳號才能使用此功能。",
"invalid_number": "電話號碼無效",
"navigate": "導覽",
Expand Down
Loading

1 comment on commit 4ea0be8

@vercel
Copy link

@vercel vercel bot commented on 4ea0be8 Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cal – ./

app.cal.com
cal-cal.vercel.app
app.calendso.com
cal-git-production-cal.vercel.app

Please sign in to comment.