Repository navigation
319 item splitting and granular allocation - #331
Conversation
✅ Deploy Preview for hope-for-haiti ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Greptile SummaryThis PR implements a "Split by Quantity" feature that splits an unallocated line item into multiple sub-items whose quantities sum to the original, backed by a transactional service method with a One P1 fix is needed before merge:
PR Checklist areas needing improvement (score: 82/100):
Confidence Score: 4/5One P1 runtime crash in the split-count input needs fixing before merge. The service layer and API handler are well-structured with proper transactions, row-locking, and validation. The single P1 bug — src/components/chips/LineItemChipGroup.tsx — missing Important Files Changed
|
|
Changes look great, splitting quantities works well. However, we had some requirement changes after this ticket was assigned. The current implementation allows users to split one line item into two. We want to allow users to split a line item into however many line items they want. Please alter the current implementation to have a field asking how many line items the user would like to split the selected line item into. Based on the number they input, have that number of fields pop up, so that the user can submit a specified number for each line item they are planning to create. For example, if the user inputs 4, we should have 4 fields pop up: Line Item 1: ____ 4 is including the original line item selected, so Line Item 1 is really just altering the selected line item, while the other are creating duplicate line items of inputted quantity. For data validation, ensure that all inputted quantities are positive, and the split up quantities add up to the original amount. We also want to cap the number of splits the user can make at a time. So have the # of splits field range be between 2-7. |
|
great work with all the data validations, feature works flawlessly |
Description
Resolves ticket number: #319
Explain what your code changes:
[lineItemId]/route.ts:
LineItemChipGroup.tsx:
List the steps you took to test your code:
Added mock information into Allocation View and tested splits

Checklist