Skip to content
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] Affichage des actions Env dans la timeline du formulaire de mission #3033

Merged
merged 6 commits into from
Mar 25, 2024

Conversation

louptheron
Copy link
Collaborator

@louptheron louptheron commented Mar 21, 2024

Linked issues


  • Tests E2E (Cypress)

Summary by CodeRabbit

  • Refactor
    • Updated ESLint configuration for improved code quality checks.
    • Standardized import statements for Mission across test files for consistency.
    • Comprehensive update across numerous files to consolidate and update import paths, reflecting a reorganization of file structure for better maintainability.
  • Tests
    • Added a new test case for verifying the display of environmental actions in the Side Window Mission Form Action List.
  • Style
    • Adjusted styling properties in components for enhanced user interface consistency.
  • New Features
    • Introduced a new EnvMissionAction type for better handling of environmental actions in missions.
  • New Features
    • Added a new React component ActionCard to display mission action details with interactive selection functionality.
  • New Features
    • Introduced a new component EnvActionCard to display environmental mission actions with corresponding icons and labels.
  • New Features
    • Refactored the FishActionCard component to focus on displaying action details and providing options for duplicating and removing actions.
  • New Features
    • Updated the ActionList component with new imports, hooks, props, and modified logic for sorting and displaying mission actions.
  • New Features
    • Added styled components for ActionLabel and Head in the ActionList component for improved UI design.

Copy link
Contributor

coderabbitai bot commented Mar 21, 2024

Walkthrough

The recent update involves a holistic restructuring of file paths and imports related to Mission and MissionAction types across the project. It includes enhancements for displaying environmental actions in the mission form timeline and introduces new components for improved functionality and styling, aiming to enhance project coherence and efficiency.

Changes

Files Change Summary
frontend/.eslintrc.js Updated file paths in the ESLint configuration.
frontend/cypress/e2e/side_window/mission_form/action_list.spec.ts Added a test case for displaying environmental actions.
frontend/cypress/e2e/side_window/.../air_control.spec.ts,
.../air_surveillance.spec.ts,
.../land_control.spec.ts,
.../main_form.spec.ts,
.../observation.spec.ts,
.../sea_control.spec.ts,
.../utils.ts
Standardized Mission import across test files.
frontend/src/.../missionAction.ts,
.../MissionEventContext.ts,
.../alerts/types.ts,
.../controls.ts,
.../mission/__tests__/getMissionStatus.test.ts,
.../mission/filters/__tests__/seaFrontFilterFunction.test.ts,
.../mission/filters/...,
.../mission/index.ts,
.../mission/utils.ts,
.../vessel/types.ts,
.../shared_slices/Control.ts,
.../ActivityReport/...,
.../Backoffice/...,
.../Mission/...,
.../SideWindow/...,
.../VesselSidebar/...,
.../map/overlays/...,
.../hooks/useTable/__tests__/useTable.test.TOFIX.tsx
Comprehensive update on import paths, introduction of EnvMissionAction type, styling adjustments, and functionality enhancements across various files.

Assessment against linked issues

Objective Addressed Explanation
Display environmental actions in the mission form timeline as specified in issue #3023.

Poem

🐇✨
In the code's meadow, under the bright moon's glow,
A rabbit hopped, with changes in tow.
Paths now clear, and structures refined,
A project transformed, with efficiency in mind.

