feat: show collateral in credit agreements#76
Conversation
ARDGBL-982 Update Deal Confirmation Page on platform
We want to ensure that when someone is confirming a deal, it shows all the collaterals, all the covenants, and all the details of the credit agreement, before someone confirms that deal, which would be created from the credit agreement in Jeshall. |
WalkthroughThe changes expand deal data extraction capabilities by introducing new API endpoints for collateral and covenant information, implementing comprehensive deal payload normalization logic with multi-source evaluation, and enhancing UI components to fetch and display extracted party and deal data with improved loading state management. Changes
Sequence DiagramsequenceDiagram
actor User
participant ExtractionReviewModal
participant useExtractionDealCreation
participant IngestionAPI
participant Backend
User->>ExtractionReviewModal: Opens modal
ExtractionReviewModal->>ExtractionReviewModal: useEffect triggered
par Parallel Fetching
ExtractionReviewModal->>IngestionAPI: getDocumentCollaterals()
ExtractionReviewModal->>IngestionAPI: getDocumentCovenants()
ExtractionReviewModal->>useExtractionDealCreation: Evaluate extraction sources
end
IngestionAPI->>Backend: GET /documents/{id}/collaterals
IngestionAPI->>Backend: GET /documents/{id}/covenants
Backend-->>IngestionAPI: Return collateral data
Backend-->>IngestionAPI: Return covenant data
useExtractionDealCreation->>useExtractionDealCreation: Normalize extraction payload<br/>(multi-source evaluation)
useExtractionDealCreation->>useExtractionDealCreation: Score candidates<br/>(principal, names, etc.)
useExtractionDealCreation->>useExtractionDealCreation: Select best deal payload
IngestionAPI-->>ExtractionReviewModal: CollateralQueryResponse
IngestionAPI-->>ExtractionReviewModal: CovenantQueryResponse
useExtractionDealCreation-->>ExtractionReviewModal: Processed deal data +<br/>party information
ExtractionReviewModal->>User: Display collaterals,<br/>covenants & matched deals
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Free ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.