Skip to content

Conversation

@brendan-oconnell
Copy link
Contributor

No description provided.

@brendan-oconnell brendan-oconnell requested a review from ja573 April 2, 2025 12:05
Copy link
Member

@ja573 ja573 left a comment

Choose a reason for hiding this comment

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

Okay, so it looks like the modal component is not just a modal, but it's the work form's save button and the confirmation modal.

The work form has a callback on submit (UpdataWork). You need to modify that callback so that if the modal is not required the callback is UpdateWork, but if it is required it should open the modal instead.

Then you can make use of the callback in the modal to update the work.

graph TD;
    subgraph Work Form
        A[User Submits Work Form] -->|Needs Confirmation?| B{Check Confirmation}
        B -- No --> C[Call UpdateWork Directly]
        B -- Yes --> D[Open Confirmation Modal]
    end

    subgraph Confirmation Modal
        D --> E[User Confirms]
        E --> F[Call UpdateWork from Modal]
    end
Loading

@brendan-oconnell brendan-oconnell requested review from ja573 and removed request for ja573 April 10, 2025 08:05
@brendan-oconnell brendan-oconnell requested a review from ja573 April 14, 2025 16:13
@brendan-oconnell brendan-oconnell marked this pull request as ready for review April 15, 2025 08:44
@brendan-oconnell brendan-oconnell requested a review from ja573 April 18, 2025 11:13
@brendan-oconnell brendan-oconnell requested a review from ja573 April 23, 2025 13:49
@brendan-oconnell brendan-oconnell merged commit c6c3842 into develop Apr 24, 2025
12 checks passed
@brendan-oconnell brendan-oconnell deleted the feature/634_659_prevent_changing_work_status_back_prevent_post_publication_deletion branch April 24, 2025 08:45
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.

Prevent post-publicaiton deletion of works Prevent changing the work status back to forthcoming/cancelled/postponed once it's active

3 participants