fix(dispense): make Manual "Qty to Dispense" editable again - #165
fix(dispense): make Manual "Qty to Dispense" editable again#165gkbishnoi07 wants to merge 1 commit into
Conversation
The Material -> Zard migration changed this field from [disabled]="!batch.value.batchNo" (a no-op on reactive-form controls, so it was always editable) to [readonly]="!batch.value.batchNo", which the DOM honours - so the field became read-only until a batch was picked. Remove the gate to restore the long-standing always-editable behaviour. Fixes MMU bugfest [33].
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



What
Restores the always-editable "Qty to Dispense" field in the Manual medicine-dispense batch selection.
Why
The Material → Zard migration changed this field from
[disabled]="!batch.value.batchNo"— a no-op on reactive-form controls, so it was always editable — to[readonly]="!batch.value.batchNo", which the DOM does honour. The field became read-only until a batch was selected, blocking manual dispensing.Fix
Remove the
[readonly]gate inmanual-medicine-dispense/select-batch/select-batch.component.html→ the field is editable again, matching long-standing behaviour.Testing
Pharmacist → Medicine Dispense → select a beneficiary → Manual Dispense → add an item → the "Qty to Dispense" field accepts input immediately, without first selecting a batch.
Fixes the MMU QA report: "Dispensed Quantity Field is Not Editable When 'Manual Issue' is Selected in the Pharmacist Module."