OBPIH-7856 Improve the table styling (fixes after QA) by SebastianLib · Pull Request #6006 · openboxes/openboxes · GitHub
Skip to content

OBPIH-7856 Improve the table styling (fixes after QA)#6006

Merged
alannadolny merged 2 commits into
feature/receiving-redesignfrom
feature/OBPIH-7856-2
Jul 2, 2026
Merged

OBPIH-7856 Improve the table styling (fixes after QA)#6006
alannadolny merged 2 commits into
feature/receiving-redesignfrom
feature/OBPIH-7856-2

Conversation

@SebastianLib

Copy link
Copy Markdown
Collaborator

✨ Description of Change

Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-7856

Description:


📷 Screenshots & Recordings (optional)

@github-actions github-actions Bot added type: feature A new piece of functionality for the app domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization labels Jul 1, 2026
@SebastianLib SebastianLib force-pushed the feature/OBPIH-7856-2 branch from 16c38d0 to 2e295e4 Compare July 1, 2026 08:06
Comment on lines +45 to +54

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feature/receiving-redesign@0a4c516). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +46 to +57
.rt-table {
max-height: 600px;
overflow-y: auto;
}

.rt-thead {
position: sticky;
top: 0;
z-index: 3;
height: 100%;
background-color: white;
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I had to change these styles because without them the pinned columns didn't work, see:

2026-07-01.09-39-24.mp4

Comment on lines +60 to +62

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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
@SebastianLib SebastianLib force-pushed the feature/OBPIH-7856-2 branch from 9db06b8 to 6acc07d Compare July 2, 2026 09:09
@alannadolny alannadolny merged commit 33a4ade into feature/receiving-redesign Jul 2, 2026
7 checks passed
@alannadolny alannadolny deleted the feature/OBPIH-7856-2 branch July 2, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization type: feature A new piece of functionality for the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants