Skip to content

LIMS-2120: Hide courier fields if using facility account#1050

Open
ndg63276 wants to merge 2 commits intomasterfrom
improvement/LIMS-2120/hide-courier-fields-if-using-facility-account
Open

LIMS-2120: Hide courier fields if using facility account#1050
ndg63276 wants to merge 2 commits intomasterfrom
improvement/LIMS-2120/hide-courier-fields-if-using-facility-account

Conversation

@ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-2120

Summary:

When making a shipment, we should detect if the lab contact is in the UK, and academic. Then we can present the button to say "Use Facility Account", and if they do, we can hide all the courier fields.

Changes:

  • Remove "Return Lab Contact" field from add shipment page, just use the outgoing lab contact for return
  • Move the courier name and account number fields up, and display a "Use facility account" button if UK/EU & academic
  • If the Ts & Cs are accepted, pass that to the backend when the shipment is created
  • Also hide all the courier fields on the Add Shipment page
  • Hide the courier fields on the View Shipment page (if the user has selected to use facility account)

To test:

  • Go to any proposal, edit the lab contacts so that one is UK based, one is EU based (as per $facility_courier_countries_nde), and one is non-EU
  • Go to Shipments and then Add Shipment, give it a name, a dewar code, and choose UDC for simplicity
  • Select the UK based lab contact, check the "Use Facility Account" button is displayed
  • Select the EU based lab contact, check the "Use Facility Account" button is displayed
  • Select the non-EU based lab contact, check the "Use Facility Account" button is not displayed
  • Go back to the UK lab contact, and click "Use Facility Account". Check all the courier fields disappear and it just says "Paid for by facility"
  • Click the "Add Shipment" button at the bottom, and you will be taken to the view shipment page. Check no courier fields are shown at the top of the page
  • Click "Create DHL Air Waybill", check it already says "Paid for by Facility"
  • Repeat shipment creation without clicking "Use Facility Account". Check all the courier fields are shown on the View Shipment page.
  • Click "Create DHL Air Waybill" or "Dispatch" (if non-EU) and check it asks for full courier details
  • Go to an "in" or "sw" proposal, check the "Use Facility Account" button is not shown when creating a shipment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant