-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#patch (2295) Ajouter une colonne indiquant si une action financée RB est présente #1071
base: develop
Are you sure you want to change the base?
Conversation
Quality Gate failedFailed conditions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibilité de créer un type spécifique qui serait utilisé dans Action.d.ts
et Shantytown.d.ts
:
export type FinancedShantytownAction = {
shantytown_id?: number,
hasAtLeastOneActionFinanced: boolean,
};
|
||
const clauseGroup = where().can(user).do('read', 'action'); | ||
const passedYear = moment(date).format('YYYY'); | ||
const townsWithFinancedActions = await actionModel.fetchFinancedActionsByYear(null, parseInt(passedYear, 10), clauseGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type ActionSelectRow[]
?
const clauseGroup = where().can(user).do('read', 'action'); | ||
const passedYear = moment(date).format('YYYY'); | ||
const townsWithFinancedActions = await actionModel.fetchFinancedActionsByYear(null, parseInt(passedYear, 10), clauseGroup); | ||
const transformedShantytowns = enrichShantytown(townsWithFinancedActions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type FinancedShantytownAction[]
?
|
||
const clauseGroup = where().can(user).do('read', 'action'); | ||
const currentYear = moment(new Date()).format('YYYY'); | ||
const townsWithFinancedActions = await actionModel.fetchFinancedActionsByYear(null, parseInt(currentYear, 10), clauseGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type ActionSelectRow[]
?
const clauseGroup = where().can(user).do('read', 'action'); | ||
const currentYear = moment(new Date()).format('YYYY'); | ||
const townsWithFinancedActions = await actionModel.fetchFinancedActionsByYear(null, parseInt(currentYear, 10), clauseGroup); | ||
const transformedShantytowns = enrichShantytown(townsWithFinancedActions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type FinancedShantytownAction[]
?
@@ -0,0 +1,20 @@ | |||
import { ActionSelectRow } from '#server/models/actionModel/fetchByShantytown/fetchFinancedActionsByYear'; | |||
|
|||
type FinancedShantytownAction = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrait être sorti dans un fichier de typage à lui tout seul, appelé ici et dans Shantytown.d.ts
et Action.d.ts
🧾 Ticket Trello
https://trello.com/c/SVMFGvge/XXX
🛠 Description de la PR
🚨 Notes pour la mise en production