Skip to content

Commit

Permalink
fix: innerJoin formationView
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasDetre committed Nov 29, 2024
1 parent 53f8d6b commit 96039e1
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const getCorrectionsQuery = async ({
return eb;
})
)
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "demande.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.leftJoin("nsf", "formationView.codeNsf", "nsf.codeNsf")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const getStatsCorrectionsQuery = async ({
return eb;
})
)
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "demande.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.leftJoin("dataEtablissement", "dataEtablissement.uai", "demande.uai")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const getBase = ({ uai, rentreeScolaire = CURRENT_RENTREE }: { uai: strin
getKbdClient()
.selectFrom("formationEtablissement")
.innerJoin("dataEtablissement", "dataEtablissement.uai", "formationEtablissement.uai")
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join
.onRef("formationView.cfd", "=", "formationEtablissement.cfd")
.on("formationView.voie", "=", VoieEnum.scolaire)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const getDemandesRestitutionIntentionsQuery = async ({
return eb;
})
)
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "demande.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.leftJoin("nsf", "formationView.codeNsf", "nsf.codeNsf")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const getFormationsPilotageIntentionsQuery = ({
.selectFrom("latestDemandeIntentionView as demande")
.innerJoin("campagne", (join) => join.onRef("campagne.id", "=", "demande.campagneId"))
.innerJoin("dataEtablissement", "dataEtablissement.uai", "demande.uai")
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "demande.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.leftJoin("dispositif", "dispositif.codeDispositif", "demande.codeDispositif")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const getStatsRestitutionIntentionsQuery = async ({
return eb;
})
)
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "demande.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.innerJoin("dataEtablissement", "dataEtablissement.uai", "demande.uai")
Expand Down
2 changes: 1 addition & 1 deletion server/src/modules/data/utils/onDemande.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const genericOnDemandes = ({
return eb;
})
)
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "demande.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.innerJoin("dataEtablissement", "dataEtablissement.uai", "demande.uai")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface Filters extends z.infer<typeof getDemandeSchema.params> {
export const getDemandeQuery = async ({ numero, user }: Filters) => {
const demande = await getKbdClient()
.selectFrom("latestDemandeView as demande")
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "demande.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.innerJoin("dispositif", "dispositif.codeDispositif", "demande.codeDispositif")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const getIntentionQuery = async ({ numero, user }: Filters) => {
.innerJoin("dispositif", "dispositif.codeDispositif", "intention.codeDispositif")
.innerJoin("dataEtablissement", "dataEtablissement.uai", "intention.uai")
.innerJoin("departement", "departement.codeDepartement", "dataEtablissement.codeDepartement")
.innerJoin("formationView", (join) =>
.leftJoin("formationView", (join) =>
join.onRef("formationView.cfd", "=", "intention.cfd").on("formationView.voie", "=", VoieEnum.scolaire)
)
.leftJoin("suivi", (join) =>
Expand Down

0 comments on commit 96039e1

Please sign in to comment.