diff --git a/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml b/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml
index 6bdfc6e86..549ee11ab 100644
--- a/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml
+++ b/apps/health_campaign_field_worker_app/android/app/src/main/AndroidManifest.xml
@@ -11,6 +11,7 @@
+
diff --git a/apps/health_campaign_field_worker_app/lib/app.dart b/apps/health_campaign_field_worker_app/lib/app.dart
index 7d90ae5da..7472335aa 100644
--- a/apps/health_campaign_field_worker_app/lib/app.dart
+++ b/apps/health_campaign_field_worker_app/lib/app.dart
@@ -316,6 +316,8 @@ class MainApplicationState extends State
projectFacilityDataRepository: context.repository<
ProjectFacilityModel,
ProjectFacilitySearchModel>(),
+ facilityDataRepository: context.repository<
+ FacilityModel, FacilitySearchModel>(),
),
),
BlocProvider(
diff --git a/apps/health_campaign_field_worker_app/lib/data/local_store/app_shared_preferences.dart b/apps/health_campaign_field_worker_app/lib/data/local_store/app_shared_preferences.dart
index 45b30f76e..aa2e0972e 100644
--- a/apps/health_campaign_field_worker_app/lib/data/local_store/app_shared_preferences.dart
+++ b/apps/health_campaign_field_worker_app/lib/data/local_store/app_shared_preferences.dart
@@ -29,7 +29,8 @@ class AppSharedPreferences {
bool get isFirstLaunch => sharedPreferences.getBool(isFirstLaunchKey) ?? true;
- String? get getSelectedLocale => sharedPreferences.getString(userSelectedLocale);
+ String? get getSelectedLocale =>
+ sharedPreferences.getString(userSelectedLocale);
Future appLaunchedFirstTime() async {
await sharedPreferences.setBool(
@@ -44,5 +45,4 @@ class AppSharedPreferences {
localeString,
);
}
-
}
diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_view.dart b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_view.dart
index 8556c1163..21a3a507e 100644
--- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_view.dart
+++ b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_view.dart
@@ -138,7 +138,9 @@ class _ChecklistViewPageState extends LocalizedState {
}
// Request location from LocationBloc
- context.read().add(const LocationEvent.load());
+ context
+ .read()
+ .add(const LocationEvent.load());
// Wait for the location to be obtained
final locationState =
@@ -146,7 +148,6 @@ class _ChecklistViewPageState extends LocalizedState {
double? latitude = locationState.latitude;
double? longitude = locationState.longitude;
-
final shouldSubmit = await DigitDialog.show(
context,
options: DigitDialogOptions(
@@ -213,64 +214,68 @@ class _ChecklistViewPageState extends LocalizedState {
.text
.toString()
: null,
- additionalFields: ServiceAttributesAdditionalFields(
+ additionalFields:
+ ServiceAttributesAdditionalFields(
version: 1,
fields: [
AdditionalField(
- 'latitude', latitude,
+ 'latitude',
+ latitude,
),
AdditionalField(
- 'longitude', longitude,
+ 'longitude',
+ longitude,
),
],
),
- )
- );
+ ));
}
context.read().add(
ServiceCreateEvent(
serviceModel: ServiceModel(
- createdAt: DigitDateUtils
- .getDateFromTimestamp(
- DateTime.now()
- .toLocal()
- .millisecondsSinceEpoch,
- dateFormat: Constants
- .checklistViewDateFormat,
- ),
- tenantId: value
- .selectedServiceDefinition!
- .tenantId,
- clientId: isHealthFacilityWorker &&
- widget.referralClientRefId !=
- null
- ? widget.referralClientRefId
- .toString()
- : referenceId,
- serviceDefId: value
- .selectedServiceDefinition?.id,
- attributes: attributes,
- rowVersion: 1,
- accountId: context.projectId,
- auditDetails: AuditDetails(
- createdBy: context.loggedInUserUuid,
- createdTime: DateTime.now()
- .millisecondsSinceEpoch,
- ),
- clientAuditDetails:
- ClientAuditDetails(
- createdBy: context.loggedInUserUuid,
- createdTime: context
- .millisecondsSinceEpoch(),
- lastModifiedBy:
- context.loggedInUserUuid,
- lastModifiedTime: context
- .millisecondsSinceEpoch(),
- ),
- additionalDetails:
- context.boundary.code,
- ),
+ createdAt: DigitDateUtils
+ .getDateFromTimestamp(
+ DateTime.now()
+ .toLocal()
+ .millisecondsSinceEpoch,
+ dateFormat: Constants
+ .checklistViewDateFormat,
+ ),
+ tenantId: value
+ .selectedServiceDefinition!
+ .tenantId,
+ clientId: isHealthFacilityWorker &&
+ widget.referralClientRefId !=
+ null
+ ? widget.referralClientRefId.toString()
+ : referenceId,
+ serviceDefId: value.selectedServiceDefinition?.id,
+ attributes: attributes,
+ rowVersion: 1,
+ accountId: context.projectId,
+ auditDetails: AuditDetails(
+ createdBy:
+ context.loggedInUserUuid,
+ createdTime: DateTime.now()
+ .millisecondsSinceEpoch,
+ ),
+ clientAuditDetails: ClientAuditDetails(
+ createdBy:
+ context.loggedInUserUuid,
+ createdTime: context
+ .millisecondsSinceEpoch(),
+ lastModifiedBy:
+ context.loggedInUserUuid,
+ lastModifiedTime: context
+ .millisecondsSinceEpoch(),
+ ),
+ additionalDetails: {
+ "boundaryCode":
+ context.boundary.code,
+ "lat": latitude,
+ "lng": longitude
+ }),
),
);
@@ -397,7 +402,7 @@ class _ChecklistViewPageState extends LocalizedState {
Align(
alignment: Alignment.topLeft,
child: Padding(
- padding: const EdgeInsets.all(8),
+ padding: const EdgeInsets.all(kPadding * 2),
child: Column(
children: [
Text(
@@ -412,45 +417,89 @@ class _ChecklistViewPageState extends LocalizedState {
),
BlocBuilder(
builder: (context, state) {
+ // Validation logic to check if required field is empty
+ final hasError = (e.required == true &&
+ controller[index].text.isEmpty &&
+ submitTriggered);
+
return Column(
- children: e.values!
- .map((e) => DigitCheckboxTile(
- label: e,
- value: controller[index]
- .text
- .split('.')
- .contains(e),
- onChanged: (value) {
- context
- .read()
- .add(
- ServiceChecklistEvent(
- value: e.toString(),
- submitTriggered:
- submitTriggered,
- ),
- );
- final String ele;
- var val = controller[index]
- .text
- .split('.');
- if (val.contains(e)) {
- val.remove(e);
- ele = val.join(".");
- } else {
- ele =
- "${controller[index].text}.$e";
- }
- controller[index].value =
- TextEditingController
- .fromValue(
- TextEditingValue(
- text: ele,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ // Checkbox options
+ Column(
+ children: e.values!
+ .map((item) => Padding(
+ padding:
+ const EdgeInsets.only(
+ left: kPadding * 2),
+ child: DigitCheckboxTile(
+ label: item,
+ value: controller[index]
+ .text
+ .split('.')
+ .contains(item),
+ onChanged: (value) {
+ context
+ .read()
+ .add(
+ ServiceChecklistEvent(
+ value: item
+ .toString(),
+ submitTriggered:
+ submitTriggered,
+ ),
+ );
+
+ var val =
+ controller[index]
+ .text
+ .split('.');
+ if (val
+ .contains(item)) {
+ val.remove(item);
+ } else {
+ val.add(item);
+ }
+
+ // Update the controller with the selected values
+ controller[index]
+ .value =
+ TextEditingController
+ .fromValue(
+ TextEditingValue(
+ text: val.join('.'),
+ ),
+ ).value;
+
+ // If the field is required and no option is selected, trigger validation
+ if (e.required ==
+ true &&
+ val.isEmpty) {
+ submitTriggered =
+ true;
+ }
+ },
),
- ).value;
- },
- ))
- .toList(),
+ ))
+ .toList(),
+ ),
+ // Error message display if validation fails
+ Offstage(
+ offstage: !hasError,
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: Text(
+ localizations.translate(
+ i18.common.corecommonRequired,
+ ),
+ style: TextStyle(
+ color: theme.colorScheme.error,
+ ),
+ ),
+ ),
+ ),
+ ],
);
},
),
@@ -464,7 +513,7 @@ class _ChecklistViewPageState extends LocalizedState {
context,
),
),
- ]else if (e.dataType == 'Boolean') ...[
+ ] else if (e.dataType == 'Boolean') ...[
if (!(e.code ?? '').contains('.'))
DigitCard(
child: Column(
@@ -479,7 +528,8 @@ class _ChecklistViewPageState extends LocalizedState {
'${localizations.translate(
'${selectedServiceDefinition?.code}.${e.code}',
)} ${e.required == true ? '*' : ''}',
- style: theme.textTheme.headlineSmall,
+ style: theme
+ .textTheme.headlineSmall,
),
],
),
@@ -492,30 +542,46 @@ class _ChecklistViewPageState extends LocalizedState {
allowMultipleSelection: false,
width: 110,
valueMapper: (value) {
- return value ? localizations.translate(
- i18.common.coreCommonYes,
- ) : localizations.translate(
- i18.common.coreCommonNo,
- );
+ return value
+ ? localizations.translate(
+ i18.common
+ .coreCommonYes,
+ )
+ : localizations.translate(
+ i18.common.coreCommonNo,
+ );
},
- initialSelection: controller[index].text=='true' ? [true] : controller[index].text=='false' ?[false] : [],
- options: const [true, false], // TODO: need to update
+ initialSelection:
+ controller[index].text ==
+ 'true'
+ ? [true]
+ : controller[index]
+ .text ==
+ 'false'
+ ? [false]
+ : [],
+ options: const [
+ true,
+ false
+ ], // TODO: need to update
onSelectionChanged: (curValue) {
- if(curValue.isNotEmpty){
+ if (curValue.isNotEmpty) {
context
.read()
.add(
- ServiceChecklistEvent(
- value: curValue.toString(),
- submitTriggered:
- submitTriggered,
- ),
- );
- controller[index].value = TextEditingValue(
- text: curValue.first.toString(),
+ ServiceChecklistEvent(
+ value: curValue
+ .toString(),
+ submitTriggered:
+ submitTriggered,
+ ),
+ );
+ controller[index].value =
+ TextEditingValue(
+ text: curValue.first
+ .toString(),
);
}
-
},
);
},
diff --git a/apps/health_campaign_field_worker_app/lib/pages/home.dart b/apps/health_campaign_field_worker_app/lib/pages/home.dart
index 2e6ff96b8..5ad59140d 100644
--- a/apps/health_campaign_field_worker_app/lib/pages/home.dart
+++ b/apps/health_campaign_field_worker_app/lib/pages/home.dart
@@ -18,7 +18,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_background_service/flutter_background_service.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
-import 'package:health_campaign_field_worker_app/data/local_store/no_sql/schema/service_registry.dart';
import 'package:inventory_management/inventory_management.dart';
import 'package:inventory_management/router/inventory_router.gm.dart';
import 'package:referral_reconciliation/referral_reconciliation.dart';
@@ -32,6 +31,7 @@ import '../blocs/localization/localization.dart';
import '../blocs/sync/sync.dart';
import '../data/local_store/app_shared_preferences.dart';
import '../data/local_store/no_sql/schema/app_configuration.dart';
+import '../data/local_store/no_sql/schema/service_registry.dart';
import '../data/local_store/secure_store/secure_store.dart';
import '../models/entities/roles_type.dart';
import '../router/app_router.dart';
diff --git a/apps/health_campaign_field_worker_app/lib/pages/login.dart b/apps/health_campaign_field_worker_app/lib/pages/login.dart
index f0912efb5..cb1277d20 100644
--- a/apps/health_campaign_field_worker_app/lib/pages/login.dart
+++ b/apps/health_campaign_field_worker_app/lib/pages/login.dart
@@ -1,5 +1,7 @@
import 'package:digit_components/digit_components.dart';
+import 'package:digit_components/models/privacy_notice/privacy_notice_model.dart';
import 'package:digit_components/widgets/atoms/digit_toaster.dart';
+import 'package:digit_components/widgets/privacy_notice/privacy_component.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:reactive_forms/reactive_forms.dart';
@@ -11,7 +13,6 @@ import '../router/app_router.dart';
import '../utils/environment_config.dart';
import '../utils/i18_key_constants.dart' as i18;
import '../widgets/localized.dart';
-import '../widgets/privacy_notice/privacy_component.dart';
@RoutePage()
class LoginPage extends LocalizedStatefulWidget {
@@ -126,30 +127,33 @@ class _LoginPageState extends LocalizedState {
suffix: buildPasswordVisibility(),
),
BlocBuilder(
+ AppInitializationState>(
builder: (context, initState) {
- final privacyPolicyJson = initState.maybeWhen(
- initialized:
- (AppConfiguration appConfiguration, _, __) =>
- appConfiguration.privacyPolicyConfig,
- orElse: () => null);
- if (privacyPolicyJson?.active == false) {
- return const SizedBox.shrink();
- }
+ final privacyPolicyJson = initState.maybeWhen(
+ initialized:
+ (AppConfiguration appConfiguration, _, __) =>
+ appConfiguration.privacyPolicyConfig,
+ orElse: () => null);
+ if (privacyPolicyJson?.active == false) {
+ return const SizedBox.shrink();
+ }
- form.control(_privacyCheck).setValidators([Validators.requiredTrue]);
- form.control(_privacyCheck).updateValueAndValidity();
- return PrivacyComponent(
- privacyPolicy: privacyPolicyJson,
- formControlName: _privacyCheck,
- text: localizations
- .translate(i18.privacyPolicy.privacyNoticeText),
- linkText: localizations.translate(
- i18.privacyPolicy.privacyPolicyLinkText),
- validationMessage: localizations.translate(
- i18.privacyPolicy.privacyPolicyValidationText),
- );
- }),
+ form
+ .control(_privacyCheck)
+ .setValidators([Validators.requiredTrue]);
+ form.control(_privacyCheck).updateValueAndValidity();
+ return PrivacyComponent(
+ privacyPolicy:
+ convertToPrivacyPolicyModel(privacyPolicyJson),
+ formControlName: _privacyCheck,
+ text: localizations
+ .translate(i18.privacyPolicy.privacyNoticeText),
+ linkText: localizations.translate(
+ i18.privacyPolicy.privacyPolicyLinkText),
+ validationMessage: localizations.translate(
+ i18.privacyPolicy.privacyPolicyValidationText),
+ );
+ }),
const SizedBox(height: 16),
DigitElevatedButton(
onPressed: () {
@@ -159,16 +163,16 @@ class _LoginPageState extends LocalizedState {
FocusManager.instance.primaryFocus?.unfocus();
context.read().add(
- AuthLoginEvent(
- userId:
- (form.control(_userId).value as String)
- .trim(),
- password:
- (form.control(_password).value as String)
- .trim(),
- tenantId: envConfig.variables.tenantId,
- ),
- );
+ AuthLoginEvent(
+ userId:
+ (form.control(_userId).value as String)
+ .trim(),
+ password:
+ (form.control(_password).value as String)
+ .trim(),
+ tenantId: envConfig.variables.tenantId,
+ ),
+ );
},
child: Center(
child: Text(
@@ -224,16 +228,46 @@ class _LoginPageState extends LocalizedState {
}
FormGroup buildForm() => fb.group({
- _userId: FormControl(
- value: '',
- validators: [Validators.required],
- ),
- _password: FormControl(
- validators: [Validators.required],
- value: '',
- ),
- _privacyCheck: FormControl(
- value: false,
- )
- });
+ _userId: FormControl(
+ value: '',
+ validators: [Validators.required],
+ ),
+ _password: FormControl(
+ validators: [Validators.required],
+ value: '',
+ ),
+ _privacyCheck: FormControl(
+ value: false,
+ )
+ });
+}
+
+// convert to privacy notice model
+PrivacyNoticeModel? convertToPrivacyPolicyModel(PrivacyPolicy? privacyPolicy) {
+ return PrivacyNoticeModel(
+ header: privacyPolicy?.header ?? '',
+ module: privacyPolicy?.module ?? '',
+ active: privacyPolicy?.active,
+ contents: privacyPolicy?.contents
+ ?.map((content) => ContentNoticeModel(
+ header: content.header,
+ descriptions: content.descriptions
+ ?.map((description) => DescriptionNoticeModel(
+ text: description.text,
+ type: description.type,
+ isBold: description.isBold,
+ subDescriptions: description.subDescriptions
+ ?.map((subDescription) => SubDescriptionNoticeModel(
+ text: subDescription.text,
+ type: subDescription.type,
+ isBold: subDescription.isBold,
+ isSpaceRequired:
+ subDescription.isSpaceRequired,
+ ))
+ .toList(),
+ ))
+ .toList(),
+ ))
+ .toList(),
+ );
}
diff --git a/apps/health_campaign_field_worker_app/lib/pages/profile.dart b/apps/health_campaign_field_worker_app/lib/pages/profile.dart
index b42a78708..216b38bb7 100644
--- a/apps/health_campaign_field_worker_app/lib/pages/profile.dart
+++ b/apps/health_campaign_field_worker_app/lib/pages/profile.dart
@@ -2,6 +2,7 @@ import 'package:collection/collection.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:digit_components/digit_components.dart';
import 'package:digit_components/widgets/atoms/digit_toaster.dart';
+import 'package:digit_data_model/blocs/user/user.dart';
import 'package:digit_data_model/data_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
diff --git a/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart b/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart
index 74935a44d..76112cf6d 100644
--- a/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart
+++ b/apps/health_campaign_field_worker_app/lib/utils/extensions/context_utility.dart
@@ -77,8 +77,8 @@ extension ContextUtilityExtensions on BuildContext {
final projectState = projectBloc.state;
- final BeneficiaryType? selectedBeneficiary =
- projectState.selectedProject?.targets?.firstOrNull?.beneficiaryType;
+ final BeneficiaryType? selectedBeneficiary = projectState
+ .selectedProject?.additionalDetails?.projectType?.beneficiaryType;
if (selectedBeneficiary == null) {
throw AppException('No beneficiary type is selected');
diff --git a/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart b/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart
index 6e62855fe..700760a8e 100644
--- a/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart
+++ b/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart
@@ -16,6 +16,7 @@ import 'package:referral_reconciliation/blocs/app_localization.dart'
as referral_reconciliation_localization;
import 'package:registration_delivery/blocs/app_localization.dart'
as registration_delivery_localization;
+import 'package:digit_components/blocs/localization.dart' as component_localization;
import '../blocs/localization/app_localization.dart';
import '../data/local_store/no_sql/schema/app_configuration.dart';
@@ -59,6 +60,10 @@ getAppLocalizationDelegates({
digit_dss_localization.DashboardLocalization.getDelegate(
LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future,
appConfig.languages!,
- )
+ ),
+ component_localization.ComponentLocalization.getDelegate(
+ LocalizationLocalRepository().returnLocalizationFromSQL(sql) as Future,
+ appConfig.languages!,
+ ),
];
}
diff --git a/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart b/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart
index 07530a05d..f46bc1084 100644
--- a/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart
+++ b/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart
@@ -1,6 +1,7 @@
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:digit_components/digit_components.dart';
import 'package:digit_components/models/digit_row_card/digit_row_card_model.dart';
+import 'package:digit_data_model/blocs/user/user.dart';
import 'package:digit_data_model/data_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -110,9 +111,7 @@ class SideBar extends StatelessWidget {
i18.common.coreCommonlanguage,
),
icon: Icons.language,
- onPressed: () {
-
- },
+ onPressed: () {},
content: Offstage(
offstage: languages == null,
child: BlocBuilder(
diff --git a/apps/health_campaign_field_worker_app/pubspec.lock b/apps/health_campaign_field_worker_app/pubspec.lock
index c96f0b5fd..50dd5f8fc 100644
--- a/apps/health_campaign_field_worker_app/pubspec.lock
+++ b/apps/health_campaign_field_worker_app/pubspec.lock
@@ -69,10 +69,10 @@ packages:
dependency: "direct main"
description:
name: attendance_management
- sha256: f1b4373e8d0d9f8227ede0d25d4141f0d16d18ac2525c0347b844098cdab080f
+ sha256: "8a09814ca11cca736d771be70fb6174303ea0cb3525aa72e7239cbc14b915303"
url: "https://pub.dev"
source: hosted
- version: "1.0.2+1"
+ version: "1.0.2+4"
audioplayers:
dependency: "direct main"
description:
@@ -430,7 +430,7 @@ packages:
description:
path: "packages/dart_mappable_builder"
ref: master
- resolved-ref: "9b887d24c05459c027a92391869d4c10b440e00f"
+ resolved-ref: "5595f37310a63a92b2c1c7e386c74fe39df5555d"
url: "https://github.com/egovernments/health-campaign-field-worker-app/"
source: git
version: "4.2.0"
@@ -494,32 +494,33 @@ packages:
dependency: "direct main"
description:
name: digit_components
- sha256: "9cca4d9a546037080afe02b6ade82fdf01574e11f5656ad12120fd6966578616"
+ sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9"
url: "https://pub.dev"
source: hosted
- version: "1.0.1+1"
+ version: "1.0.2+1"
digit_data_model:
dependency: "direct main"
description:
name: digit_data_model
- sha256: "0b81e96636496b56b4f9c5d918690a17d8985d6b131e0ab54968eb5471ee4f54"
+ sha256: "139d193f202db85e685a9da6e33fe9ea17b7856cc5415413830bff8dfd67d33e"
url: "https://pub.dev"
source: hosted
- version: "1.0.3+1"
+ version: "1.0.4-dev.9-uniqueId"
digit_dss:
dependency: "direct main"
description:
name: digit_dss
- sha256: "32e2173ae52e7fd9fb53fa435fb21466248029366584f44a0c0f2c6836267a98"
+ sha256: "0498e3e910883a0132050a1acdd7b3a094b935240111bac24683515c9d0dcf3b"
url: "https://pub.dev"
source: hosted
- version: "1.0.1"
+ version: "1.0.2"
digit_firebase_services:
dependency: "direct main"
description:
- path: "../../packages/digit_firebase_services"
- relative: true
- source: path
+ name: digit_firebase_services
+ sha256: ce76521d797e123b6fc95c9dfad7d4a918a93b97f57aecd0e1d517b46190909d
+ url: "https://pub.dev"
+ source: hosted
version: "0.0.1"
digit_scanner:
dependency: "direct main"
@@ -690,34 +691,34 @@ packages:
dependency: "direct main"
description:
name: flutter_background_service
- sha256: "94d9a143852729140e17254a53769383b03738cd92b6e588a8762003e6cd9dd9"
+ sha256: d32f078ec57647c9cfd6e1a8da9297f7d8f021d4dcc204a35aaad2cdbfe255f0
url: "https://pub.dev"
source: hosted
- version: "5.0.5"
+ version: "5.0.10"
flutter_background_service_android:
dependency: transitive
description:
name: flutter_background_service_android
- sha256: "30863ebafd8214b8e76d5e5c9f27887dc5cc303fcf3e89f71534f621fc486782"
+ sha256: "39da42dddf877beeef82bc2583130d8bedb4d0765e99ca9e7b4a32e8c6abd239"
url: "https://pub.dev"
source: hosted
- version: "6.2.2"
+ version: "6.2.7"
flutter_background_service_ios:
dependency: transitive
description:
name: flutter_background_service_ios
- sha256: ab73657535876e16abc89e40f924df3e92ad3dee83f64d187081417e824709ed
+ sha256: "6037ffd45c4d019dab0975c7feb1d31012dd697e25edc05505a4a9b0c7dc9fba"
url: "https://pub.dev"
source: hosted
- version: "5.0.0"
+ version: "5.0.3"
flutter_background_service_platform_interface:
dependency: transitive
description:
name: flutter_background_service_platform_interface
- sha256: cd5720ff5b051d551a4734fae16683aace779bd0425e8d3f15d84a0cdcc2d8d9
+ sha256: ca74aa95789a8304f4d3f57f07ba404faa86bed6e415f83e8edea6ad8b904a41
url: "https://pub.dev"
source: hosted
- version: "5.0.0"
+ version: "5.1.2"
flutter_bloc:
dependency: "direct main"
description:
@@ -1120,10 +1121,10 @@ packages:
dependency: "direct main"
description:
name: inventory_management
- sha256: "1a5976ab807666629704f559730d5418e1c723fed898df2cc6e7d9807f813b6f"
+ sha256: "5866b781b960d38c4973a87ba664afda31502769fbbe684ec83b5ce697aea3e5"
url: "https://pub.dev"
source: hosted
- version: "1.0.3+2"
+ version: "1.0.3-dev.3"
io:
dependency: transitive
description:
@@ -1536,18 +1537,18 @@ packages:
dependency: "direct main"
description:
name: referral_reconciliation
- sha256: "80d5b93164e4f8337fa757fcb75a1e85b88ffbb760e731ca24496a0cae2aef38"
+ sha256: "522b27524f971d62aa3aa40a659cc688cc3593054f3042e44db4c47287e38b91"
url: "https://pub.dev"
source: hosted
- version: "1.0.2+1"
+ version: "1.0.2-dev.1"
registration_delivery:
dependency: "direct main"
description:
name: registration_delivery
- sha256: a6a88665bbf1fa5dce5b864d66992ff9c885b2a3cd898d37f349f1be03cf4086
+ sha256: b1db0f358f76249526975ff90fd97ce33f2a77286653acafb8bfb004086f849c
url: "https://pub.dev"
source: hosted
- version: "1.0.3+1"
+ version: "1.0.4-dev.5-search-fix"
remove_emoji_input_formatter:
dependency: transitive
description:
diff --git a/apps/health_campaign_field_worker_app/pubspec.yaml b/apps/health_campaign_field_worker_app/pubspec.yaml
index c2d6d352d..8474d7ad6 100644
--- a/apps/health_campaign_field_worker_app/pubspec.yaml
+++ b/apps/health_campaign_field_worker_app/pubspec.yaml
@@ -18,7 +18,7 @@ dependencies:
sqlite3_flutter_libs: ^0.5.10
path_provider: ^2.0.11
path: ^1.8.2
- digit_components: ^1.0.1+1
+ digit_components: ^1.0.2
auto_route: ^7.8.4
flutter_bloc: ^8.1.1
collection: ^1.16.0
@@ -65,12 +65,12 @@ dependencies:
disk_space: ^0.2.1
google_mlkit_barcode_scanning: ^0.10.0
camera: ^0.10.5+7
- attendance_management: ^1.0.2+1
+ attendance_management: ^1.0.2+4
digit_scanner: ^1.0.3+1
- inventory_management: ^1.0.3+2
- referral_reconciliation: ^1.0.2+1
- digit_data_model: ^1.0.3+1
- registration_delivery: ^1.0.3+1
+ inventory_management: 1.0.3-dev.3
+ referral_reconciliation: 1.0.2-dev.1
+ digit_data_model: 1.0.4-dev.9-uniqueId
+ registration_delivery: ^1.0.4-dev.4-search-fix
disable_battery_optimization: ^1.1.1
digit_dss: ^1.0.1
closed_household: ^1.0.1+1
diff --git a/packages/closed_household/pubspec.yaml b/packages/closed_household/pubspec.yaml
index 6dccba824..201e98c8c 100644
--- a/packages/closed_household/pubspec.yaml
+++ b/packages/closed_household/pubspec.yaml
@@ -40,7 +40,11 @@ dependencies:
stream_transform: ^2.1.0
async: ^2.11.0
formula_parser: ^2.0.1
- registration_delivery: ^1.0.3+1
+ registration_delivery:
+ git:
+ url: https://github.com/egovernments/health-campaign-field-worker-app/
+ ref: HCMPRE-638
+ path: ./packages/registration_delivery
dev_dependencies:
diff --git a/packages/digit_components/CHANGELOG.md b/packages/digit_components/CHANGELOG.md
index 7270235e4..a62b6ecf2 100644
--- a/packages/digit_components/CHANGELOG.md
+++ b/packages/digit_components/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 1.0.2
+* Added privacy notice component
+
## 1.0.1+1
* Changed similar dialogs to a common hideDialog
diff --git a/packages/digit_components/example/pubspec.lock b/packages/digit_components/example/pubspec.lock
index 5f036b9d0..87767b83c 100644
--- a/packages/digit_components/example/pubspec.lock
+++ b/packages/digit_components/example/pubspec.lock
@@ -231,7 +231,7 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.1+1"
+ version: "1.0.2"
easy_stepper:
dependency: transitive
description:
diff --git a/packages/digit_components/lib/blocs/localization.dart b/packages/digit_components/lib/blocs/localization.dart
new file mode 100644
index 000000000..d393cfefa
--- /dev/null
+++ b/packages/digit_components/lib/blocs/localization.dart
@@ -0,0 +1,52 @@
+import 'package:flutter/material.dart';
+
+import 'localization_delegates.dart';
+
+
+// Class responsible for handling component localization
+class ComponentLocalization {
+ final Locale locale;
+ final Future localizedStrings;
+ final List languages;
+
+ ComponentLocalization(this.locale, this.localizedStrings, this.languages);
+
+ // Method to get the current localization instance from context
+ static ComponentLocalization of(BuildContext context) {
+ return Localizations.of(context, ComponentLocalization)!;
+ }
+
+ static final List _localizedStrings = [];
+
+ // Method to get the delegate for localization
+ static LocalizationsDelegate getDelegate(
+ Future localizedStrings, List languages) =>
+ ComponentLocalizationDelegate(localizedStrings, languages);
+
+ // Method to load localized strings
+ Future load() async {
+ _localizedStrings.clear();
+ // Iterate over localized strings and filter based on locale
+ for (var element in await localizedStrings) {
+ if (element.locale == '${locale.languageCode}_${locale.countryCode}') {
+ _localizedStrings.add(element);
+ }
+ }
+
+ return true;
+ }
+
+ // Method to translate a given localized value
+ String translate(String localizedValues) {
+
+ if (_localizedStrings.isEmpty) {
+ return localizedValues;
+ } else {
+ final index = _localizedStrings.indexWhere(
+ (medium) => medium.code == localizedValues,
+ );
+
+ return index != -1 ? _localizedStrings[index].message : localizedValues;
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/digit_components/lib/blocs/localization_delegates.dart b/packages/digit_components/lib/blocs/localization_delegates.dart
new file mode 100644
index 000000000..3d2e2dd16
--- /dev/null
+++ b/packages/digit_components/lib/blocs/localization_delegates.dart
@@ -0,0 +1,33 @@
+import 'package:flutter/material.dart';
+
+import 'localization.dart';
+
+
+class ComponentLocalizationDelegate
+ extends LocalizationsDelegate {
+ final Future localizedStrings;
+ final List languages;
+
+ const ComponentLocalizationDelegate(this.localizedStrings, this.languages);
+
+ @override
+ bool isSupported(Locale locale) {
+ return languages.map((e) {
+ final results = e.value.split('_');
+ if (results.isNotEmpty) return results.first;
+ }).contains(locale.languageCode);
+ }
+
+ @override
+ Future load(Locale locale) async {
+ ComponentLocalization localization =
+ ComponentLocalization(locale, localizedStrings, languages);
+ await localization.load();
+ return localization;
+ }
+
+ @override
+ bool shouldReload(covariant LocalizationsDelegate old) {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.dart b/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.dart
new file mode 100644
index 000000000..f2d1f896c
--- /dev/null
+++ b/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.dart
@@ -0,0 +1,50 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'privacy_notice_model.freezed.dart';
+part 'privacy_notice_model.g.dart';
+
+@freezed
+class PrivacyNoticeModel with _$PrivacyNoticeModel {
+ const factory PrivacyNoticeModel({
+ required String header,
+ required String module,
+ bool? active,
+ List? contents,
+ }) = _PrivacyNoticeModel;
+
+ factory PrivacyNoticeModel.fromJson(Map json) => _$PrivacyNoticeModelFromJson(json);
+}
+
+@freezed
+class ContentNoticeModel with _$ContentNoticeModel {
+ const factory ContentNoticeModel({
+ String? header,
+ List? descriptions,
+ }) = _ContentNoticeModel;
+
+ factory ContentNoticeModel.fromJson(Map json) => _$ContentNoticeModelFromJson(json);
+}
+
+@freezed
+class DescriptionNoticeModel with _$DescriptionNoticeModel {
+ const factory DescriptionNoticeModel({
+ String? text,
+ String? type,
+ bool? isBold,
+ List? subDescriptions,
+ }) = _DescriptionNoticeModel;
+
+ factory DescriptionNoticeModel.fromJson(Map json) => _$DescriptionNoticeModelFromJson(json);
+}
+
+@freezed
+class SubDescriptionNoticeModel with _$SubDescriptionNoticeModel {
+ const factory SubDescriptionNoticeModel({
+ String? text,
+ String? type,
+ bool? isBold,
+ bool? isSpaceRequired,
+ }) = _SubDescriptionNoticeModel;
+
+ factory SubDescriptionNoticeModel.fromJson(Map json) => _$SubDescriptionNoticeModelFromJson(json);
+}
diff --git a/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.freezed.dart b/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.freezed.dart
new file mode 100644
index 000000000..2090ee866
--- /dev/null
+++ b/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.freezed.dart
@@ -0,0 +1,808 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'privacy_notice_model.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+PrivacyNoticeModel _$PrivacyNoticeModelFromJson(Map json) {
+ return _PrivacyNoticeModel.fromJson(json);
+}
+
+/// @nodoc
+mixin _$PrivacyNoticeModel {
+ String get header => throw _privateConstructorUsedError;
+ String get module => throw _privateConstructorUsedError;
+ bool? get active => throw _privateConstructorUsedError;
+ List? get contents => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $PrivacyNoticeModelCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $PrivacyNoticeModelCopyWith<$Res> {
+ factory $PrivacyNoticeModelCopyWith(
+ PrivacyNoticeModel value, $Res Function(PrivacyNoticeModel) then) =
+ _$PrivacyNoticeModelCopyWithImpl<$Res, PrivacyNoticeModel>;
+ @useResult
+ $Res call(
+ {String header,
+ String module,
+ bool? active,
+ List? contents});
+}
+
+/// @nodoc
+class _$PrivacyNoticeModelCopyWithImpl<$Res, $Val extends PrivacyNoticeModel>
+ implements $PrivacyNoticeModelCopyWith<$Res> {
+ _$PrivacyNoticeModelCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? header = null,
+ Object? module = null,
+ Object? active = freezed,
+ Object? contents = freezed,
+ }) {
+ return _then(_value.copyWith(
+ header: null == header
+ ? _value.header
+ : header // ignore: cast_nullable_to_non_nullable
+ as String,
+ module: null == module
+ ? _value.module
+ : module // ignore: cast_nullable_to_non_nullable
+ as String,
+ active: freezed == active
+ ? _value.active
+ : active // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ contents: freezed == contents
+ ? _value.contents
+ : contents // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$PrivacyNoticeModelImplCopyWith<$Res>
+ implements $PrivacyNoticeModelCopyWith<$Res> {
+ factory _$$PrivacyNoticeModelImplCopyWith(_$PrivacyNoticeModelImpl value,
+ $Res Function(_$PrivacyNoticeModelImpl) then) =
+ __$$PrivacyNoticeModelImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {String header,
+ String module,
+ bool? active,
+ List? contents});
+}
+
+/// @nodoc
+class __$$PrivacyNoticeModelImplCopyWithImpl<$Res>
+ extends _$PrivacyNoticeModelCopyWithImpl<$Res, _$PrivacyNoticeModelImpl>
+ implements _$$PrivacyNoticeModelImplCopyWith<$Res> {
+ __$$PrivacyNoticeModelImplCopyWithImpl(_$PrivacyNoticeModelImpl _value,
+ $Res Function(_$PrivacyNoticeModelImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? header = null,
+ Object? module = null,
+ Object? active = freezed,
+ Object? contents = freezed,
+ }) {
+ return _then(_$PrivacyNoticeModelImpl(
+ header: null == header
+ ? _value.header
+ : header // ignore: cast_nullable_to_non_nullable
+ as String,
+ module: null == module
+ ? _value.module
+ : module // ignore: cast_nullable_to_non_nullable
+ as String,
+ active: freezed == active
+ ? _value.active
+ : active // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ contents: freezed == contents
+ ? _value._contents
+ : contents // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$PrivacyNoticeModelImpl implements _PrivacyNoticeModel {
+ const _$PrivacyNoticeModelImpl(
+ {required this.header,
+ required this.module,
+ this.active,
+ final List? contents})
+ : _contents = contents;
+
+ factory _$PrivacyNoticeModelImpl.fromJson(Map json) =>
+ _$$PrivacyNoticeModelImplFromJson(json);
+
+ @override
+ final String header;
+ @override
+ final String module;
+ @override
+ final bool? active;
+ final List? _contents;
+ @override
+ List? get contents {
+ final value = _contents;
+ if (value == null) return null;
+ if (_contents is EqualUnmodifiableListView) return _contents;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableListView(value);
+ }
+
+ @override
+ String toString() {
+ return 'PrivacyNoticeModel(header: $header, module: $module, active: $active, contents: $contents)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$PrivacyNoticeModelImpl &&
+ (identical(other.header, header) || other.header == header) &&
+ (identical(other.module, module) || other.module == module) &&
+ (identical(other.active, active) || other.active == active) &&
+ const DeepCollectionEquality().equals(other._contents, _contents));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, header, module, active,
+ const DeepCollectionEquality().hash(_contents));
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$PrivacyNoticeModelImplCopyWith<_$PrivacyNoticeModelImpl> get copyWith =>
+ __$$PrivacyNoticeModelImplCopyWithImpl<_$PrivacyNoticeModelImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$PrivacyNoticeModelImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _PrivacyNoticeModel implements PrivacyNoticeModel {
+ const factory _PrivacyNoticeModel(
+ {required final String header,
+ required final String module,
+ final bool? active,
+ final List? contents}) = _$PrivacyNoticeModelImpl;
+
+ factory _PrivacyNoticeModel.fromJson(Map json) =
+ _$PrivacyNoticeModelImpl.fromJson;
+
+ @override
+ String get header;
+ @override
+ String get module;
+ @override
+ bool? get active;
+ @override
+ List? get contents;
+ @override
+ @JsonKey(ignore: true)
+ _$$PrivacyNoticeModelImplCopyWith<_$PrivacyNoticeModelImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+ContentNoticeModel _$ContentNoticeModelFromJson(Map json) {
+ return _ContentNoticeModel.fromJson(json);
+}
+
+/// @nodoc
+mixin _$ContentNoticeModel {
+ String? get header => throw _privateConstructorUsedError;
+ List? get descriptions =>
+ throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $ContentNoticeModelCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $ContentNoticeModelCopyWith<$Res> {
+ factory $ContentNoticeModelCopyWith(
+ ContentNoticeModel value, $Res Function(ContentNoticeModel) then) =
+ _$ContentNoticeModelCopyWithImpl<$Res, ContentNoticeModel>;
+ @useResult
+ $Res call({String? header, List? descriptions});
+}
+
+/// @nodoc
+class _$ContentNoticeModelCopyWithImpl<$Res, $Val extends ContentNoticeModel>
+ implements $ContentNoticeModelCopyWith<$Res> {
+ _$ContentNoticeModelCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? header = freezed,
+ Object? descriptions = freezed,
+ }) {
+ return _then(_value.copyWith(
+ header: freezed == header
+ ? _value.header
+ : header // ignore: cast_nullable_to_non_nullable
+ as String?,
+ descriptions: freezed == descriptions
+ ? _value.descriptions
+ : descriptions // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$ContentNoticeModelImplCopyWith<$Res>
+ implements $ContentNoticeModelCopyWith<$Res> {
+ factory _$$ContentNoticeModelImplCopyWith(_$ContentNoticeModelImpl value,
+ $Res Function(_$ContentNoticeModelImpl) then) =
+ __$$ContentNoticeModelImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call({String? header, List? descriptions});
+}
+
+/// @nodoc
+class __$$ContentNoticeModelImplCopyWithImpl<$Res>
+ extends _$ContentNoticeModelCopyWithImpl<$Res, _$ContentNoticeModelImpl>
+ implements _$$ContentNoticeModelImplCopyWith<$Res> {
+ __$$ContentNoticeModelImplCopyWithImpl(_$ContentNoticeModelImpl _value,
+ $Res Function(_$ContentNoticeModelImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? header = freezed,
+ Object? descriptions = freezed,
+ }) {
+ return _then(_$ContentNoticeModelImpl(
+ header: freezed == header
+ ? _value.header
+ : header // ignore: cast_nullable_to_non_nullable
+ as String?,
+ descriptions: freezed == descriptions
+ ? _value._descriptions
+ : descriptions // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$ContentNoticeModelImpl implements _ContentNoticeModel {
+ const _$ContentNoticeModelImpl(
+ {this.header, final List? descriptions})
+ : _descriptions = descriptions;
+
+ factory _$ContentNoticeModelImpl.fromJson(Map json) =>
+ _$$ContentNoticeModelImplFromJson(json);
+
+ @override
+ final String? header;
+ final List? _descriptions;
+ @override
+ List? get descriptions {
+ final value = _descriptions;
+ if (value == null) return null;
+ if (_descriptions is EqualUnmodifiableListView) return _descriptions;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableListView(value);
+ }
+
+ @override
+ String toString() {
+ return 'ContentNoticeModel(header: $header, descriptions: $descriptions)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ContentNoticeModelImpl &&
+ (identical(other.header, header) || other.header == header) &&
+ const DeepCollectionEquality()
+ .equals(other._descriptions, _descriptions));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(
+ runtimeType, header, const DeepCollectionEquality().hash(_descriptions));
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ContentNoticeModelImplCopyWith<_$ContentNoticeModelImpl> get copyWith =>
+ __$$ContentNoticeModelImplCopyWithImpl<_$ContentNoticeModelImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$ContentNoticeModelImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _ContentNoticeModel implements ContentNoticeModel {
+ const factory _ContentNoticeModel(
+ {final String? header,
+ final List? descriptions}) =
+ _$ContentNoticeModelImpl;
+
+ factory _ContentNoticeModel.fromJson(Map json) =
+ _$ContentNoticeModelImpl.fromJson;
+
+ @override
+ String? get header;
+ @override
+ List? get descriptions;
+ @override
+ @JsonKey(ignore: true)
+ _$$ContentNoticeModelImplCopyWith<_$ContentNoticeModelImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+DescriptionNoticeModel _$DescriptionNoticeModelFromJson(
+ Map json) {
+ return _DescriptionNoticeModel.fromJson(json);
+}
+
+/// @nodoc
+mixin _$DescriptionNoticeModel {
+ String? get text => throw _privateConstructorUsedError;
+ String? get type => throw _privateConstructorUsedError;
+ bool? get isBold => throw _privateConstructorUsedError;
+ List? get subDescriptions =>
+ throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $DescriptionNoticeModelCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $DescriptionNoticeModelCopyWith<$Res> {
+ factory $DescriptionNoticeModelCopyWith(DescriptionNoticeModel value,
+ $Res Function(DescriptionNoticeModel) then) =
+ _$DescriptionNoticeModelCopyWithImpl<$Res, DescriptionNoticeModel>;
+ @useResult
+ $Res call(
+ {String? text,
+ String? type,
+ bool? isBold,
+ List? subDescriptions});
+}
+
+/// @nodoc
+class _$DescriptionNoticeModelCopyWithImpl<$Res,
+ $Val extends DescriptionNoticeModel>
+ implements $DescriptionNoticeModelCopyWith<$Res> {
+ _$DescriptionNoticeModelCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? text = freezed,
+ Object? type = freezed,
+ Object? isBold = freezed,
+ Object? subDescriptions = freezed,
+ }) {
+ return _then(_value.copyWith(
+ text: freezed == text
+ ? _value.text
+ : text // ignore: cast_nullable_to_non_nullable
+ as String?,
+ type: freezed == type
+ ? _value.type
+ : type // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isBold: freezed == isBold
+ ? _value.isBold
+ : isBold // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ subDescriptions: freezed == subDescriptions
+ ? _value.subDescriptions
+ : subDescriptions // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$DescriptionNoticeModelImplCopyWith<$Res>
+ implements $DescriptionNoticeModelCopyWith<$Res> {
+ factory _$$DescriptionNoticeModelImplCopyWith(
+ _$DescriptionNoticeModelImpl value,
+ $Res Function(_$DescriptionNoticeModelImpl) then) =
+ __$$DescriptionNoticeModelImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {String? text,
+ String? type,
+ bool? isBold,
+ List? subDescriptions});
+}
+
+/// @nodoc
+class __$$DescriptionNoticeModelImplCopyWithImpl<$Res>
+ extends _$DescriptionNoticeModelCopyWithImpl<$Res,
+ _$DescriptionNoticeModelImpl>
+ implements _$$DescriptionNoticeModelImplCopyWith<$Res> {
+ __$$DescriptionNoticeModelImplCopyWithImpl(
+ _$DescriptionNoticeModelImpl _value,
+ $Res Function(_$DescriptionNoticeModelImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? text = freezed,
+ Object? type = freezed,
+ Object? isBold = freezed,
+ Object? subDescriptions = freezed,
+ }) {
+ return _then(_$DescriptionNoticeModelImpl(
+ text: freezed == text
+ ? _value.text
+ : text // ignore: cast_nullable_to_non_nullable
+ as String?,
+ type: freezed == type
+ ? _value.type
+ : type // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isBold: freezed == isBold
+ ? _value.isBold
+ : isBold // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ subDescriptions: freezed == subDescriptions
+ ? _value._subDescriptions
+ : subDescriptions // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$DescriptionNoticeModelImpl implements _DescriptionNoticeModel {
+ const _$DescriptionNoticeModelImpl(
+ {this.text,
+ this.type,
+ this.isBold,
+ final List? subDescriptions})
+ : _subDescriptions = subDescriptions;
+
+ factory _$DescriptionNoticeModelImpl.fromJson(Map json) =>
+ _$$DescriptionNoticeModelImplFromJson(json);
+
+ @override
+ final String? text;
+ @override
+ final String? type;
+ @override
+ final bool? isBold;
+ final List? _subDescriptions;
+ @override
+ List? get subDescriptions {
+ final value = _subDescriptions;
+ if (value == null) return null;
+ if (_subDescriptions is EqualUnmodifiableListView) return _subDescriptions;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableListView(value);
+ }
+
+ @override
+ String toString() {
+ return 'DescriptionNoticeModel(text: $text, type: $type, isBold: $isBold, subDescriptions: $subDescriptions)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$DescriptionNoticeModelImpl &&
+ (identical(other.text, text) || other.text == text) &&
+ (identical(other.type, type) || other.type == type) &&
+ (identical(other.isBold, isBold) || other.isBold == isBold) &&
+ const DeepCollectionEquality()
+ .equals(other._subDescriptions, _subDescriptions));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, text, type, isBold,
+ const DeepCollectionEquality().hash(_subDescriptions));
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$DescriptionNoticeModelImplCopyWith<_$DescriptionNoticeModelImpl>
+ get copyWith => __$$DescriptionNoticeModelImplCopyWithImpl<
+ _$DescriptionNoticeModelImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$DescriptionNoticeModelImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _DescriptionNoticeModel implements DescriptionNoticeModel {
+ const factory _DescriptionNoticeModel(
+ {final String? text,
+ final String? type,
+ final bool? isBold,
+ final List? subDescriptions}) =
+ _$DescriptionNoticeModelImpl;
+
+ factory _DescriptionNoticeModel.fromJson(Map json) =
+ _$DescriptionNoticeModelImpl.fromJson;
+
+ @override
+ String? get text;
+ @override
+ String? get type;
+ @override
+ bool? get isBold;
+ @override
+ List? get subDescriptions;
+ @override
+ @JsonKey(ignore: true)
+ _$$DescriptionNoticeModelImplCopyWith<_$DescriptionNoticeModelImpl>
+ get copyWith => throw _privateConstructorUsedError;
+}
+
+SubDescriptionNoticeModel _$SubDescriptionNoticeModelFromJson(
+ Map json) {
+ return _SubDescriptionNoticeModel.fromJson(json);
+}
+
+/// @nodoc
+mixin _$SubDescriptionNoticeModel {
+ String? get text => throw _privateConstructorUsedError;
+ String? get type => throw _privateConstructorUsedError;
+ bool? get isBold => throw _privateConstructorUsedError;
+ bool? get isSpaceRequired => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $SubDescriptionNoticeModelCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $SubDescriptionNoticeModelCopyWith<$Res> {
+ factory $SubDescriptionNoticeModelCopyWith(SubDescriptionNoticeModel value,
+ $Res Function(SubDescriptionNoticeModel) then) =
+ _$SubDescriptionNoticeModelCopyWithImpl<$Res, SubDescriptionNoticeModel>;
+ @useResult
+ $Res call({String? text, String? type, bool? isBold, bool? isSpaceRequired});
+}
+
+/// @nodoc
+class _$SubDescriptionNoticeModelCopyWithImpl<$Res,
+ $Val extends SubDescriptionNoticeModel>
+ implements $SubDescriptionNoticeModelCopyWith<$Res> {
+ _$SubDescriptionNoticeModelCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? text = freezed,
+ Object? type = freezed,
+ Object? isBold = freezed,
+ Object? isSpaceRequired = freezed,
+ }) {
+ return _then(_value.copyWith(
+ text: freezed == text
+ ? _value.text
+ : text // ignore: cast_nullable_to_non_nullable
+ as String?,
+ type: freezed == type
+ ? _value.type
+ : type // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isBold: freezed == isBold
+ ? _value.isBold
+ : isBold // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ isSpaceRequired: freezed == isSpaceRequired
+ ? _value.isSpaceRequired
+ : isSpaceRequired // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$SubDescriptionNoticeModelImplCopyWith<$Res>
+ implements $SubDescriptionNoticeModelCopyWith<$Res> {
+ factory _$$SubDescriptionNoticeModelImplCopyWith(
+ _$SubDescriptionNoticeModelImpl value,
+ $Res Function(_$SubDescriptionNoticeModelImpl) then) =
+ __$$SubDescriptionNoticeModelImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call({String? text, String? type, bool? isBold, bool? isSpaceRequired});
+}
+
+/// @nodoc
+class __$$SubDescriptionNoticeModelImplCopyWithImpl<$Res>
+ extends _$SubDescriptionNoticeModelCopyWithImpl<$Res,
+ _$SubDescriptionNoticeModelImpl>
+ implements _$$SubDescriptionNoticeModelImplCopyWith<$Res> {
+ __$$SubDescriptionNoticeModelImplCopyWithImpl(
+ _$SubDescriptionNoticeModelImpl _value,
+ $Res Function(_$SubDescriptionNoticeModelImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? text = freezed,
+ Object? type = freezed,
+ Object? isBold = freezed,
+ Object? isSpaceRequired = freezed,
+ }) {
+ return _then(_$SubDescriptionNoticeModelImpl(
+ text: freezed == text
+ ? _value.text
+ : text // ignore: cast_nullable_to_non_nullable
+ as String?,
+ type: freezed == type
+ ? _value.type
+ : type // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isBold: freezed == isBold
+ ? _value.isBold
+ : isBold // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ isSpaceRequired: freezed == isSpaceRequired
+ ? _value.isSpaceRequired
+ : isSpaceRequired // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$SubDescriptionNoticeModelImpl implements _SubDescriptionNoticeModel {
+ const _$SubDescriptionNoticeModelImpl(
+ {this.text, this.type, this.isBold, this.isSpaceRequired});
+
+ factory _$SubDescriptionNoticeModelImpl.fromJson(Map json) =>
+ _$$SubDescriptionNoticeModelImplFromJson(json);
+
+ @override
+ final String? text;
+ @override
+ final String? type;
+ @override
+ final bool? isBold;
+ @override
+ final bool? isSpaceRequired;
+
+ @override
+ String toString() {
+ return 'SubDescriptionNoticeModel(text: $text, type: $type, isBold: $isBold, isSpaceRequired: $isSpaceRequired)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$SubDescriptionNoticeModelImpl &&
+ (identical(other.text, text) || other.text == text) &&
+ (identical(other.type, type) || other.type == type) &&
+ (identical(other.isBold, isBold) || other.isBold == isBold) &&
+ (identical(other.isSpaceRequired, isSpaceRequired) ||
+ other.isSpaceRequired == isSpaceRequired));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode =>
+ Object.hash(runtimeType, text, type, isBold, isSpaceRequired);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$SubDescriptionNoticeModelImplCopyWith<_$SubDescriptionNoticeModelImpl>
+ get copyWith => __$$SubDescriptionNoticeModelImplCopyWithImpl<
+ _$SubDescriptionNoticeModelImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$SubDescriptionNoticeModelImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _SubDescriptionNoticeModel implements SubDescriptionNoticeModel {
+ const factory _SubDescriptionNoticeModel(
+ {final String? text,
+ final String? type,
+ final bool? isBold,
+ final bool? isSpaceRequired}) = _$SubDescriptionNoticeModelImpl;
+
+ factory _SubDescriptionNoticeModel.fromJson(Map json) =
+ _$SubDescriptionNoticeModelImpl.fromJson;
+
+ @override
+ String? get text;
+ @override
+ String? get type;
+ @override
+ bool? get isBold;
+ @override
+ bool? get isSpaceRequired;
+ @override
+ @JsonKey(ignore: true)
+ _$$SubDescriptionNoticeModelImplCopyWith<_$SubDescriptionNoticeModelImpl>
+ get copyWith => throw _privateConstructorUsedError;
+}
diff --git a/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.g.dart b/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.g.dart
new file mode 100644
index 000000000..2e10758a5
--- /dev/null
+++ b/packages/digit_components/lib/models/privacy_notice/privacy_notice_model.g.dart
@@ -0,0 +1,83 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'privacy_notice_model.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$PrivacyNoticeModelImpl _$$PrivacyNoticeModelImplFromJson(
+ Map json) =>
+ _$PrivacyNoticeModelImpl(
+ header: json['header'] as String,
+ module: json['module'] as String,
+ active: json['active'] as bool?,
+ contents: (json['contents'] as List?)
+ ?.map((e) => ContentNoticeModel.fromJson(e as Map))
+ .toList(),
+ );
+
+Map _$$PrivacyNoticeModelImplToJson(
+ _$PrivacyNoticeModelImpl instance) =>
+ {
+ 'header': instance.header,
+ 'module': instance.module,
+ 'active': instance.active,
+ 'contents': instance.contents,
+ };
+
+_$ContentNoticeModelImpl _$$ContentNoticeModelImplFromJson(
+ Map json) =>
+ _$ContentNoticeModelImpl(
+ header: json['header'] as String?,
+ descriptions: (json['descriptions'] as List?)
+ ?.map(
+ (e) => DescriptionNoticeModel.fromJson(e as Map))
+ .toList(),
+ );
+
+Map _$$ContentNoticeModelImplToJson(
+ _$ContentNoticeModelImpl instance) =>
+ {
+ 'header': instance.header,
+ 'descriptions': instance.descriptions,
+ };
+
+_$DescriptionNoticeModelImpl _$$DescriptionNoticeModelImplFromJson(
+ Map json) =>
+ _$DescriptionNoticeModelImpl(
+ text: json['text'] as String?,
+ type: json['type'] as String?,
+ isBold: json['isBold'] as bool?,
+ subDescriptions: (json['subDescriptions'] as List?)
+ ?.map((e) =>
+ SubDescriptionNoticeModel.fromJson(e as Map))
+ .toList(),
+ );
+
+Map _$$DescriptionNoticeModelImplToJson(
+ _$DescriptionNoticeModelImpl instance) =>
+ {
+ 'text': instance.text,
+ 'type': instance.type,
+ 'isBold': instance.isBold,
+ 'subDescriptions': instance.subDescriptions,
+ };
+
+_$SubDescriptionNoticeModelImpl _$$SubDescriptionNoticeModelImplFromJson(
+ Map json) =>
+ _$SubDescriptionNoticeModelImpl(
+ text: json['text'] as String?,
+ type: json['type'] as String?,
+ isBold: json['isBold'] as bool?,
+ isSpaceRequired: json['isSpaceRequired'] as bool?,
+ );
+
+Map _$$SubDescriptionNoticeModelImplToJson(
+ _$SubDescriptionNoticeModelImpl instance) =>
+ {
+ 'text': instance.text,
+ 'type': instance.type,
+ 'isBold': instance.isBold,
+ 'isSpaceRequired': instance.isSpaceRequired,
+ };
diff --git a/packages/digit_components/lib/models/privacy_policy_model.dart b/packages/digit_components/lib/models/privacy_policy_model.dart
new file mode 100644
index 000000000..834e44c60
--- /dev/null
+++ b/packages/digit_components/lib/models/privacy_policy_model.dart
@@ -0,0 +1,95 @@
+class PrivacyPolicy {
+ final String? header; // Changed to nullable
+ final String? module; // Changed to nullable
+ final bool? active;
+ final List? contents;
+
+ PrivacyPolicy({
+ this.header,
+ this.module,
+ this.active,
+ this.contents,
+ });
+
+ // Factory constructor to create PrivacyPolicy from JSON
+ factory PrivacyPolicy.fromJson(Map json) {
+ return PrivacyPolicy(
+ header: json['header'] as String?,
+ module: json['module'] as String?,
+ active: json['active'] as bool?,
+ contents: (json['contents'] as List?)
+ ?.map((item) => Content.fromJson(item as Map))
+ .toList(),
+ );
+ }
+}
+
+class Content {
+ final String? header; // Changed to nullable
+ final List? descriptions;
+
+ Content({
+ this.header,
+ this.descriptions,
+ });
+
+ // Factory constructor to create Content from JSON
+ factory Content.fromJson(Map json) {
+ return Content(
+ header: json['header'] as String?,
+ descriptions: (json['descriptions'] as List?)
+ ?.map((item) => Description.fromJson(item as Map))
+ .toList(),
+ );
+ }
+}
+
+class Description {
+ final String? text; // Changed to nullable
+ final String? type; // Changed to nullable
+ final bool? isBold;
+ final List? subDescriptions;
+
+ Description({
+ this.text,
+ this.type,
+ this.isBold,
+ this.subDescriptions,
+ });
+
+ // Factory constructor to create Description from JSON
+ factory Description.fromJson(Map json) {
+ return Description(
+ text: json['text'] as String?,
+ type: json['type'] as String?,
+ isBold: json['isBold'] as bool?,
+ subDescriptions: (json['subDescriptions'] as List?)
+ ?.map((item) => SubDescription.fromJson(item as Map))
+ .toList(),
+ );
+ }
+}
+
+class SubDescription {
+ final String? text; // Changed to nullable
+ final String? type; // Changed to nullable
+ final bool? isBold;
+ final bool? isSpaceRequired;
+
+ SubDescription({
+ this.text,
+ this.type,
+ this.isBold,
+ this.isSpaceRequired,
+ });
+
+ // Factory constructor to create SubDescription from JSON
+ factory SubDescription.fromJson(Map json) {
+ return SubDescription(
+ text: json['text'] as String?,
+ type: json['type'] as String?,
+ isBold: json['isBold'] as bool?,
+ isSpaceRequired: json['isSpaceRequired'] as bool?,
+ );
+ }
+}
diff --git a/packages/digit_components/lib/utils/i18_key_constants.dart b/packages/digit_components/lib/utils/i18_key_constants.dart
new file mode 100644
index 000000000..1d7e1fcca
--- /dev/null
+++ b/packages/digit_components/lib/utils/i18_key_constants.dart
@@ -0,0 +1,20 @@
+library i18;
+
+const privacyPolicy = PrivacyPolicy();
+
+class PrivacyPolicy {
+ const PrivacyPolicy();
+
+ String get acceptText {
+ return 'PRIVACY_POLICY_ACCEPT_TEXT';
+ }
+
+ String get declineText {
+ return 'PRIVACY_POLICY_DECLINE_TEXT';
+ }
+
+ String get privacyNoticeText => 'PRIVACY_POLICY_TEXT';
+ String get privacyPolicyLinkText => 'PRIVACY_POLICY_LINK_TEXT';
+ String get privacyPolicyValidationText => 'PRIVACY_POLICY_VALIDATION_TEXT';
+
+}
\ No newline at end of file
diff --git a/packages/digit_components/lib/widgets/localized.dart b/packages/digit_components/lib/widgets/localized.dart
new file mode 100644
index 000000000..2d3d6a479
--- /dev/null
+++ b/packages/digit_components/lib/widgets/localized.dart
@@ -0,0 +1,33 @@
+import 'package:flutter/material.dart';
+import '../blocs/localization.dart';
+
+abstract class LocalizedStatefulWidget extends StatefulWidget {
+ final ComponentLocalization? appLocalizations;
+
+ const LocalizedStatefulWidget({
+ super.key,
+ this.appLocalizations,
+ });
+}
+
+abstract class LocalizedState
+ extends State {
+ late ComponentLocalization _localizations;
+
+ ComponentLocalization get localizations => _localizations;
+
+ set localizations(ComponentLocalization localizations) {
+ if (mounted) {
+ setState(() {
+ _localizations = localizations;
+ });
+ }
+ }
+
+ @override
+ @mustCallSuper
+ void didChangeDependencies() {
+ _localizations = widget.appLocalizations ?? ComponentLocalization.of(context);
+ super.didChangeDependencies();
+ }
+}
\ No newline at end of file
diff --git a/apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_component.dart b/packages/digit_components/lib/widgets/privacy_notice/privacy_component.dart
similarity index 96%
rename from apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_component.dart
rename to packages/digit_components/lib/widgets/privacy_notice/privacy_component.dart
index e246dc30a..f2d9aa0f0 100644
--- a/apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_component.dart
+++ b/packages/digit_components/lib/widgets/privacy_notice/privacy_component.dart
@@ -1,7 +1,7 @@
import 'package:digit_components/digit_components.dart';
+import 'package:digit_components/models/privacy_notice/privacy_notice_model.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
-import '../../data/local_store/no_sql/schema/app_configuration.dart';
import '../localized.dart';
import 'privacy_notice_dialog.dart';
import 'package:reactive_forms/reactive_forms.dart';
@@ -10,7 +10,7 @@ class PrivacyComponent extends LocalizedStatefulWidget {
final String formControlName;
final String text;
final String linkText;
- final PrivacyPolicy? privacyPolicy;
+ final PrivacyNoticeModel? privacyPolicy;
final String? trailingText;
final String validationMessage;
@@ -21,7 +21,7 @@ class PrivacyComponent extends LocalizedStatefulWidget {
required this.text,
required this.linkText,
this.trailingText,
- this.privacyPolicy,
+ this.privacyPolicy,
required this.validationMessage,
});
@@ -54,6 +54,7 @@ class _PrivacyComponentState extends LocalizedState {
return ValueListenableBuilder(
valueListenable: checkboxStateNotifier,
builder: (context, value, child) {
+
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -120,7 +121,7 @@ class _PrivacyComponentState extends LocalizedState {
builder: (context) {
return FullPageDialog(
- privacyPolicy: widget.privacyPolicy ?? PrivacyPolicy(),
+ privacyPolicy: widget.privacyPolicy ?? const PrivacyNoticeModel(header: '', module: ''),
onAccept: () {
checkboxStateNotifier.value = true;
field.didChange(true);
diff --git a/apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_notice_dialog.dart b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_dialog.dart
similarity index 93%
rename from apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_notice_dialog.dart
rename to packages/digit_components/lib/widgets/privacy_notice/privacy_notice_dialog.dart
index 55421cfc2..696b2c681 100644
--- a/apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_notice_dialog.dart
+++ b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_dialog.dart
@@ -1,17 +1,17 @@
+import 'package:digit_components/models/privacy_notice/privacy_notice_model.dart';
import 'package:digit_components/theme/colors.dart';
import 'package:digit_components/widgets/digit_card.dart';
import 'package:digit_components/widgets/digit_elevated_button.dart';
import 'package:digit_components/widgets/digit_outline_button.dart';
import 'package:flutter/material.dart';
-import '../../data/local_store/no_sql/schema/app_configuration.dart';
+import '../../theme/digit_theme.dart';
import '../localized.dart';
import 'privacy_notice_expand_component.dart';
import '../../utils/i18_key_constants.dart' as i18;
-import '../../models/privacy_notice/privacy_notice_model.dart';
-import '../showcase/showcase_wrappers.dart';
+
class FullPageDialog extends LocalizedStatefulWidget {
- final PrivacyPolicy privacyPolicy;
+ final PrivacyNoticeModel privacyPolicy;
final VoidCallback onAccept;
final VoidCallback onDecline;
@@ -24,10 +24,10 @@ class FullPageDialog extends LocalizedStatefulWidget {
});
@override
- _FullPageDialogState createState() => _FullPageDialogState();
+ FullPageDialogState createState() => FullPageDialogState();
}
-class _FullPageDialogState extends LocalizedState {
+class FullPageDialogState extends LocalizedState {
@override
Widget build(BuildContext context) {
return Dialog.fullscreen(
@@ -49,7 +49,7 @@ class _FullPageDialogState extends LocalizedState {
Padding(
padding: const EdgeInsets.only(top: kPadding*3, left: 0),
child: Text(
- localizations.translate(widget.privacyPolicy.header),
+ localizations.translate(widget.privacyPolicy.header ?? ''),
maxLines: 3,
style: Theme.of(context).textTheme.displayMedium?.copyWith(
color: const DigitColors().woodsmokeBlack,
diff --git a/apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_notice_expand_component.dart b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_expand_component.dart
similarity index 91%
rename from apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_notice_expand_component.dart
rename to packages/digit_components/lib/widgets/privacy_notice/privacy_notice_expand_component.dart
index 6f3f6006a..50bf2eb05 100644
--- a/apps/health_campaign_field_worker_app/lib/widgets/privacy_notice/privacy_notice_expand_component.dart
+++ b/packages/digit_components/lib/widgets/privacy_notice/privacy_notice_expand_component.dart
@@ -1,11 +1,11 @@
-import 'package:closed_household/widgets/showcase/showcase_wrappers.dart';
import 'package:digit_components/theme/colors.dart';
import 'package:flutter/material.dart';
-import '../../data/local_store/no_sql/schema/app_configuration.dart';
+import '../../models/privacy_notice/privacy_notice_model.dart';
+import '../../theme/digit_theme.dart';
import '../localized.dart';
class ExpandableSection extends LocalizedStatefulWidget {
- final Content content;
+ final ContentNoticeModel content;
const ExpandableSection({
super.key,
@@ -14,10 +14,10 @@ class ExpandableSection extends LocalizedStatefulWidget {
});
@override
- _ExpandableSectionState createState() => _ExpandableSectionState();
+ ExpandableSectionState createState() => ExpandableSectionState();
}
-class _ExpandableSectionState extends LocalizedState {
+class ExpandableSectionState extends LocalizedState {
bool _isExpanded = false;
@override
@@ -75,7 +75,7 @@ class _ExpandableSectionState extends LocalizedState {
children:
widget.content.descriptions!.asMap().entries.map((entry) {
int index = entry.key;
- Description desc = entry.value;
+ DescriptionNoticeModel desc = entry.value;
int? stepNumber = desc.type == 'step' ? index + 1 : null;
return DescriptionWidget(
description: desc,
@@ -91,7 +91,7 @@ class _ExpandableSectionState extends LocalizedState {
}
class DescriptionWidget extends LocalizedStatefulWidget {
- final Description description;
+ final DescriptionNoticeModel description;
final int? stepNumber;
const DescriptionWidget({
@@ -102,10 +102,10 @@ class DescriptionWidget extends LocalizedStatefulWidget {
});
@override
- _DescriptionWidgetState createState() => _DescriptionWidgetState();
+ DescriptionWidgetState createState() => DescriptionWidgetState();
}
-class _DescriptionWidgetState extends LocalizedState {
+class DescriptionWidgetState extends LocalizedState {
@override
Widget build(BuildContext context) {
final descriptionText = widget.description.text ?? '';
@@ -201,7 +201,7 @@ class _DescriptionWidgetState extends LocalizedState {
}
class SubDescriptionWidget extends LocalizedStatefulWidget {
- final SubDescription subDescription;
+ final SubDescriptionNoticeModel subDescription;
final int? stepNumber;
const SubDescriptionWidget({
@@ -212,10 +212,10 @@ class SubDescriptionWidget extends LocalizedStatefulWidget {
});
@override
- _SubDescriptionWidgetState createState() => _SubDescriptionWidgetState();
+ SubDescriptionWidgetState createState() => SubDescriptionWidgetState();
}
-class _SubDescriptionWidgetState extends LocalizedState {
+class SubDescriptionWidgetState extends LocalizedState {
@override
Widget build(BuildContext context) {
final subDescriptionText = widget.subDescription.text ?? '';
diff --git a/packages/digit_components/pubspec.yaml b/packages/digit_components/pubspec.yaml
index 901f6c61c..f693b4a82 100644
--- a/packages/digit_components/pubspec.yaml
+++ b/packages/digit_components/pubspec.yaml
@@ -1,6 +1,6 @@
name: digit_components
description: Digit UI Design specification Flutter widgets. Import this package by adding digit_components in respective pubspec.yaml dependencies.
-version: 1.0.1+1
+version: 1.0.2
homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_components
repository: https://github.com/egovernments/health-campaign-field-worker-app
diff --git a/packages/digit_data_model/CHANGELOG.md b/packages/digit_data_model/CHANGELOG.md
index 49f954173..bfd232b83 100644
--- a/packages/digit_data_model/CHANGELOG.md
+++ b/packages/digit_data_model/CHANGELOG.md
@@ -1,3 +1,39 @@
+## 1.0.4-dev.10-uniqueId
+
+* Bug Fix:
+ * Updated syncRetryCount,syncRetryInterval and errorPath to dynamic
+
+## 1.0.4-dev.9-uniqueId
+
+* Stock and facility related changes
+ * Added dateOfEntry in stock model
+ * Added name in facility model
+
+## 1.0.4-dev.8-uniqueId
+
+* Changed additionalDetails of ServiceModel to Map
+
+## 1.0.4-dev.7-uniqueId
+
+* Modified identifierType of unique beneficiary id
+
+## 1.0.4-dev.6-uniqueId
+
+* Added additionalDetails field to service definition attributes model
+
+## 1.0.4-dev.5-uniqueId
+
+* Added identifierType enum entity
+* Added identifierType and id as primary key to identifier table
+
+* Updated oplog transactions to synchronous - fix for write transaction lock
+* Same change in 1.0.3-hotfix, 1.0.4-dev.3
+
+## 1.0.3+2
+
+* Updated beneficiary type target model and table to string
+* Updated project type beneficiary type model and table to BeneficiaryType enum
+
## 1.0.3+1
* Updated oplog transactions to synchronous - fix for write transaction lock
@@ -15,11 +51,11 @@
## 1.0.3-dev.4
* Updated individual local search results with user uuid mapping
-
+
## 1.0.3-dev.3
-* Created localization table
- - Creation of the localization table.
+* Created localization table
+ - Creation of the localization table.
## 1.0.3-dev.2
@@ -53,7 +89,7 @@
## 0.0.0-dev.2
-* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used
+* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used
- Integration of Boundary v2 with the option to use Boundary v1 version 0.0.0-dev.1.
## 0.0.0-dev.1
diff --git a/packages/digit_data_model/lib/blocs/project_facility/project_facility.dart b/packages/digit_data_model/lib/blocs/project_facility/project_facility.dart
index ded76c2f0..8e44708f7 100644
--- a/packages/digit_data_model/lib/blocs/project_facility/project_facility.dart
+++ b/packages/digit_data_model/lib/blocs/project_facility/project_facility.dart
@@ -4,6 +4,7 @@ import 'dart:async';
import 'package:digit_data_model/models/entities/project_facility.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
+import '../../models/entities/facility.dart';
import '../../utils/typedefs.dart';
@@ -19,12 +20,14 @@ class ProjectFacilityBloc
extends Bloc {
// The data repository used by this bloc.
final ProjectFacilityDataRepository projectFacilityDataRepository;
+ final FacilityDataRepository facilityDataRepository;
/// The constructor for `ProjectFacilityBloc`.
/// It initializes the bloc with an empty state and sets up the event handler for loading project facilities.
ProjectFacilityBloc(
super.initialState, {
required this.projectFacilityDataRepository,
+ required this.facilityDataRepository,
}) {
on(_handleLoad);
}
@@ -40,10 +43,21 @@ class ProjectFacilityBloc
event.query,
);
+ final facilities = await facilityDataRepository.search(FacilitySearchModel(
+ id: results.map((e) => e.facilityId).toList(),
+ ));
+ Map facilityMap = {};
+ for (var element in facilities) {
+ facilityMap[element.id] = element.name ?? element.id;
+ }
+
if (results.isEmpty) {
emit(const ProjectFacilityEmptyState());
} else {
- emit(ProjectFacilityFetchedState(projectFacilities: results));
+ emit(ProjectFacilityFetchedState(
+ projectFacilities: results,
+ facilityMap: facilityMap,
+ ));
}
}
}
@@ -69,5 +83,6 @@ class ProjectFacilityState with _$ProjectFacilityState {
/// The `ProjectFacilityFetchedState` state represents the state where project facilities have been loaded.
const factory ProjectFacilityState.fetched({
required List projectFacilities,
+ required Map facilityMap,
}) = ProjectFacilityFetchedState;
}
diff --git a/packages/digit_data_model/lib/blocs/project_facility/project_facility.freezed.dart b/packages/digit_data_model/lib/blocs/project_facility/project_facility.freezed.dart
index fc9a97289..9251295c8 100644
--- a/packages/digit_data_model/lib/blocs/project_facility/project_facility.freezed.dart
+++ b/packages/digit_data_model/lib/blocs/project_facility/project_facility.freezed.dart
@@ -232,7 +232,8 @@ mixin _$ProjectFacilityState {
TResult when({
required TResult Function() empty,
required TResult Function() loading,
- required TResult Function(List projectFacilities)
+ required TResult Function(List projectFacilities,
+ Map facilityMap)
fetched,
}) =>
throw _privateConstructorUsedError;
@@ -240,14 +241,18 @@ mixin _$ProjectFacilityState {
TResult? whenOrNull({
TResult? Function()? empty,
TResult? Function()? loading,
- TResult? Function(List projectFacilities)? fetched,
+ TResult? Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen({
TResult Function()? empty,
TResult Function()? loading,
- TResult Function(List projectFacilities)? fetched,
+ TResult Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
@@ -338,7 +343,8 @@ class _$ProjectFacilityEmptyStateImpl implements ProjectFacilityEmptyState {
TResult when({
required TResult Function() empty,
required TResult Function() loading,
- required TResult Function(List projectFacilities)
+ required TResult Function(List projectFacilities,
+ Map facilityMap)
fetched,
}) {
return empty();
@@ -349,7 +355,9 @@ class _$ProjectFacilityEmptyStateImpl implements ProjectFacilityEmptyState {
TResult? whenOrNull({
TResult? Function()? empty,
TResult? Function()? loading,
- TResult? Function(List projectFacilities)? fetched,
+ TResult? Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
}) {
return empty?.call();
}
@@ -359,7 +367,9 @@ class _$ProjectFacilityEmptyStateImpl implements ProjectFacilityEmptyState {
TResult maybeWhen({
TResult Function()? empty,
TResult Function()? loading,
- TResult Function(List projectFacilities)? fetched,
+ TResult Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
required TResult orElse(),
}) {
if (empty != null) {
@@ -451,7 +461,8 @@ class _$ProjectFacilityLoadingStateImpl implements ProjectFacilityLoadingState {
TResult when({
required TResult Function() empty,
required TResult Function() loading,
- required TResult Function(List projectFacilities)
+ required TResult Function(List projectFacilities,
+ Map facilityMap)
fetched,
}) {
return loading();
@@ -462,7 +473,9 @@ class _$ProjectFacilityLoadingStateImpl implements ProjectFacilityLoadingState {
TResult? whenOrNull({
TResult? Function()? empty,
TResult? Function()? loading,
- TResult? Function(List projectFacilities)? fetched,
+ TResult? Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
}) {
return loading?.call();
}
@@ -472,7 +485,9 @@ class _$ProjectFacilityLoadingStateImpl implements ProjectFacilityLoadingState {
TResult maybeWhen({
TResult Function()? empty,
TResult Function()? loading,
- TResult Function(List projectFacilities)? fetched,
+ TResult Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
required TResult orElse(),
}) {
if (loading != null) {
@@ -528,7 +543,9 @@ abstract class _$$ProjectFacilityFetchedStateImplCopyWith<$Res> {
$Res Function(_$ProjectFacilityFetchedStateImpl) then) =
__$$ProjectFacilityFetchedStateImplCopyWithImpl<$Res>;
@useResult
- $Res call({List projectFacilities});
+ $Res call(
+ {List projectFacilities,
+ Map facilityMap});
}
/// @nodoc
@@ -545,12 +562,17 @@ class __$$ProjectFacilityFetchedStateImplCopyWithImpl<$Res>
@override
$Res call({
Object? projectFacilities = null,
+ Object? facilityMap = null,
}) {
return _then(_$ProjectFacilityFetchedStateImpl(
projectFacilities: null == projectFacilities
? _value._projectFacilities
: projectFacilities // ignore: cast_nullable_to_non_nullable
as List,
+ facilityMap: null == facilityMap
+ ? _value._facilityMap
+ : facilityMap // ignore: cast_nullable_to_non_nullable
+ as Map,
));
}
}
@@ -559,8 +581,10 @@ class __$$ProjectFacilityFetchedStateImplCopyWithImpl<$Res>
class _$ProjectFacilityFetchedStateImpl implements ProjectFacilityFetchedState {
const _$ProjectFacilityFetchedStateImpl(
- {required final List projectFacilities})
- : _projectFacilities = projectFacilities;
+ {required final List projectFacilities,
+ required final Map facilityMap})
+ : _projectFacilities = projectFacilities,
+ _facilityMap = facilityMap;
final List _projectFacilities;
@override
@@ -571,9 +595,17 @@ class _$ProjectFacilityFetchedStateImpl implements ProjectFacilityFetchedState {
return EqualUnmodifiableListView(_projectFacilities);
}
+ final Map _facilityMap;
+ @override
+ Map get facilityMap {
+ if (_facilityMap is EqualUnmodifiableMapView) return _facilityMap;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableMapView(_facilityMap);
+ }
+
@override
String toString() {
- return 'ProjectFacilityState.fetched(projectFacilities: $projectFacilities)';
+ return 'ProjectFacilityState.fetched(projectFacilities: $projectFacilities, facilityMap: $facilityMap)';
}
@override
@@ -582,12 +614,16 @@ class _$ProjectFacilityFetchedStateImpl implements ProjectFacilityFetchedState {
(other.runtimeType == runtimeType &&
other is _$ProjectFacilityFetchedStateImpl &&
const DeepCollectionEquality()
- .equals(other._projectFacilities, _projectFacilities));
+ .equals(other._projectFacilities, _projectFacilities) &&
+ const DeepCollectionEquality()
+ .equals(other._facilityMap, _facilityMap));
}
@override
int get hashCode => Object.hash(
- runtimeType, const DeepCollectionEquality().hash(_projectFacilities));
+ runtimeType,
+ const DeepCollectionEquality().hash(_projectFacilities),
+ const DeepCollectionEquality().hash(_facilityMap));
@JsonKey(ignore: true)
@override
@@ -601,10 +637,11 @@ class _$ProjectFacilityFetchedStateImpl implements ProjectFacilityFetchedState {
TResult when({
required TResult Function() empty,
required TResult Function() loading,
- required TResult Function(List projectFacilities)
+ required TResult Function(List projectFacilities,
+ Map facilityMap)
fetched,
}) {
- return fetched(projectFacilities);
+ return fetched(projectFacilities, facilityMap);
}
@override
@@ -612,9 +649,11 @@ class _$ProjectFacilityFetchedStateImpl implements ProjectFacilityFetchedState {
TResult? whenOrNull({
TResult? Function()? empty,
TResult? Function()? loading,
- TResult? Function(List projectFacilities)? fetched,
+ TResult? Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
}) {
- return fetched?.call(projectFacilities);
+ return fetched?.call(projectFacilities, facilityMap);
}
@override
@@ -622,11 +661,13 @@ class _$ProjectFacilityFetchedStateImpl implements ProjectFacilityFetchedState {
TResult maybeWhen({
TResult Function()? empty,
TResult Function()? loading,
- TResult Function(List projectFacilities)? fetched,
+ TResult Function(List projectFacilities,
+ Map facilityMap)?
+ fetched,
required TResult orElse(),
}) {
if (fetched != null) {
- return fetched(projectFacilities);
+ return fetched(projectFacilities, facilityMap);
}
return orElse();
}
@@ -668,10 +709,12 @@ class _$ProjectFacilityFetchedStateImpl implements ProjectFacilityFetchedState {
abstract class ProjectFacilityFetchedState implements ProjectFacilityState {
const factory ProjectFacilityFetchedState(
- {required final List projectFacilities}) =
+ {required final List projectFacilities,
+ required final Map facilityMap}) =
_$ProjectFacilityFetchedStateImpl;
List get projectFacilities;
+ Map get facilityMap;
@JsonKey(ignore: true)
_$$ProjectFacilityFetchedStateImplCopyWith<_$ProjectFacilityFetchedStateImpl>
get copyWith => throw _privateConstructorUsedError;
diff --git a/packages/digit_data_model/lib/data/data_repository.dart b/packages/digit_data_model/lib/data/data_repository.dart
index 17b98e2dc..89914d162 100644
--- a/packages/digit_data_model/lib/data/data_repository.dart
+++ b/packages/digit_data_model/lib/data/data_repository.dart
@@ -291,7 +291,7 @@ R extends EntitySearchModel> extends DataRepository {
}
return await dio.post(
- 'error-handler/handle-error', // [TODO: Update this URL]
+ DigitDataModelSingleton().errorDumpApiPath,
options: Options(headers: {
"content-type": 'application/json',
}),
diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart
index 3c37e452b..f8d5dfca9 100644
--- a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart
+++ b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart
@@ -6875,6 +6875,11 @@ class $FacilityTable extends Facility
late final GeneratedColumn tenantId = GeneratedColumn(
'tenant_id', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
+ static const VerificationMeta _nameMeta = const VerificationMeta('name');
+ @override
+ late final GeneratedColumn name = GeneratedColumn(
+ 'name', aliasedName, true,
+ type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _isDeletedMeta =
const VerificationMeta('isDeleted');
@override
@@ -6913,6 +6918,7 @@ class $FacilityTable extends Facility
auditModifiedBy,
auditModifiedTime,
tenantId,
+ name,
isDeleted,
rowVersion,
additionalFields
@@ -7006,6 +7012,10 @@ class $FacilityTable extends Facility
context.handle(_tenantIdMeta,
tenantId.isAcceptableOrUnknown(data['tenant_id']!, _tenantIdMeta));
}
+ if (data.containsKey('name')) {
+ context.handle(
+ _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta));
+ }
if (data.containsKey('is_deleted')) {
context.handle(_isDeletedMeta,
isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta));
@@ -7059,6 +7069,8 @@ class $FacilityTable extends Facility
DriftSqlType.int, data['${effectivePrefix}audit_modified_time']),
tenantId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}tenant_id']),
+ name: attachedDatabase.typeMapping
+ .read(DriftSqlType.string, data['${effectivePrefix}name']),
isDeleted: attachedDatabase.typeMapping
.read(DriftSqlType.bool, data['${effectivePrefix}is_deleted']),
rowVersion: attachedDatabase.typeMapping
@@ -7089,6 +7101,7 @@ class FacilityData extends DataClass implements Insertable {
final String? auditModifiedBy;
final int? auditModifiedTime;
final String? tenantId;
+ final String? name;
final bool? isDeleted;
final int? rowVersion;
final String? additionalFields;
@@ -7107,6 +7120,7 @@ class FacilityData extends DataClass implements Insertable {
this.auditModifiedBy,
this.auditModifiedTime,
this.tenantId,
+ this.name,
this.isDeleted,
this.rowVersion,
this.additionalFields});
@@ -7153,6 +7167,9 @@ class FacilityData extends DataClass implements Insertable {
if (!nullToAbsent || tenantId != null) {
map['tenant_id'] = Variable(tenantId);
}
+ if (!nullToAbsent || name != null) {
+ map['name'] = Variable(name);
+ }
if (!nullToAbsent || isDeleted != null) {
map['is_deleted'] = Variable(isDeleted);
}
@@ -7206,6 +7223,7 @@ class FacilityData extends DataClass implements Insertable {
tenantId: tenantId == null && nullToAbsent
? const Value.absent()
: Value(tenantId),
+ name: name == null && nullToAbsent ? const Value.absent() : Value(name),
isDeleted: isDeleted == null && nullToAbsent
? const Value.absent()
: Value(isDeleted),
@@ -7237,6 +7255,7 @@ class FacilityData extends DataClass implements Insertable {
auditModifiedBy: serializer.fromJson(json['auditModifiedBy']),
auditModifiedTime: serializer.fromJson(json['auditModifiedTime']),
tenantId: serializer.fromJson(json['tenantId']),
+ name: serializer.fromJson(json['name']),
isDeleted: serializer.fromJson(json['isDeleted']),
rowVersion: serializer.fromJson(json['rowVersion']),
additionalFields: serializer.fromJson(json['additionalFields']),
@@ -7260,6 +7279,7 @@ class FacilityData extends DataClass implements Insertable {
'auditModifiedBy': serializer.toJson(auditModifiedBy),
'auditModifiedTime': serializer.toJson(auditModifiedTime),
'tenantId': serializer.toJson(tenantId),
+ 'name': serializer.toJson(name),
'isDeleted': serializer.toJson(isDeleted),
'rowVersion': serializer.toJson(rowVersion),
'additionalFields': serializer.toJson(additionalFields),
@@ -7281,6 +7301,7 @@ class FacilityData extends DataClass implements Insertable {
Value