Skip to content

Commit

Permalink
feat: ajoute dispositif beneficiaire dans action
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurlbrjc committed Jan 23, 2025
1 parent 3504b0f commit 60a1d55
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function fromSqlToJeuneQueryModel(
id: jeuneSqlModel.id,
firstName: jeuneSqlModel.prenom,
lastName: jeuneSqlModel.nom,
idConseiller: jeuneSqlModel.idConseiller!
idConseiller: jeuneSqlModel.idConseiller!,
dispositif: jeuneSqlModel.dispositif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export class GetJeunesByEtablissementQueryHandler extends QueryHandler<
id: jeune.id,
firstName: jeune.prenom,
lastName: jeune.nom,
idConseiller: jeune.idConseiller!
idConseiller: jeune.idConseiller!,
dispositif: jeune.dispositif
}))
}
}
3 changes: 3 additions & 0 deletions src/application/queries/query-models/jeunes.query-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export class JeuneQueryModel {

@ApiProperty()
idConseiller: string

@ApiProperty()
dispositif: string
}

export class IdentiteJeuneQueryModel {
Expand Down
3 changes: 2 additions & 1 deletion src/infrastructure/repositories/mappers/actions.mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ function fromSqlToJeuneQueryModel(
id: jeuneSqlModel.id,
firstName: jeuneSqlModel.prenom,
lastName: jeuneSqlModel.nom,
idConseiller: jeuneSqlModel.idConseiller!
idConseiller: jeuneSqlModel.idConseiller!,
dispositif: jeuneSqlModel.dispositif
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export class ConseillersPoleEmploiController {
id: jeune.id,
firstName: jeune.firstName,
lastName: jeune.lastName,
idConseiller: jeune.conseiller!.id
idConseiller: jeune.conseiller!.id,
dispositif: jeune.dispositif
}))
}

Expand Down
6 changes: 4 additions & 2 deletions test/fixtures/query-models/action.query-model.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const uneActionQueryModelFromDomain = (
id: jeune.id,
lastName: jeune.lastName,
firstName: jeune.firstName,
idConseiller: jeune.conseiller!.id
idConseiller: jeune.conseiller!.id,
dispositif: jeune.dispositif
},
etat,
qualification
Expand Down Expand Up @@ -65,7 +66,8 @@ export function uneActionQueryModel(
firstName: 'John',
id: 'ABCDE',
idConseiller: '1',
lastName: 'Doe'
lastName: 'Doe',
dispositif: 'CEJ'
},
creatorType: Action.TypeCreateur.CONSEILLER,
dateEcheance: '2021-11-11T08:03:30.000Z',
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/query-models/jeunes.query-model.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export function unJeuneQueryModel(
id: 'ABCDE',
firstName: 'John',
lastName: 'Doe',
idConseiller: 'id-conseiller'
idConseiller: 'id-conseiller',
dispositif: 'CEJ'
}

return { ...defaults, ...args }
Expand Down
3 changes: 2 additions & 1 deletion test/infrastructure/routes/actions.controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ describe('ActionsController', () => {
firstName: 'John',
id: 'ABCDE',
idConseiller: '1',
lastName: 'Doe'
lastName: 'Doe',
dispositif: 'CEJ'
},
lastUpdate: 'Thu, 11 Nov 2021 08:03:30 UTC',
status: 'not_started'
Expand Down

0 comments on commit 60a1d55

Please sign in to comment.