Skip to content

Commit 9dfa071

Browse files
author
rachana-egov
committed
Pulled changes related to validations
1 parent 1c4d6e5 commit 9dfa071

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/complaints/lib/blocs/complaint_wrapper/complaint_wrapper_bloc.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class ComplaintWrapperBloc
4646
final searchParams = GlobalSearchParameters(
4747
filters: [
4848
SearchFilter(
49-
root: 'pgrService',
50-
field: 'tenantId',
49+
root: 'pgrComplainant',
50+
field: 'uuid',
5151
operator: 'equals',
52-
value: ComplaintsSingleton().tenantId,
52+
value: ComplaintsSingleton().loggedInUserUuid,
5353
),
5454
],
5555
primaryModel: 'pgrService',

packages/complaints/lib/data/transformer_config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final jsonConfig = {
2121
"auditDetails": "__generate:audit",
2222
"clientAuditDetails": "__generate:clientAudit",
2323
"uuid": "__context:userId",
24-
"userName": "__context:userId",
24+
"userName": "__context:userName",
2525
"type": "__value:EMPLOYEE"
2626
},
2727
"address": {

packages/digit_forms_engine/lib/helper/validator_helper.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ List<Validator<T>> buildValidators<T>(PropertySchema schema) {
1717
if (parsedValue != null) {
1818
validators.add(Validators.composeOR([
1919
Validators.minLength(parsedValue) as Validator<T>,
20-
Validators.equals(null),
20+
Validators.composeOR(
21+
[Validators.equals(''), Validators.equals(null)]),
2122
]) as Validator<T>);
2223
}
2324
}
@@ -30,7 +31,8 @@ List<Validator<T>> buildValidators<T>(PropertySchema schema) {
3031
schema.type != PropertySchemaType.integer) {
3132
validators.add(Validators.composeOR([
3233
Validators.maxLength(parsedValue) as Validator<T>,
33-
Validators.equals(null),
34+
Validators.composeOR(
35+
[Validators.equals(''), Validators.equals(null)]),
3436
]) as Validator<T>);
3537
}
3638
break;

packages/digit_forms_engine/lib/pages/forms_render.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,6 @@ class _FormsRenderPageState extends LocalizedState<FormsRenderPage> {
494494
.join(', ');
495495
} else if (rawValue is DateTime) {
496496
displayValue = dateFormatter.format(rawValue);
497-
} else if (rawValue is String && isDateTime(rawValue)) {
498-
displayValue = dateFormatter.format(DateTime.parse(rawValue));
499497
} else if (rawValue is String && isDateLike(rawValue)) {
500498
try {
501499
final parsed = parseDate(rawValue);

0 commit comments

Comments
 (0)