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

fix(invoices): only show item error if configured #1047

Merged

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Dec 12, 2016

This commit ensures that the global error message is only shown if there
is no sales account after the item has been configured. Previously,
this resulted in showing large error messages during perfectly normal
operation.

Closes #1046.

hiddenerrorswheninvoicenotconfigured
Fig 1: Hidden Errors when Items not Configured

visibleerrorswheninvoiceconfigured
Fig 2: Visible Errors when Items missing Sales Account)


Thank you for contributing!

Before submitting this pull request, please verify that you have:

  • Run your code through JSHint. Check out our styleguide.
  • Run integration tests.
  • Run end-to-end tests.
  • Accurately described the changes your are making in this pull request.

For a more detailed checklist, see the official review checklist that this PR will be evaluated against.

Ensuring that the above checkboxes are completed will help speed the review process and help build a stronger application. Thanks!

@jniles jniles added the Bug Fix label Dec 12, 2016
@jniles jniles requested a review from sfount December 12, 2016 09:04
This commit ensures that the global error message is only shown if there
is no sales account _after_ the item has been configured.  Previously,
this resulted in showing large error messages during perfectly normal
operation.

Closes Third-Culture-Software#1046.
@jniles jniles force-pushed the fix-patient-invoice-fatal-errors branch from 5c08e0c to a995858 Compare December 13, 2016 12:35
Copy link
Contributor

@sfount sfount left a comment

Choose a reason for hiding this comment

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

This will result in a much clearer UX.

if (!row._hasSalesAccount) {
// this sets the global configuration error if there is no sales account
// and the row has already been configured.
if (row._initialised && !row._hasSalesAccount) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@sfount sfount merged commit 2105991 into Third-Culture-Software:master Dec 15, 2016
@jniles jniles deleted the fix-patient-invoice-fatal-errors branch December 15, 2016 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants