Add stock transfer cancelled message in ResourceListItem > shipment#1080
Merged
Add stock transfer cancelled message in ResourceListItem > shipment#1080
Conversation
✅ Deploy Preview for commercelayer-app-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
1c77c5b to
ae536ed
Compare
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a UI indicator for shipments whose associated stock transfers are all cancelled, and introduces a reusable helper for checking that condition.
Changes:
- Introduced
isAllStockTransfersCancelled(shipment)helper and exported it from the package entrypoint. - Updated shipment
ResourceListItemtransformer to display a “Stock transfer(s) cancelled” suffix when applicable. - Added EN/IT i18n strings and unit tests for the new helper, plus a new mock fixture.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/app-elements/src/ui/resources/ResourceListItem/transformers/shipments.tsx | Adds conditional additionalSuffix message for cancelled stock transfers. |
| packages/app-elements/src/ui/resources/ResourceListItem/ResourceListItem.mocks.ts | Adds a new shipment fixture with cancelled stock transfers; modifies an existing fixture. |
| packages/app-elements/src/main.ts | Re-exports the new helper as part of the public API surface. |
| packages/app-elements/src/locales/it.ts | Adds Italian translations + plural form for the new message. |
| packages/app-elements/src/locales/en.ts | Adds English translations + plural form for the new message. |
| packages/app-elements/src/helpers/shipments.ts | Adds isAllStockTransfersCancelled helper. |
| packages/app-elements/src/helpers/shipments.test.ts | Adds unit tests covering helper behavior across key edge cases. |
| event.json | Adds a new JSON file (appears unrelated to the PR’s stated purpose). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0cbce8d to
eb53531
Compare
malessani
previously approved these changes
Apr 14, 2026
pfferrari
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
We now show a "Stock transfer cancelled" message in the shipment list item when it has stock transfers and all of them are in status
cancelled.I've also added an exported helper
isAllStockTransfersCancelled(shipment)to be used in the shipments app details page.How to test
Checklist