From 83b6672260d0b35faa16ccd397432ff5d856397b Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 19 Aug 2025 10:40:15 +0300 Subject: [PATCH 01/13] wip --- .../organization/components/SeatsInfoCards.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/SeatsInfoCards.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/SeatsInfoCards.tsx index 0545e565307..53ee9e88422 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/SeatsInfoCards.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/SeatsInfoCards.tsx @@ -16,8 +16,10 @@ export const SeatsInfoCards = () => { return (
- -

+

+ +
+

Seats Remaining {remainingSeats} @@ -25,8 +27,10 @@ export const SeatsInfoCards = () => {

- -

+

+ +
+

Seats Capacity {inviteQuota}

From ebef6a9b1d2658710c61e42ad91344bcf2e40756 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 26 Aug 2025 13:43:34 +0300 Subject: [PATCH 02/13] update org settings layout --- .../dashboard/settings/organization/Organization.tsx | 2 -- .../organization/components/AccessEmailDomain.tsx | 4 ++-- .../organization/components/CustomDomain.tsx | 11 +++++------ .../settings/organization/components/OrgName.tsx | 4 ++-- .../components/OrganizationDetailsCard.tsx | 12 ++++++------ .../organization/components/OrganizationIcon.tsx | 4 ++-- .../organization/components/SeatsInfoCards.tsx | 11 +++++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/Organization.tsx b/apps/web/app/(org)/dashboard/settings/organization/Organization.tsx index 21b0d2a19b9..183e7bfb0cc 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/Organization.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/Organization.tsx @@ -13,7 +13,6 @@ import { manageBilling } from "@/actions/organization/manage-billing"; import { useDashboardContext } from "@/app/(org)/dashboard/Contexts"; import { BillingCard } from "./components/BillingCard"; -import CapSettingsCard from "./components/CapSettingsCard"; import { InviteDialog } from "./components/InviteDialog"; import { MembersCard } from "./components/MembersCard"; import { OrganizationDetailsCard } from "./components/OrganizationDetailsCard"; @@ -63,7 +62,6 @@ export const Organization = () => {
-
{ }; return ( -
+

@@ -41,7 +41,7 @@ export const AccessEmailDomain = () => {

-
+
setConfirmOpen(false)} /> -
+

@@ -136,9 +136,8 @@ export function CustomDomain() { ) : null}

-

- Set up a custom domain for your organization's shared caps and make - it unique. +

+ Set up a custom domain for your organization's shared caps.

-

- Set up a custom domain for your organization's shared caps. -

-
{showUpgradeModal && ( diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index f352064d03d..2b3d53484aa 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -17,6 +17,16 @@ interface VerifyStepProps { const POLL_INTERVAL = 5000; +const TXTDomainValueHandler = (record: DomainVerification, domain: string) => { + if (!record.domain) return "@"; + if (record.domain === domain) return "@"; + const suffix = `.${domain}`; + if (record.domain.endsWith(suffix)) { + return record.domain.replace(suffix, "") || "@"; + } + return record.domain; +}; + const VerifyStep = ({ domain, domainConfig, @@ -88,6 +98,7 @@ const VerifyStep = ({ const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; + console.log(aRecordConfigured, "a record configured"); console.log(showARecord, "show A record const"); console.log(domainConfig, "domain config"); @@ -117,16 +128,6 @@ const VerifyStep = ({ }; }, [activeOrganization?.organization.customDomain, isVerified]); - const TXTDomainValueHandler = (record: DomainVerification) => { - if (!record.domain) return "@"; - if (record.domain === domain) return "@"; - const suffix = `.${domain}`; - if (record.domain.endsWith(suffix)) { - return record.domain.replace(suffix, "") || "@"; - } - return record.domain; - }; - return (
diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/OrgName.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/OrgName.tsx index 8990584c01d..952afff1507 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/OrgName.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/OrgName.tsx @@ -43,6 +43,7 @@ const OrgName = () => {
{ organization icon. -
+
diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/OrganizationIcon.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/OrganizationIcon.tsx index 3ff5e5a0183..9a9e85aadbc 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/OrganizationIcon.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/OrganizationIcon.tsx @@ -66,8 +66,8 @@ export const OrganizationIcon = () => {
= ({ width: previewIconSize, height: previewIconSize, }} - className="overflow-hidden relative flex-shrink-0 rounded-md" + className="flex overflow-hidden relative flex-shrink-0 justify-center items-center rounded-md" > {previewUrl && ( File preview @@ -236,7 +236,7 @@ export const FileInput: React.FC = ({
) : ( - -
- -
-
+ orgCustomDomain && + !isVerified && ( + +
+ +
+
+ ) )} {orgCustomDomain && ( From c40e8918298b6e74b5b4fabc7d5a660bac8e673d Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:53:48 +0300 Subject: [PATCH 08/13] Update CustomDomain.tsx --- .../organization/components/CustomDomain.tsx | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx index f6b449ab3bf..6ccbb7e99c0 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx @@ -189,24 +189,22 @@ export function CustomDomain() {
- + }} + > + Setup + + )}
From d55f7656d683edd5a2f514d263b2f33414cf3163 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:01:13 +0300 Subject: [PATCH 09/13] remove un-necessary ui --- .../organization/components/CustomDomain.tsx | 43 ------------------- .../CustomDomainDialog/VerifyStep.tsx | 1 + 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx index 6ccbb7e99c0..04e3c05b92e 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx @@ -8,7 +8,6 @@ import { import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useMutation } from "@tanstack/react-query"; import clsx from "clsx"; -import { CheckCircle, XCircle } from "lucide-react"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { toast } from "sonner"; @@ -98,48 +97,6 @@ export function CustomDomain() { Set up a custom domain for your organization's shared caps.

- {/* {process.env.NODE_ENV === "development" && ( -
- -

- Custom domains are not available in development mode -

-
- )} */} - {isVerified && orgCustomDomain ? ( - -
setConfirmOpen(true)} - className="flex gap-2 items-center hover:bg-green-800 transition-colors cursor-pointer px-3 py-0.5 bg-green-900 rounded-full w-fit" - > - -

- {orgCustomDomain} - - verified - -

-
-
- ) : orgCustomDomain ? ( - -
setConfirmOpen(true)} - className="flex gap-2 items-center px-3 py-0.5 cursor-pointer hover:bg-red-800 transition-colors bg-red-900 rounded-full w-fit" - > - -

- {orgCustomDomain} - - not verified - -

-
-
- ) : null}
diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 2b3d53484aa..2648218ab86 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -98,6 +98,7 @@ const VerifyStep = ({ const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; + console.log(recommendedAValues, "recommended A values"); console.log(aRecordConfigured, "a record configured"); console.log(showARecord, "show A record const"); console.log(domainConfig, "domain config"); From 91fbbf43d55a40644d507d8659584e4f518cc803 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:07:37 +0300 Subject: [PATCH 10/13] A record --- .../dashboard/settings/organization/components/CustomDomain.tsx | 2 -- .../organization/components/CustomDomainDialog/VerifyStep.tsx | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx index 04e3c05b92e..99609acf012 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomain.tsx @@ -151,8 +151,6 @@ export function CustomDomain() { type="submit" size="sm" className="min-w-fit" - spinner={removeDomainMutation.isPending} - disabled={removeDomainMutation.isPending} variant="dark" onClick={(e) => { e.preventDefault(); diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 2648218ab86..1d82dc0d7da 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -94,7 +94,7 @@ const VerifyStep = ({ recommendedCnames.length > 0 && recommendedCnames.some((rec) => currentCnames.includes(rec.value)); const showARecord = - recommendedAValues.length > 0 && !aRecordConfigured && !isSubdomain(domain); + recommendedAValues.length > 0 && aRecordConfigured && !isSubdomain(domain); const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; From 3a10172c5e1450332f4237fd28cf3311e75fe574 Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:20:20 +0300 Subject: [PATCH 11/13] check A record test --- .../organization/components/CustomDomainDialog/VerifyStep.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 1d82dc0d7da..2648218ab86 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -94,7 +94,7 @@ const VerifyStep = ({ recommendedCnames.length > 0 && recommendedCnames.some((rec) => currentCnames.includes(rec.value)); const showARecord = - recommendedAValues.length > 0 && aRecordConfigured && !isSubdomain(domain); + recommendedAValues.length > 0 && !aRecordConfigured && !isSubdomain(domain); const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; From 3cb02448524cdf7caa3133432106630204d373bf Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:24:06 +0300 Subject: [PATCH 12/13] cleanup --- .../components/CustomDomainDialog/VerifyStep.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index 2648218ab86..bb829e56ba7 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -98,11 +98,6 @@ const VerifyStep = ({ const showCNAMERecord = hasRecommendedCNAME && !cnameConfigured; const showTXTRecord = hasTXTVerification && !isVerified; - console.log(recommendedAValues, "recommended A values"); - console.log(aRecordConfigured, "a record configured"); - console.log(showARecord, "show A record const"); - console.log(domainConfig, "domain config"); - const handleCopy = async (text: string, fieldId: string) => { try { await navigator.clipboard.writeText(text); From 11d5ec6ef2d4388732e4db79668624dec660d88e Mon Sep 17 00:00:00 2001 From: ameer2468 <33054370+ameer2468@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:37:32 +0300 Subject: [PATCH 13/13] Update VerifyStep.tsx --- .../organization/components/CustomDomainDialog/VerifyStep.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx index bb829e56ba7..a28796aba6e 100644 --- a/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx +++ b/apps/web/app/(org)/dashboard/settings/organization/components/CustomDomainDialog/VerifyStep.tsx @@ -174,7 +174,7 @@ const VerifyStep = ({
- {TXTDomainValueHandler(record)} + {TXTDomainValueHandler(record, domain)}