Skip to content

Commit

Permalink
Removed privacy policy from main app to digit component (#569)
Browse files Browse the repository at this point in the history
* Updated the integer form picker and added a new text block component (#441)

* updated the integer picker and added a new text block component

* added a field to change the width of button

* modified text block component to conditionally render children

---------

Co-authored-by: rachana-egov <[email protected]>

* updated description for household location and details page (#443)

Co-authored-by: rachana-egov <[email protected]>

* replaced product variant dropdown to selection card (#445)

Co-authored-by: rachana-egov <[email protected]>

* HLM-6283:: IRS- Household Details Fields added (#444)

* Updated checklist for a new type boolean (#446)

* updated checklist for a new type boolean

* added To Do to fix hard code options

---------

Co-authored-by: rachana-egov <[email protected]>

* HLM-6282 and HLM-6283:: House Structure Details Page added (#447)

* HLM-6283:: IRS- Household Details Fields added

* HLM-6283:: House Structure Details Page

* integrated checklist inside the beneficiary flow and updated gender field to selection card (#450)

Co-authored-by: rachana-egov <[email protected]>

* HLM-6371:: Beneficiary Registration Summary Page (#452)

* HLM-6283:: IRS- Household Details Fields added

* HLM-6283:: House Structure Details Page

* HLM-6371:: Beneficiary Registration Summary Page

* Updated registration_delivery script

* Added refused delivery page (#451)

* integrated checklist inside the beneficiary flow and updated gender field to selection card

* fetching refusal reasons

* added refused delivery page

* added refused delivery page

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen J <[email protected]>

* No delivery flow page (#453)

Co-authored-by: rachana-egov <[email protected]>

* HLM-6367:: Auto Create project beneficiary (#454)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

---------

Co-authored-by: Naveen Renati <[email protected]>

* Hlm 6414 - MDMS StatusFilter, Filter search (#448)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* create individual_global_search and implemented search

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

* implemented household_global_search.dart
fixed individual_global_search.dart

* updated proximity search for household_global_search.dart

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456)

---------

Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* HCMPRE-98 Filter search pagination, Removed private PageState (#457)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* create individual_global_search and implemented search

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

* implemented household_global_search.dart
fixed individual_global_search.dart

* updated proximity search for household_global_search.dart

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456)

* updated class state from private for customization override in registration_delivery and inventory

added pagination for filter search

TODO: combination search for registered and not registered needs fix which return only last selected results

* adding missed changes for last commit

* displaying selected filter value for applied filters in search_beneficiary.dart

* updated changelog for inventory and registration_delivery for new dev versions

* updated pubspec lock of registration_delivery

---------

Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Created a new package for marking closed household (#459)

* Created a new package for marking closed household

* fixed build issues

* updated the name to userAction

---------

Co-authored-by: rachana-egov <[email protected]>

* HCMPRE-98 - Inventory TeamCode fixes, Filter search fixes (#460)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* create individual_global_search and implemented search

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

* implemented household_global_search.dart
fixed individual_global_search.dart

* updated proximity search for household_global_search.dart

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456)

* updated class state from private for customization override in registration_delivery and inventory

added pagination for filter search

TODO: combination search for registered and not registered needs fix which return only last selected results

* adding missed changes for last commit

* displaying selected filter value for applied filters in search_beneficiary.dart

* updated changelog for inventory and registration_delivery for new dev versions

* updated pubspec lock of registration_delivery

* removed multiple filter selection

modified filter search

* fixed delivery team scanner issues in stock_details.dart

* Fixed - missing addition of scanned resources to additional fields

filter search bug fixes

* HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458)

* updated individual global search

added beneficiary type check in view_beneficiary_card.dart
removed commented code in household_overview.dart

* Added null check for beneficiaryTag in closed_household_summary.dart

---------

Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Hcmpre 118 - Closed Household, Filter improvements, Bug fixes (#467)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* create individual_global_search and implemented search

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

* implemented household_global_search.dart
fixed individual_global_search.dart

* updated proximity search for household_global_search.dart

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456)

* updated class state from private for customization override in registration_delivery and inventory

added pagination for filter search

TODO: combination search for registered and not registered needs fix which return only last selected results

* adding missed changes for last commit

* displaying selected filter value for applied filters in search_beneficiary.dart

* updated changelog for inventory and registration_delivery for new dev versions

* updated pubspec lock of registration_delivery

* removed multiple filter selection

modified filter search

* fixed delivery team scanner issues in stock_details.dart

* Fixed - missing addition of scanned resources to additional fields

filter search bug fixes

* HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458)

* updated individual global search

added beneficiary type check in view_beneficiary_card.dart
removed commented code in household_overview.dart

* Added null check for beneficiaryTag in closed_household_summary.dart

* Exposed Registration delivery pages

* updated remote repository and some miner fixes (#461)

Co-authored-by: rachana-egov <[email protected]>

* HCMPRE-82:: Validations and Bug Fixes

* small css fixes (#462)

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>

* merge fix

* added closed household search

* status model fix

* Closed-household-registration (#464)

* closed-household-registration

* closed-household-registration

* updated pub file

---------

Co-authored-by: rachana-egov <[email protected]>

* added closed household init file
modified user_action.dart model and db corrected
modified closed household status

* updated registration for closed household

* added closed_household search and updating closed household status

* clearing search before navigating to registration flow

* getting last tasks in household_overview.dart

* HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463)

* Validation and gps fixes

* fixed closed household count

clearing closedhould results for clear

* pagination fix for closed household

* sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465)

Co-authored-by: rachana-egov <[email protected]>

* DeliverySummary Route added to main app

* seperated closedhousehold search
Bug fixes - HCMPRE-112, 110, 113

* updated all the points of this ticket HCMPRE-120 (#466)

Co-authored-by: rachana-egov <[email protected]>

* Bug Fixes, dev version release of packages

* HCMPRE-119:: IRS Demo fixes (#468)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* updated closed button action to push closedhousehold

tasks filter with last fix

* updated validation for closed household name and fix error message size (#470)

Co-authored-by: rachana-egov <[email protected]>

* Irs demo fix patch (#469)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* Edit Household if no project beneficiary fix

* reverted hiding of digit search bar when closed filter is applied

* status update based on last task status in household_overview.dart

mapped administered success in beneficiary_card.dart

moved getstatus to utils.dart

* fixed offset increasing twice

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471)

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes

* Added date formats to constants

* fixed offset increasing twice

closed household distance fix
emitting scanner state loading

* dev version bump-up for registration and scanner

* version updates for packages

---------

Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>

* Hcmpre 155 - ClosedHousehold flow change (#478)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* create individual_global_search and implemented search

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

* implemented household_global_search.dart
fixed individual_global_search.dart

* updated proximity search for household_global_search.dart

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456)

* updated class state from private for customization override in registration_delivery and inventory

added pagination for filter search

TODO: combination search for registered and not registered needs fix which return only last selected results

* adding missed changes for last commit

* displaying selected filter value for applied filters in search_beneficiary.dart

* updated changelog for inventory and registration_delivery for new dev versions

* updated pubspec lock of registration_delivery

* removed multiple filter selection

modified filter search

* fixed delivery team scanner issues in stock_details.dart

* Fixed - missing addition of scanned resources to additional fields

filter search bug fixes

* HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458)

* updated individual global search

added beneficiary type check in view_beneficiary_card.dart
removed commented code in household_overview.dart

* Added null check for beneficiaryTag in closed_household_summary.dart

* Exposed Registration delivery pages

* updated remote repository and some miner fixes (#461)

Co-authored-by: rachana-egov <[email protected]>

* HCMPRE-82:: Validations and Bug Fixes

* small css fixes (#462)

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>

* merge fix

* added closed household search

* status model fix

* Closed-household-registration (#464)

* closed-household-registration

* closed-household-registration

* updated pub file

---------

Co-authored-by: rachana-egov <[email protected]>

* added closed household init file
modified user_action.dart model and db corrected
modified closed household status

* updated registration for closed household

* added closed_household search and updating closed household status

* clearing search before navigating to registration flow

* getting last tasks in household_overview.dart

* HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463)

* Validation and gps fixes

* fixed closed household count

clearing closedhould results for clear

* pagination fix for closed household

* sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465)

Co-authored-by: rachana-egov <[email protected]>

* DeliverySummary Route added to main app

* seperated closedhousehold search
Bug fixes - HCMPRE-112, 110, 113

* updated all the points of this ticket HCMPRE-120 (#466)

Co-authored-by: rachana-egov <[email protected]>

* Bug Fixes, dev version release of packages

* HCMPRE-119:: IRS Demo fixes (#468)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* updated closed button action to push closedhousehold

tasks filter with last fix

* updated validation for closed household name and fix error message size (#470)

Co-authored-by: rachana-egov <[email protected]>

* Irs demo fix patch (#469)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* Edit Household if no project beneficiary fix

* reverted hiding of digit search bar when closed filter is applied

* status update based on last task status in household_overview.dart

mapped administered success in beneficiary_card.dart

moved getstatus to utils.dart

* fixed offset increasing twice

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471)

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes

* Added date formats to constants

* fixed offset increasing twice

closed household distance fix
emitting scanner state loading

* dev version bump-up for registration and scanner

* version updates for packages

* View Household button added in delete individual success page, Search project beneficiary fix

* added close button to close the filter and disabled the clear button … (#475)

* added close button to close the filter and disabled the clear button unless something is selected

* added validation for closed household head name same as individual

* updated the condition for validation of closehousehold head

---------

Co-authored-by: rachana-egov <[email protected]>

* View Household button added in delete individual success page, Search project beneficiary fix (#474)

* Search beneficiary fix

* Search beneficiary fix

* Bloc dispose fix

* Bloc dispose fix

* Updated task based search for household

* Modified closed household package to use registration flow for creating a household and related data along with task as closed

deleted user_action from data_model package

Updating closed_household to not_delivered status after closed household registration

* version updates of closed_household, digit_components, digit_data_model, registration_delivery

* version upgrade for registration_delivery

---------

Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* Hcmpre 164, 165 - Count implementation for filter search (#485)

* Update closed_household_details.dart (#482)

* Fixed pagination refresh issue (#481)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

---------

Co-authored-by: rachana-egov <[email protected]>

* implemented count for filter search, added todo for combination search count

* Fixed count

TODO: search with task status filter

* Fixed search with task status filter

Removed delay in delivery_summary_page.dart

* added code comments

* HCMPRE-165 issues (#484)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

* HCMPRE-162:: Reload issue fix for closed household and not registered

* HCMPRE-165: issues fixes

* updated reasons for refusals

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Updated publock

* Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error

* Resolved code comments

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* fixed reports are not getting refreshed after updating facility (#486)

Co-authored-by: rachana-egov <[email protected]>

* Delivery summary page Resources and quantity added (#473)

* Delivery summary page Resources and quantity added

* fix for offset increment twice

* Delivery summary page Resources and quantity added

---------

Co-authored-by: Naveen Renati <[email protected]>
Co-authored-by: Naveen J <[email protected]>

* updated script for closed household (#489)

Co-authored-by: rachana-egov <[email protected]>

* Hcmpre 166 - Moved Localization from ISAR To SQL (#488)

* Update closed_household_details.dart (#482)

* Fixed pagination refresh issue (#481)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

---------

Co-authored-by: rachana-egov <[email protected]>

* implemented count for filter search, added todo for combination search count

* Fixed count

TODO: search with task status filter

* Fixed search with task status filter

Removed delay in delivery_summary_page.dart

* added code comments

* HCMPRE-165 issues (#484)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

* HCMPRE-162:: Reload issue fix for closed household and not registered

* HCMPRE-165: issues fixes

* updated reasons for refusals

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Updated publock

* Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error

* created new table for localization

TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage

Delete localization related isar files once tested

* init Boundary code wise localization.dart

* create localization local repo

modified module separation from query to exclude and include specified module

* modified module exclude in boundary page

* modified localization call for boundary selection bug where first value is localized in dropdown

* removed un-required localization bloc calls

* updated index value to selected language on home

* removed login cred

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Removed null condition, fixed double is not a subtype of string issue and added null check for table (#490)

* HCMPRE-156 : type 'double' is not a subtype of type 'String'

* added check if the first table row is null

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen J <[email protected]>

* HCMPRE-177:: Metric and Table Charts Integration in Mobile dashboard and digit_dss package initial release (#480)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* create individual_global_search and implemented search

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty

* implemented household_global_search.dart
fixed individual_global_search.dart

* updated proximity search for household_global_search.dart

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456)

* updated class state from private for customization override in registration_delivery and inventory

added pagination for filter search

TODO: combination search for registered and not registered needs fix which return only last selected results

* adding missed changes for last commit

* HCMPRE-55 Dashboard Static Screen added

* displaying selected filter value for applied filters in search_beneficiary.dart

* updated changelog for inventory and registration_delivery for new dev versions

* updated pubspec lock of registration_delivery

* removed multiple filter selection

modified filter search

* fixed delivery team scanner issues in stock_details.dart

* Fixed - missing addition of scanned resources to additional fields

filter search bug fixes

* HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458)

* updated individual global search

added beneficiary type check in view_beneficiary_card.dart
removed commented code in household_overview.dart

* Added null check for beneficiaryTag in closed_household_summary.dart

* Exposed Registration delivery pages

* updated remote repository and some miner fixes (#461)

Co-authored-by: rachana-egov <[email protected]>

* HCMPRE-82:: Validations and Bug Fixes

* small css fixes (#462)

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>

* merge fix

* added closed household search

* status model fix

* Closed-household-registration (#464)

* closed-household-registration

* closed-household-registration

* updated pub file

---------

Co-authored-by: rachana-egov <[email protected]>

* added closed household init file
modified user_action.dart model and db corrected
modified closed household status

* updated registration for closed household

* added closed_household search and updating closed household status

* clearing search before navigating to registration flow

* getting last tasks in household_overview.dart

* HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463)

* Validation and gps fixes

* fixed closed household count

clearing closedhould results for clear

* pagination fix for closed household

* sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465)

Co-authored-by: rachana-egov <[email protected]>

* DeliverySummary Route added to main app

* seperated closedhousehold search
Bug fixes - HCMPRE-112, 110, 113

* updated all the points of this ticket HCMPRE-120 (#466)

Co-authored-by: rachana-egov <[email protected]>

* Bug Fixes, dev version release of packages

* HCMPRE-119:: IRS Demo fixes (#468)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* updated closed button action to push closedhousehold

tasks filter with last fix

* updated validation for closed household name and fix error message size (#470)

Co-authored-by: rachana-egov <[email protected]>

* Irs demo fix patch (#469)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* Edit Household if no project beneficiary fix

* reverted hiding of digit search bar when closed filter is applied

* status update based on last task status in household_overview.dart

mapped administered success in beneficiary_card.dart

moved getstatus to utils.dart

* fixed offset increasing twice

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471)

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes

* Added date formats to constants

* fixed offset increasing twice

closed household distance fix
emitting scanner state loading

* dev version bump-up for registration and scanner

* version updates for packages

* View Household button added in delete individual success page, Search project beneficiary fix

* added close button to close the filter and disabled the clear button … (#475)

* added close button to close the filter and disabled the clear button unless something is selected

* added validation for closed household head name same as individual

* updated the condition for validation of closehousehold head

---------

Co-authored-by: rachana-egov <[email protected]>

* View Household button added in delete individual success page, Search project beneficiary fix (#474)

* Search beneficiary fix

* Search beneficiary fix

* Bloc dispose fix

* Bloc dispose fix

* Updated task based search for household

* HCMPRE-177:: Metric Chart Integration and digit_dss package setup

* HCMPRE-177:: Added Refresh Indicator for refreshing the dashboard

* HCMPRE-177:: Table chart integration and Refresh logic update

* Added code comments for digit_dss package

* Added enums and constants

* Resolved code comments and updated versions for packages

* HCMPRE177:: Moved dashboard UI Config to MDMS

* HCMPRE177:: Added dss_import script for digit_dss package

* Resolved code comments

* Updated dashboard Config

* Added dashboard config search to try catch block

* Resolved conflicts

* published data_model and registration_delivery

* Added Read me file and updated pubspec.yaml

---------

Co-authored-by: Naveen Renati <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>

* HCMPRE-177:: Fetch and send attendees uuids of registers to dss filters (#491)

* added translator for administration area

* Fixed Facility search based on tenant ID

* Added disable battery optimization permission for background service

* Added disable battery optimization ask permission on App start and background service start

* HLM-5984:: Get Precise location on Submitting latitude longitude details

* Reverted install_bricks.sh

* added new status REGISTERED, NOT_REGISTERED

updated conditional check for status by project beneficiaries

* added static status_filter.dart integration in search_beneficiary.dart

* TODO for selected_filters display condition

* integrated household search filters with mdms
implemented search based on filters with pagination for Registered and NotRegistered

* updated status filter component
merge with develop

* create individual_global_search and implemented search

* Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present

* Conflicts resolved

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty

* implemented household_global_search.dart
fixed individual_global_search.dart

* updated proximity search for household_global_search.dart

* Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456)

* updated class state from private for customization override in registration_delivery and inventory

added pagination for filter search

TODO: combination search for registered and not registered needs fix which return only last selected results

* adding missed changes for last commit

* HCMPRE-55 Dashboard Static Screen added

* displaying selected filter value for applied filters in search_beneficiary.dart

* updated changelog for inventory and registration_delivery for new dev versions

* updated pubspec lock of registration_delivery

* removed multiple filter selection

modified filter search

* fixed delivery team scanner issues in stock_details.dart

* Fixed - missing addition of scanned resources to additional fields

filter search bug fixes

* HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458)

* updated individual global search

added beneficiary type check in view_beneficiary_card.dart
removed commented code in household_overview.dart

* Added null check for beneficiaryTag in closed_household_summary.dart

* Exposed Registration delivery pages

* updated remote repository and some miner fixes (#461)

Co-authored-by: rachana-egov <[email protected]>

* HCMPRE-82:: Validations and Bug Fixes

* small css fixes (#462)

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>

* merge fix

* added closed household search

* status model fix

* Closed-household-registration (#464)

* closed-household-registration

* closed-household-registration

* updated pub file

---------

Co-authored-by: rachana-egov <[email protected]>

* added closed household init file
modified user_action.dart model and db corrected
modified closed household status

* updated registration for closed household

* added closed_household search and updating closed household status

* clearing search before navigating to registration flow

* getting last tasks in household_overview.dart

* HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463)

* Validation and gps fixes

* fixed closed household count

clearing closedhould results for clear

* pagination fix for closed household

* sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465)

Co-authored-by: rachana-egov <[email protected]>

* DeliverySummary Route added to main app

* seperated closedhousehold search
Bug fixes - HCMPRE-112, 110, 113

* updated all the points of this ticket HCMPRE-120 (#466)

Co-authored-by: rachana-egov <[email protected]>

* Bug Fixes, dev version release of packages

* HCMPRE-119:: IRS Demo fixes (#468)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* updated closed button action to push closedhousehold

tasks filter with last fix

* updated validation for closed household name and fix error message size (#470)

Co-authored-by: rachana-egov <[email protected]>

* Irs demo fix patch (#469)

* HCMPRE-119:: IRS Demo fixes

* Removed unused code

* Edit Household if no project beneficiary fix

* reverted hiding of digit search bar when closed filter is applied

* status update based on last task status in household_overview.dart

mapped administered success in beneficiary_card.dart

moved getstatus to utils.dart

* fixed offset increasing twice

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471)

* HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes

* Added date formats to constants

* fixed offset increasing twice

closed household distance fix
emitting scanner state loading

* dev version bump-up for registration and scanner

* version updates for packages

* View Household button added in delete individual success page, Search project beneficiary fix

* added close button to close the filter and disabled the clear button … (#475)

* added close button to close the filter and disabled the clear button unless something is selected

* added validation for closed household head name same as individual

* updated the condition for validation of closehousehold head

---------

Co-authored-by: rachana-egov <[email protected]>

* View Household button added in delete individual success page, Search project beneficiary fix (#474)

* Search beneficiary fix

* Search beneficiary fix

* Bloc dispose fix

* Bloc dispose fix

* Updated task based search for household

* HCMPRE-177:: Metric Chart Integration and digit_dss package setup

* HCMPRE-177:: Added Refresh Indicator for refreshing the dashboard

* HCMPRE-177:: Table chart integration and Refresh logic update

* Added code comments for digit_dss package

* Added enums and constants

* Resolved code comments and updated versions for packages

* HCMPRE177:: Moved dashboard UI Config to MDMS

* HCMPRE177:: Added dss_import script for digit_dss package

* Resolved code comments

* Updated dashboard Config

* Added dashboard config search to try catch block

* Resolved conflicts

* published data_model and registration_delivery

* Added Read me file and updated pubspec.yaml

* Fetch and send attendees uuids of registers to dss filters

* Added dss filters

---------

Co-authored-by: Naveen Renati <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>

* Task update rather than creating new, updated filter popup loading (#493)

* Update closed_household_details.dart (#482)

* Fixed pagination refresh issue (#481)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

---------

Co-authored-by: rachana-egov <[email protected]>

* implemented count for filter search, added todo for combination search count

* Fixed count

TODO: search with task status filter

* Fixed search with task status filter

Removed delay in delivery_summary_page.dart

* added code comments

* HCMPRE-165 issues (#484)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

* HCMPRE-162:: Reload issue fix for closed household and not registered

* HCMPRE-165: issues fixes

* updated reasons for refusals

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Updated publock

* Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error

* Resolved code comments

* HCMPRE220:: Household overview state update on pushing to Registration Wrapper

* update task state if task is already present

* updated selection box to update on initial selection change and updated delivery comment code

* remove changes from beneficiary

* task update

* HCMPRE-220:: SMC Not registered flow reload fix,and closed household Not delivered status fix

* added loader for filter search

* Added name of user to additional details in stock and delivery record

* updated delivery intervention

* check summary page condition for edit flow

* fixed task update for delivery intervention

* fixed household detail page

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* updated status and registration_delivery_enums.dart (#494)

* updated status and registration_delivery_enums.dart

updated check for check-list check in household_overview.dart

* Todo for individual check in beneficiary_registration.dart

* Uploaded pre release for inventory-management and digit-dss (#495)

* removed the page count from filter, updated status filter pop up (#496)

Co-authored-by: rachana-egov <[email protected]>

* updated demo changes (#498)

Co-authored-by: rachana-egov <[email protected]>

* added lat and long inside additional field when user submit the checklist (#526)

Co-authored-by: rachana-egov <[email protected]>

* HCMPRE-221 data segration (#501)

* Update closed_household_details.dart (#482)

* Fixed pagination refresh issue (#481)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

---------

Co-authored-by: rachana-egov <[email protected]>

* implemented count for filter search, added todo for combination search count

* Fixed count

TODO: search with task status filter

* Fixed search with task status filter

Removed delay in delivery_summary_page.dart

* added code comments

* HCMPRE-165 issues (#484)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

* HCMPRE-162:: Reload issue fix for closed household and not registered

* HCMPRE-165: issues fixes

* updated reasons for refusals

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Updated publock

* Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error

* created new table for localization

TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage

Delete localization related isar files once tested

* init Boundary code wise localization.dart

* create localization local repo

modified module separation from query to exclude and include specified module

* modified module exclude in boundary page

* modified localization call for boundary selection bug where first value is localized in dropdown

* removed un-required localization bloc calls

* updated index value to selected language on home

* Uploaded pre release for inventory-management and digit-dss

* Updated delivery enums for Not delivered status

* Updated status model in task to taskStatus

* Updated registration delivery package

* Reverted Task Model status key change

* Update pubspec with latest version of packages

* Summary page Type of resource locale key updated

* Resolved comments

* Resolved comments and unused variables

* Resolved comments and unused variables

* Updated version

* Updated individual_global_search.dart for search

* added data segration

* check to enable edit delivery

* added project filter

* Registration delivery- Attendance management fixes (#497)

* Removed captured location dialog on attendance submit

* Removed stpper if deliveries length is greater than 1

* Updated digit_components and digit_data_model packages in attendance management

* Updated digit_components and digit_data_model packages in attendance management

* Localization loader and dialog localization fix (#505)

* added dialog till localization is not loaded

* fixed localization not coming issue

* added a util funtion to show language loading

---------

Co-authored-by: rachana-egov <[email protected]>

* updated search added project id in beneficiary search

removed commented code

* User uuids filter fixes for attendees local search in an attendance register (#512)

* User uuids filters fixes for attendees search in a register

* Removed default dashboard card from home

* Sync fix

---------

Co-authored-by: Naveen Renati <[email protected]>

* Added Task address mapping on refused delivery (#514)

* replace and push homepage from boundary page sync dialog

* updated register search query to exclude attendee and staff in limit query

updated attendance and registration_delivery package

* registration_delivery package update

* * Added error toast for network failure (#525)

* No result card added if no charts available

* Updated end date for dss charts to 23:59 instead of 11:59 (#527)

* task create fix - removed condition check of resources during create

updated changelog of registration, closed, digit_data_model, inventory, registration_delivery

--dry-run fixes

* Updated stable packages for scanner, attendance and dss (#528)

* updated packages to latest version
digit_components version update

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: Naveen Renati <[email protected]>

* Added Privacy Policy (#499)

* added data privacy component

* added privacy component

* updated localization

* updated the dialog to use localized value

* updated privacy config inside mdms

* updated privacy model

* removed local privacy config now coming from mdms

* Delete packages/digit_components/lib/widgets/atoms/privacy_component.dart

as component is part of main application

* fixed github build issue

* added a configuration to enable or disable this privacy policy component

* fix the issue when privacy policy component is not there

* fix the issue when privacy policy component is not there

* fixed github comments

---------

Co-authored-by: rachana-egov <[email protected]>

* HCMPRE-332:: Mobile dashboard added check for lastSyncTime to convert to date format (#540)

* HCMPRE-332:: Mobile dashboard added check for lastSyncTime to convert to date format

* added a enum for lastSyncedTime

---------

Co-authored-by: rachana-egov <[email protected]>

* Hcmpre 263 - Sync write transaction for ISAR - fix, Localization fall back (#538)

* Update closed_household_details.dart (#482)

* Fixed pagination refresh issue (#481)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

---------

Co-authored-by: rachana-egov <[email protected]>

* implemented count for filter search, added todo for combination search count

* Fixed count

TODO: search with task status filter

* Fixed search with task status filter

Removed delay in delivery_summary_page.dart

* added code comments

* HCMPRE-165 issues (#484)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

* HCMPRE-162:: Reload issue fix for closed household and not registered

* HCMPRE-165: issues fixes

* updated reasons for refusals

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Updated publock

* Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error

* created new table for localization

TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage

Delete localization related isar files once tested

* init Boundary code wise localization.dart

* create localization local repo

modified module separation from query to exclude and include specified module

* modified module exclude in boundary page

* modified localization call for boundary selection bug where first value is localized in dropdown

* removed un-required localization bloc calls

* updated index value to selected language on home

* Uploaded pre release for inventory-management and digit-dss

* Updated delivery enums for Not delivered status

* Updated status model in task to taskStatus

* Updated registration delivery package

* Reverted Task Model status key change

* Update pubspec with latest version of packages

* Summary page Type of resource locale key updated

* Resolved comments

* Resolved comments and unused variables

* Resolved comments and unused variables

* Updated version

* Updated individual_global_search.dart for search

* added data segration

* check to enable edit delivery

* added project filter

* Registration delivery- Attendance management fixes (#497)

* Removed captured location dialog on attendance submit

* Removed stpper if deliveries length is greater than 1

* Updated digit_components and digit_data_model packages in attendance management

* Updated digit_components and digit_data_model packages in attendance management

* Localization loader and dialog localization fix (#505)

* added dialog till localization is not loaded

* fixed localization not coming issue

* added a util funtion to show language loading

---------

Co-authored-by: rachana-egov <[email protected]>

* updated search added project id in beneficiary search

removed commented code

* User uuids filter fixes for attendees local search in an attendance register (#512)

* User uuids filters fixes for attendees search in a register

* Removed default dashboard card from home

* Sync fix

---------

Co-authored-by: Naveen Renati <[email protected]>

* Added Task address mapping on refused delivery (#514)

* replace and push homepage from boundary page sync dialog

* updated register search query to exclude attendee and staff in limit query

updated attendance and registration_delivery package

* registration_delivery package update

* * Added error toast for network failure (#525)

* No result card added if no charts available

* Updated end date for dss charts to 23:59 instead of 11:59 (#527)

* task create fix - removed condition check of resources during create

updated changelog of registration, closed, digit_data_model, inventory, registration_delivery

--dry-run fixes

* Updated stable packages for scanner, attendance and dss (#528)

* updated packages to latest version
digit_components version update

* added fallback ui dialog when localization call fails.

* added localization code

* merge from dev

* fix for isar transaction lock issue

* moved boundary localization path to constants.
Updated dialog in language_selection.dart page

* isar lock fix

* updated data_model version for isar fix.
updated a check in language_selection.dart for dialog

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>
Co-authored-by: naveen-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Impel changes - background-services, beneficiary_checklist (#548)

* Update closed_household_details.dart (#482)

* Fixed pagination refresh issue (#481)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

---------

Co-authored-by: rachana-egov <[email protected]>

* implemented count for filter search, added todo for combination search count

* Fixed count

TODO: search with task status filter

* Fixed search with task status filter

Removed delay in delivery_summary_page.dart

* added code comments

* HCMPRE-165 issues (#484)

* Implement search pagination (#476)

* implemented pagination for search

* added one more check to check if last response is equal to current response then also break the loop

* removed changes from data repository and added pagination only project facility and facility

---------

Co-authored-by: rachana-egov <[email protected]>

* localization update, input validation for numeric, disabled delivery intervention for closed household task (#479)

Co-authored-by: rachana-egov <[email protected]>

* fixed pagination refresh issue

* resolved the comments

* HCMPRE-162:: Reload issue fix for closed household and not registered

* HCMPRE-165: issues fixes

* updated reasons for refusals

---------

Co-authored-by: rachana-egov <[email protected]>
Co-authored-by: Ramkrishna-egov <[email protected]>

* Updated publock

* Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error

* created new table for localization

TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage

Delete localization related isar files once tested

* init Boundary code wise localization.dart

* create localization local repo

modified module separation from query to exclude and include specified module

* modified module exclude in boundary page

* modified localization call for boundary selection bug where first value is localized in dropdown

* removed un-required localization bloc calls

* updated index value to selected language on home

* Uploaded pre release for inventory-management and digit-dss

* Updated delivery enums for Not delivered status

* Updated status model in task to taskStatus

* Updated registration delivery package

* Reverted Task Model status key change

* Update pubspec with latest version of packages

* Summary page Type of resource locale key updated

* Resolved comments

* Resolved comments and unused variables

* Resolved comments and unused variables

* Updated version

* Updated individual_global_search.dart for search

* added data segration

* check to enable edit delivery

* added project filter

* Registration delivery- Attendance management fixes (#497)

* Removed captured location dialog on attendance submit

* Removed stpper if deliveries length is greater than 1

* Updated digit_components and digit_data_model packages in attendance management

* Updated digit_components and digit_data_model packages in attendance management

* Localization loader and dialog localization fix (#505)

* added dialog till localization is not loaded

* fixed localization not coming issue

* added a util funtion to show language loading

---------

Co-authored-by: rachana-egov <[email protected]>

* updated search added project id in beneficiary search

removed commented code

* User uuids filter fixes for attendees local search in an attendance register (#512)

* User uuids filters fixes for attendees search in a register

* Removed default dashboard card from home

* Sync fix

---------

Co-authored-by: Naveen Renati <[email protected]>

* Added Task address mapping on refused delivery (#514)

* replace and push homepage from boundary page sync dialog

* updated register search query to exclude attendee and staff in limit query

updated attendance and registration_delivery package

* registration_delivery package update

* * Added error toast for network failure (#525)

* No result card added if no charts available

* Updated end date for dss charts to 23:59 instead of 11:59 (#527)

* task create fix - removed condition check of resources during create

updated changelog of registration, closed, digit_data_model, inventory, registration_delivery

--dry-run fixes

* Updated stable packages for scanner, attendance and dss (#528)

* updated packages to latest version
digit_components version update

* added fallback ui dialog when localization call fails.

…
  • Loading branch information
8 people authored Sep 10, 2024
1 parent e3d8ac4 commit b9b65bb
Show file tree
Hide file tree
Showing 14 changed files with 1,229 additions and 22 deletions.
30 changes: 28 additions & 2 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,7 @@ 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 @@ -140,7 +142,7 @@ class _LoginPageState extends LocalizedState<LoginPage> {
form.control(_privacyCheck).setValidators([Validators.requiredTrue]);
form.control(_privacyCheck).updateValueAndValidity();
return PrivacyComponent(
privacyPolicy: privacyPolicyJson,
privacyPolicy: convertToPrivacyPolicyModel(privacyPolicyJson),
formControlName: _privacyCheck,
text: localizations
.translate(i18.privacyPolicy.privacyNoticeText),
Expand Down Expand Up @@ -237,3 +239,27 @@ class _LoginPageState extends LocalizedState<LoginPage> {
)
});
}


// 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 @@ -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!,
),
];
}
7 changes: 3 additions & 4 deletions apps/health_campaign_field_worker_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,9 @@ packages:
digit_components:
dependency: "direct main"
description:
name: digit_components
sha256: "9cca4d9a546037080afe02b6ade82fdf01574e11f5656ad12120fd6966578616"
url: "https://pub.dev"
source: hosted
path: "../../packages/digit_components"
relative: true
source: path
version: "1.0.1+1"
digit_data_model:
dependency: "direct main"
Expand Down
52 changes: 52 additions & 0 deletions packages/digit_components/lib/blocs/localization.dart
Original file line number Diff line number Diff line change
@@ -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<dynamic> localizedStrings;
final List<dynamic> 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<ComponentLocalization>(context, ComponentLocalization)!;
}

static final List<dynamic> _localizedStrings = <dynamic>[];

// Method to get the delegate for localization
static LocalizationsDelegate<ComponentLocalization> getDelegate(
Future<dynamic> localizedStrings, List<dynamic> languages) =>
ComponentLocalizationDelegate(localizedStrings, languages);

// Method to load localized strings
Future<bool> 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;
}
}
}
33 changes: 33 additions & 0 deletions packages/digit_components/lib/blocs/localization_delegates.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';

import 'localization.dart';


class ComponentLocalizationDelegate
extends LocalizationsDelegate<ComponentLocalization> {
final Future<dynamic> localizedStrings;
final List<dynamic> 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<ComponentLocalization> load(Locale locale) async {
ComponentLocalization localization =
ComponentLocalization(locale, localizedStrings, languages);
await localization.load();
return localization;
}

@override
bool shouldReload(covariant LocalizationsDelegate<ComponentLocalization> old) {
return true;
}
}
Original file line number Diff line number Diff line change
@@ -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<ContentNoticeModel>? contents,
}) = _PrivacyNoticeModel;

factory PrivacyNoticeModel.fromJson(Map<String, dynamic> json) => _$PrivacyNoticeModelFromJson(json);
}

@freezed
class ContentNoticeModel with _$ContentNoticeModel {
const factory ContentNoticeModel({
String? header,
List<DescriptionNoticeModel>? descriptions,
}) = _ContentNoticeModel;

factory ContentNoticeModel.fromJson(Map<String, dynamic> json) => _$ContentNoticeModelFromJson(json);
}

@freezed
class DescriptionNoticeModel with _$DescriptionNoticeModel {
const factory DescriptionNoticeModel({
String? text,
String? type,
bool? isBold,
List<SubDescriptionNoticeModel>? subDescriptions,
}) = _DescriptionNoticeModel;

factory DescriptionNoticeModel.fromJson(Map<String, dynamic> json) => _$DescriptionNoticeModelFromJson(json);
}

@freezed
class SubDescriptionNoticeModel with _$SubDescriptionNoticeModel {
const factory SubDescriptionNoticeModel({
String? text,
String? type,
bool? isBold,
bool? isSpaceRequired,
}) = _SubDescriptionNoticeModel;

factory SubDescriptionNoticeModel.fromJson(Map<String, dynamic> json) => _$SubDescriptionNoticeModelFromJson(json);
}
Loading

0 comments on commit b9b65bb

Please sign in to comment.