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

HLM-3103:: Changes in validation messages and eligibility check nee… #289

Merged
merged 5 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ class _ReferBeneficiaryPageState extends LocalizedState<ReferBeneficiaryPage> {
label: localizations.translate(
i18.referBeneficiary.referredByLabel,
),
validationMessages: {
'required': (_) => localizations.translate(
i18.common.corecommonRequired,
),
},
isRequired: true,
),
DigitTextFormField(
Expand All @@ -249,7 +254,8 @@ class _ReferBeneficiaryPageState extends LocalizedState<ReferBeneficiaryPage> {
readOnly: false,
validationMessages: {
'required': (_) => localizations.translate(
i18.common.corecommonRequired,
i18.referBeneficiary
.facilityValidationMessage,
),
},
onTap: () async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1012,4 +1012,5 @@ class ReferBeneficiary {
String get reasonForReferral => 'REASON_FOR_REFERRAL';
String get referralComments => 'REFERRAL_COMMENTS';
String get referralDetails => 'REFERRAL_DETAILS_HEADER';
String get facilityValidationMessage => 'PLEASE_ENTER_VALID_FACILITY';
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ class MemberCard extends StatelessWidget {
icon: Icons.info_rounded,
iconSize: 20,
iconText: localizations.translate(
isBeneficiaryReferred
isNotEligible
? i18.householdOverView
.householdOverViewBeneficiaryReferredLabel
: isNotEligible
.householdOverViewNotEligibleIconLabel
: isBeneficiaryReferred
? i18.householdOverView
.householdOverViewNotEligibleIconLabel
.householdOverViewBeneficiaryReferredLabel
: isBeneficiaryRefused
? Status.beneficiaryRefused.toValue()
// [TODO Need to update the localization]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class DigitRadioButtonList<T> extends StatelessWidget {
if (radioListControl.hasErrors) {
return Text(
errorMessage,
style: TextStyle(color: DigitTheme.instance.colorScheme.error),
style: TextStyle(
color: DigitTheme.instance.colorScheme.error, fontSize: 12),
);
} else {
return const SizedBox.shrink();
Expand Down