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 create-program-application.ts

Steven Teycf9fc4b40d3c
diff --git a/apps/web/lib/actions/partners/create-program-application.ts b/apps/web/lib/actions/partners/create-program-application.ts
index 6730cc4291..242b875996 100644
--- a/apps/web/lib/actions/partners/create-program-application.ts
+++ b/apps/web/lib/actions/partners/create-program-application.ts
@@ -166,6 +166,8 @@ export const createProgramApplicationAction = actionClient
include: {
programs: true,
platforms: true,
+ preferredEarningStructures: true,
+ salesChannels: true,
},
})
: null;
@@ -180,7 +182,16 @@ export const createProgramApplicationAction = actionClient
// if the partner has an incomplete profile, if so we prompt them to complete it
if (inAppApplication && existingPartner) {
const { isComplete } = getPartnerProfileChecklistProgress({
- partner: existingPartner,
+ partner: {
+ ...existingPartner,
+ preferredEarningStructures:
+ existingPartner.preferredEarningStructures.map(
+ ({ preferredEarningStructure }) => preferredEarningStructure,
+ ),
+ salesChannels: existingPartner.salesChannels.map(
+ ({ salesChannel }) => salesChannel,
+ ),
+ },
programEnrollments: existingPartner.programs,
});