Skip to content

Conversation

@ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-2022

Summary:

If a shipment doesn't have a lab contact or a safety level, currently the "Create Air Way Bill" and "Print Shipment Labels" buttons are hidden. They should be displayed, and show an error when clicked to say why they are disabled.

Changes:

  • Update the shipment model to reflect that safety level is required, while return lab contact is optional. Add human readable messages.
  • Remove the logic that hides the buttons
  • Add functions to the Create AWB and Print Labels buttons, so they validate the model, and either display the error or continue to the relevant URL
  • Update the message at the top of the page to cope with the shipping service being enabled, and to not hard code the required fields

To test:

  • View a shipment with no Outgoing Lab Contact or Safety Level (or set to null, or upload a CSV to create one)
  • Click "Print Shipment Labels" or "Create DHL Air Waybill" check an error message appears
  • Check "Print Contents" and "Mark as Sent" work anyway (and status changes to "sent to facility")
  • Fix the problem(s), check the "Print Shipment Labels" and "Create DHL Air Waybill" buttons now work
  • If $use_shipping_service_redirect_incoming_shipments is not set to True, set it to True and go through the process using the shipping service (on a new shipment if needed).
  • Check the button now changes to "Manage Shipment Booking" and the green text at the top reflects this.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants