-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Mission] Afficher une pop-up lors de la suppression d'une mission si des actions ont été créées par d'autres centres #1162
[Mission] Afficher une pop-up lors de la suppression d'une mission si des actions ont été créées par d'autres centres #1162
Conversation
@@ -7,8 +7,10 @@ enum class ErrorCode { | |||
* attached. | |||
*/ | |||
CHILD_ALREADY_ATTACHED, | |||
FOREIGN_KEY_CONSTRAINT, |
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.
Plus utilisé en back mais en front oui. A fixer
@@ -1,17 +1,19 @@ | |||
@file:Suppress("ktlint:standard:package-name") |
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.
je sais pas ce que c'est ça
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 pour le linter back. Le nom du package ne devrait pas être use_case
mais useCase
. On retrouve donc cette ligne dans tous les fichiers sous domain/use_case
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.
@thoomasbro, il y a plein de useCase qui n'ont pas cette ligne (dossier amps, controlUnit, Administration, ControlPlan,...)
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.
Effectivement... j'étais persuadé d'avoir retiré -e "Package name must not contain underscore"
du linter. J'avais ajouté ces annotations dans ce but. Je serais pour remettre cette annotation.
45c5a26
to
6adea18
Compare
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.
La méthode me semble bien, je me demande juste si le use-case DeleteMission
ne doit pas appeler le use-case CanDelete
, car sinon il n'est pas protégé ?
.../kotlin/fr/gouv/cacem/monitorenv/infrastructure/api/endpoints/publicapi/ApiMissionsITests.kt
Show resolved
Hide resolved
...d/src/main/kotlin/fr/gouv/cacem/monitorenv/domain/entities/mission/monitorfish/FishAction.kt
Outdated
Show resolved
Hide resolved
...d/src/main/kotlin/fr/gouv/cacem/monitorenv/domain/entities/mission/monitorfish/FishAction.kt
Outdated
Show resolved
Hide resolved
.../kotlin/fr/gouv/cacem/monitorenv/domain/entities/mission/monitorfish/SpeciesControlEntity.kt
Outdated
Show resolved
Hide resolved
...rc/main/kotlin/fr/gouv/cacem/monitorenv/domain/repositories/IFishMissionActionsRepository.kt
Outdated
Show resolved
Hide resolved
backend/src/main/kotlin/fr/gouv/cacem/monitorenv/domain/use_cases/missions/CanDeleteMission.kt
Show resolved
Hide resolved
backend/src/main/kotlin/fr/gouv/cacem/monitorenv/domain/use_cases/missions/CanDeleteMission.kt
Outdated
Show resolved
Hide resolved
backend/src/main/kotlin/fr/gouv/cacem/monitorenv/domain/use_cases/missions/CanDeleteMission.kt
Outdated
Show resolved
Hide resolved
...kotlin/fr/gouv/cacem/monitorenv/infrastructure/api/adapters/bff/outputs/BackendUsageError.kt
Show resolved
Hide resolved
...in/kotlin/fr/gouv/cacem/monitorenv/infrastructure/monitorfish/APIMissionActionsRepository.kt
Outdated
Show resolved
Hide resolved
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.
Je me demande si on a vraiment besoin d'avoir les entités MonitorFishActions dans le domaine. Car en fait c'est utilisé par l'appel api qui est dans la partie infra, et uniquement là. Je l'aurais mis dans quelque chose du genre infrastructure.api.adapters.monitorfishApi.FishActionDataInput
. Il ne devrait plus y avoir besoin de l'annotation @serializable
. Le useCase pourrait d'ailleurs être MissionHasFishActions
et retourner simplement un boolean. On pourrait ne parser de l'api que l'id, ce qui permettrait d'éviter d'avoir des soucis si le contenu du json change.
@thoomasbro, j'ai supprimé le useCase (commentaire de Loup : #1162 (comment)) et j'ai gardé simplement |
2cf7d5b
to
e85b585
Compare
...nd/src/main/kotlin/fr/gouv/cacem/monitorenv/domain/entities/controlUnit/ControlUnitEntity.kt
Outdated
Show resolved
Hide resolved
.../gouv/cacem/monitorenv/domain/entities/mission/monitorfish/MonitorFishMissionActionEntity.kt
Outdated
Show resolved
Hide resolved
.../kotlin/fr/gouv/cacem/monitorenv/domain/repositories/IMonitorFishMissionActionsRepository.kt
Show resolved
Hide resolved
Je me suis posé la même question. J’avais pensé à `input` car c’est une information que l’on fait rentrer dans le domaine, pas une donnée qui est envoyée depuis le domaine.
… Le 2 févr. 2024 à 09:20, Claire Dagan ***@***.***> a écrit :
@thoomasbro <https://github.com/thoomasbro>, j'ai supprimé le useCase (commentaire de Loup) et j'ai gardé simplement id et missionId. Par contre pour moi c'est plutôt un output étant donné que c'est la réponse au get mission_actions que je type, non?
—
Reply to this email directly, view it on GitHub <#1162 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABCFQPMM365Z67UEIEJVRDDYRSOU3AVCNFSM6AAAAABCTPJTQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRTGMYDGMBUGQ>.
You are receiving this because you were mentioned.
|
0b22296
to
9598c79
Compare
Explication de la cinématqiue front pour expliquer le parti-pris en back :
Je clique sur supprimer
je vérifie qu'il n'y a pas d'actions "externes"
Si oui -> Affichage de la pop-up d'alerte indiquant que des actions ont été créées par d'autres appli (juste fish pou rle moment mais rapport nav aussi à terme)
L'utilisateur peut confirmer ou non la suppression
Si non -> Affichage de la pop-up de confirmation de suppression (iso à l'actuel)
L'utilisateur peut confirmer ou non la suppression
Côté Fish et RapportNav : il n'y aura qu'à ajouter l'appel à la nouvelle api
can_delete
(pas de modification faites sur l'api privée et publique de suppression)Côté technique :
can-delete
qui renvoie soit true soir une erreur si des actions sont trouvéesRelated Pull Requests & Issues