-
Notifications
You must be signed in to change notification settings - Fork 1
[Thématiques et tag] Refacto des plans de controles et ajout des themes #2234
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
[Thématiques et tag] Refacto des plans de controles et ajout des themes #2234
Conversation
56babee
to
5646e0c
Compare
872aa09
to
40c504d
Compare
@@ -35,7 +36,6 @@ abstract class EnvActionEntity( | |||
open val isComplianceWithWaterRegulationsControl: Boolean? = null, | |||
open val isSafetyEquipmentAndStandardsComplianceControl: Boolean? = null, | |||
open val isSeafarersControl: Boolean? = null, | |||
open val missionId: Int? = null, |
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.
pourquoi le supprimer?
...c/main/kotlin/fr/gouv/cacem/monitorenv/domain/use_cases/themes/GetThemesByRegulatoryAreas.kt
Show resolved
Hide resolved
) | ||
when (action) { |
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.
un if .... else
n'est pas suffisant?
si c'est une note alors sinon ...
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.
C'est un peu kiff-kiff. Le when sert à couvrir le cas par défaut. Je l'ai viré par compréhension.
""", | ||
nativeQuery = true, | ||
) | ||
fun deleteAllByIdNotInAndMissionId( |
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.
ca n'a pas l'air d'être utilisé et j'ai du mal à voir le cas d'usage
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.
C'est du code mort et oublié.
// @Query( | ||
// value = """ | ||
// SELECT DISTINCT r FROM RegulatoryAreaModel r | ||
// JOIN r.tags tagReg |
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.
a supprimer ?
@@ -94,6 +95,7 @@ export const useGetFilteredMissionsQuery = () => { | |||
isMissionPartOfSelectedAdministrationNames(mission, selectedAdministrationNames) && | |||
isMissionPartOfSelectedControlUnitIds(mission, selectedControlUnitIds) && | |||
isMissionPartOfSelectedControlPlans(mission, selectedThemes) && |
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.
tu gardes ce filtre isMissionPartOfSelectedControlPlans
?
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.
Oui je le supprimerais toutes les notions de controlplans dans un pr a part
const sortedActions = [...values.envActions].sort((a, b) => a.id - b.id) | ||
const sortedActions = [...values.envActions] | ||
// .map(envAction => { | ||
// if (envAction.id.includes('new-')) { |
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.
supprimer le code commenté
@@ -31,6 +32,7 @@ export function ThemeSelector({ label, name }) { | |||
}, [year]) | |||
|
|||
const isVesselInformationRequested = useMemo(() => { | |||
// TODO(02/04/2025): Be careful here |
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.
mais c'est toi qui les mets les TODO qui te font peur ! ;-)
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.
Non je l'ai juste laissé !
})) | ||
.sort((a, b) => a.label.localeCompare(b.label)) | ||
|
||
export const getThemesAsOptionsCheckPicker = (themes: ThemeAPI[]): Option<number>[] => | ||
themes.map(theme => ({ label: theme.name, value: theme.id })).sort((a, b) => a.label.localeCompare(b.label)) |
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.
même remarque quand dans la pr précédente il me semble, mais pour moi ce n'est pas une feature et pas un useCase juste des fonctions "utiles"
@@ -406,44 +400,6 @@ class MissionModel( | |||
updatedAtUtc = mission.updatedAtUtc?.toInstant(), | |||
) | |||
|
|||
mission.envActions?.map { |
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.
par curiosité, pourquoi déplacer ce code dans le JpaMissionRepository
?
Je n'ai pas pu tester le composant CheckTreePicker par contre |
5646e0c
to
624364e
Compare
40c504d
to
47403a3
Compare
e3dce8f
into
maxime/epic/themes_tags
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
|
Related Pull Requests & Issues