Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5675.2 link requisition modal #6330

Merged
merged 11 commits into from
Jan 30, 2025
Merged

5675.2 link requisition modal #6330

merged 11 commits into from
Jan 30, 2025

Conversation

roxy-dao
Copy link
Contributor

@roxy-dao roxy-dao commented Jan 29, 2025

Part of #5675

πŸ‘©πŸ»β€πŸ’» What does this PR do?

  • Columns displaying existing Internal Orders for the supplier if they exist for users to link to the Internal Order
  • Show table of Internal Orders if there are Internal Orders being sent to selected supplier and the preference is on
  • Clicking on a row in this table will link the Internal selected to the invoice
  • Next button allows users to create a normal Inbound Shipment without linking IO

πŸ§ͺ Testing

  • Have the store pref Link requisition to Supplier Invoice turned off
  • Try create Inbound Shipments from suppliers both with/without Internal Orders
  • Should be able to create Inbound Shipments
  • Now turn on store pref -> Sync -> possibly log out and log back in to be extra sure the pref has been synced through
  • Create IS from suppliers with/without Internal Orders
  • For suppliers with Internal Orders, another modal should pop up for you to select the Internal Order you wish to link
  • Clicking on a row here will create an Inbound Shipment linked to the selected IO (Can confirm from Related documents section of the More panel
  • Clicking on Next will allow you to create an Inbound Shipment without linking an Internal Order
  • For suppliers without Internal Orders, should be redirected to Inbound Shipment as per usual workflow

πŸ“ƒ Documentation

  • Part of an epic: documentation will be completed for the feature as a whole
  • No documentation required: no user facing changes or a bug fix which isn't a change in behaviour
  • These areas should be updated or checked:
    1.
    2.

@github-actions github-actions bot added Release Testing For Release Testing issues, created for testing suites Build Tested: Issues Found Issue has been build tested with new issue(s) made for failed tests. Tester: Anusha Tester: Santosh Tester: Maria Tester: Alain Alain is testing this labels Jan 29, 2025
Comment on lines +77 to +81
useEffect(() => {
if (name && (data?.totalCount === 0 || !manuallyLinkInternalOrder)) {
createInvoice(name.id);
}
}, [name, data]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried to think of a way of doing this without useEffect... but.. yeah can't call in the supplier's modal onChange since it will never stay on the 'list view' page

const { Modal } = useDialog({ isOpen, onClose });

const columns = useColumns<LinkedRequestRowFragment>([
{
Copy link
Contributor Author

@roxy-dao roxy-dao Jan 29, 2025

Choose a reason for hiding this comment

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

Have removed the selection box from design and have used onRowClick instead as per our pattern. Design also doesn't allow users to create an IS without linking from this modal. SO have added a next button with message to state what it does

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great! On first pass, it wasn't obvious to me that the next button would allow you to create a linked in bound shipment. I wonder if maybe some UX to show this better?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind! I just saw now your latest commit adds messaging

Copy link
Contributor

Choose a reason for hiding this comment

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

I am still thinking a different text for next button would be better (and then doesn't require messaging) would be preferred - but this still works great

Copy link
Contributor Author

@roxy-dao roxy-dao Jan 30, 2025

Choose a reason for hiding this comment

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

Continue or next. Either way it's not clear and we don't wanna put lots of text into a button

Copy link

github-actions bot commented Jan 29, 2025

Bundle size difference

Comparing this PR to main

Old size New size Diff
5.26 MB 5.26 MB 3.32 KB (0.06%)

@github-actions github-actions bot added this to the v2.6.0 milestone Jan 29, 2025
@github-actions github-actions bot added enhancement New feature or request Team Ruru πŸ¦‰ Roxy, Ferg, Noel feature: CIV labels Jan 29, 2025
@roxy-dao roxy-dao removed Release Testing For Release Testing issues, created for testing suites Build Tested: Issues Found Issue has been build tested with new issue(s) made for failed tests. Tester: Anusha Tester: Santosh Tester: Maria Tester: Alain Alain is testing this labels Jan 29, 2025
@fergie-nz fergie-nz self-assigned this Jan 30, 2025
Base automatically changed from 5675.1-pass-requisition-id-on-insert-inbound to develop January 30, 2025 19:01
@@ -1193,6 +1194,7 @@
"message.confirm-delete-encounter": "Are you sure?",
"message.confirm-save-new": "Click OK to save the new item, or Cancel to continue editing",
"message.contact-support": "Please contact [email protected] about configuring reports",
"message.continue-to-make-inbound-shipment": "Click Next to continue to make an Inbound Dhipment without linking an Internal Order.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo on Shipment :)

Copy link
Contributor Author

@roxy-dao roxy-dao Jan 30, 2025

Choose a reason for hiding this comment

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

Spelling is hard Ferg 🀣

Copy link
Contributor

@fergie-nz fergie-nz left a comment

Choose a reason for hiding this comment

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

Looks awesome, thanks Roxy.

Approved but FYI typo on the translation string

@roxy-dao roxy-dao merged commit 01ad9b4 into develop Jan 30, 2025
3 checks passed
@roxy-dao roxy-dao deleted the 5675.2-link-requisition-modal branch January 30, 2025 20:40
@roxy-dao roxy-dao mentioned this pull request Feb 3, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: CIV Team Ruru πŸ¦‰ Roxy, Ferg, Noel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants