Skip to content

fix(dispense): make Manual "Qty to Dispense" editable again - #165

Open
gkbishnoi07 wants to merge 1 commit into
angular-zard-migrationfrom
fix/manual-dispense-qty-editable
Open

fix(dispense): make Manual "Qty to Dispense" editable again#165
gkbishnoi07 wants to merge 1 commit into
angular-zard-migrationfrom
fix/manual-dispense-qty-editable

Conversation

@gkbishnoi07

Copy link
Copy Markdown

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 in manual-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."

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].
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 33af8bf6-7f31-4f47-90d9-be88abfdc5ff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant