The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update create-manual-commission.ts
Kiran K45c63a299cfe
diff --git a/apps/web/lib/actions/partners/create-manual-commission.ts b/apps/web/lib/actions/partners/create-manual-commission.tsindex 98895daba9..df6ea0d1d7 100644--- a/apps/web/lib/actions/partners/create-manual-commission.ts+++ b/apps/web/lib/actions/partners/create-manual-commission.ts@@ -302,7 +302,7 @@ export const createManualCommissionAction = authActionClient// Duplicate the customer eventsconst shouldDuplicateEvents =- eventIds && eventIds.length > 0 && customer.linkId !== linkId;+ eventIds && eventIds.length > 0 && shouldCreateNewCustomer;if (shouldDuplicateEvents) {const eventType = !saleAmount ? "leads" : "sales";@@ -335,6 +335,8 @@ export const createManualCommissionAction = authActionClientthrow new Error("Selected events not found.");}+ console.log(events);+// Duplicate the events for the new customerif (eventType === "leads") {await Promise.all(