Skip to content

VSN-2045 : Integrating feature of updating a prepared circuit.

yassine.elazami a demandé de fusionner VSN-2045 vers develop

Merge Request Summary

Feature: Prepared Circuit Update Integration (Backend & Frontend)

This merge request introduces full support for updating prepared circuits by extending backend APIs, frontend store logic, and component-level integrations. The work ensures that circuit updates are handled consistently across preparation and non-preparation contexts, with a dynamic behavior driven by the preparation state.


Scope of Changes

Backend

  • New Update Endpoint

    • Added a dedicated endpoint to handle prepared circuit update requests.
    • Ensures separation of concerns between creation and update operations.
  • Service Layer Enhancements

    • Introduced a new update method signature at the service/store level.
    • Ensures a clear contract for circuit update operations.
    • Supports future extensibility for additional validation or business rules.
  • Implementation Logic

    • Implemented the update logic in the store/service layer.
    • Handles data persistence and consistency checks during circuit updates.
    • Ensures that prepared circuits are updated correctly without impacting finalized circuits.

Frontend

  • Store Integration

    • Added an update method signature to the prepared circuit store definition.
    • Implemented the update API call within the store layer.
    • Centralizes update logic and keeps components thin and focused.
  • Component Integration

    • Retrieved the update function from the store in the relevant components.
    • Enabled components to trigger circuit updates directly through the centralized store logic.
  • Dynamic Update Behavior

    • Implemented conditional logic to decide between create or update actions.
    • The decision is based on the preparation flag status.
    • Ensures the correct workflow is applied depending on whether the circuit is in preparation mode or finalized mode.

Key Benefits

  • Clear separation between creation and update flows.
  • Consistent API and store contracts for circuit updates.
  • Dynamic behavior aligned with preparation state, reducing duplication and conditional complexity.
  • Improved maintainability by centralizing update logic in the store/service layers.
  • Scalable foundation for future enhancements around prepared circuit lifecycle management.

Related Commits Overview

  • Added update endpoint for prepared circuits.
  • Defined update method signatures in store and service layers.
  • Implemented update logic in the store.
  • Integrated update function into UI components.
  • Applied dynamic logic to trigger update based on preparation status.

This MR completes the update workflow for prepared circuits, ensuring end-to-end consistency from API exposure to UI interaction.

Closes VSN-2045

Rapports de requête de fusion