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

Beneficiary Id linking #593

Open
wants to merge 46 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b9b65bb
Removed privacy policy from main app to digit component (#569)
rachana-egov Sep 10, 2024
6317df4
wayBillNumber key change from waybillNumber (#571)
naveenr-egov Sep 17, 2024
cb7b72f
sorting tasks based on createdTime
naveenr-egov Sep 24, 2024
5fb6235
sorting tasks based on lastModifiedTime
naveenr-egov Sep 25, 2024
eae106b
Added Multi-checklist validation
naveenr-egov Sep 27, 2024
87bfae9
Updated beneficiary_type variable in target entity and table to string
naveenr-egov Oct 7, 2024
ec51d18
unique beneficiary id changes pull back.
naveenr-egov Oct 9, 2024
6e59ff0
Added additionalDetails field to service definition attributes model
Ramkrishna-egov Oct 15, 2024
b4e824a
updated attributs
yash-egov Oct 15, 2024
5099785
updated digit_data_model
yash-egov Oct 14, 2024
6ad0e22
Updated change log for digit_data_model package - uniqueId pre release
Ramkrishna-egov Oct 16, 2024
160047f
linked unique beneficiary id to identifier at registration delivery
naveenr-egov Oct 16, 2024
2a1a1c0
individual name search fix
naveenr-egov Oct 23, 2024
84a2e9f
null check handled
yashita-egov Oct 23, 2024
06a28d8
Modified household search model
naveenr-egov Oct 23, 2024
5cf19b2
Updated query to handle BeneficiaryReferred status search
naveenr-egov Oct 28, 2024
0d0cbfc
Changed additionalDetails of ServiceModel to Map<String, dynamic>
naveenr-egov Nov 5, 2024
ce07a75
published registration_delivery package
naveenr-egov Nov 5, 2024
1e0ace9
updated stock and facility model
yash-egov Nov 6, 2024
daf574f
updated stock and facility model
yash-egov Nov 6, 2024
1dbe6b1
updated stock and facility model
yash-egov Nov 6, 2024
6f5a2fd
merge conflicts
yash-egov Nov 11, 2024
0afec4e
update blocs for dateOfEntry
yash-egov Nov 11, 2024
123d792
merge conflicts
yash-egov Nov 11, 2024
3fbf48f
updates for facilityName
yash-egov Nov 11, 2024
2254d92
merge conflicts
yash-egov Nov 11, 2024
e8dc5af
removed page changes
yash-egov Nov 11, 2024
97260c7
merge conflicts
yash-egov Nov 11, 2024
92bad7b
added event for setting dateOfReconciliation
yash-egov Nov 12, 2024
b5d2aec
updated packages to dev version for stock and facility changes
naveenr-egov Nov 19, 2024
0b4f119
updated lock and yaml file for the version changes
naveenr-egov Nov 19, 2024
7237bed
added name field
yash-egov Dec 11, 2024
96865de
Merge pull request #626 from egovernments/smc-1
naveenr-egov Dec 12, 2024
1921f46
version update for facility name addition in facility repo
naveenr-egov Dec 12, 2024
2ce3a1e
added projectTypeCode in dashboard schema
yash-egov Dec 17, 2024
54496f8
taken dashboard changes
yash-egov Dec 17, 2024
e07f6ae
Merge pull request #638 from egovernments/dashboard_smc_2
naveenr-egov Dec 17, 2024
6ac013b
published dss version and modified change logs
naveenr-egov Dec 17, 2024
5a617e1
pulled back changes https://github.com/HCM-MOZ-IMPEL/health-campaign-…
naveenr-egov Dec 30, 2024
dfaac7a
registration_delivery from git in closed_household
naveenr-egov Dec 30, 2024
44983a8
Added additional fields in stock search response
naveenr-egov Dec 30, 2024
4455bfe
updated hardcoded sync count, retry count and error api path
naveenr-egov Dec 5, 2024
2990734
published the packages
naveenr-egov Dec 30, 2024
559a46c
updated to latest digit_data_model version. Provided facility repo
naveenr-egov Dec 30, 2024
5790160
Published inventory package
naveenr-egov Dec 31, 2024
045bf05
passing all individuals from members
naveenr-egov Jan 3, 2025
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 @@ -11,6 +11,7 @@
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="com.android.alarm.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!--#docregion android-queries-->
<!-- Provide required visibility configuration for API level 30 and above -->
<queries>
Expand Down
2 changes: 2 additions & 0 deletions apps/health_campaign_field_worker_app/lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ class MainApplicationState extends State<MainApplication>
projectFacilityDataRepository: context.repository<
ProjectFacilityModel,
ProjectFacilitySearchModel>(),
facilityDataRepository: context.repository<
FacilityModel, FacilitySearchModel>(),
),
),
BlocProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> appLaunchedFirstTime() async {
await sharedPreferences.setBool(
Expand All @@ -44,5 +45,4 @@ class AppSharedPreferences {
localeString,
);
}

}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/health_campaign_field_worker_app/lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
124 changes: 79 additions & 45 deletions apps/health_campaign_field_worker_app/lib/pages/login.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 {
Expand Down Expand Up @@ -126,30 +127,33 @@ class _LoginPageState extends LocalizedState<LoginPage> {
suffix: buildPasswordVisibility(),
),
BlocBuilder<AppInitializationBloc,
AppInitializationState>(
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: () {
Expand All @@ -159,16 +163,16 @@ class _LoginPageState extends LocalizedState<LoginPage> {
FocusManager.instance.primaryFocus?.unfocus();

context.read<AuthBloc>().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(
Expand Down Expand Up @@ -224,16 +228,46 @@ class _LoginPageState extends LocalizedState<LoginPage> {
}

FormGroup buildForm() => fb.group(<String, Object>{
_userId: FormControl<String>(
value: '',
validators: [Validators.required],
),
_password: FormControl<String>(
validators: [Validators.required],
value: '',
),
_privacyCheck: FormControl<bool>(
value: false,
)
});
_userId: FormControl<String>(
value: '',
validators: [Validators.required],
),
_password: FormControl<String>(
validators: [Validators.required],
value: '',
),
_privacyCheck: FormControl<bool>(
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(),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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!,
),
];
}
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -110,9 +111,7 @@ class SideBar extends StatelessWidget {
i18.common.coreCommonlanguage,
),
icon: Icons.language,
onPressed: () {

},
onPressed: () {},
content: Offstage(
offstage: languages == null,
child: BlocBuilder<LocalizationBloc, LocalizationState>(
Expand Down
Loading