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

2136 Reg\Register an Operation\Page "Operation Representative" #2204

Merged

Conversation

Sepehr-Sobhani
Copy link
Contributor

@Sepehr-Sobhani Sepehr-Sobhani commented Sep 14, 2024

ISSUE 2136

NOTES:

  • Added 'uuid' prefix to all registration endpoints using 'operation_id' as the path parameter to prevent conflicts with similar endpoint names.
  • Updated existing tests related to the Operation Representative step and added new ones.
  • Refactored the logic in handling submit button text in 'MultiStepButtons.tsx'.
  • Added 'ui:inline' prop to 'ReadOnlyMultiSelectWidget.tsx' to display the value inline.
  • Added a new 'beforeForm' prop to 'MultiStepBase.tsx', allowing us to add other components and forms before the main form. This enables us to have multiple forms on the same page and add new records while staying on the same page.
  • Removing operation representatives will be handled by this ticket: https://github.com/orgs/bcgov/projects/123/views/16?pane=issue&itemId=81400225

TO TEST:

  • Log in as bc-cas-dev and follow the AC in the Card: # 2136

@Sepehr-Sobhani Sepehr-Sobhani force-pushed the 2136-registration-operation-representative-part-2 branch from 13fbf9f to ab300e5 Compare September 19, 2024 23:31
@marcellmueller marcellmueller force-pushed the 2136-registration-operation-representative-part-2 branch from c6d93b8 to 152bf9b Compare September 23, 2024 16:03
@Sepehr-Sobhani Sepehr-Sobhani force-pushed the 2136-registration-operation-representative-part-2 branch 4 times, most recently from abae100 to 1984fe3 Compare September 27, 2024 19:56
@Sepehr-Sobhani Sepehr-Sobhani marked this pull request as ready for review September 27, 2024 22:29
@Sepehr-Sobhani Sepehr-Sobhani force-pushed the 2136-registration-operation-representative-part-2 branch 3 times, most recently from 8ed2136 to c1a2ea6 Compare October 2, 2024 15:53
Copy link
Contributor

@andrea-williams andrea-williams left a comment

Choose a reason for hiding this comment

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

FINALLY finished reading through the code! will pull the branch to run locally and try to break it (😈) after lunch

"/operations/{uuid:operation_id}/contacts",
response={200: List[OperationsContactListOut], custom_codes_4xx: Message},
tags=OPERATION_TAGS,
description="""Retrieves the list of contacts associated with the operation.""",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: flagging this wording as potentially confusing - contacts are associated with an operator, operation representatives are associated with an operation

Copy link
Contributor

@andrea-williams andrea-williams left a comment

Choose a reason for hiding this comment

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

Ran the code locally and confirmed:

  • with an existing unregistered operation, I was able to select an existing contact and assign them as operation rep. The operation then showed up in the "Places Assigned" list for the contact
  • with the same existing operation, I was able to create a new contact and also assign them as operation rep. The new contact then appeared in the Contacts grid, and had the appropriate "Places Assigned"

I noticed that the list of operation reps doesn't appear in the Operation Details page, so at the moment there's no way to edit the list of operation reps once the operation has been registered. However, I think that's beyond the scope of this ticket so I'm approving.

Great work!

@Sepehr-Sobhani Sepehr-Sobhani force-pushed the 2136-registration-operation-representative-part-2 branch from 8e6e4c7 to a0de56a Compare October 3, 2024 21:01
@Sepehr-Sobhani
Copy link
Contributor Author

Ran the code locally and confirmed:

  • with an existing unregistered operation, I was able to select an existing contact and assign them as operation rep. The operation then showed up in the "Places Assigned" list for the contact
  • with the same existing operation, I was able to create a new contact and also assign them as operation rep. The new contact then appeared in the Contacts grid, and had the appropriate "Places Assigned"

I noticed that the list of operation reps doesn't appear in the Operation Details page, so at the moment there's no way to edit the list of operation reps once the operation has been registered. However, I think that's beyond the scope of this ticket so I'm approving.

Great work!

Thank you @andrea-williams !
Suggestion implemented, and the handling of Op Reps in the operation details page will be tackled in the ticket: #2327

@Sepehr-Sobhani Sepehr-Sobhani merged commit ee3a8cc into develop Oct 3, 2024
39 of 40 checks passed
@Sepehr-Sobhani Sepehr-Sobhani deleted the 2136-registration-operation-representative-part-2 branch October 3, 2024 22:14
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.

3 participants