Skip to content

Commit

Permalink
Merge branch 'HLM-2650-resource-card-multiround' of https://github.co…
Browse files Browse the repository at this point in the history
…m/egovernments/health-campaign-field-worker-app into HLM-2650-resource-card-multiround-proximity
  • Loading branch information
naveen-egov committed Oct 6, 2023
2 parents 99a2986 + afc6e40 commit 4679752
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ class _DoseAdministeredPageState extends LocalizedState<DoseAdministeredPage> {
margin: const EdgeInsets.only(top: kPadding),
child: DigitElevatedButton(
onPressed: () {
if (form.control(_doseAdministeredKey).value == null) {
form
.control(_doseAdministeredKey)
.setErrors({'': true});
}
form.markAllAsTouched();
if (!form.valid) return;

final bloc =
context.read<DeliverInterventionBloc>().state;
final event = context.read<DeliverInterventionBloc>();
Expand Down Expand Up @@ -300,7 +308,10 @@ class _DoseAdministeredPageState extends LocalizedState<DoseAdministeredPage> {

FormGroup buildForm(BuildContext context) {
return fb.group(<String, Object>{
_doseAdministeredKey: FormControl<KeyValue>(value: null),
_doseAdministeredKey: FormControl<KeyValue>(
value: Constants.yesNo[0],
validators: [Validators.required],
),
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ class _RecordPastDeliveryDetailsPageState
final bloc =
context.read<HouseholdOverviewBloc>();

bloc.add(HouseholdOverviewReloadEvent(
projectId: context.projectId,
projectBeneficiaryType: context.beneficiaryType,
));
event.add(DeliverInterventionSearchEvent(
TaskSearchModel(
projectBeneficiaryClientReferenceId: bloc
Expand All @@ -125,10 +121,11 @@ class _RecordPastDeliveryDetailsPageState
.toList(),
),
));
Navigator.of(
ctx,
rootNavigator: true,
).pop();
context.router.popUntilRouteWithName(
SearchBeneficiaryRoute.name,
);
Navigator.of(ctx).pop();

router.push(
BeneficiaryDetailsRoute(),
);
Expand Down

0 comments on commit 4679752

Please sign in to comment.