Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5412: Extend date picker to support disabling r=jniles a=jmcameron This PR extends the bhDatePicker component to support disabling the field. Closes Third-Culture-Software#5388 To use this feature: when setting up the bh-date-picker component, add this parameter: disabled="obj.disabled" Where "obj" is the input field for the date picker and 'disabled' is a variable in the object that evaluates to **true** when the field should be disabled. This should be backwards compatible. This is currently implemented for the Stock entry page (when selecting/creating lots). You can see examples of its use in - client/src/modules/stock/entry/modals/lots.modal.js (search for 'disabled') - client/src/modules/stock/entry/modals/templates/lot.expiration.tmpl.html **TESTING** - Use any database (eg, bhima_test) - Use Stock > Lots to find an inventory item that has lots that are not expired (for bhima_test, try inventory Item: Vitamines B1+B6+B12 - Go to Stock > Entry - Use integration - Do "Add" and select the inventory item from the previous step - Click on the "Lots" field to get the lot selection/creation modal - On the first row, notice that the expiration date can be changed. - Select one of the existing lots using the lot selection typeahead - Notice that the expiration date has been overwriten and cannot be modified. Co-authored-by: Jonathan Cameron <jmcameron@gmail.com>
- Loading branch information