From da5c45146243ca1e2cee94d4dc1b6437ce5eb5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Popin?= Date: Thu, 4 Apr 2024 19:23:32 +0200 Subject: [PATCH] Improve look --- front/components/poke/subscriptions/table.tsx | 334 +++++++++--------- 1 file changed, 161 insertions(+), 173 deletions(-) diff --git a/front/components/poke/subscriptions/table.tsx b/front/components/poke/subscriptions/table.tsx index e9941b5ae1f7..0927fec46602 100644 --- a/front/components/poke/subscriptions/table.tsx +++ b/front/components/poke/subscriptions/table.tsx @@ -1,4 +1,5 @@ import { + CloudArrowDownIcon, ConfluenceLogo, GithubLogo, GoogleLogo, @@ -65,184 +66,171 @@ export function ActiveSubscriptionTable({ const activePlan = subscription.plan; return (
-
-
-
-
-

Active Subscription:

- - - - Plan Name - {subscription.plan.name} - - - Plan Code - {subscription.plan.code} - - - Is in Trial? - - {subscription.trialing ? "✅" : "❌"} - - - - Stripe Subscription Id - - {subscription.stripeSubscriptionId ? ( - - {subscription.stripeSubscriptionId} - - ) : ( - "No subscription id" - )} - - - - Stripe Customer Id - - {subscription.stripeCustomerId ? ( - - {subscription.stripeCustomerId} - - ) : ( - "No customer id" - )} - - - - Start Date - - {subscription.startDate - ? format(subscription.startDate, "yyyy-MM-dd") - : "/"} - - - - End Date - - {subscription.endDate - ? format(subscription.endDate, "yyyy-MM-dd") - : "/"} - - - - -
-
-
-
-

Plan limitations:

- - - - SlackBot allowed - - {activePlan.limits.assistant.isSlackBotAllowed - ? "✅" - : "❌"} - - - - Websites allowed - - {activePlan.limits.connections.isWebCrawlerAllowed - ? "✅" - : "❌"} - - - - Connections allowed - -
- {activePlan.limits.connections.isSlackAllowed ? ( - - ) : null} - {activePlan.limits.connections.isGoogleDriveAllowed ? ( - - ) : null} - {activePlan.limits.connections.isGithubAllowed ? ( - - ) : null} - {activePlan.limits.connections.isNotionAllowed ? ( - - ) : null} - {activePlan.limits.connections.isIntercomAllowed ? ( - - ) : null} - {activePlan.limits.connections.isConfluenceAllowed ? ( - - ) : null} -
-
-
+
+
+

Active Subscription:

+ + + + Plan Name + {subscription.plan.name} + + + Plan Code + {subscription.plan.code} + + + Is in Trial? + + {subscription.trialing ? "✅" : "❌"} + + + + Stripe Subscription Id + + {subscription.stripeSubscriptionId ? ( + + {subscription.stripeSubscriptionId} + + ) : ( + "No subscription id" + )} + + + + Stripe Customer Id + + {subscription.stripeCustomerId ? ( + + {subscription.stripeCustomerId} + + ) : ( + "No customer id" + )} + + + + Start Date + + {subscription.startDate + ? format(subscription.startDate, "yyyy-MM-dd") + : "/"} + + + + End Date + + {subscription.endDate + ? format(subscription.endDate, "yyyy-MM-dd") + : "/"} + + + + +
+
+

Plan limitations:

+ + + + SlackBot allowed + + {activePlan.limits.assistant.isSlackBotAllowed ? "✅" : "❌"} + + + + Connections allowed + +
+ {activePlan.limits.connections.isSlackAllowed ? ( + + ) : null} + {activePlan.limits.connections.isGoogleDriveAllowed ? ( + + ) : null} + {activePlan.limits.connections.isGithubAllowed ? ( + + ) : null} + {activePlan.limits.connections.isNotionAllowed ? ( + + ) : null} + {activePlan.limits.connections.isIntercomAllowed ? ( + + ) : null} + {activePlan.limits.connections.isConfluenceAllowed ? ( + + ) : null} + {activePlan.limits.connections.isWebCrawlerAllowed ? ( + + ) : null} +
+
+
- - Max number of users - - {activePlan.limits.users.maxUsers === -1 - ? "unlimited" - : activePlan.limits.users.maxUsers} - - + + Max number of users + + {activePlan.limits.users.maxUsers === -1 + ? "unlimited" + : activePlan.limits.users.maxUsers} + + - - Max number of messages - - {activePlan.limits.assistant.maxMessages === -1 - ? "unlimited" - : `${activePlan.limits.assistant.maxMessages} / ${activePlan.limits.assistant.maxMessagesTimeframe}`} - - + + Max number of messages + + {activePlan.limits.assistant.maxMessages === -1 + ? "unlimited" + : `${activePlan.limits.assistant.maxMessages} / ${activePlan.limits.assistant.maxMessagesTimeframe}`} + + - - Max number of data sources - - {activePlan.limits.dataSources.count === -1 - ? "unlimited" - : activePlan.limits.dataSources.count} - - + + Max number of data sources + + {activePlan.limits.dataSources.count === -1 + ? "unlimited" + : activePlan.limits.dataSources.count} + + - - - Max number of documents in data sources - - - {activePlan.limits.dataSources.documents.count === -1 - ? "unlimited" - : activePlan.limits.dataSources.documents.count} - - + + + Max number of documents in data sources + + + {activePlan.limits.dataSources.documents.count === -1 + ? "unlimited" + : activePlan.limits.dataSources.documents.count} + + - - Max documents size - - {activePlan.limits.dataSources.documents.sizeMb === -1 - ? "unlimited" - : `${activePlan.limits.dataSources.documents.sizeMb}Mb`} - - -
-
-
-
+ + Max documents size + + {activePlan.limits.dataSources.documents.sizeMb === -1 + ? "unlimited" + : `${activePlan.limits.dataSources.documents.sizeMb}Mb`} + + +
+