From e9ea0fcc206d181b8b57a031004d74d7c0f49ba9 Mon Sep 17 00:00:00 2001
From: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Date: Sat, 9 Dec 2023 14:32:14 +0530
Subject: [PATCH] feat: add cal video logo whitelabel for organization (#12616)
---
apps/web/pages/video/[uid].tsx | 35 +++++++++++----
apps/web/public/static/locales/ar/common.json | 2 +-
apps/web/public/static/locales/cs/common.json | 2 +-
apps/web/public/static/locales/de/common.json | 2 +-
apps/web/public/static/locales/en/common.json | 7 ++-
apps/web/public/static/locales/es/common.json | 2 +-
apps/web/public/static/locales/fr/common.json | 2 +-
apps/web/public/static/locales/he/common.json | 2 +-
apps/web/public/static/locales/it/common.json | 2 +-
apps/web/public/static/locales/ja/common.json | 2 +-
apps/web/public/static/locales/ko/common.json | 2 +-
apps/web/public/static/locales/nl/common.json | 2 +-
apps/web/public/static/locales/pl/common.json | 2 +-
.../public/static/locales/pt-BR/common.json | 2 +-
apps/web/public/static/locales/pt/common.json | 2 +-
apps/web/public/static/locales/ro/common.json | 2 +-
apps/web/public/static/locales/ru/common.json | 2 +-
apps/web/public/static/locales/sr/common.json | 2 +-
apps/web/public/static/locales/sv/common.json | 2 +-
apps/web/public/static/locales/tr/common.json | 2 +-
apps/web/public/static/locales/uk/common.json | 2 +-
apps/web/public/static/locales/vi/common.json | 2 +-
.../public/static/locales/zh-CN/common.json | 2 +-
.../public/static/locales/zh-TW/common.json | 2 +-
.../components/AddNewTeamsForm.tsx | 2 +-
.../pages/settings/appearance.tsx | 45 ++++++++++++++++++-
.../migration.sql | 2 +
packages/prisma/schema.prisma | 1 +
.../viewer/organizations/update.handler.ts | 1 +
.../viewer/organizations/update.schema.ts | 5 +++
.../image-uploader/ImageUploader.tsx | 8 ++++
31 files changed, 115 insertions(+), 35 deletions(-)
create mode 100644 packages/prisma/migrations/20231206191034_add_cal_video_logo/migration.sql
diff --git a/apps/web/pages/video/[uid].tsx b/apps/web/pages/video/[uid].tsx
index 5661ec9b62a0bc..4a5bf88768cdb7 100644
--- a/apps/web/pages/video/[uid].tsx
+++ b/apps/web/pages/video/[uid].tsx
@@ -76,15 +76,27 @@ export default function JoinCall(props: JoinCallPageProps) {
-
+ {booking?.user?.organization?.calVideoLogo ? (
+
+ ) : (
+
+ )}
>
@@ -260,6 +272,11 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
timeZone: true,
name: true,
email: true,
+ organization: {
+ select: {
+ calVideoLogo: true,
+ },
+ },
},
},
references: {
diff --git a/apps/web/public/static/locales/ar/common.json b/apps/web/public/static/locales/ar/common.json
index 676a3e8df5f161..5eb20d94a9bcfc 100644
--- a/apps/web/public/static/locales/ar/common.json
+++ b/apps/web/public/static/locales/ar/common.json
@@ -1994,7 +1994,7 @@
"select_time": "اختيار الوقت",
"select_date": "اختيار التاريخ",
"see_all_available_times": "رؤية كل الأوقات المتاحة",
- "org_team_names_example": "مثال، فريق التسويق",
+ "org_team_names_example_1": "مثال، فريق التسويق",
"org_team_names_example_2": "مثال، فريق المبيعات",
"org_team_names_example_3": "مثال، فريق التصميم",
"org_team_names_example_4": "مثال، الفريق الهندسي",
diff --git a/apps/web/public/static/locales/cs/common.json b/apps/web/public/static/locales/cs/common.json
index 07d8d5c07cea98..0c5585febc24ad 100644
--- a/apps/web/public/static/locales/cs/common.json
+++ b/apps/web/public/static/locales/cs/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Vyberte čas",
"select_date": "Vyberte datum",
"see_all_available_times": "Zobrazit všechny dostupné časy",
- "org_team_names_example": "Např. marketingový tým",
+ "org_team_names_example_1": "Např. marketingový tým",
"org_team_names_example_2": "Např. obchodní tým",
"org_team_names_example_3": "Např. designérský tým",
"org_team_names_example_4": "Např. inženýrský tým",
diff --git a/apps/web/public/static/locales/de/common.json b/apps/web/public/static/locales/de/common.json
index 5efbe3a4ca0a99..1b6af6f267ac6c 100644
--- a/apps/web/public/static/locales/de/common.json
+++ b/apps/web/public/static/locales/de/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Zeit auswählen",
"select_date": "Datum auswählen",
"see_all_available_times": "Alle verfügbaren Zeiten ansehen",
- "org_team_names_example": "z.B. Marketing-Team",
+ "org_team_names_example_1": "z.B. Marketing-Team",
"org_team_names_example_2": "z.B. Vertriebsteam",
"org_team_names_example_3": "z. B. Design-Team",
"org_team_names_example_4": "z.B. Engineering-Team",
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json
index 3b97b5db3cdb9a..083aa572e2c83b 100644
--- a/apps/web/public/static/locales/en/common.json
+++ b/apps/web/public/static/locales/en/common.json
@@ -2025,7 +2025,7 @@
"select_time": "Select Time",
"select_date": "Select Date",
"see_all_available_times": "See all available times",
- "org_team_names_example": "e.g. Marketing Team",
+ "org_team_names_example_1": "e.g. Marketing Team",
"org_team_names_example_2": "e.g. Sales Team",
"org_team_names_example_3": "e.g. Design Team",
"org_team_names_example_4": "e.g. Engineering Team",
@@ -2041,6 +2041,9 @@
"description_requires_booker_email_verification": "To ensure booker's email verification before scheduling events",
"requires_confirmation_mandatory": "Text messages can only be sent to attendees when event type requires confirmation.",
"organizations": "Organizations",
+ "upload_cal_video_logo":"Upload Cal Video Logo",
+ "update_cal_video_logo":"Update Cal Video Logo",
+ "cal_video_logo_upload_instruction":"To ensure your logo is visible against Cal video's dark background, please upload a light-colored image in PNG or SVG format to maintain transparency.",
"org_admin_other_teams": "Other teams",
"org_admin_other_teams_description": "Here you can see teams inside your organization that you are not part of. You can add yourself to them if needed.",
"no_other_teams_found": "No other teams found",
@@ -2088,7 +2091,7 @@
"oAuth": "OAuth",
"recently_added":"Recently added",
"connect_all_calendars":"Connect all your calendars",
- "connect_all_calendars_description":"{{appName}} reads availability from all your existing calendars.",
+ "connect_all_calendars_description":"{{appName}} reads availability from all your existing calendars.",
"workflow_automation":"Workflow automation",
"workflow_automation_description":"Personalise your scheduling experience with workflows",
"scheduling_for_your_team":"Workflow automation",
diff --git a/apps/web/public/static/locales/es/common.json b/apps/web/public/static/locales/es/common.json
index d856a2927718d4..cac305a728e576 100644
--- a/apps/web/public/static/locales/es/common.json
+++ b/apps/web/public/static/locales/es/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Seleccione la hora",
"select_date": "Seleccione la fecha",
"see_all_available_times": "Ver todas las horas disponibles",
- "org_team_names_example": "ej. Equipo de marketing",
+ "org_team_names_example_1": "ej. Equipo de marketing",
"org_team_names_example_2": "ej. Equipo de ventas",
"org_team_names_example_3": "ej. Equipo de diseño",
"org_team_names_example_4": "ej. Equipo de ingeniería",
diff --git a/apps/web/public/static/locales/fr/common.json b/apps/web/public/static/locales/fr/common.json
index 460bf391dc6c00..6e4ce41e05ae55 100644
--- a/apps/web/public/static/locales/fr/common.json
+++ b/apps/web/public/static/locales/fr/common.json
@@ -2000,7 +2000,7 @@
"select_time": "Sélectionner un créneau",
"select_date": "Sélectionner une date",
"see_all_available_times": "Voir tous les créneaux disponibles",
- "org_team_names_example": "p. ex. Équipe marketing",
+ "org_team_names_example_1": "p. ex. Équipe marketing",
"org_team_names_example_2": "p. ex. Équipe de vente",
"org_team_names_example_3": "p. ex. Équipe de design",
"org_team_names_example_4": "p. ex. Équipe d'ingénierie",
diff --git a/apps/web/public/static/locales/he/common.json b/apps/web/public/static/locales/he/common.json
index 6bb5b7ac5eadc2..f16710266b24b6 100644
--- a/apps/web/public/static/locales/he/common.json
+++ b/apps/web/public/static/locales/he/common.json
@@ -1994,7 +1994,7 @@
"select_time": "בחירת שעה",
"select_date": "בחירת תאריך",
"see_all_available_times": "לצפייה בכל המועדים הפנויים",
- "org_team_names_example": "לדוגמה, מחלקת שיווק",
+ "org_team_names_example_1": "לדוגמה, מחלקת שיווק",
"org_team_names_example_2": "לדוגמה, מחלקת מכירות",
"org_team_names_example_3": "לדוגמה, מחלקת עיצוב",
"org_team_names_example_4": "לדוגמה, מחלקת הנדסה",
diff --git a/apps/web/public/static/locales/it/common.json b/apps/web/public/static/locales/it/common.json
index 19afe8b917d224..24453157307cac 100644
--- a/apps/web/public/static/locales/it/common.json
+++ b/apps/web/public/static/locales/it/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Seleziona l'ora",
"select_date": "Seleziona la data",
"see_all_available_times": "Vedi tutti gli orari disponibili",
- "org_team_names_example": "ad es., team di marketing",
+ "org_team_names_example_1": "ad es., team di marketing",
"org_team_names_example_2": "ad es., team vendite",
"org_team_names_example_3": "ad es., team di progettazione",
"org_team_names_example_4": "ad es., team di ingegneria",
diff --git a/apps/web/public/static/locales/ja/common.json b/apps/web/public/static/locales/ja/common.json
index a42c7074a44f14..3870f594a7e7f2 100644
--- a/apps/web/public/static/locales/ja/common.json
+++ b/apps/web/public/static/locales/ja/common.json
@@ -1994,7 +1994,7 @@
"select_time": "時間帯を選ぶ",
"select_date": "日付を選ぶ",
"see_all_available_times": "出席できる時間帯をすべて表示",
- "org_team_names_example": "例:マーケティングチーム",
+ "org_team_names_example_1": "例:マーケティングチーム",
"org_team_names_example_2": "例:営業チーム",
"org_team_names_example_3": "例:デザインチーム",
"org_team_names_example_4": "例:エンジニアリングチーム",
diff --git a/apps/web/public/static/locales/ko/common.json b/apps/web/public/static/locales/ko/common.json
index a8b1a62d1e9eaf..9490ac7d3a63a1 100644
--- a/apps/web/public/static/locales/ko/common.json
+++ b/apps/web/public/static/locales/ko/common.json
@@ -1994,7 +1994,7 @@
"select_time": "시간 선택",
"select_date": "날짜 선택",
"see_all_available_times": "모든 사용 가능한 시간 보기",
- "org_team_names_example": "예: 마케팅 팀",
+ "org_team_names_example_1": "예: 마케팅 팀",
"org_team_names_example_2": "예: 세일즈 팀",
"org_team_names_example_3": "예: 디자인 팀",
"org_team_names_example_4": "예: 엔지니어링 팀",
diff --git a/apps/web/public/static/locales/nl/common.json b/apps/web/public/static/locales/nl/common.json
index 300997f9dfc251..f2589a59868ffb 100644
--- a/apps/web/public/static/locales/nl/common.json
+++ b/apps/web/public/static/locales/nl/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Tijd selecteren",
"select_date": "Datum selecteren",
"see_all_available_times": "Bekijk alle beschikbare tijden",
- "org_team_names_example": "bijvoorbeeld Marketingteam",
+ "org_team_names_example_1": "bijvoorbeeld Marketingteam",
"org_team_names_example_2": "bijvoorbeeld Verkoopteam",
"org_team_names_example_3": "bijvoorbeeld Ontwerpteam",
"org_team_names_example_4": "bijvoorbeeld Engineeringteam",
diff --git a/apps/web/public/static/locales/pl/common.json b/apps/web/public/static/locales/pl/common.json
index 49432272831c6e..0a79faaf337cee 100644
--- a/apps/web/public/static/locales/pl/common.json
+++ b/apps/web/public/static/locales/pl/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Wybierz godzinę",
"select_date": "Wybierz datę",
"see_all_available_times": "Zobacz wszystkie dostępne godziny",
- "org_team_names_example": "np. zespół marketingowy",
+ "org_team_names_example_1": "np. zespół marketingowy",
"org_team_names_example_2": "np. zespół ds. sprzedaży",
"org_team_names_example_3": "np. zespół projektowy",
"org_team_names_example_4": "np. zespół ds. inżynierii",
diff --git a/apps/web/public/static/locales/pt-BR/common.json b/apps/web/public/static/locales/pt-BR/common.json
index 4b4de9ecf22457..ce157feaf30d1b 100644
--- a/apps/web/public/static/locales/pt-BR/common.json
+++ b/apps/web/public/static/locales/pt-BR/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Selecione o horário",
"select_date": "Selecione a data",
"see_all_available_times": "Veja todos os horários disponíveis",
- "org_team_names_example": "ex.: Time de Marketing",
+ "org_team_names_example_1": "ex.: Time de Marketing",
"org_team_names_example_2": "ex: Time de Vendas",
"org_team_names_example_3": "ex: Time de Design",
"org_team_names_example_4": "ex: Time de Engenharia",
diff --git a/apps/web/public/static/locales/pt/common.json b/apps/web/public/static/locales/pt/common.json
index 8efce907b392dc..1d09947a117cdf 100644
--- a/apps/web/public/static/locales/pt/common.json
+++ b/apps/web/public/static/locales/pt/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Selecionar horário",
"select_date": "Selecionar data",
"see_all_available_times": "Ver todos os horários disponíveis",
- "org_team_names_example": "Por exemplo, Equipa de Marketing",
+ "org_team_names_example_1": "Por exemplo, Equipa de Marketing",
"org_team_names_example_2": "Por exemplo, Equipa de Vendas",
"org_team_names_example_3": "Por exemplo, Equipa de Design",
"org_team_names_example_4": "Por exemplo, Equipa de Engenharia",
diff --git a/apps/web/public/static/locales/ro/common.json b/apps/web/public/static/locales/ro/common.json
index ca48e6c368fdba..c205ec2ddea9c0 100644
--- a/apps/web/public/static/locales/ro/common.json
+++ b/apps/web/public/static/locales/ro/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Selectați ora",
"select_date": "Selectați data",
"see_all_available_times": "Vedeți toate orele disponibile",
- "org_team_names_example": "de ex. echipa de marketing",
+ "org_team_names_example_1": "de ex. echipa de marketing",
"org_team_names_example_2": "de ex. echipa de vânzări",
"org_team_names_example_3": "de ex. echipa de design",
"org_team_names_example_4": "de ex. echipa de inginerie",
diff --git a/apps/web/public/static/locales/ru/common.json b/apps/web/public/static/locales/ru/common.json
index 2da6be2e1454f7..61388ad6c7966d 100644
--- a/apps/web/public/static/locales/ru/common.json
+++ b/apps/web/public/static/locales/ru/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Выбрать время",
"select_date": "Выбрать дату",
"see_all_available_times": "Посмотреть все доступные интервалы времени",
- "org_team_names_example": "например, команда по маркетингу",
+ "org_team_names_example_1": "например, команда по маркетингу",
"org_team_names_example_2": "например, Отдел продаж",
"org_team_names_example_3": "например, отдел дизайна",
"org_team_names_example_4": "например, технический отдел",
diff --git a/apps/web/public/static/locales/sr/common.json b/apps/web/public/static/locales/sr/common.json
index 543ddaeaf7f16f..c9b8268133562c 100644
--- a/apps/web/public/static/locales/sr/common.json
+++ b/apps/web/public/static/locales/sr/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Izaberite vreme",
"select_date": "Izaberite datum",
"see_all_available_times": "Pogledajte sva dostupna vremena",
- "org_team_names_example": "npr. Marketing tim",
+ "org_team_names_example_1": "npr. Marketing tim",
"org_team_names_example_2": "npr. Prodajni tim",
"org_team_names_example_3": "npr. Dizajnerski tim",
"org_team_names_example_4": "npr. Inženjerski tim",
diff --git a/apps/web/public/static/locales/sv/common.json b/apps/web/public/static/locales/sv/common.json
index fcc2acaab11e07..c004bef3e4ca48 100644
--- a/apps/web/public/static/locales/sv/common.json
+++ b/apps/web/public/static/locales/sv/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Välj tid",
"select_date": "Välj datum",
"see_all_available_times": "Se alla tillgängliga tider",
- "org_team_names_example": "t.ex. marknadsföringsteam",
+ "org_team_names_example_1": "t.ex. marknadsföringsteam",
"org_team_names_example_2": "t.ex. säljteam",
"org_team_names_example_3": "t.ex. designteam",
"org_team_names_example_4": "t.ex. ingenjörsteam",
diff --git a/apps/web/public/static/locales/tr/common.json b/apps/web/public/static/locales/tr/common.json
index f82f854d0748ef..bf47846103b37f 100644
--- a/apps/web/public/static/locales/tr/common.json
+++ b/apps/web/public/static/locales/tr/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Saati Seçin",
"select_date": "Tarihi Seçin",
"see_all_available_times": "Tüm müsait saatleri görün",
- "org_team_names_example": "Örneğin. Pazarlama ekibi",
+ "org_team_names_example_1": "Örneğin. Pazarlama ekibi",
"org_team_names_example_2": "Örn. Satış Ekibi",
"org_team_names_example_3": "Örn. Tasarım Ekibi",
"org_team_names_example_4": "Örn. Mühendislik Ekibi",
diff --git a/apps/web/public/static/locales/uk/common.json b/apps/web/public/static/locales/uk/common.json
index 13e68e93ed7cf4..c9959c849aa6ee 100644
--- a/apps/web/public/static/locales/uk/common.json
+++ b/apps/web/public/static/locales/uk/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Виберіть час",
"select_date": "Виберіть дату",
"see_all_available_times": "Переглянути доступні часові проміжки",
- "org_team_names_example": "напр. команда маркетингу",
+ "org_team_names_example_1": "напр. команда маркетингу",
"org_team_names_example_2": "напр. відділ продажів",
"org_team_names_example_3": "напр. дизайнерський відділ",
"org_team_names_example_4": "e.g. інженерний відділ",
diff --git a/apps/web/public/static/locales/vi/common.json b/apps/web/public/static/locales/vi/common.json
index b4497764c7c1cd..dbe2ec6d0ed714 100644
--- a/apps/web/public/static/locales/vi/common.json
+++ b/apps/web/public/static/locales/vi/common.json
@@ -1994,7 +1994,7 @@
"select_time": "Chọn thời gian",
"select_date": "Chọn ngày",
"see_all_available_times": "Xem tất cả những thời gian trống",
- "org_team_names_example": "ví dụ Nhóm Tiếp thị",
+ "org_team_names_example_1": "ví dụ Nhóm Tiếp thị",
"org_team_names_example_2": "ví dụ Nhóm Kinh doanh",
"org_team_names_example_3": "ví dụ Nhóm Thiết kế",
"org_team_names_example_4": "ví dụ Nhóm Kỹ thuật",
diff --git a/apps/web/public/static/locales/zh-CN/common.json b/apps/web/public/static/locales/zh-CN/common.json
index 27447095071e40..a0b74eda9f0312 100644
--- a/apps/web/public/static/locales/zh-CN/common.json
+++ b/apps/web/public/static/locales/zh-CN/common.json
@@ -1995,7 +1995,7 @@
"select_time": "选择时间",
"select_date": "选择日期",
"see_all_available_times": "查看所有可预约时间",
- "org_team_names_example": "例如,营销团队",
+ "org_team_names_example_1": "例如,营销团队",
"org_team_names_example_2": "例如,销售团队",
"org_team_names_example_3": "例如,设计团队",
"org_team_names_example_4": "例如,工程团队",
diff --git a/apps/web/public/static/locales/zh-TW/common.json b/apps/web/public/static/locales/zh-TW/common.json
index d128313c178f4e..8e6fad982b847d 100644
--- a/apps/web/public/static/locales/zh-TW/common.json
+++ b/apps/web/public/static/locales/zh-TW/common.json
@@ -1994,7 +1994,7 @@
"select_time": "選取時間",
"select_date": "選取日期",
"see_all_available_times": "查看所有可預約時段",
- "org_team_names_example": "例如行銷團隊",
+ "org_team_names_example_1": "例如行銷團隊",
"org_team_names_example_2": "例如銷售團隊",
"org_team_names_example_3": "例如設計團隊",
"org_team_names_example_4": "例如工程團隊",
diff --git a/packages/features/ee/organizations/components/AddNewTeamsForm.tsx b/packages/features/ee/organizations/components/AddNewTeamsForm.tsx
index 0a12b701c881b6..6df4bb97c31373 100644
--- a/packages/features/ee/organizations/components/AddNewTeamsForm.tsx
+++ b/packages/features/ee/organizations/components/AddNewTeamsForm.tsx
@@ -110,7 +110,7 @@ export const AddNewTeamsForm = () => {
onChange={(e) => handleInputChange(index, e)}
addOnClassname="bg-transparent p-0 border-l-0"
className={index > 0 ? "mb-2" : ""}
- placeholder={t(`org_team_names_example_${index + 1}`) || t("org_team_names_example")}
+ placeholder={t(`org_team_names_example_${index + 1}`) || t("org_team_names_example_1")}
addOnSuffix={
index > 0 && (
{isAdminOrOwner ? (
+
+
+
}
+ size="lg"
+ />
+
+
+ {
+ mutation.mutate({
+ calVideoLogo: newLogo,
+ });
+ }}
+ disabled={mutation.isLoading}
+ imageSrc={currentOrg?.calVideoLogo ?? undefined}
+ uploadInstruction={t("cal_video_logo_upload_instruction")}
+ triggerButtonColor={currentOrg?.calVideoLogo ? "secondary" : "primary"}
+ />
+ {currentOrg?.calVideoLogo && (
+
+ )}
+
+
+
+