Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update invoice-related terminology and improve layout in invoice settings components

Kiran K27ed07552be9
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-button.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-button.tsx
index f8fb6507c3..c050f286bb 100644
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-button.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-button.tsx
@@ -12,7 +12,7 @@ export function UpdateInvoiceInfoButton() {
<UpdateInvoiceInfoModal />
<Button
type="button"
- text="Invoice info"
+ text="Invoice settings"
variant="secondary"
onClick={() => setShowUpdateInvoiceInfoModal(true)}
/>
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-modal.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-modal.tsx
index b9e4702853..2bca97272d 100644
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-modal.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/settings/payouts/update-invoice-info-modal.tsx
@@ -70,7 +70,7 @@ function UpdateInvoiceInfoModalInner({
updatePartnerInvoiceSettingsAction,
{
onSuccess: async () => {
- toast.success("Invoice info updated successfully!");
+ toast.success("Invoice settings updated successfully!");
setShowUpdateInvoiceInfoModal(false);
mutatePrefix("/api/partner-profile");
},
@@ -118,7 +118,6 @@ function UpdateInvoiceInfoModalInner({
Business address
</label>
<TextareaAutosize
- required
className="mt-2 block w-full rounded-md border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"
minRows={4}
{...register("address")}
diff --git a/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx b/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx
index de5b6656a9..a2af54e3bc 100644
--- a/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/invoices/[payoutId]/route.tsx
@@ -131,19 +131,21 @@ export const GET = withPartnerProfile(async ({ partner, params }) => {
{
label: "Invoice info",
value: (
- <Text style={tw("text-neutral-800 w-2/3")}>
+ <Text style={tw("text-neutral-800 w-2/3 leading-4")}>
{partner.companyName && (
<>
{partner.companyName}
{"\n"}
</>
)}
+
{partner.invoiceSettings?.address && (
<>
{partner.invoiceSettings.address}
{"\n"}
</>
)}
+
{partner.invoiceSettings?.taxId && (
<>Tax ID: {partner.invoiceSettings.taxId}</>
)}
diff --git a/apps/web/lib/actions/partners/update-partner-invoice-settings.ts b/apps/web/lib/actions/partners/update-partner-invoice-settings.ts
index f10a236fc6..39f2efa860 100644
--- a/apps/web/lib/actions/partners/update-partner-invoice-settings.ts
+++ b/apps/web/lib/actions/partners/update-partner-invoice-settings.ts
@@ -16,8 +16,8 @@ export const updatePartnerInvoiceSettingsAction = authPartnerActionClient
const { companyName, address, taxId } = parsedInput;
const invoiceSettings = {
- address,
- taxId,
+ address: address || undefined,
+ taxId: taxId || undefined,
} as Prisma.JsonObject;
await prisma.partner.update({