Skip to content

MXWAR-89: integrate provisioning entries list API#118

Merged
IOhacker merged 1 commit into
openMF:devfrom
Flashl3opard:MXWAR-89-provisioning-entries-list
May 23, 2026
Merged

MXWAR-89: integrate provisioning entries list API#118
IOhacker merged 1 commit into
openMF:devfrom
Flashl3opard:MXWAR-89-provisioning-entries-list

Conversation

@Flashl3opard
Copy link
Copy Markdown
Contributor

@Flashl3opard Flashl3opard commented May 19, 2026

Jira : MXWAR-89

Description

This PR integrates the Provisioning Entries listing flow with the backend API and introduces the initial Create Provisioning Entry page and routing structure.

The update improves the accounting provisioning workflow by enabling API-driven rendering and preparing the UI flow for provisioning entry creation.

Screenshots, if any

before

Screenshot 2026-05-18 200010 Screenshot 2026-05-18 200018

After

Screenshot 2026-05-19 125056

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • If you have multiple commits please combine them into one commit by squashing them.

  • Read and understood the contribution guidelines at CONTRIBUTING.md.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a new page to create provisioning entries with date selection and optional journal entry creation feature
    • Updated provisioning entries list to display live data with pagination support
    • Added search and filter capabilities to the provisioning entries list
    • Improved user feedback with loading states and error messaging

Review Change Stack

Copilot AI review requested due to automatic review settings May 19, 2026 07:30
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

📝 Walkthrough

Walkthrough

This PR adds provisioning entry creation functionality and converts the existing provisioning entries list to live API-backed pagination. A new CreateProvisioningEntry page loads criteria on mount, renders a form with date and checkbox inputs, and submits to create entries. The ProvisioningEntries list migrates from static seed data to async API fetching with loading/error state handling. Both pages are integrated into routing.

Changes

Provisioning Entries Create and List Enhancement

Layer / File(s) Summary
Create Provisioning Entry Form and Submission Flow
src/pages/accounting/provisioning-entries/CreateProvisioningEntry.tsx
New component imports API clients, loads provisioning criteria on mount via useEffect, renders a form with date input and createJournalEntries checkbox, validates and submits to create entries, parses Axios error responses for user-facing messages, and navigates to the list on success.
Provisioning Entries List API Migration
src/pages/accounting/provisioning-entries/ProvisioningEntries.tsx
Replaces static seed data with live API-backed pagination: adds ProvisioningEntriesApi client, defines async useEffect to fetch paged results with cancellation handling, applies client-side createdUser filtering, and updates table body rendering to show loading/error/empty states and map API row fields (createdDate, journalEntry) to display columns.
Router Configuration for Create Route
src/router/AppRoutes.tsx
Imports CreateProvisioningEntry component and registers a new route at /accounting/provisioning-entries/create.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • IOhacker

Poem

🐰 A new form takes shape with criteria in tow,
Live data now flows where static did go,
From create to list, the dance is in place,
Provisioning entries sprint at a brisker pace! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the PR, which is integrating the Provisioning Entries list API with the frontend. The changes primarily involve fetching live data from the ProvisioningEntriesApi and updating the UI accordingly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
src/pages/accounting/provisioning-entries/ProvisioningEntries.tsx (1)

91-96: 💤 Low value

Client-side filtering only applies to the current page.

The searchTerm filter operates on the fetched page data, so users won't see matches from other pages. If server-side filtering by createdUser is supported by the API, consider passing it as a query parameter for more complete results.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/accounting/provisioning-entries/ProvisioningEntries.tsx` around
lines 91 - 96, The client-side search currently filters only the currently
fetched page because filtered and visibleRows operate on entries (the current
page) using searchTerm; update the data-fetch flow to apply searchTerm on the
server instead of filtering locally — e.g., pass searchTerm (createdUser) as a
query param when fetching entries so the API returns paginated results already
filtered, then remove or bypass the local filtered/visibleRows logic (variables:
filtered, visibleRows, entries, searchTerm, totalPages, itemsPerPage) and ensure
total is driven by the server’s filtered count to keep pagination accurate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/pages/accounting/provisioning-entries/ProvisioningEntries.tsx`:
- Around line 91-96: The client-side search currently filters only the currently
fetched page because filtered and visibleRows operate on entries (the current
page) using searchTerm; update the data-fetch flow to apply searchTerm on the
server instead of filtering locally — e.g., pass searchTerm (createdUser) as a
query param when fetching entries so the API returns paginated results already
filtered, then remove or bypass the local filtered/visibleRows logic (variables:
filtered, visibleRows, entries, searchTerm, totalPages, itemsPerPage) and ensure
total is driven by the server’s filtered count to keep pagination accurate.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8771aa26-c6b1-4d94-a07e-21b60caafa8c

📥 Commits

Reviewing files that changed from the base of the PR and between de779c0 and b478baf.

📒 Files selected for processing (3)
  • src/pages/accounting/provisioning-entries/CreateProvisioningEntry.tsx
  • src/pages/accounting/provisioning-entries/ProvisioningEntries.tsx
  • src/router/AppRoutes.tsx

@Flashl3opard
Copy link
Copy Markdown
Contributor Author

Hi @alberto-art3ch @IOhacker 👋
Could you kindly review this PR when you have a moment? I’d really appreciate your feedback.
Thank you!

Copy link
Copy Markdown
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

LGTM

@IOhacker IOhacker merged commit b3c1476 into openMF:dev May 23, 2026
3 checks passed
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.

2 participants