Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions apps/web/app/(ee)/api/messages/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ export const GET = withWorkspace(
messages: {
some: {
programId,
programEnrollment: {
status: "approved",
},
},
},
},
Expand Down
38 changes: 20 additions & 18 deletions apps/web/lib/actions/partners/create-program-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,26 +179,28 @@ export const createProgramApplicationAction = actionClient
throw new Error("This program is no longer accepting applications.");
}

// for in-app applications from existing partners, we need to check
// if the partner has an incomplete profile, if so we prompt them to complete it
if (inAppApplication && existingPartner) {
const { isComplete } = getPartnerProfileChecklistProgress({
partner: {
...existingPartner,
preferredEarningStructures:
existingPartner.preferredEarningStructures.map(
({ preferredEarningStructure }) => preferredEarningStructure,
if (existingPartner) {
// for in-app applications from existing partners, we need to check
// if the partner has an incomplete profile, if so we prompt them to complete it
if (inAppApplication) {
const { isComplete } = getPartnerProfileChecklistProgress({
partner: {
...existingPartner,
preferredEarningStructures:
existingPartner.preferredEarningStructures.map(
({ preferredEarningStructure }) => preferredEarningStructure,
),
salesChannels: existingPartner.salesChannels.map(
({ salesChannel }) => salesChannel,
),
salesChannels: existingPartner.salesChannels.map(
({ salesChannel }) => salesChannel,
),
},
});
},
});

if (!isComplete) {
throw new Error(
"Please complete your partner profile to submit your application: https://partners.dub.co/profile",
);
if (!isComplete) {
throw new Error(
"Please complete your partner profile to submit your application: https://partners.dub.co/profile",
);
}
}

return createApplicationAndEnrollment({
Expand Down
Loading