From 6fdd691e1c6de23d8d3f7da67fc0486785f3edd3 Mon Sep 17 00:00:00 2001 From: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:55:50 +0530 Subject: [PATCH] HLM-4367 , HLM-4370 :: UI/ UX Audit Fixes (#327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * V1.2.0 patch-1 (#284) * v1.2.0-beta-version upgrade * Validation fixes on Household Location non mandatory fields * Sync Up fixes for empty string in address * Sync Up fixes for empty string in address * Validation messages added to localization for non mandatory fields * HLM-4367:Popup Changes ui/ux in progress * HLM-3103:: Referral Management (#287) * HLM-3103:: Referral Management * HLM-3103:: View Beneficiary Card Status Text code refracting * HLM-3103:: Referral comment added to additional fields * HLM-4367: Fixed language text wrapping, issue * HLM-4367: Added paddIng for individual details checkbox * HLM-3103:: Changes in validation messages and eligibility check nee… (#289) * HLM-3103:: Changes in validation messages and eligibility n=check need to be first * HLM-3103:: label style changes * HLM-3103:: Additional field value check * HLM-3103:: Code review changes * Handle single click on Refer Beneficiary button * Updated checkbox, toast and dropdown (#292) * updated fonts and font sizes to be synced with design system and dialog size * updated checkbox toast and dropdown * pr comment update --------- Co-authored-by: rachana-egov * Localization fixes and Current cycle fixes (#293) * Hlm 2985 2d voucher (#291) * Project Type added to local storage * added voucher scanner * added text trim * added tag * bug fixes * bug fixes * added scanner fixes * added button border * fixed border issue * position fixes * fixed de-linking of QR code --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Delivery strategy need to be Direct delivery from Delivery Intervention page * Develop to master (#298) * Develop (#285) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * V1.2.0 patch-1 (#284) * v1.2.0-beta-version upgrade * Validation fixes on Household Location non mandatory fields * Sync Up fixes for empty string in address * Sync Up fixes for empty string in address * Validation messages added to localization for non mandatory fields --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * Multiround:: referral management (#295) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com>… * conflicts from master to develop (#300) * Develop (#285) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * V1.2.0 patch-1 (#284) * v1.2.0-beta-version upgrade * Validation fixes on Household Location non mandatory fields * Sync Up fixes for empty string in address * Sync Up fixes for empty string in address * Validation messages added to localization for non mandatory fields --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * Multiround:: referral management (#295) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.nore… * HLM-3103:: Referral Management (#287) * HLM-3103:: Referral Management * HLM-3103:: View Beneficiary Card Status Text code refracting * HLM-3103:: Referral comment added to additional fields * Hlm 2985 2d voucher (#291) * Project Type added to local storage * added voucher scanner * added text trim * added tag * bug fixes * bug fixes * added scanner fixes * added button border * fixed border issue * position fixes * fixed de-linking of QR code --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Develop to master (#298) * Develop (#285) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * V1.2.0 patch-1 (#284) * v1.2.0-beta-version upgrade * Validation fixes on Household Location non mandatory fields * Sync Up fixes for empty string in address * Sync Up fixes for empty string in address * Validation messages added to localization for non mandatory fields --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * Multiround:: referral management (#295) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com>… * conflicts from master to develop (#300) * Develop (#285) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * V1.2.0 patch-1 (#284) * v1.2.0-beta-version upgrade * Validation fixes on Household Location non mandatory fields * Sync Up fixes for empty string in address * Sync Up fixes for empty string in address * Validation messages added to localization for non mandatory fields --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * Multiround:: referral management (#295) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.nore… * Develop rebase with master (#302) * Develop (#285) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * V1.2.0 patch-1 (#284) * v1.2.0-beta-version upgrade * Validation fixes on Household Location non mandatory fields * Sync Up fixes for empty string in address * Sync Up fixes for empty string in address * Validation messages added to localization for non mandatory fields --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> * Multiround:: referral management (#295) * Hlm 2650 resource card multiround proximity (#283) * [hlm-2825]: Fix project selection error (#162) * Hlm 2742 and HLM 931 (#163) * [hlm-2742]: Beneficiary progress bar * [hlm-2742]: Report selection * [hlm-2742]: Fix overflows * [hlm-2742]: Intermittent * [hlm-2742]: Update transaction search model * [hlm-2742]: Intermittent * [hlm-2742]: Intermittent * [hlm-2742]: Fix report * [hlm-2742]: Fix recon additional details * [hlm-2742]: Fix localization * [hlm-2742]: [Revert this commit] * [hlm-2742]: Intermittent * [hlm-2742]: Fix * [hlm-2742]: Update report_details.dart * Revert "[hlm-2742]: [Revert this commit]" This reverts commit 8fd72d0b351630334eb59dae20a64f00a0d7b698. * [hlm-2742]: Fix report selection i18n * [hlm-2742]: Fix dependencies * [hlm-2742]: Update report_details.dart (#164) * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * Hlm 2547 locality fixes (#167) * added help icon * added call support * added checklist plugin * added help icon fixes * removed images * removed un-used code * modified json * added localization keys * [hlm-2547]: Fix address locality model * [hlm-2547]: Add locality for delivery intervention * added applogo * bug fixe s * added enum for beneficiary * added individual delivery * resolved * resolved commits * help icon and progress bar fixes * added id check * added lcoality for updates * added address id * fixed navigation issue * added stock min and max validation * updated validation * fixed address id issue * Hlm 2742 fix localization (#165) * [hlm-2742]: Update report_details.dart * [hlm-2742]: Fix translation for tile * [hlm-2054]: Decrease debounce duration (#169) Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * Hlm 2765 fix project sync dialog (#168) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2547]: Lints + fix build * [hlm-2547]: Fix * [hlm-2547]: Fix beneficiary type * [hlm-2547]: Pluralize tasks * [hlm-2547]: Pluralize beneficiaries * [hlm-2547]: Update search_households.dart * [hlm-2547]: Fix locality model * [hlm-2547]: Typo * [hlm-2547]: Fix target * [hlm-2547]: Fix target count * [hlm-2547]: Fix values * [hlm-2547]: Add launcher icons * [hlm-2547]: Fix manifest --------- Co-authored-by: Ajil Oommen Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> * [hlm-2478]: Fix is deleted (#170) [hlm-2478]: Update models * [hlm-000]: Add generated files (#173) * [hlm-931]: Fix progress bar for non-distributor (#174) * Hlm 2861 fix offline downsync (#172) * [hlm-2765]: Update SDK constraints * [hlm-2765]: Fix * [hlm-2765]: Fix sync error type * [hlm-2765]: Fix localization * [hlm-2765]: Fix error after coming back online * [hlm-2765]: Update pods * [hlm-2861]: Fix double enum import in tables * [hlm-2861]: Fixed scripts * [hlm-2861]: Fix down sync problem * [hlm-2861]: Fix no facility dialog on stock recon * [hlm-2861]: Fix lints * [hlm-000]: Build fix * added delete check (#177) * Hlm 2878 handle downsync failure (#175) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * Hlm 2879 firebase crashlytics (#178) * [hlm-2879]: Add package base * [hlm-2879]: Add ios bundle identifier * [hlm-2879]: Fix auth * [hlm-2879]: Update back_navigation_help_header.dart * [hlm-2879]: Check for context * [hlm-2879]: Intermittent * [hlm-2879]: Add firebase config * [hlm-2879]: Add crash enforcer * [hlm-2879]: Fix config * [hlm-2879]: Fix config * [hlm-000]: Update README.md (#179) * [hlm-000]: Update README.md * [hlm-000]: Update sync docs * Hlm 2977 profile update (#181) * added profile page * added user * added bloc * added update profile api integration * added loader * added localization codes * added error fallback * removed logs * bug fixes * added filters (#183) * HLM-3161:: Split Age into years and Months across the application (#184) * HLM-3161:: Split Age into years and Months across the application * Updated Date Conversion functions * Code commenting and minor UI fixes (#185) * Code commenting and minor UI fixes * HLM-3161:: Age Split in Table and css fixes for member card * Update app_initialization.dart * Update app_initialization.dart * Digit Text Form Field suffix icon constraints css fixes * Update auth.dart * HLM-1361:: Date Conversion from months to date fixes * Added trailing commas * Error message changes for DOB field * Error message changes for DOB field * HLM-3161:: Updated age calculator logic and added Date utils to digit components (#186) * Digit Date Utils added, and handled years and age end cases * Remove commented lines * Added code commenting for Date Utils and DOB Picker * Hlm 2876 auto sync (#176) * [hlm-2878]: Handle down sync error * [hlm-2878]: Fix build * added auto sync * fixed melos build issue * added tost message * [hlm-2878]: Minor optimization * [hlm-2878]: Update network_manager.dart * removed logs * added filter bandwidth logic * added background service logic * intermetent commit * auto sync fixed * added isdeleted default value * added error handling * age issue fixed * added error handling * removed un-used code * resloved conflicts * removed duplicate * handled bad state * added retry count and row-version * added code comments * fixed typo and file renamed * removed un-used code * removed hard-coded credentials * typo fixes * added debouncing + filter checklist entity for sync-down * Updated Age logic in DateExtensions --------- Co-authored-by: Ajil Oommen Co-authored-by: Ramkrishna-egov * added filter for stock recon (#188) * added filter for stock recon * removed un-used code * Updated Ade and months validations for DOB Picker (#189) * HLM-3161:: Added Generic error message for the DOB Picker and handled negative years and months validation (#191) * HLM-3161:: Negative months and years use cases validations added * HLM-3161:: Added Generic error message for the DOB Picker * HLM-3161:: Years and months conversion in Delivery intervention page * HLM-3161:: input formatter added for text field * bug fix for filter (#193) * bug fix for filter * removed un-used code * [fix] added dropdown value population (#194) * Hlm 2981 row version (#195) * resolved conflicts * resolved conflicts * added row-version schema * remove duplicate isar open * removed un-used file * added app version (#197) * added app version * added version * HLM-3161:: Age and Date of Birth Fixes (#199) * HLM-3161:: Age and Date of Birth Fixes * HLM-3161:: Age and Date of Birth Fixes * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * HLM-2850:: Gender value Others not retaining on Edit Fixes (#202) Co-authored-by: Naveen * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * HLM-1890:: If Default identifier is ID, "ID Number" field should be hidden from the UI. (#208) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * Hlm 3091 proximity based search (#190) * added filter for stock recon * removed un-used code * added fallback code * added query * enabled proximity bases search * modified the query * modfied the query * added clearing the search bar when proximity search is triggered * added filters * Update dart.yml (#200) * Update dart.yml * Update dart.yml * Update dart.yml * Update dart.yml * HLM-3379: Fixed proximity based search * Revert "HLM-3379: Fixed proximity based search" This reverts commit a22ef1cddcdb14ae132da2e9689b96c01803f0bc. * HLM-3379: Fixed proximity based search (#205) * HLM-3379: Fixed proximity based search * HLM-3379: Code updated * HLM-3379: Updated code * Proximity Based search Code review changes * HLM-3379:Updated distance display info inside brackets --------- Co-authored-by: Ramkrishna-egov * HLM-3950:: Digit Components changes pull out from CBO App (#210) * HLM-3560::Black Screen fixes on App launch (#211) * HLM-3560::Black Screen fixes on App launch * HLM-3560::Black Screen and Offline data fetch on App launch * HLM-3560:: added Code commenting for Blank screen fixes * Blank screen localizations changed to English * Hlm 2982 added seperate server client time (#209) * added client-audit-time * added roles actions * removed commented code * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * added client audit details * added null check * added null check * added missing routers * added fix for task client audit details * added time stamp and removed the print statements * removed TODO as it's been completed * Update auth_model.dart --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Nested Checklist Code Changes (#269) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments * Hlm 2650 resource card multiround proximity (#275) * added client-audit-time * HLM-2850:: Gender value Others not retaining on Edit Fixes * HLM-2650: Added static screen for resource benificiary & added localisation * HLM-2650: Updated dart.yaml (#204) * added roles actions * HLM-2650:Added Stepper for Doses * removed commented code * HLM-2650: Updated card for Resource * added client audit details * updated the mason scripts - added client audit details * added client audit details * added time log in audiit * added audit details * added client modified Time * added client audit details for member * added client audit details * added client audit details on household update * added client audit details for delete * added client aduit details for project beneficary * HLM-2650: Static screen in progress * HLM-2650: Added Cycle table * added client audit details * Past delivery changes * HLM-2650: Updated key for localisation * added null check * added null check * added missing routers * HLM-2650: Added project type model * HLM-2650,HLM-3117: Added Bloc, Schema,Model * added projectype mapping in beneficary Details page * added fix for task client audit details * added past delivery * added table color schema * added dynmaic resource card * added minor validation * removed print and un-used code * added active cycle * HLM-3117: Added localisation & fixed integer taking 0 value * HLM-3117: Added popup data and updated stpper to dynamic * HLM-3117: Added popup data and updated stpper to dynamic * code seperation * resolved conflicts * HLM-3117: rebasing * HLM-3117: future deliveries WIP * fixed the dialog height and past deliverytable * HLM-3117: Added futures deliveries * HLM-3117: Addde localisation * added past resources and active cycle and dose * HLM-4067: Added API integration for future delivery (#216) * HLM-4067: Added API integration for future deliveires * HLM-4067: clean up * HLM-4067: Added task resource api (#217) * HLM-3117: Added Static screen for past record (#215) * HLM-3117: Added static screen for past record * HLM-3117: Added static screen for past record * HLM-4067: Updated naming convention, handled dose administered, localisation (#218) * HLM-4067: Updated naming convetion, handled dose * HLM-4067: Added deliverystrategy in additionals fields & updated localisation for table * Hlm 3068 adv events merge to multi round (#213) * HLM-3068:: Adverse Events Static screen and Bloc, Models * HLM-3068:: Adverse events static screen routing changes * HLM-3068::Adverse Events API integration * HLM-3068::Adverse Events, Localization changes for reattempts field * HLM-3068::Adverse Events:: Search Response Fix * Print statements removed * Restrict Tracking of adverse events while updating Delivery, PendingSync Count fixes * HLM-3068:: Adverse event fixes * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Navigate to success page if no adverse events observed * HLM-3068:: Adverse events merging to Multi round campaign * HLM-3068:: Adverse events changes added to multi round * TODO comments added * Adverse events fixes merged to multi round and UI fixes * Comments and print statements removed * Age Eligibility check added, Beneficiary Refused status updated. * Beneficiary Refused check, Adverse events recorded check and Update Delivery removed * Current and future cycle and Doses Fixes * TODO comments added * HLM-4065::Search Households clear event on Open Pressed (#219) * added project type * added resources * added status * HLM-4065::Fetch-Active and past cycle for Beneficiary Table data (#221) * HLM-4065::Render Current and Past Cycles, Future delivery Bug fixes (#222) * HLM-4064: Record Past Delivery Details (#220) * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM:4064: Added bloc * HLM:4064: Added bloc * HLM-4064: clean up in progress * HLM-4064: Added dynamic form controlfor record past delivery, updated bloc to handled futureTask * HLM-4064: Merge conflic fixes from /HLM-2650-resource-card-multiround * HLM-4064: Added adverse event popup, updated localisation,updated bloc for futuretask (#223) * HLM-4064: Added adevrse event popup, updated localisation,updated bloc for futuretask * HLM-4064: Added enum for hardcoded values * HLM-4064: Added null check for advrese event, Removed all hardcoded values * HLM-4064,HLM-3565: Updated future Task back button, updated localisation for future task (#225) * HLM-3565: Added code comment (#224) * HLM-3565: Added code comment * HLM-3565: Added localisation,removed help button, * HLM-3565:Removed unwanted code * HLM-4065:: Beneficiary Details fixes (#226) * HLM-4065:: Beneficiary Details fixes * Merge conflicts fixes * Merge conflicts fixes * HLM-3565: Added min age and max age& removed hardcoded values (#227) * added status reset * HLM-3565: Added patches back to search not owrking, added null check for task data (#229) * HLM-4065::Date validation fixes, and null check added (#230) * HLM-4065::Date validation fixes, and null check added * HLM-4065::Past Cycles in reverse order * HLM-3565: Added dash on table (#232) * HLM-3565: Added dash on table * HLM-3565:Fixed conflict issue * HLM-3565:: Reverted PR, and UI fixes (#233) * Revert "HLM-3565: Added dash on table (#232)" This reverts commit 7796aed9bb8f00f5932645eb13b03d331e1dd814. * HLM-3565:: Reverted PR, and UI fixes * HLM-3074:: Multi Round fixes (#234) * HLM-3565: Added fixes for backward compatibility (#235) * HLM-3565: Fixed back button for splash (#236) * HLM-3565: Added validation for record past& fixed asterisk (#237) * HLM-3565: Added patches for future task shwoing for all other child card (#238) * HLM-3074:: Multi Round UI/UX Fixes and Validation fixes on Cycle reset (#239) * HLM-3565: Hide back and help button for doseadminstered screen & prevented physical back button click (#241) * HLM-3565: Hide back and help button for doseadminstered screen & prevnt physical back button click * HLM-3565: Removed print and added rethrow * HLM-3565: Fixed back button navigating to household instead of search (#242) * HLM-3565: Added default value as per the figma for future dose (#243) * added button color * added toggle button to view records * removed the shadow * HLM-3565: Fixed resource card delete option et to last element & fixed multiple card showing same value (#244) * added padding * HLM-3565:Added missing code for project bloc, fixed future task taking multiple data (#246) * HLM-3565: Fixed back to search not redirecting to search for member card after delete (#247) * HLM-3565: Added localisation , added static screen for vie whouseholkd (#250) * HLM-3565: Fixed yes no button for dialog (#253) * HLM-3565: Commented code for household button (#254) * HLM-3565: Added validation, Fixed button shrink issue on record dose, fixed reload issue (#255) * HLM-3565: Validtion in progress * HLM-3565:Added validation, Foxed button shrink issue, fixed reload issue * HLM-3565: Removed hardcoded start & end date value * HLM-3565: Removed print statement * HLM-3074:: Button validation fixes on completion of cycle and current… (#245) (#256) * HLM-3074:: Button validation fixes on completion of cycle and current cycle moved to context utility * HLM-3074:: Table height fix * HLM-3074:: Dose Criteria configuration for each delivery added (#257) * HLM-3565: Fixed modal issue, added reload event (#258) * HLM-3565: Added view household, fixed popup paddign issue * HLM-3565: Fixed dialog issue, updated reload event * HLM-3565 * HLM-3565: Fixed view to household not reloading future task * HLM-3074:: Age Validation Fixes (#259) * HLM-3074:: Age Validation Fixes * Removed print statements * Adverse events load on proximity search (#260) * Multi round fixes :: task reload, Location null check , deliveries config changes * Code commenting * Proximity fixes for individual search for INDIVIDUAL based campaign (#263) * Proximity fixes for individual search for INDIVIDUAL based campaign * Proximity Toggle Fixes and UI?UX Audit fixes * Demo fixes * Beneficiary Details mapping fixes,Task Local Repository Search Fixes, UI/UX Bug Fixes, * HLM-4320:: Status Updates * Build pipeline fixes (#267) * Hlm 2650 UI fixes (#268) * HLM-2650:Added ui fixes for table height and left column issue * UI/UX Audit Fixes * Beneficary Details updated based on Beneficiary Type * Nested Checklist Code Changes (#269) * UI/UX Fixes * Reverted script * Dialog padding fixes * resolved the sync issue * removed the un-necessary bloc call * Proximity fixes for Household Based --------- Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Naveen * added sync fixes * Adverse event entity name changed to Side Effect Entity (#271) * Adverse event entity name changed to Side Effect Entity * print logs removed * Symptoms values mapping * Side effect local and remote repository added to sync * Task Oplog creation when resources are null (#273) * Task Oplog creation when resources are null * Code Reformatting * Handle Pop of dialog on back button pressed * Handle Pop of dialog on back button pressed * Resolved review comments * Resolved review comments * Resolved review comments * Resolved review comments --------- Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Naveen Co-authored-by: Ramkrishna-egov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved conflicts * resolved conflicts * added dump-api * HLM-4325:: Boundary Selection fix (#279) * HLM-4325:: Boundary Selection fix * HLM-4325:: Reset children dropdown values on change of parent value * resolved conflicts * removed un necessary extended class --------- Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.gi… * HLM-4367: Added no result found image, fixed allignment on header * HLM-4367:Added digit_showcase lib * HLM-4367:Added showcase for home card * HLM-4367: Fixed localisation missing issue * HLM-4427: Added showcase for benfeciary registration * HLM-4367: Added button typography * HLM-4367: Fixed button style, fixed typography,fixed no result card,fixed outline button * HLM-4367: Added checklisticon, fixed table ui issue, fixed localisation issue, fixed member card icon issue, fixed dob card issue * HLM-4367:Fixed showcase padding, Fixed all card padding, button updated padding * HLM-4367: Fixed, allignment issue * HLM-4367: Added digit search dropdown in library * HLM-4367:Added new Dropdown with search,fixed typography roboto condensed,fixed position member card edit * HLM-4367:removed commented code on boundary selection * HLM-4367: Fixed, warehouse screen,stock,, few screens * HLM-4367: Core changes * Master branch merge and conflicts resolved * Login UI/UX Fixes * Boundary Selection,Search Beneficiary UI/UX fixes * Household Location UI/UX Fixes * Household Details UI/UX Fixes * changes for acknowledgement and stock page * Individual Details UI/UX Fixes * Boundary Selection Button UI/UX Fixes * Delivery Flow UI/UX fixes * changes done * Delivery and Referral flow UI/UX fixes * Digit Card bottom padding added * checkbox and home card changes * search dropdown changes * typing is fixed in dropdown * Complaint details typography fixes * Past delivery fixes * added divider in cycles * changes comment to text area * Dialog and icon fixes * design fixes * Table Long characters length fix * added reports fixes * Table Long characters length fix * add ux fixes for scanner * fixed the screen lock issue * ux-fixes * Digit Reactive Search Dropdown added to digit_components * Digit Reactive Search Dropdown added in Stock Details , install bricks code updated * Digit Reactive Search Dropdown added To Reports and Delivery * Added missing repositories for sync in Sync up Event * added card fixes * Background service Notification - Speed string Range check * Dropdown offset decreased to adjacent side * HLM-4491::Restrict downsync to Distributor Role only * HLM-4352::Validation message error fix on Side effect screen * HLM-4485::Role action mapping for home card * DB card in home screen --------- Co-authored-by: Naveen J <83631045+naveen-egov@users.noreply.github.com> Co-authored-by: ajilo-eGov <111035641+ajilo-eGov@users.noreply.github.com> Co-authored-by: roopeshegov <122782658+roopeshegov@users.noreply.github.com> Co-authored-by: Ajil Oommen Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: kavi_elrey@1993 <25226238+kavi-egov@users.noreply.github.com> Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen J --- .../android/app/src/main/AndroidManifest.xml | 4 +- .../assets/icons/svg/mychecklist.svg | 7 + .../assets/icons/svg/no_result.svg | 112 +++ .../local_store/sql_store/sql_store.g.dart | 2 +- .../lib/data/repositories/local/facility.dart | 8 - .../lib/data/repositories/oplog/oplog.dart | 2 +- .../lib/models/complaints/complaints.dart | 1 - .../lib/models/data_model.dart | 1 + .../lib/models/data_model.mapper.g.dart | 27 +- .../lib/models/entities/roles_type.dart | 9 + .../lib/models/model_configs/enum_roles.json | 14 + .../lib/pages/acknowledgement.dart | 8 +- .../lib/pages/authenticated.dart | 450 ++++----- .../beneficiary/beneficiary_details.dart | 151 ++- .../beneficiary/deliver_intervention.dart | 389 ++++---- .../pages/beneficiary/dose_administered.dart | 365 ++++---- .../pages/beneficiary/household_overview.dart | 360 +++---- .../record_past_delivery_details.dart | 387 ++++---- .../pages/beneficiary/refer_beneficiary.dart | 482 +++++----- .../lib/pages/beneficiary/side_effects.dart | 486 +++++----- .../beneficiary/widgets/past_delivery.dart | 25 +- .../widgets/record_delivery_cycle.dart | 71 +- .../household_details.dart | 377 ++++---- .../household_location.dart | 460 ++++----- .../individual_details.dart | 883 ++++++++++-------- .../lib/pages/boundary_selection.dart | 76 +- .../lib/pages/checklist/checklist.dart | 147 +-- .../pages/checklist/checklist_preview.dart | 8 + .../inbox/complaints_details_view.dart | 41 +- .../complaints/inbox/complaints_inbox.dart | 104 ++- .../inbox/complaints_inbox_filter.dart | 36 +- .../inbox/complaints_inbox_search.dart | 6 +- .../inbox/complaints_inbox_sort.dart | 5 +- .../registration/complaint_type.dart | 110 +-- .../registration/complaints_details.dart | 239 ++--- .../registration/complaints_location.dart | 131 +-- .../lib/pages/home.dart | 688 +++++++------- .../pages/inventory/facility_selection.dart | 105 ++- .../lib/pages/inventory/manage_stocks.dart | 108 +-- .../inventory/record_stock/stock_details.dart | 114 ++- .../record_stock/warehouse_details.dart | 60 +- .../inventory/reports/report_details.dart | 51 +- .../inventory/reports/report_selection.dart | 2 +- .../stock_reconciliation.dart | 125 ++- .../lib/pages/login.dart | 10 +- .../lib/pages/qr_scanner.dart | 117 +-- .../lib/pages/reason_for_deletion.dart | 2 +- .../beneficiary/beneficaries_report.dart | 4 +- .../lib/pages/search_beneficiary.dart | 428 +++++---- .../lib/router/app_router.gr.dart | 2 - .../lib/utils/background_service.dart | 2 +- .../lib/utils/constants.dart | 5 + .../lib/utils/extensions/context_utility.dart | 15 + .../lib/utils/i18_key_constants.dart | 632 +++++++++++++ .../lib/utils/utils.dart | 2 +- .../lib/widgets/action_card/action_card.dart | 3 + .../resource_beneficiary_card.dart | 22 +- .../beneficiary/view_beneficiary_card.dart | 16 +- .../header/back_navigation_help_header.dart | 25 +- .../lib/widgets/home/home_item_card.dart | 47 +- .../lib/widgets/member_card/member_card.dart | 120 ++- .../no_result_card/no_result_card.dart | 40 + .../showcase/config/checklist_data.dart | 23 + .../showcase/config/checklist_list.dart | 16 + .../showcase/config/complaint_type.dart | 21 + .../showcase/config/complaints_details.dart | 61 ++ .../config/complaints_details_view.dart | 59 ++ .../showcase/config/complaints_inbox.dart | 63 ++ .../showcase/config/deliver_intervention.dart | 35 + .../showcase/config/home_showcase.dart | 93 ++ .../showcase/config/household_details.dart | 24 + .../showcase/config/household_location.dart | 37 + .../showcase/config/household_overview.dart | 57 ++ .../showcase/config/individual_details.dart | 60 ++ .../config/search_beneficiaries_showcase.dart | 67 ++ .../showcase/config/select_checklist.dart | 18 + .../config/select_stock_showcase.dart | 28 + .../showcase/config/showcase_constants.dart | 40 + .../showcase/config/stock_details.dart | 138 +++ .../showcase/config/stock_reconciliation.dart | 49 + .../showcase/config/warehouse_details.dart | 28 + .../lib/widgets/showcase/showcase_button.dart | 132 +++ .../widgets/showcase/showcase_wrappers.dart | 65 ++ .../lib/widgets/sidebar/side_bar.dart | 17 +- .../pubspec.lock | 63 +- .../pubspec.yaml | 12 +- .../lib/theme/typography.dart | 12 +- .../lib/widgets/atoms/checkbox_icon.dart | 17 +- .../widgets/atoms/digit_action_dialog.dart | 2 + .../lib/widgets/atoms/digit_checkbox.dart | 26 +- .../widgets/atoms/digit_date_form_picker.dart | 2 +- .../lib/widgets/atoms/digit_dropdown.dart | 7 +- .../widgets/atoms/digit_dropdown_mgram.dart | 175 ++++ .../lib/widgets/atoms/digit_icon_button.dart | 5 +- .../atoms/digit_integer_form_picker.dart | 3 + .../atoms/digit_outline_icon_button.dart | 54 +- .../atoms/digit_reactive_search_dropdown.dart | 125 +++ .../widgets/atoms/digit_text_form_field.dart | 15 +- .../atoms/searchable_dropdown_field.dart | 467 +++++++++ .../widgets/atoms/select_field_builder.dart | 114 +++ .../lib/widgets/digit_card.dart | 9 +- .../lib/widgets/digit_checkbox_tile.dart | 12 +- .../lib/widgets/digit_dialog.dart | 33 +- .../lib/widgets/digit_dob_picker.dart | 14 +- .../lib/widgets/digit_elevated_button.dart | 10 + .../lib/widgets/digit_outline_button.dart | 34 +- .../widgets/digit_reactive_type_ahead.dart | 5 + .../digit_row_card/digit_row_card.dart | 68 +- .../lib/widgets/digit_search_bar.dart | 3 +- .../lib/widgets/digit_search_dropdown.dart | 73 -- .../lib/widgets/digit_text_field.dart | 8 + .../lib/widgets/labeled_field.dart | 6 +- .../molecules/digit_acknowledgement.dart | 44 +- .../molecules/digit_language_card.dart | 13 +- .../widgets/molecules/digit_list_view.dart | 12 +- .../lib/widgets/molecules/digit_table.dart | 8 +- .../widgets/molecules/digit_table_card.dart | 2 +- .../lib/widgets/scrollable_content.dart | 80 +- .../digit_components/lib/widgets/widgets.dart | 6 +- packages/digit_components/pubspec.yaml | 5 + packages/digit_showcase/.gitignore | 30 + packages/digit_showcase/.metadata | 10 + packages/digit_showcase/CHANGELOG.md | 3 + packages/digit_showcase/LICENSE | 21 + packages/digit_showcase/README.md | 39 + packages/digit_showcase/analysis_options.yaml | 4 + .../digit_showcase/lib/digit_showcase.dart | 1 + .../digit_showcase/lib/layout_overlays.dart | 183 ++++ packages/digit_showcase/lib/measure_size.dart | 43 + .../digit_showcase/lib/shape_clipper.dart | 50 + packages/digit_showcase/lib/showcase.dart | 711 ++++++++++++++ .../digit_showcase/lib/showcase_widget.dart | 231 +++++ .../digit_showcase/lib/tooltip_widget.dart | 601 ++++++++++++ packages/digit_showcase/pubspec.yaml | 53 ++ packages/forms_engine/pubspec.lock | 8 + pubspec.lock | 4 +- tools/install_bricks.sh | 2 +- 137 files changed, 9475 insertions(+), 3923 deletions(-) create mode 100644 apps/health_campaign_field_worker_app/assets/icons/svg/mychecklist.svg create mode 100644 apps/health_campaign_field_worker_app/assets/icons/svg/no_result.svg create mode 100644 apps/health_campaign_field_worker_app/lib/models/entities/roles_type.dart create mode 100644 apps/health_campaign_field_worker_app/lib/models/model_configs/enum_roles.json create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/no_result_card/no_result_card.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_data.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_list.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaint_type.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details_view.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_inbox.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/deliver_intervention.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_details.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_location.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_overview.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/individual_details.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/search_beneficiaries_showcase.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_checklist.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_stock_showcase.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_details.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_reconciliation.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/config/warehouse_details.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart create mode 100644 apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_wrappers.dart create mode 100644 packages/digit_components/lib/widgets/atoms/digit_dropdown_mgram.dart create mode 100644 packages/digit_components/lib/widgets/atoms/digit_reactive_search_dropdown.dart create mode 100644 packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart create mode 100644 packages/digit_components/lib/widgets/atoms/select_field_builder.dart delete mode 100644 packages/digit_components/lib/widgets/digit_search_dropdown.dart create mode 100644 packages/digit_showcase/.gitignore create mode 100644 packages/digit_showcase/.metadata create mode 100644 packages/digit_showcase/CHANGELOG.md create mode 100644 packages/digit_showcase/LICENSE create mode 100644 packages/digit_showcase/README.md create mode 100644 packages/digit_showcase/analysis_options.yaml create mode 100644 packages/digit_showcase/lib/digit_showcase.dart create mode 100644 packages/digit_showcase/lib/layout_overlays.dart create mode 100644 packages/digit_showcase/lib/measure_size.dart create mode 100644 packages/digit_showcase/lib/shape_clipper.dart create mode 100644 packages/digit_showcase/lib/showcase.dart create mode 100644 packages/digit_showcase/lib/showcase_widget.dart create mode 100644 packages/digit_showcase/lib/tooltip_widget.dart create mode 100644 packages/digit_showcase/pubspec.yaml 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 88e9113fc..6167f3569 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 @@ -24,8 +24,8 @@ android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> + + + + + + diff --git a/apps/health_campaign_field_worker_app/assets/icons/svg/no_result.svg b/apps/health_campaign_field_worker_app/assets/icons/svg/no_result.svg new file mode 100644 index 000000000..df2b14869 --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/icons/svg/no_result.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/lib/data/local_store/sql_store/sql_store.g.dart b/apps/health_campaign_field_worker_app/lib/data/local_store/sql_store/sql_store.g.dart index a8b84a91e..a870976ca 100644 --- a/apps/health_campaign_field_worker_app/lib/data/local_store/sql_store/sql_store.g.dart +++ b/apps/health_campaign_field_worker_app/lib/data/local_store/sql_store/sql_store.g.dart @@ -32919,4 +32919,4 @@ abstract class _$LocalSqlDataStore extends GeneratedDatabase { downsync, downsyncCriteria ]; -} \ No newline at end of file +} diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/local/facility.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/local/facility.dart index 2cb3ad67a..c3ee8e31c 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/local/facility.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/local/facility.dart @@ -90,14 +90,6 @@ class FacilityLocalRepository facilityCompanion, mode: InsertMode.insertOrReplace, ); - - if (addressCompanion != null) { - batch.insert( - sql.address, - addressCompanion, - mode: InsertMode.insertOrReplace, - ); - } }); await super.create( diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/oplog/oplog.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/oplog/oplog.dart index 8d2715466..d466f2a1e 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/oplog/oplog.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/oplog/oplog.dart @@ -122,7 +122,7 @@ abstract class OpLogManager { .sortedBy((element) => element.createdAt) .where( (element) => element.entityType != DataModelType.service, - // Added Memeber and service so that we don't get the respose from the server + // Added service so that we don't get the response from the server ) .toList(); diff --git a/apps/health_campaign_field_worker_app/lib/models/complaints/complaints.dart b/apps/health_campaign_field_worker_app/lib/models/complaints/complaints.dart index 8b21a008c..0e661f6b3 100644 --- a/apps/health_campaign_field_worker_app/lib/models/complaints/complaints.dart +++ b/apps/health_campaign_field_worker_app/lib/models/complaints/complaints.dart @@ -1,7 +1,6 @@ import 'package:freezed_annotation/freezed_annotation.dart'; part 'complaints.freezed.dart'; - part 'complaints.g.dart'; @freezed diff --git a/apps/health_campaign_field_worker_app/lib/models/data_model.dart b/apps/health_campaign_field_worker_app/lib/models/data_model.dart index 3d1acc1e8..84c20e6d4 100644 --- a/apps/health_campaign_field_worker_app/lib/models/data_model.dart +++ b/apps/health_campaign_field_worker_app/lib/models/data_model.dart @@ -31,6 +31,7 @@ export 'entities/project_resource.dart'; export 'entities/project_staff.dart'; export 'entities/project_type.dart'; export 'entities/referral.dart'; +export 'entities/roles_type.dart'; export 'entities/service.dart'; export 'entities/service_attributes.dart'; export 'entities/service_definition.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/data_model.mapper.g.dart b/apps/health_campaign_field_worker_app/lib/models/data_model.mapper.g.dart index 55a997f04..f9915ac94 100644 --- a/apps/health_campaign_field_worker_app/lib/models/data_model.mapper.g.dart +++ b/apps/health_campaign_field_worker_app/lib/models/data_model.mapper.g.dart @@ -30,6 +30,7 @@ import 'entities/project_resource.dart'; import 'entities/project_staff.dart'; import 'entities/project_type.dart'; import 'entities/referral.dart'; +import 'entities/roles_type.dart'; import 'entities/service.dart'; import 'entities/service_attributes.dart'; import 'entities/service_definition.dart'; @@ -179,6 +180,7 @@ var _mappers = { BloodGroupMapper._(), DeliverStrategyTypeMapper._(), GenderMapper._(), + RolesTypeMapper._(), StatusMapper._(), TransactionReasonMapper._(), TransactionTypeMapper._(), @@ -5028,6 +5030,29 @@ extension GenderMapperExtension on Gender { dynamic toValue() => Mapper.toValue(this); } +class RolesTypeMapper extends EnumMapper { + RolesTypeMapper._(); + + @override RolesType decode(dynamic value) { + switch (value) { + case "WAREHOUSE_MANAGER": return RolesType.warehouseManager; + case "DISTRIBUTOR": return RolesType.distributor; + default: throw MapperException.unknownEnumValue(value); + } + } + + @override dynamic encode(RolesType self) { + switch (self) { + case RolesType.warehouseManager: return "WAREHOUSE_MANAGER"; + case RolesType.distributor: return "DISTRIBUTOR"; + } + } +} + +extension RolesTypeMapperExtension on RolesType { + dynamic toValue() => Mapper.toValue(this); +} + class StatusMapper extends EnumMapper { StatusMapper._(); @@ -5282,4 +5307,4 @@ mixin Mappable implements MappableMixin { } } } -} \ No newline at end of file +} diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.dart b/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.dart new file mode 100644 index 000000000..af2b18844 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.dart @@ -0,0 +1,9 @@ +// Generated using mason. Do not modify by hand +import 'package:dart_mappable/dart_mappable.dart'; + +@MappableEnum(caseStyle: CaseStyle.upperCase) +enum RolesType { + @MappableValue("WAREHOUSE_MANAGER") warehouseManager, + @MappableValue("DISTRIBUTOR") distributor, + ; +} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/lib/models/model_configs/enum_roles.json b/apps/health_campaign_field_worker_app/lib/models/model_configs/enum_roles.json new file mode 100644 index 000000000..b48773a8b --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/models/model_configs/enum_roles.json @@ -0,0 +1,14 @@ +{ + "name": "RolesType", + "enumValues": [ + { + "name": "Warehouse Manager", + "value": "WAREHOUSE_MANAGER" + }, + { + "name": "Distributor", + "value": "DISTRIBUTOR" + } + ], + "isEnum": true +} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/lib/pages/acknowledgement.dart b/apps/health_campaign_field_worker_app/lib/pages/acknowledgement.dart index 7950d585b..0121302f3 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/acknowledgement.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/acknowledgement.dart @@ -54,9 +54,10 @@ class _AcknowledgementPageState extends LocalizedState { offstage: !widget.isDataRecordSuccess, // Show the bottom navigation bar if `isDataRecordSuccess` is true child: SizedBox( - height: 145, + height: 150, child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: Column( children: [ DigitElevatedButton( @@ -77,6 +78,9 @@ class _AcknowledgementPageState extends LocalizedState { .translate(i18.acknowledgementSuccess.downloadmoredata), buttonStyle: OutlinedButton.styleFrom( backgroundColor: Colors.white, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), side: BorderSide( width: 1.0, color: theme.colorScheme.secondary, diff --git a/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart b/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart index dbaa25067..836756432 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:digit_components/digit_components.dart'; +import 'package:digit_showcase/showcase_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_portal/flutter_portal.dart'; @@ -35,241 +36,252 @@ class AuthenticatedPageWrapper extends StatelessWidget { @override Widget build(BuildContext context) { - return StreamBuilder( - stream: _drawerVisibilityController.stream, - builder: (context, snapshot) { - final showDrawer = snapshot.data ?? false; + return ShowcaseWidget( + enableAutoScroll: true, + builder: Builder( + builder: (context) { + return StreamBuilder( + stream: _drawerVisibilityController.stream, + builder: (context, snapshot) { + final showDrawer = snapshot.data ?? false; - return Portal( - child: Scaffold( - appBar: AppBar( - actions: [ - BlocBuilder( - builder: (ctx, state) { - final selectedBoundary = ctx.boundaryOrNull; + return Portal( + child: Scaffold( + appBar: AppBar( + actions: [ + BlocBuilder( + builder: (ctx, state) { + final selectedBoundary = ctx.boundaryOrNull; - if (selectedBoundary == null) { - return const SizedBox.shrink(); - } else { - final boundaryName = selectedBoundary.name ?? - selectedBoundary.code ?? - AppLocalizations.of(context).translate( - i18.projectSelection.onProjectMapped, - ); + if (selectedBoundary == null) { + return const SizedBox.shrink(); + } else { + final boundaryName = selectedBoundary.name ?? + selectedBoundary.code ?? + AppLocalizations.of(context).translate( + i18.projectSelection.onProjectMapped, + ); - final theme = Theme.of(context); + final theme = Theme.of(context); - return GestureDetector( - onTap: () { - ctx.router.popUntilRouteWithName( - AuthenticatedRouteWrapper.name, - ); - ctx.router.navigate(BoundarySelectionRoute()); - }, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - boundaryName, - style: TextStyle( - color: theme.colorScheme.surface, - fontSize: 16, + return GestureDetector( + onTap: () { + ctx.router.popUntilRouteWithName( + AuthenticatedRouteWrapper.name, + ); + ctx.router.navigate(BoundarySelectionRoute()); + }, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + boundaryName, + style: TextStyle( + color: theme.colorScheme.surface, + fontSize: 16, + ), + ), + const Icon(Icons.arrow_drop_down_outlined), + ], ), - ), - const Icon(Icons.arrow_drop_down_outlined), - ], - ), - ); - } - }, - ), - ], - ), - drawer: showDrawer ? const Drawer(child: SideBar()) : null, - body: MultiBlocProvider( - providers: [ - BlocProvider( - create: (context) { - final isar = context.read(); + ); + } + }, + ), + ], + ), + drawer: showDrawer ? const Drawer(child: SideBar()) : null, + body: MultiBlocProvider( + providers: [ + BlocProvider( + create: (context) { + final isar = context.read(); - return SearchHouseholdsBloc( - beneficiaryType: context.beneficiaryType, - userUid: context.loggedInUserUuid, - projectId: context.projectId, - addressRepository: AddressLocalRepository( - context.read(), - AddressOpLogManager(isar), + return SearchHouseholdsBloc( + beneficiaryType: context.beneficiaryType, + userUid: context.loggedInUserUuid, + projectId: context.projectId, + addressRepository: AddressLocalRepository( + context.read(), + AddressOpLogManager(isar), + ), + projectBeneficiary: context.repository< + ProjectBeneficiaryModel, + ProjectBeneficiarySearchModel>(), + householdMember: context.repository< + HouseholdMemberModel, + HouseholdMemberSearchModel>(), + household: context.repository(), + individual: context.repository(), + taskDataRepository: context + .repository(), + sideEffectDataRepository: context.repository< + SideEffectModel, SideEffectSearchModel>(), + referralDataRepository: context.repository< + ReferralModel, ReferralSearchModel>(), + )..add(const SearchHouseholdsClearEvent()); + }, ), - projectBeneficiary: context.repository< - ProjectBeneficiaryModel, - ProjectBeneficiarySearchModel>(), - householdMember: context.repository(), - household: context - .repository(), - individual: context - .repository(), - taskDataRepository: - context.repository(), - sideEffectDataRepository: context - .repository(), - referralDataRepository: context - .repository(), - )..add(const SearchHouseholdsClearEvent()); - }, - ), - BlocProvider( - create: (context) { - final userId = context.loggedInUserUuid; + BlocProvider( + create: (context) { + final userId = context.loggedInUserUuid; - final isar = context.read(); - final bloc = SyncBloc( - isar: isar, - networkManager: context.read(), - ); + final isar = context.read(); + final bloc = SyncBloc( + isar: isar, + networkManager: context.read(), + ); - if (!bloc.isClosed) { - bloc.add(SyncRefreshEvent(userId)); - } -/* Every time when the user changes the screen + if (!bloc.isClosed) { + bloc.add(SyncRefreshEvent(userId)); + } +/* Every time when the user changes the screen this will refresh the data of sync count */ - isar.opLogs - .filter() - .createdByEqualTo(userId) - .syncedUpEqualTo(false) - .watch() - .listen( - (event) { - if (!bloc.isClosed) { - bloc.add( - SyncRefreshEvent( - userId, - event.where((element) { - switch (element.entityType) { - case DataModelType.household: - case DataModelType.individual: - case DataModelType.householdMember: - case DataModelType.projectBeneficiary: - case DataModelType.task: - case DataModelType.stock: - case DataModelType.stockReconciliation: - case DataModelType.service: - case DataModelType.complaints: - case DataModelType.sideEffect: - case DataModelType.referral: - return true; - default: - return false; - } - }).length, - ), + isar.opLogs + .filter() + .createdByEqualTo(userId) + .syncedUpEqualTo(false) + .watch() + .listen( + (event) { + if (!bloc.isClosed) { + bloc.add( + SyncRefreshEvent( + userId, + event.where((element) { + switch (element.entityType) { + case DataModelType.household: + case DataModelType.individual: + case DataModelType.householdMember: + case DataModelType.projectBeneficiary: + case DataModelType.task: + case DataModelType.stock: + case DataModelType.stockReconciliation: + case DataModelType.service: + case DataModelType.complaints: + case DataModelType.sideEffect: + case DataModelType.referral: + return true; + default: + return false; + } + }).length, + ), + ); + } + }, ); - } - }, - ); - isar.opLogs - .filter() - .createdByEqualTo(userId) - .syncedUpEqualTo(true) - .syncedDownEqualTo(false) - .watch() - .listen( - (event) { - if (!bloc.isClosed) { - bloc.add( - SyncRefreshEvent( - userId, - event.where((element) { - switch (element.entityType) { - case DataModelType.household: - case DataModelType.householdMember: - case DataModelType.individual: - case DataModelType.projectBeneficiary: - case DataModelType.task: - case DataModelType.stock: - case DataModelType.stockReconciliation: - case DataModelType.complaints: - case DataModelType.sideEffect: - case DataModelType.referral: - return true; - default: - return false; - } - }).length, - ), + isar.opLogs + .filter() + .createdByEqualTo(userId) + .syncedUpEqualTo(true) + .syncedDownEqualTo(false) + .watch() + .listen( + (event) { + if (!bloc.isClosed) { + bloc.add( + SyncRefreshEvent( + userId, + event.where((element) { + switch (element.entityType) { + case DataModelType.household: + case DataModelType.householdMember: + case DataModelType.individual: + case DataModelType.projectBeneficiary: + case DataModelType.task: + case DataModelType.stock: + case DataModelType.stockReconciliation: + case DataModelType.complaints: + case DataModelType.sideEffect: + case DataModelType.referral: + return true; + default: + return false; + } + }).length, + ), + ); + } + }, ); - } - }, - ); - return bloc; - }, - ), - BlocProvider( - create: (_) => LocationBloc(location: Location()) - ..add(const LoadLocationEvent()), - ), - BlocProvider( - create: (_) => - HouseholdDetailsBloc(const HouseholdDetailsState()), - ), - BlocProvider( - create: (ctx) => BeneficiaryDownSyncBloc( - //{TODO: Need to get the bandwidth path from config - bandwidthCheckRepository: BandwidthCheckRepository( - DioClient().dio, - bandwidthPath: '/project/check/bandwidth'), - householdLocalRepository: ctx.read< - LocalRepository>(), - householdMemberLocalRepository: ctx.read< - LocalRepository>(), - individualLocalRepository: ctx.read< - LocalRepository>(), - projectBeneficiaryLocalRepository: ctx.read< - LocalRepository>(), - taskLocalRepository: - ctx.read>(), - sideEffectLocalRepository: ctx.read< - LocalRepository>(), - referralLocalRepository: ctx.read< - LocalRepository>(), - downSyncRemoteRepository: ctx.read< - RemoteRepository>(), - downSyncLocalRepository: ctx.read< - LocalRepository>(), - networkManager: ctx.read(), - ), - ), - ], - child: AutoRouter( - navigatorObservers: () => [ - AuthenticatedRouteObserver( - onNavigated: () { - bool shouldShowDrawer; - switch (context.router.topRoute.name) { - case ProjectSelectionRoute.name: - case BoundarySelectionRoute.name: - shouldShowDrawer = false; - break; - default: - shouldShowDrawer = true; - } + return bloc; + }, + ), + BlocProvider( + create: (_) => LocationBloc(location: Location()) + ..add(const LoadLocationEvent()), + ), + BlocProvider( + create: (_) => + HouseholdDetailsBloc(const HouseholdDetailsState()), + ), + BlocProvider( + create: (ctx) => BeneficiaryDownSyncBloc( + //{TODO: Need to get the bandwidth path from config + bandwidthCheckRepository: BandwidthCheckRepository( + DioClient().dio, + bandwidthPath: '/project/check/bandwidth'), + householdLocalRepository: ctx.read< + LocalRepository>(), + householdMemberLocalRepository: ctx.read< + LocalRepository>(), + individualLocalRepository: ctx.read< + LocalRepository>(), + projectBeneficiaryLocalRepository: ctx.read< + LocalRepository>(), + taskLocalRepository: ctx.read< + LocalRepository>(), + sideEffectLocalRepository: ctx.read< + LocalRepository>(), + referralLocalRepository: ctx.read< + LocalRepository>(), + downSyncRemoteRepository: ctx.read< + RemoteRepository>(), + downSyncLocalRepository: ctx.read< + LocalRepository>(), + networkManager: ctx.read(), + ), + ), + ], + child: AutoRouter( + navigatorObservers: () => [ + AuthenticatedRouteObserver( + onNavigated: () { + bool shouldShowDrawer; + switch (context.router.topRoute.name) { + case ProjectSelectionRoute.name: + case BoundarySelectionRoute.name: + shouldShowDrawer = false; + break; + default: + shouldShowDrawer = true; + } - _drawerVisibilityController.add(shouldShowDrawer); - }, + _drawerVisibilityController.add(shouldShowDrawer); + }, + ), + ], + ), ), - ], - ), - ), - ), - ); - }, + ), + ); + }, + ); + }, + ), ); } } diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/beneficiary_details.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/beneficiary_details.dart index 78a960328..af5512bb2 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/beneficiary_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/beneficiary_details.dart @@ -122,6 +122,7 @@ class _BeneficiaryDetailsPageState return Scaffold( body: ScrollableContent( + enableFixedButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), @@ -133,67 +134,70 @@ class _BeneficiaryDetailsPageState return cycles != null && cycles.isNotEmpty ? deliverState.hasCycleArrived - ? SizedBox( - height: 100, - child: DigitCard( - margin: const EdgeInsets.all(kPadding), - child: DigitElevatedButton( - onPressed: () async { - final selectedCycle = - cycles.firstWhereOrNull((c) => - c.id == deliverState.cycle); - if (selectedCycle != null) { - bloc.add( - DeliverInterventionEvent - .selectFutureCycleDose( - deliverState.dose, - projectState - .projectType!.cycles! - .firstWhere((c) => - c.id == - deliverState.cycle), + ? DigitCard( + margin: const EdgeInsets.fromLTRB( + 0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB( + kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () async { + final selectedCycle = + cycles.firstWhereOrNull((c) => + c.id == deliverState.cycle); + if (selectedCycle != null) { + bloc.add( + DeliverInterventionEvent + .selectFutureCycleDose( + deliverState.dose, + projectState + .projectType!.cycles! + .firstWhere((c) => + c.id == + deliverState.cycle), + state.selectedIndividual, + ), + ); + await DigitDialog.show( + context, + options: DigitDialogOptions( + titlePadding: + const EdgeInsets.fromLTRB( + kPadding, + 0, + kPadding, + 0, + ), + titleText: + localizations.translate(i18 + .beneficiaryDetails + .resourcesTobeDelivered), + content: buildTableContent( + deliverState, + context, + variant, state.selectedIndividual, ), - ); - await DigitDialog.show( - context, - options: DigitDialogOptions( - dialogPadding: - const EdgeInsets.all( - 8.0, - ), - titleText: localizations + barrierDismissible: true, + primaryAction: + DigitDialogActions( + label: localizations .translate(i18 .beneficiaryDetails - .resourcesTobeDelivered), - content: buildTableContent( - deliverState, - context, - variant, - state.selectedIndividual, - ), - barrierDismissible: true, - primaryAction: - DigitDialogActions( - label: localizations - .translate(i18 - .beneficiaryDetails - .ctaProceed), - action: (ctx) { - Navigator.of(ctx).pop(); - router.push( - DeliverInterventionRoute(), - ); - }, - ), + .ctaProceed), + action: (ctx) { + Navigator.of(ctx).pop(); + router.push( + DeliverInterventionRoute(), + ); + }, ), - ); - } - }, - child: Center( - child: Text( - 'Record Cycle ${(deliverState.cycle == 0 ? (deliverState.cycle + 1) : deliverState.cycle).toString()} Dose ${(deliverState.dose).toString()}', - ), + ), + ); + } + }, + child: Center( + child: Text( + 'Record Cycle ${(deliverState.cycle == 0 ? (deliverState.cycle + 1) : deliverState.cycle).toString()} Dose ${(deliverState.dose).toString()}', ), ), ), @@ -201,6 +205,8 @@ class _BeneficiaryDetailsPageState : const SizedBox.shrink() : DigitCard( margin: const EdgeInsets.only(top: kPadding), + padding: const EdgeInsets.fromLTRB( + kPadding, 0, kPadding, 0), child: DigitElevatedButton( child: Center( child: Text(localizations.translate(i18 @@ -217,12 +223,6 @@ class _BeneficiaryDetailsPageState ), children: [ DigitCard( - padding: const EdgeInsets.only( - left: 16.0, - top: 16, - bottom: 4, - right: 4, - ), child: Column( children: [ Row( @@ -375,23 +375,16 @@ class _BeneficiaryDetailsPageState ?.cycles ?? []) .isNotEmpty - ? Padding( - padding: - const EdgeInsets - .all( - kPadding, - ), - child: - RecordDeliveryCycle( - projectCycles: projectState - .projectType - ?.cycles ?? - [], - taskData: - taskData ?? [], - individualModel: state - .selectedIndividual, - ), + ? RecordDeliveryCycle( + projectCycles: + projectState + .projectType + ?.cycles ?? + [], + taskData: + taskData ?? [], + individualModel: state + .selectedIndividual, ) : const Offstage(), ], diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/deliver_intervention.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/deliver_intervention.dart index 8157384a5..b0e810801 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/deliver_intervention.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/deliver_intervention.dart @@ -140,195 +140,192 @@ class _DeliverInterventionPageState ), builder: (context, form, child) { return ScrollableContent( + enableFixedButton: true, footer: BlocBuilder( builder: (context, state) { - return SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only( - top: 10, - ), - child: DigitElevatedButton( - onPressed: () async { - if (((form.control( - _resourceDeliveredKey, - ) as FormArray) - .value - as List< - ProductVariantModel?>) - .any((ele) => - ele?.productId == - null)) { - await DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate(i18 - .deliverIntervention - .resourceDeliveredValidation), - true, - theme, + return DigitCard( + margin: const EdgeInsets.fromLTRB( + 0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB( + kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () async { + if (((form.control( + _resourceDeliveredKey, + ) as FormArray) + .value + as List< + ProductVariantModel?>) + .any((ele) => + ele?.productId == null)) { + await DigitToast.show( + context, + options: DigitToastOptions( + localizations.translate(i18 + .deliverIntervention + .resourceDeliveredValidation), + true, + theme, + ), + ); + } else if ((((form.control( + _quantityDistributedKey, + ) as FormArray) + .value) ?? + []) + .any((e) => e == 0)) { + await DigitToast.show( + context, + options: DigitToastOptions( + localizations.translate(i18 + .deliverIntervention + .resourceCannotBeZero), + true, + theme, + ), + ); + } else { + final shouldSubmit = + await DigitDialog.show< + bool>( + context, + options: DigitDialogOptions( + titleText: + localizations.translate( + i18.deliverIntervention + .dialogTitle, ), - ); - } else if ((((form.control( - _quantityDistributedKey, - ) as FormArray) - .value) ?? - []) - .any((e) => e == 0)) { - await DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate(i18 - .deliverIntervention - .resourceCannotBeZero), - true, - theme, + contentText: + localizations.translate( + i18.deliverIntervention + .dialogContent, ), - ); - } else { - final shouldSubmit = - await DigitDialog.show< - bool>( - context, - options: DigitDialogOptions( - titleText: localizations - .translate( - i18.deliverIntervention - .dialogTitle, - ), - contentText: localizations + primaryAction: + DigitDialogActions( + label: localizations .translate( - i18.deliverIntervention - .dialogContent, - ), - primaryAction: - DigitDialogActions( - label: localizations - .translate( - i18.common - .coreCommonSubmit, - ), - action: (ctx) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, + i18.common + .coreCommonSubmit, ), - secondaryAction: - DigitDialogActions( - label: localizations - .translate( - i18.common - .coreCommonCancel, - ), - action: (context) => - Navigator.of( + action: (ctx) { + Navigator.of( context, rootNavigator: true, - ).pop(false), + ).pop(true); + }, + ), + secondaryAction: + DigitDialogActions( + label: localizations + .translate( + i18.common + .coreCommonCancel, ), + action: (context) => + Navigator.of( + context, + rootNavigator: true, + ).pop(false), ), - ); - - if (shouldSubmit ?? false) { - if (context.mounted) { - context - .read< - DeliverInterventionBloc>() - .add( - DeliverInterventionSubmitEvent( - _getTaskModel( - context, - form: form, - oldTask: null, - projectBeneficiaryClientReferenceId: - projectBeneficiary - .first - .clientReferenceId, - dose: - deliveryInterventionstate - .dose, - cycle: - deliveryInterventionstate - .cycle, - deliveryStrategy: - DeliverStrategyType - .direct - .toValue(), - address: - householdMemberWrapper - .members - .first - .address - ?.first, - ), + ), + ); + + if (shouldSubmit ?? false) { + if (context.mounted) { + context + .read< + DeliverInterventionBloc>() + .add( + DeliverInterventionSubmitEvent( + _getTaskModel( + context, + form: form, + oldTask: null, + projectBeneficiaryClientReferenceId: + projectBeneficiary + .first + .clientReferenceId, + dose: + deliveryInterventionstate + .dose, + cycle: + deliveryInterventionstate + .cycle, + deliveryStrategy: + DeliverStrategyType + .direct + .toValue(), + address: + householdMemberWrapper + .members + .first + .address + ?.first, + ), + false, + context.boundary, + ), + ); + + if (state.futureDeliveries != + null && + state.futureDeliveries! + .isNotEmpty && + projectState + .projectType + ?.cycles + ?.isNotEmpty == + true) { + context.router + .popUntilRouteWithName( + BeneficiaryWrapperRoute + .name, + ); + context.router.push( + SplashAcknowledgementRoute( + enableBackToSearch: false, - context.boundary, + ), + ); + } else { + final reloadState = + context.read< + HouseholdOverviewBloc>(); + + Future.delayed( + const Duration( + milliseconds: 1000, + ), + () { + reloadState.add( + HouseholdOverviewReloadEvent( + projectId: context + .projectId, + projectBeneficiaryType: + context + .beneficiaryType, ), ); - - if (state.futureDeliveries != - null && - state - .futureDeliveries! - .isNotEmpty && - projectState - .projectType - ?.cycles - ?.isNotEmpty == - true) { + }, + ).then((value) { context.router - .popUntilRouteWithName( - BeneficiaryWrapperRoute - .name, - ); - context.router.push( - SplashAcknowledgementRoute( - enableBackToSearch: - false, + .popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: + true, ), ); - } else { - final reloadState = - context.read< - HouseholdOverviewBloc>(); - - Future.delayed( - const Duration( - milliseconds: 1000, - ), - () { - reloadState.add( - HouseholdOverviewReloadEvent( - projectId: context - .projectId, - projectBeneficiaryType: - context - .beneficiaryType, - ), - ); - }, - ).then((value) { - context.router - .popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: - true, - ), - ); - }); - } + }); } } } - }, - child: Center( - child: Text( - localizations.translate( - i18.common.coreCommonSubmit, - ), + } + }, + child: Center( + child: Text( + localizations.translate( + i18.common.coreCommonSubmit, ), ), ), @@ -384,7 +381,7 @@ class _DeliverInterventionPageState 12.5 * 2 * steps.length - - 45) / + 50) / (steps.length - 1), ), DigitDateFormPicker( @@ -405,6 +402,10 @@ class _DeliverInterventionPageState i18.common.coreCommonCancel, ), isRequired: false, + padding: + const EdgeInsets.only( + top: kPadding, + ), ), ], ), @@ -421,7 +422,7 @@ class _DeliverInterventionPageState .deliverInterventionResourceLabel, ), style: theme - .textTheme.displayMedium, + .textTheme.headlineLarge, ), ..._controllers .map((e) => @@ -456,20 +457,22 @@ class _DeliverInterventionPageState }, )) .toList(), - DigitIconButton( - onPressed: () async { - addController(form); - setState(() { - _controllers.add( - _controllers.length, - ); - }); - }, - icon: Icons.add, - iconText: - localizations.translate( - i18.deliverIntervention - .resourceAddBeneficiary, + Center( + child: DigitIconButton( + onPressed: () async { + addController(form); + setState(() { + _controllers.add( + _controllers.length, + ); + }); + }, + icon: Icons.add_circle, + iconText: + localizations.translate( + i18.deliverIntervention + .resourceAddBeneficiary, + ), ), ), ], @@ -487,7 +490,7 @@ class _DeliverInterventionPageState .deliveryCommentLabel, ), style: theme - .textTheme.displayMedium, + .textTheme.headlineLarge, ), BlocBuilder< AppInitializationBloc, @@ -503,19 +506,14 @@ class _DeliverInterventionPageState .deliveryCommentOptions ?? []; - return DigitReactiveDropdown< + return DigitReactiveSearchDropdown< String>( label: localizations .translate( i18.deliverIntervention .deliveryCommentLabel, ), - valueMapper: (value) => - value, - initialValue: - deliveryCommentOptions - .firstOrNull - ?.name, + form: form, menuItems: deliveryCommentOptions .map((e) { @@ -524,6 +522,11 @@ class _DeliverInterventionPageState }).toList(), formControlName: _deliveryCommentKey, + valueMapper: (value) => + value, + emptyText: localizations + .translate(i18.common + .noMatchFound), ); }, ), diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/dose_administered.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/dose_administered.dart index e77d9b82e..af3fc61ae 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/dose_administered.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/dose_administered.dart @@ -72,192 +72,188 @@ class _DoseAdministeredPageState extends LocalizedState { body: ReactiveFormBuilder( form: () => buildForm(context), builder: (context, form, child) => ScrollableContent( + enableFixedButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget( showBackNavigation: false, showHelp: false, ), ]), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(top: kPadding), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () { - if (form.control(_doseAdministeredKey).value == - null) { - clickedStatus.value = false; - form - .control(_doseAdministeredKey) - .setErrors({'': true}); - } - form.markAllAsTouched(); + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitElevatedButton( + onPressed: isClicked + ? null + : () { + if (form.control(_doseAdministeredKey).value == + null) { + clickedStatus.value = false; + form + .control(_doseAdministeredKey) + .setErrors({'': true}); + } + form.markAllAsTouched(); - if (!form.valid) - return; - else { - clickedStatus.value = true; - final bloc = context - .read() - .state; - final event = - context.read(); + if (!form.valid) + return; + else { + clickedStatus.value = true; + final bloc = context + .read() + .state; + final event = + context.read(); - if (doseAdministered && context.mounted) { - // Iterate through future deliveries + if (doseAdministered && context.mounted) { + // Iterate through future deliveries - for (var e in bloc.futureDeliveries!) { - int doseIndex = e.id; - final clientReferenceId = - IdGen.i.identifier; - final address = bloc.oldTask?.address; - // Create and dispatch a DeliverInterventionSubmitEvent with a new TaskModel - event.add(DeliverInterventionSubmitEvent( - TaskModel( - projectId: context.projectId, - address: address?.copyWith( - relatedClientReferenceId: - clientReferenceId, - id: null, - ), - status: Status.delivered.toValue(), - clientReferenceId: clientReferenceId, - projectBeneficiaryClientReferenceId: bloc - .oldTask - ?.projectBeneficiaryClientReferenceId, - tenantId: - envConfig.variables.tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - resources: fetchProductVariant( - e, - overViewBloc.selectedIndividual, - ) - ?.productVariants - ?.map((variant) => - TaskResourceModel( - clientReferenceId: - IdGen.i.identifier, - tenantId: envConfig - .variables.tenantId, - taskclientReferenceId: - clientReferenceId, - quantity: variant.quantity - .toString(), - productVariantId: variant - .productVariantId, - isDelivered: true, - auditDetails: AuditDetails( - createdBy: context - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: context - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - )) - .toList(), - additionalFields: - TaskAdditionalFields( - version: 1, - fields: [ - AdditionalField( - AdditionalFieldsType - .dateOfDelivery - .toValue(), - DateTime.now() - .millisecondsSinceEpoch - .toString(), - ), - AdditionalField( - AdditionalFieldsType - .dateOfAdministration - .toValue(), - DateTime.now() - .millisecondsSinceEpoch - .toString(), - ), - AdditionalField( - AdditionalFieldsType - .dateOfVerification - .toValue(), - DateTime.now() - .millisecondsSinceEpoch - .toString(), - ), - AdditionalField( - AdditionalFieldsType.cycleIndex - .toValue(), - "0${bloc.cycle}", - ), - AdditionalField( - AdditionalFieldsType.doseIndex - .toValue(), - "0$doseIndex", - ), - AdditionalField( - AdditionalFieldsType - .deliveryStrategy - .toValue(), - e.deliveryStrategy, - ), - ], - ), + for (var e in bloc.futureDeliveries!) { + int doseIndex = e.id; + final clientReferenceId = + IdGen.i.identifier; + final address = bloc.oldTask?.address; + // Create and dispatch a DeliverInterventionSubmitEvent with a new TaskModel + event.add(DeliverInterventionSubmitEvent( + TaskModel( + projectId: context.projectId, + address: address?.copyWith( + relatedClientReferenceId: + clientReferenceId, + id: null, + ), + status: Status.delivered.toValue(), + clientReferenceId: clientReferenceId, + projectBeneficiaryClientReferenceId: bloc + .oldTask + ?.projectBeneficiaryClientReferenceId, + tenantId: envConfig.variables.tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: + context.millisecondsSinceEpoch(), + ), + clientAuditDetails: ClientAuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: + context.millisecondsSinceEpoch(), + ), + resources: fetchProductVariant( + e, + overViewBloc.selectedIndividual, + ) + ?.productVariants + ?.map((variant) => + TaskResourceModel( + clientReferenceId: + IdGen.i.identifier, + tenantId: envConfig + .variables.tenantId, + taskclientReferenceId: + clientReferenceId, + quantity: variant.quantity + .toString(), + productVariantId: + variant.productVariantId, + isDelivered: true, + auditDetails: AuditDetails( + createdBy: context + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: context + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + ), + )) + .toList(), + additionalFields: TaskAdditionalFields( + version: 1, + fields: [ + AdditionalField( + AdditionalFieldsType + .dateOfDelivery + .toValue(), + DateTime.now() + .millisecondsSinceEpoch + .toString(), + ), + AdditionalField( + AdditionalFieldsType + .dateOfAdministration + .toValue(), + DateTime.now() + .millisecondsSinceEpoch + .toString(), + ), + AdditionalField( + AdditionalFieldsType + .dateOfVerification + .toValue(), + DateTime.now() + .millisecondsSinceEpoch + .toString(), + ), + AdditionalField( + AdditionalFieldsType.cycleIndex + .toValue(), + "0${bloc.cycle}", + ), + AdditionalField( + AdditionalFieldsType.doseIndex + .toValue(), + "0$doseIndex", + ), + AdditionalField( + AdditionalFieldsType + .deliveryStrategy + .toValue(), + e.deliveryStrategy, + ), + ], ), - false, - context.boundary, - )); - } + ), + false, + context.boundary, + )); } + } - final reloadState = - context.read(); + final reloadState = + context.read(); - Future.delayed( - const Duration(milliseconds: 1000), - () { - reloadState - .add(HouseholdOverviewReloadEvent( - projectId: context.projectId, - projectBeneficiaryType: - context.beneficiaryType, - )); - }, - ).then((value) => context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - }, - child: Center( - child: Text( - localizations.translate(i18.common.coreCommonNext), - ), + Future.delayed( + const Duration(milliseconds: 1000), + () { + reloadState + .add(HouseholdOverviewReloadEvent( + projectId: context.projectId, + projectBeneficiaryType: + context.beneficiaryType, + )); + }, + ).then((value) => context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } + }, + child: Center( + child: Text( + localizations.translate(i18.common.coreCommonNext), ), - ); - }, - ), + ), + ); + }, ), ), children: [ @@ -271,6 +267,7 @@ class _DoseAdministeredPageState extends LocalizedState { style: theme.textTheme.displayMedium, ), DigitRadioButtonList( + contentPadding: EdgeInsets.zero, labelStyle: DigitTheme .instance.mobileTheme.textTheme.headlineSmall, formControlName: _doseAdministeredKey, @@ -340,12 +337,20 @@ class _DoseAdministeredPageState extends LocalizedState { return Column( children: [ - Text( - localizations.translate( - i18.beneficiaryDetails - .resourcesTobeProvided, + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.only( + bottom: kPadding * 2, + ), + child: Text( + localizations.translate( + i18.beneficiaryDetails + .resourcesTobeProvided, + ), + style: theme.textTheme.displayMedium, + ), ), - style: theme.textTheme.displayMedium, ), DigitTableCard( padding: const EdgeInsets.only(bottom: 4.0), @@ -363,14 +368,16 @@ class _DoseAdministeredPageState extends LocalizedState { }, //[TODO:: Need to parse <=age< as an Expression ), - const Divider(), + const Divider( + thickness: 2.0, + ), DigitTable( headerList: headerListResource, tableData: tableDataRows, columnWidth: MediaQuery.of(context).size.width / 2.18, - height: (tableDataRows.length + 1) * 59.5, + height: (tableDataRows.length + 1) * 57.5, ), ], ); diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/household_overview.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/household_overview.dart index 314a6dee6..514189572 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/household_overview.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/household_overview.dart @@ -67,177 +67,158 @@ class _HouseholdOverviewPageState child: SingleChildScrollView( child: DigitCard( child: Column( - mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: Text( - localizations.translate( - i18.householdOverView - .householdOverViewLabel, - ), - style: theme.textTheme.displayMedium, - overflow: TextOverflow.ellipsis, - ), - ), - BlocBuilder( - builder: (context, projectState) { - return DigitIconButton( - onPressed: () => - DigitActionDialog.show( - context, - widget: ActionCard( - items: [ - ActionCardModel( - icon: Icons.edit, - label: - localizations.translate( - i18.householdOverView - .householdOverViewEditLabel, - ), - action: () async { - final projectId = - context.projectId; - - final bloc = context.read< - HouseholdOverviewBloc>(); - Navigator.of( - context, - rootNavigator: true, - ).pop(); - - HouseholdMemberWrapper - wrapper = state - .householdMemberWrapper; - - final timestamp = wrapper - .projectBeneficiaries - .first - .dateOfRegistration; - // [TODO ] - final date = DateTime - .fromMillisecondsSinceEpoch( - timestamp, - ); + BlocBuilder( + builder: (context, projectState) { + return Align( + alignment: Alignment.centerLeft, + child: DigitIconButton( + onPressed: () => + DigitActionDialog.show( + context, + widget: ActionCard( + items: [ + ActionCardModel( + icon: Icons.edit, + label: + localizations.translate( + i18.householdOverView + .householdOverViewEditLabel, + ), + action: () async { + final projectId = + context.projectId; - final address = wrapper - .household.address; + final bloc = context.read< + HouseholdOverviewBloc>(); + Navigator.of( + context, + rootNavigator: true, + ).pop(); - if (address == null) - return; + HouseholdMemberWrapper + wrapper = state + .householdMemberWrapper; - final projectBeneficiary = state - .householdMemberWrapper - .projectBeneficiaries - .firstWhereOrNull( - (element) => - element - .beneficiaryClientReferenceId == - wrapper.household - .clientReferenceId, - ); - - await context.router.root - .push( - BeneficiaryRegistrationWrapperRoute( - initialState: - BeneficiaryRegistrationEditHouseholdState( - addressModel: - address, - individualModel: - wrapper.members, - householdModel: - wrapper - .household, - registrationDate: - date, - projectBeneficiaryModel: - projectBeneficiary, - ), - children: [ - HouseholdLocationRoute(), - ], - ), - ); + final timestamp = wrapper + .projectBeneficiaries + .first + .dateOfRegistration; + // [TODO ] + final date = DateTime + .fromMillisecondsSinceEpoch( + timestamp, + ); + + final address = wrapper + .household.address; + + if (address == null) return; + + final projectBeneficiary = state + .householdMemberWrapper + .projectBeneficiaries + .firstWhereOrNull( + (element) => + element + .beneficiaryClientReferenceId == + wrapper.household + .clientReferenceId, + ); - bloc.add( - HouseholdOverviewReloadEvent( - projectId: projectId, - projectBeneficiaryType: - beneficiaryType, + await context.router.root + .push( + BeneficiaryRegistrationWrapperRoute( + initialState: + BeneficiaryRegistrationEditHouseholdState( + addressModel: address, + individualModel: + wrapper.members, + householdModel: + wrapper.household, + registrationDate: + date, + projectBeneficiaryModel: + projectBeneficiary, ), - ); - }, - ), - ActionCardModel( - icon: Icons.delete, - label: localizations - .translate(i18 - .householdOverView - .householdOverViewDeleteLabel), - action: () => - DigitDialog.show( - context, - options: - DigitDialogOptions( - titleText: localizations + children: [ + HouseholdLocationRoute(), + ], + ), + ); + + bloc.add( + HouseholdOverviewReloadEvent( + projectId: projectId, + projectBeneficiaryType: + beneficiaryType, + ), + ); + }, + ), + ActionCardModel( + icon: Icons.delete, + label: localizations.translate(i18 + .householdOverView + .householdOverViewDeleteLabel), + action: () => + DigitDialog.show( + context, + options: DigitDialogOptions( + titleText: localizations + .translate(i18 + .householdOverView + .householdOverViewActionCardTitle), + primaryAction: + DigitDialogActions( + label: localizations .translate(i18 .householdOverView - .householdOverViewActionCardTitle), - primaryAction: - DigitDialogActions( - label: localizations - .translate(i18 - .householdOverView - .householdOverViewPrimaryActionLabel), - action: (ctx) { - Navigator.of( - ctx, - rootNavigator: - true, - ) - ..pop() - ..pop(); - context.router.push( - ReasonForDeletionRoute( - isHousholdDelete: - true, - ), - ); - }, - ), - secondaryAction: - DigitDialogActions( - label: localizations - .translate(i18 - .householdOverView - .householdOverViewSecondaryActionLabel), - action: (context) { - Navigator.of( - context, - rootNavigator: + .householdOverViewPrimaryActionLabel), + action: (ctx) { + Navigator.of( + ctx, + rootNavigator: true, + ) + ..pop() + ..pop(); + context.router.push( + ReasonForDeletionRoute( + isHousholdDelete: true, - ).pop(); - }, - ), + ), + ); + }, + ), + secondaryAction: + DigitDialogActions( + label: localizations + .translate(i18 + .householdOverView + .householdOverViewSecondaryActionLabel), + action: (context) { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, ), ), ), - ], - ), + ), + ], ), - iconText: localizations.translate( - i18.householdOverView - .householdOverViewEditIconText, - ), - icon: Icons.edit, - ); - }, - ), - ], + ), + iconText: localizations.translate( + i18.householdOverView + .householdOverViewEditIconText, + ), + icon: Icons.edit, + ), + ); + }, ), BlocBuilder( @@ -285,22 +266,44 @@ class _HouseholdOverviewPageState ), ), ), - DigitTableCard( - element: { + Padding( + padding: const EdgeInsets.only( + left: kPadding, + right: kPadding, + ), + child: Text( localizations.translate(i18 - .householdOverView - .householdOverViewHouseholdHeadNameLabel): - state.householdMemberWrapper - .headOfHousehold.name?.givenName, - localizations.translate( - i18.householdLocation - .administrationAreaFormLabel, - ): context.boundary.name, - localizations.translate( - i18.deliverIntervention.memberCountText, - ): state.householdMemberWrapper.household - .memberCount, - }, + .householdOverView + .householdOverViewLabel), + style: theme.textTheme.displayMedium, + ), + ), + Padding( + padding: const EdgeInsets.only( + left: kPadding, + right: kPadding, + ), + child: DigitTableCard( + element: { + localizations.translate(i18 + .householdOverView + .householdOverViewHouseholdHeadNameLabel): + state + .householdMemberWrapper + .headOfHousehold + .name + ?.givenName, + localizations.translate( + i18.householdLocation + .administrationAreaFormLabel, + ): context.boundary.name, + localizations.translate( + i18.deliverIntervention + .memberCountText, + ): state.householdMemberWrapper + .household.memberCount, + }, + ), ), Column( children: state @@ -511,6 +514,14 @@ class _HouseholdOverviewPageState DigitDialog.show( context, options: DigitDialogOptions( + titlePadding: + const EdgeInsets + .fromLTRB( + kPadding * 2, + kPadding * 2, + kPadding * 2, + kPadding / 2, + ), titleText: localizations .translate(i18 .householdOverView @@ -684,6 +695,9 @@ class _HouseholdOverviewPageState icon: Icons.add_circle, ), ), + const SizedBox( + height: kPadding, + ), ], ), ), diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/record_past_delivery_details.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/record_past_delivery_details.dart index 328a1c309..f82108cd6 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/record_past_delivery_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/record_past_delivery_details.dart @@ -56,233 +56,240 @@ class _RecordPastDeliveryDetailsPageState showHelp: false, ), ]), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(top: kPadding), - child: DigitElevatedButton( - onPressed: () { - for (int i = 0; i < (futureTaskList ?? []).length; i++) { - if (form - .control("$_recordDoseAdministeredKey.$i") - .value == - null) { - form + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () { + for (int i = 0; i < (futureTaskList ?? []).length; i++) { + if (form .control("$_recordDoseAdministeredKey.$i") - .setErrors({'': true}); - } + .value == + null) { + form + .control("$_recordDoseAdministeredKey.$i") + .setErrors({'': true}); } + } - form.markAllAsTouched(); + form.markAllAsTouched(); - if (!form.valid) return; + if (!form.valid) return; - DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate(i18 - .deliverIntervention - .didYouObservePreviousAdvEventsTitle), - barrierDismissible: false, - enableRecordPast: true, - dialogPadding: const EdgeInsets.all(8.0), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonNo, - ), - action: (ctx) { - router.pop(); - final event = - context.read(); - - for (int i = 0; - i < (futureTaskList ?? []).length; - i++) { - // Get the value of the form control for each task + DigitDialog.show( + context, + options: DigitDialogOptions( + titleText: localizations.translate(i18 + .deliverIntervention + .didYouObservePreviousAdvEventsTitle), + barrierDismissible: false, + enableRecordPast: true, + dialogPadding: const EdgeInsets.fromLTRB( + kPadding, + kPadding, + kPadding, + 0, + ), + primaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonNo, + ), + action: (ctx) { + router.pop(); + final event = + context.read(); - final formControllValue = (form - .control( - "$_recordDoseAdministeredKey.$i", - ) - .value as KeyValue) - .key; + for (int i = 0; + i < (futureTaskList ?? []).length; + i++) { + // Get the value of the form control for each task - // Determine the status based on the form control value - final status = formControllValue - ? Status.administeredSuccess.toValue() - : Status.administeredFailed.toValue(); + final formControllValue = (form + .control( + "$_recordDoseAdministeredKey.$i", + ) + .value as KeyValue) + .key; - // Create a new task with the updated status - final result = - futureTaskList![i].copyWith(status: status); + // Determine the status based on the form control value + final status = formControllValue + ? Status.administeredSuccess.toValue() + : Status.administeredFailed.toValue(); - // Add the updated task to the event - event.add(DeliverInterventionSubmitEvent( - result, - true, - context.boundary, - )); - } - final bloc = - context.read(); + // Create a new task with the updated status + final result = + futureTaskList![i].copyWith(status: status); - bloc.add(HouseholdOverviewReloadEvent( - projectId: context.projectId, - projectBeneficiaryType: context.beneficiaryType, + // Add the updated task to the event + event.add(DeliverInterventionSubmitEvent( + result, + true, + context.boundary, )); + } + final bloc = context.read(); - event.add(DeliverInterventionSearchEvent( - TaskSearchModel( - projectBeneficiaryClientReferenceId: bloc - .state - .householdMemberWrapper - .projectBeneficiaries - .map((e) => e.clientReferenceId) - .toList(), - ), - )); - context.router.popUntilRouteWithName( - SearchBeneficiaryRoute.name, - ); - bloc.add(HouseholdOverviewReloadEvent( - projectId: context.projectId, - projectBeneficiaryType: context.beneficiaryType, - )); - Navigator.of(ctx).pop(); + bloc.add(HouseholdOverviewReloadEvent( + projectId: context.projectId, + projectBeneficiaryType: context.beneficiaryType, + )); - router.push( - BeneficiaryDetailsRoute(), - ); - }, + event.add(DeliverInterventionSearchEvent( + TaskSearchModel( + projectBeneficiaryClientReferenceId: bloc.state + .householdMemberWrapper.projectBeneficiaries + .map((e) => e.clientReferenceId) + .toList(), + ), + )); + context.router.popUntilRouteWithName( + SearchBeneficiaryRoute.name, + ); + bloc.add(HouseholdOverviewReloadEvent( + projectId: context.projectId, + projectBeneficiaryType: context.beneficiaryType, + )); + Navigator.of(ctx).pop(); + + router.push( + BeneficiaryDetailsRoute(), + ); + }, + ), + secondaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonYes, ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonYes, - ), - action: (ctx) { - router.pop(); - final event = - context.read(); - final bloc = - context.read(); + action: (ctx) { + router.pop(); + final event = + context.read(); + final bloc = context.read(); - for (int i = 0; - i < (futureTaskList ?? []).length; - i++) { - // Get the value of the form control for each task + for (int i = 0; + i < (futureTaskList ?? []).length; + i++) { + // Get the value of the form control for each task - final formControllValue = (form - .control( - "$_recordDoseAdministeredKey.$i", - ) - .value as KeyValue) - .key; + final formControllValue = (form + .control( + "$_recordDoseAdministeredKey.$i", + ) + .value as KeyValue) + .key; - // Determine the status based on the form control value - final status = formControllValue - ? Status.administeredSuccess.toValue() - : Status.administeredFailed.toValue(); + // Determine the status based on the form control value + final status = formControllValue + ? Status.administeredSuccess.toValue() + : Status.administeredFailed.toValue(); - // Create a new task with the updated status - final result = - futureTaskList![i].copyWith(status: status); + // Create a new task with the updated status + final result = + futureTaskList![i].copyWith(status: status); - // Add the updated task to the event - event.add(DeliverInterventionSubmitEvent( - result, - true, - context.boundary, - )); - } - context.router.popUntilRouteWithName( - SearchBeneficiaryRoute.name, - ); - bloc.add(HouseholdOverviewReloadEvent( - projectId: context.projectId, - projectBeneficiaryType: context.beneficiaryType, + // Add the updated task to the event + event.add(DeliverInterventionSubmitEvent( + result, + true, + context.boundary, )); - Navigator.of(ctx).pop(); - router.push( - SideEffectsRoute( - tasks: [(futureTaskList ?? []).last], - ), - ); - }, - ), + } + context.router.popUntilRouteWithName( + SearchBeneficiaryRoute.name, + ); + bloc.add(HouseholdOverviewReloadEvent( + projectId: context.projectId, + projectBeneficiaryType: context.beneficiaryType, + )); + Navigator.of(ctx).pop(); + router.push( + SideEffectsRoute( + tasks: [(futureTaskList ?? []).last], + ), + ); + }, ), - ); - }, - child: Center( - child: Text( - localizations.translate(i18.common.coreCommonNext), ), + ); + }, + child: Center( + child: Text( + localizations.translate(i18.common.coreCommonNext), ), ), ), ), children: [ DigitCard( - child: Column( - children: [ - Text( - localizations.translate( - i18.deliverIntervention.recordPastDeliveryDeatils, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: kPadding, + vertical: kPadding, + ), + child: Column( + children: [ + Text( + localizations.translate( + i18.deliverIntervention.recordPastDeliveryDeatils, + ), + style: theme.textTheme.displayMedium, ), - style: theme.textTheme.displayMedium, - ), - ...(futureTaskList?.asMap().entries.map((entry) { - final int doseNumber = - int.parse(entry.value.additionalFields?.fields + ...(futureTaskList?.asMap().entries.map((entry) { + final int doseNumber = int.parse( + entry.value.additionalFields?.fields .firstWhereOrNull( (ele) => ele.key == AdditionalFieldsType.doseIndex .toValue(), ) - ?.value); + ?.value, + ); - return StatefulBuilder( - builder: (context, setState) { - return Column( - children: [ - DigitRadioButtonList( - labelText: "${localizations.translate( - i18.deliverIntervention - .wasDosePastDeliveryDetails, - )} $doseNumber ${localizations.translate( - i18.deliverIntervention - .wasDosePastRecordDeliveryDetails, - )} ${localizations.translate( - i18.beneficiaryDetails.beneficiaryDose, - )} ${doseNumber - 1} ? *", - labelStyle: DigitTheme.instance - .mobileTheme.textTheme.headlineSmall, - formControlName: - "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", - valueMapper: (val) => - localizations.translate(val.label), - options: Constants.yesNo, - onValueChange: (val) { - form - .control( - "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", - ) - .value = val; - }, - errorMessage: localizations.translate( - i18.common.corecommonRequired, + return StatefulBuilder( + builder: (context, setState) { + return Column( + children: [ + DigitRadioButtonList( + labelText: + "${localizations.translate(i18.deliverIntervention.wasDosePastDeliveryDetails)} $doseNumber ${localizations.translate(i18.deliverIntervention.wasDosePastRecordDeliveryDetails)} ${localizations.translate(i18.beneficiaryDetails.beneficiaryDose)} ${doseNumber - 1} ? *", + labelStyle: DigitTheme + .instance + .mobileTheme + .textTheme + .headlineSmall, + formControlName: + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", + valueMapper: (val) => + localizations.translate(val.label), + options: Constants.yesNo, + onValueChange: (val) { + form + .control( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", + ) + .value = val; + }, + errorMessage: localizations.translate( + i18.common.corecommonRequired, + ), + labelPadding: const EdgeInsets.only( + top: kPadding, + ), ), - ), - - if (entry.key != futureTaskList.length - 1) - const Divider(), // Add Divider conditionally - ], - ); - }, - ); - }).toList() ?? - []), - ], + if (entry.key != + futureTaskList.length - 1) + const Divider( + thickness: 1.0, + ), + ], + ); + }, + ); + }).toList() ?? + []), + ], + ), ), ), ], diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/refer_beneficiary.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/refer_beneficiary.dart index 0f475bbc6..74bfbd942 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/refer_beneficiary.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/refer_beneficiary.dart @@ -78,258 +78,278 @@ class _ReferBeneficiaryPageState extends LocalizedState { body: ReactiveFormBuilder( form: buildForm, builder: (context, form, child) => ScrollableContent( + enableFixedButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: isClicked - ? null - : () { - if (form.control(_referralReason).value == - null) { - clickedStatus.value = false; - form - .control(_referralReason) - .setErrors({'': true}); - } - form.markAllAsTouched(); + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitElevatedButton( + onPressed: isClicked + ? null + : () { + if (form.control(_referralReason).value == null) { + clickedStatus.value = false; + form + .control(_referralReason) + .setErrors({'': true}); + } + form.markAllAsTouched(); - if (!form.valid) { - return; - } else { - clickedStatus.value = true; - final recipient = form - .control(_referredToKey) - .value as FacilityModel; - final reason = form - .control(_referralReason) - .value as KeyValue; - final recipientType = - recipient.id == 'Community Health Worker' - ? 'STAFF' - : 'FACILITY'; - final recipientId = - recipient.id == 'Community Health Worker' - ? context.loggedInUserUuid - : recipient.id; - final referralComment = - form.control(_referralComments).value; + if (!form.valid) { + return; + } else { + clickedStatus.value = true; + final recipient = form + .control(_referredToKey) + .value as FacilityModel; + final reason = form + .control(_referralReason) + .value as KeyValue; + final recipientType = + recipient.id == 'Community Health Worker' + ? 'STAFF' + : 'FACILITY'; + final recipientId = + recipient.id == 'Community Health Worker' + ? context.loggedInUserUuid + : recipient.id; + final referralComment = + form.control(_referralComments).value; - final event = context.read(); - event.add(ReferralSubmitEvent( - ReferralModel( - clientReferenceId: IdGen.i.identifier, - projectId: context.projectId, - projectBeneficiaryClientReferenceId: - widget.projectBeneficiaryClientRefId, - referrerId: context.loggedInUserUuid, - recipientId: recipientId, - recipientType: recipientType, - reasons: [reason.key], - tenantId: envConfig.variables.tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: - context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - clientAuditDetails: ClientAuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: - context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - additionalFields: - ReferralAdditionalFields( - version: 1, - fields: [ - if (referralComment != null && - referralComment - .toString() - .trim() - .isNotEmpty) - AdditionalField( - AdditionalFieldsType - .referralComments - .toValue(), - referralComment, - ), - ], - ), + final event = context.read(); + event.add(ReferralSubmitEvent( + ReferralModel( + clientReferenceId: IdGen.i.identifier, + projectId: context.projectId, + projectBeneficiaryClientReferenceId: + widget.projectBeneficiaryClientRefId, + referrerId: context.loggedInUserUuid, + recipientId: recipientId, + recipientType: recipientType, + reasons: [reason.key], + tenantId: envConfig.variables.tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: context.loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), ), - false, - )); + clientAuditDetails: ClientAuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: context.loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + additionalFields: ReferralAdditionalFields( + version: 1, + fields: [ + if (referralComment != null && + referralComment + .toString() + .trim() + .isNotEmpty) + AdditionalField( + AdditionalFieldsType + .referralComments + .toValue(), + referralComment, + ), + ], + ), + ), + false, + )); - final reloadState = - context.read(); + final reloadState = + context.read(); - Future.delayed( - const Duration(milliseconds: 500), - () { - reloadState - .add(HouseholdOverviewReloadEvent( - projectId: context.projectId, - projectBeneficiaryType: - context.beneficiaryType, - )); - }, - ).then((value) => context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - }, - child: Center( - child: Text( - localizations - .translate(i18.common.coreCommonSubmit), - ), + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState + .add(HouseholdOverviewReloadEvent( + projectId: context.projectId, + projectBeneficiaryType: + context.beneficiaryType, + )); + }, + ).then((value) => context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } + }, + child: Center( + child: Text( + localizations.translate(i18.common.coreCommonSubmit), ), - ); - }, - ), + ), + ); + }, ), ), - children: [ - DigitCard( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Text( - localizations.translate( - i18.referBeneficiary.referralDetails, + slivers: [ + SliverToBoxAdapter( + child: DigitCard( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + localizations.translate( + i18.referBeneficiary.referralDetails, + ), + style: theme.textTheme.displayMedium, ), - style: theme.textTheme.displayMedium, ), - ), - ], - ), - Column(children: [ - DigitDateFormPicker( - isEnabled: false, - formControlName: _dateOfReferralKey, - label: localizations.translate( - i18.referBeneficiary.dateOfReferralLabel, - ), - isRequired: false, - initialDate: DateTime.now(), - cancelText: localizations - .translate(i18.common.coreCommonCancel), - confirmText: - localizations.translate(i18.common.coreCommonOk), - ), - DigitTextFormField( - formControlName: _administrativeUnitKey, - label: localizations.translate( - i18.referBeneficiary.administrationUnitFormLabel, - ), - isRequired: true, - readOnly: true, + ], ), - DigitTextFormField( - formControlName: _referredByKey, - label: localizations.translate( - i18.referBeneficiary.referredByLabel, - ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.corecommonRequired, - ), - }, - isRequired: true, - ), - DigitTextFormField( - valueAccessor: FacilityValueAccessor( - facilities, + Column(children: [ + DigitDateFormPicker( + isEnabled: false, + formControlName: _dateOfReferralKey, + label: localizations.translate( + i18.referBeneficiary.dateOfReferralLabel, + ), + isRequired: false, + initialDate: DateTime.now(), + cancelText: localizations + .translate(i18.common.coreCommonCancel), + confirmText: localizations + .translate(i18.common.coreCommonOk), + padding: const EdgeInsets.only( + bottom: kPadding, + top: kPadding, + ), ), - label: localizations.translate( - i18.referBeneficiary.referredToLabel, + DigitTextFormField( + formControlName: _administrativeUnitKey, + label: localizations.translate( + i18.referBeneficiary.administrationUnitFormLabel, + ), + isRequired: true, + readOnly: true, ), - isRequired: true, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), + DigitTextFormField( + formControlName: _referredByKey, + label: localizations.translate( + i18.referBeneficiary.referredByLabel, + ), + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.corecommonRequired, + ), + }, + isRequired: true, ), - formControlName: _referredToKey, - readOnly: false, - validationMessages: { - 'required': (_) => localizations.translate( - i18.referBeneficiary - .facilityValidationMessage, + InkWell( + onTap: () async { + final parent = + context.router.parent() as StackRouter; + final facility = await parent.push( + FacilitySelectionRoute( + facilities: facilities, ), - }, - onTap: () async { - final parent = - context.router.parent() as StackRouter; - final facility = await parent.push( - FacilitySelectionRoute( - facilities: facilities, - ), - ); + ); - if (facility == null) return; - form.control(_referredToKey).value = facility; - }, - ), - BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - initialized: (appConfiguration, _) { - final List reasons = - (appConfiguration.referralReasons ?? []) - .map((e) => KeyValue(e.code, e.code)) - .toList(); + if (facility == null) return; + form.control(_referredToKey).value = facility; + }, + child: IgnorePointer( + child: DigitTextFormField( + hideKeyboard: true, + valueAccessor: FacilityValueAccessor( + facilities, + ), + label: localizations.translate( + i18.referBeneficiary.referredToLabel, + ), + isRequired: true, + suffix: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + formControlName: _referredToKey, + readOnly: true, + validationMessages: { + 'required': (_) => localizations.translate( + i18.referBeneficiary + .facilityValidationMessage, + ), + }, + onTap: () async { + final parent = + context.router.parent() as StackRouter; + final facility = + await parent.push( + FacilitySelectionRoute( + facilities: facilities, + ), + ); - return DigitRadioButtonList( - labelStyle: DigitTheme - .instance.mobileTheme.textTheme.bodyLarge, - formControlName: _referralReason, - valueMapper: (val) => - localizations.translate(val.label), - options: reasons, - labelText: localizations.translate( - i18.referBeneficiary.reasonForReferral, - ), - isRequired: true, - errorMessage: localizations.translate( - i18.common.corecommonRequired, - ), - onValueChange: (val) { - form.control(_referralReason).value = val; - }, - ); - }, - ); - }, - ), - DigitTextFormField( - formControlName: _referralComments, - label: localizations.translate( - i18.referBeneficiary.referralComments, + if (facility == null) return; + form.control(_referredToKey).value = facility; + }, + ), + ), ), - ), - ]), - ], + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + initialized: (appConfiguration, _) { + final List reasons = + (appConfiguration.referralReasons ?? []) + .map((e) => KeyValue(e.code, e.code)) + .toList(); + + return DigitRadioButtonList( + labelStyle: DigitTheme.instance.mobileTheme + .textTheme.bodyLarge, + formControlName: _referralReason, + valueMapper: (val) => + localizations.translate(val.label), + options: reasons, + labelText: localizations.translate( + i18.referBeneficiary.reasonForReferral, + ), + isRequired: true, + errorMessage: localizations.translate( + i18.common.corecommonRequired, + ), + onValueChange: (val) { + form.control(_referralReason).value = val; + }, + ); + }, + ); + }, + ), + DigitTextFormField( + formControlName: _referralComments, + label: localizations.translate( + i18.referBeneficiary.referralComments, + ), + minLines: 3, + maxLines: 3, + ), + ]), + ], + ), ), ), ], diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/side_effects.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/side_effects.dart index fcf034711..af919cb31 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/side_effects.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/side_effects.dart @@ -36,7 +36,6 @@ class SideEffectsPage extends LocalizedStatefulWidget { class _SideEffectsPageState extends LocalizedState { List symptomsValues = []; List symptomsTypes = []; - bool stateChanged = false; bool symptomsSelected = true; @override @@ -66,270 +65,287 @@ class _SideEffectsPageState extends LocalizedState { header: const BackNavigationHelpHeaderWidget( showHelp: false, ), - footer: SizedBox( - height: 100, - child: DigitCard( - child: DigitElevatedButton( - onPressed: () async { - if (symptomsValues.any((e) => e)) { - setState(() { - symptomsSelected = true; - }); - final router = context.router; + footer: DigitCard( + margin: const EdgeInsets.fromLTRB( + 0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB( + kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () async { + if (symptomsValues.any((e) => e)) { + setState(() { + symptomsSelected = true; + }); + final router = context.router; - final shouldSubmit = - await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: - localizations.translate( - i18.deliverIntervention - .dialogTitle, - ), - contentText: - localizations.translate( - i18.deliverIntervention - .dialogContent, + final shouldSubmit = + await DigitDialog.show( + context, + options: DigitDialogOptions( + titleText: localizations.translate( + i18.deliverIntervention + .dialogTitle, + ), + contentText: + localizations.translate( + i18.deliverIntervention + .dialogContent, + ), + primaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonSubmit, ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, - ), - action: (ctx) { - final List symptoms = - []; + action: (ctx) { + final List symptoms = + []; - for (int i = 0; - i < symptomsValues.length; - i++) { - if (symptomsValues[i]) { - symptoms.add( - symptomsTypes[i], - ); - } + for (int i = 0; + i < symptomsValues.length; + i++) { + if (symptomsValues[i]) { + symptoms.add( + symptomsTypes[i], + ); } + } - final clientReferenceId = - IdGen.i.identifier; - context - .read() - .add( - SideEffectsSubmitEvent( - SideEffectModel( - id: null, - taskClientReferenceId: - widget - .tasks - .last - .clientReferenceId, - projectId: context - .projectId, - symptoms: symptoms, - clientReferenceId: - clientReferenceId, - tenantId: envConfig - .variables - .tenantId, - rowVersion: 1, - auditDetails: - AuditDetails( - createdBy: context - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - context - .loggedInUserUuid, - lastModifiedTime: - context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: context - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - context - .loggedInUserUuid, - lastModifiedTime: - context - .millisecondsSinceEpoch(), - ), + final clientReferenceId = + IdGen.i.identifier; + context + .read() + .add( + SideEffectsSubmitEvent( + SideEffectModel( + id: null, + taskClientReferenceId: + widget.tasks.last + .clientReferenceId, + projectId: + context.projectId, + symptoms: symptoms, + clientReferenceId: + clientReferenceId, + tenantId: envConfig + .variables + .tenantId, + rowVersion: 1, + auditDetails: + AuditDetails( + createdBy: context + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: context + .loggedInUserUuid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: context + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: context + .loggedInUserUuid, + lastModifiedTime: + context + .millisecondsSinceEpoch(), ), - false, ), - ); - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: - DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, - ), - action: (context) => - Navigator.of( + false, + ), + ); + Navigator.of( context, rootNavigator: true, - ).pop(false), + ).pop(true); + }, + ), + secondaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonCancel, ), + action: (context) => Navigator.of( + context, + rootNavigator: true, + ).pop(false), ), - ); + ), + ); - if (shouldSubmit ?? false) { - final reloadState = context - .read(); + if (shouldSubmit ?? false) { + final reloadState = context + .read(); - Future.delayed( - const Duration(milliseconds: 500), - () { - reloadState.add( - HouseholdOverviewReloadEvent( - projectId: - context.projectId, - projectBeneficiaryType: - context.beneficiaryType, - ), - ); - }, - ).then((value) => - context.router.push( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - } else { - setState(() { - symptomsSelected = false; - }); + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState.add( + HouseholdOverviewReloadEvent( + projectId: context.projectId, + projectBeneficiaryType: + context.beneficiaryType, + ), + ); + }, + ).then((value) => context.router.push( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); } - }, - child: Center( - child: Text( - localizations.translate( - i18.common.coreCommonNext, - ), + } else { + setState(() { + symptomsSelected = false; + }); + } + }, + child: Center( + child: Text( + localizations.translate( + i18.common.coreCommonNext, ), ), ), ), ), - children: [ - DigitCard( - child: Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( + slivers: [ + SliverToBoxAdapter( + child: DigitCard( + padding: const EdgeInsets.only( + left: kPadding * 2, + right: kPadding * 2, + top: kPadding * 2, + bottom: kPadding * 2, + ), + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + localizations.translate( + i18.adverseEvents + .sideEffectsLabel, + ), + style: theme + .textTheme.displayMedium, + ), + ), + ], + ), + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only( + right: kPadding * 2, + top: kPadding * 2, + bottom: kPadding * 2, + ), child: Text( - localizations.translate( + '${localizations.translate( i18.adverseEvents - .sideEffectsLabel, - ), + .selectSymptomsLabel, + )}*', style: theme - .textTheme.displayMedium, + .textTheme.headlineSmall, ), ), - ], - ), - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.only( - left: 0, - right: kPadding, - top: kPadding * 2, - bottom: kPadding * 2), - child: Text( - '${localizations.translate( - i18.adverseEvents - .selectSymptomsLabel, - )}*', - style: - theme.textTheme.headlineSmall, - ), ), - ), - BlocBuilder( - builder: (context, state) => - state.maybeWhen( - orElse: () => const Offstage(), - initialized: (appConfiguration, _) { - final symptomTypesOptions = - appConfiguration - .symptomsTypes ?? - []; - symptomsTypes = - symptomTypesOptions - .map((e) => e.code) - .toList(); + BlocBuilder( + builder: (context, state) => + state.maybeWhen( + orElse: () => const Offstage(), + initialized: + (appConfiguration, _) { + final symptomTypesOptions = + appConfiguration + .symptomsTypes ?? + []; + symptomsTypes = + symptomTypesOptions + .map((e) => e.code) + .toList(); - for (var _ - in symptomTypesOptions) { - symptomsValues.add(false); - } + for (var _ + in symptomTypesOptions) { + symptomsValues.add(false); + } - return Column( - children: symptomTypesOptions - .mapIndexed( - (i, e) => StatefulBuilder( - builder: ( - BuildContext context, - StateSetter - stateSetter, - ) { - return DigitCheckboxTile( - label: localizations - .translate( - e.code, + return StatefulBuilder( + builder: ( + BuildContext context, + StateSetter stateSetter, + ) { + return Column( + children: [ + Column( + children: + symptomTypesOptions + .mapIndexed( + (i, e) => + DigitCheckboxTile( + padding: + EdgeInsets + .zero, + label: localizations + .translate( + e.code, + ), + value: + symptomsValues[ + i], + onChanged: + (value) { + stateSetter( + () { + symptomsValues[i] = + !symptomsValues[i]; + symptomsSelected = + symptomsValues.any( + (e) => e, + ); + }, + ); + }, + ), + ) + .toList(), + ), + Visibility( + visible: + !symptomsSelected, + child: Align( + alignment: Alignment + .centerLeft, + child: Text( + localizations + .translate( + i18.common + .coreCommonRequiredItems, + ), + style: TextStyle( + color: theme + .colorScheme + .error, + ), ), - value: - symptomsValues[ - i], - onChanged: (value) { - stateSetter( - () { - symptomsValues[ - i] = - !symptomsValues[ - i]; - }, - ); - }, - ); - }, - ), - ) - .toList(), - ); - }, - ), - ), - Offstage( - offstage: symptomsSelected, - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.common - .coreCommonRequiredItems, - ), - style: TextStyle( - color: theme.colorScheme.error, - ), + ), + ), + ], + ); + }, + ); + }, ), ), - ), - ], + ], + ), ), ), ], diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/past_delivery.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/past_delivery.dart index 1e3b6f3bf..1e8f53fdc 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/past_delivery.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/past_delivery.dart @@ -38,15 +38,26 @@ Widget buildTableContent( ), ]; + // Calculate the height of the container based on the number of items in the table + + final projectState = context.read().state; + final item = projectState + .projectType!.cycles![currentCycle - 1].deliveries![currentDose - 1]; + final productVariants = + fetchProductVariant(item, individualModel)?.productVariants; + final numRows = productVariants?.length ?? 0; + const rowHeight = 82; + const paddingHeight = kPadding * 2; + final containerHeight = (numRows + 1) * rowHeight + paddingHeight; + return Container( padding: const EdgeInsets.only( left: kPadding, - bottom: kPadding, + bottom: 0, right: kPadding, - top: kPadding / 2, + top: 0, ), - // [TODO - need to set the height of the card based on the number of items] - height: MediaQuery.of(context).size.height / 2.6, + height: containerHeight, width: MediaQuery.of(context).size.width / 1.25, child: BlocBuilder( builder: (context, projectState) { @@ -69,7 +80,9 @@ Widget buildTableContent( ): '${fetchProductVariant(item, individualModel)?.condition?.split('<=age<').first} - ${fetchProductVariant(item, individualModel)?.condition?.split('<=age<').last} months', }, ), - const Divider(), + const Divider( + thickness: 1.0, + ), // Build the DigitTable with the data DigitTable( headerList: headerListResource, @@ -108,7 +121,7 @@ Widget buildTableContent( }, ), ], - columnWidth: 140, + columnWidth: 125, height: ((fetchProductVariant(item, individualModel)! .productVariants ?? []) diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/record_delivery_cycle.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/record_delivery_cycle.dart index e472fbb0e..3b56d20fd 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/record_delivery_cycle.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary/widgets/record_delivery_cycle.dart @@ -32,6 +32,7 @@ class RecordDeliveryCycle extends LocalizedStatefulWidget { class _RecordDeliveryCycleState extends LocalizedState { bool isExpanded = false; + bool isDivider = false; @override Widget build(BuildContext context) { @@ -102,32 +103,45 @@ class _RecordDeliveryCycleState extends LocalizedState { onTap: () { setState(() { isExpanded = !isExpanded; + isDivider = !isDivider; }); }, child: Row( mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, children: [ - TextButton( - onPressed: null, - child: Text( - style: TextStyle( - fontSize: kPadding * 2, - decoration: - TextDecoration.underline, - color: Theme.of(context) - .colorScheme - .secondary, + Padding( + padding: + const EdgeInsets.symmetric( + horizontal: kPadding / 2, + ), + child: TextButton( + style: TextButton.styleFrom( + padding: const EdgeInsets.all( + 0, + ), + ), + onPressed: null, + child: Text( + style: TextStyle( + fontSize: kPadding * 2, + decoration: TextDecoration + .underline, + color: Theme.of(context) + .colorScheme + .secondary, + ), + isExpanded + ? localizations.translate( + i18.deliverIntervention + .hidePastCycles, + ) + : localizations.translate( + i18.deliverIntervention + .viewPastCycles, + ), ), - isExpanded - ? localizations.translate( - i18.deliverIntervention - .hidePastCycles, - ) - : localizations.translate( - i18.deliverIntervention - .viewPastCycles, - ), ), ), !isExpanded @@ -136,12 +150,14 @@ class _RecordDeliveryCycleState extends LocalizedState { .colorScheme .secondary, Icons.keyboard_arrow_down, + size: 24, ) : Icon( color: Theme.of(context) .colorScheme .secondary, Icons.keyboard_arrow_up, + size: 24, ), ], ), @@ -181,7 +197,12 @@ class _RecordDeliveryCycleState extends LocalizedState { Column( children: [ Padding( - padding: const EdgeInsets.only(top: 16.0), + padding: isCurrentCycle + ? EdgeInsets.zero + : const EdgeInsets.only( + top: kPadding + 2, + bottom: 0, + ), child: Align( alignment: Alignment.centerLeft, child: Text( @@ -189,7 +210,7 @@ class _RecordDeliveryCycleState extends LocalizedState { ? localizations .translate(i18.beneficiaryDetails.currentCycleLabel) : '${localizations.translate(i18.beneficiaryDetails.beneficiaryCycle)} ${e.id}', - style: theme.textTheme.headlineMedium, + style: theme.textTheme.headlineLarge, textAlign: TextAlign.left, ), ), @@ -264,9 +285,15 @@ class _RecordDeliveryCycleState extends LocalizedState { ]); }, ).toList(), - columnWidth: 115, + columnWidth: 130, height: ((e.deliveries?.length ?? 0) + 1) * 57.5, ), + const SizedBox( + height: 16, + ), + const Divider( + thickness: 1.0, + ), ], ), ); diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_details.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_details.dart index c986085bc..f4a771cda 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_details.dart @@ -1,12 +1,9 @@ -import 'package:collection/collection.dart'; import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; -import '../../blocs/app_initialization/app_initialization.dart'; import '../../blocs/beneficiary_registration/beneficiary_registration.dart'; -import '../../data/local_store/no_sql/schema/app_configuration.dart'; import '../../models/data_model.dart'; import '../../router/app_router.dart'; import '../../utils/environment_config.dart'; @@ -14,6 +11,8 @@ import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../../widgets/header/back_navigation_help_header.dart'; import '../../widgets/localized.dart'; +import '../../widgets/showcase/config/showcase_constants.dart'; +import '../../widgets/showcase/showcase_button.dart'; class HouseHoldDetailsPage extends LocalizedStatefulWidget { const HouseHoldDetailsPage({ @@ -43,205 +42,211 @@ class _HouseHoldDetailsPageState extends LocalizedState { builder: (context, registrationState) { return ScrollableContent( header: const Column(children: [ - BackNavigationHelpHeaderWidget(), + BackNavigationHelpHeaderWidget( + showHelp: false, + showcaseButton: ShowcaseButton(), + ), ]), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); - if (!form.valid) return; + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () { + form.markAllAsTouched(); + if (!form.valid) return; - final memberCount = - form.control(_memberCountKey).value as int; + final memberCount = + form.control(_memberCountKey).value as int; - final dateOfRegistration = form - .control(_dateOfRegistrationKey) - .value as DateTime; + final dateOfRegistration = + form.control(_dateOfRegistrationKey).value as DateTime; - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - addressModel, - householdModel, - individualModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) { - var household = householdModel; - household ??= HouseholdModel( - tenantId: envConfig.variables.tenantId, - clientReferenceId: IdGen.i.identifier, - rowVersion: 1, - clientAuditDetails: ClientAuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - auditDetails: AuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - ); + registrationState.maybeWhen( + orElse: () { + return; + }, + create: ( + addressModel, + householdModel, + individualModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) { + var household = householdModel; + household ??= HouseholdModel( + tenantId: envConfig.variables.tenantId, + clientReferenceId: IdGen.i.identifier, + rowVersion: 1, + clientAuditDetails: ClientAuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: context.millisecondsSinceEpoch(), + lastModifiedBy: context.loggedInUserUuid, + lastModifiedTime: context.millisecondsSinceEpoch(), + ), + auditDetails: AuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: context.millisecondsSinceEpoch(), + lastModifiedBy: context.loggedInUserUuid, + lastModifiedTime: context.millisecondsSinceEpoch(), + ), + ); - household = household.copyWith( - memberCount: memberCount, - address: addressModel, - ); + household = household.copyWith( + memberCount: memberCount, + address: addressModel, + ); - bloc.add( - BeneficiaryRegistrationSaveHouseholdDetailsEvent( - household: household!, - registrationDate: dateOfRegistration, - ), - ); - context.router.push( - IndividualDetailsRoute(isHeadOfHousehold: true), - ); - }, - editHousehold: ( - addressModel, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - ) { - var household = householdModel.copyWith( - memberCount: memberCount, - address: addressModel, - clientAuditDetails: (householdModel - .clientAuditDetails?.createdBy != - null && - householdModel - .clientAuditDetails?.createdTime != - null) - ? ClientAuditDetails( - createdBy: householdModel - .clientAuditDetails!.createdBy, - createdTime: householdModel - .clientAuditDetails!.createdTime, - lastModifiedBy: householdModel - .clientAuditDetails!.lastModifiedBy, - lastModifiedTime: - DateTime.now().millisecondsSinceEpoch, - ) - : null, - rowVersion: householdModel.rowVersion, - ); + bloc.add( + BeneficiaryRegistrationSaveHouseholdDetailsEvent( + household: household!, + registrationDate: dateOfRegistration, + ), + ); + context.router.push( + IndividualDetailsRoute(isHeadOfHousehold: true), + ); + }, + editHousehold: ( + addressModel, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + ) { + var household = householdModel.copyWith( + memberCount: memberCount, + address: addressModel, + clientAuditDetails: + (householdModel.clientAuditDetails?.createdBy != + null && + householdModel.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: householdModel + .clientAuditDetails!.createdBy, + createdTime: householdModel + .clientAuditDetails!.createdTime, + lastModifiedBy: householdModel + .clientAuditDetails!.lastModifiedBy, + lastModifiedTime: + DateTime.now().millisecondsSinceEpoch, + ) + : null, + rowVersion: householdModel.rowVersion, + ); - bloc.add( - BeneficiaryRegistrationUpdateHouseholdDetailsEvent( - household: household.copyWith( - clientAuditDetails: (addressModel - .clientAuditDetails - ?.createdBy != - null && - addressModel.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: addressModel - .clientAuditDetails!.createdBy, - createdTime: addressModel - .clientAuditDetails!.createdTime, - lastModifiedBy: - context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ) - : null, - ), - addressModel: addressModel.copyWith( - clientAuditDetails: (addressModel - .clientAuditDetails - ?.createdBy != - null && - addressModel.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: addressModel - .clientAuditDetails!.createdBy, - createdTime: addressModel - .clientAuditDetails!.createdTime, - lastModifiedBy: - context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ) - : null, - ), + bloc.add( + BeneficiaryRegistrationUpdateHouseholdDetailsEvent( + household: household.copyWith( + clientAuditDetails: (addressModel + .clientAuditDetails?.createdBy != + null && + addressModel.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: addressModel + .clientAuditDetails!.createdBy, + createdTime: addressModel + .clientAuditDetails!.createdTime, + lastModifiedBy: context.loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ) + : null, ), - ); + addressModel: addressModel.copyWith( + clientAuditDetails: (addressModel + .clientAuditDetails?.createdBy != + null && + addressModel.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: addressModel + .clientAuditDetails!.createdBy, + createdTime: addressModel + .clientAuditDetails!.createdTime, + lastModifiedBy: context.loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ) + : null, + ), + ), + ); - (router.parent() as StackRouter).pop(); - }, - ); - }, - child: Center( - child: Text( - registrationState.mapOrNull( - editHousehold: (value) => localizations - .translate(i18.common.coreCommonSave), - ) ?? - localizations - .translate(i18.householdDetails.actionLabel), - ), + (router.parent() as StackRouter).pop(); + }, + ); + }, + child: Center( + child: Text( + registrationState.mapOrNull( + editHousehold: (value) => localizations + .translate(i18.common.coreCommonSave), + ) ?? + localizations + .translate(i18.householdDetails.actionLabel), ), ), ), ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.householdDetails.householdDetailsLabel, - ), - style: theme.textTheme.displayMedium, - ), - Column(children: [ - DigitDateFormPicker( - isEnabled: false, - formControlName: _dateOfRegistrationKey, - label: localizations.translate( - i18.householdDetails.dateOfRegistrationLabel, - ), - isRequired: false, - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, + slivers: [ + SliverToBoxAdapter( + child: DigitCard( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(bottom: kPadding), + child: Text( + localizations.translate( + i18.householdDetails.householdDetailsLabel, + ), + style: theme.textTheme.displayMedium, ), ), - DigitIntegerFormPicker( - minimum: 1, - form: form, - formControlName: _memberCountKey, - label: localizations.translate( - i18.householdDetails.noOfMembersCountLabel, + Column(children: [ + householdDetailsShowcaseData.dateOfRegistration + .buildWith( + child: DigitDateFormPicker( + isEnabled: false, + formControlName: _dateOfRegistrationKey, + label: localizations.translate( + i18.householdDetails.dateOfRegistrationLabel, + ), + isRequired: false, + confirmText: localizations.translate( + i18.common.coreCommonOk, + ), + cancelText: localizations.translate( + i18.common.coreCommonCancel, + ), + ), ), - incrementer: true, - ), - ]), - const SizedBox(height: 16), - ], + householdDetailsShowcaseData + .numberOfMembersLivingInHousehold + .buildWith( + child: DigitIntegerFormPicker( + minimum: 1, + form: form, + formControlName: _memberCountKey, + label: localizations.translate( + i18.householdDetails.noOfMembersCountLabel, + ), + incrementer: true, + ), + ), + ]), + const SizedBox(height: 16), + ], + ), ), ), ], diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_location.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_location.dart index 9cdb44dac..05314e951 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_location.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/household_location.dart @@ -1,5 +1,6 @@ import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -11,6 +12,8 @@ import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../../widgets/header/back_navigation_help_header.dart'; import '../../widgets/localized.dart'; +import '../../widgets/showcase/config/showcase_constants.dart'; +import '../../widgets/showcase/showcase_button.dart'; class HouseholdLocationPage extends LocalizedStatefulWidget { const HouseholdLocationPage({ @@ -32,6 +35,7 @@ class _HouseholdLocationPageState static const _latKey = 'lat'; static const _lngKey = 'lng'; static const _accuracyKey = 'accuracy'; + static const maxLength = 64; @override Widget build(BuildContext context) { @@ -65,232 +69,264 @@ class _HouseholdLocationPageState BeneficiaryRegistrationState>( builder: (context, registrationState) { return ScrollableContent( + enableFixedButton: true, header: const Column( children: [ - BackNavigationHelpHeaderWidget(), + BackNavigationHelpHeaderWidget( + showcaseButton: ShowcaseButton(), + showHelp: false, + ), ], ), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: BlocBuilder( - builder: (context, locationState) { - return DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); - if (!form.valid) return; + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: BlocBuilder( + builder: (context, locationState) { + return DigitElevatedButton( + onPressed: () { + form.markAllAsTouched(); + if (!form.valid) return; - final addressLine1 = - form.control(_addressLine1Key).value as String?; - final addressLine2 = - form.control(_addressLine2Key).value as String?; - final landmark = - form.control(_landmarkKey).value as String?; - final postalCode = - form.control(_postalCodeKey).value as String?; + final addressLine1 = + form.control(_addressLine1Key).value as String?; + final addressLine2 = + form.control(_addressLine2Key).value as String?; + final landmark = + form.control(_landmarkKey).value as String?; + final postalCode = + form.control(_postalCodeKey).value as String?; - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - address, - householdModel, - individualModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) { - var addressModel = AddressModel( - addressLine1: addressLine1 != null && - addressLine1.trim().isNotEmpty - ? addressLine1 - : null, - addressLine2: addressLine2 != null && - addressLine2.trim().isNotEmpty - ? addressLine2 - : null, - landmark: landmark != null && - landmark.trim().isNotEmpty - ? landmark - : null, - pincode: postalCode != null && - postalCode.trim().isNotEmpty - ? postalCode - : null, - type: AddressType.correspondence, - latitude: form.control(_latKey).value ?? - locationState.latitude, - longitude: form.control(_lngKey).value ?? - locationState.longitude, - locationAccuracy: - form.control(_accuracyKey).value ?? - locationState.accuracy, - locality: LocalityModel( - code: context.boundary.code!, - name: context.boundary.name, - ), - tenantId: envConfig.variables.tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: - context.millisecondsSinceEpoch(), - ), - clientAuditDetails: ClientAuditDetails( - createdBy: context.loggedInUserUuid, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - ); + registrationState.maybeWhen( + orElse: () { + return; + }, + create: ( + address, + householdModel, + individualModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) { + var addressModel = AddressModel( + addressLine1: addressLine1 != null && + addressLine1.trim().isNotEmpty + ? addressLine1 + : null, + addressLine2: addressLine2 != null && + addressLine2.trim().isNotEmpty + ? addressLine2 + : null, + landmark: landmark != null && + landmark.trim().isNotEmpty + ? landmark + : null, + pincode: postalCode != null && + postalCode.trim().isNotEmpty + ? postalCode + : null, + type: AddressType.correspondence, + latitude: form.control(_latKey).value ?? + locationState.latitude, + longitude: form.control(_lngKey).value ?? + locationState.longitude, + locationAccuracy: + form.control(_accuracyKey).value ?? + locationState.accuracy, + locality: LocalityModel( + code: context.boundary.code!, + name: context.boundary.name, + ), + tenantId: envConfig.variables.tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: context.millisecondsSinceEpoch(), + ), + clientAuditDetails: ClientAuditDetails( + createdBy: context.loggedInUserUuid, + createdTime: context.millisecondsSinceEpoch(), + lastModifiedBy: context.loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + ); - bloc.add( - BeneficiaryRegistrationSaveAddressEvent( - addressModel, - ), - ); - router.push(HouseHoldDetailsRoute()); - }, - editHousehold: ( - address, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - ) { - var addressModel = address.copyWith( - addressLine1: addressLine1 != null && - addressLine1.trim().isNotEmpty - ? addressLine1 - : null, - addressLine2: addressLine2 != null && - addressLine2.trim().isNotEmpty - ? addressLine2 - : null, - landmark: landmark != null && - landmark.trim().isNotEmpty - ? landmark - : null, - locality: address.locality, - pincode: postalCode != null && - postalCode.trim().isNotEmpty - ? postalCode - : null, - type: AddressType.correspondence, - latitude: form.control(_latKey).value, - longitude: form.control(_lngKey).value, - locationAccuracy: - form.control(_accuracyKey).value, - ); - // TODO [Linking of Voucher for Household based project need to be handled] + bloc.add( + BeneficiaryRegistrationSaveAddressEvent( + addressModel, + ), + ); + router.push(HouseHoldDetailsRoute()); + }, + editHousehold: ( + address, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + ) { + var addressModel = address.copyWith( + addressLine1: addressLine1 != null && + addressLine1.trim().isNotEmpty + ? addressLine1 + : null, + addressLine2: addressLine2 != null && + addressLine2.trim().isNotEmpty + ? addressLine2 + : null, + landmark: landmark != null && + landmark.trim().isNotEmpty + ? landmark + : null, + locality: address.locality, + pincode: postalCode != null && + postalCode.trim().isNotEmpty + ? postalCode + : null, + type: AddressType.correspondence, + latitude: form.control(_latKey).value, + longitude: form.control(_lngKey).value, + locationAccuracy: + form.control(_accuracyKey).value, + ); + // TODO [Linking of Voucher for Household based project need to be handled] - bloc.add( - BeneficiaryRegistrationSaveAddressEvent( - addressModel, - ), - ); - router.push(HouseHoldDetailsRoute()); - }, - ); - }, - child: Center( - child: Text( - localizations - .translate(i18.householdLocation.actionLabel), + bloc.add( + BeneficiaryRegistrationSaveAddressEvent( + addressModel, + ), + ); + router.push(HouseHoldDetailsRoute()); + }, + ); + }, + child: Center( + child: Text( + localizations.translate( + i18.householdLocation.actionLabel, ), ), - ); - }, - ), + ), + ); + }, ), ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.householdLocation.householdLocationLabelText, - ), - style: theme.textTheme.displayMedium, - ), - Column(children: [ - DigitTextFormField( - formControlName: _administrationAreaKey, - label: localizations.translate( - i18.householdLocation.administrationAreaFormLabel, + slivers: [ + SliverToBoxAdapter( + child: DigitCard( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: + const EdgeInsets.fromLTRB(0, 0, 0, kPadding), + child: Text( + localizations.translate( + i18.householdLocation + .householdLocationLabelText, + ), + style: theme.textTheme.displayMedium, ), - readOnly: true, - isRequired: true, - validationMessages: { - 'required': (_) => localizations.translate( - i18.householdLocation - .administrationAreaRequiredValidation, - ), - }, ), - DigitTextFormField( - formControlName: _addressLine1Key, - label: localizations.translate( - i18.householdLocation - .householdAddressLine1LabelText, + Column(children: [ + householdLocationShowcaseData.administrativeArea + .buildWith( + child: DigitTextFormField( + formControlName: _administrationAreaKey, + label: localizations.translate( + i18.householdLocation + .administrationAreaFormLabel, + ), + readOnly: true, + isRequired: true, + validationMessages: { + 'required': (_) => localizations.translate( + i18.householdLocation + .administrationAreaRequiredValidation, + ), + }, + ), ), - maxLength: 64, - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - }, - ), - DigitTextFormField( - formControlName: _addressLine2Key, - label: localizations.translate( - i18.householdLocation - .householdAddressLine2LabelText, + householdLocationShowcaseData.addressLine1 + .buildWith( + child: DigitTextFormField( + formControlName: _addressLine1Key, + label: localizations.translate( + i18.householdLocation + .householdAddressLine1LabelText, + ), + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + ), ), - maxLength: 64, - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - }, - ), - DigitTextFormField( - formControlName: _landmarkKey, - label: localizations.translate( - i18.householdLocation.landmarkFormLabel, + householdLocationShowcaseData.addressLine2 + .buildWith( + child: DigitTextFormField( + formControlName: _addressLine2Key, + label: localizations.translate( + i18.householdLocation + .householdAddressLine2LabelText, + ), + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + ), ), - maxLength: 64, - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - }, - ), - DigitTextFormField( - keyboardType: TextInputType.text, - formControlName: _postalCodeKey, - label: localizations.translate( - i18.householdLocation.postalCodeFormLabel, + householdLocationShowcaseData.landmark.buildWith( + child: DigitTextFormField( + formControlName: _landmarkKey, + label: localizations.translate( + i18.householdLocation.landmarkFormLabel, + ), + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + ), ), - maxLength: 64, - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - }, - ), - ]), - const SizedBox(height: 16), - ], + householdLocationShowcaseData.postalCode.buildWith( + child: DigitTextFormField( + keyboardType: TextInputType.text, + formControlName: _postalCodeKey, + label: localizations.translate( + i18.householdLocation.postalCodeFormLabel, + ), + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '6'), + }, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + ), + ), + ]), + ], + ), ), ), ], @@ -315,18 +351,24 @@ class _HouseholdLocationPageState _addressLine1Key: FormControl(value: addressModel?.addressLine1, validators: [ CustomValidator.requiredMin, + Validators.maxLength(64), ]), _addressLine2Key: FormControl( value: addressModel?.addressLine2, - validators: [CustomValidator.requiredMin], + validators: [ + CustomValidator.requiredMin, + Validators.maxLength(64), + ], ), _landmarkKey: FormControl(value: addressModel?.landmark, validators: [ CustomValidator.requiredMin, + Validators.maxLength(64), ]), _postalCodeKey: FormControl(value: addressModel?.pincode, validators: [ CustomValidator.requiredMin, + Validators.maxLength(6), ]), _latKey: FormControl(value: addressModel?.latitude, validators: [ CustomValidator.requiredMin, diff --git a/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/individual_details.dart b/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/individual_details.dart index fb9ccf2a2..53e853ed7 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/individual_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/beneficiary_registration/individual_details.dart @@ -21,6 +21,8 @@ import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../../widgets/header/back_navigation_help_header.dart'; import '../../widgets/localized.dart'; +import '../../widgets/showcase/config/showcase_constants.dart'; +import '../../widgets/showcase/showcase_button.dart'; class IndividualDetailsPage extends LocalizedStatefulWidget { final bool isHeadOfHousehold; @@ -44,6 +46,7 @@ class _IndividualDetailsPageState static const _genderKey = 'gender'; static const _mobileNumberKey = 'mobileNumber'; bool isDuplicateTag = false; + static const maxLength = 200; @override Widget build(BuildContext context) { @@ -79,136 +82,196 @@ class _IndividualDetailsPageState }, builder: (context, state) { return ScrollableContent( + enableFixedButton: true, header: const Column(children: [ - BackNavigationHelpHeaderWidget(), + BackNavigationHelpHeaderWidget( + showHelp: false, + showcaseButton: ShowcaseButton(), + ), ]), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: DigitElevatedButton( - onPressed: () async { - if (form.control(_dobKey).value == null) { - form.control(_dobKey).setErrors({'': true}); - } - final userId = context.loggedInUserUuid; - final projectId = context.projectId; - form.markAllAsTouched(); - if (!form.valid) return; - FocusManager.instance.primaryFocus?.unfocus(); + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () async { + if (form.control(_dobKey).value == null) { + form.control(_dobKey).setErrors({'': true}); + } + if (form.control(_idTypeKey).value == null) { + form.control(_idTypeKey).setErrors({'': true}); + } + final userId = context.loggedInUserUuid; + final projectId = context.projectId; + form.markAllAsTouched(); + if (!form.valid) return; + FocusManager.instance.primaryFocus?.unfocus(); - state.maybeWhen( - orElse: () { - return; - }, - create: ( - addressModel, - householdModel, - individualModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) async { - final individual = _getIndividualModel( - context, - form: form, - oldIndividual: null, - ); + state.maybeWhen( + orElse: () { + return; + }, + create: ( + addressModel, + householdModel, + individualModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) async { + final individual = _getIndividualModel( + context, + form: form, + oldIndividual: null, + ); - final boundary = context.boundary; + final boundary = context.boundary; - bloc.add( - BeneficiaryRegistrationSaveIndividualDetailsEvent( - model: individual, - isHeadOfHousehold: widget.isHeadOfHousehold, + bloc.add( + BeneficiaryRegistrationSaveIndividualDetailsEvent( + model: individual, + isHeadOfHousehold: widget.isHeadOfHousehold, + ), + ); + final scannerBloc = context.read(); + + if (scannerBloc.state.duplicate) { + DigitToast.show( + context, + options: DigitToastOptions( + localizations.translate( + i18.deliverIntervention.resourceAlreadyScanned, + ), + true, + theme, ), ); - final scannerBloc = context.read(); - - if (scannerBloc.state.duplicate) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - true, - theme, + } else { + final submit = await DigitDialog.show( + context, + options: DigitDialogOptions( + titleText: localizations.translate( + i18.deliverIntervention.dialogTitle, ), - ); - } else { - final submit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.deliverIntervention.dialogTitle, - ), - contentText: localizations.translate( - i18.deliverIntervention.dialogContent, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, - ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, + contentText: localizations.translate( + i18.deliverIntervention.dialogContent, + ), + primaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonSubmit, ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, - ), - action: (context) => Navigator.of( + action: (context) { + Navigator.of( context, rootNavigator: true, - ).pop(false), + ).pop(true); + }, + ), + secondaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonCancel, ), + action: (context) => Navigator.of( + context, + rootNavigator: true, + ).pop(false), ), - ); + ), + ); - if (submit ?? false) { - if (context.mounted) { - final scannerBloc = context.read(); + if (submit ?? false) { + if (context.mounted) { + final scannerBloc = context.read(); - bloc.add( - BeneficiaryRegistrationCreateEvent( - projectId: projectId, - userUuid: userId, - boundary: boundary, - tag: scannerBloc.state.qrcodes.isNotEmpty - ? scannerBloc.state.qrcodes.first - : null, - ), - ); - } + bloc.add( + BeneficiaryRegistrationCreateEvent( + projectId: projectId, + userUuid: userId, + boundary: boundary, + tag: scannerBloc.state.qrcodes.isNotEmpty + ? scannerBloc.state.qrcodes.first + : null, + ), + ); } } - }, - editIndividual: ( - householdModel, - individualModel, - addressModel, - projectBeneficiaryModel, - loading, - ) { - final scannerBloc = context.read(); - final individual = _getIndividualModel( + } + }, + editIndividual: ( + householdModel, + individualModel, + addressModel, + projectBeneficiaryModel, + loading, + ) { + final scannerBloc = context.read(); + final individual = _getIndividualModel( + context, + form: form, + oldIndividual: individualModel, + ); + final tag = scannerBloc.state.qrcodes.isNotEmpty + ? scannerBloc.state.qrcodes.first + : null; + + if (tag != null && + tag != projectBeneficiaryModel?.tag && + scannerBloc.state.duplicate) { + DigitToast.show( context, - form: form, - oldIndividual: individualModel, + options: DigitToastOptions( + localizations.translate( + i18.deliverIntervention.resourceAlreadyScanned, + ), + true, + theme, + ), ); - final tag = scannerBloc.state.qrcodes.isNotEmpty - ? scannerBloc.state.qrcodes.first - : null; + } else { + bloc.add( + BeneficiaryRegistrationUpdateIndividualDetailsEvent( + addressModel: addressModel, + model: individual.copyWith( + clientAuditDetails: (individual + .clientAuditDetails + ?.createdBy != + null && + individual.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: individual + .clientAuditDetails!.createdBy, + createdTime: individual + .clientAuditDetails!.createdTime, + lastModifiedBy: + context.loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ) + : null, + ), + tag: scannerBloc.state.qrcodes.isNotEmpty + ? scannerBloc.state.qrcodes.first + : null, + ), + ); + } + }, + addMember: ( + addressModel, + householdModel, + loading, + ) { + final individual = _getIndividualModel( + context, + form: form, + ); + + if (context.mounted) { + final scannerBloc = context.read(); - if (tag != null && - tag != projectBeneficiaryModel?.tag && - scannerBloc.state.duplicate) { + if (scannerBloc.state.duplicate) { DigitToast.show( context, options: DigitToastOptions( @@ -222,336 +285,327 @@ class _IndividualDetailsPageState ); } else { bloc.add( - BeneficiaryRegistrationUpdateIndividualDetailsEvent( + BeneficiaryRegistrationAddMemberEvent( + beneficiaryType: context.beneficiaryType, + householdModel: householdModel, + individualModel: individual, addressModel: addressModel, - model: individual.copyWith( - clientAuditDetails: (individual - .clientAuditDetails - ?.createdBy != - null && - individual.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: individual - .clientAuditDetails!.createdBy, - createdTime: individual - .clientAuditDetails!.createdTime, - lastModifiedBy: - context.loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ) - : null, - ), + userUuid: userId, + projectId: context.projectId, tag: scannerBloc.state.qrcodes.isNotEmpty ? scannerBloc.state.qrcodes.first : null, ), ); } - }, - addMember: ( - addressModel, - householdModel, - loading, - ) { - final individual = _getIndividualModel( - context, - form: form, - ); - - if (context.mounted) { - final scannerBloc = context.read(); - - if (scannerBloc.state.duplicate) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - true, - theme, - ), - ); - } else { - bloc.add( - BeneficiaryRegistrationAddMemberEvent( - beneficiaryType: context.beneficiaryType, - householdModel: householdModel, - individualModel: individual, - addressModel: addressModel, - userUuid: userId, - projectId: context.projectId, - tag: scannerBloc.state.qrcodes.isNotEmpty - ? scannerBloc.state.qrcodes.first - : null, - ), - ); - } - } - }, - ); - }, - child: Center( - child: Text( - state.mapOrNull( - editIndividual: (value) => localizations - .translate(i18.common.coreCommonSave), - ) ?? - localizations - .translate(i18.common.coreCommonSubmit), - ), + } + }, + ); + }, + child: Center( + child: Text( + state.mapOrNull( + editIndividual: (value) => localizations + .translate(i18.common.coreCommonSave), + ) ?? + localizations.translate(i18.common.coreCommonSubmit), ), ), ), ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.individualDetails.individualsDetailsLabelText, - ), - style: theme.textTheme.displayMedium, - ), - Column( - children: [ - DigitTextFormField( - formControlName: 'individualName', - label: localizations.translate( - i18.individualDetails.nameLabelText, + slivers: [ + SliverToBoxAdapter( + child: DigitCard( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(bottom: kPadding), + child: Text( + localizations.translate( + i18.individualDetails.individualsDetailsLabelText, ), - maxLength: 200, - isRequired: true, - validationMessages: { - 'required': (object) => localizations.translate( - '${i18.individualDetails.nameLabelText}_IS_REQUIRED', - ), - }, + style: theme.textTheme.displayMedium, ), - Offstage( - offstage: !widget.isHeadOfHousehold, - child: DigitCheckbox( - label: localizations.translate( - i18.individualDetails.checkboxLabelText, + ), + Column( + children: [ + individualDetailsShowcaseData.nameOfIndividual + .buildWith( + child: DigitTextFormField( + formControlName: 'individualName', + label: localizations.translate( + i18.individualDetails.nameLabelText, + ), + isRequired: true, + validationMessages: { + 'required': (object) => + localizations.translate( + '${i18.individualDetails.nameLabelText}_IS_REQUIRED', + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, ), - value: widget.isHeadOfHousehold, ), - ), - BlocBuilder( - builder: (context, state) => state.maybeWhen( - orElse: () => const Offstage(), - initialized: (appConfiguration, _) { - final idTypeOptions = - appConfiguration.idTypeOptions ?? - []; - - return DigitReactiveDropdown( - isRequired: true, - label: localizations.translate( - i18.individualDetails.idTypeLabelText, - ), - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.idTypeLabelText}_IS_REQUIRED', - ), - }, - valueMapper: (e) => e, - onChanged: (value) { - setState(() { - if (value == 'DEFAULT') { - form.control(_idNumberKey).value = - IdGen.i.identifier.toString(); - } else { - form.control(_idNumberKey).value = null; - } - }); - }, - initialValue: idTypeOptions.firstOrNull?.name, - menuItems: idTypeOptions.map( - (e) { - return localizations.translate(e.name); - }, - ).toList(), - formControlName: _idTypeKey, - ); - }, + Offstage( + offstage: !widget.isHeadOfHousehold, + child: DigitCheckbox( + label: localizations.translate( + i18.individualDetails.checkboxLabelText, + ), + value: widget.isHeadOfHousehold, + ), ), - ), - if (form.control(_idTypeKey).value != 'DEFAULT') - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ReactiveFormConsumer( - builder: (context, formGroup, child) { - return DigitTextFormField( - readOnly: - form.control(_idTypeKey).value == - 'DEFAULT', - isRequired: form - .control(_idNumberKey) - .validators - .isNotEmpty, - formControlName: _idNumberKey, + BlocBuilder( + builder: (context, state) => state.maybeWhen( + orElse: () => const Offstage(), + initialized: (appConfiguration, _) { + final idTypeOptions = + appConfiguration.idTypeOptions ?? + []; + + return individualDetailsShowcaseData.idType + .buildWith( + child: DigitReactiveSearchDropdown( label: localizations.translate( - i18.individualDetails.idNumberLabelText, + i18.individualDetails.idTypeLabelText, ), - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.idNumberLabelText}_IS_REQUIRED', - ), + form: form, + menuItems: idTypeOptions.map( + (e) { + return localizations + .translate(e.name); + }, + ).toList(), + formControlName: _idTypeKey, + valueMapper: (value) { + return value; }, - ); - }, - ), - const SizedBox(height: 4), - ], - ), - DigitDobPicker( - datePickerFormControl: _dobKey, - datePickerLabel: localizations.translate( - i18.individualDetails.dobLabelText, - ), - ageFieldLabel: localizations.translate( - i18.individualDetails.ageLabelText, - ), - yearsHintLabel: localizations.translate( - i18.individualDetails.yearsHintText, - ), - monthsHintLabel: localizations.translate( - i18.individualDetails.monthsHintText, - ), - separatorLabel: localizations.translate( - i18.individualDetails.separatorLabelText, + onSelected: (value) { + setState(() { + if (value == 'DEFAULT') { + form.control(_idNumberKey).value = + IdGen.i.identifier.toString(); + } else { + form.control(_idNumberKey).value = + null; + } + }); + }, + isRequired: true, + validationMessage: + localizations.translate( + i18.common.corecommonRequired, + ), + emptyText: localizations + .translate(i18.common.noMatchFound), + ), + ); + }, + ), ), - yearsAndMonthsErrMsg: localizations.translate( - i18.individualDetails.yearsAndMonthsErrorText, + if (form.control(_idTypeKey).value != 'DEFAULT') + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ReactiveFormConsumer( + builder: (context, formGroup, child) { + return DigitTextFormField( + readOnly: + form.control(_idTypeKey).value == + 'DEFAULT', + isRequired: form + .control(_idNumberKey) + .validators + .isNotEmpty, + formControlName: _idNumberKey, + label: localizations.translate( + i18.individualDetails + .idNumberLabelText, + ), + validationMessages: { + 'required': (object) => + localizations.translate( + '${i18.individualDetails.idNumberLabelText}_IS_REQUIRED', + ), + }, + padding: const EdgeInsets.only( + top: kPadding * 2, + left: kPadding / 2, + right: kPadding / 2, + ), + ); + }, + ), + const SizedBox(height: 4), + ], + ), + if (form.control(_idTypeKey).value == 'DEFAULT') + const SizedBox( + height: kPadding, + ), + individualDetailsShowcaseData.dateOfBirth.buildWith( + child: DigitDobPicker( + datePickerFormControl: _dobKey, + datePickerLabel: localizations.translate( + i18.individualDetails.dobLabelText, + ), + ageFieldLabel: localizations.translate( + i18.individualDetails.ageLabelText, + ), + yearsHintLabel: localizations.translate( + i18.individualDetails.yearsHintText, + ), + monthsHintLabel: localizations.translate( + i18.individualDetails.monthsHintText, + ), + separatorLabel: localizations.translate( + i18.individualDetails.separatorLabelText, + ), + yearsAndMonthsErrMsg: localizations.translate( + i18.individualDetails.yearsAndMonthsErrorText, + ), + onChangeOfFormControl: (formControl) { + // Handle changes to the control's value here + final value = formControl.value; + if (value == null) { + formControl.setErrors({'': true}); + } else { + DigitDOBAge age = + DigitDateUtils.calculateAge(value); + if ((age.years == 0 && age.months == 0) || + age.months > 11 || + (age.years >= 150 && age.months > 0)) { + formControl.setErrors({'': true}); + } else { + formControl.removeError(''); + } + } + }, + ), ), - onChangeOfFormControl: (formControl) { - // Handle changes to the control's value here - final value = formControl.value; - if (value == null) { - formControl.setErrors({'': true}); - } else { - DigitDOBAge age = - DigitDateUtils.calculateAge(value); - if ((age.years == 0 && age.months == 0) || - age.months > 11 || - (age.years >= 150 && age.months > 0)) { - formControl.setErrors({'': true}); - } else { - formControl.removeError(''); - } - } - }, - ), - BlocBuilder( - builder: (context, state) => state.maybeWhen( - orElse: () => const Offstage(), - initialized: (appConfiguration, _) { - final genderOptions = - appConfiguration.genderOptions ?? - []; + BlocBuilder( + builder: (context, state) => state.maybeWhen( + orElse: () => const Offstage(), + initialized: (appConfiguration, _) { + final genderOptions = + appConfiguration.genderOptions ?? + []; - return DigitDropdown( - label: localizations.translate( - i18.individualDetails.genderLabelText, - ), - valueMapper: (value) => - localizations.translate(value), - initialValue: genderOptions.firstOrNull?.name, - menuItems: genderOptions - .map( - (e) => e.name, - ) - .toList(), - formControlName: _genderKey, - ); - }, + return individualDetailsShowcaseData.gender + .buildWith( + child: DigitReactiveSearchDropdown( + label: localizations.translate( + i18.individualDetails.genderLabelText, + ), + form: form, + menuItems: genderOptions + .map( + (e) => e.name, + ) + .toList(), + formControlName: _genderKey, + valueMapper: (value) { + return localizations.translate(value); + }, + emptyText: localizations + .translate(i18.common.noMatchFound), + ), + ); + }, + ), ), - ), - DigitTextFormField( - keyboardType: TextInputType.number, - formControlName: _mobileNumberKey, - label: localizations.translate( - i18.individualDetails.mobileNumberLabelText, + individualDetailsShowcaseData.mobile.buildWith( + child: DigitTextFormField( + keyboardType: TextInputType.number, + formControlName: _mobileNumberKey, + label: localizations.translate( + i18.individualDetails.mobileNumberLabelText, + ), + validationMessages: { + 'maxLength': (object) => + localizations.translate(i18 + .individualDetails + .mobileNumberInvalidFormatValidationMessage), + }, + ), ), - maxLength: 10, - validationMessages: { - 'mobileNumber': (object) => - localizations.translate(i18.individualDetails - .mobileNumberInvalidFormatValidationMessage), - }, - ), - ], - ), - const SizedBox(height: 16), - BlocBuilder( - builder: (context, state) => state.qrcodes.isNotEmpty - ? Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: - MediaQuery.of(context).size.width / 3, - child: Text( - localizations.translate( - i18.deliverIntervention.voucherCode, + ], + ), + const SizedBox(height: 16), + BlocBuilder( + builder: (context, state) => state.qrcodes.isNotEmpty + ? Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: + MediaQuery.of(context).size.width / 3, + child: Text( + localizations.translate( + i18.deliverIntervention.voucherCode, + ), + style: theme.textTheme.headlineSmall, ), - style: theme.textTheme.headlineSmall, ), - ), - Flexible( - child: Text( - overflow: TextOverflow.ellipsis, - localizations - .translate(state.qrcodes.first), + Flexible( + child: Text( + overflow: TextOverflow.ellipsis, + localizations + .translate(state.qrcodes.first), + ), + ), + Padding( + padding: const EdgeInsets.only( + bottom: kPadding * 2, + ), + child: IconButton( + color: theme.colorScheme.secondary, + icon: const Icon(Icons.edit), + onPressed: () { + // TODO : [Need to handle the Scanner event]; + // context.read().add(ScannerScanEvent()) + context.router.push(QRScannerRoute( + quantity: 1, + isGS1code: false, + sinlgleValue: true, + isEditEnabled: true, + )); + }, + ), + ), + ], + + // ignore: no-empty-block + ) + : DigitOutlineIconButton( + buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, ), ), - IconButton( - color: theme.colorScheme.secondary, - icon: const Icon(Icons.edit), - onPressed: () { - // TODO : [Need to handle the Scanner event]; - // context.read().add(ScannerScanEvent()) - context.router.push(QRScannerRoute( - quantity: 1, - isGS1code: false, - sinlgleValue: true, - isEditEnabled: true, - )); - }, + onPressed: () { + context.router.push(QRScannerRoute( + quantity: 1, + isGS1code: false, + sinlgleValue: true, + )); + }, + icon: Icons.qr_code, + label: localizations.translate( + i18.individualDetails + .linkVoucherToIndividual, ), - ], - - // ignore: no-empty-block - ) - : DigitOutlineIconButton( - onPressed: () { - context.router.push(QRScannerRoute( - quantity: 1, - isGS1code: false, - sinlgleValue: true, - )); - }, - icon: Icons.qr_code, - label: localizations.translate( - i18.individualDetails.linkVoucherToIndividual, ), - ), - ), - ], + ), + ], + ), ), ), ], @@ -675,11 +729,14 @@ class _IndividualDetailsPageState return fb.group({ _individualNameKey: FormControl( - validators: [Validators.required, CustomValidator.requiredMin], + validators: [ + Validators.required, + CustomValidator.requiredMin, + Validators.maxLength(200), + ], value: individual?.name?.givenName ?? searchQuery, ), _idTypeKey: FormControl( - validators: [Validators.required], value: individual?.identifiers?.firstOrNull?.identifierType, ), _idNumberKey: FormControl( @@ -709,7 +766,7 @@ class _IndividualDetailsPageState ), _mobileNumberKey: FormControl(value: individual?.mobileNumber, validators: [ - CustomValidator.validMobileNumber, + Validators.maxLength(10), ]), }); } diff --git a/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart b/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart index 4b26c7219..4adc34bb5 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/boundary_selection.dart @@ -34,6 +34,9 @@ class _BoundarySelectionPageState int i = 0; int pendingSyncCount = 0; final clickedStatus = ValueNotifier(false); + var expenseTypeCtrl = TextEditingController(); + + Map dropdownControllers = {}; @override void initState() { @@ -60,6 +63,13 @@ class _BoundarySelectionPageState @override Widget build(BuildContext context) { + bool isDistributor = context.loggedInUserRoles + .where( + (role) => role.code == RolesType.distributor.toValue(), + ) + .toList() + .isNotEmpty; + return WillPopScope( onWillPop: () async => shouldPop, child: BlocBuilder( @@ -119,17 +129,18 @@ class _BoundarySelectionPageState padding: const EdgeInsets.symmetric( horizontal: kPadding * 2, ), - child: DigitDropdown( - initialValue: formControls[label]?.value, - label: '$label*', + child: DigitReactiveSearchDropdown< + BoundaryModel>( + label: localizations.translate(label), + form: form, menuItems: filteredItems, - validationMessages: { - 'required': (object) => - localizations.translate( - i18.common.corecommonRequired, - ), + formControlName: label, + valueMapper: (value) { + return value.name ?? + value.code ?? + 'No Value'; }, - onChanged: (value) { + onSelected: (value) { if (value == null) return; context.read().add( @@ -142,12 +153,13 @@ class _BoundarySelectionPageState // Call the resetChildDropdowns function when a parent dropdown is selected resetChildDropdowns(label, state); }, - valueMapper: (value) { - return value.name ?? - value.code ?? - 'No Value'; - }, - formControlName: label, + isRequired: true, + validationMessage: + localizations.translate( + i18.common.corecommonRequired, + ), + emptyText: localizations + .translate(i18.common.noMatchFound), ), ); }, @@ -434,11 +446,10 @@ class _BoundarySelectionPageState ); }, child: DigitCard( - margin: const EdgeInsets.only( - left: 0, - right: 0, - top: 10, - ), + margin: const EdgeInsets.fromLTRB( + 0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB( + kPadding, 0, kPadding, 0), child: SafeArea( child: BlocListener( listener: (context, syncState) { @@ -457,7 +468,8 @@ class _BoundarySelectionPageState isClicked ? null : () async { - if (!form.valid) { + if (!form.valid || + validateAllBoundarySelection()) { clickedStatus.value = false; await DigitToast.show( context, @@ -484,7 +496,8 @@ class _BoundarySelectionPageState await getIsConnected(); if (context.mounted) { - if (isOnline) { + if (isOnline && + isDistributor) { context .read< BeneficiaryDownSyncBloc>() @@ -561,11 +574,28 @@ class _BoundarySelectionPageState for (final label in labelList) { formControls[label] = FormControl( - validators: [Validators.required], value: state.selectedBoundaryMap[label], ); } return fb.group(formControls); } + + bool validateAllBoundarySelection() { + // Iterate through the map entries + for (final entry in formControls.entries) { + // Access the form control + final formControl = entry.value; + + // Check if the form control value is null + if (formControl.value == null) { + formControl.setErrors({'': true}); + // Return true if any form control has a null value + return true; + } + } + + // Return false if none of the form controls have a null value + return false; + } } diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist.dart b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist.dart index 4854e464f..8e34ce184 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist.dart @@ -13,6 +13,7 @@ import '../../utils/i18_key_constants.dart' as i18; import '../../widgets/action_card/action_card.dart'; import '../../widgets/header/back_navigation_help_header.dart'; import '../../widgets/localized.dart'; +import '../../widgets/no_result_card/no_result_card.dart'; class ChecklistPage extends LocalizedStatefulWidget { const ChecklistPage({ @@ -43,62 +44,76 @@ class _ChecklistPageState extends LocalizedState { child: CircularProgressIndicator(), ), serviceDefinitionFetch: - (ServiceDefinitionServiceFetchedState value) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only(left: 8), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.checklist.checklistlabel, + (ServiceDefinitionServiceFetchedState value) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(left: 8), + child: Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.all( + kPadding, + ), + child: Text( + localizations + .translate(i18.checklist.checklistlabel), + style: theme.textTheme.displayMedium, + ), ), - style: theme.textTheme.displayMedium, ), ), - ), - BlocBuilder( - builder: (context, authstate) { - return authstate.maybeMap( - orElse: () => const Offstage(), - authenticated: (res) { - List roles = res.userModel.roles - .map((e) => e.code.snakeCase.toUpperCase()) - .toList(); + BlocBuilder( + builder: (context, authstate) { + return authstate.maybeMap( + orElse: () => const Offstage(), + authenticated: (res) { + List roles = res.userModel.roles + .map((e) => e.code.snakeCase.toUpperCase()) + .toList(); + final values = value.serviceDefinitionList + .where((item) => !roles + .indexOf( + item.code!.split('.').last, + ) + .isNegative); - final values = value.serviceDefinitionList.where( - (item) => !roles - .indexOf(item.code!.split('.').last) - .isNegative, - ); + if (values.isEmpty) { + return Column( + children: [ + NoResultCard( + align: Alignment.center, + label: localizations.translate( + i18.common.noResultsFound, + ), + ), + ], + ); + } - return Column( - children: values - .map((e) => DigitProjectCell( - projectText: localizations - .translate('${e.code}'), - onTap: () { - context - .read() - .add( - ServiceDefinitionSelectionEvent( - serviceDefinition: e, - ), - ); - - DigitActionDialog.show( - context, - widget: ActionCard( - items: [ + return Column( + children: values + .map((e) => DigitProjectCell( + projectText: localizations + .translate('${e.code}'), + onTap: () { + context + .read() + .add( + ServiceDefinitionSelectionEvent( + serviceDefinition: e, + ), + ); + DigitActionDialog.show( + context, + widget: ActionCard(items: [ ActionCardModel( icon: Icons.edit_calendar, - label: - localizations.translate( - i18.checklist - .checklistCreateActionLabel, - ), + label: localizations.translate(i18 + .checklist + .checklistCreateActionLabel), action: () { context.router.push( ChecklistBoundaryViewRoute(), @@ -111,11 +126,9 @@ class _ChecklistPageState extends LocalizedState { ), ActionCardModel( icon: Icons.visibility, - label: - localizations.translate( - i18.checklist - .checklistViewActionLabel, - ), + label: localizations.translate(i18 + .checklist + .checklistViewActionLabel), action: () { context .read() @@ -136,19 +149,19 @@ class _ChecklistPageState extends LocalizedState { ).pop(); }, ), - ], - ), - ); - }, - )) - .toList(), - ); - }, - ); - }, - ), - ], - ), + ]), + ); + }, + )) + .toList(), + ); + }, + ); + }, + ), + ], + ); + }, ); }, ), diff --git a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_preview.dart b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_preview.dart index 29df52331..b34891404 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_preview.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/checklist/checklist_preview.dart @@ -106,6 +106,14 @@ class _ChecklistPreviewPageState extends LocalizedState { ), ); }, + buttonStyle: + OutlinedButton.styleFrom( + shape: + const RoundedRectangleBorder( + borderRadius: + BorderRadius.zero, + ), + ), ), ], ), diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_details_view.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_details_view.dart index 6f7be1590..bd77ac0b2 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_details_view.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_details_view.dart @@ -26,6 +26,7 @@ class ComplaintsDetailsViewPage extends StatelessWidget { return Scaffold( body: ScrollableContent( + enableFixedButton: true, header: Column( children: [ const BackNavigationHelpHeaderWidget(), @@ -43,9 +44,9 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ], ), footer: SizedBox( - height: 85, child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: DigitElevatedButton( onPressed: () { router.pop(); @@ -63,12 +64,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { child: Column( children: [ Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations .translate(i18.complaints.inboxNumberLabel), @@ -81,7 +82,9 @@ class ComplaintsDetailsViewPage extends StatelessWidget { complaint.serviceRequestId ?? "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", style: TextStyle( - color: theme.colorScheme.secondary, + color: complaint.serviceRequestId != null + ? theme.colorScheme.secondary + : const DigitColors().woodsmokeBlack, ), ), ), @@ -90,12 +93,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ), const DigitDivider(), Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations .translate(i18.complaints.inboxTypeLabel), @@ -117,12 +120,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ), const DigitDivider(), Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations .translate(i18.complaints.inboxDateLabel), @@ -142,12 +145,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ), const DigitDivider(), Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations .translate(i18.complaints.complainantName), @@ -165,12 +168,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ), const DigitDivider(), Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations .translate(i18.complaints.inboxAreaLabel), @@ -188,12 +191,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ), const DigitDivider(), Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations.translate( i18.complaints.complainantContactNumber, @@ -212,12 +215,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ), const DigitDivider(), Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations .translate(i18.complaints.inboxStatusLabel), @@ -237,12 +240,12 @@ class ComplaintsDetailsViewPage extends StatelessWidget { ), const DigitDivider(), Padding( - padding: const EdgeInsets.only(left: 8, top: 16, bottom: 16), + padding: const EdgeInsets.only(top: 16, bottom: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Expanded( - flex: 2, + flex: 3, child: Text( localizations .translate(i18.complaints.complaintDescription), diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox.dart index bc6e70bac..e5bdf9264 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox.dart @@ -11,6 +11,7 @@ import '../../../utils/i18_key_constants.dart' as i18; import '../../../utils/utils.dart'; import '../../../widgets/header/back_navigation_help_header.dart'; import '../../../widgets/localized.dart'; +import '../../../widgets/no_result_card/no_result_card.dart'; class ComplaintsInboxPage extends LocalizedStatefulWidget { const ComplaintsInboxPage({ @@ -48,30 +49,26 @@ class _ComplaintsInboxPageState extends LocalizedState { SliverToBoxAdapter( child: Padding( padding: const EdgeInsets.only( - left: 16, - top: 16, - bottom: 16, + left: kPadding*2, + bottom: kPadding, ), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.complaints.inboxHeading, - ), - style: theme.textTheme.displayMedium, + child: Text( + localizations.translate( + i18.complaints.inboxHeading, ), + style: theme.textTheme.displayMedium, ), ), ), ...[ SliverToBoxAdapter( child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ TextButton( style: TextButton.styleFrom( foregroundColor: theme.colorScheme.secondary, - padding: EdgeInsets.zero, + padding: const EdgeInsets.only(left: kPadding*2), ), onPressed: () { router.push(ComplaintsInboxSearchRoute()); @@ -79,6 +76,7 @@ class _ComplaintsInboxPageState extends LocalizedState { child: Row( children: [ const Icon(Icons.search), + const SizedBox(width: 5,), Text(localizations.translate( i18.complaints.searchCTA, )), @@ -96,6 +94,7 @@ class _ComplaintsInboxPageState extends LocalizedState { child: Row( children: [ const Icon(Icons.filter_list_alt), + const SizedBox(width: 5,), Text(localizations.translate( i18.complaints.filterCTA, )), @@ -105,7 +104,7 @@ class _ComplaintsInboxPageState extends LocalizedState { TextButton( style: TextButton.styleFrom( foregroundColor: theme.colorScheme.secondary, - padding: EdgeInsets.zero, + padding: const EdgeInsets.only(right: kPadding*2), ), onPressed: () { router.push(ComplaintsInboxSortRoute()); @@ -113,6 +112,7 @@ class _ComplaintsInboxPageState extends LocalizedState { child: Row( children: [ const Icon(Icons.segment), + const SizedBox(width: 5,), Text(localizations.translate( i18.complaints.sortCTA, )), @@ -143,8 +143,9 @@ class _ComplaintsInboxPageState extends LocalizedState { child: Center( child: Padding( padding: const EdgeInsets.all(10), - child: Text( - localizations + child: NoResultCard( + align: Alignment.center, + label: localizations .translate(i18.complaints.noComplaintsExist), ), ), @@ -154,39 +155,39 @@ class _ComplaintsInboxPageState extends LocalizedState { ), ), SizedBox( - height: 85, child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: DigitElevatedButton( - onPressed: () async { - var loggedInUserUuid = context.loggedInUserUuid; - final bloc = context.read(); + onPressed: () async { + var loggedInUserUuid = context.loggedInUserUuid; + final bloc = context.read(); - await router.push( - ComplaintsRegistrationWrapperRoute(), - ); + await router.push( + ComplaintsRegistrationWrapperRoute(), + ); - try { - bloc.add( - ComplaintInboxLoadComplaintsEvent( - createdByUserId: loggedInUserUuid, + try { + bloc.add( + ComplaintInboxLoadComplaintsEvent( + createdByUserId: loggedInUserUuid, + ), + ); + } catch (error) { + AppLogger.instance.error( + title: 'Error', + message: 'Error while loading complaints', + ); + } + }, + child: Center( + child: Text( + localizations.translate( + i18.complaints.fileComplaintAction, ), - ); - } catch (error) { - AppLogger.instance.error( - title: 'Error', - message: 'Error while loading complaints', - ); - } - }, - child: Center( - child: Text( - localizations.translate( - i18.complaints.fileComplaintAction, ), ), ), - ), ), ), ], @@ -215,7 +216,7 @@ class _ComplaintsInboxItem extends StatelessWidget { child: Column( children: [ Padding( - padding: const EdgeInsets.only(left: 8, top: 10, bottom: 10), + padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ @@ -232,7 +233,9 @@ class _ComplaintsInboxItem extends StatelessWidget { item.serviceRequestId ?? "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", style: TextStyle( - color: theme.colorScheme.secondary, + color: item.serviceRequestId != null + ? theme.colorScheme.secondary + : const DigitColors().woodsmokeBlack, ), ), ), @@ -240,7 +243,7 @@ class _ComplaintsInboxItem extends StatelessWidget { ), ), Padding( - padding: const EdgeInsets.only(left: 8, top: 10, bottom: 10), + padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ @@ -263,7 +266,7 @@ class _ComplaintsInboxItem extends StatelessWidget { ), ), Padding( - padding: const EdgeInsets.only(left: 8, top: 10, bottom: 10), + padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ @@ -286,7 +289,7 @@ class _ComplaintsInboxItem extends StatelessWidget { ), ), Padding( - padding: const EdgeInsets.only(left: 8, top: 10, bottom: 10), + padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ @@ -307,7 +310,7 @@ class _ComplaintsInboxItem extends StatelessWidget { ), ), Padding( - padding: const EdgeInsets.only(left: 8, top: 10, bottom: 10), + padding: const EdgeInsets.only(top: kPadding, bottom: 8), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ @@ -330,7 +333,7 @@ class _ComplaintsInboxItem extends StatelessWidget { ), ), Padding( - padding: const EdgeInsets.only(top: 16, bottom: 10), + padding: const EdgeInsets.only(top: kPadding*2), child: Row( children: [ Expanded( @@ -346,12 +349,13 @@ class _ComplaintsInboxItem extends StatelessWidget { width: 1.0, color: theme.colorScheme.secondary, ), + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), ), child: Text( localizations.translate(i18.searchBeneficiary.iconLabel), - style: TextStyle( - color: theme.colorScheme.secondary, - ), + style: DigitTheme.instance.mobileTheme.textTheme.headlineSmall?.apply(color: theme.colorScheme.secondary,), ), ), ), diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_filter.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_filter.dart index 345cb287d..53665aa05 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_filter.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_filter.dart @@ -132,35 +132,31 @@ class _ComplaintsInboxFilterPageState ], ), footer: SizedBox( - height: 85, child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: + const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( flex: 1, - child: OutlinedButton( + child: DigitOutLineButton( + label: localizations.translate( + i18.complaints.complaintsFilterClearAll, + ), onPressed: () { clearFilters(formGroup); }, - style: OutlinedButton.styleFrom( + buttonStyle: OutlinedButton.styleFrom( shape: const BeveledRectangleBorder(), - padding: const EdgeInsets.all(10), + padding: const EdgeInsets.all(14), side: BorderSide( width: 1.0, color: theme.colorScheme.secondary, ), ), - child: Text( - localizations.translate( - i18.complaints.complaintsFilterClearAll, - ), - style: TextStyle( - color: theme.colorScheme.secondary, - ), - ), ), ), const SizedBox(width: 10), @@ -290,24 +286,30 @@ class _ComplaintsInboxFilterPageState ); }, ), - DigitReactiveDropdown( - formControlName: _complaintType, + DigitReactiveSearchDropdown( label: localizations.translate( i18.complaints.complaintsTypeHeading, ), + form: formGroup, menuItems: complaintTypes.toList(), + formControlName: _complaintType, valueMapper: (value) { return localizations.translate( value.snakeCase.toUpperCase().trim(), ); }, + emptyText: localizations + .translate(i18.common.noMatchFound), ), - DigitReactiveDropdown( - formControlName: _complaintLocality, + DigitReactiveSearchDropdown( label: localizations .translate(i18.complaints.locality), + form: formGroup, menuItems: locality.toList(), + formControlName: _complaintLocality, valueMapper: (value) => value.trim(), + emptyText: localizations + .translate(i18.common.noMatchFound), ), if (uniqueStatuses.isNotEmpty) ...[ LabeledField( diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_search.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_search.dart index 159ae9a42..95e18292e 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_search.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_search.dart @@ -75,9 +75,9 @@ class _ComplaintsInboxSearchPageState ], ), footer: SizedBox( - height: 85, child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, @@ -127,7 +127,7 @@ class _ComplaintsInboxSearchPageState BlocBuilder( builder: (context, state) { return Padding( - padding: const EdgeInsets.all(22), + padding: const EdgeInsets.all(kPadding * 2), child: Column( children: [ DigitTextFormField( diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_sort.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_sort.dart index d0397a909..2eb3611a5 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_sort.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/inbox/complaints_inbox_sort.dart @@ -81,10 +81,9 @@ class _ComplaintsInboxSortPageState ], ), footer: SizedBox( - height: 85, child: DigitCard( - margin: - const EdgeInsets.only(left: 0, right: 0, top: 10), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaint_type.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaint_type.dart index ac08ec872..6e1b1d3ea 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaint_type.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaint_type.dart @@ -50,58 +50,55 @@ class _ComplaintTypePageState extends LocalizedState { header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: DigitElevatedButton( - onPressed: () async { - var complaintType = form.control(_complaintType).value; - var otherComplaintTypeValue = - form.control(_otherComplaintType).value; - - if (complaintType == "Other") { - form.control(_otherComplaintType).setValidators( - [Validators.required], - autoValidate: true, - ); - } else { - form.control(_otherComplaintType).setValidators( - [], - autoValidate: true, - ); - } - - setState(() { - form.markAllAsTouched(); - }); - - if (!form.valid) return; - - state.whenOrNull( - create: ( - loading, - complaintType, - _, - addressModel, - complaintsDetailsModel, - ) { - bloc.add( - ComplaintsRegistrationEvent.saveComplaintType( - complaintType: form.control(_complaintType).value, - otherComplaintDescription: - otherComplaintTypeValue, - ), - ); - }, + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () async { + var complaintType = form.control(_complaintType).value; + var otherComplaintTypeValue = + form.control(_otherComplaintType).value; + + if (complaintType == "Other") { + form.control(_otherComplaintType).setValidators( + [Validators.required], + autoValidate: true, ); - - router.push(ComplaintsLocationRoute()); - }, - child: Center( - child: Text( - localizations.translate(i18.complaints.actionLabel), - ), + } else { + form.control(_otherComplaintType).setValidators( + [], + autoValidate: true, + ); + } + + setState(() { + form.markAllAsTouched(); + }); + + if (!form.valid) return; + + state.whenOrNull( + create: ( + loading, + complaintType, + _, + addressModel, + complaintsDetailsModel, + ) { + bloc.add( + ComplaintsRegistrationEvent.saveComplaintType( + complaintType: form.control(_complaintType).value, + otherComplaintDescription: otherComplaintTypeValue, + ), + ); + }, + ); + + router.push(ComplaintsLocationRoute()); + }, + child: Center( + child: Text( + localizations.translate(i18.complaints.actionLabel), ), ), ), @@ -112,11 +109,14 @@ class _ComplaintTypePageState extends LocalizedState { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Text( - localizations.translate( - i18.complaints.complaintsTypeHeading, + Padding( + padding: const EdgeInsets.only(bottom: kPadding), + child: Text( + localizations.translate( + i18.complaints.complaintsTypeHeading, + ), + style: theme.textTheme.displayMedium, ), - style: theme.textTheme.displayMedium, ), LabeledField( label: localizations.translate( diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_details.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_details.dart index 12835c62f..8695613b2 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_details.dart @@ -72,135 +72,139 @@ class _ComplaintsDetailsPageState i18.complaints.raisedForMyself; return ScrollableContent( + enableFixedButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget(), ], ), footer: SizedBox( - height: 85, child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: DigitElevatedButton( - onPressed: () async { - setState(() { - form.markAllAsTouched(); - }); + onPressed: () async { + setState(() { + form.markAllAsTouched(); + }); - if (form.control(_complaintDetailsForm).disabled) { - router.parent()?.pop(); - } + if (form.control(_complaintDetailsForm).disabled) { + router.parent()?.pop(); + } - if (!form.valid) return; + if (!form.valid) return; - FocusManager.instance.primaryFocus?.unfocus(); + FocusManager.instance.primaryFocus?.unfocus(); - final dateOfComplaint = - form.control(_dateOfComplaint).value as DateTime; + final dateOfComplaint = + form.control(_dateOfComplaint).value as DateTime; - final complaintRaisedFor = - form.control(_complaintRaisedFor).value as String; + final complaintRaisedFor = + form.control(_complaintRaisedFor).value as String; - final administrativeArea = - form.control(_administrativeArea).value as String; + final administrativeArea = + form.control(_administrativeArea).value as String; - final complainantName = - form.control(_complainantName).value as String; + final complainantName = + form.control(_complainantName).value as String; - final complainantContactNumber = form - .control(_complainantContactNumber) - .value as String; + final complainantContactNumber = form + .control(_complainantContactNumber) + .value as String; - final supervisorName = - form.control(_supervisorName).value as String?; + final supervisorName = + form.control(_supervisorName).value as String?; - final supervisorContactNumber = form - .control(_supervisorContactNumber) - .value as String?; + final supervisorContactNumber = form + .control(_supervisorContactNumber) + .value as String?; - final complaintDescription = - form.control(_complaintDescription).value as String; + final complaintDescription = form + .control(_complaintDescription) + .value as String; - state.whenOrNull( - create: ( - loading, - complaintType, - _, - addressModel, - complaintsDetailsModel, - ) { - bloc.add( - ComplaintsRegistrationEvent.saveComplaintDetails( - boundaryModel: context.boundary, - complaintsDetailsModel: ComplaintsDetailsModel( - administrativeArea: administrativeArea, - dateOfComplaint: dateOfComplaint, - complaintRaisedFor: complaintRaisedFor, - complainantName: complainantName, - complainantContactNumber: - complainantContactNumber, - supervisorName: supervisorName, - supervisorContactNumber: - supervisorContactNumber, - complaintDescription: complaintDescription, + state.whenOrNull( + create: ( + loading, + complaintType, + _, + addressModel, + complaintsDetailsModel, + ) { + bloc.add( + ComplaintsRegistrationEvent + .saveComplaintDetails( + boundaryModel: context.boundary, + complaintsDetailsModel: + ComplaintsDetailsModel( + administrativeArea: administrativeArea, + dateOfComplaint: dateOfComplaint, + complaintRaisedFor: complaintRaisedFor, + complainantName: complainantName, + complainantContactNumber: + complainantContactNumber, + supervisorName: supervisorName, + supervisorContactNumber: + supervisorContactNumber, + complaintDescription: complaintDescription, + ), ), - ), - ); - }, - ); + ); + }, + ); - final userId = context.loggedInUserUuid; + final userId = context.loggedInUserUuid; - final submit = await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( - i18.complaints.dialogTitle, - ), - contentText: localizations.translate( - i18.complaints.dialogContent, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, + final submit = await DigitDialog.show( + context, + options: DigitDialogOptions( + titleText: localizations.translate( + i18.complaints.dialogTitle, ), - action: (context) { - Navigator.of( + contentText: localizations.translate( + i18.complaints.dialogContent, + ), + primaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonSubmit, + ), + action: (context) { + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + }, + ), + secondaryAction: DigitDialogActions( + label: localizations.translate( + i18.common.coreCommonCancel, + ), + action: (context) => Navigator.of( context, rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, + ).pop(false), ), - action: (context) => Navigator.of( - context, - rootNavigator: true, - ).pop(false), ), - ), - ); + ); - if (submit != true) return; + if (submit != true) return; - bloc.add( - ComplaintsRegistrationSubmitComplaintEvent( - userId: userId, + bloc.add( + ComplaintsRegistrationSubmitComplaintEvent( + userId: userId, + ), + ); + }, + child: Center( + child: Text( + form.control(_complaintDetailsForm).disabled + ? localizations + .translate(i18.complaints.backToInbox) + : localizations + .translate(i18.common.coreCommonSubmit), ), - ); - }, - child: Center( - child: Text( - form.control(_complaintDetailsForm).disabled - ? localizations - .translate(i18.complaints.backToInbox) - : localizations - .translate(i18.common.coreCommonSubmit), ), ), - ), ), ), children: [ @@ -236,13 +240,10 @@ class _ComplaintsDetailsPageState label: localizations.translate( i18.householdLocation.administrationAreaFormLabel, ), - maxLength: 64, isRequired: true, readOnly: true, ), - Padding( - padding: const EdgeInsets.only(top: 10.0), - child: LabeledField( + LabeledField( label: "${localizations.translate( i18.complaints.complainantTypeQuestion, )} *", @@ -309,7 +310,6 @@ class _ComplaintsDetailsPageState ], ), ), - ), BlocBuilder( builder: (context, state) { state.mapOrNull( @@ -334,12 +334,14 @@ class _ComplaintsDetailsPageState i18.complaints.complainantName, ), readOnly: isRaisedForSelf, - maxLength: 64, isRequired: true, validationMessages: { 'required': (object) => localizations.translate(i18.complaints .validationRequiredError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '64'), }, ), DigitTextFormField( @@ -348,7 +350,7 @@ class _ComplaintsDetailsPageState i18.complaints.complainantContactNumber, ), readOnly: isRaisedForSelf, - maxLength: 10, + isRequired: true, keyboardType: TextInputType.number, validationMessages: { @@ -362,6 +364,9 @@ class _ComplaintsDetailsPageState 'minLength': (object) => localizations.translate(i18.complaints .validationMinLengthError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '10'), }, ), ], @@ -373,14 +378,17 @@ class _ComplaintsDetailsPageState label: localizations.translate( i18.complaints.supervisorName, ), - maxLength: 64, + validationMessages: { + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '64'), + }, ), DigitTextFormField( formControlName: _supervisorContactNumber, label: localizations.translate( i18.complaints.supervisorContactNumber, ), - maxLength: 10, keyboardType: TextInputType.number, validationMessages: { 'mobileNumber': (object) => @@ -388,6 +396,12 @@ class _ComplaintsDetailsPageState i18.individualDetails .mobileNumberInvalidFormatValidationMessage, ), + 'minLength': (object) => + localizations.translate(i18.complaints + .validationMinLengthError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '10'), }, ), DigitTextFormField( @@ -395,16 +409,19 @@ class _ComplaintsDetailsPageState label: localizations.translate( i18.complaints.complaintDescription, ), - maxLength: 1000, + minLines: 3, + maxLines: 3, isRequired: true, validationMessages: { 'required': (object) => localizations.translate( i18.complaints.validationRequiredError, ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '1000'), }, ), ]), - const SizedBox(height: 16), ], ), ), @@ -443,7 +460,7 @@ class _ComplaintsDetailsPageState _complainantName: FormControl( value: complaintDetails?.complainantName, disabled: shouldDisableForm, - validators: [Validators.required], + validators: [Validators.required, Validators.maxLength(64)], ), _complainantContactNumber: FormControl( value: complaintDetails?.complainantContactNumber, @@ -452,21 +469,23 @@ class _ComplaintsDetailsPageState Validators.required, CustomValidator.validMobileNumber, Validators.minLength(10), + Validators.maxLength(10) ], ), _supervisorName: FormControl( value: complaintDetails?.supervisorName, disabled: shouldDisableForm, + validators: [Validators.maxLength(64)], ), _supervisorContactNumber: FormControl( value: complaintDetails?.supervisorContactNumber, disabled: shouldDisableForm, - validators: [CustomValidator.validMobileNumber], + validators: [CustomValidator.validMobileNumber, Validators.maxLength(10), Validators.minLength(10),], ), _complaintDescription: FormControl( value: complaintDetails?.complaintDescription, disabled: shouldDisableForm, - validators: [Validators.required], + validators: [Validators.required, Validators.maxLength(1000)], ), _complaintDetailsForm: FormControl( disabled: shouldDisableForm, diff --git a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_location.dart b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_location.dart index 709bc0314..432dbb8e8 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_location.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/complaints/registration/complaints_location.dart @@ -1,5 +1,6 @@ import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -30,6 +31,7 @@ class _ComplaintsLocationPageState static const _latKey = 'latKey'; static const _lngKey = 'lngKey'; static const _accuracyKey = 'accuracyKey'; + int maxLength = 64; @override Widget build(BuildContext context) { @@ -68,60 +70,59 @@ class _ComplaintsLocationPageState ComplaintsRegistrationState>( builder: (context, state) { return ScrollableContent( + enableFixedButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget(), ], ), - footer: SizedBox( - height: 85, - child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); + footer: DigitCard( + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: DigitElevatedButton( + onPressed: () { + form.markAllAsTouched(); - if (!form.valid) return; - FocusManager.instance.primaryFocus?.unfocus(); + if (!form.valid) return; + FocusManager.instance.primaryFocus?.unfocus(); - final addressLine1 = - form.control(_addressLine1Key).value as String?; - final addressLine2 = - form.control(_addressLine2Key).value as String?; - final landmark = - form.control(_landmarkKey).value as String?; - final postalCode = - form.control(_postalCodeKey).value as String?; + final addressLine1 = + form.control(_addressLine1Key).value as String?; + final addressLine2 = + form.control(_addressLine2Key).value as String?; + final landmark = + form.control(_landmarkKey).value as String?; + final postalCode = + form.control(_postalCodeKey).value as String?; - state.whenOrNull( - create: ( - loading, - complaintType, - _, - addressModel, - complaintsDetailsModel, - ) { - bloc.add(ComplaintsRegistrationEvent.saveAddress( - addressModel: PgrAddressModel( - buildingName: addressLine1, - street: addressLine2, - landmark: landmark, - pincode: postalCode, - geoLocation: GeoLocation( - latitude: form.control(_latKey).value, - longitude: form.control(_lngKey).value, - ), + state.whenOrNull( + create: ( + loading, + complaintType, + _, + addressModel, + complaintsDetailsModel, + ) { + bloc.add(ComplaintsRegistrationEvent.saveAddress( + addressModel: PgrAddressModel( + buildingName: addressLine1, + street: addressLine2, + landmark: landmark, + pincode: postalCode, + geoLocation: GeoLocation( + latitude: form.control(_latKey).value, + longitude: form.control(_lngKey).value, ), - )); - }, - ); + ), + )); + }, + ); - router.push(ComplaintsDetailsRoute()); - }, - child: Center( - child: Text( - localizations.translate(i18.complaints.actionLabel), - ), + router.push(ComplaintsDetailsRoute()); + }, + child: Center( + child: Text( + localizations.translate(i18.complaints.actionLabel), ), ), ), @@ -132,11 +133,14 @@ class _ComplaintsLocationPageState crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - Text( - localizations.translate( - i18.complaints.complaintsLocationLabel, + Padding( + padding: const EdgeInsets.only(bottom: kPadding), + child: Text( + localizations.translate( + i18.complaints.complaintsLocationLabel, + ), + style: theme.textTheme.displayMedium, ), - style: theme.textTheme.displayMedium, ), Column(children: [ DigitTextFormField( @@ -145,11 +149,13 @@ class _ComplaintsLocationPageState i18.householdLocation .householdAddressLine1LabelText, ), - maxLength: 64, validationMessages: { 'required': (_) => localizations.translate( i18.common.min2CharsRequired, ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), }, ), DigitTextFormField( @@ -158,24 +164,30 @@ class _ComplaintsLocationPageState i18.householdLocation .householdAddressLine2LabelText, ), - maxLength: 64, validationMessages: { 'required': (_) => localizations.translate( i18.common.min2CharsRequired, ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), }, + padding: const EdgeInsets.only(top: kPadding / 2), ), DigitTextFormField( formControlName: _landmarkKey, label: localizations.translate( i18.householdLocation.landmarkFormLabel, ), - maxLength: 64, validationMessages: { 'required': (_) => localizations.translate( i18.common.min2CharsRequired, ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), }, + padding: const EdgeInsets.only(top: kPadding / 2), ), DigitTextFormField( keyboardType: TextInputType.text, @@ -183,15 +195,20 @@ class _ComplaintsLocationPageState label: localizations.translate( i18.householdLocation.postalCodeFormLabel, ), - maxLength: 64, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], validationMessages: { 'required': (_) => localizations.translate( i18.common.min2CharsRequired, ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '6'), }, + padding: const EdgeInsets.only(top: kPadding / 3.5), ), ]), - const SizedBox(height: 16), ], ), ), @@ -217,18 +234,23 @@ class _ComplaintsLocationPageState disabled: shouldDisableForm, validators: [ CustomValidator.requiredMin, + Validators.maxLength(maxLength), ], ), _addressLine2Key: FormControl( value: addressModel?.street, disabled: shouldDisableForm, - validators: [CustomValidator.requiredMin], + validators: [ + CustomValidator.requiredMin, + Validators.maxLength(maxLength), + ], ), _landmarkKey: FormControl( value: addressModel?.landmark, disabled: shouldDisableForm, validators: [ CustomValidator.requiredMin, + Validators.maxLength(maxLength), ], ), _postalCodeKey: FormControl( @@ -236,6 +258,7 @@ class _ComplaintsLocationPageState disabled: shouldDisableForm, validators: [ CustomValidator.requiredMin, + Validators.maxLength(6), ], ), _latKey: FormControl( 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 d58c193cc..0a53cb077 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/home.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/home.dart @@ -2,35 +2,31 @@ import 'dart:async'; 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_components/widgets/digit_sync_dialog.dart'; -import 'package:drift/drift.dart' hide Column; import 'package:drift_db_viewer/drift_db_viewer.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_background_service/flutter_background_service.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:isar/isar.dart'; -import 'package:overlay_builder/overlay_builder.dart'; -import 'package:path/path.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import '../../data/local_store/no_sql/schema/app_configuration.dart' - as app_config; -import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/auth/auth.dart'; import '../blocs/search_households/search_households.dart'; import '../blocs/sync/sync.dart'; import '../data/data_repository.dart'; -import '../data/local_store/no_sql/schema/oplog.dart'; +import '../data/local_store/secure_store/secure_store.dart'; import '../data/local_store/sql_store/sql_store.dart'; import '../models/data_model.dart'; import '../router/app_router.dart'; import '../utils/debound.dart'; import '../utils/i18_key_constants.dart' as i18; import '../utils/utils.dart'; -import '../widgets/action_card/action_card.dart'; import '../widgets/header/back_navigation_help_header.dart'; import '../widgets/home/home_item_card.dart'; import '../widgets/localized.dart'; import '../widgets/progress_bar/beneficiary_progress.dart'; +import '../widgets/showcase/config/showcase_constants.dart'; +import '../widgets/showcase/showcase_button.dart'; class HomePage extends LocalizedStatefulWidget { const HomePage({ @@ -43,6 +39,8 @@ class HomePage extends LocalizedStatefulWidget { } class _HomePageState extends LocalizedState { + bool skipProgressBar = false; + final storage = const FlutterSecureStorage(); late StreamSubscription subscription; @override @@ -51,14 +49,16 @@ class _HomePageState extends LocalizedState { subscription = Connectivity() .onConnectivityChanged - .listen((ConnectivityResult result) { - performBackgroundService( - isBackground: false, - stopService: false, - context: null, - ); + .listen((ConnectivityResult resSyncBlocult) async { + var connectivityResult = await (Connectivity().checkConnectivity()); - // Got a new connectivity status! + if (connectivityResult != ConnectivityResult.none) { + if (context.mounted) { + context + .read() + .add(SyncRefreshEvent(context.loggedInUserUuid)); + } + } }); } @@ -72,128 +72,117 @@ class _HomePageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final state = context.read().state; + final localSecureStore = LocalSecureStore.instance; + if (state is! AuthAuthenticatedState) { + return Container(); + } + final roles = state.userModel.roles.map((e) { + return e.code; + }); - List> overlayWidgetStateList = []; - List> walkthroughWidgetStateList = []; - for (var i = 0; i < _getItems(context).length + 1; i++) { - overlayWidgetStateList - .add(GlobalKey(debugLabel: 'home_Overlay_$i')); - walkthroughWidgetStateList.add(GlobalKey( - debugLabel: 'HOME_$i', - )); + if (!(roles.contains("DISTRIBUTOR") || roles.contains("REGISTRAR"))) { + skipProgressBar = true; } - GlobalKey overlaykey = GlobalKey(debugLabel: 'new'); + final mappedItems = _getItems(context); - GlobalKey overlayWrapperkey = - GlobalKey(debugLabel: 'newwrapper'); + final homeItems = mappedItems?.homeItems ?? []; + final showcaseKeys = [ + if (!skipProgressBar) homeShowcaseData.distributorProgressBar.showcaseKey, + ...(mappedItems?.showcaseKeys ?? []), + ]; return Scaffold( - body: SizedBox( - height: MediaQuery.of(context).size.height, - child: DigitWalkthroughWrapper( - key: overlayWrapperkey, - overlayWidget: overlaykey, - keysArray: overlayWidgetStateList, - widgetKey: walkthroughWidgetStateList, - initialIndex: 0, - child: IgnorePointer( - ignoring: overlayWrapperkey.currentState?.showOverlay ?? false, - child: ScrollableContent( - slivers: [ - SliverGrid( - delegate: SliverChildBuilderDelegate( - (context, index) { - return DigitWalkthrough( - onSkip: () => - {overlayWrapperkey.currentState?.onSelectedSkip()}, - widgetHeight: 130, - onTap: () => { - walkthroughWidgetStateList[index] - .currentState - ?.initOffsetsPositions(), - overlayWrapperkey.currentState?.onSelectedTap(), - }, - key: walkthroughWidgetStateList[index + 1], - description: localizations.translate( - '${_getItems(context).elementAt(index).label}_HELP', - ), - overlayWidget: overlayWidgetStateList[index + 1], - titleAlignment: TextAlign.center, - skipLabel: - localizations.translate(i18.common.coreCommonSkip), - nextLabel: - localizations.translate(i18.common.coreCommonNext), - child: _getItems(context).elementAt(index), - ); - }, - childCount: _getItems(context).length, - ), - gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( - maxCrossAxisExtent: 145, - childAspectRatio: 104 / 128, - ), - ), - ], - header: Column(children: [ - BackNavigationHelpHeaderWidget( - showBackNavigation: false, - helpClicked: () { - for (var i = 0; i < _getItems(context).length; i++) { - walkthroughWidgetStateList[i] - .currentState - ?.initOffsetsPositions(); - } - overlayWrapperkey.currentState?.onSelectedTap(); + body: BlocListener( + listener: (context, state) { + state.maybeWhen( + orElse: () {}, + pendingSync: (count) { + final debouncer = Debouncer(seconds: 5); + debouncer.run(() async { + if (count != 0) { + await localSecureStore.setManualSyncTrigger(false); + if (context.mounted) { + await performBackgroundService( + isBackground: false, + stopService: false, + context: context, + ); + } + } else { + await localSecureStore.setManualSyncTrigger(true); + } + }); + }, + ); + }, + child: SizedBox( + height: MediaQuery.of(context).size.height, + child: ScrollableContent( + slivers: [ + SliverGrid( + delegate: SliverChildBuilderDelegate( + (context, index) { + return homeItems.elementAt(index); }, + childCount: homeItems.length, + ), + gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( + maxCrossAxisExtent: 145, + childAspectRatio: 104 / 128, ), - if (context.showProgressBar) - DigitWalkthrough( - onSkip: () => - {overlayWrapperkey.currentState?.onSelectedSkip()}, - widgetHeight: 150, - onTap: () { - overlayWrapperkey.currentState?.onSelectedTap(); - }, - key: walkthroughWidgetStateList[0], - description: - localizations.translate(i18.home.progressIndicatorHelp), - overlayWidget: overlayWidgetStateList[0], - titleAlignment: TextAlign.center, - skipLabel: - localizations.translate(i18.common.coreCommonSkip), - nextLabel: - localizations.translate(i18.common.coreCommonNext), - child: BeneficiaryProgressBar( - label: localizations.translate( - i18.home.progressIndicatorTitle, - ), - prefixLabel: localizations.translate( - i18.home.progressIndicatorPrefixLabel, - ), - ), - ), - ]), - footer: PoweredByDigit( - version: Constants().version, ), + ], + header: Column( children: [ - const SizedBox(height: kPadding * 2), - BlocConsumer( - listener: (context, state) { - state.maybeWhen( - orElse: () => null, - syncInProgress: () => DigitSyncDialog.show( - context, - type: DigitSyncDialogType.inProgress, - label: localizations.translate( - i18.syncDialog.syncInProgressTitle, + BackNavigationHelpHeaderWidget( + showBackNavigation: false, + showHelp: false, + showcaseButton: ShowcaseButton( + showcaseFor: showcaseKeys.toSet().toList(), + ), + ), + skipProgressBar + ? const SizedBox.shrink() + : homeShowcaseData.distributorProgressBar.buildWith( + child: BeneficiaryProgressBar( + label: localizations.translate( + i18.home.progressIndicatorTitle, + ), + prefixLabel: localizations.translate( + i18.home.progressIndicatorPrefixLabel, + ), ), - barrierDismissible: false, ), - completedSync: () { - Navigator.of(context, rootNavigator: true).pop(); - + ], + ), + footer: PoweredByDigit( + version: Constants().version, + ), + children: [ + const SizedBox(height: kPadding * 2), + BlocConsumer( + listener: (context, state) { + state.maybeWhen( + orElse: () => null, + syncInProgress: () async { + await localSecureStore.setManualSyncTrigger(false); + if (context.mounted) { + DigitSyncDialog.show( + context, + type: DigitSyncDialogType.inProgress, + label: localizations.translate( + i18.syncDialog.syncInProgressTitle, + ), + barrierDismissible: false, + ); + } + }, + completedSync: () async { + Navigator.of(context, rootNavigator: true).pop(); + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { DigitSyncDialog.show( context, type: DigitSyncDialogType.complete, @@ -209,74 +198,66 @@ class _HomePageState extends LocalizedState { }, ), ); - }, - failedSync: () { + } + }, + failedSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { _showSyncFailedDialog( context, message: localizations.translate( i18.syncDialog.syncFailedTitle, ), ); - }, - failedDownSync: () { + } + }, + failedDownSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { _showSyncFailedDialog( context, message: localizations.translate( i18.syncDialog.downSyncFailedTitle, ), ); - }, - failedUpSync: () { + } + }, + failedUpSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { _showSyncFailedDialog( context, message: localizations.translate( i18.syncDialog.upSyncFailedTitle, ), ); - }, - ); - }, - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - pendingSync: (count) { - final debouncer = Debouncer(seconds: 5); - - debouncer.run(() async { - if (count == 0) { - performBackgroundService( - isBackground: false, - stopService: true, - context: context, - ); - } else { - performBackgroundService( - isBackground: false, - stopService: false, - context: context, + } + }, + ); + }, + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + pendingSync: (count) { + return count == 0 + ? const Offstage() + : DigitInfoCard( + icon: Icons.info, + backgroundColor: + theme.colorScheme.tertiaryContainer, + iconColor: theme.colorScheme.surfaceTint, + description: localizations + .translate(i18.home.dataSyncInfoContent) + .replaceAll('{}', count.toString()), + title: localizations.translate( + i18.home.dataSyncInfoLabel, + ), ); - } - }); - - return count == 0 - ? const Offstage() - : DigitInfoCard( - icon: Icons.info, - backgroundColor: - theme.colorScheme.tertiaryContainer, - iconColor: theme.colorScheme.surfaceTint, - description: localizations - .translate(i18.home.dataSyncInfoContent) - .replaceAll('{}', count.toString()), - title: localizations - .translate(i18.home.dataSyncInfoLabel), - ); - }, - ); - }, - ), - ], - ), + }, + ); + }, + ), + ], ), ), ), @@ -299,6 +280,7 @@ class _HomePageState extends LocalizedState { ), action: (ctx) { Navigator.pop(ctx); + // Sync Failed Manual Sync is Enabled _attemptSyncUp(context); }, ), @@ -311,182 +293,232 @@ class _HomePageState extends LocalizedState { ); } - List _getItems(BuildContext context) { + _HomeItemDataModel? _getItems(BuildContext context) { final state = context.read().state; if (state is! AuthAuthenticatedState) { - return []; + return null; } - final homeItems = [ - HomeItemCard( - icon: Icons.menu_book, - label: i18.home.myCheckList, - onPressed: () => context.router.push(ChecklistWrapperRoute()), - ), - HomeItemCard( - icon: Icons.all_inbox, - label: i18.home.beneficiaryLabel, - onPressed: () async { - final searchBloc = context.read(); - await context.router.push( - SearchBeneficiaryRoute(), - ); - searchBloc.add(const SearchHouseholdsClearEvent()); - }, + final Map homeItemsMap = { + i18.home.beneficiaryLabel: + homeShowcaseData.distributorBeneficiaries.buildWith( + child: HomeItemCard( + icon: Icons.all_inbox, + label: i18.home.beneficiaryLabel, + onPressed: () async { + final searchBloc = context.read(); + await context.router.push( + SearchBeneficiaryRoute(), + ); + searchBloc.add(const SearchHouseholdsClearEvent()); + }, + ), ), - HomeItemCard( - icon: Icons.announcement, - label: i18.home.fileComplaint, - onPressed: () => - context.router.push(const ComplaintsInboxWrapperRoute()), + i18.home.manageStockLabel: + homeShowcaseData.warehouseManagerManageStock.buildWith( + child: HomeItemCard( + icon: Icons.store_mall_directory, + label: i18.home.manageStockLabel, + onPressed: () { + context.router.push(ManageStocksRoute()); + }, + ), ), - HomeItemCard( - icon: Icons.menu_book, - label: i18.home.stockReconciliationLabel, - onPressed: () => context.router.push(StockReconciliationRoute()), + i18.home.stockReconciliationLabel: + homeShowcaseData.wareHouseManagerStockReconciliation.buildWith( + child: HomeItemCard( + icon: Icons.menu_book, + label: i18.home.stockReconciliationLabel, + onPressed: () { + context.router.push(StockReconciliationRoute()); + }, + ), ), - HomeItemCard( - icon: Icons.store_mall_directory, - label: i18.home.manageStockLabel, - onPressed: () => context.router.push(ManageStocksRoute()), + i18.home.myCheckList: homeShowcaseData.supervisorMyChecklist.buildWith( + child: HomeItemCard( + enableCustomIcon: true, + customIcon: myChecklistSvg, + icon: Icons.checklist, + label: i18.home.myCheckList, + onPressed: () => context.router.push(ChecklistWrapperRoute()), + ), ), - HomeItemCard( - icon: Icons.sync_alt, - label: i18.home.syncDataLabel, - onPressed: () => _attemptSyncUp(context), + i18.home.fileComplaint: + homeShowcaseData.distributorFileComplaint.buildWith( + child: HomeItemCard( + icon: Icons.announcement, + label: i18.home.fileComplaint, + onPressed: () => + context.router.push(const ComplaintsInboxWrapperRoute()), + ), ), - HomeItemCard( - icon: Icons.call, - label: i18.home.callbackLabel, - onPressed: () => DigitActionDialog.show( - context, - widget: BlocBuilder( - builder: (context, state) { - if (state is! AppInitialized) { - return const Offstage(); - } - - final supportList = state.appConfiguration.callSupportOptions ?? - []; - - return ActionCard( - items: supportList - .map( - (e) => ActionCardModel( - action: () async { - if (!await launchUrl( - Uri( - scheme: 'tel', - path: e.code, - ), - mode: LaunchMode.externalApplication, - )) { - throw Exception('Could not launch $url'); - } - }, - icon: Icons.call, - label: e.name, + i18.home.syncDataLabel: homeShowcaseData.distributorSyncData.buildWith( + child: StreamBuilder?>( + stream: FlutterBackgroundService().on('serviceRunning'), + builder: (context, snapshot) { + return HomeItemCard( + icon: Icons.sync_alt, + label: i18.home.syncDataLabel, + onPressed: () async { + if (snapshot.data?['enablesManualSync'] == true) { + if (context.mounted) _attemptSyncUp(context); + } else { + if (context.mounted) { + DigitToast.show( + context, + options: DigitToastOptions( + localizations + .translate(i18.common.coreCommonSyncInProgress), + false, + Theme.of(context), ), - ) - .toList(), - ); - }, - ), + ); + } + } + }, + ); + }, ), ), - HomeItemCard( - icon: Icons.table_chart, - label: 'DB', - onPressed: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => DriftDbViewer( - context.read(), + i18.home.viewReportsLabel: homeShowcaseData.inventoryReport.buildWith( + child: HomeItemCard( + icon: Icons.announcement, + label: i18.home.viewReportsLabel, + onPressed: () { + context.router.push( + InventoryReportSelectionRoute(), + ); + }, + ), + ), + i18.home.db: homeShowcaseData.db.buildWith( + child: HomeItemCard( + icon: Icons.table_chart, + label: i18.home.db, + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => DriftDbViewer( + context.read(), + ), ), - ), - ); - }, + ); + }, + ), ), - HomeItemCard( - icon: Icons.delete_forever, - label: 'Delete all', - onPressed: () async { - final sql = context.read(); - final isar = context.read(); + }; - for (var element in sql.allTables) { - sql.delete(element).where((_) => const Constant(true)); - } + final Map homeItemsShowcaseMap = { + i18.home.beneficiaryLabel: + homeShowcaseData.distributorBeneficiaries.showcaseKey, + i18.home.manageStockLabel: + homeShowcaseData.warehouseManagerManageStock.showcaseKey, + i18.home.stockReconciliationLabel: + homeShowcaseData.wareHouseManagerStockReconciliation.showcaseKey, + i18.home.myCheckList: homeShowcaseData.supervisorMyChecklist.showcaseKey, + i18.home.fileComplaint: + homeShowcaseData.distributorFileComplaint.showcaseKey, + i18.home.syncDataLabel: homeShowcaseData.distributorSyncData.showcaseKey, + i18.home.viewReportsLabel: homeShowcaseData.inventoryReport.showcaseKey, + i18.home.db: homeShowcaseData.inventoryReport.showcaseKey, + }; - await isar.writeTxn(() async => await isar.opLogs.clear()); - }, - ), + final homeItemsLabel = [ + i18.home.beneficiaryLabel, + i18.home.manageStockLabel, + i18.home.stockReconciliationLabel, + i18.home.myCheckList, + i18.home.fileComplaint, + i18.home.syncDataLabel, + i18.home.viewReportsLabel, + i18.home.db, ]; - homeItems + final List filteredLabels = homeItemsLabel .where((element) => state.actionsWrapper.actions .map((e) => e.displayName) .toList() - .contains(element.label)) + .contains(element)) .toList(); - return homeItems; + final showcaseKeys = + filteredLabels.map((label) => homeItemsShowcaseMap[label]!).toList(); + + final List widgetList = + filteredLabels.map((label) => homeItemsMap[label]!).toList(); + + return _HomeItemDataModel( + widgetList, + showcaseKeys, + ); } - void _attemptSyncUp(BuildContext context) { - context.read().add( - SyncSyncUpEvent( - userId: context.loggedInUserUuid, - localRepositories: [ - context.read< - LocalRepository>(), - context.read< - LocalRepository>(), - context.read< - LocalRepository>(), - context.read< - LocalRepository>(), - context.read>(), - context - .read>(), - context.read< - LocalRepository>(), - context.read>(), - context.read>(), - context.read< - LocalRepository>(), - context.read< - LocalRepository>(), - ], - remoteRepositories: [ - context.read< - RemoteRepository>(), - context.read< - RemoteRepository>(), - context.read< - RemoteRepository>(), - context.read< - RemoteRepository>(), - context.read>(), - context - .read>(), - context.read< - RemoteRepository>(), - context.read>(), - context - .read>(), - context.read< - RemoteRepository>(), - context.read< - RemoteRepository>(), - ], - ), - ); + void _attemptSyncUp(BuildContext context) async { + await LocalSecureStore.instance.setManualSyncTrigger(true); + + if (context.mounted) { + context.read().add( + SyncSyncUpEvent( + userId: context.loggedInUserUuid, + localRepositories: [ + context.read< + LocalRepository>(), + context.read< + LocalRepository>(), + context.read< + LocalRepository>(), + context.read< + LocalRepository>(), + context.read>(), + context.read< + LocalRepository>(), + context.read< + LocalRepository>(), + context.read>(), + context + .read>(), + context.read< + LocalRepository>(), + context.read< + LocalRepository>(), + ], + remoteRepositories: [ + context.read< + RemoteRepository>(), + context.read< + RemoteRepository>(), + context.read< + RemoteRepository>(), + context.read< + RemoteRepository>(), + context.read>(), + context.read< + RemoteRepository>(), + context.read< + RemoteRepository>(), + context.read>(), + context + .read>(), + context.read< + RemoteRepository>(), + context.read< + RemoteRepository>(), + ], + ), + ); + } } } + +class _HomeItemDataModel { + final List homeItems; + final List showcaseKeys; + + const _HomeItemDataModel(this.homeItems, this.showcaseKeys); +} diff --git a/apps/health_campaign_field_worker_app/lib/pages/inventory/facility_selection.dart b/apps/health_campaign_field_worker_app/lib/pages/inventory/facility_selection.dart index cae0b28d5..b01c1dde8 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/inventory/facility_selection.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/inventory/facility_selection.dart @@ -23,11 +23,17 @@ class FacilitySelectionPage extends StatelessWidget { @override Widget build(BuildContext context) { AppLocalizations localizations = AppLocalizations.of(context); + final theme = Theme.of(context); + final BorderSide borderSide = BorderSide( + color: theme.colorScheme.outline, + width: 1.0, + ); return ReactiveFormBuilder( form: _form, builder: (context, form, child) { return Scaffold( + backgroundColor: Colors.white, body: ReactiveFormConsumer( builder: (context, form, _) { final filteredFacilities = facilities.where((element) { @@ -41,15 +47,46 @@ class FacilitySelectionPage extends StatelessWidget { }); return ScrollableContent( - header: const BackNavigationHelpHeaderWidget(), + backgroundColor: Colors.white, + header: const BackNavigationHelpHeaderWidget( + showHelp: false, + ), slivers: [ SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.all(16), - child: DigitTextFormField( - label: localizations - .translate(i18.common.facilitySearchHeaderLabel), - formControlName: _facilityName, + child: Container( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.only( + left: kPadding * 2, + right: kPadding * 2, + ), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(kPadding), + child: Align( + alignment: Alignment.topLeft, + child: Text( + localizations.translate( + i18.common.facilitySearchHeaderLabel, + ), + style: theme.textTheme.displayMedium, + textAlign: TextAlign.left, + ), + ), + ), + DigitTextFormField( + suffix: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + label: localizations.translate( + i18.common.facilitySearchHeaderLabel, + ), + formControlName: _facilityName, + ), + ], + ), ), ), ), @@ -58,13 +95,53 @@ class FacilitySelectionPage extends StatelessWidget { (context, index) { final facility = filteredFacilities.elementAt(index); - return InkWell( - onTap: () { - context.router.pop(facility); - }, - child: Padding( - padding: const EdgeInsets.all(16), - child: Text(facility.id), + return Container( + color: Colors.white, + padding: const EdgeInsets.only(left: 8, right: 8), + child: Container( + margin: const EdgeInsets.only(left: 8, right: 8), + decoration: BoxDecoration( + color: DigitTheme.instance.colors.alabasterWhite, + border: Border( + top: index == 0 ? borderSide : BorderSide.none, + bottom: index == filteredFacilities.length - 1 + ? borderSide + : BorderSide.none, + left: borderSide, + right: borderSide, + ), + ), + child: InkWell( + onTap: () { + context.router.pop(facility); + }, + child: Container( + margin: const EdgeInsets.only( + top: kPadding, + left: kPadding, + right: kPadding, + ), + decoration: BoxDecoration( + color: + DigitTheme.instance.colors.alabasterWhite, + border: Border( + bottom: BorderSide( + // <--- left side + color: theme.colorScheme.outline, + width: 1.0, + ), + ), + ), + child: Padding( + padding: const EdgeInsets.only( + left: kPadding * 2, + bottom: kPadding * 2, + top: kPadding * 2, + ), + child: Text(facility.id), + ), + ), + ), ), ); }, diff --git a/apps/health_campaign_field_worker_app/lib/pages/inventory/manage_stocks.dart b/apps/health_campaign_field_worker_app/lib/pages/inventory/manage_stocks.dart index 013aed4b0..6ce0891d0 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/inventory/manage_stocks.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/inventory/manage_stocks.dart @@ -33,7 +33,7 @@ class _ManageStocksPageState extends LocalizedState { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: const EdgeInsets.all(8), + padding: const EdgeInsets.fromLTRB(kPadding*2, kPadding, kPadding*2, kPadding), child: Align( alignment: Alignment.topLeft, child: Text( @@ -45,73 +45,73 @@ class _ManageStocksPageState extends LocalizedState { ), Column(children: [ DigitListView( - title: localizations - .translate(i18.manageStock.recordStockReceiptLabel), - description: localizations - .translate(i18.manageStock.recordStockReceiptDescription), - prefixIcon: Icons.file_download_outlined, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.receipt, + title: localizations + .translate(i18.manageStock.recordStockReceiptLabel), + description: localizations.translate( + i18.manageStock.recordStockReceiptDescription), + prefixIcon: Icons.file_download_outlined, + sufixIcon: Icons.arrow_circle_right, + onPressed: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.receipt, + ), ), ), - ), DigitListView( - title: localizations - .translate(i18.manageStock.recordStockIssuedLabel), - description: localizations - .translate(i18.manageStock.recordStockIssuedDescription), - prefixIcon: Icons.file_upload_outlined, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.dispatch, + title: localizations + .translate(i18.manageStock.recordStockIssuedLabel), + description: localizations.translate( + i18.manageStock.recordStockIssuedDescription), + prefixIcon: Icons.file_upload_outlined, + sufixIcon: Icons.arrow_circle_right, + onPressed: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.dispatch, + ), ), ), - ), DigitListView( - title: localizations - .translate(i18.manageStock.recordStockReturnedLabel), - description: localizations.translate( - i18.manageStock.recordStockReturnedDescription, - ), - prefixIcon: Icons.settings_backup_restore, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.returned, + title: localizations + .translate(i18.manageStock.recordStockReturnedLabel), + description: localizations.translate( + i18.manageStock.recordStockReturnedDescription, + ), + prefixIcon: Icons.settings_backup_restore, + sufixIcon: Icons.arrow_circle_right, + onPressed: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.returned, + ), ), ), - ), DigitListView( - title: localizations - .translate(i18.manageStock.recordStockDamagedLabel), - description: localizations.translate( - i18.manageStock.recordStockDamagedDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.damaged, + title: localizations + .translate(i18.manageStock.recordStockDamagedLabel), + description: localizations.translate( + i18.manageStock.recordStockDamagedDescription, + ), + prefixIcon: Icons.store, + sufixIcon: Icons.arrow_circle_right, + onPressed: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.damaged, + ), ), ), - ), DigitListView( - title: localizations - .translate(i18.manageStock.recordStockLossLabel), - description: localizations.translate( - i18.manageStock.recordStockDamagedDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - RecordStockWrapperRoute( - type: StockRecordEntryType.loss, + title: localizations + .translate(i18.manageStock.recordStockLossLabel), + description: localizations.translate( + i18.manageStock.recordStockDamagedDescription, + ), + prefixIcon: Icons.store, + sufixIcon: Icons.arrow_circle_right, + onPressed: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.loss, + ), ), ), - ), ]), const SizedBox(height: 16), ], diff --git a/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/stock_details.dart b/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/stock_details.dart index b01c40aad..bba066ea0 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/stock_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/stock_details.dart @@ -42,8 +42,8 @@ class _StockDetailsPageState extends LocalizedState { FormGroup _form() { return fb.group({ _productVariantKey: FormControl( - validators: [Validators.required], - ), + // validators: [Validators.required], + ), _transactingPartyKey: FormControl( validators: [Validators.required], ), @@ -146,18 +146,21 @@ class _StockDetailsPageState extends LocalizedState { form: _form, builder: (context, form, child) { return ScrollableContent( + enableFixedButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), footer: SizedBox( - height: 85, child: DigitCard( - margin: - const EdgeInsets.only(left: 0, right: 0, top: 10), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: + const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: ReactiveFormConsumer( builder: (context, form, child) => DigitElevatedButton( - onPressed: !form.valid + onPressed: !form.valid || + (form.control(_productVariantKey).value == + null) ? null : () async { form.markAllAsTouched(); @@ -372,23 +375,26 @@ class _StockDetailsPageState extends LocalizedState { return state.maybeWhen( orElse: () => const Offstage(), fetched: (productVariants) { - return DigitReactiveDropdown< + return DigitReactiveSearchDropdown< ProductVariantModel>( - formControlName: _productVariantKey, label: localizations.translate( module.selectProductLabel, ), + form: form, + menuItems: productVariants, isRequired: true, + formControlName: _productVariantKey, valueMapper: (value) { return localizations.translate( value.sku ?? value.id, ); }, - menuItems: productVariants, - validationMessages: { - 'required': (object) => - '${module.selectProductLabel}_IS_REQUIRED', - }, + validationMessage: + localizations.translate( + i18.common.corecommonRequired, + ), + emptyText: localizations + .translate(i18.common.noMatchFound), ); }, ); @@ -398,14 +404,19 @@ class _StockDetailsPageState extends LocalizedState { StockRecordEntryType.loss, StockRecordEntryType.damaged, ].contains(entryType)) - DigitReactiveDropdown( + DigitReactiveSearchDropdown( label: localizations.translate( transactionReasonLabel ?? 'Reason', ), + form: form, menuItems: reasons ?? [], formControlName: _transactionReasonKey, valueMapper: (value) => value.name.titleCase, - isRequired: true, + validationMessage: localizations.translate( + i18.common.corecommonRequired, + ), + emptyText: localizations + .translate(i18.common.noMatchFound), ), BlocBuilder( builder: (context, state) { @@ -414,20 +425,7 @@ class _StockDetailsPageState extends LocalizedState { ) ?? []; - return DigitTextFormField( - valueAccessor: FacilityValueAccessor( - facilities, - ), - label: localizations.translate( - '${pageTitle}_${i18.stockReconciliationDetails.stockLabel}', - ), - isRequired: true, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: _transactingPartyKey, - readOnly: false, + return InkWell( onTap: () async { final parent = context.router.parent() as StackRouter; @@ -442,15 +440,44 @@ class _StockDetailsPageState extends LocalizedState { form.control(_transactingPartyKey).value = facility; }, + child: IgnorePointer( + child: DigitTextFormField( + valueAccessor: FacilityValueAccessor( + facilities, + ), + label: localizations.translate( + '${pageTitle}_${i18.stockReconciliationDetails.stockLabel}', + ), + isRequired: true, + suffix: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + formControlName: _transactingPartyKey, + readOnly: false, + onTap: () async { + final parent = context.router.parent() + as StackRouter; + final facility = + await parent.push( + FacilitySelectionRoute( + facilities: facilities, + ), + ); + + if (facility == null) return; + form + .control(_transactingPartyKey) + .value = facility; + }, + ), + ), ); }, ), DigitTextFormField( formControlName: _transactionQuantityKey, - keyboardType: - const TextInputType.numberWithOptions( - decimal: true, - ), + keyboardType: TextInputType.number, isRequired: true, validationMessages: { "number": (object) => localizations.translate( @@ -474,6 +501,7 @@ class _StockDetailsPageState extends LocalizedState { formControlName: _waybillNumberKey, ), DigitTextFormField( + keyboardType: TextInputType.number, label: localizations.translate( i18.stockDetails .quantityOfProductIndicatedOnWaybillLabel, @@ -494,25 +522,23 @@ class _StockDetailsPageState extends LocalizedState { appConfiguration.transportTypes ?? []; - return DigitReactiveDropdown( - isRequired: false, + return DigitReactiveSearchDropdown( label: localizations.translate( i18.stockDetails.transportTypeLabel, ), - valueMapper: (e) => e, - onChanged: (value) { - setState(() { - form.control(_typeOfTransportKey); - }); - }, - initialValue: - transportTypeOptions.firstOrNull?.name, + form: form, menuItems: transportTypeOptions.map( (e) { return localizations.translate(e.name); }, ).toList(), formControlName: _typeOfTransportKey, + valueMapper: (value) => value, + validationMessage: localizations.translate( + i18.common.corecommonRequired, + ), + emptyText: localizations + .translate(i18.common.noMatchFound), ); }, ), @@ -527,7 +553,7 @@ class _StockDetailsPageState extends LocalizedState { label: localizations.translate( i18.stockDetails.commentsLabel, ), - minLines: 2, + minLines: 3, maxLines: 3, formControlName: _commentsKey, ), diff --git a/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/warehouse_details.dart b/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/warehouse_details.dart index c4d352cbe..413edae44 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/warehouse_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/inventory/record_stock/warehouse_details.dart @@ -77,13 +77,10 @@ class _WarehouseDetailsPageState extends LocalizedState { BackNavigationHelpHeaderWidget(), ]), footer: SizedBox( - height: 85, child: DigitCard( - margin: const EdgeInsets.only( - left: 0, - right: 0, - top: 10, - ), + margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB( + kPadding, 0, kPadding, 0), child: ReactiveFormConsumer( builder: (context, form, child) { return DigitElevatedButton( @@ -160,21 +157,9 @@ class _WarehouseDetailsPageState extends LocalizedState { ), ), ]), - DigitTextFormField( - valueAccessor: FacilityValueAccessor( - facilities, - ), - isRequired: true, - label: localizations.translate( - i18.stockReconciliationDetails.facilityLabel, - ), - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: _warehouseKey, - readOnly: false, + InkWell( onTap: () async { + print("----PROX---"); final parent = context.router.parent() as StackRouter; final facility = @@ -187,6 +172,41 @@ class _WarehouseDetailsPageState extends LocalizedState { if (facility == null) return; form.control(_warehouseKey).value = facility; }, + child: IgnorePointer( + child: DigitTextFormField( + hideKeyboard: true, + padding: + const EdgeInsets.only(bottom: kPadding), + valueAccessor: FacilityValueAccessor( + facilities, + ), + isRequired: true, + label: localizations.translate( + i18.stockReconciliationDetails + .facilityLabel, + ), + suffix: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + formControlName: _warehouseKey, + readOnly: true, + onTap: () async { + final parent = context.router.parent() + as StackRouter; + final facility = + await parent.push( + FacilitySelectionRoute( + facilities: facilities, + ), + ); + + if (facility == null) return; + form.control(_warehouseKey).value = + facility; + }, + ), + ), ), ], ), diff --git a/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_details.dart b/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_details.dart index 1aacd6dd9..a0bcf4b10 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_details.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_details.dart @@ -56,7 +56,6 @@ class _InventoryReportDetailsPageState static const _productVariantKey = 'productVariant'; static const _facilityKey = 'facilityKey'; - void handleSelection(FormGroup form) { final event = widget.reportType == InventoryReportType.reconciliation ? InventoryReportLoadStockReconciliationDataEvent( @@ -95,9 +94,7 @@ class _InventoryReportDetailsPageState _facilityKey: FormControl( validators: [Validators.required], ), - _productVariantKey: FormControl( - validators: [Validators.required], - ), + _productVariantKey: FormControl(), }); } @@ -131,11 +128,14 @@ class _InventoryReportDetailsPageState children: [ const BackNavigationHelpHeaderWidget(), Container( - padding: const EdgeInsets.all(8), - child: Text( - title, - maxLines: 1, - style: Theme.of(context).textTheme.displayMedium, + padding: const EdgeInsets.all(kPadding), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + title, + maxLines: 1, + style: Theme.of(context).textTheme.displayMedium, + ), ), ), ReactiveFormBuilder( @@ -200,7 +200,7 @@ class _InventoryReportDetailsPageState child: Icon(Icons.search), ), formControlName: _facilityKey, - readOnly: true, + readOnly: false, isRequired: true, onTap: () async { final stockReconciliationBloc = @@ -236,33 +236,36 @@ class _InventoryReportDetailsPageState return state.maybeWhen( orElse: () => const Offstage(), fetched: (productVariants) { - return DigitReactiveDropdown< + return DigitReactiveSearchDropdown< ProductVariantModel>( - formControlName: - _productVariantKey, label: localizations.translate( i18.stockReconciliationDetails .productLabel, ), + form: form, + menuItems: productVariants, + formControlName: + _productVariantKey, isRequired: true, - onChanged: (value) { - handleSelection(form); - }, valueMapper: (value) { return localizations .translate( value.sku ?? value.id, ); }, - menuItems: productVariants, - validationMessages: { - 'required': (object) => - localizations.translate( - i18.stockReconciliationDetails - .fieldRequired, - ), + onSelected: (value) { + handleSelection(form); }, + validationMessage: + localizations.translate( + i18.common + .corecommonRequired, + ), + emptyText: + localizations.translate( + i18.common.noMatchFound, + ), ); }, ); @@ -674,7 +677,7 @@ class _ReportDetailsContent extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.all(kPadding * 2), + padding: const EdgeInsets.all(kPadding), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, diff --git a/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_selection.dart b/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_selection.dart index 226497e34..a2dbf5fc1 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_selection.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/inventory/reports/report_selection.dart @@ -35,7 +35,7 @@ class _InventoryReportSelectionPageState mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: const EdgeInsets.all(8), + padding: const EdgeInsets.fromLTRB(kPadding*2, kPadding, kPadding*2, kPadding), child: Align( alignment: Alignment.topLeft, child: Text( diff --git a/apps/health_campaign_field_worker_app/lib/pages/inventory/stock_reconciliation/stock_reconciliation.dart b/apps/health_campaign_field_worker_app/lib/pages/inventory/stock_reconciliation/stock_reconciliation.dart index 6f37a8f62..ebcc29029 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/inventory/stock_reconciliation/stock_reconciliation.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/inventory/stock_reconciliation/stock_reconciliation.dart @@ -45,9 +45,7 @@ class _StockReconciliationPageState _facilityKey: FormControl( validators: [Validators.required], ), - _productVariantKey: FormControl( - validators: [Validators.required], - ), + _productVariantKey: FormControl(), _manualCountKey: FormControl( value: '0', validators: [ @@ -116,21 +114,24 @@ class _StockReconciliationPageState builder: (ctx, form, child) { return Scaffold( body: ScrollableContent( + enableFixedButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), footer: SizedBox( - height: 85, child: DigitCard( - margin: const EdgeInsets.only( - left: 0, - right: 0, - top: 10, - ), + margin: const EdgeInsets.fromLTRB( + 0, kPadding, 0, 0), + padding: const EdgeInsets.fromLTRB( + kPadding, 0, kPadding, 0), child: ReactiveFormConsumer( builder: (ctx, form, child) => DigitElevatedButton( - onPressed: !form.valid + onPressed: !form.valid || + (form + .control(_productVariantKey) + .value == + null) ? null : () async { form.markAllAsTouched(); @@ -288,22 +289,9 @@ class _StockReconciliationPageState ) ?? []; - return DigitTextFormField( - valueAccessor: FacilityValueAccessor( - facilities, - ), - label: localizations.translate( - i18.stockReconciliationDetails - .facilityLabel, - ), - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: _facilityKey, - readOnly: false, - isRequired: true, + return InkWell( onTap: () async { + print("----PROX---"); final stockReconciliationBloc = context.read< StockReconciliationBloc>(); @@ -325,6 +313,49 @@ class _StockReconciliationPageState ), ); }, + child: IgnorePointer( + child: DigitTextFormField( + hideKeyboard: true, + valueAccessor: + FacilityValueAccessor( + facilities, + ), + label: localizations.translate( + i18.stockReconciliationDetails + .facilityLabel, + ), + suffix: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.search), + ), + formControlName: _facilityKey, + readOnly: true, + isRequired: true, + onTap: () async { + final stockReconciliationBloc = + context.read< + StockReconciliationBloc>(); + + final facility = await context + .router + .push( + FacilitySelectionRoute( + facilities: facilities, + ), + ); + + if (facility == null) return; + form + .control(_facilityKey) + .value = facility; + stockReconciliationBloc.add( + StockReconciliationSelectFacilityEvent( + facility, + ), + ); + }, + ), + ), ); }, ), @@ -334,16 +365,23 @@ class _StockReconciliationPageState return state.maybeWhen( orElse: () => const Offstage(), fetched: (productVariants) { - return DigitReactiveDropdown< + return DigitReactiveSearchDropdown< ProductVariantModel>( - formControlName: - _productVariantKey, label: localizations.translate( i18.stockReconciliationDetails .productLabel, ), + form: form, + menuItems: productVariants, + formControlName: + _productVariantKey, isRequired: true, - onChanged: (value) { + valueMapper: (value) { + return localizations.translate( + value.sku ?? value.id, + ); + }, + onSelected: (value) { ctx .read< StockReconciliationBloc>() @@ -353,20 +391,13 @@ class _StockReconciliationPageState ), ); }, - valueMapper: (value) { - return localizations.translate( - value.sku ?? value.id, - ); - }, - menuItems: productVariants, - validationMessages: { - 'required': (object) => - AppLocalizations.of( - context, - ).translate(i18 - .stockReconciliationDetails - .fieldRequired), - }, + validationMessage: + localizations.translate(i18 + .common + .corecommonRequired), + emptyText: + localizations.translate( + i18.common.noMatchFound), ); }, ); @@ -471,7 +502,13 @@ class _StockReconciliationPageState .infoCardTitle, ), ), + const SizedBox( + height: kPadding * 2, + ), const DigitDivider(), + const SizedBox( + height: kPadding, + ), DigitTextFormField( isRequired: true, label: localizations.translate( @@ -503,6 +540,8 @@ class _StockReconciliationPageState i18.stockReconciliationDetails .commentsLabel, ), + maxLines: 3, + minLines: 3, formControlName: _reconciliationCommentsKey, ), 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 28aa3e48f..c55c1ce07 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/login.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/login.dart @@ -31,7 +31,7 @@ class _LoginPageState extends LocalizedState { Widget buildPasswordVisibility() { return IconButton( icon: Icon( - passwordVisible ? Icons.visibility : Icons.visibility_off, + passwordVisible ? Icons.visibility_off : Icons.visibility, ), onPressed: () { setState(() { @@ -146,6 +146,9 @@ class _LoginPageState extends LocalizedState { ); }, ), + const SizedBox( + height: 16, + ), TextButton( onPressed: () => DigitDialog.show( context, @@ -166,6 +169,11 @@ class _LoginPageState extends LocalizedState { ), ), ), + style: TextButton.styleFrom( + padding: EdgeInsets.zero, + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + minimumSize: const Size(0, 0), + ), child: Center( child: Text( localizations.translate( diff --git a/apps/health_campaign_field_worker_app/lib/pages/qr_scanner.dart b/apps/health_campaign_field_worker_app/lib/pages/qr_scanner.dart index 15e273cac..cb9d7202f 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/qr_scanner.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/qr_scanner.dart @@ -1,19 +1,17 @@ +import 'package:audioplayers/audioplayers.dart'; import 'package:digit_components/digit_components.dart'; import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:gs1_barcode_parser/gs1_barcode_parser.dart'; import 'package:qr_code_scanner/qr_code_scanner.dart'; + import '../../router/app_router.dart'; +import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; -import 'package:audioplayers/audioplayers.dart'; - -import 'package:gs1_barcode_parser/gs1_barcode_parser.dart'; import '../../widgets/localized.dart'; -import '../../utils/i18_key_constants.dart' as i18; -import '../blocs/beneficiary_registration/beneficiary_registration.dart'; import '../blocs/scanner/scanner.dart'; import '../blocs/search_households/search_households.dart'; -import '../models/entities/scanner_type.dart'; class QRScannerPage extends LocalizedStatefulWidget { final bool sinlgleValue; @@ -115,13 +113,13 @@ class _QRScannerPageState extends LocalizedState { ), // [TODO : Need move to constants] Positioned( - top: kPadding * 8, - left: MediaQuery.of(context).size.width / 3, + top: MediaQuery.of(context).size.width / 5, + left: MediaQuery.of(context).size.width / 2.6, width: 250, height: 250, child: SizedBox( - width: 150, - height: 150, + width: MediaQuery.of(context).size.width / 3, + height: MediaQuery.of(context).size.height / 3, // [TODO: Localization need to be added] child: Text( localizations.translate( @@ -129,55 +127,58 @@ class _QRScannerPageState extends LocalizedState { ), style: const TextStyle( color: Colors.white, - fontSize: 20, + fontSize: 16, ), ), ), ), Positioned( top: MediaQuery.of(context).size.height / 2.4, - left: MediaQuery.of(context).size.width / 4.5, + left: MediaQuery.of(context).size.width / 4, width: 250, height: 250, child: SizedBox( width: 150, - height: 150, - // [TODO: Localization need to be added] - child: Text( - localizations.translate( - i18.deliverIntervention.manualScan, - ), - style: const TextStyle( - color: Colors.white, - fontSize: 20, + height: 50, + child: Padding( + padding: const EdgeInsets.only(top: kPadding), + child: Text( + localizations.translate( + i18.deliverIntervention.manualScan, + ), + style: const TextStyle( + color: Colors.white, + fontSize: 20, + ), ), ), ), ), Positioned( - top: MediaQuery.of(context).size.height / 2.2, + top: MediaQuery.of(context).size.height / 2.0, left: MediaQuery.of(context).size.width / 6, width: 250, height: 50, child: SizedBox( width: 150, height: 50, - // [TODO: Localization need to be added] - child: TextButton( onPressed: () { setState(() { manualcode = true; }); }, - child: Text( - localizations.translate( - i18.deliverIntervention.manualEnterCode, - ), - style: TextStyle( - color: theme.colorScheme.secondary, - fontSize: 20, - decoration: TextDecoration.underline, + child: Padding( + padding: const EdgeInsets.only(top: kPadding), + child: Text( + localizations.translate( + i18.deliverIntervention.manualEnterCode, + ), + style: TextStyle( + color: theme.colorScheme.secondary, + fontSize: 20, + decoration: TextDecoration.underline, + ), ), ), ), @@ -187,8 +188,10 @@ class _QRScannerPageState extends LocalizedState { Positioned( bottom: 0, width: MediaQuery.of(context).size.width, - height: kPadding * 12, child: DigitCard( + margin: const EdgeInsets.only(top: kPadding), + padding: + const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: DigitElevatedButton( child: Text(localizations .translate(i18.common.coreCommonSubmit)), @@ -216,26 +219,21 @@ class _QRScannerPageState extends LocalizedState { ), Positioned( - bottom: (kPadding * 8), + bottom: (kPadding * 7.5), height: widget.isGS1code ? state.barcodes.length < 10 ? (state.barcodes.length * 60) + 80 - : MediaQuery.of(context).size.height / 2 + : MediaQuery.of(context).size.height / 2.2 : state.qrcodes.length < 10 ? (state.qrcodes.length * 60) + 80 : MediaQuery.of(context).size.height / 2, width: MediaQuery.of(context).size.width, child: Container( - margin: const EdgeInsets.all(kPadding), width: 100, height: 120, - decoration: BoxDecoration( + decoration: const BoxDecoration( color: Colors.white, - border: Border.all( - color: DigitTheme.instance.colorScheme.outline, - width: 1, - ), - borderRadius: const BorderRadius.only( + borderRadius: BorderRadius.only( topLeft: Radius.circular(12.0), topRight: Radius.circular(12.0), ), @@ -248,14 +246,14 @@ class _QRScannerPageState extends LocalizedState { decoration: const BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( - topLeft: Radius.circular(12.0), - topRight: Radius.circular(12.0), + topLeft: Radius.circular(kPadding * 2), + topRight: Radius.circular(kPadding * 2), ), ), padding: const EdgeInsets.only( bottom: kPadding * 2, top: kPadding * 2, - left: kPadding * 2, + left: kPadding * 3, ), width: MediaQuery.of(context).size.width, child: widget.isGS1code @@ -277,6 +275,10 @@ class _QRScannerPageState extends LocalizedState { return ListTile( shape: const Border(), title: Container( + margin: const EdgeInsets.only( + left: kPadding, + right: kPadding, + ), height: kPadding * 6, decoration: BoxDecoration( color: DigitTheme @@ -315,7 +317,8 @@ class _QRScannerPageState extends LocalizedState { ), Container( padding: const EdgeInsets.only( - bottom: kPadding, + bottom: kPadding * 2, + left: kPadding, ), child: IconButton( icon: const Icon( @@ -374,6 +377,7 @@ class _QRScannerPageState extends LocalizedState { ) : DigitCard( child: ScrollableContent( + backgroundColor: Colors.white, header: GestureDetector( onTap: () { setState(() { @@ -419,21 +423,24 @@ class _QRScannerPageState extends LocalizedState { }, ), children: [ - Container( - padding: const EdgeInsets.all(kPadding), - child: Align( - alignment: Alignment.topLeft, - child: Text( - localizations.translate( - i18.deliverIntervention.manualEnterCode, - ), - style: theme.textTheme.headlineLarge, + Align( + alignment: Alignment.topLeft, + child: Text( + localizations.translate( + i18.deliverIntervention.manualEnterCode, ), + style: theme.textTheme.headlineLarge, ), ), + const SizedBox( + height: kPadding * 2, + ), Text(localizations.translate( i18.deliverIntervention.manualCodeDescription, )), + const SizedBox( + height: kPadding * 2, + ), DigitTextField( label: localizations.translate( i18.deliverIntervention.resourceCode, diff --git a/apps/health_campaign_field_worker_app/lib/pages/reason_for_deletion.dart b/apps/health_campaign_field_worker_app/lib/pages/reason_for_deletion.dart index 560ba7a5f..17b6eac32 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/reason_for_deletion.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/reason_for_deletion.dart @@ -114,7 +114,7 @@ class _ReasonForDeletionPageState return Column( children: [ Align( - alignment: Alignment.centerLeft, + alignment: Alignment.topLeft, child: Text( localizations.translate( i18.reasonForDeletion.reasonForDeletionLabel, diff --git a/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart b/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart index bdf830640..531d39113 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/reports/beneficiary/beneficaries_report.dart @@ -59,9 +59,9 @@ class BeneficiariesReportState extends LocalizedState { orElse: () => const Offstage(), initialized: (appConfiguration, _) => ScrollableContent( footer: SizedBox( - height: 100, child: DigitCard( - margin: const EdgeInsets.all(kPadding), + margin: const EdgeInsets.only(top: kPadding), + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), child: DigitElevatedButton( onPressed: () { context.router.replace(HomeRoute()); diff --git a/apps/health_campaign_field_worker_app/lib/pages/search_beneficiary.dart b/apps/health_campaign_field_worker_app/lib/pages/search_beneficiary.dart index 2fe339c2b..99549fdb6 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/search_beneficiary.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/search_beneficiary.dart @@ -2,7 +2,6 @@ import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; -import 'package:location/location.dart'; import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/beneficiary_registration/beneficiary_registration.dart'; @@ -59,145 +58,152 @@ class _SearchBeneficiaryPageState ]), slivers: [ SliverToBoxAdapter( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.all(8), - child: Align( - alignment: Alignment.topLeft, - child: Text( - localizations.translate( - context.beneficiaryType != - BeneficiaryType.individual - ? i18 - .searchBeneficiary.statisticsLabelText - : i18.searchBeneficiary - .searchIndividualLabelText, + child: Padding( + padding: const EdgeInsets.all(kPadding), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(kPadding), + child: Align( + alignment: Alignment.topLeft, + child: Text( + localizations.translate( + context.beneficiaryType != + BeneficiaryType.individual + ? i18.searchBeneficiary + .statisticsLabelText + : i18.searchBeneficiary + .searchIndividualLabelText, + ), + style: theme.textTheme.displayMedium, + textAlign: TextAlign.left, ), - style: theme.textTheme.displayMedium, - textAlign: TextAlign.center, ), ), - ), - BlocBuilder( - builder: (context, locationState) { - return Column( - children: [ - DigitSearchBar( - controller: searchController, - hintText: localizations.translate( - i18.searchBeneficiary - .beneficiarySearchHintText, - ), - textCapitalization: - TextCapitalization.words, - onChanged: (value) { - final bloc = - context.read(); + BlocBuilder( + builder: (context, locationState) { + return Column( + children: [ + DigitSearchBar( + controller: searchController, + hintText: localizations.translate( + i18.searchBeneficiary + .beneficiarySearchHintText, + ), + textCapitalization: + TextCapitalization.words, + onChanged: (value) { + final bloc = context + .read(); - if (value.trim().length < 2 && - !isProximityEnabled) { - bloc.add( - const SearchHouseholdsClearEvent(), - ); + if (value.trim().length < 2 && + !isProximityEnabled) { + bloc.add( + const SearchHouseholdsClearEvent(), + ); - return; - } else { - if (isProximityEnabled && - value.trim().length < 2) { - bloc.add(SearchHouseholdsEvent - .searchByProximity( - latitude: locationState.latitude!, - longititude: - locationState.longitude!, - projectId: context.projectId, - maxRadius: appConfig.maxRadius!, - )); + return; } else { - bloc.add( - SearchHouseholdsSearchByHouseholdHeadEvent( - searchText: value.trim(), + if (isProximityEnabled && + value.trim().length < 2) { + bloc.add(SearchHouseholdsEvent + .searchByProximity( + latitude: locationState.latitude!, + longititude: + locationState.longitude!, projectId: context.projectId, - latitude: locationState.latitude, - longitude: - locationState.longitude, - isProximityEnabled: - isProximityEnabled, - maxRadius: appConfig.maxRadius, - ), - ); + maxRadius: appConfig.maxRadius!, + )); + } else { + bloc.add( + SearchHouseholdsSearchByHouseholdHeadEvent( + searchText: value.trim(), + projectId: context.projectId, + latitude: + locationState.latitude, + longitude: + locationState.longitude, + isProximityEnabled: + isProximityEnabled, + maxRadius: appConfig.maxRadius, + ), + ); + } } - } - }, - ), - locationState.latitude != null - ? Row( - children: [ - Switch( - value: isProximityEnabled, - onChanged: (value) { - searchController.clear(); - setState(() { - isProximityEnabled = value; - }); + }, + ), + locationState.latitude != null + ? Row( + children: [ + Switch( + value: isProximityEnabled, + onChanged: (value) { + searchController.clear(); + setState(() { + isProximityEnabled = value; + }); - if (locationState - .hasPermissions && - value && - locationState.latitude != - null && - locationState.longitude != - null && - appConfig.maxRadius != - null && - isProximityEnabled) { - final bloc = context.read< - SearchHouseholdsBloc>(); - bloc.add(SearchHouseholdsEvent - .searchByProximity( - latitude: - locationState.latitude!, - longititude: locationState - .longitude!, - projectId: - context.projectId, - maxRadius: - appConfig.maxRadius!, - )); - } else { - final bloc = context.read< - SearchHouseholdsBloc>(); - bloc.add( - const SearchHouseholdsClearEvent(), - ); - } - }, - ), - Text( - localizations.translate( - i18.searchBeneficiary - .proximityLabel, + if (locationState + .hasPermissions && + value && + locationState.latitude != + null && + locationState.longitude != + null && + appConfig.maxRadius != + null && + isProximityEnabled) { + final bloc = context.read< + SearchHouseholdsBloc>(); + bloc.add( + SearchHouseholdsEvent + .searchByProximity( + latitude: locationState + .latitude!, + longititude: + locationState + .longitude!, + projectId: + context.projectId, + maxRadius: appConfig + .maxRadius!, + ), + ); + } else { + final bloc = context.read< + SearchHouseholdsBloc>(); + bloc.add( + const SearchHouseholdsClearEvent(), + ); + } + }, ), - ), - ], - ) - : const Offstage(), - ], - ); - }, - ), - const SizedBox(height: 16), - if (searchState.resultsNotFound) - DigitInfoCard( - description: localizations.translate( - i18.searchBeneficiary - .beneficiaryInfoDescription, - ), - title: localizations.translate( - i18.searchBeneficiary.beneficiaryInfoTitle, - ), + Text( + localizations.translate( + i18.searchBeneficiary + .proximityLabel, + ), + ), + ], + ) + : const Offstage(), + ], + ); + }, ), - ], + const SizedBox(height: 16), + if (searchState.resultsNotFound) + DigitInfoCard( + description: localizations.translate( + i18.searchBeneficiary + .beneficiaryInfoDescription, + ), + title: localizations.translate( + i18.searchBeneficiary.beneficiaryInfoTitle, + ), + ), + ], + ), ), ), if (searchState.loading) @@ -224,34 +230,37 @@ class _SearchBeneficiaryPageState ), ); - return ViewBeneficiaryCard( - distance: distance, - householdMember: i, - onOpenPressed: () async { - final scannerbloc = - context.read(); + return Container( + margin: const EdgeInsets.only(bottom: kPadding), + child: ViewBeneficiaryCard( + distance: distance, + householdMember: i, + onOpenPressed: () async { + final scannerbloc = + context.read(); - scannerbloc.add( - const ScannerEvent.handleScanner([], []), - ); + scannerbloc.add( + const ScannerEvent.handleScanner([], []), + ); - final bloc = - context.read(); + final bloc = + context.read(); - await context.router.push( - BeneficiaryWrapperRoute( - wrapper: i, - ), - ); - setState(() { - isProximityEnabled = false; - }); - searchController.clear(); + await context.router.push( + BeneficiaryWrapperRoute( + wrapper: i, + ), + ); + setState(() { + isProximityEnabled = false; + }); + searchController.clear(); - bloc.add( - const SearchHouseholdsClearEvent(), - ); - }, + bloc.add( + const SearchHouseholdsClearEvent(), + ); + }, + ), ); }, childCount: searchState.householdMembers.length, @@ -265,65 +274,72 @@ class _SearchBeneficiaryPageState ), bottomNavigationBar: SizedBox( height: 150, - child: DigitCard( - margin: const EdgeInsets.only(left: 0, right: 0, top: 10), - child: Column( - children: [ - BlocBuilder( - builder: (context, state) { - final router = context.router; + child: Card( + margin: const EdgeInsets.all(0), + // padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: Container( + padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), + child: Column( + children: [ + BlocBuilder( + builder: (context, state) { + final router = context.router; - final searchQuery = state.searchQuery; - VoidCallback? onPressed; + final searchQuery = state.searchQuery; + VoidCallback? onPressed; - onPressed = state.loading || - searchQuery == null || - searchQuery.isEmpty - ? null - : () { - FocusManager.instance.primaryFocus?.unfocus(); + onPressed = state.loading || + searchQuery == null || + searchQuery.isEmpty + ? null + : () { + FocusManager.instance.primaryFocus?.unfocus(); - context.read().add( - const ScannerEvent.handleScanner( - [], - [], - ), - ); - router.push(BeneficiaryRegistrationWrapperRoute( - initialState: - BeneficiaryRegistrationCreateState( - searchQuery: state.searchQuery, - ), - )); - }; + context.read().add( + const ScannerEvent.handleScanner( + [], + [], + ), + ); + router + .push(BeneficiaryRegistrationWrapperRoute( + initialState: + BeneficiaryRegistrationCreateState( + searchQuery: state.searchQuery, + ), + )); + }; - return DigitElevatedButton( - onPressed: onPressed, - child: Center( - child: Text(localizations.translate( - i18.searchBeneficiary.beneficiaryAddActionLabel, - )), + return DigitElevatedButton( + onPressed: onPressed, + child: Center( + child: Text(localizations.translate( + i18.searchBeneficiary.beneficiaryAddActionLabel, + )), + ), + ); + }, + ), + DigitOutlineIconButton( + buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, ), - ); - }, - ), - const SizedBox( - height: kPadding, - ), - DigitOutlineIconButton( - onPressed: () { - context.router.push(QRScannerRoute( - quantity: 1, - isGS1code: false, - sinlgleValue: true, - )); - }, - icon: Icons.qr_code, - label: localizations.translate( - i18.deliverIntervention.scannerLabel, + ), + onPressed: () { + context.router.push(QRScannerRoute( + quantity: 1, + isGS1code: false, + sinlgleValue: true, + )); + }, + icon: Icons.qr_code, + label: localizations.translate( + i18.deliverIntervention.scannerLabel, + ), ), - ), - ], + ], + ), ), ), ), diff --git a/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart b/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart index e15715d8a..1ffb23f60 100644 --- a/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart +++ b/apps/health_campaign_field_worker_app/lib/router/app_router.gr.dart @@ -101,7 +101,6 @@ class _$AppRouter extends RootStackRouter { child: const BeneficiariesReportPage(), ); }, - BeneficiaryRegistrationWrapperRoute.name: (routeData) { final args = routeData.argsAs(); return MaterialPageX( @@ -1175,7 +1174,6 @@ class BeneficiariesReportRoute extends PageRouteInfo { } /// generated route for - /// [BeneficiaryRegistrationWrapperPage] class BeneficiaryRegistrationWrapperRoute extends PageRouteInfo { diff --git a/apps/health_campaign_field_worker_app/lib/utils/background_service.dart b/apps/health_campaign_field_worker_app/lib/utils/background_service.dart index 4cb39cf99..5c3dcd30a 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/background_service.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/background_service.dart @@ -172,7 +172,7 @@ void onStart(ServiceInstance service) async { flutterLocalNotificationsPlugin.show( 888, 'Auto Sync', - 'Speed : ${speedArray.first.toString().substring(0, 4)}Mb/ps - BatchSize : $configuredBatchSize', + 'Speed : ${speedArray.first.toString()}Mb/ps - BatchSize : $configuredBatchSize', const NotificationDetails( android: AndroidNotificationDetails( "my_foreground", diff --git a/apps/health_campaign_field_worker_app/lib/utils/constants.dart b/apps/health_campaign_field_worker_app/lib/utils/constants.dart index 49cd96c2e..b6a42c198 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/constants.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/constants.dart @@ -25,6 +25,7 @@ import '../data/repositories/local/project_beneficiary.dart'; import '../data/repositories/local/project_facility.dart'; import '../data/repositories/local/project_resource.dart'; import '../data/repositories/local/project_staff.dart'; +import '../data/repositories/local/referral.dart'; import '../data/repositories/local/service.dart'; import '../data/repositories/local/service_definition.dart'; import '../data/repositories/local/side_effect.dart'; @@ -122,6 +123,7 @@ class Constants { StockLocalRepository(sql, StockOpLogManager(isar)), TaskLocalRepository(sql, TaskOpLogManager(isar)), SideEffectLocalRepository(sql, SideEffectOpLogManager(isar)), + ReferralLocalRepository(sql, ReferralOpLogManager(isar)), StockReconciliationLocalRepository( sql, StockReconciliationOpLogManager(isar), @@ -304,6 +306,9 @@ class EntityPlurals { } } +const String noResultSvg = 'assets/icons/svg/no_result.svg'; +const String myChecklistSvg = 'assets/icons/svg/mychecklist.svg'; + enum DigitProgressDialogType { inProgress, dataFound, 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 7b7fdf0db..abd89fae7 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 @@ -102,6 +102,21 @@ extension ContextUtilityExtensions on BuildContext { return userRequestObject; } + List get loggedInUserRoles { + final authBloc = _get(); + final userRequestObject = authBloc.state.whenOrNull( + authenticated: (accessToken, refreshToken, userModel, actionsWrapper) { + return userModel.roles; + }, + ); + + if (userRequestObject == null) { + throw AppException('User not authenticated'); + } + + return userRequestObject; + } + bool get showProgressBar { UserRequestModel loggedInUser; diff --git a/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart b/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart index a4eada7b1..21c890fce 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/i18_key_constants.dart @@ -25,6 +25,26 @@ const reasonForDeletion = ReasonForDeletion(); const inventoryReportSelection = InventoryReportSelection(); const inventoryReportDetails = InventoryReportDetails(); const syncDialog = SyncDialog(); +const homeShowcase = HomeShowcase(); +const searchBeneficiariesShowcase = SearchBeneficiariesShowcase(); +const householdLocationShowcase = HouseholdLocationShowcase(); +const householdDetailsShowcase = HouseholdDetailsShowcase(); +const individualDetailsShowcase = IndividualDetailsShowcase(); +const householdOverviewShowcase = HouseholdOverviewShowcase(); +const deliverInterventionShowcase = DeliverInterventionShowcase(); +const selectStockShowcase = SelectStockShowcase(); +const warehouseDetailsShowcase = WarehouseDetailsShowcase(); +const stockDetailsReceiptShowcase = StockDetailsReceiptShowcase(); +const stockDetailsIssuedShowcase = StockDetailsIssuedShowcase(); +const stockDetailsReturnedShowcase = StockDetailsReturnedShowcase(); +const stockReconciliationShowcase = StockReconciliationShowcase(); +const selectChecklistShowcase = SelectChecklistShowcase(); +const checklistDataShowcase = ChecklistDataShowcase(); +const checklistListShowcase = ChecklistListShowcase(); +const complaintTypeShowcase = ComplaintTypeShowcase(); +const complaintsDetailsShowcase = ComplaintsDetailsShowcase(); +const complaintsDetailsViewShowcase = ComplaintsDetailsViewShowcase(); +const complaintsInboxShowcase = ComplaintsInboxShowcase(); const referBeneficiary = ReferBeneficiary(); class Common { @@ -97,6 +117,374 @@ class Common { String get min2CharsRequired => 'MIN_2_CHARS_REQUIRED'; + String get maxCharsRequired => 'MAX_CHARS_ALLOWED'; + + String get noResultsFound => 'NO_RESULTS_FOUND'; + + String get coreCommonSyncInProgress => 'CORE_COMMON_SYNC_IN_PROGRESS'; + + String get facilitySearchHeaderLabel => 'FACILITY_SEARCH_HEADER_LABEL'; + + String get coreCommonDownload => 'CORE_COMMON_DOWNLOAD'; + String get coreCommonDownloadFailed => 'CORE_COMMON_DOWNLOAD_FAILED'; + String get noMatchFound => 'CORE_COMMON_NO_MATCH_FOUND'; +} + +class HomeShowcase { + const HomeShowcase(); + + String get distributorProgressBar { + return 'DISTRIBUTOR_HOME_SHOWCASE_PROGRESS_BAR'; + } + + String get distributorBeneficiaries { + return 'DISTRIBUTOR_HOME_SHOWCASE_BENEFICIARIES'; + } + + String get distributorFileComplaint { + return 'DISTRIBUTOR_HOME_SHOWCASE_FILE_COMPLAINT'; + } + + String get distributorSyncData { + return 'DISTRIBUTOR_HOME_SHOWCASE_SYNC_DATA'; + } + + String get warehouseManagerManageStock { + return 'WAREHOUSE_MANAGER_HOME_SHOWCASE_MANAGE_STOCK'; + } + + String get wareHouseManagerStockReconciliation { + return 'WAREHOUSE_MANAGER_HOME_SHOWCASE_STOCK_RECONCILIATION'; + } + + String get warehouseManagerFileComplaint { + return 'WAREHOUSE_MANAGER_HOME_SHOWCASE_FILE_COMPLAINT'; + } + + String get warehouseManagerSyncData { + return 'WAREHOUSE_MANAGER_HOME_SHOWCASE_SYNC_DATA'; + } + + String get supervisorProgressBar { + return 'SUPERVISOR_HOME_SHOWCASE_PROGRESS_BAR'; + } + + String get supervisorMyChecklist { + return 'SUPERVISOR_HOME_SHOWCASE_MY_CHECKLIST'; + } + + String get supervisorComplaints { + return 'SUPERVISOR_HOME_SHOWCASE_COMPLAINTS'; + } + + String get supervisorSyncData { + return 'SUPERVISOR_HOME_SHOWCASE_SYNC_DATA'; + } + + String get wareHouseManagerChecklist { + return 'WAREHOUSE_MANAGER_HOME_SHOWCASE_CHECKLIST'; + } + + String get inventoryReport { + return 'WAREHOUSE_MANAGER_HOME_SHOWCASE_INVENTORY_REPORT'; + } + + String get deleteAll { + return 'WAREHOUSE_MANAGER_HOME_SHOWCASE_DELETE_ALL'; + } +} + +class SearchBeneficiariesShowcase { + const SearchBeneficiariesShowcase(); + + String get numberOfHouseholdsRegistered { + return 'SEARCH_BENEFICIARIES_SHOWCASE_NUMBER_OF_HOUSEHOLDS_REGISTERED'; + } + + String get numberOfBednetsDelivered { + return 'SEARCH_BENEFICIARIES_SHOWCASE_NUMBER_OF_BEDNETS_DELIVERED'; + } + + String get enterNameOfHouseholdHead { + return 'SEARCH_BENEFICIARIES_SHOWCASE_ENTER_NAME_OF_HOUSEHOLD_HEAD'; + } + + String get registerNewHousehold { + return 'SEARCH_BENEFICIARIES_SHOWCASE_REGISTER_NEW_HOUSEHOLD'; + } + + String get nameOfBeneficiary { + return 'SEARCH_BENEFICIARIES_SHOWCASE_NAME_OF_BENEFICIARY'; + } + + String get deliveryStatus { + return 'SEARCH_BENEFICIARIES_SHOWCASE_DELIVERY_STATUS'; + } + + String get open { + return 'SEARCH_BENEFICIARIES_SHOWCASE_OPEN'; + } + + String get beneficiary { + return 'SEARCH_BENEFICIARIES_SHOWCASE_BENEFICIARY'; + } + + String get age { + return 'SEARCH_BENEFICIARIES_SHOWCASE_AGE'; + } + + String get gender { + return 'SEARCH_BENEFICIARIES_SHOWCASE_GENDER'; + } +} + +String get numberOfHouseholdsRegistered { + return 'SEARCH_BENEFICIARIES_SHOWCASE_NUMBER_OF_HOUSEHOLDS_REGISTERED'; +} + +String get numberOfBednetsDelivered { + return 'SEARCH_BENEFICIARIES_SHOWCASE_NUMBER_OF_BEDNETS_DELIVERED'; +} + +String get enterNameOfHouseholdHead { + return 'SEARCH_BENEFICIARIES_SHOWCASE_ENTER_NAME_OF_HOUSEHOLD_HEAD'; +} + +String get registerNewHousehold { + return 'SEARCH_BENEFICIARIES_SHOWCASE_REGISTER_NEW_HOUSEHOLD'; +} + +class HouseholdLocationShowcase { + const HouseholdLocationShowcase(); + + String get administrativeArea { + return 'HOUSEHOLD_LOCATION_SHOWCASE_ADMINISTRATIVE_AREA'; + } + + String get landmark { + return 'HOUSEHOLD_LOCATION_SHOWCASE_LANDMARK'; + } + + String get address { + return 'HOUSEHOLD_LOCATION_SHOWCASE_ADDRESS'; + } + + String get postalCode { + return 'HOUSEHOLD_LOCATION_SHOWCASE_POSTAL_CODE'; + } +} + +class HouseholdDetailsShowcase { + const HouseholdDetailsShowcase(); + + String get dateOfRegistration { + return 'HOUSEHOLD_DETAILS_SHOWCASE_DATE_OF_REGISTRATION'; + } + + String get numberOfMembersLivingInHousehold { + return 'HOUSEHOLD_DETAILS_SHOWCASE_NUMBER_OF_MEMBERS_LIVING_IN_HOUSEHOLD'; + } +} + +class IndividualDetailsShowcase { + const IndividualDetailsShowcase(); + + String get firstNameOfIndividual { + return 'INDIVIDUAL_DETAILS_SHOWCASE_FIRST_NAME_OF_INDIVIDUAL'; + } + + String get lastNameOfIndividual { + return 'INDIVIDUAL_DETAILS_SHOWCASE_LAST_NAME_OF_INDIVIDUAL'; + } + + String get headOfHousehold { + return 'INDIVIDUAL_DETAILS_SHOWCASE_HEAD_OF_HOUSEHOLD'; + } + + String get age { + return 'INDIVIDUAL_DETAILS_SHOWCASE_AGE'; + } + + String get dateOfBirth { + return 'INDIVIDUAL_DETAILS_SHOWCASE_DATE_OF_BIRTH'; + } + + String get gender { + return 'INDIVIDUAL_DETAILS_SHOWCASE_GENDER'; + } + + String get mobile { + return 'INDIVIDUAL_DETAILS_SHOWCASE_MOBILE'; + } + + String get idType { + return 'INDIVIDUAL_DETAILS_SHOWCASE_ID_TYPE'; + } +} + +class HouseholdOverviewShowcase { + const HouseholdOverviewShowcase(); + + String get editHousehold { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_EDIT_HOUSEHOLD'; + } + + String get deliveryStatus { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_DELIVERY_STATUS'; + } + + String get householdHead { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_HOUSEHOLD_HEAD'; + } + + String get administrativeArea { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_ADMINISTRATIVE_AREA'; + } + + String get memberCount { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_MEMBER_COUNT'; + } + + String get householdIndividualCardTitle { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_HOUSEHOLD_INDIVIDUAL_CARD_TITLE'; + } + + String get editMember { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_EDIT_MEMBER'; + } + + String get addMember { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_ADD_MEMBER'; + } + + String get deliverIntervention { + return 'HOUSEHOLD_OVERVIEW_SHOWCASE_DELIVER_INTERVENTION'; + } +} + +class DeliverInterventionShowcase { + const DeliverInterventionShowcase(); + + String get memberCount { + return 'DELIVER_INTERVENTION_SHOWCASE_MEMBER_COUNT'; + } + + String get numberOfBednetsToDeliver { + return 'DELIVER_INTERVENTION_SHOWCASE_NUMBER_OF_BEDNETS_TO_DELIVER'; + } + + String get numberOfBednetsDistributed { + return 'DELIVER_INTERVENTION_SHOWCASE_NUMBER_OF_BEDNETS_DISTRIBUTED'; + } + + String get deliveryComment { + return 'DELIVER_INTERVENTION_SHOWCASE_DELIVERY_COMMENT'; + } +} + +class SelectStockShowcase { + const SelectStockShowcase(); + + String get recordStockReceipt { + return 'SELECT_STOCK_SHOWCASE_RECORD_STOCK_RECEIPT'; + } + + String get recordStockIssued { + return 'SELECT_STOCK_SHOWCASE_RECORD_STOCK_ISSUED'; + } + + String get recordStockReturned { + return 'SELECT_STOCK_SHOWCASE_RECORD_STOCK_RETURNED'; + } +} + +class WarehouseDetailsShowcase { + const WarehouseDetailsShowcase(); + + String get dateOfReceipt { + return 'WAREHOUSE_DETAILS_SHOWCASE_DATE_OF_RECEIPT'; + } + + String get administrativeUnit { + return 'WAREHOUSE_DETAILS_SHOWCASE_ADMINISTRATIVE_UNIT'; + } + + String get warehouseName { + return 'WAREHOUSE_DETAILS_SHOWCASE_WAREHOUSE_NAME'; + } +} + +class StockDetailsReceiptShowcase { + const StockDetailsReceiptShowcase(); + + String get receivedFrom { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_RECEIVED_FROM'; + } + + String get numberOfBednetsReceived { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_NUMBER_OF_BEDNETS_RECEIVED'; + } + + String get packingSlipId { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_PACKING_SLIP_ID'; + } + + String get numberOfNetsIndicatedOnPackingSlip { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_NUMBER_OF_NETS_INDICATED_ON_PACKING_SLIP'; + } + + String get typeOfTransport { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_TYPE_OF_TRANSPORT'; + } + + String get vehicleNumber { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_VEHICLE_NUMBER'; + } + + String get driverName { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_DRIVER_NAME'; + } + + String get comments { + return 'STOCK_DETAILS_RECEIPT_SHOWCASE_COMMENTS'; + } +} + +class StockDetailsIssuedShowcase { + const StockDetailsIssuedShowcase(); + + String get issuedTo { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_ISSUED_TO'; + } + + String get numberOfBednetsIssued { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_NUMBER_OF_BEDNETS_ISSUED'; + } + + String get packingSlipId { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_PACKING_SLIP_ID'; + } + + String get numberOfNetsIndicatedOnPackingSlip { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_NUMBER_OF_NETS_INDICATED_ON_PACKING_SLIP'; + } + + String get typeOfTransport { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_TYPE_OF_TRANSPORT'; + } + + String get vehicleNumber { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_VEHICLE_NUMBER'; + } + + String get driverName { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_DRIVER_NAME'; + } + + String get comments { + return 'STOCK_DETAILS_ISSUED_SHOWCASE_COMMENTS'; + } + String get facilitySearchHeaderLabel => 'FACILITY_SEARCH_HEADER_LABEL'; String get coreCommonDownload => 'CORE_COMMON_DOWNLOAD'; @@ -135,6 +523,242 @@ class Login { String get actionLabel => 'LOGIN_ACTION_LABEL'; } +class StockDetailsReturnedShowcase { + const StockDetailsReturnedShowcase(); + + String get returnedFrom { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_RETURNED_FROM'; + } + + String get numberOfBednetsReturned { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_NUMBER_OF_BEDNETS_RETURNED'; + } + + String get packingSlipId { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_PACKING_SLIP_ID'; + } + + String get numberOfNetsIndicatedOnPackingSlip { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_NUMBER_OF_NETS_INDICATED_ON_PACKING_SLIP'; + } + + String get typeOfTransport { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_TYPE_OF_TRANSPORT'; + } + + String get vehicleNumber { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_VEHICLE_NUMBER'; + } + + String get driverName { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_DRIVER_NAME'; + } + + String get comments { + return 'STOCK_DETAILS_RETURNED_SHOWCASE_COMMENT'; + } +} + +class StockReconciliationShowcase { + const StockReconciliationShowcase(); + + String get warehouseName { + return 'STOCK_RECONCILIATION_SHOWCASE_WAREHOUSE_NAME'; + } + + String get dateOfReconciliation { + return 'STOCK_RECONCILIATION_SHOWCASE_DATE_OF_RECONCILIATION'; + } + + String get stockReceived { + return 'STOCK_RECONCILIATION_SHOWCASE_STOCK_RECEIVED'; + } + + String get stockIssued { + return 'STOCK_RECONCILIATION_SHOWCASE_STOCK_ISSUED'; + } + + String get stockReturned { + return 'STOCK_RECONCILIATION_SHOWCASE_STOCK_RETURNED'; + } + + String get stockOnHand { + return 'STOCK_RECONCILIATION_SHOWCASE_STOCK_ON_HAND'; + } + + String get manualStockCount { + return 'STOCK_RECONCILIATION_SHOWCASE_MANUAL_STOCK_COUNT'; + } + + String get comments { + return 'STOCK_RECONCILIATION_SHOWCASE_COMMENTS'; + } +} + +class SelectChecklistShowcase { + const SelectChecklistShowcase(); + + String get selectChecklist { + return 'SELECT_CHECKLIST_SHOWCASE_SELECT_CHECKLIST'; + } +} + +class ChecklistDataShowcase { + const ChecklistDataShowcase(); + + String get date { + return 'CHECKLIST_DATA_SHOWCASE_DATE'; + } + + String get administrativeUnit { + return 'CHECKLIST_DATA_SHOWCASE_ADMINISTRATIVE_UNIT'; + } +} + +class ChecklistListShowcase { + const ChecklistListShowcase(); + + String get open { + return 'CHECKLIST_LIST_SHOWCASE_OPEN'; + } +} + +class ComplaintTypeShowcase { + const ComplaintTypeShowcase(); + + String get complaintType { + return 'COMPLAINT_TYPE_SHOWCASE_COMPLAINT_TYPE'; + } + + String get complaintTypeNext { + return 'COMPLAINT_TYPE_SHOWCASE_COMPLAINT_TYPE_NEXT'; + } +} + +class ComplaintsDetailsShowcase { + const ComplaintsDetailsShowcase(); + + String get complaintDate { + return 'COMPLAINT_DETAILS_SHOWCASE_DATE'; + } + + String get complaintOrganizationUnit { + return 'COMPLAINT_DETAILS_SHOWCASE_ORGANIZATION_UNIT'; + } + + String get complaintSelfOrOther { + return 'COMPLAINT_DETAILS_SHOWCASE_SELF_OR_OTHER'; + } + + String get complaintName { + return 'COMPLAINT_DETAILS_SHOWCASE_NAME'; + } + + String get complaintContact { + return 'COMPLAINT_DETAILS_SHOWCASE_CONTACT'; + } + + String get complaintSupervisorName { + return 'COMPLAINT_DETAILS_SHOWCASE_SUPERVISOR_NAME'; + } + + String get complaintSupervisorContact { + return 'COMPLAINT_DETAILS_SHOWCASE_SUPERVISOR_CONTACT'; + } + + String get complaintDescription { + return 'COMPLAINT_DETAILS_SHOWCASE_DESCRIPTION'; + } + + String get complaintSubmit { + return 'COMPLAINT_DETAILS_SHOWCASE_SUBMIT'; + } +} + +class ComplaintsDetailsViewShowcase { + const ComplaintsDetailsViewShowcase(); + + String get complaintNumber { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_NUMBER'; + } + + String get complaintType { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_TYPE'; + } + + String get complaintDate { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_DATE'; + } + + String get complaintName { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_NAME'; + } + + String get complaintArea { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_AREA'; + } + + String get complaintContact { + return 'COMPLAINT_DETAILS_VIEW_CONTACT'; + } + + String get complaintStatus { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_STATUS'; + } + + String get complaintDescription { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_DESCRIPTION'; + } + + String get complaintClose { + return 'COMPLAINT_DETAILS_VIEW_SHOWCASE_CLOSE'; + } +} + +class ComplaintsInboxShowcase { + const ComplaintsInboxShowcase(); + + String get complaintSearch { + return 'COMPLAINT_INBOX_SHOWCASE_SEARCH'; + } + + String get complaintFilter { + return 'COMPLAINT_INBOX_SHOWCASE_FILTER'; + } + + String get complaintSort { + return 'COMPLAINT_INBOX_SHOWCASE_SORT'; + } + + String get complaintNumber { + return 'COMPLAINT_INBOX_SHOWCASE_NUMBER'; + } + + String get complaintType { + return 'COMPLAINT_INBOX_SHOWCASE_TYPE'; + } + + String get complaintDate { + return 'COMPLAINT_INBOX_SHOWCASE_DATE'; + } + + String get complaintArea { + return 'COMPLAINT_INBOX_SHOWCASE_AREA'; + } + + String get complaintStatus { + return 'COMPLAINT_INBOX_SHOWCASE_STATUS'; + } + + String get complaintOpen { + return 'COMPLAINT_INBOX_SHOWCASE_OPEN'; + } + + String get complaintCreate { + return 'COMPLAINT_INBOX_SHOWCASE_CREATE'; + } +} + class Checklist { const Checklist(); @@ -215,6 +839,11 @@ class Home { String get dataSyncInfoContent => 'DATA_SYNC_INFO_CONTENT'; String get myCheckList => 'MY_CHECK_LIST_LABEL'; + + String get warehouseManagerCheckList => 'WAREHOUSE_MANAGER_CHECK_LIST_LABEL'; + + String get deleteAllLabel => 'HOME_DELETE_ALL_LABEL'; + String get db => 'HOME_DB_LABEL'; } class SearchBeneficiary { @@ -231,6 +860,9 @@ class SearchBeneficiary { String get beneficiarySearchHintText => 'BENEFICIARY_SEARCH_HINT_TEXT'; + String get beneficiaryIndividualSearchHintText => + 'BENEFICIARY_INDIVIDUAL_SEARCH_HINT_TEXT'; + String get beneficiaryInfoDescription => 'BENEFICIARY_INFO_DESCRIPTION'; String get beneficiaryInfoTitle => 'BENEFICIARY_INFO_TITLE'; diff --git a/apps/health_campaign_field_worker_app/lib/utils/utils.dart b/apps/health_campaign_field_worker_app/lib/utils/utils.dart index 422fc1f44..6761f3647 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/utils.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/utils.dart @@ -146,7 +146,7 @@ performBackgroundService({ DigitToast.show( context!, options: DigitToastOptions( - 'Background Service stated', + 'Background Service Started', false, DigitTheme.instance.mobileTheme, ), diff --git a/apps/health_campaign_field_worker_app/lib/widgets/action_card/action_card.dart b/apps/health_campaign_field_worker_app/lib/widgets/action_card/action_card.dart index 09f75850c..c5468f7bf 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/action_card/action_card.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/action_card/action_card.dart @@ -18,6 +18,9 @@ class ActionCard extends StatelessWidget { padding: const EdgeInsets.all(kPadding / 2), child: DigitOutlineIconButton( buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), backgroundColor: Colors.white, side: BorderSide( width: 1.0, diff --git a/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/resource_beneficiary_card.dart b/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/resource_beneficiary_card.dart index 42cd0727c..d952e5d7a 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/resource_beneficiary_card.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/resource_beneficiary_card.dart @@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; import '../../blocs/product_variant/product_variant.dart'; +import '../../models/data_model.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../localized.dart'; @@ -42,8 +43,11 @@ class _ResourceBeneficiaryCardState Radius.circular(4.0), ), ), - margin: DigitTheme.instance.containerMargin, - padding: const EdgeInsets.all(8), + margin: const EdgeInsets.only( + top: kPadding, + bottom: kPadding, + ), + padding: const EdgeInsets.all(kPadding), child: Column( children: [ BlocBuilder( @@ -51,10 +55,11 @@ class _ResourceBeneficiaryCardState return productState.maybeWhen( orElse: () => const Offstage(), fetched: (productVariants) { - return DigitReactiveDropdown( - label: '${localizations.translate( - i18.deliverIntervention.resourceDeliveredLabel, - )}*', + return DigitReactiveSearchDropdown( + label: localizations.translate( + i18.individualDetails.idTypeLabelText, + ), + form: widget.form, menuItems: productVariants, formControlName: 'resourceDelivered.${widget.cardIndex}', valueMapper: (value) { @@ -62,6 +67,11 @@ class _ResourceBeneficiaryCardState value.sku ?? value.id, ); }, + isRequired: true, + validationMessage: localizations.translate( + i18.common.corecommonRequired, + ), + emptyText: localizations.translate(i18.common.noMatchFound), ); }, ); diff --git a/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/view_beneficiary_card.dart b/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/view_beneficiary_card.dart index db25fb2c9..c2a16f448 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/view_beneficiary_card.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/beneficiary/view_beneficiary_card.dart @@ -265,7 +265,7 @@ class _ViewBeneficiaryCardState extends LocalizedState { householdMember.household.address?.pincode, ].whereNotNull().take(2).join(' '), subtitle: widget.distance != null - ? '${householdMember.members.length ?? 1} ${householdMember.members.length == 1 ? 'Household Member' : 'Household Members'} \n ${((widget.distance!) * 1000).round() > 999 ? '(${((widget.distance!).round())} km)' : '(${((widget.distance!) * 1000).round()} mts) ${localizations.translate(i18.beneficiaryDetails.fromCurrentLocation)}'}' + ? '${householdMember.members.length ?? 1} ${householdMember.members.length == 1 ? 'Household Member' : 'Household Members'}\n${((widget.distance!) * 1000).round() > 999 ? '(${((widget.distance!).round())} km)' : '(${((widget.distance!) * 1000).round()} mts) ${localizations.translate(i18.beneficiaryDetails.fromCurrentLocation)}'}' : '${householdMember.members.length ?? 1} ${householdMember.members.length == 1 ? 'Household Member' : 'Household Members'}', status: context.beneficiaryType != BeneficiaryType.individual ? (householdMember.tasks ?? []).isNotEmpty && @@ -282,6 +282,11 @@ class _ViewBeneficiaryCardState extends LocalizedState { ), Flexible( child: DigitOutLineButton( + buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), + ), label: localizations.translate(i18.searchBeneficiary.iconLabel), onPressed: widget.onOpenPressed, @@ -295,11 +300,12 @@ class _ViewBeneficiaryCardState extends LocalizedState { headerList: filteredHeaderList, tableData: tableData, columnWidth: 130, + columnRowFixedHeight: 65, height: householdMember.members.length == 1 - ? 61 * 2 + ? 65 * 2 : householdMember.members.length <= 4 - ? (householdMember.members.length + 1) * 58 - : 5 * 60, + ? (householdMember.members.length + 1) * 65 + : 5 * 68, scrollPhysics: householdMember.members.length <= 4 ? const NeverScrollableScrollPhysics() : const ClampingScrollPhysics(), @@ -314,7 +320,7 @@ class _ViewBeneficiaryCardState extends LocalizedState { isCardExpanded ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - size: 16, + size: 24, ), onPressed: () => isCardExpanded = !isCardExpanded, ), diff --git a/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart b/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart index 5db5e0184..4ed1bb053 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/header/back_navigation_help_header.dart @@ -1,3 +1,4 @@ +import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -5,6 +6,7 @@ import '../../blocs/auth/auth.dart'; import '../../blocs/localization/app_localization.dart'; import '../../router/app_router.dart'; import '../../utils/i18_key_constants.dart' as i18; +import '../showcase/showcase_button.dart'; class BackNavigationHelpHeaderWidget extends StatelessWidget { final bool showHelp; @@ -12,6 +14,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final bool showLogoutCTA; final VoidCallback? helpClicked; final VoidCallback? handleback; + final ShowcaseButton? showcaseButton; const BackNavigationHelpHeaderWidget({ super.key, @@ -20,6 +23,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { this.showLogoutCTA = false, this.helpClicked, this.handleback, + this.showcaseButton, }); @override @@ -27,7 +31,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.fromLTRB(8, 8, 8, 0), child: Row( children: [ Expanded( @@ -80,17 +84,28 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { onPressed: helpClicked, child: Row( children: [ - Text( - AppLocalizations.of(context) - .translate(i18.common.coreCommonHelp), - overflow: TextOverflow.ellipsis, + Padding( + padding: const EdgeInsets.fromLTRB( + kPadding, + kPadding, + kPadding / 1, + kPadding, + ), + child: Text( + AppLocalizations.of(context) + .translate(i18.common.coreCommonHelp), + overflow: TextOverflow.ellipsis, + ), ), + const Icon( Icons.help_outline_outlined, ), // Add the icon to the right ], ), ), + SizedBox(width: showcaseButton != null ? 16 : 0), + if (showcaseButton != null) showcaseButton!, ], ), ); diff --git a/apps/health_campaign_field_worker_app/lib/widgets/home/home_item_card.dart b/apps/health_campaign_field_worker_app/lib/widgets/home/home_item_card.dart index 8dcf95429..9b8a872f7 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/home/home_item_card.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/home/home_item_card.dart @@ -1,16 +1,21 @@ import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import '../../blocs/localization/app_localization.dart'; class HomeItemCard extends StatelessWidget { final IconData icon; + final String customIcon; final String label; final VoidCallback? onPressed; + final bool enableCustomIcon; const HomeItemCard({ required this.icon, required this.label, + this.enableCustomIcon = false, + this.customIcon = "", this.onPressed, super.key, }); @@ -21,28 +26,40 @@ class HomeItemCard extends StatelessWidget { return DigitCard( onPressed: onPressed, - padding: const EdgeInsets.all(kPadding).copyWith(top: kPadding * 5), + padding: const EdgeInsets.all(kPadding / 2).copyWith(top: kPadding * 3), + margin: const EdgeInsets.all(kPadding), child: Align( - alignment: Alignment.topCenter, + alignment: Alignment.center, child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: [ - Icon( - icon, - color: onPressed == null - ? theme.disabledColor - : theme.colorScheme.secondary, - size: 30, - ), - const SizedBox(height: 24), - Text( - AppLocalizations.of(context).translate( - label, + if (enableCustomIcon) + SvgPicture.asset( + customIcon, + width: 25, + height: 25, + ), + if (!enableCustomIcon) + Icon( + icon, + color: onPressed == null + ? theme.disabledColor + : theme.colorScheme.secondary, + size: 30, ), - style: theme.textTheme.bodyMedium, - textAlign: TextAlign.center, + Wrap( + children: [ + Text( + AppLocalizations.of(context).translate( + label, + ), + style: theme.textTheme.bodyMedium, + textAlign: TextAlign.center, + // overflow: TextOverflow.ellipsis, + ), + ], ), ], ), diff --git a/apps/health_campaign_field_worker_app/lib/widgets/member_card/member_card.dart b/apps/health_campaign_field_worker_app/lib/widgets/member_card/member_card.dart index 9d4113142..f91cb8324 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/member_card/member_card.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/member_card/member_card.dart @@ -70,65 +70,66 @@ class MemberCard extends StatelessWidget { ), ), margin: DigitTheme.instance.containerMargin, - padding: const EdgeInsets.only(left: 8.0, right: 8.0, bottom: 8.0), + padding: const EdgeInsets.only(left: 8.0, right: 8.0, bottom: 4.0), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, + Stack( children: [ - SizedBox( - width: MediaQuery.of(context).size.width / 2.5, - child: Padding( - padding: const EdgeInsets.only(left: 8.0, top: 8.0), - child: Text( - name, - style: theme.textTheme.headlineMedium, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: MediaQuery.of(context).size.width / 1.8, + child: Padding( + padding: + const EdgeInsets.only(left: kPadding, top: kPadding), + child: Text( + name, + style: theme.textTheme.headlineMedium, + ), + ), ), - ), + ], ), - SizedBox( - width: MediaQuery.of(context).size.width / 3.5, + Positioned( child: Align( alignment: Alignment.topRight, - child: Padding( - padding: const EdgeInsets.all(0), - child: DigitIconButton( - onPressed: () => DigitActionDialog.show( - context, - widget: ActionCard( - items: [ - ActionCardModel( - icon: Icons.person, - label: localizations.translate( - i18.memberCard.assignAsHouseholdhead, - ), - action: isHead ? null : setAsHeadAction, + child: DigitIconButton( + onPressed: () => DigitActionDialog.show( + context, + widget: ActionCard( + items: [ + ActionCardModel( + icon: Icons.person, + label: localizations.translate( + i18.memberCard.assignAsHouseholdhead, ), - ActionCardModel( - icon: Icons.edit, - label: localizations.translate( - i18.memberCard.editIndividualDetails, - ), - action: editMemberAction, + action: isHead ? null : setAsHeadAction, + ), + ActionCardModel( + icon: Icons.edit, + label: localizations.translate( + i18.memberCard.editIndividualDetails, ), - ActionCardModel( - icon: Icons.delete, - label: localizations.translate( - i18.memberCard.deleteIndividualActionText, - ), - action: isHead ? null : deleteMemberAction, + action: editMemberAction, + ), + ActionCardModel( + icon: Icons.delete, + label: localizations.translate( + i18.memberCard.deleteIndividualActionText, ), - ], - ), - ), - iconText: localizations.translate( - i18.memberCard.editDetails, + action: isHead ? null : deleteMemberAction, + ), + ], ), - icon: Icons.edit, ), + iconText: localizations.translate( + i18.memberCard.editDetails, + ), + icon: Icons.edit, ), ), ), @@ -159,7 +160,9 @@ class MemberCard extends StatelessWidget { ), ), Padding( - padding: const EdgeInsets.only(left: 4.0, bottom: 4.0), + padding: const EdgeInsets.only( + left: kPadding / 2, + ), child: Offstage( offstage: beneficiaryType != BeneficiaryType.individual, child: !isDelivered || @@ -206,7 +209,10 @@ class MemberCard extends StatelessWidget { ), ), Offstage( - offstage: beneficiaryType != BeneficiaryType.individual, + offstage: beneficiaryType != BeneficiaryType.individual || + isNotEligible || + isBeneficiaryRefused || + isBeneficiaryReferred, child: Padding( padding: const EdgeInsets.all(4.0), child: Column( @@ -215,6 +221,10 @@ class MemberCard extends StatelessWidget { ? const Offstage() : !isNotEligible ? DigitElevatedButton( + // padding: const EdgeInsets.only( + // left: kPadding / 2, + // right: kPadding / 2, + // ), onPressed: () { final bloc = context.read(); @@ -290,6 +300,9 @@ class MemberCard extends StatelessWidget { i18.memberCard.unableToDeliverLabel, ), buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), backgroundColor: Colors.white, side: BorderSide( width: 1.0, @@ -310,6 +323,9 @@ class MemberCard extends StatelessWidget { i18.memberCard.beneficiaryRefusedLabel, ), buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), backgroundColor: Colors.white, side: BorderSide( width: 1.0, @@ -398,13 +414,16 @@ class MemberCard extends StatelessWidget { }, ), const SizedBox( - height: 10, + height: kPadding * 2, ), DigitOutLineButton( label: localizations.translate( i18.memberCard.referBeneficiaryLabel, ), buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), backgroundColor: Colors.white, side: BorderSide( width: 1.0, @@ -431,13 +450,16 @@ class MemberCard extends StatelessWidget { }, ), const SizedBox( - height: 10, + height: kPadding * 2, ), DigitOutLineButton( label: localizations.translate( i18.memberCard.recordAdverseEventsLabel, ), buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), backgroundColor: Colors.white, side: BorderSide( width: 1.0, diff --git a/apps/health_campaign_field_worker_app/lib/widgets/no_result_card/no_result_card.dart b/apps/health_campaign_field_worker_app/lib/widgets/no_result_card/no_result_card.dart new file mode 100644 index 000000000..304e4b32a --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/no_result_card/no_result_card.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +import '../../utils/constants.dart'; + +class NoResultCard extends StatelessWidget { + final AlignmentGeometry align; + final String? label; + const NoResultCard({ + super.key, + this.align = Alignment.centerLeft, + this.label, + }); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return Align( + alignment: align, + child: Padding( + padding: const EdgeInsets.only(top: 100, bottom: 10, right: 8), + child: Column( + children: [ + SvgPicture.asset( + noResultSvg, + width: 340, + height: 200, + ), + const SizedBox(height: 20), + Text( + label ?? '', + style: theme.textTheme.bodyMedium, + ), + ], + ), + ), + ); + } +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_data.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_data.dart new file mode 100644 index 000000000..a81c6c73e --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_data.dart @@ -0,0 +1,23 @@ +part of 'showcase_constants.dart'; + +class _ChecklistDataShowcaseData { + static final _ChecklistDataShowcaseData _instance = + _ChecklistDataShowcaseData._(); + + _ChecklistDataShowcaseData._(); + + factory _ChecklistDataShowcaseData() => _instance; + + List get showcaseData => [ + date, + administrativeUnit, + ]; + + final date = ShowcaseItemBuilder( + messageLocalizationKey: i18.checklistDataShowcase.date, + ); + + final administrativeUnit = ShowcaseItemBuilder( + messageLocalizationKey: i18.checklistDataShowcase.administrativeUnit, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_list.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_list.dart new file mode 100644 index 000000000..da2297571 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/checklist_list.dart @@ -0,0 +1,16 @@ +part of 'showcase_constants.dart'; + +class _ChecklistListShowcaseData { + static final _ChecklistListShowcaseData _instance = + _ChecklistListShowcaseData._(); + + _ChecklistListShowcaseData._(); + + factory _ChecklistListShowcaseData() => _instance; + + List get showcaseData => [open]; + + final open = ShowcaseItemBuilder( + messageLocalizationKey: i18.checklistListShowcase.open, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaint_type.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaint_type.dart new file mode 100644 index 000000000..7fa84a0f2 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaint_type.dart @@ -0,0 +1,21 @@ +part of 'showcase_constants.dart'; + +class _ComplaintTypeShowcaseData { + static final _ComplaintTypeShowcaseData _instance = + _ComplaintTypeShowcaseData._(); + + _ComplaintTypeShowcaseData._(); + + factory _ComplaintTypeShowcaseData() => _instance; + + List get showcaseData => + [complaintType, complaintTypeNext]; + + final complaintType = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintTypeShowcase.complaintType, + ); + + final complaintTypeNext = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintTypeShowcase.complaintTypeNext, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details.dart new file mode 100644 index 000000000..b61a91929 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details.dart @@ -0,0 +1,61 @@ +part of 'showcase_constants.dart'; + +class _ComplaintsDetailsShowcaseData { + static final _ComplaintsDetailsShowcaseData _instance = + _ComplaintsDetailsShowcaseData._(); + + _ComplaintsDetailsShowcaseData._(); + + factory _ComplaintsDetailsShowcaseData() => _instance; + + List get showcaseData => [ + complaintDate, + complaintOrganizationUnit, + complaintSelfOrOther, + complaintName, + complaintContact, + complaintSupervisorName, + complaintSupervisorContact, + complaintDescription, + complaintSubmit, + ]; + + final complaintOrganizationUnit = ShowcaseItemBuilder( + messageLocalizationKey: + i18.complaintsDetailsShowcase.complaintOrganizationUnit, + ); + + final complaintSelfOrOther = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsShowcase.complaintSelfOrOther, + ); + + final complaintDate = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsShowcase.complaintDate, + ); + + final complaintName = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsShowcase.complaintName, + ); + + final complaintSupervisorName = ShowcaseItemBuilder( + messageLocalizationKey: + i18.complaintsDetailsShowcase.complaintSupervisorName, + ); + + final complaintContact = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsShowcase.complaintContact, + ); + + final complaintSupervisorContact = ShowcaseItemBuilder( + messageLocalizationKey: + i18.complaintsDetailsShowcase.complaintSupervisorContact, + ); + + final complaintDescription = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsShowcase.complaintDescription, + ); + + final complaintSubmit = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsShowcase.complaintSubmit, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details_view.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details_view.dart new file mode 100644 index 000000000..c66ad813b --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_details_view.dart @@ -0,0 +1,59 @@ +part of 'showcase_constants.dart'; + +class _ComplaintsDetailsViewShowcaseData { + static final _ComplaintsDetailsViewShowcaseData _instance = + _ComplaintsDetailsViewShowcaseData._(); + + _ComplaintsDetailsViewShowcaseData._(); + + factory _ComplaintsDetailsViewShowcaseData() => _instance; + + List get showcaseData => [ + complaintNumber, + complaintType, + complaintDate, + complaintName, + complaintArea, + complaintContact, + complaintStatus, + complaintDescription, + complaintClose, + ]; + + final complaintNumber = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintNumber, + ); + + final complaintType = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintType, + ); + + final complaintDate = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintDate, + ); + + final complaintName = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintName, + ); + + final complaintArea = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintArea, + ); + + final complaintContact = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintContact, + ); + + final complaintStatus = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintStatus, + ); + + final complaintDescription = ShowcaseItemBuilder( + messageLocalizationKey: + i18.complaintsDetailsViewShowcase.complaintDescription, + ); + + final complaintClose = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsDetailsViewShowcase.complaintClose, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_inbox.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_inbox.dart new file mode 100644 index 000000000..527c83bb7 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/complaints_inbox.dart @@ -0,0 +1,63 @@ +part of 'showcase_constants.dart'; + +class _ComplaintsInboxShowcaseData { + static final _ComplaintsInboxShowcaseData _instance = + _ComplaintsInboxShowcaseData._(); + + _ComplaintsInboxShowcaseData._(); + + factory _ComplaintsInboxShowcaseData() => _instance; + + List get showcaseData => [ + complaintSearch, + complaintFilter, + complaintSort, + complaintNumber, + complaintType, + complaintDate, + complaintArea, + complaintStatus, + complaintOpen, + complaintCreate, + ]; + + final complaintNumber = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintNumber, + ); + + final complaintType = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintType, + ); + + final complaintDate = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintDate, + ); + + final complaintSearch = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintSearch, + ); + + final complaintArea = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintArea, + ); + + final complaintFilter = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintFilter, + ); + + final complaintStatus = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintStatus, + ); + + final complaintSort = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintSort, + ); + + final complaintOpen = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintOpen, + ); + + final complaintCreate = ShowcaseItemBuilder( + messageLocalizationKey: i18.complaintsInboxShowcase.complaintCreate, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/deliver_intervention.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/deliver_intervention.dart new file mode 100644 index 000000000..10c4a5fb1 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/deliver_intervention.dart @@ -0,0 +1,35 @@ +part of 'showcase_constants.dart'; + +class _DeliverInterventionShowcaseData { + static final _DeliverInterventionShowcaseData _instance = + _DeliverInterventionShowcaseData._(); + + _DeliverInterventionShowcaseData._(); + + factory _DeliverInterventionShowcaseData() => _instance; + + List get showcaseData => [ + memberCount, + numberOfBednetsToDeliver, + numberOfBednetsDistributed, + deliveryComment, + ]; + + final memberCount = ShowcaseItemBuilder( + messageLocalizationKey: i18.deliverInterventionShowcase.memberCount, + ); + + final numberOfBednetsToDeliver = ShowcaseItemBuilder( + messageLocalizationKey: + i18.deliverInterventionShowcase.numberOfBednetsToDeliver, + ); + + final numberOfBednetsDistributed = ShowcaseItemBuilder( + messageLocalizationKey: + i18.deliverInterventionShowcase.numberOfBednetsDistributed, + ); + + final deliveryComment = ShowcaseItemBuilder( + messageLocalizationKey: i18.deliverInterventionShowcase.deliveryComment, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart new file mode 100644 index 000000000..5a7c8f7bc --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/home_showcase.dart @@ -0,0 +1,93 @@ +part of 'showcase_constants.dart'; + +class _HomePageShowcaseData { + static final _HomePageShowcaseData _instance = _HomePageShowcaseData._(); + + _HomePageShowcaseData._(); + + factory _HomePageShowcaseData() => _instance; + + List get showcaseData => [ + distributorProgressBar, + distributorBeneficiaries, + distributorFileComplaint, + distributorSyncData, + warehouseManagerManageStock, + wareHouseManagerStockReconciliation, + wareHouseManagerChecklist, + warehouseManagerFileComplaint, + warehouseManagerSyncData, + inventoryReport, + supervisorProgressBar, + supervisorMyChecklist, + supervisorComplaints, + supervisorSyncData, + deleteAll, + db + ]; + + final distributorProgressBar = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.distributorProgressBar, + ); + + final distributorBeneficiaries = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.distributorBeneficiaries, + ); + + final distributorFileComplaint = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.distributorFileComplaint, + ); + + final distributorSyncData = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.distributorSyncData, + ); + + final warehouseManagerManageStock = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.warehouseManagerManageStock, + ); + + final wareHouseManagerStockReconciliation = ShowcaseItemBuilder( + messageLocalizationKey: + i18.homeShowcase.wareHouseManagerStockReconciliation, + ); + + final wareHouseManagerChecklist = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.wareHouseManagerChecklist, + ); + + final warehouseManagerFileComplaint = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.warehouseManagerFileComplaint, + ); + + final warehouseManagerSyncData = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.warehouseManagerSyncData, + ); + + final supervisorProgressBar = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.supervisorProgressBar, + ); + + final supervisorMyChecklist = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.supervisorMyChecklist, + ); + + final supervisorComplaints = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.supervisorComplaints, + ); + + final supervisorSyncData = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.supervisorSyncData, + ); + + final inventoryReport = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.inventoryReport, + ); + + final deleteAll = ShowcaseItemBuilder( + messageLocalizationKey: i18.homeShowcase.deleteAll, + ); + + final db = ShowcaseItemBuilder( + messageLocalizationKey: i18.home.db, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_details.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_details.dart new file mode 100644 index 000000000..74e12a496 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_details.dart @@ -0,0 +1,24 @@ +part of 'showcase_constants.dart'; + +class _HouseholdDetailsShowcaseData { + static final _HouseholdDetailsShowcaseData _instance = + _HouseholdDetailsShowcaseData._(); + + _HouseholdDetailsShowcaseData._(); + + factory _HouseholdDetailsShowcaseData() => _instance; + + List get showcaseData => [ + dateOfRegistration, + numberOfMembersLivingInHousehold, + ]; + + final dateOfRegistration = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdDetailsShowcase.dateOfRegistration, + ); + + final numberOfMembersLivingInHousehold = ShowcaseItemBuilder( + messageLocalizationKey: + i18.householdDetailsShowcase.numberOfMembersLivingInHousehold, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_location.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_location.dart new file mode 100644 index 000000000..c0f57b187 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_location.dart @@ -0,0 +1,37 @@ +part of 'showcase_constants.dart'; + +class _HouseholdLocationShowcaseData { + static final _HouseholdLocationShowcaseData _instance = + _HouseholdLocationShowcaseData._(); + + _HouseholdLocationShowcaseData._(); + + factory _HouseholdLocationShowcaseData() => _instance; + + List get showcaseData => [ + administrativeArea, + addressLine1, + addressLine2, + landmark, + postalCode, + ]; + + final administrativeArea = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdLocationShowcase.administrativeArea, + ); + + final landmark = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdLocationShowcase.landmark, + ); + + final addressLine1 = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdLocationShowcase.address, + ); + final addressLine2 = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdLocationShowcase.address, + ); + + final postalCode = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdLocationShowcase.postalCode, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_overview.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_overview.dart new file mode 100644 index 000000000..c1bcff6b7 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/household_overview.dart @@ -0,0 +1,57 @@ +part of 'showcase_constants.dart'; + +class _HouseholdOverviewShowcaseData { + static final _HouseholdOverviewShowcaseData _instance = + _HouseholdOverviewShowcaseData._(); + + _HouseholdOverviewShowcaseData._(); + + factory _HouseholdOverviewShowcaseData() => _instance; + + List get showcaseData => [ + deliveryStatus, + householdHead, + administrativeArea, + memberCount, + householdIndividualCard, + editMember, + deliverIntervention, + ]; + + final editHousehold = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.editHousehold, + ); + + final deliveryStatus = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.deliveryStatus, + ); + + final householdHead = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.householdHead, + ); + + final administrativeArea = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.administrativeArea, + ); + + final memberCount = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.memberCount, + ); + + final householdIndividualCard = ShowcaseItemBuilder( + messageLocalizationKey: + i18.householdOverviewShowcase.householdIndividualCardTitle, + ); + + final editMember = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.editMember, + ); + + final addMember = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.addMember, + ); + + final deliverIntervention = ShowcaseItemBuilder( + messageLocalizationKey: i18.householdOverviewShowcase.deliverIntervention, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/individual_details.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/individual_details.dart new file mode 100644 index 000000000..442d9f4b5 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/individual_details.dart @@ -0,0 +1,60 @@ +part of 'showcase_constants.dart'; + +class _IndividualDetailsShowcaseData { + static final _IndividualDetailsShowcaseData _instance = + _IndividualDetailsShowcaseData._(); + + _IndividualDetailsShowcaseData._(); + + factory _IndividualDetailsShowcaseData() => _instance; + + bool hidedata = true; + List get showcaseData { + List data = [ + nameOfIndividual, + headOfHousehold, + idType, + dateOfBirth, + gender, + mobile, + ]; + + // if (!hidedata) { + // data.insert(data.indexOf(nameOfIndividual) + 1, headOfHousehold); + // } + + return data; + } + + final nameOfIndividual = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.firstNameOfIndividual, + ); + + final lastNameOfIndividual = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.lastNameOfIndividual, + ); + + final headOfHousehold = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.headOfHousehold, + ); + + final age = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.age, + ); + + final dateOfBirth = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.dateOfBirth, + ); + + final gender = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.gender, + ); + + final mobile = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.mobile, + ); + + final idType = ShowcaseItemBuilder( + messageLocalizationKey: i18.individualDetailsShowcase.idType, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/search_beneficiaries_showcase.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/search_beneficiaries_showcase.dart new file mode 100644 index 000000000..1762467cc --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/search_beneficiaries_showcase.dart @@ -0,0 +1,67 @@ +part of 'showcase_constants.dart'; + +class _SearchBeneficiariesShowcaseData { + static final _SearchBeneficiariesShowcaseData _instance = + _SearchBeneficiariesShowcaseData._(); + + _SearchBeneficiariesShowcaseData._(); + + factory _SearchBeneficiariesShowcaseData() => _instance; + + List get showcaseData => [ + householdsRegistered, + bednetsDelivered, + nameOfHouseholdHead, + registerNewHousehold, + nameOfBeneficiary, + deliveryStatus, + open, + beneficiary, + age, + gender, + ]; + + final householdsRegistered = ShowcaseItemBuilder( + messageLocalizationKey: + i18.searchBeneficiariesShowcase.numberOfHouseholdsRegistered, + ); + + final bednetsDelivered = ShowcaseItemBuilder( + messageLocalizationKey: + i18.searchBeneficiariesShowcase.numberOfBednetsDelivered, + ); + + final nameOfHouseholdHead = ShowcaseItemBuilder( + messageLocalizationKey: + i18.searchBeneficiariesShowcase.enterNameOfHouseholdHead, + ); + + final registerNewHousehold = ShowcaseItemBuilder( + messageLocalizationKey: + i18.searchBeneficiariesShowcase.registerNewHousehold, + ); + + final nameOfBeneficiary = ShowcaseItemBuilder( + messageLocalizationKey: i18.searchBeneficiariesShowcase.nameOfBeneficiary, + ); + + final deliveryStatus = ShowcaseItemBuilder( + messageLocalizationKey: i18.searchBeneficiariesShowcase.deliveryStatus, + ); + + final open = ShowcaseItemBuilder( + messageLocalizationKey: i18.searchBeneficiariesShowcase.open, + ); + + final beneficiary = ShowcaseItemBuilder( + messageLocalizationKey: i18.searchBeneficiariesShowcase.beneficiary, + ); + + final age = ShowcaseItemBuilder( + messageLocalizationKey: i18.searchBeneficiariesShowcase.age, + ); + + final gender = ShowcaseItemBuilder( + messageLocalizationKey: i18.searchBeneficiariesShowcase.gender, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_checklist.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_checklist.dart new file mode 100644 index 000000000..87b725c9f --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_checklist.dart @@ -0,0 +1,18 @@ +part of 'showcase_constants.dart'; + +class _SelectChecklistShowcaseData { + static final _SelectChecklistShowcaseData _instance = + _SelectChecklistShowcaseData._(); + + _SelectChecklistShowcaseData._(); + + factory _SelectChecklistShowcaseData() => _instance; + + List get showcaseData => [ + selectChecklist, + ]; + + final selectChecklist = ShowcaseItemBuilder( + messageLocalizationKey: i18.selectChecklistShowcase.selectChecklist, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_stock_showcase.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_stock_showcase.dart new file mode 100644 index 000000000..5739ee88a --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/select_stock_showcase.dart @@ -0,0 +1,28 @@ +part of 'showcase_constants.dart'; + +class _SelectStockShowcaseData { + static final _SelectStockShowcaseData _instance = + _SelectStockShowcaseData._(); + + _SelectStockShowcaseData._(); + + factory _SelectStockShowcaseData() => _instance; + + List get showcaseData => [ + recordStockReceipt, + recordStockIssued, + recordStockReturned, + ]; + + final recordStockReceipt = ShowcaseItemBuilder( + messageLocalizationKey: i18.selectStockShowcase.recordStockReceipt, + ); + + final recordStockIssued = ShowcaseItemBuilder( + messageLocalizationKey: i18.selectStockShowcase.recordStockIssued, + ); + + final recordStockReturned = ShowcaseItemBuilder( + messageLocalizationKey: i18.selectStockShowcase.recordStockReturned, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart new file mode 100644 index 000000000..4098dcf63 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/showcase_constants.dart @@ -0,0 +1,40 @@ +import '../../../utils/i18_key_constants.dart' as i18; +import '../showcase_wrappers.dart'; + +part 'checklist_data.dart'; +part 'checklist_list.dart'; +part 'deliver_intervention.dart'; +part 'home_showcase.dart'; +part 'household_details.dart'; +part 'household_location.dart'; +part 'household_overview.dart'; +part 'individual_details.dart'; +part 'search_beneficiaries_showcase.dart'; +part 'select_checklist.dart'; +part 'select_stock_showcase.dart'; +part 'stock_details.dart'; +part 'stock_reconciliation.dart'; +part 'warehouse_details.dart'; +part 'complaints_inbox.dart'; +part 'complaints_details_view.dart'; +part 'complaint_type.dart'; +part 'complaints_details.dart'; + +final homeShowcaseData = _HomePageShowcaseData(); +final searchBeneficiariesShowcaseData = _SearchBeneficiariesShowcaseData(); +final householdLocationShowcaseData = _HouseholdLocationShowcaseData(); +final householdDetailsShowcaseData = _HouseholdDetailsShowcaseData(); +final individualDetailsShowcaseData = _IndividualDetailsShowcaseData(); +final householdOverviewShowcaseData = _HouseholdOverviewShowcaseData(); +final deliverInterventionShowcaseData = _DeliverInterventionShowcaseData(); +final selectStockShowcaseData = _SelectStockShowcaseData(); +final warehouseDetailsShowcaseData = _WarehouseDetailsShowcaseData(); +final stockDetailsShowcaseData = _StockDetailsShowcaseData(); +final stockReconciliationShowcaseData = _StockReconciliationShowcaseData(); +final selectChecklistShowcaseData = _SelectChecklistShowcaseData(); +final checklistDataShowcaseData = _ChecklistDataShowcaseData(); +final checklistListShowcaseData = _ChecklistListShowcaseData(); +final complaintsInboxShowcaseData = _ComplaintsInboxShowcaseData(); +final complaintsDetailsViewShowcaseData = _ComplaintsDetailsViewShowcaseData(); +final complaintTypeShowcaseData = _ComplaintTypeShowcaseData(); +final complaintsDetailsShowcaseData = _ComplaintsDetailsShowcaseData(); diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_details.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_details.dart new file mode 100644 index 000000000..dd688b589 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_details.dart @@ -0,0 +1,138 @@ +part of 'showcase_constants.dart'; + +class _StockDetailsShowcaseData { + static final _StockDetailsShowcaseData _instance = + _StockDetailsShowcaseData._(); + + _StockDetailsShowcaseData._(); + + factory _StockDetailsShowcaseData() => _instance; + + List get showcaseData => [ + receiptReceivedFrom, + receiptNumberOfBednetsReceived, + receiptPackingSlipId, + receiptNumberOfNetsIndicatedOnPackingSlip, + receiptTypeOfTransport, + receiptVehicleNumber, + receiptComments, + receiptDriverName, + issuedIssuedTo, + issuedNumberOfBednetsIssued, + issuedPackingSlipId, + issuedNumberOfBednetsIndicatedOnPackingSlip, + issuedTypeOfTransport, + issuedVehicleNumber, + issuedComments, + issuedDriverName, + returnedReturnedFrom, + returnedNumberOfBednetsReturned, + returnedPackingSlipId, + returnedNumberOfBednetsIndicatedOnPackingSlip, + returnedTypeOfTransport, + returnedVehicleNumber, + returnedDriverName, + ]; + + final receiptReceivedFrom = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReceiptShowcase.receivedFrom, + ); + + final receiptNumberOfBednetsReceived = ShowcaseItemBuilder( + messageLocalizationKey: + i18.stockDetailsReceiptShowcase.numberOfBednetsReceived, + ); + + final receiptPackingSlipId = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReceiptShowcase.packingSlipId, + ); + + final receiptNumberOfNetsIndicatedOnPackingSlip = ShowcaseItemBuilder( + messageLocalizationKey: + i18.stockDetailsReceiptShowcase.numberOfNetsIndicatedOnPackingSlip, + ); + + final receiptTypeOfTransport = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReceiptShowcase.typeOfTransport, + ); + + final receiptVehicleNumber = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReceiptShowcase.vehicleNumber, + ); + + final receiptDriverName = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReceiptShowcase.driverName, + ); + + final receiptComments = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReceiptShowcase.comments, + ); + + final issuedIssuedTo = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsIssuedShowcase.issuedTo, + ); + + final issuedNumberOfBednetsIssued = ShowcaseItemBuilder( + messageLocalizationKey: + i18.stockDetailsIssuedShowcase.numberOfBednetsIssued, + ); + + final issuedPackingSlipId = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsIssuedShowcase.packingSlipId, + ); + + final issuedNumberOfBednetsIndicatedOnPackingSlip = ShowcaseItemBuilder( + messageLocalizationKey: + i18.stockDetailsIssuedShowcase.numberOfNetsIndicatedOnPackingSlip, + ); + + final issuedTypeOfTransport = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsIssuedShowcase.typeOfTransport, + ); + + final issuedVehicleNumber = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsIssuedShowcase.vehicleNumber, + ); + + final issuedDriverName = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsIssuedShowcase.driverName, + ); + + final issuedComments = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsIssuedShowcase.comments, + ); + + final returnedReturnedFrom = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReturnedShowcase.returnedFrom, + ); + + final returnedNumberOfBednetsReturned = ShowcaseItemBuilder( + messageLocalizationKey: + i18.stockDetailsReturnedShowcase.numberOfBednetsReturned, + ); + + final returnedPackingSlipId = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReturnedShowcase.packingSlipId, + ); + + final returnedNumberOfBednetsIndicatedOnPackingSlip = ShowcaseItemBuilder( + messageLocalizationKey: + i18.stockDetailsReturnedShowcase.numberOfNetsIndicatedOnPackingSlip, + ); + + final returnedTypeOfTransport = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReturnedShowcase.typeOfTransport, + ); + + final returnedVehicleNumber = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReturnedShowcase.vehicleNumber, + ); + + final returnedDriverName = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReturnedShowcase.driverName, + ); + + final returnedComments = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockDetailsReturnedShowcase.comments, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_reconciliation.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_reconciliation.dart new file mode 100644 index 000000000..0088a6d0a --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/stock_reconciliation.dart @@ -0,0 +1,49 @@ +part of 'showcase_constants.dart'; + +class _StockReconciliationShowcaseData { + static final _StockReconciliationShowcaseData _instance = + _StockReconciliationShowcaseData._(); + + _StockReconciliationShowcaseData._(); + + factory _StockReconciliationShowcaseData() => _instance; + + List get showcaseData => [ + warehouseName, + dateOfReconciliation, + stockReceived, + stockIssued, + stockOnHand, + manualStockCount, + comments, + ]; + + final warehouseName = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockReconciliationShowcase.warehouseName, + ); + + final dateOfReconciliation = ShowcaseItemBuilder( + messageLocalizationKey: + i18.stockReconciliationShowcase.dateOfReconciliation, + ); + + final stockReceived = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockReconciliationShowcase.stockReceived, + ); + + final stockIssued = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockReconciliationShowcase.stockIssued, + ); + + final stockOnHand = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockReconciliationShowcase.stockOnHand, + ); + + final manualStockCount = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockReconciliationShowcase.manualStockCount, + ); + + final comments = ShowcaseItemBuilder( + messageLocalizationKey: i18.stockReconciliationShowcase.comments, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/warehouse_details.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/warehouse_details.dart new file mode 100644 index 000000000..d4af4a67c --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/config/warehouse_details.dart @@ -0,0 +1,28 @@ +part of 'showcase_constants.dart'; + +class _WarehouseDetailsShowcaseData { + static final _WarehouseDetailsShowcaseData _instance = + _WarehouseDetailsShowcaseData._(); + + _WarehouseDetailsShowcaseData._(); + + factory _WarehouseDetailsShowcaseData() => _instance; + + List get showcaseData => [ + dateOfReceipt, + administrativeUnit, + warehouseName, + ]; + + final dateOfReceipt = ShowcaseItemBuilder( + messageLocalizationKey: i18.warehouseDetailsShowcase.dateOfReceipt, + ); + + final administrativeUnit = ShowcaseItemBuilder( + messageLocalizationKey: i18.warehouseDetailsShowcase.administrativeUnit, + ); + + final warehouseName = ShowcaseItemBuilder( + messageLocalizationKey: i18.warehouseDetailsShowcase.warehouseName, + ); +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart new file mode 100644 index 000000000..ef0f39e35 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_button.dart @@ -0,0 +1,132 @@ +import 'package:digit_components/theme/digit_theme.dart'; +import 'package:digit_showcase/showcase_widget.dart'; +import 'package:flutter/material.dart'; + +import '../../blocs/localization/app_localization.dart'; +import '../../router/app_router.dart'; +import '../../utils/i18_key_constants.dart' as i18; +import '../localized.dart'; +import 'config/showcase_constants.dart'; + +class ShowcaseButton extends LocalizedStatefulWidget { + final Iterable? showcaseFor; + + const ShowcaseButton({super.key, this.showcaseFor}); + + @override + LocalizedState createState() => _ShowcaseButtonState(); +} + +class _ShowcaseButtonState extends LocalizedState { + @override + Widget build(BuildContext context) { + return TextButton( + style: TextButton.styleFrom(padding: EdgeInsets.zero), + onPressed: () { + if (widget.showcaseFor?.isNotEmpty == true) { + ShowcaseWidget.of(context).startShowCase( + widget.showcaseFor!.toList(), + ); + + return; + } + + final current = context.router.current.name; + final paths = _showcasePathsForRoute(current); + + if (paths == null) return; + if (paths.isEmpty) return; + + ShowcaseWidget.of(context).startShowCase(paths.toList()); + }, + child: Row( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB( + kPadding, + kPadding, + kPadding / 2, + kPadding, + ), + child: Text( + AppLocalizations.of(context).translate(i18.common.coreCommonHelp), + overflow: TextOverflow.ellipsis, + ), + ), + const Icon(Icons.help_outline), + ], + ), + ); + } + + Iterable? _showcasePathsForRoute(String routeName) { + switch (routeName) { + case SearchBeneficiaryRoute.name: + return searchBeneficiariesShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case HouseholdLocationRoute.name: + return householdLocationShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case HouseHoldDetailsRoute.name: + return householdDetailsShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case IndividualDetailsRoute.name: + return individualDetailsShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case HouseholdOverviewRoute.name: + return householdOverviewShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case DeliverInterventionRoute.name: + return deliverInterventionShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ManageStocksRoute.name: + return selectStockShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case WarehouseDetailsRoute.name: + return warehouseDetailsShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case StockReconciliationRoute.name: + return stockReconciliationShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ChecklistRoute.name: + return selectChecklistShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ChecklistBoundaryViewRoute.name: + return checklistDataShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ChecklistPreviewRoute.name: + return checklistListShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ComplaintTypeRoute.name: + return complaintTypeShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ComplaintsDetailsRoute.name: + return complaintsDetailsShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ComplaintsInboxRoute.name: + return complaintsInboxShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + case ComplaintsDetailsViewRoute.name: + return complaintsDetailsViewShowcaseData.showcaseData.map( + (e) => e.showcaseKey, + ); + default: + return null; + } + } +} diff --git a/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_wrappers.dart b/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_wrappers.dart new file mode 100644 index 000000000..a2ac9e398 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/widgets/showcase/showcase_wrappers.dart @@ -0,0 +1,65 @@ +import 'package:digit_showcase/showcase.dart'; +import 'package:flutter/material.dart'; + +import '../localized.dart'; + +const kPadding = 8.0; + +class ShowcaseItemBuilder { + final GlobalKey showcaseKey; + final String messageLocalizationKey; + + ShowcaseItemBuilder({required this.messageLocalizationKey}) + : showcaseKey = GlobalKey(debugLabel: messageLocalizationKey); + + Widget buildWith({required Widget child}) => ShowcaseItemWrapperWidget( + showcaseKey: showcaseKey, + messageLocalizationKey: messageLocalizationKey, + child: child, + ); +} + +class ShowcaseItemWrapperWidget extends LocalizedStatefulWidget { + final Widget child; + final String messageLocalizationKey; + final GlobalKey showcaseKey; + + const ShowcaseItemWrapperWidget({ + super.key, + required this.messageLocalizationKey, + required this.child, + required this.showcaseKey, + }); + + @override + LocalizedState createState() => + _ShowcaseItemWrapperWidgetState(); +} + +class _ShowcaseItemWrapperWidgetState + extends LocalizedState { + @override + Widget build(BuildContext context) { + return Showcase( + key: widget.showcaseKey, + disableMovingAnimation: true, + disableScaleAnimation: true, + description: localizations.translate(widget.messageLocalizationKey), + targetPadding: const EdgeInsets.fromLTRB( + kPadding / 2, + kPadding / 2, + kPadding / 2, + kPadding / 2, + ), + child: Container( + padding: const EdgeInsets.fromLTRB( + kPadding / 2, + kPadding / 2, + kPadding / 2, + kPadding / 2, + ), + child: widget.child, + ), + ); + } +} 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 bd160ffbe..3d30ffc1a 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 @@ -22,7 +22,13 @@ class SideBar extends StatelessWidget { final theme = Theme.of(context); return BlocBuilder(builder: (context, state) { - return Column( + return ScrollableContent( + footer: SizedBox( + height: 100, + child: PoweredByDigit( + version: Constants().version, + ), + ), children: [ Container( color: theme.colorScheme.secondary.withOpacity(0.12), @@ -43,7 +49,7 @@ class SideBar extends StatelessWidget { // ), Text( value.userModel.mobileNumber.toString(), - style: theme.textTheme.labelSmall, + style: theme.textTheme.bodyMedium, ), ], ), @@ -127,9 +133,9 @@ class SideBar extends StatelessWidget { ); }).toList(), width: (MediaQuery.of(context).size.width * - 0.56 / + 0.65 / languages.length) - - (4 * languages.length), + (14 * languages.length), ), ) : const Offstage(); @@ -201,9 +207,6 @@ class SideBar extends StatelessWidget { context.read().add(const AuthLogoutEvent()); }, ), - PoweredByDigit( - version: Constants().version, - ), ], ); }); diff --git a/apps/health_campaign_field_worker_app/pubspec.lock b/apps/health_campaign_field_worker_app/pubspec.lock index e808beda8..82e5cddd1 100644 --- a/apps/health_campaign_field_worker_app/pubspec.lock +++ b/apps/health_campaign_field_worker_app/pubspec.lock @@ -455,6 +455,13 @@ packages: relative: true source: path version: "0.0.1" + digit_showcase: + dependency: "direct main" + description: + path: "../../packages/digit_showcase" + relative: true + source: path + version: "0.0.1" dio: dependency: "direct main" description: @@ -636,6 +643,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.2" + flutter_focus_watcher: + dependency: transitive + description: + name: flutter_focus_watcher + sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_keyboard_visibility: dependency: "direct main" description: @@ -793,6 +808,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.1.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: bfc7cc3c75fe1282e8ce2e056d8fd1533f1a6848b65c379b4a5e7a9b623d3371 + url: "https://pub.dev" + source: hosted + version: "2.0.8" flutter_test: dependency: "direct dev" description: flutter @@ -1162,6 +1185,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" path_provider: dependency: "direct main" description: @@ -1222,10 +1253,10 @@ packages: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.4.0" platform: dependency: transitive description: @@ -1719,6 +1750,30 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + url: "https://pub.dev" + source: hosted + version: "1.1.9+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + url: "https://pub.dev" + source: hosted + version: "1.1.9+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + url: "https://pub.dev" + source: hosted + version: "1.1.9+1" vector_math: dependency: transitive description: @@ -1795,10 +1850,10 @@ packages: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.3.0" xxh3: dependency: transitive description: diff --git a/apps/health_campaign_field_worker_app/pubspec.yaml b/apps/health_campaign_field_worker_app/pubspec.yaml index 9b8786475..b9c7b9d43 100644 --- a/apps/health_campaign_field_worker_app/pubspec.yaml +++ b/apps/health_campaign_field_worker_app/pubspec.yaml @@ -46,7 +46,6 @@ dependencies: url_launcher: ^6.1.10 connectivity_plus: ^4.0.1 material_design_icons_flutter: ^6.0.7096 - shared_preferences: ^2.1.0 pretty_dio_logger: ^1.2.0-beta-1 pluto_grid: ^7.0.1 @@ -59,6 +58,8 @@ dependencies: digit_firebase_services: ^0.0.1 package_info_plus: ^4.1.0 expandable: ^5.0.1 + flutter_svg: ^2.0.8 + digit_showcase: ^0.0.1 qr_code_scanner: ^1.0.1 audioplayers: ^5.2.0 gs1_barcode_parser: ^1.0.5 @@ -85,20 +86,23 @@ dependency_overrides: intl: ^0.18.0 flutter_icons: - android: "ic_launcher" + android: 'ic_launcher' ios: true - image_path: "assets/icons/app_icon.png" + image_path: 'assets/icons/app_icon.png' min_sdk_android: 21 flutter: assets: - ./ + - assets/icons/svg/ - ./assets/audio/add.wav - ./assets/audio/buzzer.wav fonts: - family: Roboto fonts: - - asset: assets/fonts/Roboto/RobotoCondensed-Regular.ttf - asset: assets/fonts/Roboto/Roboto-Regular.ttf + - family: RobotoCondensed + fonts: + - asset: assets/fonts/Roboto/RobotoCondensed-Regular.ttf uses-material-design: true diff --git a/packages/digit_components/lib/theme/typography.dart b/packages/digit_components/lib/theme/typography.dart index d87a7f516..20a785f5c 100644 --- a/packages/digit_components/lib/theme/typography.dart +++ b/packages/digit_components/lib/theme/typography.dart @@ -20,8 +20,8 @@ abstract class DigitTypography { _normalBase.copyWith(color: _textColorNormal, fontFamily: 'Roboto'); TextStyle get _light => _normalBase.copyWith(color: _textColorLight, fontFamily: 'Roboto'); - TextStyle get _big => - _displayBase.copyWith(color: _textColorNormal, fontFamily: 'Roboto'); + TextStyle get _big => _displayBase.copyWith( + color: _textColorNormal, fontFamily: 'Roboto Condensed'); /// Follows Digit Typography standards /// @@ -68,14 +68,14 @@ class DigitMobileTypography extends DigitTypography { displayMedium: _big.copyWith( fontSize: 32, fontWeight: FontWeight.w700, - fontFamily: 'Roboto Condensed', + fontFamily: 'RobotoCondensed', ), headlineLarge: _normal.copyWith( fontSize: 24, fontWeight: FontWeight.w700, ), headlineMedium: _normal.copyWith( - fontSize: 18, + fontSize: 20, fontWeight: FontWeight.w700, ), headlineSmall: _normal.copyWith( @@ -99,11 +99,11 @@ class DigitMobileTypography extends DigitTypography { fontFamily: 'Roboto', ), labelLarge: _normal.copyWith( - fontSize: 19, + fontSize: 24, fontWeight: FontWeight.w500, ), labelMedium: _light.copyWith( - fontSize: 18, + fontSize: 20, fontWeight: FontWeight.w400, fontFamily: 'Roboto', ), diff --git a/packages/digit_components/lib/widgets/atoms/checkbox_icon.dart b/packages/digit_components/lib/widgets/atoms/checkbox_icon.dart index 1ab4c54d4..c136ce225 100644 --- a/packages/digit_components/lib/widgets/atoms/checkbox_icon.dart +++ b/packages/digit_components/lib/widgets/atoms/checkbox_icon.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; class CheckboxIcon extends StatelessWidget { final bool value; - // Constructor for the DigitCheckbox widget with required parameters const CheckboxIcon({ super.key, @@ -21,19 +20,21 @@ class CheckboxIcon extends StatelessWidget { height: 24.0, decoration: BoxDecoration( border: Border.all( - color: value ? DigitColors().burningOrange : DigitColors().davyGray, + color: value + ? const DigitColors().burningOrange + : const DigitColors().davyGray, width: 2.0, ), borderRadius: BorderRadius.zero, ), child: value ? Center( - child: Icon( - Icons.check, - size: 16.0, - color: DigitColors().burningOrange, - ), - ) + child: Icon( + Icons.check, + size: 16.0, + color: const DigitColors().burningOrange, + ), + ) : null, ); } diff --git a/packages/digit_components/lib/widgets/atoms/digit_action_dialog.dart b/packages/digit_components/lib/widgets/atoms/digit_action_dialog.dart index 690f767d9..98d03f9f4 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_action_dialog.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_action_dialog.dart @@ -25,6 +25,8 @@ class DigitActionDialog extends StatelessWidget { AlertDialog( insetPadding: EdgeInsets.zero, content: widget, + contentPadding: const EdgeInsets.fromLTRB( + kPadding, kPadding * 2, kPadding, kPadding * 2), ), ], ), diff --git a/packages/digit_components/lib/widgets/atoms/digit_checkbox.dart b/packages/digit_components/lib/widgets/atoms/digit_checkbox.dart index cdf704a82..aac06a78b 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_checkbox.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_checkbox.dart @@ -1,3 +1,4 @@ +import 'package:digit_components/widgets/atoms/checkbox_icon.dart'; import 'package:flutter/material.dart'; /*A single checkbox component */ @@ -5,6 +6,7 @@ class DigitCheckbox extends StatelessWidget { final bool value; final String label; final ValueChanged? onChanged; + final EdgeInsetsGeometry padding; // Constructor for the DigitCheckbox widget with required parameters const DigitCheckbox({ @@ -12,6 +14,7 @@ class DigitCheckbox extends StatelessWidget { required this.label, this.onChanged, this.value = false, + this.padding = const EdgeInsets.only(left: 4.0), }); @override @@ -19,7 +22,7 @@ class DigitCheckbox extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.only(top: 4), + padding: padding, child: InkWell( onTap: () => onChanged?.call(!value), child: Row( @@ -28,26 +31,9 @@ class DigitCheckbox extends StatelessWidget { SizedBox( height: 24, width: 24, - child: Checkbox( + child: CheckboxIcon( value: value, - side: MaterialStateBorderSide.resolveWith((states) { - if (states.contains(MaterialState.selected)) { - return BorderSide( - width: 2.0, - color: theme.colorScheme.secondary, - ); - } - return const BorderSide(width: 1.0); - }), - fillColor: MaterialStateProperty.resolveWith((states) { - if (states.contains(MaterialState.selected)) { - return theme.colorScheme.surface; - } - return theme.colorScheme.secondary; - }), - checkColor: theme.colorScheme.secondary, - onChanged: onChanged, - ), + ) ), const SizedBox(width: 16), Text( diff --git a/packages/digit_components/lib/widgets/atoms/digit_date_form_picker.dart b/packages/digit_components/lib/widgets/atoms/digit_date_form_picker.dart index ba1868768..d9e0cf4ec 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_date_form_picker.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_date_form_picker.dart @@ -60,7 +60,7 @@ class DigitDateFormPicker extends StatelessWidget { Widget build(BuildContext context) { return LabeledField( label: '$label ${isRequired ? '*' : ''}', - padding: padding, + padding: padding ?? const EdgeInsets.only(top: kPadding * 2), labelStyle: Theme.of(context).textTheme.bodyLarge, icon: icon, tooltipMessage: tooltipMessage, diff --git a/packages/digit_components/lib/widgets/atoms/digit_dropdown.dart b/packages/digit_components/lib/widgets/atoms/digit_dropdown.dart index 497058113..7583dbf17 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_dropdown.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_dropdown.dart @@ -27,7 +27,7 @@ class DigitDropdown extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.only(top: kPadding*2), + padding: const EdgeInsets.only(top: kPadding * 2), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -35,7 +35,7 @@ class DigitDropdown extends StatelessWidget { '$label${isRequired ? ' *' : ''}', style: Theme.of(context).textTheme.bodyLarge, ), - const SizedBox(height: kPadding), + const SizedBox(height: kPadding * 2), ReactiveDropdownField( onChanged: (control) { final value = control.value; @@ -45,7 +45,8 @@ class DigitDropdown extends StatelessWidget { validationMessages: validationMessages, formControlName: formControlName, decoration: const InputDecoration( - contentPadding: EdgeInsets.fromLTRB(kPadding*2, 12, kPadding, 12), + contentPadding: + EdgeInsets.fromLTRB(kPadding * 2, 12, kPadding, 12), ), items: menuItems .map( diff --git a/packages/digit_components/lib/widgets/atoms/digit_dropdown_mgram.dart b/packages/digit_components/lib/widgets/atoms/digit_dropdown_mgram.dart new file mode 100644 index 000000000..21fc903bb --- /dev/null +++ b/packages/digit_components/lib/widgets/atoms/digit_dropdown_mgram.dart @@ -0,0 +1,175 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_focus_watcher/flutter_focus_watcher.dart'; +import 'package:provider/provider.dart'; + +class DigitDropdownMgram extends StatefulWidget { + final String labelText; + final List> options; + final dynamic value; + final Function(dynamic) widget; + final bool? isEnabled; + final bool isRequired; + final String? requiredMessage; + final TextEditingController? controller; + + const DigitDropdownMgram( + this.labelText, + this.options, + this.controller, + this.widget, + this.value, + this.isEnabled, + this.isRequired, + this.requiredMessage, { + Key? key, + }) : super(key: key); + + @override + DigitDropdownMgramState createState() => DigitDropdownMgramState(); +} + +class DigitDropdownMgramState extends State { + final FocusNode _focusNode = FocusNode(); + bool isInit = false; + var selectedCode; + List> Options = []; + late OverlayEntry _overlayEntry; + + final LayerLink _layerLink = LayerLink(); + + @override + void initState() { + _focusNode.addListener(() { + if (_focusNode.hasFocus) { + this._overlayEntry = this._createOverlayEntry(); + Overlay.of(context)!.insert(this._overlayEntry); + } else { + this._overlayEntry.remove(); + } + }); + WidgetsBinding.instance!.addPostFrameCallback((_) => afterViewBuild()); + super.initState(); + filerobjects(""); + } + + afterViewBuild() { + var res = widget.options.where((e) => (e.value == (widget.value))); + if (res.isNotEmpty && _focusNode.hasFocus == false) { + widget.controller?.text = (res.first.child as Text).data.toString(); + } + } + + filerobjects(val) { + if (val != "") { + setState(() { + isInit = true; + Options = widget.options + .where((element) => (element.child as Text) + .data + .toString() + .toLowerCase() + .contains(val.toString().toLowerCase())) + .toList(); + }); + } else { + setState(() { + Options = widget.options; + }); + } + } + + OverlayEntry _createOverlayEntry() { + RenderBox? renderBox = context.findRenderObject() as RenderBox?; + + var size = renderBox!.size; + + return OverlayEntry( + builder: (context) => Positioned( + width: size.width, + child: CompositedTransformFollower( + link: this._layerLink, + showWhenUnlinked: true, + offset: Offset(0.0, size.height), + child: Material( + elevation: 4.0, + child: Container( + height: Options.length == 0 && isInit == false + ? (widget.options.length * 50 < 150 + ? widget.options.length * 50 + : 150) + : (Options.length * 50 < 150 ? Options.length * 50 : 150), + child: ListView( + padding: EdgeInsets.zero, + shrinkWrap: true, + children: [ + for (var item in Options.length == 0 && isInit == false + ? widget.options + : Options) + Ink( + color: Colors.white, + child: ListTile( + title: Text((item.child as Text).data.toString()), + onTap: () { + Text txt = item.child as Text; + widget.widget(item.value); + setState(() { + selectedCode = item.value; + }); + widget.controller?.text = txt.data.toString(); + _focusNode.unfocus(); + }, + )), + ], + ), + ), + ), + ))); + } + + @override + Widget build(BuildContext context) { + return Column(children: [ + SizedBox( + height: 0, + ), + CompositedTransformTarget( + link: this._layerLink, + child: ForceFocusWatcher( + child: TextFormField( + style: Theme.of(context).textTheme.bodyLarge, + controller: widget.controller, + onChanged: (value) => filerobjects(value), + focusNode: this._focusNode, + validator: (value) { + if ((value ?? '').trim().isEmpty && !widget.isRequired) { + return null; + } else if (value!.isEmpty && widget.isRequired) { + return widget.requiredMessage ?? '${widget.labelText}_REQUIRED'; + } else if (widget.options + .where((element) => + (element.child as Text).data.toString().toLowerCase() == + (value.toString().toLowerCase())) + .toList() + .isEmpty) { + return widget.requiredMessage ?? 'INVALID_SELECTED_INPUT'; + } + if (value.trim().isEmpty && widget.isRequired) { + return widget.requiredMessage ?? '${widget.labelText}_REQUIRED'; + } + return null; + }, + decoration: InputDecoration( + suffixIcon: Icon(Icons.arrow_drop_down), + errorMaxLines: 2, + enabled: widget.isEnabled ?? true, + fillColor: widget.isEnabled != null && widget.isEnabled! + ? Colors.grey + : Colors.white, + prefixIconConstraints: BoxConstraints(minWidth: 0, minHeight: 0), + ), + ), + ), + ), + ]); + } +} diff --git a/packages/digit_components/lib/widgets/atoms/digit_icon_button.dart b/packages/digit_components/lib/widgets/atoms/digit_icon_button.dart index d0acb196d..8868ac1e0 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_icon_button.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_icon_button.dart @@ -44,13 +44,12 @@ class DigitIconButton extends StatelessWidget { width: 4, ), if (iconText != null) - Flexible( - child: Text( + Text( iconText!, style: TextStyle( color: iconTextColor ?? theme.colorScheme.secondary, fontSize: 16), - )), + ), ], ), ); diff --git a/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart b/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart index baeae6001..7f93e5da5 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_integer_form_picker.dart @@ -25,6 +25,7 @@ class DigitIntegerFormPicker extends StatelessWidget { Widget build(BuildContext context) { if (!incrementer) { return LabeledField( + padding: const EdgeInsets.only(top: kPadding * 2), label: label, child: ReactiveTextField( formControlName: formControlName, @@ -35,6 +36,8 @@ class DigitIntegerFormPicker extends StatelessWidget { return LabeledField( label: label, + padding: const EdgeInsets.only(top: kPadding * 2), + labelStyle: Theme.of(context).textTheme.bodyLarge, child: IntrinsicHeight( child: Row( children: [ diff --git a/packages/digit_components/lib/widgets/atoms/digit_outline_icon_button.dart b/packages/digit_components/lib/widgets/atoms/digit_outline_icon_button.dart index cc4a10ebb..716640ef8 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_outline_icon_button.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_outline_icon_button.dart @@ -21,25 +21,43 @@ class DigitOutlineIconButton extends StatelessWidget { @override Widget build(BuildContext context) { - return OutlinedButton( - onPressed: onPressed, - style: buttonStyle, - child: Padding( - padding: const EdgeInsets.all(kPadding / 2), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Flexible( - child: Icon( - icon, - color: iconColor, - )), - const SizedBox(width: kPadding), - Text( - label, - style: textStyle, + return Container( + margin: const EdgeInsets.only( + top: kPadding, + bottom: kPadding, + ), + constraints: const BoxConstraints(maxHeight: 50, minHeight: 40), + child: OutlinedButton( + onPressed: onPressed, + style: buttonStyle ?? + OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), ), - ], + child: Padding( + padding: const EdgeInsets.all(kPadding / 2), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Flexible( + child: Icon( + icon, + color: iconColor, + )), + const SizedBox(width: kPadding), + Text( + label, + style: textStyle ?? + DigitTheme.instance.mobileTheme.textTheme.headlineSmall + ?.apply( + color: onPressed != null + ? DigitTheme.instance.colorScheme.secondary + : DigitTheme.instance.colorScheme.outline, + ), + ), + ], + ), ), ), ); diff --git a/packages/digit_components/lib/widgets/atoms/digit_reactive_search_dropdown.dart b/packages/digit_components/lib/widgets/atoms/digit_reactive_search_dropdown.dart new file mode 100644 index 000000000..4c719971e --- /dev/null +++ b/packages/digit_components/lib/widgets/atoms/digit_reactive_search_dropdown.dart @@ -0,0 +1,125 @@ +import 'package:digit_components/digit_components.dart'; +import 'package:digit_components/widgets/atoms/searchable_dropdown_field.dart'; +import 'package:flutter/material.dart'; +import 'package:reactive_forms/reactive_forms.dart'; + +class DigitReactiveSearchDropdown extends StatefulWidget { + final String label; + final List menuItems; + final FormGroup form; + final String formControlName; + final bool isRequired; + final String Function(T value) valueMapper; + final String? validationMessage; + final EdgeInsets? padding; + final void Function(dynamic)? onSelected; + final String emptyText; + + const DigitReactiveSearchDropdown({ + Key? key, + required this.label, + required this.form, + required this.menuItems, + required this.formControlName, + this.isRequired = false, + required this.valueMapper, + this.validationMessage, + this.padding, + this.onSelected, + this.emptyText = 'No Matches Found', + }) : super(key: key); + + @override + _DigitReactiveSearchDropdownState createState() => + _DigitReactiveSearchDropdownState(); +} + +class _DigitReactiveSearchDropdownState + extends State> { + SearchDropdownEditingController? controller = + SearchDropdownEditingController(); + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return LabeledField( + padding: widget.padding ?? const EdgeInsets.only(top: kPadding * 2), + label: '${widget.label}${widget.isRequired ? '*' : ''}', + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SearchDropdownFormField( + form: widget.form, + controller: controller, + formControlName: widget.formControlName, + emptyText: widget.emptyText, + displayItemFn: (dynamic str) => Text( + str != null ? widget.valueMapper(str) : '', + style: const TextStyle(fontSize: 14), + ), + findFn: (dynamic str) async => widget.menuItems, + filterFn: (dynamic item, str) => widget + .valueMapper(item) + .toLowerCase() + .contains(str.toLowerCase()), + dropdownItemFn: + (dynamic item, position, focused, selected, onTap) => ListTile( + title: Text( + widget.valueMapper(item), + style: TextStyle( + color: selected + ? DigitTheme.instance.colorScheme.secondary + : DigitTheme.instance.colorScheme.onSurface, + ), + ), + dense: true, + style: ListTileStyle.list, + contentPadding: const EdgeInsets.all(4.0), + visualDensity: const VisualDensity( + horizontal: VisualDensity.minimumDensity, + ), + tileColor: focused + ? DigitTheme.instance.colorScheme.surface + : Colors.transparent, + onTap: () { + widget.form.control(widget.formControlName).value = item; + onTap(); + if (widget.onSelected != null) { + widget.onSelected!(item); + } + }, + ), + onFieldTap: () { + widget.form.control(widget.formControlName).value = null; + if (widget.isRequired) { + widget.form + .control(widget.formControlName) + .setErrors({'': true}); + } + }, + ), + ReactiveFormConsumer( + builder: (context, form, child) { + final formControl = widget.form.control(widget.formControlName); + if (formControl.hasErrors) { + return Text( + widget.validationMessage ?? '', + style: TextStyle( + color: DigitTheme.instance.colorScheme.error, + fontSize: 12, + ), + ); + } else { + return const SizedBox.shrink(); + } + }, + ), + ], + ), + ); + } +} diff --git a/packages/digit_components/lib/widgets/atoms/digit_text_form_field.dart b/packages/digit_components/lib/widgets/atoms/digit_text_form_field.dart index 3ffdbd0ab..adf20f605 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_text_form_field.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_text_form_field.dart @@ -30,6 +30,7 @@ class DigitTextFormField extends StatelessWidget { final Widget? prefixIcon; final TextStyle? labelStyle; final EdgeInsets? padding; + final bool? hideKeyboard; const DigitTextFormField({ super.key, @@ -58,17 +59,23 @@ class DigitTextFormField extends StatelessWidget { this.hintText, this.labelStyle, this.padding, + this.hideKeyboard = false, }); @override Widget build(BuildContext context) => LabeledField( label: '$label ${isRequired ? '*' : ''}', - padding: padding, + padding: padding ?? + const EdgeInsets.only( + top: kPadding * 2, + ), labelStyle: labelStyle ?? Theme.of(context).textTheme.bodyLarge, child: Column( children: [ Container( - color: readOnly ? const DigitColors().seaShellGray : null, + color: (readOnly && hideKeyboard == false) + ? const DigitColors().seaShellGray + : null, child: ReactiveTextField( onChanged: onChanged, readOnly: readOnly, @@ -82,7 +89,7 @@ class DigitTextFormField extends StatelessWidget { style: TextStyle( fontSize: 16, fontWeight: FontWeight.w400, - color: readOnly + color: (readOnly && hideKeyboard == false) ? const DigitColors().davyGray : DigitTheme.instance.colorScheme.onBackground), obscureText: obscureText, @@ -90,7 +97,7 @@ class DigitTextFormField extends StatelessWidget { keyboardType: keyboardType, inputFormatters: inputFormatters, valueAccessor: valueAccessor, - decoration: readOnly == true + decoration: (readOnly && hideKeyboard == false) ? InputDecoration( enabledBorder: DigitTheme .instance.inputDecorationTheme.disabledBorder, diff --git a/packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart b/packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart new file mode 100644 index 000000000..9c7b8ea89 --- /dev/null +++ b/packages/digit_components/lib/widgets/atoms/searchable_dropdown_field.dart @@ -0,0 +1,467 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:reactive_forms/reactive_forms.dart'; + +class SearchDropdownEditingController extends ChangeNotifier { + T? _value; + SearchDropdownEditingController({T? value}) : _value = value; + + T? get value => _value; + set value(T? newValue) { + if (_value == newValue) return; + _value = newValue; + notifyListeners(); + } + + @override + String toString() => '${describeIdentity(this)}($value)'; +} + +/// Create a dropdown form field +class SearchDropdownFormField extends StatefulWidget { + final bool autoFocus; + + /// It will trigger on user search + final bool Function(T item, String str)? filterFn; + + /// Check item is selected + final bool Function(T? item1, T? item2)? selectedFn; + + /// Return list of items what need to list for dropdown. + final Future> Function(String str) findFn; + + final ListTile Function( + T item, + int position, + bool focused, + bool selected, + Function() onTap, + ) dropdownItemFn; + + /// Build widget to display selected item inside Form Field + final Widget Function(T? item) displayItemFn; + + final InputDecoration? decoration; + final Color? dropdownColor; + final SearchDropdownEditingController? controller; + final void Function(T item)? onChanged; + final void Function(T?)? onSaved; + final FormGroup form; + + /// height of the dropdown overlay, Default: 240 + final double? dropdownHeight; + + /// Style the search box text + final TextStyle? searchTextStyle; + + /// Cursor color of the search box + final Color? cursorColor; + + /// Message to display if the search does not match with any item, Default : "No matching found!" + final String emptyText; + + /// Give action text if you want handle the empty search. + final String emptyActionText; + + /// this function triggers on click of emptyAction button + final Future Function(String value)? onEmptyActionPressed; + + /// Separator between the dropdown items + final Widget? dropdownItemSeparator; + final void Function()? onFieldTap; + final String formControlName; + final ShowErrorsFunction? showErrors; + + const SearchDropdownFormField({ + Key? key, + required this.form, + required this.dropdownItemFn, + required this.displayItemFn, + required this.findFn, + this.filterFn, + this.autoFocus = false, + this.controller, + this.decoration, + this.dropdownColor, + this.onChanged, + this.onSaved, + this.dropdownHeight, + this.searchTextStyle, + this.cursorColor, + this.emptyText = "No matching found!", + this.emptyActionText = 'Create new', + this.onEmptyActionPressed, + this.dropdownItemSeparator, + this.selectedFn, + this.onFieldTap, + required this.formControlName, + this.showErrors, + }) : super(key: key); + + @override + SearchDropdownFormFieldState createState() => + SearchDropdownFormFieldState(); +} + +class SearchDropdownFormFieldState extends State + with SingleTickerProviderStateMixin { + final FocusNode _widgetFocusNode = FocusNode(); + final FocusNode _searchFocusNode = FocusNode(); + final LayerLink _layerLink = LayerLink(); + final ValueNotifier> _listItemsValueNotifier = + ValueNotifier>([]); + final TextEditingController _searchTextController = TextEditingController(); + final SearchDropdownEditingController _controller = + SearchDropdownEditingController(); + + bool _selectedFn(dynamic item1, dynamic item2) { + return item1 == item2; + } + + bool get _isEmpty => _selectedItem == null; + bool _isFocused = false; + + OverlayEntry? _overlayEntry; + OverlayEntry? _overlayBackdropEntry; + List? _options; + int _listItemFocusedPosition = 0; + T? _selectedItem; + Widget? _displayItem; + Timer? _debounce; + String? _lastSearchString; + + SearchDropdownEditingController? get _effectiveController => + widget.controller ?? _controller; + + SearchDropdownFormFieldState() : super(); + + @override + void initState() { + super.initState(); + + if (widget.autoFocus) _widgetFocusNode.requestFocus(); + _selectedItem = widget.form.control(widget.formControlName).value; + _displayItem = + widget.displayItemFn(widget.form.control(widget.formControlName).value); + _searchFocusNode.addListener(() { + if (!_searchFocusNode.hasFocus && _overlayEntry != null) { + _removeOverlay(); + } + }); + } + + @override + void dispose() { + super.dispose(); + _debounce?.cancel(); + _searchTextController.dispose(); + } + + @override + Widget build(BuildContext context) { + // print("_overlayEntry : $_overlayEntry"); + + _displayItem = + widget.displayItemFn(widget.form.control(widget.formControlName).value); + + return CompositedTransformTarget( + link: this._layerLink, + child: GestureDetector( + onTap: () { + _selectedItem = null; + _widgetFocusNode.requestFocus(); + _toggleOverlay(); + if (widget.onFieldTap != null) { + widget.onFieldTap!(); + } + }, + child: Focus( + autofocus: widget.autoFocus, + focusNode: _widgetFocusNode, + onFocusChange: (focused) { + setState(() { + _isFocused = focused; + }); + }, + onKey: (focusNode, event) { + return _onKeyPressed(event); + }, + child: ReactiveFormField( + formControlName: widget.formControlName, + showErrors: widget.showErrors, + builder: (state) { + return InputDecorator( + decoration: widget.decoration ?? + const InputDecoration( + border: UnderlineInputBorder(), + suffixIcon: Icon( + Icons.arrow_drop_down_outlined, + size: 24, + ), + ), + isEmpty: _isEmpty, + isFocused: _isFocused, + child: this._overlayEntry != null + ? EditableText( + textInputAction: TextInputAction.none, + keyboardType: TextInputType.name, + style: widget.searchTextStyle ?? + const TextStyle( + fontSize: 16, color: Colors.black87), + controller: _searchTextController, + cursorColor: widget.cursorColor ?? Colors.black87, + focusNode: _searchFocusNode, + backgroundCursorColor: Colors.transparent, + onChanged: (str) { + if (_overlayEntry == null) { + _addOverlay(); + } + _onTextChanged(str); + }, + onSubmitted: (str) { + _searchTextController.value = + const TextEditingValue(text: ""); + _removeOverlay(); + }, + onEditingComplete: () {}, + ) + : _displayItem ?? Container(), + ); + }, + ), + ), + ), + ); + } + + OverlayEntry _createOverlayEntry() { + final renderObject = context.findRenderObject() as RenderBox; + // print(renderObject); + final Size size = renderObject.size; + + var overlay = OverlayEntry(builder: (context) { + return Positioned( + width: size.width, + child: CompositedTransformFollower( + link: this._layerLink, + showWhenUnlinked: false, + offset: Offset(0.0, size.height), + child: Material( + elevation: 4.0, + child: SizedBox( + height: _options != null && _options!.length > 2 + ? widget.dropdownHeight ?? 140 + : (_options ?? []).length * 55, + child: Container( + color: widget.dropdownColor ?? Colors.white70, + child: ValueListenableBuilder( + valueListenable: _listItemsValueNotifier, + builder: (context, List items, child) { + return _options != null && _options!.isNotEmpty + ? ListView.separated( + separatorBuilder: (context, index) { + return widget.dropdownItemSeparator ?? + Container(); + }, + shrinkWrap: true, + padding: EdgeInsets.zero, + itemCount: _options!.length, + itemBuilder: (context, position) { + T item = _options![position]; + onTap() { + _listItemFocusedPosition = position; + _searchTextController.value = + const TextEditingValue(text: ""); + _removeOverlay(); + _setValue(); + } + + ListTile listTile = widget.dropdownItemFn( + item, + position, + position == _listItemFocusedPosition, + (widget.selectedFn ?? _selectedFn)( + _selectedItem, item), + onTap, + ); + + return listTile; + }) + : Container( + padding: const EdgeInsets.all(16), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Text( + widget.emptyText, + style: const TextStyle( + color: Colors.black45), + ), + if (widget.onEmptyActionPressed != null) + TextButton( + onPressed: () async { + await widget.onEmptyActionPressed!( + _searchTextController + .value.text); + _search(_searchTextController + .value.text); + }, + child: Text(widget.emptyActionText), + ), + ], + ), + ); + })), + )), + ), + ); + }); + + return overlay; + } + + OverlayEntry _createBackdropOverlay() { + return OverlayEntry( + builder: (context) => Positioned( + left: 0, + top: 0, + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + child: GestureDetector( + onTap: () { + _removeOverlay(); + }, + ))); + } + + _addOverlay() { + if (_overlayEntry == null) { + _search(""); + _overlayBackdropEntry = _createBackdropOverlay(); + _overlayEntry = _createOverlayEntry(); + if (_overlayEntry != null) { + // Overlay.of(context)!.insert(_overlayEntry!); + Overlay.of(context).insertAll([_overlayBackdropEntry!, _overlayEntry!]); + setState(() { + _searchFocusNode.requestFocus(); + }); + } + } + } + + /// Detach overlay from the dropdown widget + _removeOverlay() { + if (_overlayEntry != null) { + _overlayBackdropEntry!.remove(); + _overlayEntry!.remove(); + _overlayEntry = null; + _searchTextController.value = TextEditingValue.empty; + setState(() {}); + } + } + + _toggleOverlay() { + if (_overlayEntry == null) { + _addOverlay(); + } else { + _removeOverlay(); + } + } + + _onTextChanged(String? str) { + if (_debounce?.isActive ?? false) _debounce!.cancel(); + _debounce = Timer(const Duration(milliseconds: 300), () { + // print("_onChanged: $_lastSearchString = $str"); + if (_lastSearchString != str) { + _lastSearchString = str; + _search(str ?? ""); + } + }); + } + + _onKeyPressed(RawKeyEvent event) { + // print('_onKeyPressed : ${event.character}'); + if (event.isKeyPressed(LogicalKeyboardKey.enter)) { + if (_searchFocusNode.hasFocus) { + setState(() { + _selectedItem = null; + _effectiveController?.value = null; + _searchTextController.value = const TextEditingValue(text: ""); + _lastSearchString = ""; + _clearValue(); + _displayItem = null; + }); + _removeOverlay(); + // if (widget.onFieldTap != null) { + // widget.onFieldTap!(); + // } + } else { + _toggleOverlay(); + } + return KeyEventResult.ignored; + } else if (event.isKeyPressed(LogicalKeyboardKey.escape)) { + _removeOverlay(); + return KeyEventResult.handled; + } else if (event.isKeyPressed(LogicalKeyboardKey.arrowDown)) { + int v = _listItemFocusedPosition; + v++; + if (v >= _options!.length) v = 0; + _listItemFocusedPosition = v; + _listItemsValueNotifier.value = List.from(_options ?? []); + return KeyEventResult.handled; + } else if (event.isKeyPressed(LogicalKeyboardKey.arrowUp)) { + int v = _listItemFocusedPosition; + v--; + if (v < 0) v = _options!.length - 1; + _listItemFocusedPosition = v; + _listItemsValueNotifier.value = List.from(_options ?? []); + return KeyEventResult.handled; + } + return KeyEventResult.ignored; + } + + _search(String str) async { + List items = await widget.findFn(str) as List; + + if (str.isNotEmpty && widget.filterFn != null) { + items = items.where((item) => widget.filterFn!(item, str)).toList(); + } + + _options = items; + + _listItemsValueNotifier.value = items; + + // print('_search ${_options!.length}'); + } + + _setValue() { + if (_options != null && _options!.isNotEmpty) { + var item = _options![_listItemFocusedPosition]; + _selectedItem = item; + + _effectiveController!.value = _selectedItem; + + if (widget.onChanged != null) { + widget.onChanged!(_selectedItem); + } + } + + setState(() {}); + } + + _clearValue() { + var item; + _effectiveController!.value = item; + + if (widget.onChanged != null) { + widget.onChanged!(_selectedItem); + } + _searchTextController.value = const TextEditingValue(text: ""); + } +} diff --git a/packages/digit_components/lib/widgets/atoms/select_field_builder.dart b/packages/digit_components/lib/widgets/atoms/select_field_builder.dart new file mode 100644 index 000000000..f8b4197d7 --- /dev/null +++ b/packages/digit_components/lib/widgets/atoms/select_field_builder.dart @@ -0,0 +1,114 @@ +import 'package:digit_components/widgets/atoms/digit_dropdown_mgram.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_typeahead/flutter_typeahead.dart'; + +class SelectFieldBuilder extends StatefulWidget { + final String labelText; + final dynamic value; + final String input; + final String prefixText; + final Function(dynamic) widget; + final List> options; + final bool isRequired; + final String? hint; + final bool? readOnly; + final bool? isEnabled; + final String? requiredMessage; + final GlobalKey? contextKey; + final TextEditingController? controller; + final Key? key; + final GlobalKey? suggestionKey; + + const SelectFieldBuilder(this.labelText, this.value, this.input, + this.prefixText, this.widget, this.options, this.isRequired, + {this.hint, + this.isEnabled, + this.readOnly, + this.requiredMessage, + this.contextKey, + this.controller, + this.key, + this.suggestionKey}); + + @override + State createState() => SelectFieldBuilderState(); +} + +class SelectFieldBuilderState extends State { + var suggestionCtrl = SuggestionsBoxController(); + + @override + Widget build(BuildContext context) { +// Label Text + Widget textLabelWidget = + Wrap(direction: Axis.horizontal, children: [ + Text( + widget.labelText, + textAlign: TextAlign.left, + style: Theme.of(context).textTheme.bodyLarge, + ), + Visibility( + visible: widget.isRequired, + child: Text( + widget.isRequired ? ' *' : '', + ), + ), + ]); + + return LayoutBuilder(builder: (context, constraints) { + if (constraints.maxWidth > 760) { + return Container( + key: widget.contextKey, + margin: + const EdgeInsets.only(top: 5.0, bottom: 5, right: 20, left: 20), + child: Row(children: [ + Container( + alignment: Alignment.centerLeft, + width: MediaQuery.of(context).size.width / 3, + padding: const EdgeInsets.only(top: 18, bottom: 3), + child: textLabelWidget), + Container( + width: MediaQuery.of(context).size.width / 2.5, + padding: const EdgeInsets.only(top: 18, bottom: 3), + child: Column( + children: [ + DigitDropdownMgram( + widget.labelText, + widget.options, + widget.controller, + widget.widget, + widget.value, + widget.isEnabled, + widget.isRequired, + widget.requiredMessage, + key: widget.suggestionKey), + ], + )), + ]), + ); + } else { + return Container( + key: widget.contextKey, + margin: const EdgeInsets.only(top: 5.0, bottom: 5, right: 8, left: 8), + child: Column(children: [ + Container( + padding: const EdgeInsets.only(top: 18, bottom: 3), + child: Align( + alignment: Alignment.centerLeft, child: textLabelWidget)), + DigitDropdownMgram( + widget.labelText, + widget.options, + widget.controller, + widget.widget, + widget.value, + widget.isEnabled, + widget.isRequired, + widget.requiredMessage, + key: widget.suggestionKey, + ) + ]), + ); + } + }); + } +} diff --git a/packages/digit_components/lib/widgets/digit_card.dart b/packages/digit_components/lib/widgets/digit_card.dart index 5400ece2f..b3ca01310 100644 --- a/packages/digit_components/lib/widgets/digit_card.dart +++ b/packages/digit_components/lib/widgets/digit_card.dart @@ -1,3 +1,4 @@ +import 'package:digit_components/theme/digit_theme.dart'; import 'package:flutter/material.dart'; class DigitCard extends StatelessWidget { @@ -22,9 +23,11 @@ class DigitCard extends StatelessWidget { onTap: onPressed, child: Padding( padding: padding ?? - const EdgeInsets.symmetric( - vertical: 16, - horizontal: 8, + const EdgeInsets.only( + left: kPadding, + right: kPadding, + top: kPadding * 2, + bottom: kPadding * 2, ), child: child, ), diff --git a/packages/digit_components/lib/widgets/digit_checkbox_tile.dart b/packages/digit_components/lib/widgets/digit_checkbox_tile.dart index 55ffbb661..a5e9ea693 100644 --- a/packages/digit_components/lib/widgets/digit_checkbox_tile.dart +++ b/packages/digit_components/lib/widgets/digit_checkbox_tile.dart @@ -31,12 +31,12 @@ class DigitCheckboxTile extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - value ? - CheckboxIcon() - : - CheckboxIcon(value: true,), - const SizedBox(width: kPadding*2), - + value + ? const CheckboxIcon( + value: true, + ) + : const CheckboxIcon(), + const SizedBox(width: kPadding * 2), Expanded( child: Text( label, diff --git a/packages/digit_components/lib/widgets/digit_dialog.dart b/packages/digit_components/lib/widgets/digit_dialog.dart index e364d2bb6..041b79704 100644 --- a/packages/digit_components/lib/widgets/digit_dialog.dart +++ b/packages/digit_components/lib/widgets/digit_dialog.dart @@ -9,7 +9,6 @@ class DigitDialog extends StatelessWidget { required this.options, }); - static Future show( BuildContext context, { required DigitDialogOptions options, @@ -37,16 +36,18 @@ class DigitDialog extends StatelessWidget { @override Widget build(BuildContext context) => AlertDialog( - title: Padding( padding: options.dialogPadding != null ? options.dialogPadding! - : const EdgeInsets.all(0), + : const EdgeInsets.all(kPadding), child: options.title, ), content: SizedBox( width: MediaQuery.of(context).size.width, - child: options.content, + child: Padding( + padding: const EdgeInsets.only(bottom: kPadding), + child: options.content, + ), ), scrollable: options.isScrollable, actionsAlignment: MainAxisAlignment.spaceBetween, @@ -64,13 +65,16 @@ class DigitDialog extends StatelessWidget { options.secondaryAction!.action?.call(context), label: options.secondaryAction!.label, buttonStyle: OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), backgroundColor: Colors.white, side: BorderSide( width: 1.0, color: Theme.of(context).colorScheme.secondary, ), minimumSize: - Size(MediaQuery.of(context).size.width / 4, 45), + Size(MediaQuery.of(context).size.width / 4, 50), ), ), ), @@ -78,7 +82,6 @@ class DigitDialog extends StatelessWidget { if (options.primaryAction != null) SizedBox( width: MediaQuery.of(context).size.width / 3, - height: 45, child: DigitElevatedButton( onPressed: () => options.primaryAction!.action?.call(context), @@ -93,15 +96,10 @@ class DigitDialog extends StatelessWidget { Column( children: [ if (options.primaryAction != null) - Padding( - padding: options.dialogPadding != null - ? options.dialogPadding! - : const EdgeInsets.all(0), - child: DigitElevatedButton( - onPressed: () => - options.primaryAction!.action?.call(context), - child: Center(child: Text(options.primaryAction!.label)), - ), + DigitElevatedButton( + onPressed: () => + options.primaryAction!.action?.call(context), + child: Center(child: Text(options.primaryAction!.label)), ), if (options.secondaryAction != null) TextButton( @@ -145,7 +143,10 @@ class DigitDialogOptions { this.barrierDismissible = false, this.enableRecordPast = false, this.isScrollable = false, - this.titlePadding = const EdgeInsets.all(kPadding), + this.titlePadding = const EdgeInsets.only( + top: kPadding, + bottom: kPadding, + ), this.contentPadding = const EdgeInsets.all(kPadding), this.barrierColor, this.key, diff --git a/packages/digit_components/lib/widgets/digit_dob_picker.dart b/packages/digit_components/lib/widgets/digit_dob_picker.dart index 8aa175a3a..5da732c56 100644 --- a/packages/digit_components/lib/widgets/digit_dob_picker.dart +++ b/packages/digit_components/lib/widgets/digit_dob_picker.dart @@ -40,9 +40,16 @@ class DigitDobPicker extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.only(top: 16), + padding: const EdgeInsets.only( + top: 8, + bottom: 8, + ), child: Container( - padding: const EdgeInsets.only(left: 8, right: 8, bottom: 16), + padding: const EdgeInsets.only( + left: 8, + right: 8, + bottom: 8, + ), decoration: BoxDecoration( color: theme.colorScheme.surface, borderRadius: BorderRadius.circular(4), @@ -71,6 +78,7 @@ class DigitDobPicker extends StatelessWidget { Expanded( // Text form field for entering the age in years child: DigitTextFormField( + padding: EdgeInsets.zero, maxLength: 3, inputFormatters: [ FilteringTextInputFormatter.digitsOnly, @@ -96,6 +104,7 @@ class DigitDobPicker extends StatelessWidget { Expanded( // Text form field for entering the age in months child: DigitTextFormField( + padding: EdgeInsets.zero, maxLength: 2, inputFormatters: [ FilteringTextInputFormatter.digitsOnly, @@ -117,7 +126,6 @@ class DigitDobPicker extends StatelessWidget { ), ], ), - const SizedBox(height: 8.0), ReactiveFormConsumer( builder: (context, form, child) { final datePickerControl = form.control(datePickerFormControl); diff --git a/packages/digit_components/lib/widgets/digit_elevated_button.dart b/packages/digit_components/lib/widgets/digit_elevated_button.dart index e49e94d5b..573c99d76 100644 --- a/packages/digit_components/lib/widgets/digit_elevated_button.dart +++ b/packages/digit_components/lib/widgets/digit_elevated_button.dart @@ -14,6 +14,10 @@ class DigitElevatedButton extends StatelessWidget { @override Widget build(BuildContext context) { return Container( + margin: const EdgeInsets.only( + top: kPadding, + bottom: kPadding, + ), constraints: const BoxConstraints(maxHeight: 50, minHeight: 40), decoration: BoxDecoration( border: Border( @@ -26,6 +30,12 @@ class DigitElevatedButton extends StatelessWidget { child: ElevatedButton( style: ElevatedButton.styleFrom( tapTargetSize: MaterialTapTargetSize.shrinkWrap, + textStyle: const TextStyle( + color: Colors.black, + fontFamily: 'Roboto', + fontSize: 19, + fontWeight: FontWeight.w500, + ), ), onPressed: onPressed, child: Center(child: child), diff --git a/packages/digit_components/lib/widgets/digit_outline_button.dart b/packages/digit_components/lib/widgets/digit_outline_button.dart index 70a29b460..4e6e147d8 100644 --- a/packages/digit_components/lib/widgets/digit_outline_button.dart +++ b/packages/digit_components/lib/widgets/digit_outline_button.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import '../theme/digit_theme.dart'; + class DigitOutLineButton extends StatelessWidget { final String label; final VoidCallback? onPressed; @@ -17,24 +19,28 @@ class DigitOutLineButton extends StatelessWidget { final theme = Theme.of(context); return OutlinedButton( onPressed: onPressed, - style: onPressed != null - ? buttonStyle - : OutlinedButton.styleFrom( - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: theme.colorScheme.outline, - ), - minimumSize: Size( - MediaQuery.of(context).size.width / 1.25, - 50, - ), + style: buttonStyle ?? + OutlinedButton.styleFrom( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), + backgroundColor: Colors.white, + side: BorderSide( + width: 1.0, + color: onPressed != null + ? theme.colorScheme.secondary + : theme.colorScheme.outline, ), + minimumSize: Size( + MediaQuery.of(context).size.width / 1.25, + 50, + ), + ), child: Padding( - padding: const EdgeInsets.only(left: 15, right: 15), + padding: const EdgeInsets.only(left: kPadding * 2, right: kPadding * 2), child: Text( label, - style: TextStyle( + style: DigitTheme.instance.mobileTheme.textTheme.headlineSmall?.apply( color: onPressed != null ? theme.colorScheme.secondary : theme.colorScheme.outline, diff --git a/packages/digit_components/lib/widgets/digit_reactive_type_ahead.dart b/packages/digit_components/lib/widgets/digit_reactive_type_ahead.dart index 83916294b..a306b5ec5 100644 --- a/packages/digit_components/lib/widgets/digit_reactive_type_ahead.dart +++ b/packages/digit_components/lib/widgets/digit_reactive_type_ahead.dart @@ -165,6 +165,11 @@ class _ReactiveTypeaheadState extends ReactiveFormFieldState { super.unsubscribeControl(); } + /// Method to reset the dropdown by clearing the text in the text controller. + void resetDropdown() { + _textController.clear(); + } + @override void onControlValueChanged(dynamic value) { final effectiveValue = (value == null) ? '' : value.toString(); diff --git a/packages/digit_components/lib/widgets/digit_row_card/digit_row_card.dart b/packages/digit_components/lib/widgets/digit_row_card/digit_row_card.dart index 8a38f2a2d..7dd1c8a94 100644 --- a/packages/digit_components/lib/widgets/digit_row_card/digit_row_card.dart +++ b/packages/digit_components/lib/widgets/digit_row_card/digit_row_card.dart @@ -1,50 +1,60 @@ import 'package:digit_components/models/digit_row_card/digit_row_card_model.dart'; +import 'package:digit_components/theme/digit_theme.dart'; import 'package:flutter/material.dart'; class DigitRowCard extends StatelessWidget { final List rowItems; final ValueChanged? onChanged; final double width; + final double spacing; + final WrapAlignment alignment; - const DigitRowCard({ - super.key, - this.onChanged, - required this.rowItems, - required this.width, - }); + const DigitRowCard( + {super.key, + this.onChanged, + required this.rowItems, + required this.width, + this.spacing = kPadding, + this.alignment = WrapAlignment.start}); @override Widget build(BuildContext context) { final theme = Theme.of(context); - return Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + return Wrap( + alignment: alignment, + spacing: spacing, children: rowItems .map( - (e) => SizedBox( - height: 38, - width: width, - child: GestureDetector( - onTap: () => onChanged?.call(e), - child: Container( - decoration: BoxDecoration( - border: Border.all( + (e) => Padding( + padding: const EdgeInsets.only(top: kPadding), + child: IntrinsicWidth( + stepHeight: 36, + stepWidth: width, + child: GestureDetector( + onTap: () => onChanged?.call(e), + child: Container( + decoration: BoxDecoration( + border: Border.all( + color: e.isSelected + ? theme.colorScheme.secondary + : theme.colorScheme.onBackground, + ), color: e.isSelected ? theme.colorScheme.secondary - : theme.colorScheme.onBackground, + : theme.colorScheme.onSecondary, ), - color: e.isSelected - ? theme.colorScheme.secondary - : theme.colorScheme.onSecondary, - ), - child: Center( - child: Text( - e.label, - style: TextStyle( - fontWeight: FontWeight.w400, - color: e.isSelected - ? theme.colorScheme.onSecondary - : theme.colorScheme.onBackground, + child: Center( + child: Text( + e.label, + style: TextStyle( + fontWeight: FontWeight.w400, + color: e.isSelected + ? theme.colorScheme.onSecondary + : theme.colorScheme.onBackground, + ), + overflow: TextOverflow.ellipsis, + softWrap: false, ), ), ), diff --git a/packages/digit_components/lib/widgets/digit_search_bar.dart b/packages/digit_components/lib/widgets/digit_search_bar.dart index bfd6fc025..74f12d003 100644 --- a/packages/digit_components/lib/widgets/digit_search_bar.dart +++ b/packages/digit_components/lib/widgets/digit_search_bar.dart @@ -1,3 +1,4 @@ +import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; class DigitSearchBar extends StatelessWidget { @@ -33,7 +34,7 @@ class DigitSearchBar extends StatelessWidget { ), margin: margin, child: Padding( - padding: const EdgeInsets.all(10), + padding: const EdgeInsets.all(kPadding), child: TextField( controller: controller, onChanged: onChanged, diff --git a/packages/digit_components/lib/widgets/digit_search_dropdown.dart b/packages/digit_components/lib/widgets/digit_search_dropdown.dart deleted file mode 100644 index 04aab65c3..000000000 --- a/packages/digit_components/lib/widgets/digit_search_dropdown.dart +++ /dev/null @@ -1,73 +0,0 @@ -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; -import 'package:reactive_flutter_typeahead/reactive_flutter_typeahead.dart'; - -import 'digit_reactive_type_ahead.dart'; - -class DigitSearchDropdown extends StatelessWidget { - final Iterable Function(Iterable items, String pattern) - suggestionsCallback; - final SuggestionSelectionCallback? onSuggestionSelected; - final String label; - final T? initialValue; - final String? initialValueText; - final Iterable menuItems; - final String formControlName; - final bool isRequired; - final VoidCallback? onChanged; - final String Function(T value) valueMapper; - final Map? validationMessages; - - const DigitSearchDropdown({ - Key? key, - required this.suggestionsCallback, - this.onSuggestionSelected, - required this.label, - required this.menuItems, - required this.formControlName, - this.isRequired = false, - required this.valueMapper, - this.initialValue, - this.onChanged, - this.validationMessages, - this.initialValueText, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.only(top: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '$label${isRequired ? ' *' : ''}', - style: Theme.of(context).textTheme.bodyLarge, - ), - const SizedBox(height: 8), - DigitReactiveTypeAhead( - formControlName: formControlName, - stringify: valueMapper, - initialValue: initialValue, - initialValueText: initialValueText, - onSuggestionSelected: onSuggestionSelected, - debounceDuration: const Duration(milliseconds: 100), - suggestionsCallback: (pattern) => suggestionsCallback( - menuItems, - pattern, - ), - itemBuilder: (context, item) { - return Padding( - padding: const EdgeInsets.all(kPadding * 2), - child: Text( - valueMapper(item), - style: Theme.of(context).textTheme.bodyLarge, - ), - ); - }, - ), - ], - ), - ); - } -} diff --git a/packages/digit_components/lib/widgets/digit_text_field.dart b/packages/digit_components/lib/widgets/digit_text_field.dart index e820e8c61..eedc484bc 100644 --- a/packages/digit_components/lib/widgets/digit_text_field.dart +++ b/packages/digit_components/lib/widgets/digit_text_field.dart @@ -55,10 +55,18 @@ class DigitTextField extends StatelessWidget { @override Widget build(BuildContext context) { + ValueNotifier errorNotifier = ValueNotifier(null); + return LabeledField( + labelStyle: Theme.of(context).textTheme.bodyLarge, label: isRequired ? "$label *" : label, textStyle: textStyle, child: TextFormField( + onFieldSubmitted: (value) { + if (validator != null) { + errorNotifier.value = validator!(value); + } + }, style: TextStyle( color: readOnly == true ? DigitTheme.instance.colorScheme.shadow diff --git a/packages/digit_components/lib/widgets/labeled_field.dart b/packages/digit_components/lib/widgets/labeled_field.dart index bae1fb5bb..96bb70c5f 100644 --- a/packages/digit_components/lib/widgets/labeled_field.dart +++ b/packages/digit_components/lib/widgets/labeled_field.dart @@ -1,3 +1,4 @@ +import 'package:digit_components/digit_components.dart'; import 'package:flutter/material.dart'; class LabeledField extends StatelessWidget { @@ -26,7 +27,7 @@ class LabeledField extends StatelessWidget { @override Widget build(BuildContext context) => Padding( - padding: padding ?? const EdgeInsets.only(top: 16), + padding: padding ?? const EdgeInsets.only(top: kPadding), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, @@ -36,7 +37,8 @@ class LabeledField extends StatelessWidget { Flexible( child: Text( label, - style: labelStyle ?? Theme.of(context).textTheme.labelSmall, + style: labelStyle ?? + DigitTheme.instance.mobileTheme.textTheme.labelSmall, ), ), icon != null diff --git a/packages/digit_components/lib/widgets/molecules/digit_acknowledgement.dart b/packages/digit_components/lib/widgets/molecules/digit_acknowledgement.dart index 7c8029ac1..99abd3724 100644 --- a/packages/digit_components/lib/widgets/molecules/digit_acknowledgement.dart +++ b/packages/digit_components/lib/widgets/molecules/digit_acknowledgement.dart @@ -82,7 +82,12 @@ class DigitAcknowledgement extends StatelessWidget { ), ), Padding( - padding: DigitTheme.instance.containerMargin, + padding: const EdgeInsets.only( + left: kPadding * 2.5, + right: kPadding * 2, + top: kPadding * 2, + bottom: kPadding * 2, + ), child: Icon( icon, size: 32, @@ -131,33 +136,36 @@ class DigitAcknowledgement extends StatelessWidget { onPressed: secondaryAction, child: Text(secondaryLabel ?? "")), const SizedBox( - height: kPadding, + height: kPadding + 2, ), DigitOutLineButton( - onPressed: action, - label: actionLabel ?? '', - buttonStyle: OutlinedButton.styleFrom( - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: Theme.of(context).colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context).size.width / 1, - 50, + onPressed: action, + label: actionLabel ?? '', + buttonStyle: OutlinedButton.styleFrom( + backgroundColor: Colors.white, + side: BorderSide( + width: 1.0, + color: + Theme.of(context).colorScheme.secondary, + ), + minimumSize: Size( + MediaQuery.of(context).size.width / 1, + 50, + ), + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.zero, + ), ), - shape: null, ), - ), ], ) else if (isActionLabel) Column( children: [ DigitElevatedButton( - onPressed: action, - child: Text(actionLabel ?? ''), - ), + onPressed: action, + child: Text(actionLabel ?? ''), + ), const SizedBox( height: kPadding, ), diff --git a/packages/digit_components/lib/widgets/molecules/digit_language_card.dart b/packages/digit_components/lib/widgets/molecules/digit_language_card.dart index 4c307b46d..8c22d2c28 100644 --- a/packages/digit_components/lib/widgets/molecules/digit_language_card.dart +++ b/packages/digit_components/lib/widgets/molecules/digit_language_card.dart @@ -22,6 +22,10 @@ class DigitLanguageCard extends StatelessWidget { @override Widget build(BuildContext context) { return DigitCard( + padding: const EdgeInsets.symmetric( + vertical: 16, + horizontal: 8, + ), margin: const EdgeInsets.all(8), child: Column( mainAxisAlignment: MainAxisAlignment.end, @@ -30,11 +34,13 @@ class DigitLanguageCard extends StatelessWidget { children: [ appLogo ?? const SizedBox.shrink(), DigitRowCard( + spacing: 20, + alignment: WrapAlignment.spaceBetween, onChanged: onLanguageChange, rowItems: digitRowCardItems, width: (MediaQuery.of(context).size.width / digitRowCardItems.length) - - 16 * digitRowCardItems.length, + 8 * digitRowCardItems.length, ), const SizedBox( height: 24, @@ -42,7 +48,10 @@ class DigitLanguageCard extends StatelessWidget { ), DigitElevatedButton( onPressed: onLanguageSubmit, - child: Center(child: Text(languageSubmitLabel)), + child: Center( + child: Text( + languageSubmitLabel, + )), ), ], ), diff --git a/packages/digit_components/lib/widgets/molecules/digit_list_view.dart b/packages/digit_components/lib/widgets/molecules/digit_list_view.dart index de65f17c7..6c7a04ca4 100644 --- a/packages/digit_components/lib/widgets/molecules/digit_list_view.dart +++ b/packages/digit_components/lib/widgets/molecules/digit_list_view.dart @@ -21,11 +21,11 @@ class DigitListView extends StatelessWidget { Widget build(BuildContext context) { final theme = Theme.of(context); return DigitCard( - onPressed: onPressed, - padding: const EdgeInsets.symmetric( - horizontal: kPadding, - vertical: kPadding * 2, + margin: const EdgeInsets.symmetric( + vertical: kPadding, + horizontal: kPadding*2, ), + onPressed: onPressed, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -39,9 +39,9 @@ class DigitListView extends StatelessWidget { Icon( prefixIcon, color: theme.colorScheme.secondary, - size: 24, + size: kPadding*3, ), - const SizedBox(width: kPadding * 2), + const SizedBox(width: 12), Expanded( child: Text( title, diff --git a/packages/digit_components/lib/widgets/molecules/digit_table.dart b/packages/digit_components/lib/widgets/molecules/digit_table.dart index fa1e5b76b..105889300 100644 --- a/packages/digit_components/lib/widgets/molecules/digit_table.dart +++ b/packages/digit_components/lib/widgets/molecules/digit_table.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:horizontal_data_table/horizontal_data_table.dart'; class DigitTable extends StatelessWidget { - final double columnRowFixedHeight = 52.0; + final double columnRowFixedHeight; final List headerList; final List tableData; final double columnWidth; @@ -20,6 +20,7 @@ class DigitTable extends StatelessWidget { this.height, this.selectedIndex, this.scrollPhysics, + this.columnRowFixedHeight = 52.0, }) : super(key: key); List? _getTitleWidget(ThemeData theme) { @@ -158,7 +159,10 @@ class DigitTable extends StatelessWidget { : columnRowFixedHeight, padding: const EdgeInsets.only(left: 17, right: 5, top: 6, bottom: 6), alignment: Alignment.centerLeft, - child: Text(tableData[index].tableRow.first.label, + child: Text( + tableData[index].tableRow.first.label.toString().length > 28 + ? '${tableData[index].tableRow.first.label.substring(0, 25)}...' + : tableData[index].tableRow.first.label.toString(), style: tableData[index].tableRow.first.style), ), ); diff --git a/packages/digit_components/lib/widgets/molecules/digit_table_card.dart b/packages/digit_components/lib/widgets/molecules/digit_table_card.dart index cc909b607..ebffd3333 100644 --- a/packages/digit_components/lib/widgets/molecules/digit_table_card.dart +++ b/packages/digit_components/lib/widgets/molecules/digit_table_card.dart @@ -19,7 +19,7 @@ class DigitTableCard extends StatelessWidget { this.color, this.padding, this.gap = 0, - this.fraction = 2, + this.fraction = 1.8, this.topPadding, this.labelStyle, this.descriptionStyle, diff --git a/packages/digit_components/lib/widgets/scrollable_content.dart b/packages/digit_components/lib/widgets/scrollable_content.dart index 70527bcfb..cb7d47cc3 100644 --- a/packages/digit_components/lib/widgets/scrollable_content.dart +++ b/packages/digit_components/lib/widgets/scrollable_content.dart @@ -9,48 +9,60 @@ class ScrollableContent extends StatelessWidget { final MainAxisAlignment mainAxisAlignment; final CrossAxisAlignment crossAxisAlignment; final List children; + final bool enableFixedButton; + final Color? backgroundColor; - const ScrollableContent({ - super.key, - this.footer, - this.header, - this.primary, - this.controller, - this.mainAxisAlignment = MainAxisAlignment.start, - this.crossAxisAlignment = CrossAxisAlignment.start, - this.children = const [], - this.slivers = const [], - }); + const ScrollableContent( + {super.key, + this.footer, + this.header, + this.primary, + this.controller, + this.mainAxisAlignment = MainAxisAlignment.start, + this.crossAxisAlignment = CrossAxisAlignment.start, + this.children = const [], + this.slivers = const [], + this.backgroundColor, + this.enableFixedButton = false}); @override Widget build(BuildContext context) { - return CustomScrollView( - controller: controller, - primary: primary, - slivers: [ - if (header != null) SliverToBoxAdapter(child: header), - ...slivers, - SliverFillRemaining( - hasScrollBody: false, - child: Center( - child: Column( - crossAxisAlignment: crossAxisAlignment, - children: [ - Expanded( - child: Column( - mainAxisAlignment: mainAxisAlignment, - children: children, + Widget? bottomNavigationBar; + + if (enableFixedButton) { + bottomNavigationBar = footer!; + } + return Scaffold( + backgroundColor: backgroundColor, + body: CustomScrollView( + controller: controller, + primary: primary, + slivers: [ + if (header != null) SliverToBoxAdapter(child: header), + ...slivers, + SliverFillRemaining( + hasScrollBody: false, + child: Center( + child: Column( + crossAxisAlignment: crossAxisAlignment, + children: [ + Expanded( + child: Column( + mainAxisAlignment: mainAxisAlignment, + children: children, + ), ), - ), - if (footer != null) ...[ - const SizedBox(height: 16), - footer!, + if (footer != null && !enableFixedButton) ...[ + const SizedBox(height: 16), + footer!, + ], ], - ], + ), ), ), - ), - ], + ], + ), + bottomNavigationBar: bottomNavigationBar, ); } } diff --git a/packages/digit_components/lib/widgets/widgets.dart b/packages/digit_components/lib/widgets/widgets.dart index f316347d9..ecd142b73 100644 --- a/packages/digit_components/lib/widgets/widgets.dart +++ b/packages/digit_components/lib/widgets/widgets.dart @@ -5,6 +5,7 @@ export './atoms/digit_dropdown.dart'; export './atoms/digit_integer_form_picker.dart'; export './atoms/digit_outline_icon_button.dart'; export './atoms/digit_reactive_dropdown.dart'; +export './atoms/digit_reactive_search_dropdown.dart'; export './atoms/digit_table_item.dart'; export './atoms/digit_table_item_title.dart'; export './atoms/digit_text_form_field.dart'; @@ -25,10 +26,9 @@ export './molecules/digit_list_view.dart'; export './molecules/digit_loader.dart'; export './molecules/digit_table.dart'; export './molecules/digit_table_card.dart'; +export './molecules/digit_walkthrough.dart'; +export './molecules/digit_walkthrough_wrapper.dart'; export './powered_by_digit.dart'; export './scrollable_content.dart'; export 'atoms/digit_toast_helper.dart'; export 'digit_row_card/digit_row_card.dart'; -export 'digit_search_dropdown.dart'; -export './molecules/digit_walkthrough_wrapper.dart'; -export './molecules/digit_walkthrough.dart'; diff --git a/packages/digit_components/pubspec.yaml b/packages/digit_components/pubspec.yaml index 601e477ff..13d82100d 100644 --- a/packages/digit_components/pubspec.yaml +++ b/packages/digit_components/pubspec.yaml @@ -31,6 +31,8 @@ dependencies: package_info_plus: ^4.1.0 easy_stepper: ^0.5.2+1 intl: ^0.18.0 + flutter_focus_watcher: ^2.0.0 + dev_dependencies: flutter_test: @@ -48,4 +50,7 @@ flutter: - family: Roboto fonts: - asset: assets/fonts/Roboto/Roboto-Regular.ttf + - family: RobotoCondensed + fonts: + - asset: assets/fonts/Roboto/RobotoCondensed-Regular.ttf diff --git a/packages/digit_showcase/.gitignore b/packages/digit_showcase/.gitignore new file mode 100644 index 000000000..96486fd93 --- /dev/null +++ b/packages/digit_showcase/.gitignore @@ -0,0 +1,30 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ diff --git a/packages/digit_showcase/.metadata b/packages/digit_showcase/.metadata new file mode 100644 index 000000000..9596faeed --- /dev/null +++ b/packages/digit_showcase/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 796c8ef79279f9c774545b3771238c3098dbefab + channel: stable + +project_type: package diff --git a/packages/digit_showcase/CHANGELOG.md b/packages/digit_showcase/CHANGELOG.md new file mode 100644 index 000000000..41cc7d819 --- /dev/null +++ b/packages/digit_showcase/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/packages/digit_showcase/LICENSE b/packages/digit_showcase/LICENSE new file mode 100644 index 000000000..64dc86f01 --- /dev/null +++ b/packages/digit_showcase/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Simform Solutions + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/digit_showcase/README.md b/packages/digit_showcase/README.md new file mode 100644 index 000000000..02fe8ecab --- /dev/null +++ b/packages/digit_showcase/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/packages/digit_showcase/analysis_options.yaml b/packages/digit_showcase/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/packages/digit_showcase/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/digit_showcase/lib/digit_showcase.dart b/packages/digit_showcase/lib/digit_showcase.dart new file mode 100644 index 000000000..b957d8201 --- /dev/null +++ b/packages/digit_showcase/lib/digit_showcase.dart @@ -0,0 +1 @@ +library digit_showcase; diff --git a/packages/digit_showcase/lib/layout_overlays.dart b/packages/digit_showcase/lib/layout_overlays.dart new file mode 100644 index 000000000..c21737d4a --- /dev/null +++ b/packages/digit_showcase/lib/layout_overlays.dart @@ -0,0 +1,183 @@ +import 'package:digit_showcase/showcase_widget.dart'; +import 'package:flutter/material.dart'; + +typedef OverlayBuilderCallback = Widget Function( + BuildContext, Rect anchorBounds, Offset anchor); + +/// Displays an overlay Widget anchored directly above the center of this +/// [AnchoredOverlay]. +/// +/// The overlay Widget is created by invoking the provided [overlayBuilder]. +/// +/// The [anchor] position is provided to the [overlayBuilder], but the builder +/// does not have to respect it. In other words, the [overlayBuilder] can +/// interpret the meaning of "anchor" however it wants - the overlay will not +/// be forced to be centered about the [anchor]. +/// +/// The overlay built by this [AnchoredOverlay] can be conditionally shown +/// and hidden by settings the [showOverlay] property to true or false. +/// +/// The [overlayBuilder] is invoked every time this Widget is rebuilt. +/// +class AnchoredOverlay extends StatelessWidget { + final bool showOverlay; + final OverlayBuilderCallback? overlayBuilder; + final Widget? child; + + const AnchoredOverlay({ + Key? key, + this.showOverlay = false, + this.overlayBuilder, + this.child, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + return OverlayBuilder( + showOverlay: showOverlay, + overlayBuilder: (overlayContext) { + // To calculate the "anchor" point we grab the render box of + // our parent Container and then we find the center of that box. + final box = context.findRenderObject() as RenderBox; + final topLeft = + box.size.topLeft(box.localToGlobal(const Offset(0.0, 0.0))); + final bottomRight = + box.size.bottomRight(box.localToGlobal(const Offset(0.0, 0.0))); + Rect anchorBounds; + anchorBounds = (topLeft.dx.isNaN || + topLeft.dy.isNaN || + bottomRight.dx.isNaN || + bottomRight.dy.isNaN) + ? const Rect.fromLTRB(0.0, 0.0, 0.0, 0.0) + : Rect.fromLTRB( + topLeft.dx, + topLeft.dy, + bottomRight.dx, + bottomRight.dy, + ); + final anchorCenter = box.size.center(topLeft); + return overlayBuilder!(overlayContext, anchorBounds, anchorCenter); + }, + child: child, + ); + }, + ); + } +} + +/// Displays an overlay Widget as constructed by the given [overlayBuilder]. +/// +/// The overlay built by the [overlayBuilder] can be conditionally shown and +/// hidden by settings the [showOverlay] property to true or false. +/// +/// The [overlayBuilder] is invoked every time this Widget is rebuilt. +/// +/// Implementation note: the reason we rebuild the overlay every time our state +/// changes is because there doesn't seem to be any better way to invalidate the +/// overlay itself than to invalidate this Widget. Remember, overlay Widgets +/// exist in [OverlayEntry]s which are inaccessible to outside Widgets. But if +/// a better approach is found then feel free to use it. +class OverlayBuilder extends StatefulWidget { + final bool showOverlay; + final WidgetBuilder? overlayBuilder; + final Widget? child; + + const OverlayBuilder({ + Key? key, + this.showOverlay = false, + this.overlayBuilder, + this.child, + }) : super(key: key); + + @override + State createState() => _OverlayBuilderState(); +} + +class _OverlayBuilderState extends State { + OverlayEntry? _overlayEntry; + + @override + void initState() { + super.initState(); + + if (widget.showOverlay) { + WidgetsBinding.instance.addPostFrameCallback((_) => showOverlay()); + } + } + + @override + void didUpdateWidget(OverlayBuilder oldWidget) { + super.didUpdateWidget(oldWidget); + WidgetsBinding.instance.addPostFrameCallback((_) => syncWidgetAndOverlay()); + } + + @override + void reassemble() { + super.reassemble(); + WidgetsBinding.instance.addPostFrameCallback((_) => syncWidgetAndOverlay()); + } + + @override + void dispose() { + if (isShowingOverlay()) { + hideOverlay(); + } + + super.dispose(); + } + + bool isShowingOverlay() => _overlayEntry != null; + + void showOverlay() { + if (_overlayEntry == null) { + // Create the overlay. + _overlayEntry = OverlayEntry( + builder: widget.overlayBuilder!, + ); + addToOverlay(_overlayEntry!); + } else { + // Rebuild overlay. + buildOverlay(); + } + } + + void addToOverlay(OverlayEntry overlayEntry) async { + if (mounted) { + final showCaseContext = ShowcaseWidget.of(context).context; + if (Overlay.maybeOf(showCaseContext) != null) { + Overlay.of(showCaseContext).insert(overlayEntry); + } else if (Overlay.maybeOf(context) != null) { + Overlay.of(context).insert(overlayEntry); + } + } + } + + void hideOverlay() { + if (_overlayEntry != null) { + _overlayEntry!.remove(); + _overlayEntry = null; + } + } + + void syncWidgetAndOverlay() { + if (isShowingOverlay() && !widget.showOverlay) { + hideOverlay(); + } else if (!isShowingOverlay() && widget.showOverlay) { + showOverlay(); + } + } + + void buildOverlay() async { + WidgetsBinding.instance + .addPostFrameCallback((_) => _overlayEntry?.markNeedsBuild()); + } + + @override + Widget build(BuildContext context) { + buildOverlay(); + + return widget.child!; + } +} diff --git a/packages/digit_showcase/lib/measure_size.dart b/packages/digit_showcase/lib/measure_size.dart new file mode 100644 index 000000000..d8567b3da --- /dev/null +++ b/packages/digit_showcase/lib/measure_size.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; + +typedef OnWidgetSizeChange = void Function(Size? size); + +class MeasureSize extends StatefulWidget { + final Widget? child; + final OnWidgetSizeChange onSizeChange; + + const MeasureSize({ + Key? key, + required this.onSizeChange, + required this.child, + }) : super(key: key); + + @override + State createState() => _MeasureSizeState(); +} + +class _MeasureSizeState extends State { + @override + Widget build(BuildContext context) { + SchedulerBinding.instance.addPostFrameCallback(postFrameCallback); + return Container( + key: widgetKey, + child: widget.child, + ); + } + + GlobalKey widgetKey = GlobalKey(); + Size? oldSize; + + void postFrameCallback(Duration timestamp) { + var context = widgetKey.currentContext; + if (context == null) return; + + var newSize = context.size; + if (oldSize == newSize) return; + + oldSize = newSize; + widget.onSizeChange(newSize); + } +} diff --git a/packages/digit_showcase/lib/shape_clipper.dart b/packages/digit_showcase/lib/shape_clipper.dart new file mode 100644 index 000000000..82943b83e --- /dev/null +++ b/packages/digit_showcase/lib/shape_clipper.dart @@ -0,0 +1,50 @@ +import 'dart:ui' as ui; + +import 'package:flutter/material.dart'; + +class RRectClipper extends CustomClipper { + final bool isCircle; + final BorderRadius? radius; + final EdgeInsets overlayPadding; + final Rect area; + + RRectClipper({ + this.isCircle = false, + this.radius, + this.overlayPadding = EdgeInsets.zero, + this.area = Rect.zero, + }); + + @override + ui.Path getClip(ui.Size size) { + final customRadius = + isCircle ? Radius.circular(area.height) : const Radius.circular(3.0); + + final rect = Rect.fromLTRB( + area.left - overlayPadding.left, + area.top - overlayPadding.top, + area.right + overlayPadding.right, + area.bottom + overlayPadding.bottom, + ); + + return Path() + ..fillType = ui.PathFillType.evenOdd + ..addRect(Offset.zero & size) + ..addRRect( + RRect.fromRectAndCorners( + rect, + topLeft: (radius?.topLeft ?? customRadius), + topRight: (radius?.topRight ?? customRadius), + bottomLeft: (radius?.bottomLeft ?? customRadius), + bottomRight: (radius?.bottomRight ?? customRadius), + ), + ); + } + + @override + bool shouldReclip(covariant RRectClipper oldClipper) => + isCircle != oldClipper.isCircle || + radius != oldClipper.radius || + overlayPadding != oldClipper.overlayPadding || + area != oldClipper.area; +} diff --git a/packages/digit_showcase/lib/showcase.dart b/packages/digit_showcase/lib/showcase.dart new file mode 100644 index 000000000..3cf0184d2 --- /dev/null +++ b/packages/digit_showcase/lib/showcase.dart @@ -0,0 +1,711 @@ +import 'dart:async'; +import 'dart:ui'; + +import 'package:digit_showcase/shape_clipper.dart'; +import 'package:digit_showcase/showcase_widget.dart'; +import 'package:digit_showcase/tooltip_widget.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import 'layout_overlays.dart'; + +enum TooltipPosition { top, bottom } + +class GetPosition { + final GlobalKey? key; + final EdgeInsets padding; + final double? screenWidth; + final double? screenHeight; + + GetPosition({ + this.key, + this.padding = EdgeInsets.zero, + this.screenWidth, + this.screenHeight, + }); + + Rect getRect() { + final box = key!.currentContext!.findRenderObject() as RenderBox; + + var boxOffset = box.localToGlobal(const Offset(0.0, 0.0)); + if (boxOffset.dx.isNaN || boxOffset.dy.isNaN) { + return const Rect.fromLTRB(0, 0, 0, 0); + } + final topLeft = box.size.topLeft(boxOffset); + final bottomRight = box.size.bottomRight(boxOffset); + + final rect = Rect.fromLTRB( + topLeft.dx - padding.left < 0 ? 0 : topLeft.dx - padding.left, + topLeft.dy - padding.top < 0 ? 0 : topLeft.dy - padding.top, + bottomRight.dx + padding.right > screenWidth! + ? screenWidth! + : bottomRight.dx + padding.right, + bottomRight.dy + padding.bottom > screenHeight! + ? screenHeight! + : bottomRight.dy + padding.bottom, + ); + return rect; + } + + ///Get the bottom position of the widget + double getBottom() { + final box = key!.currentContext!.findRenderObject() as RenderBox; + final boxOffset = box.localToGlobal(const Offset(0.0, 0.0)); + if (boxOffset.dy.isNaN) return padding.bottom; + final bottomRight = box.size.bottomRight(boxOffset); + return bottomRight.dy + padding.bottom; + } + + ///Get the top position of the widget + double getTop() { + final box = key!.currentContext!.findRenderObject() as RenderBox; + final boxOffset = box.localToGlobal(const Offset(0.0, 0.0)); + if (boxOffset.dy.isNaN) return 0 - padding.top; + final topLeft = box.size.topLeft(boxOffset); + return topLeft.dy - padding.top; + } + + ///Get the left position of the widget + double getLeft() { + final box = key!.currentContext!.findRenderObject() as RenderBox; + final boxOffset = box.localToGlobal(const Offset(0.0, 0.0)); + if (boxOffset.dx.isNaN) return 0 - padding.left; + final topLeft = box.size.topLeft(boxOffset); + return topLeft.dx - padding.left; + } + + ///Get the right position of the widget + double getRight() { + final box = key!.currentContext!.findRenderObject() as RenderBox; + final boxOffset = box.localToGlobal(const Offset(0.0, 0.0)); + if (boxOffset.dx.isNaN) return padding.right; + final bottomRight = + box.size.bottomRight(box.localToGlobal(const Offset(0.0, 0.0))); + return bottomRight.dx + padding.right; + } + + double getHeight() => getBottom() - getTop(); + + double getWidth() => getRight() - getLeft(); + + double getCenter() => (getLeft() + getRight()) / 2; +} + +class Showcase extends StatefulWidget { + /// A key that is unique across the entire app. + /// + /// This Key will be used to control state of individual showcase and also + /// used in [ShowcaseWidgetState.startShowCase] to define position of current + /// target widget while showcasing. + @override + final GlobalKey key; + + /// Target widget that will be showcased or highlighted + final Widget child; + + /// Represents subject line of target widget + final String? title; + + /// Title alignment with in tooltip widget + /// + /// Defaults to [TextAlign.start] + final TextAlign titleAlignment; + + /// Represents summary description of target widget + final String? description; + + /// ShapeBorder of the highlighted box when target widget will be showcased. + /// + /// Note: If [targetBorderRadius] is specified, this parameter will be ignored. + /// + /// Default value is: + /// ```dart + /// RoundedRectangleBorder( + /// borderRadius: BorderRadius.all(Radius.circular(8)), + /// ), + /// ``` + final ShapeBorder targetShapeBorder; + + /// Radius of rectangle box while target widget is being showcased. + final BorderRadius? targetBorderRadius; + + /// TextStyle for default tooltip title + final TextStyle? titleTextStyle; + + /// TextStyle for default tooltip description + final TextStyle? descTextStyle; + + /// Empty space around tooltip content. + /// + /// Default Value for [Showcase] widget is: + /// ```dart + /// EdgeInsets.symmetric(vertical: 8, horizontal: 8) + /// ``` + final EdgeInsets tooltipPadding; + + /// Background color of overlay during showcase. + /// + /// Default value is [Colors.black45] + final Color overlayColor; + + /// Opacity apply on [overlayColor] (which ranges from 0.0 to 1.0) + /// + /// Default to 0.75 + final double overlayOpacity; + + /// Custom tooltip widget when [Showcase.withWidget] is used. + final Widget? container; + + /// Defines background color for tooltip widget. + /// + /// Default to [Colors.white] + final Color tooltipBackgroundColor; + + /// Defines text color of default tooltip when [titleTextStyle] and + /// [descTextStyle] is not provided. + /// + /// Default to [Colors.black] + final Color textColor; + + /// If [enableAutoScroll] is sets to `true`, this widget will be shown above + /// the overlay until the target widget is visible in the viewport. + final Widget scrollLoadingWidget; + + /// Whether the default tooltip will have arrow to point out the target widget. + /// + /// Default to `true` + final bool showArrow; + + /// Height of [container] + final double? height; + + /// Width of [container] + final double? width; + + /// The duration of time the bouncing animation of tooltip should last. + /// + /// Default to [Duration(milliseconds: 2000)] + final Duration movingAnimationDuration; + + /// Triggered when default tooltip is tapped + final VoidCallback? onToolTipClick; + + /// Triggered when showcased target widget is tapped + /// + /// Note: [disposeOnTap] is required if you're using [onTargetClick] + /// otherwise throws error + final VoidCallback? onTargetClick; + + /// Will dispose all showcases if tapped on target widget or tooltip + /// + /// Note: [onTargetClick] is required if you're using [disposeOnTap] + /// otherwise throws error + final bool? disposeOnTap; + + /// Whether tooltip should have bouncing animation while showcasing + /// + /// If null value is provided, + /// [ShowcaseWidget.disableAnimation] will be considered. + final bool? disableMovingAnimation; + + /// Whether disabling initial scale animation for default tooltip when + /// showcase is started and completed + /// + /// Default to `false` + final bool? disableScaleAnimation; + + /// Padding around target widget + /// + /// Default to [EdgeInsets.zero] + final EdgeInsets targetPadding; + + /// Triggered when target has been double tapped + final VoidCallback? onTargetDoubleTap; + + /// Triggered when target has been long pressed. + /// + /// Detected when a pointer has remained in contact with the screen at the same location for a long period of time. + final VoidCallback? onTargetLongPress; + + /// Border Radius of default tooltip + /// + /// Default to [BorderRadius.circular(8)] + final BorderRadius? tooltipBorderRadius; + + /// Description alignment with in tooltip widget + /// + /// Defaults to [TextAlign.start] + final TextAlign descriptionAlignment; + + /// if `disableDefaultTargetGestures` parameter is true + /// onTargetClick, onTargetDoubleTap, onTargetLongPress and + /// disposeOnTap parameter will not work + /// + /// Note: If `disableDefaultTargetGestures` is true then make sure to + /// dismiss current showcase with `ShowCaseWidget.of(context).dismiss()` + /// if you are navigating to other screen. This will be handled by default + /// if `disableDefaultTargetGestures` is set to false. + final bool disableDefaultTargetGestures; + + /// Defines blur value. + /// This will blur the background while displaying showcase. + /// + /// If null value is provided, + /// [ShowcaseWidget.blurValue] will be considered. + /// + final double? blurValue; + + /// A duration for animation which is going to played when + /// tooltip comes first time in the view. + /// + /// Defaults to 300 ms. + final Duration scaleAnimationDuration; + + /// The curve to be used for initial animation of tooltip. + /// + /// Defaults to Curves.easeIn + final Curve scaleAnimationCurve; + + /// An alignment to origin of initial tooltip animation. + /// + /// Alignment will be pre-calculated but if pre-calculated + /// alignment doesn't work then this parameter can be + /// used to customise the direction of the tooltip animation. + /// + /// eg. + /// ```dart + /// Alignment(-0.2,0.3) or Alignment.centerLeft + /// ``` + final Alignment? scaleAnimationAlignment; + + /// Defines vertical position of tooltip respective to Target widget + /// + /// Defaults to adaptive into available space. + final TooltipPosition? tooltipPosition; + + /// Provides padding around the title. Default padding is zero. + final EdgeInsets? titlePadding; + + /// Provides padding around the description. Default padding is zero. + final EdgeInsets? descriptionPadding; + + /// Provides text direction of tooltip title. + final TextDirection? titleTextDirection; + + /// Provides text direction of tooltip description. + final TextDirection? descriptionTextDirection; + + /// Provides a callback when barrier has been clicked. + /// + /// Note-: Even if barrier interactions are disabled, this handler + /// will still provide a callback. + final VoidCallback? onBarrierClick; + + const Showcase({ + required this.key, + required this.description, + required this.child, + this.title, + this.titleAlignment = TextAlign.start, + this.descriptionAlignment = TextAlign.start, + this.targetShapeBorder = const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + this.overlayColor = Colors.black45, + this.overlayOpacity = 0.65, + this.titleTextStyle, + this.descTextStyle, + this.tooltipBackgroundColor = Colors.white, + this.textColor = Colors.black, + this.scrollLoadingWidget = const CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.white), + ), + this.showArrow = true, + this.onTargetClick, + this.disposeOnTap, + this.movingAnimationDuration = const Duration(milliseconds: 2000), + this.disableMovingAnimation, + this.disableScaleAnimation, + this.tooltipPadding = + const EdgeInsets.symmetric(vertical: 8, horizontal: 8), + this.onToolTipClick, + this.targetPadding = EdgeInsets.zero, + this.blurValue, + this.targetBorderRadius, + this.onTargetLongPress, + this.onTargetDoubleTap, + this.tooltipBorderRadius, + this.disableDefaultTargetGestures = false, + this.scaleAnimationDuration = const Duration(milliseconds: 300), + this.scaleAnimationCurve = Curves.easeIn, + this.scaleAnimationAlignment, + this.tooltipPosition, + this.titlePadding, + this.descriptionPadding, + this.titleTextDirection, + this.descriptionTextDirection, + this.onBarrierClick, + }) : height = null, + width = null, + container = null, + assert(overlayOpacity >= 0.0 && overlayOpacity <= 1.0, + "overlay opacity must be between 0 and 1."), + assert(onTargetClick == null || disposeOnTap != null, + "disposeOnTap is required if you're using onTargetClick"), + assert(disposeOnTap == null || onTargetClick != null, + "onTargetClick is required if you're using disposeOnTap"); + + const Showcase.withWidget({ + required this.key, + required this.height, + required this.width, + required this.container, + required this.child, + this.targetShapeBorder = const RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(8), + ), + ), + this.overlayColor = Colors.black45, + this.targetBorderRadius, + this.overlayOpacity = 0.65, + this.scrollLoadingWidget = const CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.white)), + this.onTargetClick, + this.disposeOnTap, + this.movingAnimationDuration = const Duration(milliseconds: 2000), + this.disableMovingAnimation, + this.targetPadding = EdgeInsets.zero, + this.blurValue, + this.onTargetLongPress, + this.onTargetDoubleTap, + this.disableDefaultTargetGestures = false, + this.tooltipPosition, + this.onBarrierClick, + }) : showArrow = false, + onToolTipClick = null, + scaleAnimationDuration = const Duration(milliseconds: 300), + scaleAnimationCurve = Curves.decelerate, + scaleAnimationAlignment = null, + disableScaleAnimation = null, + title = null, + description = null, + titleAlignment = TextAlign.start, + descriptionAlignment = TextAlign.start, + titleTextStyle = null, + descTextStyle = null, + tooltipBackgroundColor = Colors.white, + textColor = Colors.black, + tooltipBorderRadius = null, + tooltipPadding = const EdgeInsets.symmetric(vertical: 8), + titlePadding = null, + descriptionPadding = null, + titleTextDirection = null, + descriptionTextDirection = null, + assert(overlayOpacity >= 0.0 && overlayOpacity <= 1.0, + "overlay opacity must be between 0 and 1."); + + @override + State createState() => _ShowcaseState(); +} + +class _ShowcaseState extends State { + bool _showShowCase = false; + bool _isScrollRunning = false; + bool _isTooltipDismissed = false; + bool _enableShowcase = true; + Timer? timer; + GetPosition? position; + + ShowcaseWidgetState get showCaseWidgetState => ShowcaseWidget.of(context); + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + _enableShowcase = showCaseWidgetState.enableShowcase; + + if (_enableShowcase) { + position ??= GetPosition( + key: widget.key, + padding: widget.targetPadding, + screenWidth: MediaQuery.of(context).size.width, + screenHeight: MediaQuery.of(context).size.height, + ); + showOverlay(); + } + } + + /// show overlay if there is any target widget + void showOverlay() { + final activeStep = ShowcaseWidget.activeTargetWidget(context); + setState(() { + _showShowCase = activeStep == widget.key; + }); + + if (activeStep == widget.key) { + if (showCaseWidgetState.enableAutoScroll) { + _scrollIntoView(); + } + + if (showCaseWidgetState.autoPlay) { + timer = Timer( + Duration(seconds: showCaseWidgetState.autoPlayDelay.inSeconds), + _nextIfAny); + } + } + } + + void _scrollIntoView() { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { + setState(() => _isScrollRunning = true); + await Scrollable.ensureVisible( + widget.key.currentContext!, + duration: showCaseWidgetState.widget.scrollDuration, + alignment: 0.5, + ); + setState(() => _isScrollRunning = false); + }); + } + + @override + Widget build(BuildContext context) { + if (_enableShowcase) { + return AnchoredOverlay( + overlayBuilder: (context, rectBound, offset) { + final size = MediaQuery.of(context).size; + position = GetPosition( + key: widget.key, + padding: widget.targetPadding, + screenWidth: size.width, + screenHeight: size.height, + ); + return buildOverlayOnTarget(offset, rectBound.size, rectBound, size); + }, + showOverlay: true, + child: widget.child, + ); + } + return widget.child; + } + + Future _nextIfAny() async { + if (timer != null && timer!.isActive) { + if (showCaseWidgetState.enableAutoPlayLock) { + return; + } + timer!.cancel(); + } else if (timer != null && !timer!.isActive) { + timer = null; + } + await _reverseAnimateTooltip(); + showCaseWidgetState.completed(widget.key); + } + + Future _getOnTargetTap() async { + if (widget.disposeOnTap == true) { + await _reverseAnimateTooltip(); + showCaseWidgetState.dismiss(); + widget.onTargetClick!(); + } else { + (widget.onTargetClick ?? _nextIfAny).call(); + } + } + + Future _getOnTooltipTap() async { + if (widget.disposeOnTap == true) { + await _reverseAnimateTooltip(); + showCaseWidgetState.dismiss(); + } + widget.onToolTipClick?.call(); + } + + /// Reverse animates the provided tooltip or + /// the custom container widget. + Future _reverseAnimateTooltip() async { + setState(() => _isTooltipDismissed = true); + await Future.delayed(widget.scaleAnimationDuration); + _isTooltipDismissed = false; + } + + Widget buildOverlayOnTarget( + Offset offset, + Size size, + Rect rectBound, + Size screenSize, + ) { + var blur = 1.0; + if (_showShowCase) { + blur = widget.blurValue ?? showCaseWidgetState.blurValue; + } + + // Set blur to 0 if application is running on web and + // provided blur is less than 0. + blur = kIsWeb && blur < 0 ? 0 : blur; + + if (!_showShowCase) return const Offstage(); + + return Stack( + children: [ + GestureDetector( + onTap: () { + if (!showCaseWidgetState.disableBarrierInteraction) { + _nextIfAny(); + } + widget.onBarrierClick?.call(); + }, + child: ClipPath( + clipper: RRectClipper( + area: _isScrollRunning ? Rect.zero : rectBound, + isCircle: widget.targetShapeBorder is CircleBorder, + radius: _isScrollRunning + ? BorderRadius.zero + : widget.targetBorderRadius, + overlayPadding: + _isScrollRunning ? EdgeInsets.zero : widget.targetPadding, + ), + child: blur != 0 + ? BackdropFilter( + filter: ImageFilter.blur(sigmaX: blur, sigmaY: blur), + child: Container( + padding: const EdgeInsets.all(8.0 / 2), + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + decoration: BoxDecoration( + color: widget.overlayColor + .withOpacity(widget.overlayOpacity), + ), + ), + ) + : Container( + padding: const EdgeInsets.fromLTRB( + 8.0, + 8.0, + 8.0, + 8.0, + ), + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + decoration: BoxDecoration( + color: widget.overlayColor + .withOpacity(widget.overlayOpacity), + ), + ), + ), + ), + if (_isScrollRunning) Center(child: widget.scrollLoadingWidget), + if (!_isScrollRunning) ...[ + _TargetWidget( + offset: offset, + size: size, + onTap: _getOnTargetTap, + radius: widget.targetBorderRadius, + onDoubleTap: widget.onTargetDoubleTap, + onLongPress: widget.onTargetLongPress, + shapeBorder: widget.targetShapeBorder, + disableDefaultChildGestures: widget.disableDefaultTargetGestures, + ), + ToolTipWidget( + onNext: () { + _nextIfAny(); + }, + onSkip: () { + showCaseWidgetState.dismiss(); + }, + nextTitle: 'Next', + position: position, + offset: offset, + screenSize: screenSize, + title: widget.title, + titleAlignment: widget.titleAlignment, + description: widget.description, + descriptionAlignment: widget.descriptionAlignment, + titleTextStyle: widget.titleTextStyle, + descTextStyle: widget.descTextStyle, + container: widget.container, + tooltipBackgroundColor: widget.tooltipBackgroundColor, + textColor: widget.textColor, + showArrow: widget.showArrow, + contentHeight: widget.height, + contentWidth: widget.width, + onTooltipTap: _getOnTooltipTap, + tooltipPadding: widget.tooltipPadding, + disableMovingAnimation: widget.disableMovingAnimation ?? + showCaseWidgetState.disableMovingAnimation, + disableScaleAnimation: widget.disableScaleAnimation ?? + showCaseWidgetState.disableScaleAnimation, + movingAnimationDuration: widget.movingAnimationDuration, + tooltipBorderRadius: widget.tooltipBorderRadius, + scaleAnimationDuration: widget.scaleAnimationDuration, + scaleAnimationCurve: widget.scaleAnimationCurve, + scaleAnimationAlignment: widget.scaleAnimationAlignment, + isTooltipDismissed: _isTooltipDismissed, + tooltipPosition: widget.tooltipPosition, + titlePadding: widget.titlePadding, + descriptionPadding: widget.descriptionPadding, + titleTextDirection: widget.titleTextDirection, + descriptionTextDirection: widget.descriptionTextDirection, + ), + ], + ], + ); + } +} + +class _TargetWidget extends StatelessWidget { + final Offset offset; + final Size? size; + final VoidCallback? onTap; + final VoidCallback? onDoubleTap; + final VoidCallback? onLongPress; + final ShapeBorder? shapeBorder; + final BorderRadius? radius; + final bool disableDefaultChildGestures; + + const _TargetWidget({ + Key? key, + required this.offset, + this.size, + this.onTap, + this.shapeBorder, + this.radius, + this.onDoubleTap, + this.onLongPress, + this.disableDefaultChildGestures = false, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Positioned( + top: offset.dy, + left: offset.dx, + child: disableDefaultChildGestures + ? IgnorePointer( + child: targetWidgetContent(), + ) + : targetWidgetContent(), + ); + } + + Widget targetWidgetContent() { + return FractionalTranslation( + translation: const Offset(-0.5, -0.5), + child: GestureDetector( + onTap: onTap, + onLongPress: onLongPress, + onDoubleTap: onDoubleTap, + child: Container( + height: size!.height + 200, + width: size!.width + 200, + decoration: ShapeDecoration( + shape: radius != null + ? RoundedRectangleBorder(borderRadius: radius!) + : shapeBorder ?? + const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + ), + ), + ), + ); + } +} diff --git a/packages/digit_showcase/lib/showcase_widget.dart b/packages/digit_showcase/lib/showcase_widget.dart new file mode 100644 index 000000000..e680fecbc --- /dev/null +++ b/packages/digit_showcase/lib/showcase_widget.dart @@ -0,0 +1,231 @@ +import 'package:flutter/material.dart'; + +class ShowcaseWidget extends StatefulWidget { + final Builder builder; + + /// Triggered when all the showcases are completed. + final VoidCallback? onFinish; + + /// Triggered every time on start of each showcase. + final Function(int?, GlobalKey)? onStart; + + /// Triggered every time on completion of each showcase + final Function(int?, GlobalKey)? onComplete; + + /// Whether all showcases will auto sequentially start + /// having time interval of [autoPlayDelay] . + /// + /// Default to `false` + final bool autoPlay; + + /// Visibility time of current showcase when [autoplay] sets to true. + /// + /// Default to [Duration(seconds: 3)] + final Duration autoPlayDelay; + + /// Whether blocking user interaction while [autoPlay] is enabled. + /// + /// Default to `false` + final bool enableAutoPlayLock; + + /// Whether disabling bouncing/moving animation for all tooltips + /// while showcasing + /// + /// Default to `false` + final bool disableMovingAnimation; + + /// Whether disabling initial scale animation for all the default tooltips + /// when showcase is started and completed + /// + /// Default to `false` + final bool disableScaleAnimation; + + /// Whether disabling barrier interaction + final bool disableBarrierInteraction; + + /// Provides time duration for auto scrolling when [enableAutoScroll] is true + final Duration scrollDuration; + + /// Default overlay blur used by showcase. if [Showcase.blurValue] + /// is not provided. + /// + /// Default value is 0. + final double blurValue; + + /// While target widget is out viewport then + /// whether enabling auto scroll so as to make the target widget visible. + final bool enableAutoScroll; + + /// Enable/disable showcase globally. Enabled by default. + final bool enableShowcase; + + const ShowcaseWidget({ + required this.builder, + this.onFinish, + this.onStart, + this.onComplete, + this.autoPlay = false, + this.autoPlayDelay = const Duration(milliseconds: 2000), + this.enableAutoPlayLock = false, + this.blurValue = 0, + this.scrollDuration = const Duration(milliseconds: 300), + this.disableMovingAnimation = false, + this.disableScaleAnimation = false, + this.enableAutoScroll = false, + this.disableBarrierInteraction = false, + this.enableShowcase = true, + }); + + static GlobalKey? activeTargetWidget(BuildContext context) { + return context + .dependOnInheritedWidgetOfExactType<_InheritedShowCaseView>() + ?.activeWidgetIds; + } + + static ShowcaseWidgetState of(BuildContext context) { + final state = context.findAncestorStateOfType(); + if (state != null) { + return state; + } else { + throw Exception('Please provide ShowCaseView context'); + } + } + + @override + ShowcaseWidgetState createState() => ShowcaseWidgetState(); +} + +class ShowcaseWidgetState extends State { + List? ids; + int? activeWidgetId; + + /// These properties are only here so that it can be accessed by + /// [Showcase] + bool get autoPlay => widget.autoPlay; + + bool get disableMovingAnimation => widget.disableMovingAnimation; + + bool get disableScaleAnimation => widget.disableScaleAnimation; + + Duration get autoPlayDelay => widget.autoPlayDelay; + + bool get enableAutoPlayLock => widget.enableAutoPlayLock; + + bool get enableAutoScroll => widget.enableAutoScroll; + + bool get disableBarrierInteraction => widget.disableBarrierInteraction; + + bool get enableShowcase => widget.enableShowcase; + + /// Returns value of [ShowcaseWidget.blurValue] + double get blurValue => widget.blurValue; + + /// Starts Showcase view from the beginning of specified list of widget ids. + /// If this function is used when showcase has been disabled then it will + /// throw an exception. + void startShowCase(List widgetIds) { + if (!enableShowcase) { + throw Exception( + "You are trying to start Showcase while it has been disabled with " + "`enableShowcase` parameter to false from ShowCaseWidget", + ); + } + if (!mounted) return; + setState(() { + ids = widgetIds; + activeWidgetId = 0; + _onStart(); + }); + } + + /// Completes showcase of given key and starts next one + /// otherwise will finish the entire showcase view + void completed(GlobalKey? key) { + if (ids != null && ids![activeWidgetId!] == key && mounted) { + setState(() { + _onComplete(); + activeWidgetId = activeWidgetId! + 1; + _onStart(); + + if (activeWidgetId! >= ids!.length) { + _cleanupAfterSteps(); + widget.onFinish?.call(); + } + }); + } + } + + /// Completes current active showcase and starts next one + /// otherwise will finish the entire showcase view + void next() { + if (ids != null && mounted) { + setState(() { + _onComplete(); + activeWidgetId = activeWidgetId! + 1; + _onStart(); + + if (activeWidgetId! >= ids!.length) { + _cleanupAfterSteps(); + widget.onFinish?.call(); + } + }); + } + } + + /// Completes current active showcase and starts previous one + /// otherwise will finish the entire showcase view + void previous() { + if (ids != null && ((activeWidgetId ?? 0) - 1) >= 0 && mounted) { + setState(() { + _onComplete(); + activeWidgetId = activeWidgetId! - 1; + _onStart(); + if (activeWidgetId! >= ids!.length) { + _cleanupAfterSteps(); + widget.onFinish?.call(); + } + }); + } + } + + /// Dismiss entire showcase view + void dismiss() { + if (mounted) setState(_cleanupAfterSteps); + } + + void _onStart() { + if (activeWidgetId! < ids!.length) { + widget.onStart?.call(activeWidgetId, ids![activeWidgetId!]); + } + } + + void _onComplete() { + widget.onComplete?.call(activeWidgetId, ids![activeWidgetId!]); + } + + void _cleanupAfterSteps() { + ids = null; + activeWidgetId = null; + } + + @override + Widget build(BuildContext context) { + return _InheritedShowCaseView( + activeWidgetIds: ids?.elementAt(activeWidgetId!), + child: widget.builder, + ); + } +} + +class _InheritedShowCaseView extends InheritedWidget { + final GlobalKey? activeWidgetIds; + + const _InheritedShowCaseView({ + required this.activeWidgetIds, + required Widget child, + }) : super(child: child); + + @override + bool updateShouldNotify(_InheritedShowCaseView oldWidget) => + oldWidget.activeWidgetIds != activeWidgetIds; +} diff --git a/packages/digit_showcase/lib/tooltip_widget.dart b/packages/digit_showcase/lib/tooltip_widget.dart new file mode 100644 index 000000000..5d260e060 --- /dev/null +++ b/packages/digit_showcase/lib/tooltip_widget.dart @@ -0,0 +1,601 @@ +import 'dart:math'; + +import 'package:digit_showcase/showcase.dart'; +import 'package:flutter/material.dart'; + +import 'measure_size.dart'; + +const _kDefaultPaddingFromParent = 14.0; + +class ToolTipWidget extends StatefulWidget { + final VoidCallback? onSkip; + final VoidCallback? onNext; + final String? nextTitle; + final GetPosition? position; + final Offset? offset; + final Size? screenSize; + final String? title; + final TextAlign? titleAlignment; + final String? description; + final TextAlign? descriptionAlignment; + final TextStyle? titleTextStyle; + final TextStyle? descTextStyle; + final Widget? container; + final Color? tooltipBackgroundColor; + final Color? textColor; + final bool showArrow; + final double? contentHeight; + final double? contentWidth; + final VoidCallback? onTooltipTap; + final EdgeInsets? tooltipPadding; + final Duration movingAnimationDuration; + final bool disableMovingAnimation; + final bool disableScaleAnimation; + final BorderRadius? tooltipBorderRadius; + final Duration scaleAnimationDuration; + final Curve scaleAnimationCurve; + final Alignment? scaleAnimationAlignment; + final bool isTooltipDismissed; + final TooltipPosition? tooltipPosition; + final EdgeInsets? titlePadding; + final EdgeInsets? descriptionPadding; + final TextDirection? titleTextDirection; + final TextDirection? descriptionTextDirection; + + const ToolTipWidget({ + Key? key, + this.onSkip, + this.onNext, + this.nextTitle, + required this.position, + required this.offset, + required this.screenSize, + required this.title, + required this.titleAlignment, + required this.description, + required this.titleTextStyle, + required this.descTextStyle, + required this.container, + required this.tooltipBackgroundColor, + required this.textColor, + required this.showArrow, + required this.contentHeight, + required this.contentWidth, + required this.onTooltipTap, + required this.movingAnimationDuration, + required this.descriptionAlignment, + this.tooltipPadding = const EdgeInsets.symmetric(vertical: 8), + required this.disableMovingAnimation, + required this.disableScaleAnimation, + required this.tooltipBorderRadius, + required this.scaleAnimationDuration, + required this.scaleAnimationCurve, + this.scaleAnimationAlignment, + this.isTooltipDismissed = false, + this.tooltipPosition, + this.titlePadding, + this.descriptionPadding, + this.titleTextDirection, + this.descriptionTextDirection, + }) : super(key: key); + + @override + State createState() => _ToolTipWidgetState(); +} + +class _ToolTipWidgetState extends State + with TickerProviderStateMixin { + Offset? position; + + bool isArrowUp = false; + + late final AnimationController _movingAnimationController; + late final Animation _movingAnimation; + late final AnimationController _scaleAnimationController; + late final Animation _scaleAnimation; + + double tooltipWidth = 0; + double tooltipScreenEdgePadding = 20; + double tooltipTextPadding = 15; + + TooltipPosition findPositionForContent(Offset position) { + var height = 120.0; + height = widget.contentHeight ?? height; + final bottomPosition = + position.dy + ((widget.position?.getHeight() ?? 0) / 2); + final topPosition = position.dy - ((widget.position?.getHeight() ?? 0) / 2); + final hasSpaceInTop = topPosition >= height; + final EdgeInsets viewInsets = EdgeInsets.fromViewPadding( + View.of(context).viewInsets, View.of(context).devicePixelRatio); + final double actualVisibleScreenHeight = + (widget.screenSize?.height ?? MediaQuery.of(context).size.height) - + viewInsets.bottom; + final hasSpaceInBottom = + (actualVisibleScreenHeight - bottomPosition) >= height; + return widget.tooltipPosition ?? + (hasSpaceInTop && !hasSpaceInBottom + ? TooltipPosition.top + : TooltipPosition.bottom); + } + + void _getTooltipWidth() { + final titleStyle = widget.titleTextStyle ?? + Theme.of(context) + .textTheme + .titleLarge! + .merge(TextStyle(color: widget.textColor)); + final descriptionStyle = widget.descTextStyle ?? + Theme.of(context) + .textTheme + .titleSmall! + .merge(TextStyle(color: widget.textColor)); + final titleLength = widget.title == null + ? 0 + : _textSize(widget.title!, titleStyle).width + + widget.tooltipPadding!.right + + widget.tooltipPadding!.left + + (widget.titlePadding?.right ?? 0) + + (widget.titlePadding?.left ?? 0); + final descriptionLength = widget.description == null + ? 0 + : (_textSize(widget.description!, descriptionStyle).width + + widget.tooltipPadding!.right + + widget.tooltipPadding!.left + + (widget.descriptionPadding?.right ?? 0) + + (widget.descriptionPadding?.left ?? 0)); + var maxTextWidth = max(titleLength, descriptionLength); + if (maxTextWidth > widget.screenSize!.width - tooltipScreenEdgePadding) { + tooltipWidth = widget.screenSize!.width - tooltipScreenEdgePadding; + } else { + tooltipWidth = maxTextWidth + tooltipTextPadding; + } + } + + double? _getLeft() { + if (widget.position != null) { + final width = + widget.container != null ? _customContainerWidth.value : tooltipWidth; + double leftPositionValue = widget.position!.getCenter() - (width * 0.5); + if ((leftPositionValue + width) > MediaQuery.of(context).size.width) { + return null; + } else if ((leftPositionValue) < _kDefaultPaddingFromParent) { + return _kDefaultPaddingFromParent; + } else { + return leftPositionValue; + } + } + return null; + } + + double? _getRight() { + if (widget.position != null) { + final width = + widget.container != null ? _customContainerWidth.value : tooltipWidth; + + final left = _getLeft(); + if (left == null || (left + width) > MediaQuery.of(context).size.width) { + final rightPosition = widget.position!.getCenter() + (width * 0.5); + + return (rightPosition + width) > MediaQuery.of(context).size.width + ? _kDefaultPaddingFromParent + : null; + } else { + return null; + } + } + return null; + } + + double _getSpace() { + var space = widget.position!.getCenter() - (widget.contentWidth! / 2); + if (space + widget.contentWidth! > widget.screenSize!.width) { + space = widget.screenSize!.width - widget.contentWidth! - 8; + } else if (space < (widget.contentWidth! / 2)) { + space = 16; + } + return space; + } + + double _getAlignmentX() { + final calculatedLeft = _getLeft(); + var left = calculatedLeft == null + ? 0 + : (widget.position!.getCenter() - calculatedLeft); + var right = _getLeft() == null + ? (MediaQuery.of(context).size.width - widget.position!.getCenter()) - + (_getRight() ?? 0) + : 0; + final containerWidth = + widget.container != null ? _customContainerWidth.value : tooltipWidth; + + if (left != 0) { + return (-1 + (2 * (left / containerWidth))); + } else { + return (1 - (2 * (right / containerWidth))); + } + } + + double _getAlignmentY() { + var dy = isArrowUp + ? -1.0 + : (MediaQuery.of(context).size.height / 2) < widget.position!.getTop() + ? -1.0 + : 1.0; + return dy; + } + + final GlobalKey _customContainerKey = GlobalKey(); + final ValueNotifier _customContainerWidth = ValueNotifier(1); + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + if (widget.container != null && + _customContainerKey.currentContext != null && + _customContainerKey.currentContext?.size != null) { + // TODO: Is it wise to call setState here? All it is doing is setting + // a value in ValueNotifier which does not require a setState to refresh anyway. + setState(() { + _customContainerWidth.value = + _customContainerKey.currentContext!.size!.width; + }); + } + }); + _movingAnimationController = AnimationController( + duration: widget.movingAnimationDuration, + vsync: this, + ); + _movingAnimation = CurvedAnimation( + parent: _movingAnimationController, + curve: Curves.easeInOut, + ); + _scaleAnimationController = AnimationController( + duration: widget.scaleAnimationDuration, + vsync: this, + lowerBound: widget.disableScaleAnimation ? 1 : 0, + ); + _scaleAnimation = CurvedAnimation( + parent: _scaleAnimationController, + curve: widget.scaleAnimationCurve, + ); + if (widget.disableScaleAnimation) { + movingAnimationListener(); + } else { + _scaleAnimationController + ..addStatusListener((scaleAnimationStatus) { + if (scaleAnimationStatus == AnimationStatus.completed) { + movingAnimationListener(); + } + }) + ..forward(); + } + if (!widget.disableMovingAnimation) { + _movingAnimationController.forward(); + } + } + + void movingAnimationListener() { + _movingAnimationController.addStatusListener((status) { + if (status == AnimationStatus.completed) { + _movingAnimationController.reverse(); + } + if (_movingAnimationController.isDismissed) { + if (!widget.disableMovingAnimation) { + _movingAnimationController.forward(); + } + } + }); + } + + @override + void didChangeDependencies() { + _getTooltipWidth(); + super.didChangeDependencies(); + } + + @override + void dispose() { + _movingAnimationController.dispose(); + _scaleAnimationController.dispose(); + + super.dispose(); + } + + @override + Widget build(BuildContext context) { + // TODO: maybe all this calculation doesn't need to run here. Maybe all or some of it can be moved outside? + position = widget.offset; + final contentOrientation = findPositionForContent(position!); + final contentOffsetMultiplier = + contentOrientation == TooltipPosition.bottom ? 1.0 : -1.0; + isArrowUp = contentOffsetMultiplier == 1.0; + + final contentY = isArrowUp + ? widget.position!.getBottom() + (contentOffsetMultiplier * 3) + : widget.position!.getTop() + (contentOffsetMultiplier * 3); + + final num contentFractionalOffset = + contentOffsetMultiplier.clamp(-1.0, 0.0); + + var paddingTop = isArrowUp ? 22.0 : 0.0; + var paddingBottom = isArrowUp ? 0.0 : 27.0; + + if (!widget.showArrow) { + paddingTop = 10; + paddingBottom = 10; + } + + const arrowWidth = 18.0; + const arrowHeight = 9.0; + + if (!widget.disableScaleAnimation && widget.isTooltipDismissed) { + _scaleAnimationController.reverse(); + } + + if (widget.container == null) { + final theme = Theme.of(context); + + return Positioned( + top: contentY, + left: _getLeft(), + right: _getRight(), + child: ScaleTransition( + scale: _scaleAnimation, + alignment: widget.scaleAnimationAlignment ?? + Alignment( + _getAlignmentX(), + _getAlignmentY(), + ), + child: FractionalTranslation( + translation: Offset(0.0, contentFractionalOffset as double), + child: SlideTransition( + position: Tween( + begin: Offset(0.0, contentFractionalOffset / 10), + end: const Offset(0.0, 0.100), + ).animate(_movingAnimation), + child: Material( + type: MaterialType.transparency, + child: Container( + padding: widget.showArrow + ? EdgeInsets.only( + top: paddingTop - (isArrowUp ? arrowHeight : 0), + bottom: paddingBottom - (isArrowUp ? 0 : arrowHeight), + ) + : null, + child: Stack( + alignment: isArrowUp + ? Alignment.topLeft + : _getLeft() == null + ? Alignment.bottomRight + : Alignment.bottomLeft, + children: [ + if (widget.showArrow) + Positioned( + left: _getArrowLeft(arrowWidth), + right: _getArrowRight(arrowWidth), + child: CustomPaint( + painter: _Arrow( + strokeColor: widget.tooltipBackgroundColor!, + strokeWidth: 10, + paintingStyle: PaintingStyle.fill, + isUpArrow: isArrowUp, + ), + child: const SizedBox( + height: arrowHeight, + width: arrowWidth, + ), + ), + ), + Padding( + padding: EdgeInsets.only( + top: isArrowUp ? arrowHeight - 1 : 0, + bottom: isArrowUp ? 0 : arrowHeight - 1, + ), + child: ClipRRect( + borderRadius: widget.tooltipBorderRadius ?? + BorderRadius.circular(8.0), + child: GestureDetector( + onTap: widget.onTooltipTap, + child: Container( + width: max(tooltipWidth, 210), + padding: widget.tooltipPadding, + color: widget.tooltipBackgroundColor, + child: Column( + crossAxisAlignment: widget.title != null + ? CrossAxisAlignment.start + : CrossAxisAlignment.center, + children: [ + if (widget.title != null) + Padding( + padding: widget.titlePadding ?? + EdgeInsets.zero, + child: Text( + widget.title!, + textAlign: widget.titleAlignment, + textDirection: + widget.titleTextDirection, + style: widget.titleTextStyle ?? + Theme.of(context) + .textTheme + .titleLarge! + .merge( + TextStyle( + color: widget.textColor, + ), + ), + ), + ), + Padding( + padding: widget.descriptionPadding ?? + EdgeInsets.zero, + child: Text( + widget.description!, + textAlign: widget.descriptionAlignment, + textDirection: + widget.descriptionTextDirection, + style: widget.descTextStyle ?? + Theme.of(context) + .textTheme + .titleSmall! + .merge( + TextStyle( + color: widget.textColor, + ), + ), + ), + ), + const SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + TextButton( + style: TextButton.styleFrom( + foregroundColor: + theme.colorScheme.onBackground, + tapTargetSize: + MaterialTapTargetSize.shrinkWrap, + ), + onPressed: widget.onSkip, + child: const Text('Skip'), + ), + ElevatedButton( + style: ElevatedButton.styleFrom( + tapTargetSize: MaterialTapTargetSize + .shrinkWrap, + textStyle: const TextStyle( + fontStyle: FontStyle.normal, + )), + onPressed: widget.onNext, + child: const Text('Next'), + ), + ], + ), + ], + ), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ), + ), + ); + } + return Stack( + children: [ + Positioned( + left: _getSpace(), + top: contentY - 10, + child: FractionalTranslation( + translation: Offset(0.0, contentFractionalOffset as double), + child: SlideTransition( + position: Tween( + begin: Offset(0.0, contentFractionalOffset / 10), + end: !widget.showArrow && !isArrowUp + ? const Offset(0.0, 0.0) + : const Offset(0.0, 0.100), + ).animate(_movingAnimation), + child: Material( + color: Colors.transparent, + child: GestureDetector( + onTap: widget.onTooltipTap, + child: Container( + padding: EdgeInsets.only( + top: paddingTop, + ), + color: Colors.transparent, + child: Center( + child: MeasureSize( + onSizeChange: onSizeChange, + child: widget.container, + ), + ), + ), + ), + ), + ), + ), + ), + ], + ); + } + + void onSizeChange(Size? size) { + var tempPos = position; + tempPos = Offset(position!.dx, position!.dy + size!.height); + setState(() => position = tempPos); + } + + Size _textSize(String text, TextStyle style) { + final textPainter = TextPainter( + text: TextSpan(text: text, style: style), + maxLines: 1, + textScaleFactor: MediaQuery.of(context).textScaleFactor, + textDirection: TextDirection.ltr, + )..layout(); + return textPainter.size; + } + + double? _getArrowLeft(double arrowWidth) { + final left = _getLeft(); + if (left == null) return null; + return (widget.position!.getCenter() - (arrowWidth / 2) - left); + } + + double? _getArrowRight(double arrowWidth) { + if (_getLeft() != null) return null; + return (MediaQuery.of(context).size.width - widget.position!.getCenter()) - + (_getRight() ?? 0) - + (arrowWidth / 2); + } +} + +class _Arrow extends CustomPainter { + final Color strokeColor; + final PaintingStyle paintingStyle; + final double strokeWidth; + final bool isUpArrow; + final Paint _paint; + + _Arrow({ + this.strokeColor = Colors.black, + this.strokeWidth = 3, + this.paintingStyle = PaintingStyle.stroke, + this.isUpArrow = true, + }) : _paint = Paint() + ..color = strokeColor + ..strokeWidth = strokeWidth + ..style = paintingStyle; + + @override + void paint(Canvas canvas, Size size) { + canvas.drawPath(getTrianglePath(size.width, size.height), _paint); + } + + Path getTrianglePath(double x, double y) { + if (isUpArrow) { + return Path() + ..moveTo(0, y) + ..lineTo(x / 2, 0) + ..lineTo(x, y) + ..lineTo(0, y); + } + return Path() + ..moveTo(0, 0) + ..lineTo(x, 0) + ..lineTo(x / 2, y) + ..lineTo(0, 0); + } + + @override + bool shouldRepaint(covariant _Arrow oldDelegate) { + return oldDelegate.strokeColor != strokeColor || + oldDelegate.paintingStyle != paintingStyle || + oldDelegate.strokeWidth != strokeWidth; + } +} diff --git a/packages/digit_showcase/pubspec.yaml b/packages/digit_showcase/pubspec.yaml new file mode 100644 index 000000000..5d3e89f86 --- /dev/null +++ b/packages/digit_showcase/pubspec.yaml @@ -0,0 +1,53 @@ +name: digit_showcase +description: Customized showcase view +version: 0.0.1 +homepage: + +environment: + sdk: '>=3.0.0 <=4.0.0' + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/assets-and-images/#from-packages + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/forms_engine/pubspec.lock b/packages/forms_engine/pubspec.lock index 391bf5cf9..3a1f19c0c 100644 --- a/packages/forms_engine/pubspec.lock +++ b/packages/forms_engine/pubspec.lock @@ -277,6 +277,14 @@ packages: url: "https://pub.dev" source: hosted version: "8.1.1" + flutter_focus_watcher: + dependency: transitive + description: + name: flutter_focus_watcher + sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_keyboard_visibility: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index 774e13bc9..a765b2b5a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.17.1" conventional_commit: dependency: transitive description: diff --git a/tools/install_bricks.sh b/tools/install_bricks.sh index 6b84aa0c9..0cb839ed3 100755 --- a/tools/install_bricks.sh +++ b/tools/install_bricks.sh @@ -22,4 +22,4 @@ cd "$home" || exit echo "$PWD" melos clean -melos bootstrap +melos bootstrap \ No newline at end of file