"To better days," the rabbit did cheer,
With every line of code, more dear.
🎉🌟

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@louptheron louptheron changed the title wip: add actions from cacem [Mission] Affichage des actions Env dans la timeline du formulaire de mission Mar 25, 2024
@louptheron louptheron marked this pull request as ready for review March 25, 2024 14:30
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 014a286 and 5ec9f06.
Files selected for processing (95)
  • frontend/.eslintrc.js (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/action_list.spec.ts (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/air_control.spec.ts (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/air_surveillance.spec.ts (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/land_control.spec.ts (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/main_form.spec.ts (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/observation.spec.ts (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/sea_control.spec.ts (1 hunks)
  • frontend/cypress/e2e/side_window/mission_form/utils.ts (1 hunks)
  • frontend/src/api/missionAction.ts (1 hunks)
  • frontend/src/context/MissionEventContext.ts (1 hunks)
  • frontend/src/domain/entities/alerts/types.ts (1 hunks)
  • frontend/src/domain/entities/controls.ts (1 hunks)
  • frontend/src/domain/entities/mission/tests/getMissionStatus.test.ts (1 hunks)
  • frontend/src/domain/entities/mission/filters/tests/seaFrontFilterFunction.test.ts (1 hunks)
  • frontend/src/domain/entities/mission/filters/administrationFilterFunction.ts (1 hunks)
  • frontend/src/domain/entities/mission/filters/seaFrontFilterFunction.ts (1 hunks)
  • frontend/src/domain/entities/mission/filters/unitFilterFunction.ts (1 hunks)
  • frontend/src/domain/entities/mission/index.ts (2 hunks)
  • frontend/src/domain/entities/mission/utils.ts (1 hunks)
  • frontend/src/domain/entities/vessel/types.ts (1 hunks)
  • frontend/src/domain/shared_slices/Control.ts (1 hunks)
  • frontend/src/features/ActivityReport/types.ts (1 hunks)
  • frontend/src/features/ActivityReport/utils.ts (1 hunks)
  • frontend/src/features/Backoffice/edit_regulation/identification/RegulationRegionLine.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/index.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/schemas.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/ControlQualityField.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FleetSegmentsField.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikCoordinatesPicker.tsx (2 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikMultiInfractionPicker/Infraction.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikMultiInfractionPicker/InfractionForm.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikMultiInfractionPicker/index.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/GearsField.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/LicencesAndLogbookField.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/constants.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/shared/utils.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/MissionActionItem.tsx (6 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/MonitorEnvMissionActionItem.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/index.tsx (3 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/utils.tsx (3 hunks)
  • frontend/src/features/Mission/components/MissionForm/MainForm/FormikMultiControlUnitPicker/ControlUnitWarningMessage.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/MainForm/constants.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/MainForm/index.tsx (3 hunks)
  • frontend/src/features/Mission/components/MissionForm/tests/utils.test.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/constants.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/formikUsecases.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/hooks/useGetMissionActionFormikUsecases.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/hooks/useListenToAllMissionEventsUpdates.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/index.tsx (4 hunks)
  • frontend/src/features/Mission/components/MissionForm/shared/ExternalActionsDialog.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/shared/FormBody.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/shared/FormHead.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/shared/TitleSourceTag.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/shared/TitleStatusTag.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/sse.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/types.ts (2 hunks)
  • frontend/src/features/Mission/components/MissionForm/utils.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/utils/getMissionDraftFromPartialMainFormValues.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/utils/getMissionFormInitialValues.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/utils/isMissionActionFormValid.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/utils/validateMissionForms.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionList/FilterBar.tsx (2 hunks)
  • frontend/src/features/Mission/components/MissionList/constants.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionList/hooks/useGetFilteredMissionsQuery.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionList/index.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionList/slice.ts (1 hunks)
  • frontend/src/features/Mission/components/MissionList/utils.tsx (1 hunks)
  • frontend/src/features/Mission/envMissionAction.types.ts (1 hunks)
  • frontend/src/features/Mission/layers/MissionLayer/styles.ts (1 hunks)
  • frontend/src/features/Mission/layers/SelectedMissionActionsLayer/styles.ts (1 hunks)
  • frontend/src/features/Mission/mission.types.ts (2 hunks)
  • frontend/src/features/Mission/missionAction.types.ts (1 hunks)
  • frontend/src/features/Mission/monitorenvMissionApi.ts (1 hunks)
  • frontend/src/features/Mission/monitorfishMissionApi.ts (1 hunks)
  • frontend/src/features/Mission/useCases/cancelCreateAndRedirectToFilteredList.ts (1 hunks)
  • frontend/src/features/Mission/useCases/deleteMissionAction.ts (1 hunks)
  • frontend/src/features/Mission/useCases/getLastControlCircleGeometry.ts (1 hunks)
  • frontend/src/features/Mission/useCases/getMissionWithActions.ts (1 hunks)
  • frontend/src/features/SideWindow/tests/utils.test.ts (1 hunks)
  • frontend/src/features/SideWindow/index.tsx (2 hunks)
  • frontend/src/features/VesselSidebar/Controls/Control.tsx (1 hunks)
  • frontend/src/features/VesselSidebar/Controls/ControlsSummary.tsx (1 hunks)
  • frontend/src/features/VesselSidebar/Controls/GearOnboard.tsx (1 hunks)
  • frontend/src/features/VesselSidebar/Controls/Infraction.tsx (1 hunks)
  • frontend/src/features/VesselSidebar/Controls/LastControl.tsx (1 hunks)
  • frontend/src/features/VesselSidebar/Controls/LawReminders.tsx (1 hunks)
  • frontend/src/features/VesselSidebar/Controls/YearControls.tsx (1 hunks)
  • frontend/src/features/VesselSidebar/Controls/YearsToControlList.tsx (1 hunks)
  • frontend/src/features/map/overlays/ControlOverlay/ControlDetails.tsx (1 hunks)
  • frontend/src/features/map/overlays/ControlOverlay/index.tsx (1 hunks)
  • frontend/src/features/map/overlays/MissionOverlay/MissionDetails.tsx (1 hunks)
  • frontend/src/features/map/overlays/MissionOverlay/MissionStatusLabel.tsx (1 hunks)
  • frontend/src/features/map/overlays/MissionOverlay/index.tsx (1 hunks)
  • frontend/src/hooks/useTable/tests/useTable.test.TOFIX.tsx (6 hunks)
Files skipped from review due to trivial changes (2)
  • frontend/src/features/Mission/components/MissionForm/ActionForm/schemas.ts
  • frontend/src/features/Mission/missionAction.types.ts
Additional comments: 103
frontend/src/context/MissionEventContext.ts (1)
  • 3-3: The update to the import path for the Mission type aligns with the PR's objectives of improving maintainability through standardization. Ensure that @features/Mission/mission.types correctly exports the Mission type.
Verification successful

The script's output confirms that the file frontend/src/features/Mission/mission.types.ts exists and contains multiple export statements related to Mission, including an interface within a namespace also named Mission. This indicates that the Mission type is indeed exported from the specified path, albeit within a namespace, which aligns with the import statement's expectations in the context provided.

Given this information, the review comment about ensuring that @features/Mission/mission.types correctly exports the Mission type is verified as accurate. The file does export a Mission type, and the import path used in the code snippet is correct, assuming the project's configuration supports resolving the @features alias as intended.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the Mission type is correctly exported from the new path
rg "export type \{.*Mission.*\}" frontend/src/features/Mission/mission.types.ts

Length of output: 81



Script:

#!/bin/bash
# Verify the existence of the file and search for any export statement that includes `Mission`
if [ -f frontend/src/features/Mission/mission.types.ts ]; then
    echo "File exists."
    rg "export.*Mission" frontend/src/features/Mission/mission.types.ts
else
    echo "File does not exist."
fi

Length of output: 670

frontend/src/domain/entities/mission/filters/seaFrontFilterFunction.ts (1)
  • 1-1: The update to the import path for the Mission type aligns with the PR's objectives. Ensure that @features/Mission/mission.types correctly exports the Mission type.
Verification successful

The verification process has confirmed that the Mission type is indeed exported from the specified path frontend/src/features/Mission/mission.types.ts. The broader search pattern used in the script revealed multiple exports related to Mission, including an interface within a namespace also named Mission. This confirms that the import path update in the code review is correct and the Mission type is available for import from the new path.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the Mission type is correctly exported from the new path
rg "export type \{.*Mission.*\}" frontend/src/features/Mission/mission.types.ts

Length of output: 81



Script:

#!/bin/bash
# Verify the existence of the file and broaden the search for the Mission type export
if [ -f frontend/src/features/Mission/mission.types.ts ]; then
    echo "File exists."
    rg "export.*Mission" frontend/src/features/Mission/mission.types.ts
else
    echo "File does not exist."
fi

Length of output: 670

frontend/src/features/Mission/components/MissionForm/ActionForm/shared/constants.ts (1)
  • 1-1: The update to the import path for the MissionAction type aligns with the PR's objectives. Ensure that @features/Mission/missionAction.types correctly exports the MissionAction type.
Verification successful

The verification process has confirmed that entities related to MissionAction are correctly exported from frontend/src/features/Mission/missionAction.types.ts. This supports the correctness of the import statement in the reviewed code.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the MissionAction type is correctly exported from the new path
rg "export type \{.*MissionAction.*\}" frontend/src/features/Mission/missionAction.types.ts

Length of output: 93



Script:

#!/bin/bash
# Broaden the search for the export of MissionAction and verify the file's existence
echo "Checking for the existence of missionAction.types.ts"
fd missionAction.types.ts frontend/src/features/Mission/

echo "Searching for the export of MissionAction in a broader scope"
rg "export.*MissionAction" frontend/src/features/Mission/missionAction.types.ts

Length of output: 618

frontend/src/domain/entities/mission/filters/unitFilterFunction.ts (1)
  • 1-1: The update to the import path for the Mission type aligns with the PR's objectives. Ensure that @features/Mission/mission.types correctly exports the Mission type.
Verification successful

The verification process confirms that the Mission type is correctly exported from @features/Mission/mission.types.ts, aligning with the PR's objectives. The Mission interface is part of the Mission namespace, which matches the import statement in the reviewed code snippet.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the Mission type is correctly exported from the new path
rg "export type \{.*Mission.*\}" frontend/src/features/Mission/mission.types.ts

Length of output: 81



Script:

#!/bin/bash
# Broaden the search to capture various export styles of the Mission type
rg "export.*Mission" frontend/src/features/Mission/mission.types.ts
# Verify the file path is correct and there are no typos
fd "mission.types.ts" frontend/src/features/Mission/

Length of output: 675

frontend/src/domain/entities/mission/filters/administrationFilterFunction.ts (1)
  • 1-1: The update to the import path for the Mission type aligns with the PR's objectives. Ensure that @features/Mission/mission.types correctly exports the Mission type.
Verification successful

The updated script's output confirms that the Mission type is indeed exported from frontend/src/features/Mission/mission.types.ts, along with other related types and interfaces. This verifies the correctness of the import path update in the code review.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the Mission type is correctly exported from the new path
rg "export type \{.*Mission.*\}" frontend/src/features/Mission/mission.types.ts

Length of output: 81



Script:

#!/bin/bash
# Attempt a more flexible search for the export of the Mission type, considering different possible formats
rg "export (type|interface) Mission" frontend/src/features/Mission/mission.types.ts

Length of output: 323

frontend/src/features/Mission/components/MissionForm/shared/FormHead.tsx (1)
  • 5-14: The CSS adjustments in the FormHead component are likely aimed at improving the layout and styling. Ensure that these changes do not negatively impact the responsiveness or accessibility of the component.
frontend/src/domain/entities/mission/__tests__/getMissionStatus.test.ts (1)
  • 1-1: The update to the import path for the Mission type aligns with the PR's objectives. Ensure that @features/Mission/mission.types correctly exports the Mission type.
Verification successful

The verification process has confirmed that the Mission type is indeed exported from frontend/src/features/Mission/mission.types.ts, but within a namespace also named Mission. This structure should be taken into account when importing the Mission type elsewhere in the codebase. Ensure that the import statement correctly references the namespace if necessary.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the Mission type is correctly exported from the new path
rg "export type \{.*Mission.*\}" frontend/src/features/Mission/mission.types.ts

Length of output: 81



Script:

#!/bin/bash
# Broaden the search for the Mission type export to capture different possible formats
rg "export.*Mission" frontend/src/features/Mission/mission.types.ts

Length of output: 575

frontend/src/features/ActivityReport/types.ts (1)
  • 3-3: The import path for MissionAction has been updated to ../Mission/missionAction.types. Ensure that all references to MissionAction within this file are correctly updated to reflect any changes in the structure or naming conventions of the MissionAction type.
Verification successful

The verification process confirms that the updated import path for MissionAction to ../Mission/missionAction.types is correct and accessible. Additionally, there are no remaining references to the old path within the ActivityReport feature, indicating a complete and successful update.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new import path is correct and accessible.
fd missionAction.types.ts frontend/src/features/Mission/
# Ensure no references to the old path remain.
rg "../../domain/types/missionAction" frontend/src/features/ActivityReport/

Length of output: 187

frontend/src/features/Mission/components/MissionForm/utils/getMissionFormInitialValues.ts (1)
  • 1-1: The import path for MissionWithActions has been updated to use an alias @features/Mission/mission.types. This is a good practice for improving readability and maintainability. Ensure that all references to MissionWithActions within this file and across the project are consistently using this new path.
Verification successful

The verification confirms that the import path for MissionWithActions has been correctly updated to @features/Mission/mission.types, and there are no remaining references to the old path within the MissionForm utils. This aligns with the goal of standardizing import paths across the project.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new import path is correct and accessible.
fd mission.types.ts frontend/src/features/Mission/
# Ensure no references to the old path remain.
rg "domain/entities/mission/types" frontend/src/features/Mission/components/MissionForm/utils/

Length of output: 194

frontend/src/domain/entities/mission/utils.ts (1)
  • 1-1: The import path for Mission has been updated to @features/Mission/mission.types, aligning with the project's effort to standardize import paths. Verify that the Mission type is correctly used throughout this file and that the new path does not introduce any issues with type resolution or functionality.
Verification successful

The verification process confirms that the Mission type's import path has been correctly updated to @features/Mission/mission.types, and there are no remaining references to the old import path within the frontend/src/domain/entities/mission/ directory. This aligns with the project's effort to standardize import paths and suggests that the update has been successfully implemented without introducing issues related to type resolution or functionality.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new import path is correct and accessible.
fd mission.types.ts frontend/src/features/Mission/
# Ensure no references to the old path remain.
rg "domain/entities/mission/types" frontend/src/domain/entities/mission/

Length of output: 172

frontend/src/features/Mission/components/MissionForm/ActionForm/shared/utils.ts (1)
  • 1-1: The import path for MissionAction has been updated to @features/Mission/missionAction.types, which is part of the project's initiative to standardize import paths. Ensure that the MissionAction type is correctly used throughout this file and that the new path does not introduce any issues with type resolution or functionality.
Verification successful

The updated import path for MissionAction has been correctly implemented and is accessible at @features/Mission/missionAction.types. There are no remaining references to the old path, indicating a successful update in line with the project's initiative to standardize import paths.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new import path is correct and accessible.
fd missionAction.types.ts frontend/src/features/Mission/
# Ensure no references to the old path remain.
rg "domain/types/missionAction" frontend/src/features/Mission/components/MissionForm/ActionForm/shared/

Length of output: 215

frontend/src/features/Mission/useCases/getMissionWithActions.ts (1)
  • 6-6: The import path for MissionWithActions has been updated to @features/Mission/mission.types, which is a positive change for maintainability and readability. Verify that the MissionWithActions type is correctly used throughout this file and that the new path does not introduce any issues with type resolution or functionality.
Verification successful

The verification process confirms that the updated import path for MissionWithActions is correct and accessible, and there are no remaining references to the old path within the Mission use cases. This suggests that the update has been successfully applied and should not introduce any issues with type resolution or functionality.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new import path is correct and accessible.
fd mission.types.ts frontend/src/features/Mission/
# Ensure no references to the old path remain.
rg "domain/entities/mission/types" frontend/src/features/Mission/useCases/

Length of output: 174

frontend/src/features/Mission/components/MissionForm/utils/getMissionDraftFromPartialMainFormValues.ts (1)
  • 1-1: The import path for Mission has been updated to @features/Mission/mission.types, aligning with the project's effort to standardize import paths. Ensure that the Mission type is correctly used throughout this file and that the new path does not introduce any issues with type resolution or functionality.
Verification successful

The verification process confirms that the new import path for the Mission type is correctly implemented in getMissionDraftFromPartialMainFormValues.ts, and there are no references to the old path within the specified context. This aligns with the project's effort to standardize import paths.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new import path is correct and accessible.
fd mission.types.ts frontend/src/features/Mission/
# Ensure no references to the old path remain.
rg "domain/entities/mission/types" frontend/src/features/Mission/components/MissionForm/utils/

Length of output: 194

frontend/src/features/Mission/envMissionAction.types.ts (1)
  • 1-29: The introduction of the EnvMissionAction namespace and related types is a significant addition to support environmental actions in the mission form's timeline. Ensure that the types defined here are correctly used across the project and that the namespace aligns with the project's naming conventions and architectural patterns.
frontend/src/features/VesselSidebar/Controls/GearOnboard.tsx (1)
  • 3-3: The import path for MissionAction has been updated to @features/Mission/missionAction.types, which is a positive change for maintainability and readability. Ensure that the MissionAction type, specifically GearControl, is correctly used in this component and that the new path does not introduce any issues with type resolution or functionality.
Verification successful

The verification process confirms that the updated import path for MissionAction to @features/Mission/missionAction.types is correct and accessible. Additionally, there are no remaining references to the old path within the VesselSidebar/Controls directory. This aligns with the project's goal of standardizing import paths for better maintainability and readability.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new import path is correct and accessible.
fd missionAction.types.ts frontend/src/features/Mission/
# Ensure no references to the old path remain.
rg "../../../domain/types/missionAction" frontend/src/features/VesselSidebar/Controls/

Length of output: 198

frontend/src/features/Mission/components/MissionForm/types.ts (2)
  • 2-3: The updated import paths for Mission and MissionAction types align with the PR's objective to standardize and clean up the codebase. This change should improve maintainability and module resolution.
  • 13-16: The introduction of the MissionActionForTimeline type is a significant addition. It extends MissionActionFormValues with additional fields necessary for the timeline display. This change directly supports the PR's objective to enhance the mission form's functionality by including environmental actions in its timeline. Ensure that all uses of this new type are consistent and that any necessary updates to components or functions that consume MissionActionFormValues are made to accommodate this new type.
frontend/src/features/Mission/components/MissionForm/shared/TitleSourceTag.tsx (1)
  • 1-1: The updated import path for Mission in TitleSourceTag.tsx aligns with the PR's goal of standardizing import paths. This change should help maintain a cleaner and more organized codebase. Removing unused imports is a good practice for code cleanliness and readability.
frontend/src/features/Mission/components/MissionForm/sse.ts (2)
  • 4-4: The updated import path for the Mission type in sse.ts is consistent with the PR's objective to standardize and clean up import paths. This change contributes to a more maintainable and organized codebase.
  • 11-11: The comment modification for the 'envActions' field in the MISSION_EVENT_UNSYNCHRONIZED_PROPERTIES_IN_FORM array clarifies its usage within the form. It's good practice to keep comments up-to-date to reflect the current state of the code, especially for fields that have specific handling logic.
frontend/src/features/Mission/components/MissionForm/shared/FormBody.tsx (1)
  • 11-11: The adjustment of the top margin from 24px to 16px in FormBody.tsx is a styling change that likely aims to improve the visual layout and spacing within the form. Ensure this change aligns with the design specifications and does not adversely affect the form's usability or appearance on different screen sizes.
frontend/src/features/Mission/components/MissionList/slice.ts (1)
  • 1-1: The update to use relative paths for importing Mission and related types in slice.ts is consistent with the PR's goal of improving module resolution and maintainability. This change should help in keeping the codebase organized and make it easier to manage dependencies.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/ControlQualityField.tsx (1)
  • 1-1: The change in import path for MissionAction in ControlQualityField.tsx aligns with the PR's objective to standardize import paths across the project. This update should contribute to a cleaner and more maintainable codebase by ensuring consistency in how types are imported.
frontend/src/features/VesselSidebar/Controls/YearsToControlList.tsx (1)
  • 8-8: The updated import path for MissionAction in YearsToControlList.tsx is a positive change that aligns with the PR's goal of standardizing import paths. This adjustment helps in maintaining consistency across the codebase and improving code maintainability.
frontend/src/features/Mission/components/MissionForm/hooks/useListenToAllMissionEventsUpdates.ts (1)
  • 2-2: The change in import path for Mission in useListenToAllMissionEventsUpdates.ts supports the PR's objective of standardizing import paths. This update contributes to a more organized and maintainable codebase by ensuring consistency in how types are imported.
frontend/src/features/Mission/components/MissionForm/shared/ExternalActionsDialog.tsx (1)
  • 1-1: The update of the import path for Mission from 'domain/entities/mission/types' to @features/Mission/mission.types is a good practice for standardizing import paths and improving maintainability. Ensure that this change is consistently applied across the entire codebase to avoid confusion or import errors.
Verification successful

The verification process confirms that the old import path domain/entities/mission/types is no longer used in the project, aligning with the intended update. This suggests that the import path change for the Mission type has been successfully and consistently applied across the codebase.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import path is no longer used in the project
rg --type ts "domain/entities/mission/types" || echo "Old import path not found. Verification successful."

Length of output: 157

frontend/src/features/Mission/components/MissionForm/shared/TitleStatusTag.tsx (1)
  • 1-1: The update of the import path for Mission from 'domain/entities/mission/types' to @features/Mission/mission.types is consistent with efforts to standardize import paths. Ensure this change is applied uniformly across the codebase to maintain consistency and avoid import errors.
Verification successful

The verification process confirms that the old import path domain/entities/mission/types is no longer used in the project, indicating that the import path update for Mission has been successfully applied across the codebase. This aligns with the efforts to standardize import paths and ensures consistency.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import path is no longer used in the project
rg --type ts "domain/entities/mission/types" || echo "Old import path not found. Verification successful."

Length of output: 157

frontend/src/features/VesselSidebar/Controls/LastControl.tsx (1)
  • 8-8: The update of the import path for MissionAction from ../../../domain/types/missionAction to ../../Mission/missionAction.types is a positive step towards standardizing import paths. Ensure that this change is consistently applied across the entire codebase to avoid confusion or import errors.
Verification successful

The verification process confirms that the old import path domain/types/missionAction is no longer used in the project, aligning with the effort to standardize import paths. This change has been successfully applied across the entire codebase.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import path is no longer used in the project
rg --type ts "domain/types/missionAction" || echo "Old import path not found. Verification successful."

Length of output: 154

frontend/src/features/map/overlays/MissionOverlay/MissionStatusLabel.tsx (1)
  • 5-5: The update of the import path for Mission from '../../../../domain/entities/mission/types' to '../../../Mission/mission.types' is consistent with efforts to standardize import paths. Ensure this change is applied uniformly across the codebase to maintain consistency and avoid import errors.
Verification successful

The shell script output confirms that the old import path "domain/entities/mission/types" is no longer used in the project, indicating that the import path update for the Mission type has been successfully applied across the codebase. This supports the efforts to standardize import paths and improve maintainability.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import path is no longer used in the project
rg --type ts "domain/entities/mission/types" || echo "Old import path not found. Verification successful."

Length of output: 157

frontend/src/features/Mission/monitorfishMissionApi.ts (1)
  • 3-3: The update of the import path for MissionWithActions to use a relative path is consistent with efforts to standardize import paths. Ensure this change is applied uniformly across the codebase to maintain consistency and avoid import errors.
Verification successful

The verification process confirmed that the old import path "domain/entities/mission/types" is no longer used in the project, aligning with the effort to standardize import paths. This consistency supports the initial approval of the import path update for MissionWithActions.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import path is no longer used in the project
rg --type ts "domain/entities/mission/types" || echo "Old import path not found. Verification successful."

Length of output: 157

frontend/src/api/missionAction.ts (1)
  • 5-5: The update of the import path for MissionAction from a specific domain location to @features/Mission/missionAction.types is a positive step towards standardizing import paths. Ensure that this change is consistently applied across the entire codebase to avoid confusion or import errors.
Verification successful

The verification process confirms that the old import path domain/entities/missionAction is no longer used in TypeScript files within the project, indicating a successful update to the new import path @features/Mission/missionAction.types. It's important to ensure that this standardization effort is consistently applied across all file types and configurations within the codebase to maintain clarity and avoid potential import errors.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import path is no longer used in the project
rg --type ts "domain/entities/missionAction" || echo "Old import path not found. Verification successful."

Length of output: 157

frontend/src/features/Mission/useCases/cancelCreateAndRedirectToFilteredList.ts (1)
  • 3-4: The import paths for MissionDateRangeFilter, MissionFilterType, and Mission have been updated to reflect a more organized project structure. This change should improve maintainability and clarity in the codebase.
frontend/src/domain/shared_slices/Control.ts (1)
  • 3-3: The update to the import path for MissionAction aligns with the project's effort to standardize and organize import paths. This change should facilitate easier maintenance and clarity in the codebase.
frontend/src/domain/entities/alerts/types.ts (1)
  • 4-4: The update to the import path for MissionAction is consistent with the project's goal of standardizing import paths. This change enhances the maintainability and clarity of the codebase.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikMultiInfractionPicker/Infraction.tsx (1)
  • 1-1: The update to the import path for MissionAction aligns with the project's effort to standardize and organize import paths, which should improve code maintainability and clarity.
frontend/src/features/VesselSidebar/Controls/LawReminders.tsx (1)
  • 10-10: The update to the import path for MissionAction is consistent with the project's goal of standardizing import paths. This change enhances the maintainability and clarity of the codebase.
frontend/src/features/Mission/useCases/deleteMissionAction.ts (1)
  • 6-6: The update to the import path for MissionAction aligns with the project's effort to standardize and organize import paths, which should improve code maintainability and clarity.
frontend/src/features/Mission/layers/SelectedMissionActionsLayer/styles.ts (1)
  • 9-9: The update to the import path for MissionAction is consistent with the project's goal of standardizing import paths. This change enhances the maintainability and clarity of the codebase.
frontend/src/features/Mission/components/MissionForm/ActionForm/index.tsx (1)
  • 1-1: The update to the import path for MissionAction aligns with the project's effort to standardize and organize import paths, which should improve code maintainability and clarity.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/LicencesAndLogbookField.tsx (1)
  • 1-1: The change in import path for MissionAction aligns with the PR's objective of standardizing import paths and is correctly used within the file.
frontend/src/features/Backoffice/edit_regulation/identification/RegulationRegionLine.tsx (1)
  • 2-2: The change in import path for OptionValue aligns with the PR's objective of standardizing import paths and is correctly used within the file.
frontend/src/features/Mission/components/MissionList/utils.tsx (3)
  • 1-1: The change in import path for FrontendError aligns with the PR's objective of standardizing import paths and is correctly used within the file.
  • 6-7: The update in import paths for Mission and related types is consistent with the PR's objective of cleaning up and standardizing import paths.
  • 9-9: The adjustment in the import path for LegacyControlUnit is part of the effort to standardize import paths across the project and is correctly used within the file.
frontend/src/features/Mission/layers/MissionLayer/styles.ts (1)
  • 6-6: The change in import path for Mission aligns with the PR's objective of standardizing import paths and is correctly used within the file.
frontend/src/features/VesselSidebar/Controls/Infraction.tsx (1)
  • 7-7: The change in import path for MissionAction aligns with the PR's objective of standardizing import paths and is correctly used within the file.
frontend/src/domain/entities/mission/filters/__tests__/seaFrontFilterFunction.test.ts (1)
  • 1-1: The change in import path for Mission aligns with the PR's objective of standardizing import paths and is correctly used within the test file.
frontend/src/features/VesselSidebar/Controls/ControlsSummary.tsx (1)
  • 13-13: The change in import path for MissionAction aligns with the PR's objective of standardizing import paths and is correctly used within the file.
frontend/src/features/Mission/components/MissionForm/constants.tsx (1)
  • 3-3: The change in import path for MissionAction aligns with the PR's objective of standardizing import paths and is correctly used within the file.
frontend/cypress/e2e/side_window/mission_form/utils.ts (1)
  • 5-5: The update to the import path for the Mission type enhances maintainability and aligns with the PR's objective to standardize import paths. Good job on making the import paths more consistent across the project.
frontend/src/features/Mission/useCases/getLastControlCircleGeometry.ts (1)
  • 8-8: The update to the import path for MissionAction is a positive change, enhancing maintainability and aligning with the PR's objective to standardize import paths. This change simplifies the import statement and makes the project structure more intuitive.
frontend/src/features/Mission/components/MissionForm/MainForm/FormikMultiControlUnitPicker/ControlUnitWarningMessage.tsx (1)
  • 1-1: The update to the import path for Mission enhances maintainability and aligns with the PR's objective to standardize import paths. This change simplifies the import statement and makes the project structure more intuitive.
frontend/src/hooks/useTable/__tests__/useTable.test.TOFIX.tsx (1)
  • 24-27: Updating the titles of items to specific "MissionAction" names in the test data improves clarity and consistency. This change ensures that the test cases are more representative of the actual application data.
frontend/src/features/Mission/components/MissionForm/ActionList/utils.tsx (4)
  • 1-3: The addition of imports for EnvMissionAction, Mission, and MissionAction types aligns with the PR's objective to standardize import paths and enhance functionality. Good job on making the import paths more consistent across the project.
  • 7-7: Updating the MissionActionFormValues type to include MissionActionForTimeline improves the type's accuracy and utility in the context of the timeline feature.
  • 20-35: The modification of getActionTitle to handle placeholder as optional and the addition of the Strong styled component improve the function's flexibility and the UI's consistency. These changes enhance the readability and maintainability of the code.
  • 71-83: Adding the getMissionActionDate function improves the maintainability and functionality of the code by handling different sources of mission actions. This addition is a good practice for handling data from multiple sources in a consistent manner.
frontend/src/features/Mission/monitorenvMissionApi.ts (1)
  • 3-3: The update to the import path for Mission enhances maintainability and aligns with the PR's objective to standardize import paths. This change simplifies the import statement and makes the project structure more intuitive.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikMultiInfractionPicker/InfractionForm.tsx (1)
  • 19-19: The update to the import path for MissionAction enhances maintainability and aligns with the PR's objective to standardize import paths. This change simplifies the import statement and makes the project structure more intuitive.
frontend/src/features/Mission/components/MissionForm/utils/validateMissionForms.ts (1)
  • 1-2: The updates to the import paths for Mission and MissionAction types enhance maintainability and align with the PR's objective to standardize import paths. These changes simplify the import statements and make the project structure more intuitive.
frontend/cypress/e2e/side_window/mission_form/observation.spec.ts (1)
  • 1-1: The updated import path for Mission from @features/Mission/mission.types aligns with the PR's objective of standardizing import paths and enhancing the mission form's functionality. Ensure that the new path is correctly resolving and that there are no issues with the import not being found during runtime.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FleetSegmentsField.tsx (2)
  • 11-11: The updated import path for MissionAction from @features/Mission/missionAction.types is consistent with the PR's goal of standardizing import paths. This change should improve maintainability and clarity in the codebase.
  • 11-11: The removal of the unused import for Option is a good practice, as it helps to keep the code clean and maintainable. Ensure that this change does not affect any other parts of the component that might have been using Option indirectly.
frontend/src/features/Mission/components/MissionForm/hooks/useGetMissionActionFormikUsecases.ts (1)
  • 3-3: The updated import path for MissionAction from @features/Mission/missionAction.types aligns with the PR's objective of standardizing import paths. This change should enhance the maintainability of the codebase by ensuring consistent import paths.
frontend/src/features/Mission/mission.types.ts (2)
  • 1-1: The introduction of EnvMissionAction from @features/Mission/envMissionAction.types is a significant addition that aligns with the PR's objective to enhance the mission form's functionality by including environmental actions. Ensure that the new type is correctly used throughout the project where environmental actions are relevant.
  • 16-16: The update to the envActions property to use EnvMissionAction.MissionAction[] is a clear indication of the PR's focus on integrating environmental actions into the mission form. This change should facilitate better handling and display of environmental actions within the application.
frontend/src/features/Mission/components/MissionList/hooks/useGetFilteredMissionsQuery.ts (2)
  • 10-10: The reorganization of import paths for MissionDateRangeFilter and MissionFilterType to the local directory is a positive change that likely enhances the maintainability of the code by grouping related types closer to their usage context.
  • 12-12: The update to the type import for MissionWithActions to reflect the new file structure is consistent with the PR's goal of standardizing import paths. This change should improve clarity and maintainability in the codebase.
frontend/src/features/Mission/components/MissionForm/ActionList/MonitorEnvMissionActionItem.tsx (1)
  • 1-1: The updated import path for EnvMissionAction from @features/Mission/envMissionAction.types aligns with the PR's objective of enhancing the mission form's functionality by including environmental actions. This change should facilitate the correct display and handling of environmental actions within the mission form.
frontend/src/features/map/overlays/MissionOverlay/index.tsx (1)
  • 16-16: The updated import path for Mission from ../../../Mission/mission.types is consistent with the PR's goal of standardizing import paths. This change should improve maintainability and clarity in the codebase by ensuring consistent import paths.
frontend/src/features/map/overlays/ControlOverlay/index.tsx (1)
  • 16-16: The updated import path for Mission from ../../../Mission/mission.types aligns with the PR's objective of standardizing import paths. This change should enhance the maintainability of the codebase by ensuring consistent import paths.
frontend/src/features/VesselSidebar/Controls/YearControls.tsx (1)
  • 13-13: The update to the import path for MissionAction improves maintainability and readability by using a structured import path. Good practice!
frontend/src/domain/entities/controls.ts (1)
  • 1-1: The change in the import path for MissionAction to use an alias enhances the code's maintainability and readability. Well done!
frontend/src/features/Mission/components/MissionList/constants.ts (1)
  • 2-9: The reorganization of import paths for Mission, MissionAction, and related entities, as well as the utility function getOptionsFromLabelledEnum, contributes to a cleaner and more maintainable codebase. Good job on standardizing these paths.
frontend/src/features/ActivityReport/utils.ts (1)
  • 4-4: Updating the import path for MissionAction to use an alias is a positive step towards improving code maintainability and readability. Nicely done!
frontend/cypress/e2e/side_window/mission_form/air_control.spec.ts (1)
  • 1-1: The update to the import path for Mission using an alias in the Cypress test file aligns with the project's efforts to standardize import paths. This is a good practice for improving code maintainability.
frontend/src/features/Mission/components/MissionForm/utils.tsx (1)
  • 6-7: The changes in the import paths for Mission and MissionAction to use relative paths instead of absolute paths enhance the code's maintainability and readability. This is a good practice for managing imports in a large project.
frontend/.eslintrc.js (1)
  • 121-121: Updating the file paths in the files array within the ESLint configuration to reflect the current project structure is a good practice for maintaining code quality. This change ensures that ESLint rules are applied correctly across the project.
frontend/src/features/Mission/components/MissionForm/ActionList/index.tsx (1)
  • 1-8: The addition of imports for specific components and types, along with the use of the useGetMissionQuery hook, enhances the component's functionality. The updated rendering logic for mission actions based on their source is a positive change, improving the component's flexibility and usability.
frontend/cypress/e2e/side_window/mission_form/air_surveillance.spec.ts (1)
  • 1-1: The update to the import path for Mission from @features/Mission/mission.types and the removal of a redundant import are good improvements. It enhances clarity and maintainability of the codebase.
frontend/src/features/Mission/components/MissionForm/MainForm/index.tsx (2)
  • 2-2: Updating the import path for MISSION_EVENT_UNSYNCHRONIZED_PROPERTIES_IN_FORM and removing the old import path are good practices for maintainability.
  • 167-167: Adjusting the margin-top value from 32px to 24px in CustomFormBodyInnerWrapper styling likely aligns with updated design specifications.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikCoordinatesPicker.tsx (1)
  • 2-2: The update to the import path for MissionAction from @features/Mission/missionAction.types is a good improvement, enhancing clarity and maintainability of the codebase.
frontend/src/features/Mission/components/MissionForm/formikUsecases.ts (1)
  • 4-4: The update to the import path for MissionAction from @features/Mission/missionAction.types is a positive change, enhancing the clarity and maintainability of the codebase.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/GearsField.tsx (1)
  • 24-24: The update to the import path for MissionAction from @features/Mission/missionAction.types enhances the clarity and maintainability of the codebase.
frontend/src/features/map/overlays/ControlOverlay/ControlDetails.tsx (1)
  • 14-14: The update to the import path for Mission from @features/Mission/mission.types is a good improvement, enhancing clarity and maintainability of the codebase.
frontend/src/features/VesselSidebar/Controls/Control.tsx (1)
  • 14-14: The update to the import path for MissionAction from @features/Mission/missionAction.types enhances the clarity and maintainability of the codebase.
frontend/src/domain/entities/mission/index.ts (1)
  • 2-3: The addition of imports for Mission and MissionAction from specific paths and the update to the import path for MissionWithActions enhance the clarity and maintainability of the codebase. Removing a duplicate import of Mission type is also a good practice for code cleanliness.
frontend/src/features/map/overlays/MissionOverlay/MissionDetails.tsx (1)
  • 11-11: The import path for the Mission entity has been updated to reflect the reorganization of the project's file structure. This change is consistent with the PR's objectives to standardize import paths.
frontend/src/features/Mission/components/MissionForm/ActionForm/shared/FormikMultiInfractionPicker/index.tsx (1)
  • 18-18: The import path for MissionAction has been updated to reflect the reorganization of the project's file structure. This change is consistent with the PR's objectives to standardize import paths.
frontend/src/features/Mission/components/MissionList/FilterBar.tsx (2)
  • 1-3: The imports for useGetLegacyControlUnitsQuery, useMainAppDispatch, and useMainAppSelector have been reorganized and moved to the top, aligning with best practices for import organization.
  • 22-26: The import paths for missionListActions, getControlUnitsOptionsFromControlUnits, and FormikFilterTagBar have been updated. This change is consistent with the PR's objectives to standardize import paths and improve maintainability.
frontend/src/features/SideWindow/index.tsx (1)
  • 34-34: The import of MissionList has been updated to reflect the reorganization of the project's file structure. This change is consistent with the PR's objectives to standardize import paths.
frontend/src/features/Mission/components/MissionForm/ActionList/MissionActionItem.tsx (2)
  • 1-1: The import of MissionAction has been added to reflect the reorganization of the project's file structure. This change is consistent with the PR's objectives to standardize import paths.
  • 26-39: The renaming of the component to MissionActionItem and the update to its props are clear and improve the component's clarity and maintainability. Ensure that the new component name and updated props are consistently used throughout the project to avoid inconsistencies.
frontend/cypress/e2e/side_window/mission_form/action_list.spec.ts (1)
  • 245-255: The newly added test case, "Should show Env actions on the actions timeline," successfully verifies the display of environmental actions on the mission form's action timeline. This aligns with the PR's objective to enhance the mission form's functionality by including environmental actions.

However, it's important to ensure that this test case is part of a comprehensive test suite that covers various scenarios related to the display and interaction with environmental actions on the timeline.

frontend/src/features/Mission/components/MissionList/index.tsx (1)
  • 1-24: Reorganized imports and updated paths enhance readability and maintainability. Good practice in keeping domain-specific and utility imports separate for clarity.
frontend/cypress/e2e/side_window/mission_form/land_control.spec.ts (1)
  • 1-1: Standardizing import paths for Mission type improves consistency and maintainability across the test suite. This change aligns with best practices for managing and importing types.
frontend/src/features/Mission/components/MissionForm/index.tsx (2)
  • 7-7: Updating import paths for Mission type aligns with efforts to standardize and clean up the codebase. This change enhances maintainability by ensuring consistent import paths.
  • 62-62: Standardizing the import path for MissionAction type contributes to codebase consistency and maintainability. It's a positive change that helps in managing types more effectively.
frontend/cypress/e2e/side_window/mission_form/main_form.spec.ts (1)
  • 1-1: The import statement for Mission from @features/Mission/mission.types has been added. Please verify its usage within this test file to ensure it's necessary, as the provided code does not explicitly demonstrate its use.
frontend/cypress/e2e/side_window/mission_form/sea_control.spec.ts (2)
  • 1-1: The updated import path for Mission looks good. Ensure that the usage of Mission throughout this test file aligns with the new import path for consistency.
  • 1-1: Consider replacing arbitrary cy.wait(500) calls with more deterministic waiting strategies, such as cy.intercept() for network requests or cy.get() with {timeout: N} for UI elements. This can improve test reliability and reduce potential flakiness.

Comment on lines 241 to 256
'est automatiquement calculée selon le point ou la zone de la dernière action rapportée par l’unité.'
)
})

it('Should show Env actions on the actions timeline', () => {
editSideWindowMissionListMissionWithId(34, SeaFrontGroup.MEMN)

cy.get('[data-cy="mission-form-action-list"]').children().eq(0).contains('28 Nov à 13:59')
cy.get('[data-cy="mission-form-action-list"]').children().eq(0).contains('Surveillance')
cy.get('[data-cy="mission-form-action-list"]').children().eq(1).contains('Action CACEM')

cy.get('[data-cy="mission-form-action-list"]').children().eq(2).contains('17 Nov à 13:59')
cy.get('[data-cy="mission-form-action-list"]').children().eq(2).contains('Contrôle')
cy.get('[data-cy="mission-form-action-list"]').children().eq(3).contains('Action CACEM')
})
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]

The TODO comment at the beginning of the file suggests finding a way to reset data after each test to make them independent and easily re-runnable. This is a good practice for ensuring test reliability and avoiding inter-test dependencies.

Would you like assistance in implementing a solution for resetting data after each test, perhaps through Cypress commands or fixtures?

frontend/src/domain/entities/vessel/types.ts Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 5ec9f06 and dbe4acc.
Files selected for processing (7)
  • frontend/cypress/e2e/side_window/mission_form/main_form.spec.ts (4 hunks)
  • frontend/cypress/e2e/side_window/mission_form/utils.ts (2 hunks)
  • frontend/src/domain/entities/mission/filters/tests/seaFrontFilterFunction.test.ts (5 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/utils.tsx (2 hunks)
  • frontend/src/features/Mission/components/MissionForm/utils.tsx (2 hunks)
  • frontend/src/features/Mission/mission.types.ts (3 hunks)
  • frontend/src/features/Mission/monitorenvMissionApi.ts (2 hunks)
Files skipped from review as they are similar to previous changes (7)
  • frontend/cypress/e2e/side_window/mission_form/main_form.spec.ts
  • frontend/cypress/e2e/side_window/mission_form/utils.ts
  • frontend/src/domain/entities/mission/filters/tests/seaFrontFilterFunction.test.ts
  • frontend/src/features/Mission/components/MissionForm/ActionList/utils.tsx
  • frontend/src/features/Mission/components/MissionForm/utils.tsx
  • frontend/src/features/Mission/mission.types.ts
  • frontend/src/features/Mission/monitorenvMissionApi.ts

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between dbe4acc and b6a1586.
Files selected for processing (1)
  • frontend/cypress/e2e/side_window/mission_form/action_list.spec.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • frontend/cypress/e2e/side_window/mission_form/action_list.spec.ts

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b6a1586 and 3d181df.
Files selected for processing (1)
  • frontend/cypress/e2e/side_window/mission_form/action_list.spec.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • frontend/cypress/e2e/side_window/mission_form/action_list.spec.ts

Copy link

sonarcloud bot commented Mar 25, 2024

Quality Gate Passed Quality Gate passed

Issues
12 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 3d181df and 9eedc11.
Files selected for processing (5)
  • frontend/src/features/Mission/components/MissionForm/ActionList/ActionCard.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/EnvActionCard.tsx (1 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/FishActionCard.tsx (3 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/index.tsx (3 hunks)
  • frontend/src/features/Mission/components/MissionForm/ActionList/styles.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • frontend/src/features/Mission/components/MissionForm/ActionList/styles.ts
Additional comments: 18
frontend/src/features/Mission/components/MissionForm/ActionList/EnvActionCard.tsx (4)
  • 1-4: Consider grouping imports from the same library or package together to improve readability and maintainability. For example, all imports from @features/Mission can be combined.
  • 9-11: The EnvActionCardProps type definition is clear and concise, correctly using Readonly to ensure the props object is immutable. This is a good practice for component props.
  • 13-48: The use of useMemo for determining the action label and icon based on the actionType is appropriate here, as it prevents unnecessary recalculations during re-renders. However, consider extracting the logic inside the useMemo hook into a separate function for better readability and potential reuse.
  • 50-57: The rendering logic is straightforward and correctly utilizes styled components for styling. The use of the ActionIcon component with dynamic color and size props is a good practice. However, ensure that the Label styled component is defined in this file or imported correctly, as it's not visible in the provided code.
frontend/src/features/Mission/components/MissionForm/ActionList/ActionCard.tsx (6)
  • 1-7: Imports are well-organized, and it's good to see the use of type imports for TypeScript types. This helps with clarity and maintainability.
  • 15-20: The ActionCardProps type definition is comprehensive, correctly using Readonly and including optional props with appropriate types. This is a good practice for component props.
  • 24-39: The logic to determine if an action is a control action is clear and concise. However, consider extracting this logic into a utility function or custom hook for better reusability and testability.
  • 30-33: Using useMemo for date formatting is appropriate to avoid unnecessary recalculations. The logic is straightforward and correctly handles the case where actionDatetimeUtc might be undefined.
  • 62-62: The conditional rendering based on the action source to display a specific label is a good use of React's capabilities. However, ensure that SourceAction styled component is defined in this file or imported correctly, as it's not visible in the provided code.
  • 95-121: The styled component InnerWrapper uses a function to dynamically set styles based on props, which is a powerful feature of styled-components. However, ensure that the types for $isOpen, $isSelectable, $isSelected, and $type are correctly defined and used throughout the component to avoid type errors.
frontend/src/features/Mission/components/MissionForm/ActionList/FishActionCard.tsx (4)
  • 1-7: Consider grouping imports from the same library or package together to improve readability and maintainability. For example, all imports from @features/Mission can be combined.
  • 16-20: The FishActionCardProps type definition is clear and concise, correctly using Readonly to ensure the props object is immutable. This is a good practice for component props.
  • 111-146: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [21-140]

The use of useMemo for determining the action label, icon, and infraction tags is appropriate here, as it prevents unnecessary recalculations during re-renders. However, consider extracting the logic inside each useMemo hook into separate functions for better readability and potential reuse.

  • 116-140: The rendering logic is straightforward and correctly utilizes styled components for styling. The use of the ActionIcon component with dynamic color and size props is a good practice. However, ensure that the RightAlignedIconButton and StyledTagGroup styled components are defined in this file or imported correctly, as they're not visible in the provided code.
frontend/src/features/Mission/components/MissionForm/ActionList/index.tsx (4)
  • 1-13: Imports are well-organized, and it's good to see the use of type imports for TypeScript types. This helps with clarity and maintainability.
  • 17-23: The ActionListProps type definition is comprehensive, correctly using Readonly and including optional props with appropriate types. This is a good practice for component props.
  • 40-71: The logic to sort mission actions based on their datetime and source is clear and well-implemented. Using useMemo here is appropriate to avoid unnecessary recalculations. However, consider extracting the sorting logic into a utility function for better readability and potential reuse.
  • 114-147: The conditional rendering logic for displaying different types of action cards based on the source is well-implemented. Using the FrontendErrorBoundary to wrap the rendering logic is a good practice for handling potential runtime errors gracefully.

@louptheron louptheron merged commit 520261b into master Mar 25, 2024
25 checks passed
@louptheron louptheron deleted the loup/show-cacem-actions-in-mission-form branch March 25, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synchro missions – Afficher les actions env dans la timeline du formulaire de mission
2 participants