Skip to content

Commit

Permalink
conditionnally get the project dependin gon the route in programDetai…
Browse files Browse the repository at this point in the history
…l.vue
  • Loading branch information
ttdm committed Oct 16, 2024
1 parent 0988012 commit 65cf707
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/web/src/components/program/detail/ProgramDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,12 @@ onBeforeMount(async () => {
useNavigationStore().hasSpinner = true
program.value = programsStore.currentProgram
console.log(program.value ? Opportunity.getProgramFormFields(program.value) : '')
// peut être que ça dépend de si on est dans le catalogue ??
const projectResult = await projectStore.eligibleProjects
let projectResult
if (useNavigationStore().isCatalogProgramDetail()) {
projectResult = await projectStore.projects
} else {
projectResult = await projectStore.eligibleProjects
}
if (projectResult.isOk) {
linkedProjects.value = Program.getLinkedProjects(program.value, projectResult.value)
}
Expand Down

0 comments on commit 65cf707

Please sign in to comment.