Skip to content

Commit cf9fc4b

Browse files
committed
Update create-program-application.ts
1 parent 78e604a commit cf9fc4b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

apps/web/lib/actions/partners/create-program-application.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ export const createProgramApplicationAction = actionClient
166166
include: {
167167
programs: true,
168168
platforms: true,
169+
preferredEarningStructures: true,
170+
salesChannels: true,
169171
},
170172
})
171173
: null;
@@ -180,7 +182,16 @@ export const createProgramApplicationAction = actionClient
180182
// if the partner has an incomplete profile, if so we prompt them to complete it
181183
if (inAppApplication && existingPartner) {
182184
const { isComplete } = getPartnerProfileChecklistProgress({
183-
partner: existingPartner,
185+
partner: {
186+
...existingPartner,
187+
preferredEarningStructures:
188+
existingPartner.preferredEarningStructures.map(
189+
({ preferredEarningStructure }) => preferredEarningStructure,
190+
),
191+
salesChannels: existingPartner.salesChannels.map(
192+
({ salesChannel }) => salesChannel,
193+
),
194+
},
184195
programEnrollments: existingPartner.programs,
185196
});
186197

0 commit comments

Comments
 (0)