feat: Added admin-api page (#14890)

* added admin-api page

* i18n
This commit is contained in:
Peer Richelsen
2024-05-08 10:15:20 +00:00
committed by GitHub
parent f0e59c2331
commit 5ca10d1e83
9 changed files with 86 additions and 7 deletions
@@ -0,0 +1,9 @@
import AdminAPIView from "@calcom/features/ee/organizations/pages/settings/admin-api";
import type { CalPageWrapper } from "@components/PageWrapper";
import PageWrapper from "@components/PageWrapper";
const Page = AdminAPIView as CalPageWrapper;
Page.PageWrapper = PageWrapper;
export default Page;
@@ -2248,9 +2248,9 @@
"unified_billing_description": "Fügen Sie eine einzige Kreditkarte hinzu, um alle Abos Ihres Teams zu bezahlen",
"advanced_managed_events": "Erweiterte verwaltete Ereignistypen",
"advanced_managed_events_description": "Fügen Sie eine einzige Kreditkarte hinzu, um alle Abonnements Ihres Teams zu bezahlen",
"enterprise_description": "Rüsten Sie auf Enterprise auf, um Ihre Organisation zu erstellen",
"enterprise_description": "Upgraden Sie um Ihre Organisation zu erstellen",
"create_your_org": "Erstellen Sie Ihre Organisation",
"create_your_org_description": "Rüsten Sie auf Enterprise auf und erhalten Sie eine Subdomain, einheitliche Abrechnung, Insights, umfangreiches Whitelabeling und mehr",
"create_your_org_description": "Upgraden und erhalten Sie eine Subdomain, einheitliche Abrechnungen, Insights, umfangreiches Whitelabeling und mehr",
"other_payment_app_enabled": "Sie können nur eine Zahlungs-App pro Ereignistyp aktivieren",
"admin_delete_organization_description": "<ul><li>Teams, die Mitglieder dieser Organisation sind, werden ebenfalls zusammen mit ihren Ereignistypen gelöscht</li><li>Benutzer, die Teil der Organisation waren, werden nicht gelöscht und ihre Ereignistypen bleiben ebenfalls intakt.</li><li>Benutzernamen würden geändert werden, um zu ermöglichen, dass sie außerhalb der Organisation existieren können</li></ul>",
"admin_delete_organization_title": "{{organizationName}} löschen?",
@@ -624,6 +624,7 @@
"number_selected": "{{count}} selected",
"owner": "Owner",
"admin": "Admin",
"admin_api": "Admin API",
"administrator_user": "Administrator user",
"lets_create_first_administrator_user": "Let's create the first administrator user.",
"admin_user_created": "Administrator user setup",
@@ -2252,7 +2253,8 @@
"advanced_managed_events_description": "Add a single credit card to pay for all your team's subscriptions",
"enterprise_description": "Upgrade to Enterprise to create your Organization",
"create_your_org": "Create your Organization",
"create_your_org_description": "Upgrade to Enterprise and receive a subdomain, unified billing, Insights, extensive whitelabeling and more",
"create_your_org_description": "Upgrade to Organizations and receive a subdomain, unified billing, Insights, extensive whitelabeling and more",
"create_your_enterprise_description": "Upgrade to Enterprise and get access to Active Directory Sync, SCIM Automatic User provisioning, Cal.ai Voice Agents, Admin APIs and more!",
"other_payment_app_enabled": "You can only enable one payment app per event type",
"admin_delete_organization_description": "<ul><li>Teams that are member of this organization will also be deleted along with their event-types</li><li>Users that were part of the organization will not be deleted and their event-types will also remain intact.</li><li>Usernames would be changed to allow them to exist outside the organization</li></ul>",
"admin_delete_organization_title": "Delete {{organizationName}}?",
@@ -2250,7 +2250,7 @@
"advanced_managed_events_description": "Ajoutez une seule carte de crédit pour payer tous les abonnements de votre équipe",
"enterprise_description": "Passez en Entreprise pour créer votre organisation",
"create_your_org": "Créer votre organisation",
"create_your_org_description": "Passez en Entreprise et recevez un sous-domaine, une facturation unifiée, des statistiques, un marquage blanc extensif et plus encore",
"create_your_org_description": "Passez en Organizations et recevez un sous-domaine, une facturation unifiée, des statistiques, un marquage blanc extensif et plus encore",
"other_payment_app_enabled": "Vous ne pouvez activer qu'une seule application de paiement par type d'événement",
"admin_delete_organization_description": "<ul><li>Les équipes qui sont membres de cette organisation seront également supprimées, ainsi que leurs types d'événements</li><li>Les utilisateurs qui faisaient partie de l'organisation ne seront pas supprimés et leurs types d'événements resteront intacts.</li><li>Les noms d'utilisateur seront modifiés pour leur permettre d'exister en dehors de l'organisation</li></ul>",
"admin_delete_organization_title": "Supprimer {{organizationName}} ?",
@@ -2250,7 +2250,7 @@
"advanced_managed_events_description": "Indica una singola carta di credito per pagare tutti gli abbonamenti del tuo team",
"enterprise_description": "Passa a Enterprise per creare la tua organizzazione",
"create_your_org": "Crea la tua organizzazione",
"create_your_org_description": "Passa a Enterprise per avere sottodominio, fatturazione unificata, approfondimenti, personalizzazione completa e altro ancora",
"create_your_org_description": "Passa a Organizations per avere sottodominio, fatturazione unificata, approfondimenti, personalizzazione completa e altro ancora",
"other_payment_app_enabled": "Puoi attivare solo un'app di pagamento per ciascun tipo di evento",
"admin_delete_organization_description": "<ul><li>Verranno eliminati anche i team che sono membri di questa organizzazione, insieme ai rispettivi tipi di evento</li><li>Gli utenti che facevano parte dell'organizzazione non verranno eliminati e anche i loro tipi di evento rimarranno inalterati.</li><li>I nomi utente saranno modificati in modo che possano esistere al di fuori dell'organizzazione</li></ul>",
"admin_delete_organization_title": "Eliminare {{organizationName}}?",
@@ -2209,7 +2209,7 @@
"advanced_managed_events_description": "Adicione um único cartão de crédito para pagar todas as assinaturas da sua equipe",
"enterprise_description": "Atualize para Enterprise para criar sua organização",
"create_your_org": "Crie sua organização",
"create_your_org_description": "Atualize para Enterprise e receba um subdomínio, faturamento unificado, insights, whitelabeling abrangente e muito mais",
"create_your_org_description": "Atualize para Organizations e receba um subdomínio, faturamento unificado, insights, whitelabeling abrangente e muito mais",
"other_payment_app_enabled": "Você só pode ativar um aplicativo de pagamento por tipo de evento",
"admin_delete_organization_description": "<ul><li>As equipes que são membros desta organização também serão excluídas junto com seus tipos de eventos</li><li> Os usuários que faziam parte da organização não serão excluídos e seus tipos de eventos também permanecerão intactos.</li><li> Os nomes de usuário seriam alterados para que existam fora da organização</li></ul>",
"admin_delete_organization_title": "Excluir {{organizationName}} ?",
@@ -2250,7 +2250,7 @@
"advanced_managed_events_description": "Adicione um único cartão de crédito para pagar todas as subscrições da sua equipa",
"enterprise_description": "Atualize para Enterprise para criar a sua Organização",
"create_your_org": "Crie a sua Organização",
"create_your_org_description": "Atualize para Enterprise e receba um subdomínio, faturação unificada, Insights, personalização abrangente da imagem corporativa e muito mais",
"create_your_org_description": "Atualize para Organizations e receba um subdomínio, faturação unificada, Insights, personalização abrangente da imagem corporativa e muito mais",
"other_payment_app_enabled": "Só pode ativar uma aplicação de pagamento por tipo de evento",
"admin_delete_organization_description": "<ul><li>As equipas que são membros desta organização também serão eliminadas, em conjunto com os respetivos tipos de evento</li><li>Utilizadores que faziam parte da organização não serão eliminados e os seus tipos de evento também permanecerão intactos.</li><li>Os nomes de utilizador serão alterados para permitir que possam existir fora da organização</li></ul>",
"admin_delete_organization_title": "Eliminar {{organizationName}}?",
@@ -0,0 +1,64 @@
"use client";
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout";
import { UpgradeTip } from "@calcom/features/tips";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Icon, Meta, ButtonGroup } from "@calcom/ui";
const AdminAPIViewWrapper = () => {
const { t } = useLocale();
const features = [
{
icon: <Icon name="terminal" className="h-5 w-5 text-pink-500" />,
title: t("admin_api"),
description: t("leverage_our_api"),
},
{
icon: <Icon name="folder" className="h-5 w-5 text-red-500" />,
title: `SCIM & ${t("directory_sync")}`,
description: t("directory_sync_description"),
},
{
icon: <Icon name="sparkles" className="h-5 w-5 text-blue-500" />,
title: "Cal.ai",
description: t("use_cal_ai_to_make_call_description"),
},
];
return (
<LicenseRequired>
<Meta
title={`${t("admin")} ${t("api_reference")}`}
description={t("leverage_our_api")}
borderInShellHeader={false}
/>
<div className="mt-8">
<UpgradeTip
plan="enterprise"
title={t("enterprise_license")}
description={t("create_your_enterprise_description")}
features={features}
background="/tips/enterprise"
buttons={
<div className="space-y-2 rtl:space-x-reverse sm:space-x-2">
<ButtonGroup>
<Button color="primary" href="https://i.cal.com/sales/enterprise" target="_blank">
{t("contact_sales")}
</Button>
<Button color="minimal" href="https://cal.com/enterprise" target="_blank">
{t("learn_more")}
</Button>
</ButtonGroup>
</div>
}>
<>Create Org</>
</UpgradeTip>
</div>
</LicenseRequired>
);
};
AdminAPIViewWrapper.getLayout = getLayout;
export default AdminAPIViewWrapper;
@@ -99,6 +99,10 @@ const tabs: VerticalTabItemProps[] = [
name: "directory_sync",
href: "/settings/organizations/dsync",
},
{
name: "admin_api",
href: "/settings/organizations/admin-api",
},
],
},
{