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

bug(inventory): ui-selects are buggy #1720

Closed
jniles opened this issue May 31, 2017 · 0 comments · Fixed by #1867
Closed

bug(inventory): ui-selects are buggy #1720

jniles opened this issue May 31, 2017 · 0 comments · Fixed by #1867

Comments

@jniles
Copy link
Collaborator

jniles commented May 31, 2017

In the Inventory Group management page, the ui-selects are a bit buggy. Specifically:

  1. They do not order the accounts correctly - they order by number instead of by the account tree.
  2. After selecting an account, the number and label do not line up.

See the two problems below:
inventoryaccountorderingbug
Fig 1: Inventory Account Ordering Bug - these should be grouped by Title Account

inventoryaccountrenderingbug
Fig 2: Inventory Account Rendering Bug - the labels and numbers should line up.

Fixes
Thankfully, these are easy to fix. Here is what needs to happen:

  1. The AccountService gives us the option to use Accounts.order(accounts) on an array of accounts to put them in the correct order. The solution will look like this:
Accounts.read()
.then(function (accounts) {
 // before
 vm.accounts = accounts;

 // after
 vm.accounts = Accounts.order(accounts);
});

See the bhAccountSelect code for how it solves this issue.

  1. The only problem with the rendering is that there the entire ui-select default choice should be wrapped in a <span> element. That should fix the view rendering.
bors bot added a commit that referenced this issue Jul 18, 2017
1866: feat(patients): accept any document upload r=jniles

This commit allows any document to be uploaded and attached to a
patient.  It also updates the document upload modal with the latest
header crumb and translate directives.

Closes #1823

1867: Fix: ui select option rendering r=jniles

For some reason, a `ui-select` can only have a single `<span>` element within due to a miscreated CSS selector in the bootstrap css theme.  Otherwise, the text is not labeled on the same line and is misaligned.  This PR fixes those issues in the prices.html file and the inventory management page.

It also uses the `translate` directive where applicable.

Closes #993.  Closes #1720.

1874: fix: allow navigation to settings after 403 error r=jniles

This commit fixes a small bug does not a user log out after they have
hit the 403 state.

Closes #1862.
@bors bors bot closed this as completed in #1867 Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant