OBPIH-7856 Improve the table styling (fixes after QA)#6006
Conversation
16c38d0 to
2e295e4
Compare
There was a problem hiding this comment.
At the moment we calculate and disable rows in a similar way to the old workflow.
quantityReceived and quantityCanceled are now summed from previousReceiptItems, which contain only receipts with the RECEIVED status (there is also a CANCELED receipt status, but it is never used). This is equivalent to the old workflow, where we filter receipt items by the RECEIVED status. In the old workflow this is done on the backend:
Integer getQuantityReceived() {
if (isSplitItem) {
return 0
}
def receiptItems = getReceiptItemsByStatus([ReceiptStatusCode.RECEIVED] as ReceiptStatusCode[])
return receiptItems ? receiptItems?.sum { it?.quantityReceived ?: 0 } : 0
}
Integer getQuantityCanceled() {
if (isSplitItem) {
return 0
}
def receiptItems = getReceiptItemsByStatus([ReceiptStatusCode.RECEIVED] as ReceiptStatusCode[])
return receiptItems ? receiptItems?.sum { it?.quantityCanceled ?: 0 } : 0
}
Finally, the decision whether a row should be disabled is:
isCompleted: quantityPreviouslyReceived >= shipmentItem.quantity
which is equivalent to the old workflow's check:
if (fieldValue && subfield) {
return (_.toInteger(fieldValue.quantityReceived) + _.toInteger(fieldValue.quantityCanceled))
>= _.toInteger(fieldValue.quantityShipped);
}
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/receiving-redesign #6006 +/- ##
=============================================================
Coverage ? 11.09%
Complexity ? 1771
=============================================================
Files ? 853
Lines ? 48363
Branches ? 11346
=============================================================
Hits ? 5368
Misses ? 42124
Partials ? 871 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| .rt-table { | ||
| max-height: 600px; | ||
| overflow-y: auto; | ||
| } | ||
|
|
||
| .rt-thead { | ||
| position: sticky; | ||
| top: 0; | ||
| z-index: 3; | ||
| height: 100%; | ||
| background-color: white; | ||
| } |
There was a problem hiding this comment.
I had to change these styles because without them the pinned columns didn't work, see:
2026-07-01.09-39-24.mp4
There was a problem hiding this comment.
Virtualization still works correctly, see:
2026-07-01.09-40-29.mp4
# Conflicts: # src/js/hooks/receiving/v2/useReceivingActions.js # src/js/hooks/receiving/v2/useReceivingColumns.jsx
9db06b8 to
6acc07d
Compare

✨ Description of Change
Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-7856
Description:
📷 Screenshots & Recordings (optional)