From 87af814ccc92977f19984c9c80e2d2b50586d25a Mon Sep 17 00:00:00 2001 From: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:18:18 +0530 Subject: [PATCH] 1.6 final dev (#629) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * removed old directory * deleted services file * Added translator for Stock Recon validation messages * Pub upgrade in all modules Updated deprecated code Connectivity-plus code changes with respect to latest version changes Flutter analyze issue fixes Migrated Flutter gradle plugin to new declarative plugin block * HLM-6132:: Disabled Enter manual code for GS1 codes, and Changed the hint text and info description for search referral (#435) * Updated packages version and change log files * published registration_delivery and updated pubspec of hcm app * added master enum for firebase config * updated permissions for foreground in manifest added new service for foreground separated sync service as a package updated package dependencies * documentation in sync package added subscription listener in boundary and reports from utils * HLM-6246 fix added permissions for data sync * updated dart_mappable_builder to latest version updated hcm and packages version to latest dart_mappable_builder and generated mappers for the new version dart analyze issue fixes * Updated scripts * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * removed validation for latitude for HLM-6246 fix * mobile number validation in individual_details.dart as per new version of reactive forms * added default curve for digit_stepper.dart * Updated the integer form picker and added a new text block component (#441) * updated the integer picker and added a new text block component * added a field to change the width of button * modified text block component to conditionally render children --------- Co-authored-by: rachana-egov * updated description for household location and details page (#443) Co-authored-by: rachana-egov * qr_scanner fix - HLM-6411 * updated custom validator for minlength 2 and not null check with updated reactive forms * replaced product variant dropdown to selection card (#445) Co-authored-by: rachana-egov * HLM-6283:: IRS- Household Details Fields added (#444) * Updated checklist for a new type boolean (#446) * updated checklist for a new type boolean * added To Do to fix hard code options --------- Co-authored-by: rachana-egov * HLM-6282 and HLM-6283:: House Structure Details Page added (#447) * HLM-6283:: IRS- Household Details Fields added * HLM-6283:: House Structure Details Page * integrated checklist inside the beneficiary flow and updated gender field to selection card (#450) Co-authored-by: rachana-egov * HLM-6371:: Beneficiary Registration Summary Page (#452) * HLM-6283:: IRS- Household Details Fields added * HLM-6283:: House Structure Details Page * HLM-6371:: Beneficiary Registration Summary Page * Updated registration_delivery script * Added refused delivery page (#451) * integrated checklist inside the beneficiary flow and updated gender field to selection card * fetching refusal reasons * added refused delivery page * added refused delivery page --------- Co-authored-by: rachana-egov Co-authored-by: Naveen J <83631045+naveen-egov@users.noreply.github.com> * No delivery flow page (#453) Co-authored-by: rachana-egov * HLM-6367:: Auto Create project beneficiary (#454) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved --------- Co-authored-by: Naveen Renati * Hlm 6414 - MDMS StatusFilter, Filter search (#448) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HCMPRE-98 Filter search pagination, Removed private PageState (#457) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Created a new package for marking closed household (#459) * Created a new package for marking closed household * fixed build issues * updated the name to userAction --------- Co-authored-by: rachana-egov * HCMPRE-98 - Inventory TeamCode fixes, Filter search fixes (#460) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Hcmpre 118 - Closed Household, Filter improvements, Bug fixes (#467) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov * Hcmpre 155 - ClosedHousehold flow change (#478) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages * View Household button added in delete individual success page, Search project beneficiary fix * added close button to close the filter and disabled the clear button … (#475) * added close button to close the filter and disabled the clear button unless something is selected * added validation for closed household head name same as individual * updated the condition for validation of closehousehold head --------- Co-authored-by: rachana-egov * View Household button added in delete individual success page, Search project beneficiary fix (#474) * Search beneficiary fix * Search beneficiary fix * Bloc dispose fix * Bloc dispose fix * Updated task based search for household * Modified closed household package to use registration flow for creating a household and related data along with task as closed deleted user_action from data_model package Updating closed_household to not_delivered status after closed household registration * version updates of closed_household, digit_components, digit_data_model, registration_delivery * version upgrade for registration_delivery --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * Hcmpre 164, 165 - Count implementation for filter search (#485) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * Resolved code comments --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * fixed reports are not getting refreshed after updating facility (#486) Co-authored-by: rachana-egov * Delivery summary page Resources and quantity added (#473) * Delivery summary page Resources and quantity added * fix for offset increment twice * Delivery summary page Resources and quantity added --------- Co-authored-by: Naveen Renati Co-authored-by: Naveen J <83631045+naveen-egov@users.noreply.github.com> * updated script for closed household (#489) Co-authored-by: rachana-egov * Hcmpre 166 - Moved Localization from ISAR To SQL (#488) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * removed login cred --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Removed null condition, fixed double is not a subtype of string issue and added null check for table (#490) * HCMPRE-156 : type 'double' is not a subtype of type 'String' * added check if the first table row is null --------- Co-authored-by: rachana-egov Co-authored-by: Naveen J <83631045+naveen-egov@users.noreply.github.com> * HCMPRE-177:: Metric and Table Charts Integration in Mobile dashboard and digit_dss package initial release (#480) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * HCMPRE-55 Dashboard Static Screen added * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages * View Household button added in delete individual success page, Search project beneficiary fix * added close button to close the filter and disabled the clear button … (#475) * added close button to close the filter and disabled the clear button unless something is selected * added validation for closed household head name same as individual * updated the condition for validation of closehousehold head --------- Co-authored-by: rachana-egov * View Household button added in delete individual success page, Search project beneficiary fix (#474) * Search beneficiary fix * Search beneficiary fix * Bloc dispose fix * Bloc dispose fix * Updated task based search for household * HCMPRE-177:: Metric Chart Integration and digit_dss package setup * HCMPRE-177:: Added Refresh Indicator for refreshing the dashboard * HCMPRE-177:: Table chart integration and Refresh logic update * Added code comments for digit_dss package * Added enums and constants * Resolved code comments and updated versions for packages * HCMPRE177:: Moved dashboard UI Config to MDMS * HCMPRE177:: Added dss_import script for digit_dss package * Resolved code comments * Updated dashboard Config * Added dashboard config search to try catch block * Resolved conflicts * published data_model and registration_delivery * Added Read me file and updated pubspec.yaml --------- Co-authored-by: Naveen Renati Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * HCMPRE-177:: Fetch and send attendees uuids of registers to dss filters (#491) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * HCMPRE-55 Dashboard Static Screen added * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages * View Household button added in delete individual success page, Search project beneficiary fix * added close button to close the filter and disabled the clear button … (#475) * added close button to close the filter and disabled the clear button unless something is selected * added validation for closed household head name same as individual * updated the condition for validation of closehousehold head --------- Co-authored-by: rachana-egov * View Household button added in delete individual success page, Search project beneficiary fix (#474) * Search beneficiary fix * Search beneficiary fix * Bloc dispose fix * Bloc dispose fix * Updated task based search for household * HCMPRE-177:: Metric Chart Integration and digit_dss package setup * HCMPRE-177:: Added Refresh Indicator for refreshing the dashboard * HCMPRE-177:: Table chart integration and Refresh logic update * Added code comments for digit_dss package * Added enums and constants * Resolved code comments and updated versions for packages * HCMPRE177:: Moved dashboard UI Config to MDMS * HCMPRE177:: Added dss_import script for digit_dss package * Resolved code comments * Updated dashboard Config * Added dashboard config search to try catch block * Resolved conflicts * published data_model and registration_delivery * Added Read me file and updated pubspec.yaml * Fetch and send attendees uuids of registers to dss filters * Added dss filters --------- Co-authored-by: Naveen Renati Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Task update rather than creating new, updated filter popup loading (#493) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * Resolved code comments * HCMPRE220:: Household overview state update on pushing to Registration Wrapper * update task state if task is already present * updated selection box to update on initial selection change and updated delivery comment code * remove changes from beneficiary * task update * HCMPRE-220:: SMC Not registered flow reload fix,and closed household Not delivered status fix * added loader for filter search * Added name of user to additional details in stock and delivery record * updated delivery intervention * check summary page condition for edit flow * fixed task update for delivery intervention * fixed household detail page --------- Co-authored-by: rachana-egov Co-authored-by: Naveen Renati Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * updated status and registration_delivery_enums.dart (#494) * updated status and registration_delivery_enums.dart updated check for check-list check in household_overview.dart * Todo for individual check in beneficiary_registration.dart * Uploaded pre release for inventory-management and digit-dss (#495) * removed the page count from filter, updated status filter pop up (#496) Co-authored-by: rachana-egov * updated demo changes (#498) Co-authored-by: rachana-egov * added lat and long inside additional field when user submit the checklist (#526) Co-authored-by: rachana-egov * HCMPRE-221 data segration (#501) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * Uploaded pre release for inventory-management and digit-dss * Updated delivery enums for Not delivered status * Updated status model in task to taskStatus * Updated registration delivery package * Reverted Task Model status key change * Update pubspec with latest version of packages * Summary page Type of resource locale key updated * Resolved comments * Resolved comments and unused variables * Resolved comments and unused variables * Updated version * Updated individual_global_search.dart for search * added data segration * check to enable edit delivery * added project filter * Registration delivery- Attendance management fixes (#497) * Removed captured location dialog on attendance submit * Removed stpper if deliveries length is greater than 1 * Updated digit_components and digit_data_model packages in attendance management * Updated digit_components and digit_data_model packages in attendance management * Localization loader and dialog localization fix (#505) * added dialog till localization is not loaded * fixed localization not coming issue * added a util funtion to show language loading --------- Co-authored-by: rachana-egov * updated search added project id in beneficiary search removed commented code * User uuids filter fixes for attendees local search in an attendance register (#512) * User uuids filters fixes for attendees search in a register * Removed default dashboard card from home * Sync fix --------- Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Task address mapping on refused delivery (#514) * replace and push homepage from boundary page sync dialog * updated register search query to exclude attendee and staff in limit query updated attendance and registration_delivery package * registration_delivery package update * * Added error toast for network failure (#525) * No result card added if no charts available * Updated end date for dss charts to 23:59 instead of 11:59 (#527) * task create fix - removed condition check of resources during create updated changelog of registration, closed, digit_data_model, inventory, registration_delivery --dry-run fixes * Updated stable packages for scanner, attendance and dss (#528) * updated packages to latest version digit_components version update --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen Renati Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Privacy Policy (#499) * added data privacy component * added privacy component * updated localization * updated the dialog to use localized value * updated privacy config inside mdms * updated privacy model * removed local privacy config now coming from mdms * Delete packages/digit_components/lib/widgets/atoms/privacy_component.dart as component is part of main application * fixed github build issue * added a configuration to enable or disable this privacy policy component * fix the issue when privacy policy component is not there * fix the issue when privacy policy component is not there * fixed github comments --------- Co-authored-by: rachana-egov * HCMPRE-332:: Mobile dashboard added check for lastSyncTime to convert to date format (#540) * HCMPRE-332:: Mobile dashboard added check for lastSyncTime to convert to date format * added a enum for lastSyncedTime --------- Co-authored-by: rachana-egov * Hcmpre 263 - Sync write transaction for ISAR - fix, Localization fall back (#538) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * Uploaded pre release for inventory-management and digit-dss * Updated delivery enums for Not delivered status * Updated status model in task to taskStatus * Updated registration delivery package * Reverted Task Model status key change * Update pubspec with latest version of packages * Summary page Type of resource locale key updated * Resolved comments * Resolved comments and unused variables * Resolved comments and unused variables * Updated version * Updated individual_global_search.dart for search * added data segration * check to enable edit delivery * added project filter * Registration delivery- Attendance management fixes (#497) * Removed captured location dialog on attendance submit * Removed stpper if deliveries length is greater than 1 * Updated digit_components and digit_data_model packages in attendance management * Updated digit_components and digit_data_model packages in attendance management * Localization loader and dialog localization fix (#505) * added dialog till localization is not loaded * fixed localization not coming issue * added a util funtion to show language loading --------- Co-authored-by: rachana-egov * updated search added project id in beneficiary search removed commented code * User uuids filter fixes for attendees local search in an attendance register (#512) * User uuids filters fixes for attendees search in a register * Removed default dashboard card from home * Sync fix --------- Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Task address mapping on refused delivery (#514) * replace and push homepage from boundary page sync dialog * updated register search query to exclude attendee and staff in limit query updated attendance and registration_delivery package * registration_delivery package update * * Added error toast for network failure (#525) * No result card added if no charts available * Updated end date for dss charts to 23:59 instead of 11:59 (#527) * task create fix - removed condition check of resources during create updated changelog of registration, closed, digit_data_model, inventory, registration_delivery --dry-run fixes * Updated stable packages for scanner, attendance and dss (#528) * updated packages to latest version digit_components version update * added fallback ui dialog when localization call fails. * added localization code * merge from dev * fix for isar transaction lock issue * moved boundary localization path to constants. Updated dialog in language_selection.dart page * isar lock fix * updated data_model version for isar fix. updated a check in language_selection.dart for dialog --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov Co-authored-by: naveen-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Impel changes - background-services, beneficiary_checklist (#548) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * Uploaded pre release for inventory-management and digit-dss * Updated delivery enums for Not delivered status * Updated status model in task to taskStatus * Updated registration delivery package * Reverted Task Model status key change * Update pubspec with latest version of packages * Summary page Type of resource locale key updated * Resolved comments * Resolved comments and unused variables * Resolved comments and unused variables * Updated version * Updated individual_global_search.dart for search * added data segration * check to enable edit delivery * added project filter * Registration delivery- Attendance management fixes (#497) * Removed captured location dialog on attendance submit * Removed stpper if deliveries length is greater than 1 * Updated digit_components and digit_data_model packages in attendance management * Updated digit_components and digit_data_model packages in attendance management * Localization loader and dialog localization fix (#505) * added dialog till localization is not loaded * fixed localization not coming issue * added a util funtion to show language loading --------- Co-authored-by: rachana-egov * updated search added project id in beneficiary search removed commented code * User uuids filter fixes for attendees local search in an attendance register (#512) * User uuids filters fixes for attendees search in a register * Removed default dashboard card from home * Sync fix --------- Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Task address mapping on refused delivery (#514) * replace and push homepage from boundary page sync dialog * updated register search query to exclude attendee and staff in limit query updated attendance and registration_delivery package * registration_delivery package update * * Added error toast for network failure (#525) * No result card added if no charts available * Updated end date for dss charts to 23:59 instead of 11:59 (#527) * task create fix - removed condition check of resources during create updated changelog of registration, closed, digit_data_model, inventory, registration_delivery --dry-run fixes * Updated stable packages for scanner, attendance and dss (#528) * updated packages to latest version digit_components version update * added fallback ui dialog when localization call fails. * added localization code * merge from dev * fix for isar transaction lock issue * moved boundary localization path to constants. Updated dialog in language_selection.dart page * isar lock fix * pulled changes from impel related to background service added missing audit details and client audit details for beneficiary_checklist.dart --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov Co-authored-by: naveen-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * resolved code rabbit comments (#549) * privacy policy config issue fix (#550) Co-authored-by: rachana-egov * fixed text ellipse issue (#553) Co-authored-by: rachana-egov * updated sync package with dev * Resource validation added (#555) * added project valid check, fixed house type selection issue, added resource duplicate check * removed split code for boundary * fixed pop up not closing issue * removed credentials --------- Co-authored-by: rachana-egov * UAT fixes, HCMPRE-412 (#556) * added project valid check, fixed house type selection issue, added resource duplicate check * removed split code for boundary * fixed pop up not closing issue * removed credentials * HCMPRE-412 - creating beneficiary for all individuals if not registered, reload event fix, removed dialog for loader of localization.dart * added check condition to show status and updated selection card * beneficiary_checklist.dart code compare with enum * fix state not getting updated issue (#557) Co-authored-by: rachana-egov * Fixed dashboard chart delete fixes in isar (#558) * Resource validation added (#555) * added project valid check, fixed house type selection issue, added resource duplicate check * removed split code for boundary * fixed pop up not closing issue * removed credentials --------- Co-authored-by: rachana-egov * Fixed dashboard chart delete fixes in isar * Update language_selection.dart --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * updated packages version and published --------- Co-authored-by: rachana-egov Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * removed dialog closing function from language page (#560) Co-authored-by: rachana-egov * pulled 6000 changes for pub upgrade updated with latest dev updated sync package - made the sync up to accept the datamodel type custom registry to modify * pulled 6000 changes for pub upgrade updated with latest dev updated sync package - made the sync up to accept the datamodel type custom registry to modify Updated route annotations of the package and extending new RootStackRouter * reverted auto_route module changes as latest auto_route generator is not supported with latest isar generator * Updated dart yml file to incorporate the latest flutter version Updated melos yaml file to reduce build time deleted duplicate LocalizationParams class in utils.dart * Updated melos.yaml * added flutter clean for .dart tool not found error * inventory package dart analyze fixes * attendance package dart analyze fixes * closed_household package dart analyze fixes * digit_dss package dart analyze fixes * registration_delivery, scanner, referral package dart analyze fixes updated versions and changelogs * updated melos yaml - deleted generate-flutter * updated dart.yml to remove caching * updated dart.yml - reverted generate-flutter and removed dart * updated data_model and components versions * Removed privacy policy from main app to digit component (#569) * Updated the integer form picker and added a new text block component (#441) * updated the integer picker and added a new text block component * added a field to change the width of button * modified text block component to conditionally render children --------- Co-authored-by: rachana-egov * updated description for household location and details page (#443) Co-authored-by: rachana-egov * replaced product variant dropdown to selection card (#445) Co-authored-by: rachana-egov * HLM-6283:: IRS- Household Details Fields added (#444) * Updated checklist for a new type boolean (#446) * updated checklist for a new type boolean * added To Do to fix hard code options --------- Co-authored-by: rachana-egov * HLM-6282 and HLM-6283:: House Structure Details Page added (#447) * HLM-6283:: IRS- Household Details Fields added * HLM-6283:: House Structure Details Page * integrated checklist inside the beneficiary flow and updated gender field to selection card (#450) Co-authored-by: rachana-egov * HLM-6371:: Beneficiary Registration Summary Page (#452) * HLM-6283:: IRS- Household Details Fields added * HLM-6283:: House Structure Details Page * HLM-6371:: Beneficiary Registration Summary Page * Updated registration_delivery script * Added refused delivery page (#451) * integrated checklist inside the beneficiary flow and updated gender field to selection card * fetching refusal reasons * added refused delivery page * added refused delivery page --------- Co-authored-by: rachana-egov Co-authored-by: Naveen J <83631045+naveen-egov@users.noreply.github.com> * No delivery flow page (#453) Co-authored-by: rachana-egov * HLM-6367:: Auto Create project beneficiary (#454) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved --------- Co-authored-by: Naveen Renati * Hlm 6414 - MDMS StatusFilter, Filter search (#448) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * HCMPRE-98 Filter search pagination, Removed private PageState (#457) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Created a new package for marking closed household (#459) * Created a new package for marking closed household * fixed build issues * updated the name to userAction --------- Co-authored-by: rachana-egov * HCMPRE-98 - Inventory TeamCode fixes, Filter search fixes (#460) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Hcmpre 118 - Closed Household, Filter improvements, Bug fixes (#467) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov * Hcmpre 155 - ClosedHousehold flow change (#478) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages * View Household button added in delete individual success page, Search project beneficiary fix * added close button to close the filter and disabled the clear button … (#475) * added close button to close the filter and disabled the clear button unless something is selected * added validation for closed household head name same as individual * updated the condition for validation of closehousehold head --------- Co-authored-by: rachana-egov * View Household button added in delete individual success page, Search project beneficiary fix (#474) * Search beneficiary fix * Search beneficiary fix * Bloc dispose fix * Bloc dispose fix * Updated task based search for household * Modified closed household package to use registration flow for creating a household and related data along with task as closed deleted user_action from data_model package Updating closed_household to not_delivered status after closed household registration * version updates of closed_household, digit_components, digit_data_model, registration_delivery * version upgrade for registration_delivery --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * Hcmpre 164, 165 - Count implementation for filter search (#485) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * Resolved code comments --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * fixed reports are not getting refreshed after updating facility (#486) Co-authored-by: rachana-egov * Delivery summary page Resources and quantity added (#473) * Delivery summary page Resources and quantity added * fix for offset increment twice * Delivery summary page Resources and quantity added --------- Co-authored-by: Naveen Renati Co-authored-by: Naveen J <83631045+naveen-egov@users.noreply.github.com> * updated script for closed household (#489) Co-authored-by: rachana-egov * Hcmpre 166 - Moved Localization from ISAR To SQL (#488) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * removed login cred --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Removed null condition, fixed double is not a subtype of string issue and added null check for table (#490) * HCMPRE-156 : type 'double' is not a subtype of type 'String' * added check if the first table row is null --------- Co-authored-by: rachana-egov Co-authored-by: Naveen J <83631045+naveen-egov@users.noreply.github.com> * HCMPRE-177:: Metric and Table Charts Integration in Mobile dashboard and digit_dss package initial release (#480) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * HCMPRE-55 Dashboard Static Screen added * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages * View Household button added in delete individual success page, Search project beneficiary fix * added close button to close the filter and disabled the clear button … (#475) * added close button to close the filter and disabled the clear button unless something is selected * added validation for closed household head name same as individual * updated the condition for validation of closehousehold head --------- Co-authored-by: rachana-egov * View Household button added in delete individual success page, Search project beneficiary fix (#474) * Search beneficiary fix * Search beneficiary fix * Bloc dispose fix * Bloc dispose fix * Updated task based search for household * HCMPRE-177:: Metric Chart Integration and digit_dss package setup * HCMPRE-177:: Added Refresh Indicator for refreshing the dashboard * HCMPRE-177:: Table chart integration and Refresh logic update * Added code comments for digit_dss package * Added enums and constants * Resolved code comments and updated versions for packages * HCMPRE177:: Moved dashboard UI Config to MDMS * HCMPRE177:: Added dss_import script for digit_dss package * Resolved code comments * Updated dashboard Config * Added dashboard config search to try catch block * Resolved conflicts * published data_model and registration_delivery * Added Read me file and updated pubspec.yaml --------- Co-authored-by: Naveen Renati Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * HCMPRE-177:: Fetch and send attendees uuids of registers to dss filters (#491) * added translator for administration area * Fixed Facility search based on tenant ID * Added disable battery optimization permission for background service * Added disable battery optimization ask permission on App start and background service start * HLM-5984:: Get Precise location on Submitting latitude longitude details * Reverted install_bricks.sh * added new status REGISTERED, NOT_REGISTERED updated conditional check for status by project beneficiaries * added static status_filter.dart integration in search_beneficiary.dart * TODO for selected_filters display condition * integrated household search filters with mdms implemented search based on filters with pagination for Registered and NotRegistered * updated status filter component merge with develop * create individual_global_search and implemented search * Auto Create Project Beneficiary on Edit Household, and disable record delivery if no project beneficiary present * Conflicts resolved * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty * implemented household_global_search.dart fixed individual_global_search.dart * updated proximity search for household_global_search.dart * Pop State recapture during registration flow, Disable delivery flow for individual based campaign if project beneficiaries is empty (#456) * updated class state from private for customization override in registration_delivery and inventory added pagination for filter search TODO: combination search for registered and not registered needs fix which return only last selected results * adding missed changes for last commit * HCMPRE-55 Dashboard Static Screen added * displaying selected filter value for applied filters in search_beneficiary.dart * updated changelog for inventory and registration_delivery for new dev versions * updated pubspec lock of registration_delivery * removed multiple filter selection modified filter search * fixed delivery team scanner issues in stock_details.dart * Fixed - missing addition of scanned resources to additional fields filter search bug fixes * HCMPRE-74, HCMPRE-82, HCMPRE-83:: Household Reload Fix, Validations for Household details added (#458) * updated individual global search added beneficiary type check in view_beneficiary_card.dart removed commented code in household_overview.dart * Added null check for beneficiaryTag in closed_household_summary.dart * Exposed Registration delivery pages * updated remote repository and some miner fixes (#461) Co-authored-by: rachana-egov * HCMPRE-82:: Validations and Bug Fixes * small css fixes (#462) Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * merge fix * added closed household search * status model fix * Closed-household-registration (#464) * closed-household-registration * closed-household-registration * updated pub file --------- Co-authored-by: rachana-egov * added closed household init file modified user_action.dart model and db corrected modified closed household status * updated registration for closed household * added closed_household search and updating closed household status * clearing search before navigating to registration flow * getting last tasks in household_overview.dart * HCMPRE-107:: Summary page added for Delivery Flow, HCMPRE-111:: Disable Delete household if beneficiary not present (#463) * Validation and gps fixes * fixed closed household count clearing closedhould results for clear * pagination fix for closed household * sync down for closed household, updated scan voucher button, and remove the tag when we navigate to a different page (#465) Co-authored-by: rachana-egov * DeliverySummary Route added to main app * seperated closedhousehold search Bug fixes - HCMPRE-112, 110, 113 * updated all the points of this ticket HCMPRE-120 (#466) Co-authored-by: rachana-egov * Bug Fixes, dev version release of packages * HCMPRE-119:: IRS Demo fixes (#468) * HCMPRE-119:: IRS Demo fixes * Removed unused code * updated closed button action to push closedhousehold tasks filter with last fix * updated validation for closed household name and fix error message size (#470) Co-authored-by: rachana-egov * Irs demo fix patch (#469) * HCMPRE-119:: IRS Demo fixes * Removed unused code * Edit Household if no project beneficiary fix * reverted hiding of digit search bar when closed filter is applied * status update based on last task status in household_overview.dart mapped administered success in beneficiary_card.dart moved getstatus to utils.dart * fixed offset increasing twice * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes (#471) * HCMPRE-121:: Enter manual code fix and Search Beneficiary fixes * Added date formats to constants * fixed offset increasing twice closed household distance fix emitting scanner state loading * dev version bump-up for registration and scanner * version updates for packages * View Household button added in delete individual success page, Search project beneficiary fix * added close button to close the filter and disabled the clear button … (#475) * added close button to close the filter and disabled the clear button unless something is selected * added validation for closed household head name same as individual * updated the condition for validation of closehousehold head --------- Co-authored-by: rachana-egov * View Household button added in delete individual success page, Search project beneficiary fix (#474) * Search beneficiary fix * Search beneficiary fix * Bloc dispose fix * Bloc dispose fix * Updated task based search for household * HCMPRE-177:: Metric Chart Integration and digit_dss package setup * HCMPRE-177:: Added Refresh Indicator for refreshing the dashboard * HCMPRE-177:: Table chart integration and Refresh logic update * Added code comments for digit_dss package * Added enums and constants * Resolved code comments and updated versions for packages * HCMPRE177:: Moved dashboard UI Config to MDMS * HCMPRE177:: Added dss_import script for digit_dss package * Resolved code comments * Updated dashboard Config * Added dashboard config search to try catch block * Resolved conflicts * published data_model and registration_delivery * Added Read me file and updated pubspec.yaml * Fetch and send attendees uuids of registers to dss filters * Added dss filters --------- Co-authored-by: Naveen Renati Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Task update rather than creating new, updated filter popup loading (#493) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * Resolved code comments * HCMPRE220:: Household overview state update on pushing to Registration Wrapper * update task state if task is already present * updated selection box to update on initial selection change and updated delivery comment code * remove changes from beneficiary * task update * HCMPRE-220:: SMC Not registered flow reload fix,and closed household Not delivered status fix * added loader for filter search * Added name of user to additional details in stock and delivery record * updated delivery intervention * check summary page condition for edit flow * fixed task update for delivery intervention * fixed household detail page --------- Co-authored-by: rachana-egov Co-authored-by: Naveen Renati Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * updated status and registration_delivery_enums.dart (#494) * updated status and registration_delivery_enums.dart updated check for check-list check in household_overview.dart * Todo for individual check in beneficiary_registration.dart * Uploaded pre release for inventory-management and digit-dss (#495) * removed the page count from filter, updated status filter pop up (#496) Co-authored-by: rachana-egov * updated demo changes (#498) Co-authored-by: rachana-egov * added lat and long inside additional field when user submit the checklist (#526) Co-authored-by: rachana-egov * HCMPRE-221 data segration (#501) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * Uploaded pre release for inventory-management and digit-dss * Updated delivery enums for Not delivered status * Updated status model in task to taskStatus * Updated registration delivery package * Reverted Task Model status key change * Update pubspec with latest version of packages * Summary page Type of resource locale key updated * Resolved comments * Resolved comments and unused variables * Resolved comments and unused variables * Updated version * Updated individual_global_search.dart for search * added data segration * check to enable edit delivery * added project filter * Registration delivery- Attendance management fixes (#497) * Removed captured location dialog on attendance submit * Removed stpper if deliveries length is greater than 1 * Updated digit_components and digit_data_model packages in attendance management * Updated digit_components and digit_data_model packages in attendance management * Localization loader and dialog localization fix (#505) * added dialog till localization is not loaded * fixed localization not coming issue * added a util funtion to show language loading --------- Co-authored-by: rachana-egov * updated search added project id in beneficiary search removed commented code * User uuids filter fixes for attendees local search in an attendance register (#512) * User uuids filters fixes for attendees search in a register * Removed default dashboard card from home * Sync fix --------- Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Task address mapping on refused delivery (#514) * replace and push homepage from boundary page sync dialog * updated register search query to exclude attendee and staff in limit query updated attendance and registration_delivery package * registration_delivery package update * * Added error toast for network failure (#525) * No result card added if no charts available * Updated end date for dss charts to 23:59 instead of 11:59 (#527) * task create fix - removed condition check of resources during create updated changelog of registration, closed, digit_data_model, inventory, registration_delivery --dry-run fixes * Updated stable packages for scanner, attendance and dss (#528) * updated packages to latest version digit_components version update --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Naveen Renati Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Privacy Policy (#499) * added data privacy component * added privacy component * updated localization * updated the dialog to use localized value * updated privacy config inside mdms * updated privacy model * removed local privacy config now coming from mdms * Delete packages/digit_components/lib/widgets/atoms/privacy_component.dart as component is part of main application * fixed github build issue * added a configuration to enable or disable this privacy policy component * fix the issue when privacy policy component is not there * fix the issue when privacy policy component is not there * fixed github comments --------- Co-authored-by: rachana-egov * HCMPRE-332:: Mobile dashboard added check for lastSyncTime to convert to date format (#540) * HCMPRE-332:: Mobile dashboard added check for lastSyncTime to convert to date format * added a enum for lastSyncedTime --------- Co-authored-by: rachana-egov * Hcmpre 263 - Sync write transaction for ISAR - fix, Localization fall back (#538) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * Uploaded pre release for inventory-management and digit-dss * Updated delivery enums for Not delivered status * Updated status model in task to taskStatus * Updated registration delivery package * Reverted Task Model status key change * Update pubspec with latest version of packages * Summary page Type of resource locale key updated * Resolved comments * Resolved comments and unused variables * Resolved comments and unused variables * Updated version * Updated individual_global_search.dart for search * added data segration * check to enable edit delivery * added project filter * Registration delivery- Attendance management fixes (#497) * Removed captured location dialog on attendance submit * Removed stpper if deliveries length is greater than 1 * Updated digit_components and digit_data_model packages in attendance management * Updated digit_components and digit_data_model packages in attendance management * Localization loader and dialog localization fix (#505) * added dialog till localization is not loaded * fixed localization not coming issue * added a util funtion to show language loading --------- Co-authored-by: rachana-egov * updated search added project id in beneficiary search removed commented code * User uuids filter fixes for attendees local search in an attendance register (#512) * User uuids filters fixes for attendees search in a register * Removed default dashboard card from home * Sync fix --------- Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Task address mapping on refused delivery (#514) * replace and push homepage from boundary page sync dialog * updated register search query to exclude attendee and staff in limit query updated attendance and registration_delivery package * registration_delivery package update * * Added error toast for network failure (#525) * No result card added if no charts available * Updated end date for dss charts to 23:59 instead of 11:59 (#527) * task create fix - removed condition check of resources during create updated changelog of registration, closed, digit_data_model, inventory, registration_delivery --dry-run fixes * Updated stable packages for scanner, attendance and dss (#528) * updated packages to latest version digit_components version update * added fallback ui dialog when localization call fails. * added localization code * merge from dev * fix for isar transaction lock issue * moved boundary localization path to constants. Updated dialog in language_selection.dart page * isar lock fix * updated data_model version for isar fix. updated a check in language_selection.dart for dialog --------- Co-authored-by: rachana-egov <137176770+rachana-egov@users.noreply.github.com> Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov Co-authored-by: naveen-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> * Impel changes - background-services, beneficiary_checklist (#548) * Update closed_household_details.dart (#482) * Fixed pagination refresh issue (#481) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments --------- Co-authored-by: rachana-egov * implemented count for filter search, added todo for combination search count * Fixed count TODO: search with task status filter * Fixed search with task status filter Removed delay in delivery_summary_page.dart * added code comments * HCMPRE-165 issues (#484) * Implement search pagination (#476) * implemented pagination for search * added one more check to check if last response is equal to current response then also break the loop * removed changes from data repository and added pagination only project facility and facility --------- Co-authored-by: rachana-egov * localization update, input validation for numeric, disabled delivery intervention for closed household task (#479) Co-authored-by: rachana-egov * fixed pagination refresh issue * resolved the comments * HCMPRE-162:: Reload issue fix for closed household and not registered * HCMPRE-165: issues fixes * updated reasons for refusals --------- Co-authored-by: rachana-egov Co-authored-by: Ramkrishna-egov * Updated publock * Added a check to avoid multiple leftJoin for projectBeneficiary - fix for multiple left join error * created new table for localization TODO: separate packages localization delegates to individual package and move the localization model to data_model package for common usage Delete localization related isar files once tested * init Boundary code wise localization.dart * create localization local repo modified module separation from query to exclude and include specified module * modified module exclude in boundary page * modified localization call for boundary selection bug where first value is localized in dropdown * removed un-required localization bloc calls * updated index value to selected language on home * Uploaded pre release for inventory-management and digit-dss * Updated delivery enums for Not delivered status * Updated status model in task to taskStatus * Updated registration delivery package * Reverted Task Model status key change * Update pubspec with latest version of packages * Summary page Type of resource locale key updated * Resolved comments * Resolved comments and unused variables * Resolved comments and unused variables * Updated version * Updated individual_global_search.dart for search * added data segration * check to enable edit delivery * added project filter * Registration delivery- Attendance management fixes (#497) * Removed captured location dialog on attendance submit * Removed stpper if deliveries length is greater than 1 * Updated digit_components and digit_data_model packages in attendance management * Updated digit_components and digit_data_model packages in attendance management * Localization loader and dialog localization fix (#505) * added dialog till localization is not loaded * fixed localization not coming issue * added a util funtion to show language loading --------- Co-authored-by: rachana-egov * updated search added project id in beneficiary search removed commented code * User uuids filter fixes for attendees local search in an attendance register (#512) * User uuids filters fixes for attendees search in a register * Removed default dashboard card from home * Sync fix --------- Co-authored-by: Naveen Renati <154230258+naveenr-egov@users.noreply.github.com> * Added Task address mapping on refused delivery (#514) * replace and push homepage from boundary page sync dialog * updated register search query to exclude attendee and staff in limit query updated attendance and registration_delivery package * registration_delivery package update * * Added error toast for network failure (#525) * No result card added if no charts available * Updated end date for dss charts to 23:59 instead of 11:59 (#527) * task create fix - removed condition check of resources during create updated changelog of registration, closed, digit_data_model, inventory, registration_delivery --dry-run fixes * Updated stable packages for scanner, attendance and dss (#528) * updated packages to latest version digit_components version update * added fallback ui dialog when localization call fails. … * created custom annotation in sync package to create generated file with implementation * updated className and added return to sync_service_annotation.dart added generated sync.dart file * updated sync_service_annotation.dart added usage documentation * wayBillNumber key change from waybillNumber return transaction type logic change in stock_details and report_details bloc * validation for wayBillNumber * changed the digit_component library to new digit_ui-component library * added assets for the acknowledgement page * Delivery action label and administered_success status update based on the project * Revert "Delivery action label and administered_success status update based on the project" This reverts commit 8673a4828e3bc6820fdbadcba32bc53ef5d06fa2. * Reapply "Delivery action label and administered_success status update based on the project" This reverts commit 1b0d44f877737369e964de885c120ef266b72cff. * beneficiary-registartion component updated * Changed textchunk component to digittextblock * beneficiary pages component updated * widgets updated * fixed table issues * digit ui library version updated * Using digit_ui library from the published page * Changed the flutter version in lock files * Changed the flutter version in lock files * Changed the flutter version in lock files * localisation added for no facilities dialog * comment code remove * resolved review comments * Made changes in referral reconciliation * Made changes in referral reconciliation(Changed the digit_component library to digit_ui_component library) * merge conflict changes * Made changes in referral reconciliation(Changed the digit_component library to digit_ui_component library) * Changes in radiolist button * Fixed button issues and changed search bar component * Added a value in i18 file * Made changes in HF referral widget files * Removed commented code * Using digit-ui library from the published page * Did all the asked changes on PR * merge conflict changes * additionalDetails from string to Map * lock file version changes * updated flutter components in checklist package * updated validations for fields * added label value pair * digit ui component version update * panel card fix * fixed additionalDetails issue in survey_form_view * fixed version conflicts data model * version conflicts data model handled * lock file added for survey_form * pubspec.lock file added in survey_form * fix digit_data_model in survey-form * fix digit data model issue in complaints package * fix digit data model in example (survey-form) * modified MainActivity.kt and location_service.kt to update accuracy updated regex to handle negative latitude, longitude and accuracy changed accuracy to dynamic * added retry to localization.dart local repo * Solved the scroll issue and additional fields in checklist * merge conflicts * Solved the submitted checklist localization issue * updated data_model and survey_form package * pub lock file changes * complaints version change * component upgrade version increments * merge conflicts * Removing the additional fields if item is singlevaluelist. * merge conflicts * version fixes and import fixes * Solved the checklist localization issue * Changed the attribute datatype from string to bool in digit data model package * HCMPRE-1310 and HCMPRE-1319 apk issues * Wrote the migration script * Wrote the migration script * HCMPRE-1310 and HCMPRE-1319 apk issues * HCMPRE-1310 and HCMPRE-1319 apk issues * V1.5 sync count patch (#620) * updated hardcoded sync count, retry count and error api path * Published digit_data_model version update * Added additional field in service.dart and survey_form_view.dart * merge conflicts * cherry picked complaints changes * updated theme * cherry picked complaints changes * cherry picked complaints changes * acknowledgment fixed * updated complaint with latest digit_ui_components * version upgrade digit_ui_components fixes related to components * version upgrade digit_ui_components fixes related to components * updated referral with latest digit_ui_components * version upgrade digit_ui_components fixes related to components * updated components to ui_components in dss and scanner * updated inventory package with new components * updated components to ui_components in attendance * overrides package dependencies * Updated components * Complaint new component integration * version update fixes * sync null check fixes * merge conflicts fixes and boundary module fix * V1.5 sync count patch (#620) * updated hardcoded sync count, retry count and error api path * Published digit_data_model version update * merge conflicts fixes * lock file changes * added missing userLocation case for sync count inventory package component upgrade fixes * reverted super annotations for sync package * Updated missing changes in Side Effects Model * Create flutter-build-apk.yml Added a new workflow * moved the file to workflow folder * Update flutter-build-apk.yml Updated the flutter version * updated digit_ui_components to dev branch updated loaders updated readme for sync package * individual name search fix * solved the localization issue in survey_form_view.dart and taking the digit_ui_component from hcm_changes branch * component ui fixes * solved the scanner issue. * Added loader animation files * sync package publish attendance loader fix in mark page * disabled selection state in table * removed creds * solved the scanner ui issue (#633) * cancel button fix * checklist help text and action label PR merge * modified helpText mapping to additionalFields * pulled back changes https://github.com/HCM-MOZ-IMPEL/health-campaign-field-worker-app-impel/commit/3f7e76b0bd39d2ab6ede2e2c6730f5e0bd169a00 * theme fixing (#634) * solved the scanner ui issue * taking the theme from digit_ui_component * dashboard loader fix scanner results persisting fix * ui fixes * ui_components reference to dev branch github actions java version change to 17 ui fixes * ui fixes, bug fixes, version upgrades and package publish build apk workflow change * registration_delivery package update * registration_delivery package update * code rabbit comments resolved * code rabbit comments resolved * property check for apk git flow * build apk git action changes * reverted localization insert * changing env to qa for git actions * Update generate-apk.sh * Update generate-apk.sh * Android 34 support fix for registerReceiver issue * Update generate-apk.sh --------- Co-authored-by: Ramkrishna-egov Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-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 <83631045+naveen-egov@users.noreply.github.com> Co-authored-by: naveen-egov Co-authored-by: Shashwat12-egov Co-authored-by: yashita-egov --- .github/workflows/dart.yml | 13 +- .github/workflows/flutter-build-apk.yml | 75 + .../android/app/build.gradle | 44 +- .../android/app/src/main/AndroidManifest.xml | 18 +- .../main/kotlin/com/digit/hcm/MainActivity.kt | 57 +- .../kotlin/com/digit/hcm/location_service.kt | 9 +- .../android/build.gradle | 16 - .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/settings.gradle | 32 +- .../assets/animated_json/inline_loader.json | 1 + .../assets/animated_json/overlay_loader.json | 1 + .../assets/animated_json/page_loader.json | 1 + .../lib/app.dart | 11 +- .../lib/blocs/project/project.dart | 4 +- .../project_beneficiaries_downsync.dart | 12 +- .../lib/data/data_manager.dart | 35 - .../lib/data/network_manager.dart | 214 - .../data/repositories/local/localization.dart | 177 +- .../data/repositories/sync/remote_type.dart | 37 - .../lib/data/repositories/sync/sync_down.dart | 741 - .../lib/data/repositories/sync/sync_up.dart | 320 - .../lib/data/sync_registry.dart | 140 + .../lib/data/sync_service_mapper.dart | 862 + .../lib/models/bandwidth/bandwidth_model.dart | 16 - .../lib/models/downsync/downsync.mapper.dart | 20 +- .../additional_fields_type.mapper.dart | 2 +- .../entities/mdms_master_enums.mapper.dart | 2 +- .../entities/mdms_module_enums.mapper.dart | 2 +- .../lib/models/entities/roles.mapper.dart | 2 +- .../models/entities/roles_type.mapper.dart | 2 +- .../models/entities/scanner_type.mapper.dart | 2 +- .../lib/models/entities/status.dart | 33 +- .../lib/models/entities/status.mapper.dart | 2 +- .../lib/pages/authenticated.dart | 16 +- .../lib/pages/boundary_selection.dart | 82 +- .../lib/pages/home.dart | 356 +- .../lib/pages/language_selection.dart | 13 +- .../lib/pages/profile.dart | 10 +- .../beneficiary/beneficaries_report.dart | 644 +- .../lib/router/app_router.dart | 226 +- .../lib/utils/background_service.dart | 11 +- .../lib/utils/constants.dart | 21 + .../lib/utils/extensions/context_utility.dart | 12 + .../lib/utils/extensions/extensions.dart | 3 + .../lib/utils/localization_delegates.dart | 1 - .../lib/utils/utils.dart | 58 +- .../header/back_navigation_help_header.dart | 4 +- .../network_manager_provider_wrapper.dart | 6 - .../lib/widgets/sidebar/side_bar.dart | 28 +- .../pubspec.lock | 701 +- .../pubspec.yaml | 131 +- .../digit_entity/hooks/lib/models.mapper.dart | 26 +- .../digit_entity/hooks/pubspec.lock | 24 +- .../digit_entity/hooks/pubspec.yaml | 8 +- .../freezed_bloc/hooks/pubspec.lock | 6 +- .../freezed_bloc/hooks/pubspec.yaml | 2 +- melos.yaml | 24 +- packages/attendance_management/CHANGELOG.md | 22 +- .../lib/blocs/attendance_bloc.dart | 3 +- .../lib/blocs/attendance_individual_bloc.dart | 23 +- .../repositories/remote/attendance_logs.dart | 1 - .../remote/attendance_register.dart | 1 - .../entities/attendance_log.mapper.dart | 14 +- .../entities/attendance_register.mapper.dart | 14 +- .../lib/models/entities/attendee.mapper.dart | 20 +- .../models/entities/enum_values.mapper.dart | 2 +- .../entities/register_status.mapper.dart | 2 +- .../lib/models/entities/staff.mapper.dart | 20 +- .../lib/pages/manage_attendance.dart | 109 +- .../lib/pages/mark_attendance.dart | 50 +- .../lib/pages/session_select.dart | 491 +- .../lib/router/attendance_router.dart | 16 +- .../lib/utils/date_util_attendance.dart | 2 +- .../widgets/attendance_acknowledgement.dart | 22 +- .../widgets/back_navigation_help_header.dart | 2 +- packages/attendance_management/pubspec.lock | 297 +- packages/attendance_management/pubspec.yaml | 42 +- .../unit/search_attendee_by_name_test.dart | 1 - packages/auto_route/pubspec.lock | 541 - packages/closed_household/CHANGELOG.md | 4 +- .../closed_household_acknowledgement.dart | 10 +- .../lib/pages/closed_household_details.dart | 277 +- .../lib/pages/closed_household_summary.dart | 183 +- .../lib/pages/closed_household_wrapper.dart | 4 +- .../lib/router/closed_household_router.dart | 8 +- .../widgets/back_navigation_help_header.dart | 38 +- packages/closed_household/pubspec.lock | 312 +- packages/closed_household/pubspec.yaml | 31 +- packages/complaints/CHANGELOG.md | 7 + .../assets/animated_json/alert.json | 1127 ++ .../assets/animated_json/error.json | 728 + .../assets/animated_json/success.json | 917 + packages/complaints/example/lib/main.dart | 67 +- packages/complaints/example/pubspec.lock | 595 +- packages/complaints/example/pubspec.yaml | 3 +- .../lib/data/repositories/oplog/oplog.dart | 67 +- .../additional_fields_type.mapper.dart | 2 +- .../lib/models/pgr_address.mapper.dart | 14 +- .../lib/models/pgr_complaints.mapper.dart | 56 +- .../pgr_complaints_response.mapper.dart | 26 +- .../lib/pages/complaints_acknowledgement.dart | 51 +- .../pages/inbox/complaints_details_view.dart | 290 +- .../lib/pages/inbox/complaints_inbox.dart | 381 +- .../pages/inbox/complaints_inbox_filter.dart | 363 +- .../pages/inbox/complaints_inbox_search.dart | 176 +- .../pages/inbox/complaints_inbox_sort.dart | 141 +- .../pages/registration/complaint_type.dart | 240 +- .../registration/complaints_details.dart | 720 +- .../registration/complaints_location.dart | 275 +- .../complaints_registration_wrapper.dart | 92 +- packages/complaints/lib/utils/constants.dart | 8 +- .../widgets/boundary_selection_wrapper.dart | 2 +- .../header/back_navigation_help_header.dart | 42 +- .../no_result_card/no_result_card.dart | 2 +- packages/complaints/pubspec.lock | 745 +- packages/complaints/pubspec.yaml | 26 +- packages/dart_mappable_builder/CHANGELOG.md | 15 +- .../lib/src/builders/mappable_builder.dart | 2 +- .../src/generators/mixins/decoding_mixin.dart | 2 +- .../src/generators/mixins/equals_mixin.dart | 5 +- packages/dart_mappable_builder/pubspec.yaml | 4 +- .../test/utils/temp_asset_writer.dart | 2 +- packages/digit_components/CHANGELOG.md | 44 + .../digit_components/example/pubspec.lock | 181 +- .../digit_components/example/pubspec.yaml | 6 +- .../lib/theme/digit_theme.dart | 6 +- .../atoms/digit_integer_form_picker.dart | 2 +- .../lib/widgets/atoms/digit_stepper.dart | 22 +- .../lib/widgets/molecules/digit_table.dart | 4 +- packages/digit_components/pubspec.lock | 252 +- packages/digit_components/pubspec.yaml | 28 +- packages/digit_data_model/CHANGELOG.md | 21 +- .../lib/data/data_repository.dart | 2 +- .../data/local_store/sql_store/sql_store.dart | 90 +- .../local_store/sql_store/sql_store.g.dart | 15906 +++++++++++++++- .../sql_store/tables/attributes.dart | 2 +- .../tables/package_tables/side_effect.dart | 1 + .../local_store/sql_store/tables/target.dart | 4 +- .../lib/data/repositories/local/facility.dart | 3 - .../lib/data/repositories/oplog/oplog.dart | 13 +- .../data/repositories/remote/attributes.dart | 1 - .../lib/data/repositories/remote/product.dart | 2 - .../repositories/remote/project_staff.dart | 2 - .../lib/data/repositories/remote/user.dart | 2 - .../lib/data_model.mapper.dart | 20 +- .../lib/models/entities/address.dart | 1 - .../lib/models/entities/address.mapper.dart | 20 +- .../models/entities/address_type.mapper.dart | 2 +- .../lib/models/entities/attributes.dart | 7 +- .../models/entities/attributes.mapper.dart | 32 +- .../entities/beneficiary_type.mapper.dart | 2 +- .../models/entities/blood_group.mapper.dart | 2 +- .../lib/models/entities/boundary.mapper.dart | 14 +- .../lib/models/entities/document.dart | 3 - .../lib/models/entities/document.mapper.dart | 20 +- .../lib/models/entities/facility.dart | 3 - .../lib/models/entities/facility.mapper.dart | 20 +- .../lib/models/entities/gender.mapper.dart | 2 +- .../lib/models/entities/identifier.dart | 3 - .../models/entities/identifier.mapper.dart | 20 +- .../lib/models/entities/individual.dart | 3 - .../models/entities/individual.mapper.dart | 20 +- .../lib/models/entities/locality.dart | 1 - .../lib/models/entities/locality.mapper.dart | 20 +- .../lib/models/entities/name.dart | 3 - .../lib/models/entities/name.mapper.dart | 20 +- .../pgr_application_status.mapper.dart | 2 +- .../lib/models/entities/product.mapper.dart | 20 +- .../lib/models/entities/product_variant.dart | 3 - .../entities/product_variant.mapper.dart | 20 +- .../lib/models/entities/project.mapper.dart | 39 +- .../entities/project_facility.mapper.dart | 20 +- .../entities/project_product_variant.dart | 3 - .../project_product_variant.mapper.dart | 21 +- .../entities/project_resource.mapper.dart | 20 +- .../lib/models/entities/project_staff.dart | 1 - .../models/entities/project_staff.mapper.dart | 20 +- .../models/entities/project_type.mapper.dart | 38 +- .../lib/models/entities/target.dart | 2 +- .../lib/models/entities/target.mapper.dart | 26 +- .../lib/models/entities/user.mapper.dart | 20 +- .../models/entities/user_action.mapper.dart | 20 +- .../lib/models/oplog/oplog_entry.mapper.dart | 14 +- packages/digit_data_model/pubspec.lock | 210 +- packages/digit_data_model/pubspec.yaml | 94 +- packages/digit_dss/CHANGELOG.md | 17 +- packages/digit_dss/lib/blocs/dashboard.dart | 33 +- .../digit_dss/lib/data/remote/dashboard.dart | 2 +- .../lib/models/entities/chart_data.dart | 1 - .../models/entities/chart_data.mapper.dart | 8 +- .../entities/dashboard_request.mapper.dart | 26 +- .../dashboard_response_model.mapper.dart | 14 +- .../lib/models/entities/dss_enums.mapper.dart | 2 +- .../lib/models/entities/insight.dart | 1 - .../lib/models/entities/insight.mapper.dart | 8 +- .../digit_dss/lib/models/entities/plots.dart | 1 - .../lib/models/entities/plots.mapper.dart | 8 +- .../lib/pages/dashboard/dashboard.dart | 91 +- .../lib/router/dashboard_router.dart | 2 - packages/digit_dss/lib/utils/utils.dart | 5 +- .../widgets/back_navigation_help_header.dart | 8 +- .../dashboard/dashboard_metric_card.dart | 292 +- .../digit_dss/lib/widgets/no_result_card.dart | 4 +- packages/digit_dss/pubspec.lock | 705 +- packages/digit_dss/pubspec.yaml | 36 +- packages/digit_firebase_services/pubspec.lock | 426 +- packages/digit_location_tracker/CHANGELOG.md | 10 + packages/digit_location_tracker/README.md | 6 +- .../lib/utils/utils.dart | 9 +- packages/digit_location_tracker/pubspec.lock | 199 +- packages/digit_location_tracker/pubspec.yaml | 34 +- packages/digit_scanner/CHANGELOG.md | 9 + packages/digit_scanner/example/lib/main.dart | 1 - packages/digit_scanner/example/pubspec.lock | 651 +- packages/digit_scanner/example/pubspec.yaml | 5 +- .../digit_scanner/lib/pages/qr_scanner.dart | 183 +- .../lib/router/digit_scanner_router.dart | 2 - .../lib/utils/scanner_utils.dart | 91 +- .../vision_detector_views/camera_view.dart | 50 +- .../vision_detector_views/detector_view.dart | 4 +- packages/digit_scanner/pubspec.lock | 655 +- packages/digit_scanner/pubspec.yaml | 28 +- packages/digit_showcase/CHANGELOG.md | 11 +- .../digit_showcase/lib/tooltip_widget.dart | 4 +- packages/digit_showcase/pubspec.lock | 64 +- packages/digit_showcase/pubspec.yaml | 4 +- .../lib/widgets/integer_builder.dart | 2 +- packages/forms_engine/pubspec.lock | 150 +- packages/forms_engine/pubspec.yaml | 6 +- packages/inventory_management/CHANGELOG.md | 6 + .../lib/models/entities/inventory_enums.dart | 4 +- .../entities/inventory_enums.mapper.dart | 10 +- .../lib/models/entities/stock.mapper.dart | 20 +- .../entities/stock_reconciliation.mapper.dart | 21 +- .../entities/transaction_reason.mapper.dart | 2 +- .../entities/transaction_type.mapper.dart | 2 +- .../lib/pages/acknowledgement.dart | 122 +- .../lib/pages/facility_selection.dart | 41 +- .../lib/pages/manage_stocks.dart | 155 +- .../record_stock/record_stock_wrapper.dart | 28 +- .../lib/pages/record_stock/stock_details.dart | 1549 +- .../pages/record_stock/warehouse_details.dart | 470 +- .../lib/pages/reports/report_details.dart | 322 +- .../lib/pages/reports/report_selection.dart | 179 +- .../stock_reconciliation.dart | 916 +- .../lib/router/inventory_router.dart | 2 - .../widgets/back_navigation_help_header.dart | 40 +- .../no_facilities_assigned_dialog.dart | 52 +- .../widgets/reports/readonly_pluto_grid.dart | 13 +- packages/inventory_management/pubspec.lock | 628 +- packages/inventory_management/pubspec.yaml | 46 +- .../test/blocs/record_stock_test.dart | 13 +- packages/referral_reconciliation/CHANGELOG.md | 7 +- .../lib/blocs/referral_recon_record.dart | 26 +- .../search_referral_reconciliations.dart | 2 +- .../entities/hf_additional_fields.mapper.dart | 2 +- .../models/entities/hf_referral.mapper.dart | 20 +- .../entities/referral_recon_enums.mapper.dart | 2 +- .../lib/pages/acknowledgement.dart | 18 +- .../reason_checklist_preview.dart | 27 +- .../record_facility_details.dart | 11 +- .../record_reason_checklist.dart | 128 +- .../record_referral_details.dart | 34 +- .../project_facility_selection.dart | 5 +- .../search_referral_reconciliations.dart | 27 +- .../referral_reconciliation_router.dart | 2 - .../widgets/back_navigation_help_header.dart | 3 +- .../lib/widgets/beneficiary_card.dart | 7 +- .../lib/widgets/view_referral_card.dart | 6 +- packages/referral_reconciliation/pubspec.lock | 302 +- packages/referral_reconciliation/pubspec.yaml | 47 +- .../blocs/referral_recon_record_test.dart | 17 +- ...eferral_recon_service_definition_test.dart | 4 - packages/registration_delivery/CHANGELOG.md | 35 +- .../beneficiary_registration.dart | 31 +- .../household_overview.dart | 123 +- .../household_global_seach.dart | 2 +- .../individual_global_search.dart | 84 +- .../search_households/proximity_search.dart | 0 .../search_households/search_households.dart | 4 +- .../search_households/tag_by_search.dart | 2 +- .../local/base/household_base.dart | 1 - .../local/base/household_member_base.dart | 1 - .../local/base/project_beneficiary_base.dart | 1 - .../local/base/side_effect_base.dart | 1 - .../repositories/local/base/task_base.dart | 1 - .../local/household_global_search.dart | 19 +- .../repositories/local/household_member.dart | 1 - .../local/individual_global_search.dart | 183 +- .../local/project_beneficiary.dart | 3 +- .../data/repositories/local/side_effect.dart | 1 - .../additional_fields_type.mapper.dart | 2 +- .../deliver_strategy_type.mapper.dart | 2 +- .../lib/models/entities/household.mapper.dart | 20 +- .../entities/household_member.mapper.dart | 20 +- .../entities/project_beneficiary.mapper.dart | 21 +- .../lib/models/entities/referral.mapper.dart | 20 +- .../reg_form_validations_type.mapper.dart | 2 +- .../registration_delivery_enums.mapper.dart | 2 +- .../lib/models/entities/side_effect.dart | 4 + .../models/entities/side_effect.mapper.dart | 39 +- .../lib/models/entities/status.mapper.dart | 2 +- .../lib/models/entities/task.mapper.dart | 20 +- .../models/entities/task_resource.mapper.dart | 20 +- .../beneficiary/beneficiary_checklist.dart | 93 +- .../beneficiary/beneficiary_details.dart | 512 +- .../beneficiary/beneficiary_wrapper.dart | 3 - .../beneficiary/deliver_intervention.dart | 26 +- .../beneficiary/delivery_summary_page.dart | 646 +- .../pages/beneficiary/dose_administered.dart | 662 +- .../pages/beneficiary/facility_selection.dart | 1 - .../pages/beneficiary/household_overview.dart | 1230 +- .../record_past_delivery_details.dart | 380 +- .../pages/beneficiary/refer_beneficiary.dart | 535 +- .../pages/beneficiary/refused_delivery.dart | 327 +- .../lib/pages/beneficiary/side_effects.dart | 134 +- .../widgets/household_acknowledgement.dart | 12 +- .../beneficiary/widgets/past_delivery.dart | 127 +- .../widgets/record_delivery_cycle.dart | 254 +- .../widgets/splash_acknowledgement.dart | 13 +- .../beneficiary_acknowledgement.dart | 23 +- .../house_details.dart | 292 +- .../household_details.dart | 615 +- .../household_location.dart | 374 +- .../individual_details.dart | 1029 +- .../lib/pages/reason_for_deletion.dart | 6 +- .../pages/registration_delivery_wrapper.dart | 6 +- .../lib/pages/search_beneficiary.dart | 49 +- .../lib/pages/summary_page.dart | 426 +- .../router/registration_delivery_router.dart | 2 - .../lib/utils/constants.dart | 2 + .../lib/utils/extensions/context_utility.dart | 6 - .../lib/utils/extensions/extensions.dart | 1 - .../lib/utils/utils.dart | 152 +- .../widgets/back_navigation_help_header.dart | 39 +- .../widgets/beneficiary/beneficiary_card.dart | 64 +- .../resource_beneficiary_card.dart | 172 +- .../beneficiary/view_beneficiary_card.dart | 138 +- .../no_facilities_assigned_dialog.dart | 6 +- .../lib/widgets/member_card/member_card.dart | 134 +- .../widgets/status_filter/status_filter.dart | 19 +- .../lib/widgets/table_card/table_card.dart | 20 +- packages/registration_delivery/pubspec.lock | 276 +- packages/registration_delivery/pubspec.yaml | 52 +- packages/survey_form/CHANGELOG.md | 5 + packages/survey_form/example/lib/main.dart | 10 +- packages/survey_form/example/pubspec.lock | 292 +- packages/survey_form/example/pubspec.yaml | 2 +- .../lib/data/repositories/local/service.dart | 23 +- .../lib/data/repositories/remote/service.dart | 12 +- .../remote/service_attributes.dart | 12 +- .../remote/service_definition.dart | 12 +- .../lib/models/entities/service.mapper.dart | 20 +- .../models/entities/service_attributes.dart | 22 +- .../entities/service_attributes.mapper.dart | 21 +- .../models/entities/service_definition.dart | 1 - .../entities/service_definition.mapper.dart | 21 +- .../lib/pages/acknowledgement.dart | 51 +- .../survey_form/lib/pages/survey_form.dart | 32 +- .../lib/pages/survey_form_boundary_view.dart | 15 +- .../lib/pages/survey_form_preview.dart | 154 +- .../lib/pages/survey_form_view.dart | 741 +- .../lib/pages/survey_form_wrapper.dart | 19 +- .../survey_form/lib/widgets/action_card.dart | 45 - .../widgets/back_navigation_help_header.dart | 20 +- packages/survey_form/pubspec.lock | 476 +- packages/survey_form/pubspec.yaml | 85 +- .../test/constants/test_constants.dart | 4 +- packages/sync_service/.gitignore | 29 + packages/sync_service/.metadata | 10 + packages/sync_service/CHANGELOG.md | 3 + packages/sync_service/LICENSE | 21 + packages/sync_service/README.md | 53 + packages/sync_service/analysis_options.yaml | 4 + packages/sync_service/build.yaml | 5 + .../sync_service}/lib/blocs/sync/sync.dart | 40 +- .../lib/blocs/sync/sync.freezed.dart | 0 .../data/repositories/sync/remote_type.dart | 49 + .../lib/data/repositories/sync/sync_down.dart | 86 + .../lib/data/repositories/sync/sync_up.dart | 302 + .../lib/data/sync_entity_mapper_listener.dart | 44 + .../sync_service/lib/data/sync_service.dart | 180 + .../lib/models/bandwidth/bandwidth_model.dart | 22 + .../bandwidth/bandwidth_model.freezed.dart | 0 .../models/bandwidth/bandwidth_model.g.dart | 0 .../sync_service/lib/sync_service_lib.dart | 10 + packages/sync_service/lib/utils/utils.dart | 84 + packages/sync_service/pubspec.yaml | 83 + .../sync_service/test/sync_service_test.dart | 3 + tools/generate-apk.sh | 60 +- 390 files changed, 37296 insertions(+), 17116 deletions(-) create mode 100644 .github/workflows/flutter-build-apk.yml create mode 100644 apps/health_campaign_field_worker_app/assets/animated_json/inline_loader.json create mode 100644 apps/health_campaign_field_worker_app/assets/animated_json/overlay_loader.json create mode 100644 apps/health_campaign_field_worker_app/assets/animated_json/page_loader.json delete mode 100644 apps/health_campaign_field_worker_app/lib/data/data_manager.dart delete mode 100644 apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_down.dart delete mode 100644 apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_up.dart create mode 100644 apps/health_campaign_field_worker_app/lib/data/sync_registry.dart create mode 100644 apps/health_campaign_field_worker_app/lib/data/sync_service_mapper.dart delete mode 100644 apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.dart delete mode 100644 packages/auto_route/pubspec.lock create mode 100644 packages/complaints/assets/animated_json/alert.json create mode 100644 packages/complaints/assets/animated_json/error.json create mode 100644 packages/complaints/assets/animated_json/success.json create mode 100644 packages/registration_delivery/lib/blocs/search_households/proximity_search.dart delete mode 100644 packages/survey_form/lib/widgets/action_card.dart create mode 100644 packages/sync_service/.gitignore create mode 100644 packages/sync_service/.metadata create mode 100644 packages/sync_service/CHANGELOG.md create mode 100644 packages/sync_service/LICENSE create mode 100644 packages/sync_service/README.md create mode 100644 packages/sync_service/analysis_options.yaml create mode 100644 packages/sync_service/build.yaml rename {apps/health_campaign_field_worker_app => packages/sync_service}/lib/blocs/sync/sync.dart (62%) rename {apps/health_campaign_field_worker_app => packages/sync_service}/lib/blocs/sync/sync.freezed.dart (100%) create mode 100644 packages/sync_service/lib/data/repositories/sync/remote_type.dart create mode 100644 packages/sync_service/lib/data/repositories/sync/sync_down.dart create mode 100644 packages/sync_service/lib/data/repositories/sync/sync_up.dart create mode 100644 packages/sync_service/lib/data/sync_entity_mapper_listener.dart create mode 100644 packages/sync_service/lib/data/sync_service.dart create mode 100644 packages/sync_service/lib/models/bandwidth/bandwidth_model.dart rename {apps/health_campaign_field_worker_app => packages/sync_service}/lib/models/bandwidth/bandwidth_model.freezed.dart (100%) rename {apps/health_campaign_field_worker_app => packages/sync_service}/lib/models/bandwidth/bandwidth_model.g.dart (100%) create mode 100644 packages/sync_service/lib/sync_service_lib.dart create mode 100644 packages/sync_service/lib/utils/utils.dart create mode 100644 packages/sync_service/pubspec.yaml create mode 100644 packages/sync_service/test/sync_service_test.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 35a11152d..0d45fc254 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,8 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Run analysis and tests on: @@ -22,7 +17,13 @@ jobs: - name: Flutter action uses: subosito/flutter-action@v2.8.0 with: - flutter-version: "3.16.5" + flutter-version: "3.22.1" + + - name: Clean previous builds + run: flutter clean + + - name: Install dependencies + run: flutter pub get - name: Generate models run: ./tools/install_bricks.sh diff --git a/.github/workflows/flutter-build-apk.yml b/.github/workflows/flutter-build-apk.yml new file mode 100644 index 000000000..a8995a1b0 --- /dev/null +++ b/.github/workflows/flutter-build-apk.yml @@ -0,0 +1,75 @@ +name: Build APK Workflow + +on: + push: + branches: [ 'develop', 'master' ] # This specifies that the workflow will run on any push to the 'develop' or 'master' branches + pull_request: + branches: [ 'develop', 'master' ] # Optionally, run on pull requests targeting the 'develop' or 'master' branches + +jobs: + build-apk: + runs-on: ubuntu-latest + environment: UAT + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' # Specify the Java distribution + + - name: Flutter action + uses: subosito/flutter-action@v2.8.0 + with: + flutter-version: "3.22.2" + + - name: Set up Android SDK + uses: android-actions/setup-android@v2 + with: + api-level: 33 + build-tools: 33.0.2 + + - name: Install Dependencies + run: flutter pub get + + - name: Create .env file + run: | + echo "BASE_URL=${{ vars.BASE_URL }}" >> apps/health_campaign_field_worker_app/.env + echo "MDMS_API_PATH=${{ vars.MDMS_API_PATH }}" >> apps/health_campaign_field_worker_app/.env + echo "TENANT_ID=${{ vars.TENANT_ID }}" >> apps/health_campaign_field_worker_app/.env + echo "ACTIONS_API_PATH=${{ vars.ACTIONS_API_PATH }}" >> apps/health_campaign_field_worker_app/.env + echo "SYNC_DOWN_RETRY_COUNT=${{ vars.SYNC_DOWN_RETRY_COUNT }}" >> apps/health_campaign_field_worker_app/.env + echo "RETRY_TIME_INTERVAL=${{ vars.RETRY_TIME_INTERVAL }}" >> apps/health_campaign_field_worker_app/.env + echo "CONNECT_TIMEOUT=${{ vars.CONNECT_TIMEOUT }}" >> apps/health_campaign_field_worker_app/.env + echo "RECEIVE_TIMEOUT=${{ vars.RECEIVE_TIMEOUT }}" >> apps/health_campaign_field_worker_app/.env + echo "SEND_TIMEOUT=${{ vars.SEND_TIMEOUT }}" >> apps/health_campaign_field_worker_app/.env + echo "CHECK_BANDWIDTH_API=${{ vars.CHECK_BANDWIDTH_API }}" >> apps/health_campaign_field_worker_app/.env + echo "HIERARCHY_TYPE=${{ vars.HIERARCHY_TYPE }}" >> apps/health_campaign_field_worker_app/.env + echo "ENV_NAME=${{ vars.ENV_NAME }}" >> apps/health_campaign_field_worker_app/.env + + - name: Verify .env file + run: | + ls -l apps/health_campaign_field_worker_app/.env + cat apps/health_campaign_field_worker_app/.env + + - name: Run APK build script + env: + BUILD_CONFIG: release # or profile depending on your choice + run: bash ./tools/generate-apk.sh + + # Archive the APK as a build artifact so it can be downloaded + - name: Upload APKs + uses: actions/upload-artifact@v3 + with: + name: app-release-apk + path: apps/health_campaign_field_worker_app/build/app/outputs/flutter-apk/app-release.apk + + - name: Upload .env as artifact + uses: actions/upload-artifact@v3 + with: + name: env-file + path: apps/health_campaign_field_worker_app/.env + include-hidden-files: true diff --git a/apps/health_campaign_field_worker_app/android/app/build.gradle b/apps/health_campaign_field_worker_app/android/app/build.gradle index 7ed3cf689..614262029 100644 --- a/apps/health_campaign_field_worker_app/android/app/build.gradle +++ b/apps/health_campaign_field_worker_app/android/app/build.gradle @@ -1,3 +1,10 @@ +plugins { + id 'com.android.application' + id 'kotlin-android' + id 'dev.flutter.flutter-gradle-plugin' + id 'com.google.gms.google-services' +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,24 +23,18 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -// START: FlutterFire Configuration -apply plugin: 'com.google.gms.google-services' -// END: FlutterFire Configuration -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 34 + compileSdk = flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } sourceSets { @@ -50,8 +46,8 @@ android { applicationId "com.digit.hcm" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 21 - targetSdkVersion flutter.targetSdkVersion + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -63,12 +59,16 @@ android { signingConfig signingConfigs.debug } } + + if (!project.hasProperty('USE_GOOGLE_SERVICES')) { + tasks.whenTaskAdded { task -> + if (task.name.contains("GoogleServices")) { + task.enabled = false + } + } + } } flutter { source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} +} \ No newline at end of file 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 8599cae8b..5f39e8455 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 @@ -3,6 +3,7 @@ + @@ -10,7 +11,7 @@ - + @@ -28,16 +29,16 @@ android:allowBackup="false" - android:fullBackupOnly="false" android:fullBackupContent="false" + android:fullBackupOnly="false" + android:icon="@mipmap/ic_launcher" + android:label="HCM"> + android:exported="false" + android:foregroundServiceType="location" /> - - + + MethodChannel( + flutterEngine!!.dartExecutor.binaryMessenger, + CHANNEL + ).setMethodCallHandler { call, result -> when (call.method) { "startLocationUpdates" -> { val interval = (call.argument("interval")?.toLong()) ?: 60000L - val stopAfterTimestamp = (call.argument("stopAfterTimestamp")?.toLong()) ?: (System.currentTimeMillis() + 60000L) + val stopAfterTimestamp = (call.argument("stopAfterTimestamp")?.toLong()) + ?: (System.currentTimeMillis() + 60000L) if (!isMyServiceRunning(LocationService::class.java)) { startService(interval, stopAfterTimestamp) } else { - Toast.makeText(this, "Location service is already running", Toast.LENGTH_SHORT).show() + Toast.makeText( + this, + "Location service is already running", + Toast.LENGTH_SHORT + ).show() } result.success(null) } + "stopLocationUpdates" -> { stopService() result.success(null) } + else -> result.notImplemented() } } - // Register the receiver for location updates + // Register the receiver for location updates, with proper export settings for Android 13+ val filter = IntentFilter("LocationUpdate") - registerReceiver(locationReceiver, filter) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + registerReceiver(locationReceiver, filter, Context.RECEIVER_EXPORTED) + } else { + registerReceiver(locationReceiver, filter) + } } override fun onDestroy() { @@ -90,7 +112,8 @@ class MainActivity : FlutterActivity() { val manager = getSystemService(Context.ACTIVITY_SERVICE) as android.app.ActivityManager for (service in manager.getRunningServices(Int.MAX_VALUE)) { if (serviceClass.name == service.service.className) { - Toast.makeText(this, "Location service is already running", Toast.LENGTH_SHORT).show() + Toast.makeText(this, "Location service is already running", Toast.LENGTH_SHORT) + .show() return true } } diff --git a/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt b/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt index 930d4a408..23756ee0e 100644 --- a/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt +++ b/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt @@ -92,10 +92,11 @@ class LocationService : Service() { val intent = Intent("LocationUpdate") intent.putExtra("latitude", location.latitude) intent.putExtra("longitude", location.longitude) + intent.putExtra("accuracy", location.accuracy) sendBroadcast(intent) - Log.d("LocationSharing", "Location sent to MainActivity: Latitude ${location.latitude}, Longitude ${location.longitude}") + Log.d("LocationSharing", "Location sent to MainActivity: Latitude ${location.latitude}, Longitude ${location.longitude}, Accuracy ${location.accuracy}") } override fun onDestroy() { @@ -129,8 +130,10 @@ class LocationService : Service() { val notificationIntent = Intent(this, MainActivity::class.java) val pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE) val timestamp = System.currentTimeMillis() - val notificationContent = "Latitude: ${location.latitude}, Longitude: ${location.longitude}," - writeToFile("Latitude: ${location.latitude}, Longitude: ${location.longitude}, isSync: false, timestamp: $timestamp") + val notificationContent = "Latitude: ${location.latitude}, Longitude: ${location.longitude}, Accuracy: ${location.accuracy}" // Include accuracy + + // Write location and accuracy to file + writeToFile("Latitude: ${location.latitude}, Longitude: ${location.longitude}, Accuracy: ${location.accuracy}, isSync: false, timestamp: $timestamp") val notification = NotificationCompat.Builder(this, CHANNEL_ID) .setContentTitle("Location Service") diff --git a/apps/health_campaign_field_worker_app/android/build.gradle b/apps/health_campaign_field_worker_app/android/build.gradle index 240f9a683..bc157bd1a 100644 --- a/apps/health_campaign_field_worker_app/android/build.gradle +++ b/apps/health_campaign_field_worker_app/android/build.gradle @@ -1,19 +1,3 @@ -buildscript { - ext.kotlin_version = '1.8.22' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' - // END: FlutterFire Configuration - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() diff --git a/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties b/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties index cb24abda1..41dfb8790 100644 --- a/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties +++ b/apps/health_campaign_field_worker_app/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/apps/health_campaign_field_worker_app/android/settings.gradle b/apps/health_campaign_field_worker_app/android/settings.gradle index 44e62bcf0..a9fc22210 100644 --- a/apps/health_campaign_field_worker_app/android/settings.gradle +++ b/apps/health_campaign_field_worker_app/android/settings.gradle @@ -1,11 +1,27 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.google.gms.google-services" version "4.4.0" apply false + id "com.google.firebase.crashlytics" version "2.9.9" apply false +} + +include ":app" \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/inline_loader.json b/apps/health_campaign_field_worker_app/assets/animated_json/inline_loader.json new file mode 100644 index 000000000..e5a3cc656 --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/inline_loader.json @@ -0,0 +1 @@ +{"nm":"Main Scene","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.37.0"},"layers":[{"ty":4,"nm":"Shape Layer 5","sr":1,"st":20,"op":620,"ip":20,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":20},{"s":[360],"t":110}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[10,10]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 4","sr":1,"st":15,"op":615,"ip":15,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":15},{"s":[360],"t":105}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[20,20]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 3","sr":1,"st":10,"op":610,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":10},{"s":[360],"t":100}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[30,30]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":5,"op":605,"ip":5,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":5},{"s":[360],"t":95}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[40,40]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":600,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[360],"t":90}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[50,50],"t":0},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[40,40],"t":84},{"s":[50,50],"t":100}]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.7765,0.2902,0.051]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"5.7.0","fr":60,"op":106,"ip":0,"assets":[]} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/overlay_loader.json b/apps/health_campaign_field_worker_app/assets/animated_json/overlay_loader.json new file mode 100644 index 000000000..9a9759f2d --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/overlay_loader.json @@ -0,0 +1 @@ +{"nm":"Main Scene","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.37.1"},"layers":[{"ty":4,"nm":"Shape Layer 5","sr":1,"st":20,"op":620,"ip":20,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":20},{"s":[360],"t":110}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[10,10]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 4","sr":1,"st":15,"op":615,"ip":15,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":15},{"s":[360],"t":105}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[20,20]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 3","sr":1,"st":10,"op":610,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":10},{"s":[360],"t":100}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[30,30]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":5,"op":605,"ip":5,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":5},{"s":[360],"t":95}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[40,40]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":600,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[360],"t":90}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[50,50],"t":0},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[40,40],"t":84},{"s":[50,50],"t":100}]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"5.7.0","fr":60,"op":106,"ip":0,"assets":[]} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/assets/animated_json/page_loader.json b/apps/health_campaign_field_worker_app/assets/animated_json/page_loader.json new file mode 100644 index 000000000..ef02f47ca --- /dev/null +++ b/apps/health_campaign_field_worker_app/assets/animated_json/page_loader.json @@ -0,0 +1 @@ +{"nm":"Main Scene","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.37.1"},"layers":[{"ty":4,"nm":"Shape Layer 5","sr":1,"st":20,"op":620,"ip":20,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":20},{"s":[360],"t":110}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[10,10]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 4","sr":1,"st":15,"op":615,"ip":15,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":15},{"s":[360],"t":105}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[20,20]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 3","sr":1,"st":10,"op":610,"ip":10,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":10},{"s":[360],"t":100}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[30,30]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":5,"op":605,"ip":5,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[251,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":5},{"s":[360],"t":95}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":0,"k":[40,40]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":600,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250]},"r":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[360],"t":90}]},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,-100]},"s":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[50,50],"t":0},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[40,40],"t":84},{"s":[50,50],"t":100}]}},{"ty":"st","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Stroke","nm":"Stroke 1","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.0353,0.2902,0.4]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0,0],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"5.7.0","fr":60,"op":106,"ip":0,"assets":[]} \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/lib/app.dart b/apps/health_campaign_field_worker_app/lib/app.dart index 531d0295c..b5fa3fb6c 100644 --- a/apps/health_campaign_field_worker_app/lib/app.dart +++ b/apps/health_campaign_field_worker_app/lib/app.dart @@ -1,5 +1,4 @@ import 'package:attendance_management/attendance_management.dart'; -import 'package:survey_form/survey_form.dart'; import 'package:closed_household/blocs/closed_household.dart'; import 'package:closed_household/closed_household.dart'; import 'package:digit_components/digit_components.dart'; @@ -19,6 +18,7 @@ import 'package:registration_delivery/models/entities/household.dart'; import 'package:registration_delivery/models/entities/household_member.dart'; import 'package:registration_delivery/models/entities/project_beneficiary.dart'; import 'package:registration_delivery/models/entities/task.dart'; +import 'package:survey_form/survey_form.dart'; import 'blocs/app_initialization/app_initialization.dart'; import 'blocs/auth/auth.dart'; @@ -184,13 +184,8 @@ class MainApplicationState extends State widget.sql) ..add( LocalizationEvent.onLoadLocalization( - module: localizationModulesList.interfaces - .where((element) => - element.type == - Modules.localizationModule) - .map((e) => e.name.toString()) - .join(',') - .toString(), + module: + "hcm-boundary-${envConfig.variables.hierarchyType.toLowerCase()},${localizationModulesList.interfaces.where((element) => element.type == Modules.localizationModule).map((e) => e.name.toString()).join(',')}", tenantId: appConfig.tenantId.toString(), locale: firstLanguage, path: Constants.localizationApiPath, diff --git a/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart b/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart index 3be8eec58..07347633e 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart +++ b/apps/health_campaign_field_worker_app/lib/blocs/project/project.dart @@ -161,8 +161,8 @@ class ProjectBloc extends Bloc { title: 'ProjectBloc', ); - final isOnline = connectivityResult == ConnectivityResult.wifi || - connectivityResult == ConnectivityResult.mobile; + final isOnline = connectivityResult.firstOrNull == ConnectivityResult.wifi || + connectivityResult.firstOrNull == ConnectivityResult.mobile; final selectedProject = await localSecureStore.selectedProject; final isProjectSetUpComplete = await localSecureStore .isProjectSetUpComplete(selectedProject?.id ?? "noProjectId"); diff --git a/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart b/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart index a443250b1..61c278aeb 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart +++ b/apps/health_campaign_field_worker_app/lib/blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart @@ -2,14 +2,14 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; -import 'package:disk_space/disk_space.dart'; +import 'package:disk_space_update/disk_space_update.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:registration_delivery/registration_delivery.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../../data/local_store/no_sql/schema/app_configuration.dart'; import '../../data/local_store/secure_store/secure_store.dart'; -import '../../data/network_manager.dart'; import '../../data/repositories/remote/bandwidth_check.dart'; import '../../models/downsync/downsync.dart'; import '../../utils/background_service.dart'; @@ -27,7 +27,6 @@ class BeneficiaryDownSyncBloc downSyncRemoteRepository; final LocalRepository downSyncLocalRepository; - final NetworkManager networkManager; final BandwidthCheckRepository bandwidthCheckRepository; final LocalRepository householdLocalRepository; @@ -39,12 +38,11 @@ class BeneficiaryDownSyncBloc final LocalRepository sideEffectLocalRepository; final LocalRepository - referralLocalRepository; + referralLocalRepository; BeneficiaryDownSyncBloc({ required this.individualLocalRepository, required this.downSyncRemoteRepository, required this.downSyncLocalRepository, - required this.networkManager, required this.bandwidthCheckRepository, required this.householdLocalRepository, required this.householdMemberLocalRepository, @@ -203,7 +201,9 @@ class BeneficiaryDownSyncBloc ); // check if the API response is there or it failed if (downSyncResults.isNotEmpty) { - await networkManager.writeToEntityDB(downSyncResults, [ + await SyncServiceSingleton() + .entityMapper + ?.writeToEntityDB(downSyncResults, [ individualLocalRepository, householdLocalRepository, householdMemberLocalRepository, diff --git a/apps/health_campaign_field_worker_app/lib/data/data_manager.dart b/apps/health_campaign_field_worker_app/lib/data/data_manager.dart deleted file mode 100644 index 7d649d73e..000000000 --- a/apps/health_campaign_field_worker_app/lib/data/data_manager.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'dart:async'; - -import 'package:digit_data_model/data_model.dart'; - -class DataManager { - final RemoteRepository remoteRepository; - final LocalRepository localRepository; - final PersistenceConfiguration configuration; - - const DataManager({ - required this.localRepository, - required this.remoteRepository, - required this.configuration, - }); - - DataRepository _getRepository(PersistenceConfiguration configuration) { - switch (configuration) { - case PersistenceConfiguration.offline: - return localRepository; - case PersistenceConfiguration.online: - return remoteRepository; - } - } - - FutureOr> search(R query) => - _getRepository(configuration).search(query); - - FutureOr create(D entity) => - _getRepository(configuration).create(entity); - - FutureOr update(D entity) => - _getRepository(configuration).update(entity); -} - -enum PersistenceConfiguration { offline, online } diff --git a/apps/health_campaign_field_worker_app/lib/data/network_manager.dart b/apps/health_campaign_field_worker_app/lib/data/network_manager.dart index 744577530..34125ce56 100644 --- a/apps/health_campaign_field_worker_app/lib/data/network_manager.dart +++ b/apps/health_campaign_field_worker_app/lib/data/network_manager.dart @@ -1,18 +1,6 @@ -import 'dart:async'; -import 'dart:convert'; - import 'package:digit_data_model/data_model.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_background_service/flutter_background_service.dart'; import 'package:provider/provider.dart'; -import 'package:registration_delivery/registration_delivery.dart'; - -import '../models/bandwidth/bandwidth_model.dart'; -import 'local_store/secure_store/secure_store.dart'; -import 'repositories/sync/remote_type.dart'; -import 'repositories/sync/sync_down.dart'; -import 'repositories/sync/sync_up.dart'; class NetworkManager { final NetworkManagerConfiguration configuration; @@ -30,194 +18,6 @@ class NetworkManager { return context.read>(); } } - -/* This function will read the params and get the records which are not synced - and pushes to the sync-up and sync-down methods */ - - FutureOr performSync({ - required List localRepositories, - required List remoteRepositories, - required BandwidthModel bandwidthModel, - ServiceInstance? service, - }) async { - if (configuration.persistenceConfig == - PersistenceConfiguration.onlineOnly) { - throw Exception('Sync up is not valid for online only configuration'); - } - bool isSyncCompleted = false; - - final futuresSyncDown = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), - ); - final pendingSyncDownEntries = futuresSyncDown.expand((e) => e).toList(); - - final futuresSyncUp = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), - ); - final pendingSyncUpEntries = futuresSyncUp.expand((e) => e).toList(); - - SyncError? syncError; - -// Perform the sync Down Operation - - try { - await PerformSyncDown.syncDown( - bandwidthModel: bandwidthModel, - localRepositories: localRepositories.toSet().toList(), - remoteRepositories: remoteRepositories.toSet().toList(), - configuration: configuration, - ); - } catch (e) { - syncError = SyncDownError(e); - service?.stopSelf(); - } - -// Perform the sync up Operation - - try { - await PerformSyncUp.syncUp( - bandwidthModel: bandwidthModel, - localRepositories: localRepositories.toSet().toList(), - remoteRepositories: remoteRepositories.toSet().toList(), - ); - } catch (e) { - if (kDebugMode) { - print('Sync Up Error: $e'); - } - syncError ??= SyncUpError(e); - service?.stopSelf(); - } - - if (syncError != null) throw syncError; - - // Recursive function which will call the Perfom Sync - - if (pendingSyncUpEntries.isNotEmpty || pendingSyncDownEntries.isNotEmpty) { - await Future.delayed(const Duration(seconds: 3)); - isSyncCompleted = await performSync( - bandwidthModel: bandwidthModel, - localRepositories: localRepositories, - remoteRepositories: remoteRepositories, - ); - } else if (pendingSyncUpEntries.isEmpty && pendingSyncDownEntries.isEmpty) { - await LocalSecureStore.instance.setManualSyncTrigger(false); - isSyncCompleted = true; - } - - return isSyncCompleted; - } - - - FutureOr writeToEntityDB( - Map response, - List localRepositories, - ) async { - try { - for (int i = 0; i <= response.keys.length - 1; i++) { - if (response.keys.elementAt(i) != 'DownsyncCriteria') { - final local = RepositoryType.getLocalForType( - DataModels.getDataModelForEntityName(response.keys.elementAt(i)), - localRepositories, - ); - final List entityResponse = - response[response.keys.elementAt(i)] ?? []; - - final entityList = - entityResponse.whereType>().toList(); - - switch (response.keys.elementAt(i)) { - case "Individuals": - final entity = entityList - .map((e) => IndividualModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "Households": - final entity = entityList - .map((e) => HouseholdModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "HouseholdMembers": - final entity = entityList - .map( - (e) => HouseholdMemberModelMapper.fromJson( - jsonEncode(e), - ), - ) - .toList(); - await local.bulkCreate(entity); - case "ProjectBeneficiaries": - final entity = entityList - .map((e) => - ProjectBeneficiaryModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "Tasks": - final entity = entityList - .map((e) => TaskModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "SideEffects": - final entity = entityList - .map((e) => SideEffectModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - case "Referrals": - final entity = entityList - .map((e) => ReferralModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - default: - final entity = entityList - .map((e) => EntityModelMapper.fromJson(jsonEncode(e))) - .toList(); - await local.bulkCreate(entity); - } - } - } - } catch (e) { - rethrow; - } - } - - FutureOr getPendingSyncRecordsCount( - List localRepositories, - String userId, - ) async => - (await Future.wait(localRepositories.map((e) { - return e.getItemsToBeSyncedUp(userId); - }))) - .expand((element) => element) - .length; -} - -FutureOr> filterEntitybyBandwidth( - int batchSize, - List entities, -) async { - final List items = []; - final int size = batchSize < entities.length ? batchSize : entities.length; - - for (var i = 0; i < size; i++) { - items.add(entities[i]); - } - - return items; -} - -Future>> filterOpLogByBandwidth( - int batchSize, - List> entities, -) async { - final List> items = []; - final int size = batchSize < entities.length ? batchSize : entities.length; - - for (var i = 0; i < size; i++) { - items.add(entities[i]); - } - - return items; } class NetworkManagerConfiguration { @@ -227,17 +27,3 @@ class NetworkManagerConfiguration { this.persistenceConfig = PersistenceConfiguration.offlineFirst, }); } - -abstract class SyncError implements Exception { - final dynamic error; - - const SyncError([this.error]); -} - -class SyncUpError extends SyncError { - const SyncUpError([super.error]); -} - -class SyncDownError extends SyncError { - const SyncDownError([super.error]); -} diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart index bd9fc1e08..2ea70837d 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/local/localization.dart @@ -10,98 +10,113 @@ import '../../local_store/no_sql/schema/localization.dart'; class LocalizationLocalRepository { FutureOr> returnLocalizationFromSQL( LocalSqlDataStore sql) async { - final selectQuery = sql.select(sql.localization).join([]); - - // List to hold the AND conditions - final andConditions = >[]; - - // Add condition for locale if provided - if (LocalizationParams().locale != null) { - final localeString = '${LocalizationParams().locale!}'; - andConditions.add(sql.localization.locale.equals(localeString)); - } - - // Add conditions for modules and codes - if (LocalizationParams().module != null && - LocalizationParams().module!.isNotEmpty) { - final moduleToExclude = LocalizationParams().module!; - - if (LocalizationParams().exclude == true) { - // Exclude modules but include records where the code matches - final moduleCondition = - sql.localization.module.contains(moduleToExclude).not(); - final codeCondition = LocalizationParams().code != null && - LocalizationParams().code!.isNotEmpty - ? sql.localization.code.isIn(LocalizationParams().code!.toList()) - : const Constant(false); // True if no code filter - - // Combine conditions: exclude module unless code matches - andConditions.add(buildAnd([moduleCondition | codeCondition])); - } else { - // Include specified modules and optionally filter by code - final moduleCondition = - sql.localization.module.contains(moduleToExclude); - final codeCondition = LocalizationParams().code != null && - LocalizationParams().code!.isNotEmpty - ? sql.localization.code.isIn(LocalizationParams().code!.toList()) - : const Constant(false); - - // Combine conditions: module matches and optionally code filter - andConditions.add(buildAnd([moduleCondition | codeCondition])); + return retryLocalCallOperation(() async { + final selectQuery = sql.select(sql.localization).join([]); + + // List to hold the AND conditions + final andConditions = >[]; + + // Add condition for locale if provided + if (LocalizationParams().locale != null) { + final localeString = '${LocalizationParams().locale!}'; + andConditions.add(sql.localization.locale.equals(localeString)); + } + + // Add conditions for modules and codes + if (LocalizationParams().module != null && + LocalizationParams().module!.isNotEmpty) { + final moduleToExclude = LocalizationParams().module!; + + if (LocalizationParams().exclude == true) { + // Exclude modules but include records where the code matches + final moduleCondition = + sql.localization.module.contains(moduleToExclude).not(); + final codeCondition = LocalizationParams().code != null && + LocalizationParams().code!.isNotEmpty + ? sql.localization.code.isIn(LocalizationParams().code!.toList()) + : const Constant(false); // True if no code filter + + // Combine conditions: exclude module unless code matches + andConditions.add(buildAnd([moduleCondition | codeCondition])); + } else { + // Include specified modules and optionally filter by code + final moduleCondition = + sql.localization.module.contains(moduleToExclude); + final codeCondition = LocalizationParams().code != null && + LocalizationParams().code!.isNotEmpty + ? sql.localization.code.isIn(LocalizationParams().code!.toList()) + : const Constant(false); + + // Combine conditions: module matches and optionally code filter + andConditions.add(buildAnd([moduleCondition | codeCondition])); + } + } else if (LocalizationParams().code != null && + LocalizationParams().code!.isNotEmpty) { + // If no module filter, just apply code filter + andConditions.add( + sql.localization.code.isIn(LocalizationParams().code!.toList())); + } + + // Apply the combined conditions to the query + if (andConditions.isNotEmpty) { + selectQuery.where(buildAnd(andConditions)); } - } else if (LocalizationParams().code != null && - LocalizationParams().code!.isNotEmpty) { - // If no module filter, just apply code filter - andConditions - .add(sql.localization.code.isIn(LocalizationParams().code!.toList())); - } - - // Apply the combined conditions to the query - if (andConditions.isNotEmpty) { - selectQuery.where(buildAnd(andConditions)); - } - - final result = await selectQuery.get(); - - return result.map((row) { - final data = row.readTableOrNull(sql.localization); - - return Localization() - ..code = data!.code - ..locale = data.locale - ..module = data.module - ..message = data.message; - }).toList(); + + final result = await selectQuery.get(); + + return result.map((row) { + final data = row.readTableOrNull(sql.localization); + if (data == null) { + throw StateError('No data found for localization'); + } + + return Localization() + ..code = data.code + ..locale = data.locale + ..module = data.module + ..message = data.message; + }).toList(); + }); } FutureOr> fetchLocalization( {required LocalSqlDataStore sql, required String locale, required String module}) async { - final query = sql.select(sql.localization).join([]) - ..where( - buildOr([ - sql.localization.locale.equals(locale), - sql.localization.module.contains(module), - ]), - ); - - final results = await query.get(); - - return results.map((e) { - final data = e.readTableOrNull(sql.localization); - return Localization() - ..code = data!.code - ..locale = data.locale - ..module = data.module - ..message = data.message; - }).toList(); + return retryLocalCallOperation(() async { + final query = sql.select(sql.localization).join([]) + ..where( + buildOr([ + sql.localization.locale.equals(locale), + sql.localization.module.contains(module), + ]), + ); + + final results = await query.get(); + + return results.map((e) { + final data = e.readTableOrNull(sql.localization); + + if (data == null) { + throw StateError('No data found for localization'); + } + + return Localization() + ..code = data.code + ..locale = data.locale + ..module = data.module + ..message = data.message; + }).toList(); + }); } FutureOr create( List result, LocalSqlDataStore sql) async { - return sql.batch((batch) { - batch.insertAll(sql.localization, result); + if (result.isEmpty) return; + return retryLocalCallOperation(() async { + return sql.batch((batch) { + batch.insertAll(sql.localization, result); + }); }); } } diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart index e597bb00a..8b1378917 100644 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart +++ b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/remote_type.dart @@ -1,38 +1 @@ -import 'package:collection/collection.dart'; -import 'package:digit_data_model/data_model.dart'; -class RepositoryType { - static RemoteRepository getRemoteForType( - DataModelType type, - List remoteRepositories, - ) { - final repository = remoteRepositories.firstWhereOrNull( - (e) => e.type == type, - ); - - if (repository == null) { - throw Exception( - 'Remote repository is not configured in the network manager', - ); - } - - return repository; - } - - static LocalRepository getLocalForType( - DataModelType type, - List localRepositories, - ) { - final repository = localRepositories.firstWhereOrNull( - (e) => e.type == type, - ); - - if (repository == null) { - throw Exception( - 'Local repository is not configured in the network manager', - ); - } - - return repository; - } -} diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_down.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_down.dart deleted file mode 100644 index 09d4069a8..000000000 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_down.dart +++ /dev/null @@ -1,741 +0,0 @@ -import 'dart:async'; - -import 'package:attendance_management/attendance_management.dart'; -import 'package:collection/collection.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:inventory_management/models/entities/stock.dart'; -import 'package:inventory_management/models/entities/stock_reconciliation.dart'; -import 'package:referral_reconciliation/referral_reconciliation.dart'; -import 'package:registration_delivery/models/entities/household.dart'; -import 'package:registration_delivery/models/entities/household_member.dart'; -import 'package:registration_delivery/models/entities/project_beneficiary.dart'; -import 'package:registration_delivery/models/entities/referral.dart'; -import 'package:registration_delivery/models/entities/side_effect.dart'; -import 'package:registration_delivery/models/entities/task.dart'; - -import '../../../models/bandwidth/bandwidth_model.dart'; -import '../../../utils/environment_config.dart'; -import '../../network_manager.dart'; -import './remote_type.dart'; - -class PerformSyncDown { - static FutureOr syncDown({ - required BandwidthModel bandwidthModel, - required List localRepositories, - required List remoteRepositories, - required NetworkManagerConfiguration configuration, - }) async { - const taskResourceIdKey = 'taskResourceId'; - const individualIdentifierIdKey = 'individualIdentifierId'; - const householdAddressIdKey = 'householdAddressId'; - const individualAddressIdKey = 'individualAddressId'; - - if (configuration.persistenceConfig == - PersistenceConfiguration.onlineOnly) { - throw Exception('Sync down is not valid for online only configuration'); - } - - final futures = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), - ); - - final pendingSyncEntries = futures.expand((e) => e).toList(); - pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); - - final groupedEntries = pendingSyncEntries - .where((element) => element.type != DataModelType.service) - .toList() - .groupListsBy( - (element) => element.type, - ); - - for (final typeGroupedEntity in groupedEntries.entries) { - final groupedOperations = typeGroupedEntity.value.groupListsBy( - (element) => element.operation, - ); - - final remote = RepositoryType.getRemoteForType( - typeGroupedEntity.key, - remoteRepositories, - ); - - final local = RepositoryType.getLocalForType( - typeGroupedEntity.key, - localRepositories, - ); - - for (final operationGroupedEntity in groupedOperations.entries) { - final entities = operationGroupedEntity.value.map((e) { - final serverGeneratedId = e.serverGeneratedId; - final rowVersion = e.rowVersion; - if (serverGeneratedId != null && !e.nonRecoverableError) { - return local.opLogManager.applyServerGeneratedIdToEntity( - e.entity, - serverGeneratedId, - rowVersion, - ); - } - - return e.entity; - }).toList(); - - List responseEntities = []; - - switch (typeGroupedEntity.key) { - case DataModelType.individual: - responseEntities = await remote.search(IndividualSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as IndividualModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - final identifierAdditionalIds = responseEntity?.identifiers - ?.map((e) { - final id = e.id; - - if (id == null) return null; - - return AdditionalId( - idType: individualIdentifierIdKey, - id: id, - ); - }) - .whereNotNull() - .toList(); - - final addressAdditionalIds = responseEntity?.address - ?.map((e) { - final id = e.id; - - if (id == null) return null; - - return AdditionalId( - idType: individualAddressIdKey, - id: id, - ); - }) - .whereNotNull() - .toList(); - - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - nonRecoverableError: entity.nonRecoverableError, - additionalIds: [ - if (identifierAdditionalIds != null) - ...identifierAdditionalIds, - if (addressAdditionalIds != null) ...addressAdditionalIds, - ], - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.household: - responseEntities = await remote.search(HouseholdSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as HouseholdModel; - final responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - final addressAdditionalId = responseEntity?.address?.id == null - ? null - : AdditionalId( - idType: householdAddressIdKey, - id: responseEntity!.address!.id!, - ); - - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - additionalIds: [ - if (addressAdditionalId != null) addressAdditionalId, - ], - dataOperation: element.operation, - rowVersion: rowVersion, - nonRecoverableError: element.nonRecoverableError, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.householdMember: - responseEntities = await remote.search(HouseholdMemberSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as HouseholdMemberModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.sideEffect: - responseEntities = await remote.search(SideEffectSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in typeGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as SideEffectModel; - var responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - case DataModelType.referral: - responseEntities = await remote.search(ReferralSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in typeGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as ReferralModel; - var responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - case DataModelType.projectBeneficiary: - responseEntities = - await remote.search(ProjectBeneficiarySearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as ProjectBeneficiaryModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - case DataModelType.task: - responseEntities = await remote.search(TaskSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - isDeleted: true, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final taskModel = element.entity as TaskModel; - var responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => - e.clientReferenceId == taskModel.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: taskModel.clientReferenceId, - serverGeneratedId: serverGeneratedId, - additionalIds: responseEntity?.resources - ?.map((e) { - final id = e.id; - if (id == null) return null; - - return AdditionalId( - idType: taskResourceIdKey, - id: id, - ); - }) - .whereNotNull() - .toList(), - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(taskModel.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - taskModel.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.hFReferral: - responseEntities = await remote.search( - HFReferralSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - ), - ); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as HFReferralModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - nonRecoverableError: entity.nonRecoverableError, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.attendance: - responseEntities = await remote.search(AttendanceLogSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId!) - .whereNotNull() - .toList(), - tenantId: envConfig.variables.tenantId, - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as AttendanceLogModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId.toString(), - serverGeneratedId: serverGeneratedId, - nonRecoverableError: entity.nonRecoverableError, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = - await local.opLogManager.updateSyncDownRetry( - entity.clientReferenceId.toString(), - ); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.stock: - responseEntities = await remote.search( - StockSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - ), - limit: bandwidthModel.batchSize, - ); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as StockModel; - final responseEntity = - responseEntities.whereType().firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId!, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - case DataModelType.stockReconciliation: - responseEntities = - await remote.search(StockReconciliationSearchModel( - clientReferenceId: entities - .whereType() - .map((e) => e.clientReferenceId) - .whereNotNull() - .toList(), - )); - - for (var element in operationGroupedEntity.value) { - if (element.id == null) return; - final entity = element.entity as StockReconciliationModel; - final responseEntity = responseEntities - .whereType() - .firstWhereOrNull( - (e) => e.clientReferenceId == entity.clientReferenceId, - ); - - final serverGeneratedId = responseEntity?.id; - final rowVersion = responseEntity?.rowVersion; - - if (serverGeneratedId != null) { - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serverGeneratedId, - dataOperation: element.operation, - rowVersion: rowVersion, - ), - ); - } else { - final bool markAsNonRecoverable = await local.opLogManager - .updateSyncDownRetry(entity.clientReferenceId); - - if (markAsNonRecoverable) { - await local.update( - entity.copyWith( - nonRecoverableError: true, - ), - createOpLog: false, - ); - } - } - } - - break; - - // Note: Uncomment the following code block to enable complaints sync down - - // case DataModelType.complaints: - // if (remote is! PgrServiceRemoteRepository) continue; - // - // final futures = entities - // .whereType() - // .map((e) => e.serviceRequestId) - // .whereNotNull() - // .map( - // (e) { - // final future = remote.searchWithoutClientReferenceId( - // PgrServiceSearchModel( - // serviceRequestId: e, - // ), - // ); - // - // return Future.sync(() => future); - // }, - // ); - // - // final resolvedFutures = await Future.wait(futures); - // - // responseEntities = resolvedFutures - // .expand((element) => element) - // .whereType() - // // We only need serviceRequestId and application status - // .map((e) => PgrServiceModel( - // clientReferenceId: '', - // tenantId: e.tenantId ?? '', - // serviceCode: e.serviceCode ?? '', - // description: e.description ?? '', - // serviceRequestId: e.serviceRequestId, - // applicationStatus: e.applicationStatus ?? - // PgrServiceApplicationStatus.pendingAssignment, - // user: PgrComplainantModel( - // clientReferenceId: '', - // tenantId: '', - // complaintClientReferenceId: e.serviceRequestId ?? '', - // ), - // address: PgrAddressModel(), - // )) - // .toList(); - // - // for (var element in operationGroupedEntity.value) { - // if (element.id == null) return; - // final entity = element.entity as PgrServiceModel; - // final responseEntity = responseEntities - // .whereType() - // .firstWhereOrNull( - // (e) => e.clientReferenceId == entity.clientReferenceId, - // ); - // - // final serverGeneratedId = responseEntity?.serviceRequestId; - // final rowVersion = responseEntity?.rowVersion; - // - // if (serverGeneratedId != null) { - // await local.opLogManager.updateServerGeneratedIds( - // model: UpdateServerGeneratedIdModel( - // clientReferenceId: entity.clientReferenceId, - // serverGeneratedId: serverGeneratedId, - // dataOperation: element.operation, - // rowVersion: rowVersion, - // ), - // ); - // } - // } - // - // break; - - default: - continue; - } - - for (var element in responseEntities) { - await local.update(element, createOpLog: false); - } - } - } - } -} diff --git a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_up.dart b/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_up.dart deleted file mode 100644 index 2a730ad7c..000000000 --- a/apps/health_campaign_field_worker_app/lib/data/repositories/sync/sync_up.dart +++ /dev/null @@ -1,320 +0,0 @@ -import 'package:complaints/complaints.dart'; - -import 'dart:async'; - -import 'package:collection/collection.dart'; -import 'package:digit_components/utils/app_logger.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:registration_delivery/models/entities/household.dart'; -import 'package:registration_delivery/models/entities/task.dart'; - -import '../../../models/bandwidth/bandwidth_model.dart'; -import '../../../utils/environment_config.dart'; -import 'remote_type.dart'; - -class PerformSyncUp { - static FutureOr syncUp({ - required BandwidthModel bandwidthModel, - required List localRepositories, - required List remoteRepositories, - }) async { - const taskResourceIdKey = 'taskResourceId'; - const individualIdentifierIdKey = 'individualIdentifierId'; - const householdAddressIdKey = 'householdAddressId'; - const individualAddressIdKey = 'individualAddressId'; - - List getEntityModel( - List> opLogList, - LocalRepository local, - ) { - return opLogList - .map((e) { - final oplogEntryEntity = e.entity; - - final serverGeneratedId = e.serverGeneratedId; - final rowVersion = e.rowVersion; - if (serverGeneratedId != null) { - var updatedEntity = - local.opLogManager.applyServerGeneratedIdToEntity( - oplogEntryEntity, - serverGeneratedId, - rowVersion, - ); - - if (updatedEntity is HouseholdModel) { - final addressId = e.additionalIds.firstWhereOrNull( - (element) { - return element.idType == householdAddressIdKey; - }, - )?.id; - - updatedEntity = updatedEntity.copyWith( - address: updatedEntity.address?.copyWith( - id: updatedEntity.address?.id ?? addressId, - ), - ); - } - - if (updatedEntity is IndividualModel) { - final identifierId = e.additionalIds.firstWhereOrNull( - (element) { - return element.idType == individualIdentifierIdKey; - }, - )?.id; - - final addressId = e.additionalIds.firstWhereOrNull( - (element) { - return element.idType == individualAddressIdKey; - }, - )?.id; - - updatedEntity = updatedEntity.copyWith( - identifiers: updatedEntity.identifiers?.map((e) { - return e.copyWith( - id: e.id ?? identifierId, - ); - }).toList(), - address: updatedEntity.address?.map((e) { - return e.copyWith( - id: e.id ?? addressId, - ); - }).toList(), - ); - } - - if (updatedEntity is TaskModel) { - final resourceId = e.additionalIds - .firstWhereOrNull( - (element) => element.idType == taskResourceIdKey, - ) - ?.id; - - updatedEntity = updatedEntity.copyWith( - resources: updatedEntity.resources?.map((e) { - if (resourceId != null) { - return e.copyWith( - taskId: serverGeneratedId, - id: e.id ?? resourceId, - ); - } - - return e.copyWith(taskId: serverGeneratedId); - }).toList(), - ); - } - - return updatedEntity; - } - - return oplogEntryEntity; - }) - .whereNotNull() - .toList(); - } - - final futures = await Future.wait( - localRepositories - .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), - ); - - final pendingSyncEntries = futures.expand((e) => e).toList(); - pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); - final groupedEntries = pendingSyncEntries.groupListsBy( - (element) => element.type, - ); - -// Note : Sort the entries by DataModelType enum - final entries = groupedEntries.entries.toList(); - entries.sort((a, b) => DataModelType.values - .indexOf(a.key) - .compareTo(DataModelType.values.indexOf(b.key))); - - for (final typeGroupedEntity in entries) { - final groupedOperations = typeGroupedEntity.value.groupListsBy( - (element) => element.operation, - ); - - final remote = RepositoryType.getRemoteForType( - typeGroupedEntity.key, - remoteRepositories, - ); - - final local = RepositoryType.getLocalForType( - typeGroupedEntity.key, - localRepositories, - ); - - for (final operationGroupedEntity in groupedOperations.entries) { - // [returns list of oplogs whose nonRecoverableError is false and syncedup is false] - final opLogList = operationGroupedEntity.value - .where( - (element) => !element.nonRecoverableError && !element.syncedUp, - ) - .toList(); - // [returns list of oplogs whose nonRecoverableError is true] - final opLogErrorList = operationGroupedEntity.value - .where((element) => element.nonRecoverableError) - .toList(); - - // [returns list of oplogs whose nonRecoverableError is false and retry count is equal to configured value] - final nonRecoverableErrorList = operationGroupedEntity.value - .where((element) => - !element.nonRecoverableError && - element.syncDownRetryCount >= - envConfig.variables.syncDownRetryCount) - .toList(); - - final List>> listOfBatchedOpLogList = - opLogList.slices(bandwidthModel.batchSize).toList(); - - final List>> listOfBatchedOpLogErrorList = - opLogErrorList.slices(bandwidthModel.batchSize).toList(); - - final List>> - listOfBatchedNonRecoverableErrorList = - nonRecoverableErrorList.slices(bandwidthModel.batchSize).toList(); - - if (listOfBatchedNonRecoverableErrorList.isNotEmpty) { - for (final sublist in listOfBatchedNonRecoverableErrorList) { - final nonRecoverableErrorEntities = getEntityModel(sublist, local); - await remote.dumpError( - nonRecoverableErrorEntities, - operationGroupedEntity.key, - ); - for (final syncedEntity in sublist) { - if (syncedEntity.type == DataModelType.complaints) continue; - await local.markSyncedUp( - entry: syncedEntity, - nonRecoverableError: syncedEntity.nonRecoverableError, - clientReferenceId: syncedEntity.clientReferenceId, - id: syncedEntity.id, - ); - } - } - } - - if (listOfBatchedOpLogErrorList.isNotEmpty) { - for (final sublist in listOfBatchedOpLogErrorList) { - final errorEntities = getEntityModel(sublist, local); - await remote.dumpError( - errorEntities, - operationGroupedEntity.key, - ); - for (final syncedEntity in sublist) { - await local.markSyncedUp( - entry: syncedEntity, - nonRecoverableError: syncedEntity.nonRecoverableError, - clientReferenceId: syncedEntity.clientReferenceId, - id: syncedEntity.id, - ); - } - } - } - if (listOfBatchedOpLogList.isNotEmpty) { - for (final sublist in listOfBatchedOpLogList) { - final entities = getEntityModel(sublist, local); - if (operationGroupedEntity.key == DataOperation.create) { - switch (typeGroupedEntity.key) { - - case DataModelType.complaints: - for (final entity in entities) { - if (remote is PgrServiceRemoteRepository && - entity is PgrServiceModel) { - final response = await remote.create(entity); - final responseData = response.data; - if (responseData is! Map) { - AppLogger.instance.error( - title: 'NetworkManager : PgrServiceRemoteRepository', - message: responseData, - stackTrace: StackTrace.current, - ); - continue; - } - - PgrServiceCreateResponseModel - pgrServiceCreateResponseModel; - PgrComplaintResponseModel pgrComplaintModel; - try { - pgrServiceCreateResponseModel = - PgrServiceCreateResponseModelMapper.fromMap( - responseData, - ); - pgrComplaintModel = - pgrServiceCreateResponseModel.serviceWrappers.first; - } catch (e) { - rethrow; - } - - final service = pgrComplaintModel.service; - final serviceRequestId = service.serviceRequestId; - - if (serviceRequestId == null || - serviceRequestId.isEmpty) { - AppLogger.instance.error( - title: 'NetworkManager : PgrServiceRemoteRepository', - message: 'Service Request ID is null', - stackTrace: StackTrace.current, - ); - continue; - } - - await local.markSyncedUp( - entry: sublist.firstWhere((element) => - element.clientReferenceId == - entity.clientReferenceId), - clientReferenceId: entity.clientReferenceId, - nonRecoverableError: entity.nonRecoverableError, - ); - - await local.opLogManager.updateServerGeneratedIds( - model: UpdateServerGeneratedIdModel( - clientReferenceId: entity.clientReferenceId, - serverGeneratedId: serviceRequestId, - dataOperation: operationGroupedEntity.key, - rowVersion: entity.rowVersion, - ), - ); - - await local.update( - entity.copyWith( - serviceRequestId: serviceRequestId, - id: service.id, - applicationStatus: service.applicationStatus, - accountId: service.accountId, - ), - createOpLog: false, - ); - } - } - break; - - default: - await remote.bulkCreate(entities); - } - } else if (operationGroupedEntity.key == DataOperation.update) { - await Future.delayed(const Duration(seconds: 1)); - await remote.bulkUpdate(entities); - } else if (operationGroupedEntity.key == DataOperation.delete) { - await Future.delayed(const Duration(seconds: 1)); - await remote.bulkDelete(entities); - } - if (operationGroupedEntity.key == DataOperation.singleCreate) { - for (var element in entities) { - await remote.singleCreate(element); - } - } - for (final syncedEntity in sublist) { - if (syncedEntity.type == DataModelType.complaints) continue; - await local.markSyncedUp( - entry: syncedEntity, - id: syncedEntity.id, - nonRecoverableError: syncedEntity.nonRecoverableError, - clientReferenceId: syncedEntity.clientReferenceId, - ); - } - } - } - } - } - } -} diff --git a/apps/health_campaign_field_worker_app/lib/data/sync_registry.dart b/apps/health_campaign_field_worker_app/lib/data/sync_registry.dart new file mode 100644 index 000000000..331e08373 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/data/sync_registry.dart @@ -0,0 +1,140 @@ +import 'package:complaints/data/repositories/remote/pgr_service.dart'; +import 'package:complaints/models/pgr_complaints.dart'; +import 'package:complaints/models/pgr_complaints_response.dart'; +import 'package:digit_components/utils/app_logger.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:sync_service/data/repositories/sync/sync_up.dart'; + +class CustomSyncRegistry implements SyncUpOperation { + final RemoteRepository remote; + + CustomSyncRegistry(this.remote); + + @override + Future update(List entities, LocalRepository local) async { + try { + await remote.bulkUpdate(entities); + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future delete(List entities, LocalRepository local) async { + try { + await remote.bulkDelete(entities); + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future singleCreate(EntityModel entity, LocalRepository local) async { + try { + await remote.singleCreate(entity); + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future create( + {required List> entry, + required List entities, + required LocalRepository local, + required MapEntry>> + operationGroupedEntity, + required MapEntry>> + typeGroupedEntity}) async { + try { + switch (typeGroupedEntity.key) { + case DataModelType.complaints: + for (final entity in entities) { + if (remote is PgrServiceRemoteRepository && + entity is PgrServiceModel) { + final response = await remote.create(entity); + final responseData = response.data; + if (responseData is! Map) { + AppLogger.instance.error( + title: 'NetworkManager : PgrServiceRemoteRepository', + message: responseData, + stackTrace: StackTrace.current, + ); + continue; + } + + PgrServiceCreateResponseModel pgrServiceCreateResponseModel; + PgrComplaintResponseModel pgrComplaintModel; + try { + pgrServiceCreateResponseModel = + PgrServiceCreateResponseModelMapper.fromMap( + responseData, + ); + pgrComplaintModel = + pgrServiceCreateResponseModel.serviceWrappers.first; + } catch (e) { + rethrow; + } + + final service = pgrComplaintModel.service; + final serviceRequestId = service.serviceRequestId; + + if (serviceRequestId == null || serviceRequestId.isEmpty) { + AppLogger.instance.error( + title: 'NetworkManager : PgrServiceRemoteRepository', + message: 'Service Request ID is null', + stackTrace: StackTrace.current, + ); + continue; + } + + await local.markSyncedUp( + entry: entry.firstWhere((element) => + element.clientReferenceId == entity.clientReferenceId), + clientReferenceId: entity.clientReferenceId, + nonRecoverableError: entity.nonRecoverableError, + ); + + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serviceRequestId, + dataOperation: operationGroupedEntity.key, + rowVersion: entity.rowVersion, + ), + ); + + await local.update( + entity.copyWith( + serviceRequestId: serviceRequestId, + id: service.id, + applicationStatus: service.applicationStatus, + accountId: service.accountId, + ), + createOpLog: false, + ); + } + } + default: + await remote.bulkCreate(entities); + } + } catch (e) { + debugPrint('$e'); + } + } + + @override + Future localMarkSyncUp(List> entity, + LocalRepository local) async { + for (final syncedEntity in entity) { + if (syncedEntity.type == DataModelType.complaints) continue; + await local.markSyncedUp( + entry: syncedEntity, + id: syncedEntity.id, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + ); + } + } +} diff --git a/apps/health_campaign_field_worker_app/lib/data/sync_service_mapper.dart b/apps/health_campaign_field_worker_app/lib/data/sync_service_mapper.dart new file mode 100644 index 000000000..9389bf865 --- /dev/null +++ b/apps/health_campaign_field_worker_app/lib/data/sync_service_mapper.dart @@ -0,0 +1,862 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:attendance_management/attendance_management.dart'; +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:inventory_management/inventory_management.dart'; +import 'package:referral_reconciliation/referral_reconciliation.dart'; +import 'package:registration_delivery/registration_delivery.dart'; +import 'package:sync_service/data/repositories/sync/remote_type.dart'; +import 'package:sync_service/data/sync_entity_mapper_listener.dart'; + +import '../utils/environment_config.dart'; + +class SyncServiceMapper extends SyncEntityMapperListener { + @override + FutureOr writeToEntityDB( + Map response, + List> + localRepositories) async { + try { + for (int i = 0; i <= response.keys.length - 1; i++) { + if (response.keys.elementAt(i) != 'DownsyncCriteria') { + final local = RepositoryType.getLocalForType( + DataModels.getDataModelForEntityName(response.keys.elementAt(i)), + localRepositories, + ); + final List entityResponse = + response[response.keys.elementAt(i)] ?? []; + + final entityList = + entityResponse.whereType>().toList(); + + switch (response.keys.elementAt(i)) { + case "Individuals": + final entity = entityList + .map((e) => IndividualModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "Households": + final entity = entityList + .map((e) => HouseholdModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "HouseholdMembers": + final entity = entityList + .map( + (e) => HouseholdMemberModelMapper.fromJson( + jsonEncode(e), + ), + ) + .toList(); + await local.bulkCreate(entity); + case "ProjectBeneficiaries": + final entity = entityList + .map((e) => + ProjectBeneficiaryModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "Tasks": + final entity = entityList + .map((e) => TaskModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "SideEffects": + final entity = entityList + .map((e) => SideEffectModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + case "Referrals": + final entity = entityList + .map((e) => ReferralModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + default: + final entity = entityList + .map((e) => EntityModelMapper.fromJson(jsonEncode(e))) + .toList(); + await local.bulkCreate(entity); + } + } + } + } catch (e) { + rethrow; + } + } + + @override + int getSyncCount(List opLogs) { + int count = opLogs.where((element) { + if (element.syncedDown == false && element.syncedUp == true) { + 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.sideEffect: + case DataModelType.referral: + case DataModelType.hFReferral: + case DataModelType.attendance: + return true; + default: + return false; + } + } else { + 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: + case DataModelType.hFReferral: + case DataModelType.attendance: + case DataModelType.userLocation: + return true; + default: + return false; + } + } + }).length; + + return count; + } + + @override + Future> syncDownEntityResponse( + MapEntry>> typeGroupedEntity, + MapEntry>> + operationGroupedEntity, + List entities, + RemoteRepository remote, + LocalRepository local) async { + List responseEntities = []; + const taskResourceIdKey = 'taskResourceId'; + const individualIdentifierIdKey = 'individualIdentifierId'; + const householdAddressIdKey = 'householdAddressId'; + const individualAddressIdKey = 'individualAddressId'; + + switch (typeGroupedEntity.key) { + case DataModelType.individual: + responseEntities = await remote.search(IndividualSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as IndividualModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + final identifierAdditionalIds = responseEntity?.identifiers + ?.map((e) { + final id = e.id; + + if (id == null) return null; + + return AdditionalId( + idType: individualIdentifierIdKey, + id: id, + ); + }) + .whereNotNull() + .toList(); + + final addressAdditionalIds = responseEntity?.address + ?.map((e) { + final id = e.id; + + if (id == null) return null; + + return AdditionalId( + idType: individualAddressIdKey, + id: id, + ); + }) + .whereNotNull() + .toList(); + + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + nonRecoverableError: entity.nonRecoverableError, + additionalIds: [ + if (identifierAdditionalIds != null) + ...identifierAdditionalIds, + if (addressAdditionalIds != null) ...addressAdditionalIds, + ], + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.household: + responseEntities = await remote.search(HouseholdSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as HouseholdModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + final addressAdditionalId = responseEntity?.address?.id == null + ? null + : AdditionalId( + idType: householdAddressIdKey, + id: responseEntity!.address!.id!, + ); + + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + additionalIds: [ + if (addressAdditionalId != null) addressAdditionalId, + ], + dataOperation: element.operation, + rowVersion: rowVersion, + nonRecoverableError: element.nonRecoverableError, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.householdMember: + responseEntities = await remote.search(HouseholdMemberSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as HouseholdMemberModel; + final responseEntity = responseEntities + .whereType() + .firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.sideEffect: + responseEntities = await remote.search(SideEffectSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in typeGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as SideEffectModel; + var responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + case DataModelType.referral: + responseEntities = await remote.search(ReferralSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in typeGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as ReferralModel; + var responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + case DataModelType.projectBeneficiary: + responseEntities = await remote.search(ProjectBeneficiarySearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as ProjectBeneficiaryModel; + final responseEntity = responseEntities + .whereType() + .firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + case DataModelType.task: + responseEntities = await remote.search(TaskSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + isDeleted: true, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final taskModel = element.entity as TaskModel; + var responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == taskModel.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: taskModel.clientReferenceId, + serverGeneratedId: serverGeneratedId, + additionalIds: responseEntity?.resources + ?.map((e) { + final id = e.id; + if (id == null) return null; + + return AdditionalId( + idType: taskResourceIdKey, + id: id, + ); + }) + .whereNotNull() + .toList(), + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(taskModel.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + taskModel.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + case DataModelType.hFReferral: + responseEntities = await remote.search( + HFReferralSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + ), + ); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as HFReferralModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + nonRecoverableError: entity.nonRecoverableError, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.attendance: + responseEntities = await remote.search(AttendanceLogSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId!) + .whereNotNull() + .toList(), + tenantId: envConfig.variables.tenantId, + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as AttendanceLogModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId.toString(), + serverGeneratedId: serverGeneratedId, + nonRecoverableError: entity.nonRecoverableError, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = + await local.opLogManager.updateSyncDownRetry( + entity.clientReferenceId.toString(), + ); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.stock: + responseEntities = await remote.search( + StockSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + ), + ); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as StockModel; + final responseEntity = + responseEntities.whereType().firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId!, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + case DataModelType.stockReconciliation: + responseEntities = await remote.search(StockReconciliationSearchModel( + clientReferenceId: entities + .whereType() + .map((e) => e.clientReferenceId) + .whereNotNull() + .toList(), + )); + + for (var element in operationGroupedEntity.value) { + if (element.id == null) continue; + final entity = element.entity as StockReconciliationModel; + final responseEntity = responseEntities + .whereType() + .firstWhereOrNull( + (e) => e.clientReferenceId == entity.clientReferenceId, + ); + + final serverGeneratedId = responseEntity?.id; + final rowVersion = responseEntity?.rowVersion; + + if (serverGeneratedId != null) { + await local.opLogManager.updateServerGeneratedIds( + model: UpdateServerGeneratedIdModel( + clientReferenceId: entity.clientReferenceId, + serverGeneratedId: serverGeneratedId, + dataOperation: element.operation, + rowVersion: rowVersion, + ), + ); + } else { + final bool markAsNonRecoverable = await local.opLogManager + .updateSyncDownRetry(entity.clientReferenceId); + + if (markAsNonRecoverable) { + await local.update( + entity.copyWith( + nonRecoverableError: true, + ), + createOpLog: false, + ); + } + } + } + + break; + + // case DataModelType.complaints: + // if (remote is! PgrServiceRemoteRepository) return responseEntities; + // + // final futures = entities + // .whereType() + // .map((e) => e.serviceRequestId) + // .whereNotNull() + // .map( + // (e) { + // final future = remote.searchWithoutClientReferenceId( + // PgrServiceSearchModel( + // serviceRequestId: e, + // ), + // ); + // + // return Future.sync(() => future); + // }, + // ); + // + // final resolvedFutures = await Future.wait(futures); + // + // responseEntities = resolvedFutures + // .expand((element) => element) + // .whereType() + // // We only need serviceRequestId and application status + // .map((e) => PgrServiceModel( + // clientReferenceId: '', + // tenantId: e.tenantId ?? '', + // serviceCode: e.serviceCode ?? '', + // description: e.description ?? '', + // serviceRequestId: e.serviceRequestId, + // applicationStatus: e.applicationStatus ?? + // PgrServiceApplicationStatus.pendingAssignment, + // user: PgrComplainantModel( + // clientReferenceId: '', + // tenantId: '', + // complaintClientReferenceId: e.serviceRequestId ?? '', + // ), + // address: PgrAddressModel(), + // )) + // .toList(); + // + // for (var element in operationGroupedEntity.value) { + // if (element.id == null) continue; + // final entity = element.entity as PgrServiceModel; + // final responseEntity = + // responseEntities.whereType().firstWhereOrNull( + // (e) => e.clientReferenceId == entity.clientReferenceId, + // ); + // + // final serverGeneratedId = responseEntity?.serviceRequestId; + // final rowVersion = responseEntity?.rowVersion; + // + // if (serverGeneratedId != null) { + // await local.opLogManager.updateServerGeneratedIds( + // model: UpdateServerGeneratedIdModel( + // clientReferenceId: entity.clientReferenceId, + // serverGeneratedId: serverGeneratedId, + // dataOperation: element.operation, + // rowVersion: rowVersion, + // ), + // ); + // } + // } + // break; + + default: + break; + } + + return responseEntities; + } + + @override + EntityModel updatedEntity(EntityModel entity, OpLogEntry e, + String? serverGeneratedId) { + var updatedEntity = entity; + + const taskResourceIdKey = 'taskResourceId'; + const individualIdentifierIdKey = 'individualIdentifierId'; + const householdAddressIdKey = 'householdAddressId'; + const individualAddressIdKey = 'individualAddressId'; + + if (updatedEntity is HouseholdModel) { + final addressId = e.additionalIds.firstWhereOrNull( + (element) { + return element.idType == householdAddressIdKey; + }, + )?.id; + + updatedEntity = updatedEntity.copyWith( + address: updatedEntity.address?.copyWith( + id: updatedEntity.address?.id ?? addressId, + ), + ); + } + + if (updatedEntity is IndividualModel) { + final identifierId = e.additionalIds.firstWhereOrNull( + (element) { + return element.idType == individualIdentifierIdKey; + }, + )?.id; + + final addressId = e.additionalIds.firstWhereOrNull( + (element) { + return element.idType == individualAddressIdKey; + }, + )?.id; + + updatedEntity = updatedEntity.copyWith( + identifiers: updatedEntity.identifiers?.map((e) { + return e.copyWith( + id: e.id ?? identifierId, + ); + }).toList(), + address: updatedEntity.address?.map((e) { + return e.copyWith( + id: e.id ?? addressId, + ); + }).toList(), + ); + } + + if (updatedEntity is TaskModel) { + final resourceId = e.additionalIds + .firstWhereOrNull( + (element) => element.idType == taskResourceIdKey, + ) + ?.id; + + updatedEntity = updatedEntity.copyWith( + resources: updatedEntity.resources?.map((e) { + if (resourceId != null) { + return e.copyWith( + taskId: serverGeneratedId, + id: e.id ?? resourceId, + ); + } + + return e.copyWith(taskId: serverGeneratedId); + }).toList(), + ); + } + + return updatedEntity; + } +} diff --git a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.dart b/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.dart deleted file mode 100644 index 7a1b455dd..000000000 --- a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:freezed_annotation/freezed_annotation.dart'; - -part 'bandwidth_model.freezed.dart'; -part 'bandwidth_model.g.dart'; - -@freezed -class BandwidthModel with _$BandwidthModel { - const factory BandwidthModel({ - required String userId, - required int batchSize, - }) = _BandwidthModel; - - factory BandwidthModel.fromJson(Map json) => - _$BandwidthModelFromJson(json); -} diff --git a/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart index 3a667fb18..41a7184be 100644 --- a/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/downsync/downsync.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'downsync.dart'; @@ -130,10 +130,8 @@ mixin DownsyncSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DownsyncSearchModelMapper.ensureInitialized() - .isValueEqual(this as DownsyncSearchModel, other)); + return DownsyncSearchModelMapper.ensureInitialized() + .equalsValue(this as DownsyncSearchModel, other); } @override @@ -357,10 +355,8 @@ mixin DownsyncModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DownsyncModelMapper.ensureInitialized() - .isValueEqual(this as DownsyncModel, other)); + return DownsyncModelMapper.ensureInitialized() + .equalsValue(this as DownsyncModel, other); } @override @@ -569,10 +565,8 @@ mixin DownsyncAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DownsyncAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as DownsyncAdditionalFields, other)); + return DownsyncAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as DownsyncAdditionalFields, other); } @override diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart index 9d30d89b3..52eac602f 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/additional_fields_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'additional_fields_type.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart index 870f84eeb..43fa7b7f3 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_master_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'mdms_master_enums.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart index e71180b05..8910d16b3 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/mdms_module_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'mdms_module_enums.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart index c08d84d1d..504594772 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/roles.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'roles.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart index cdb2482b8..3ec8e82bd 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/roles_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'roles_type.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart index 32b70ae86..5b44d4208 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/scanner_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'scanner_type.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/status.dart b/apps/health_campaign_field_worker_app/lib/models/entities/status.dart index e7996833c..878c3fe09 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/status.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/status.dart @@ -2,17 +2,28 @@ import 'package:dart_mappable/dart_mappable.dart'; part 'status.mapper.dart'; + @MappableEnum(caseStyle: CaseStyle.upperCase) enum Status { - @MappableValue("DELIVERED") delivered, - @MappableValue("NOT_DELIVERED") notDelivered, - @MappableValue("VISITED") visited, - @MappableValue("NOT_VISITED") notVisited, - @MappableValue("BENEFICIARY_REFUSED") beneficiaryRefused, - @MappableValue("BENEFICIARY_REFERRED") beneficiaryReferred, - @MappableValue("ADMINISTERED_SUCCESS") administeredSuccess, - @MappableValue("ADMINISTERED_FAILED") administeredFailed, - @MappableValue("IN_COMPLETE") inComplete, - @MappableValue("TO_ADMINISTER") toAdminister, + @MappableValue("DELIVERED") + delivered, + @MappableValue("NOT_DELIVERED") + notDelivered, + @MappableValue("VISITED") + visited, + @MappableValue("NOT_VISITED") + notVisited, + @MappableValue("BENEFICIARY_REFUSED") + beneficiaryRefused, + @MappableValue("BENEFICIARY_REFERRED") + beneficiaryReferred, + @MappableValue("ADMINISTERED_SUCCESS") + administeredSuccess, + @MappableValue("ADMINISTERED_FAILED") + administeredFailed, + @MappableValue("IN_COMPLETE") + inComplete, + @MappableValue("TO_ADMINISTER") + toAdminister, ; -} \ No newline at end of file +} diff --git a/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart b/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart index dffb822cc..2581632e6 100644 --- a/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart +++ b/apps/health_campaign_field_worker_app/lib/models/entities/status.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'status.dart'; 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 e31240d2e..c7f98a48f 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/authenticated.dart @@ -10,10 +10,10 @@ import 'package:isar/isar.dart'; import 'package:location/location.dart'; import 'package:registration_delivery/registration_delivery.dart'; import 'package:survey_form/survey_form.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../blocs/localization/app_localization.dart'; import '../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; -import '../blocs/sync/sync.dart'; import '../data/remote_client.dart'; import '../data/repositories/remote/bandwidth_check.dart'; import '../models/downsync/downsync.dart'; @@ -44,7 +44,7 @@ class AuthenticatedPageWrapper extends StatelessWidget { return Portal( child: Scaffold( - backgroundColor: DigitTheme.instance.colorScheme.background, + backgroundColor: DigitTheme.instance.colorScheme.surface, appBar: AppBar( backgroundColor: DigitTheme.instance.colorScheme.primary, actions: showDrawer @@ -109,6 +109,7 @@ class AuthenticatedPageWrapper extends StatelessWidget { drawer: showDrawer ? const Drawer(child: SideBar()) : null, body: MultiBlocProvider( providers: [ + // INFO : Need to add bloc of package Here BlocProvider( create: (context) { final userId = context.loggedInUserUuid; @@ -116,7 +117,7 @@ class AuthenticatedPageWrapper extends StatelessWidget { final isar = context.read(); final bloc = SyncBloc( isar: isar, - networkManager: context.read(), + syncService: SyncService(), ); if (!bloc.isClosed) { @@ -135,7 +136,9 @@ class AuthenticatedPageWrapper extends StatelessWidget { bloc.add( SyncRefreshEvent( userId, - getSyncCount(event), + SyncServiceSingleton() + .entityMapper! + .getSyncCount(event), ), ); } @@ -154,7 +157,9 @@ class AuthenticatedPageWrapper extends StatelessWidget { bloc.add( SyncRefreshEvent( userId, - getSyncCount(event), + SyncServiceSingleton() + .entityMapper! + .getSyncCount(event), ), ); } @@ -184,7 +189,6 @@ class AuthenticatedPageWrapper extends StatelessWidget { downSyncLocalRepository: ctx.read< LocalRepository>(), - networkManager: ctx.read(), householdLocalRepository: ctx.read< LocalRepository>(), 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 7aeaeea72..622a47208 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 @@ -10,11 +10,13 @@ import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; +import 'package:sync_service/blocs/sync/sync.dart'; import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/localization/localization.dart'; import '../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; -import '../blocs/sync/sync.dart'; +import '../data/local_store/app_shared_preferences.dart'; +import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/app_shared_preferences.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../models/entities/roles_type.dart'; @@ -41,19 +43,21 @@ class _BoundarySelectionPageState int i = 0; int pendingSyncCount = 0; final clickedStatus = ValueNotifier(false); - var expenseTypeCtrl = TextEditingController(); StreamController downloadProgress = StreamController(); Map dropdownControllers = {}; + late StreamSubscription syncSubscription; @override void initState() { + context.syncRefresh(); LocalizationParams().setModule('common', false); context.read().add(SyncRefreshEvent(context.loggedInUserUuid)); context.read().add( const DownSyncResetStateEvent(), ); super.initState(); + listenToSyncCount(); } @override @@ -67,6 +71,7 @@ class _BoundarySelectionPageState @override void dispose() { clickedStatus.dispose(); + syncSubscription.cancel(); super.dispose(); } @@ -531,41 +536,31 @@ class _BoundarySelectionPageState padding: const EdgeInsets.fromLTRB( kPadding, 0, kPadding, 0), child: SafeArea( - child: BlocListener( - listener: (context, syncState) { - setState(() { - pendingSyncCount = syncState.maybeWhen( - orElse: () => 0, - pendingSync: (count) => count, - ); - }); - }, - child: ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return DigitElevatedButton( - onPressed: selectedBoundary == null || - isClicked - ? null - : () async { - if (!form.valid || - validateAllBoundarySelection()) { - clickedStatus.value = false; - await DigitToast.show( - context, - options: - DigitToastOptions( - localizations.translate(i18 - .common - .corecommonRequired), - true, - Theme.of(context), - ), - ); - } else { - setState(() { - shouldPop = true; - }); + child: ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitElevatedButton( + onPressed: selectedBoundary == null || + isClicked + ? null + : () async { + if (!form.valid || + validateAllBoundarySelection()) { + clickedStatus.value = false; + await DigitToast.show( + context, + options: DigitToastOptions( + localizations.translate(i18 + .common + .corecommonRequired), + true, + Theme.of(context), + ), + ); + } else { + setState(() { + shouldPop = true; + }); context .read() @@ -638,7 +633,6 @@ class _BoundarySelectionPageState ), ), ), - ), ], ), ), @@ -705,4 +699,16 @@ class _BoundarySelectionPageState // Return false if none of the form controls have a null value return false; } + + void listenToSyncCount() async { + syncSubscription = context.syncCount().listen((state) { + state.maybeWhen( + orElse: () {}, + pendingSync: (count) { + setState(() { + pendingSyncCount = count; + }); + }); + }); + } } 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 51477d104..31e26b3a0 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/home.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/home.dart @@ -2,11 +2,10 @@ import 'dart:async'; import 'package:attendance_management/attendance_management.dart'; import 'package:attendance_management/router/attendance_router.gm.dart'; -import 'package:survey_form/survey_form.dart'; -import 'package:complaints/complaints.dart'; -import 'package:complaints/router/complaints_router.gm.dart'; import 'package:closed_household/closed_household.dart'; import 'package:closed_household/router/closed_household_router.gm.dart'; +import 'package:complaints/complaints.dart'; +import 'package:complaints/router/complaints_router.gm.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:digit_components/digit_components.dart'; import 'package:digit_components/widgets/atoms/digit_toaster.dart'; @@ -31,11 +30,12 @@ import 'package:referral_reconciliation/router/referral_reconciliation_router.gm import 'package:registration_delivery/registration_delivery.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; import 'package:survey_form/router/survey_form_router.gm.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:sync_service/blocs/sync/sync.dart'; import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/auth/auth.dart'; import '../blocs/localization/localization.dart'; -import '../blocs/sync/sync.dart'; import '../data/local_store/app_shared_preferences.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/no_sql/schema/service_registry.dart'; @@ -66,7 +66,7 @@ class HomePage extends LocalizedStatefulWidget { class _HomePageState extends LocalizedState { bool skipProgressBar = false; final storage = const FlutterSecureStorage(); - late StreamSubscription subscription; + late StreamSubscription> subscription; @override initState() { @@ -74,14 +74,10 @@ class _HomePageState extends LocalizedState { subscription = Connectivity() .onConnectivityChanged - .listen((ConnectivityResult resSyncBlocult) async { - var connectivityResult = await (Connectivity().checkConnectivity()); - - if (connectivityResult != ConnectivityResult.none) { + .listen((List result) async { + if (result.firstOrNull == ConnectivityResult.none) { if (context.mounted) { - context - .read() - .add(SyncRefreshEvent(context.loggedInUserUuid)); + context.syncRefresh(); } } }); @@ -122,172 +118,166 @@ class _HomePageState extends LocalizedState { ]; return Scaffold( - backgroundColor: DigitTheme.instance.colorScheme.background, - 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, - ), + backgroundColor: DigitTheme.instance.colorScheme.surface, + body: SizedBox( + height: MediaQuery.of(context).size.height, + child: ScrollableContent( + slivers: [ + SliverGrid( + delegate: SliverChildBuilderDelegate( + (context, index) { + return homeItems.elementAt(index); + }, + childCount: homeItems.length, ), - ], - header: Column( - children: [ - BackNavigationHelpHeaderWidget( - showBackNavigation: false, - showHelp: false, - showcaseButton: ShowcaseButton( - showcaseFor: showcaseKeys.toSet().toList(), - ), + gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( + maxCrossAxisExtent: 145, + childAspectRatio: 104 / 128, + ), + ), + ], + header: Column( + children: [ + 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, - ), + ), + skipProgressBar + ? const SizedBox.shrink() + : homeShowcaseData.distributorProgressBar.buildWith( + child: BeneficiaryProgressBar( + label: localizations.translate( + i18.home.progressIndicatorTitle, + ), + prefixLabel: localizations.translate( + i18.home.progressIndicatorPrefixLabel, ), ), - ], - ), - 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, - ); + ), + ], + ), + footer: PoweredByDigit( + version: Constants().version, + ), + children: [ + const SizedBox(height: kPadding * 2), + // INFO : Need to add sync bloc of package Here + BlocConsumer( + listener: (context, state) { + state.maybeWhen( + orElse: () => null, + 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); } - }, - completedSync: () async { - Navigator.of(context, rootNavigator: true).pop(); - await localSecureStore.setManualSyncTrigger(false); - if (context.mounted) { - DigitSyncDialog.show( - context, - type: DigitSyncDialogType.complete, + }); + }, + 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, + label: localizations.translate( + i18.syncDialog.dataSyncedTitle, + ), + primaryAction: DigitDialogActions( label: localizations.translate( - i18.syncDialog.dataSyncedTitle, + i18.syncDialog.closeButtonLabel, ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.syncDialog.closeButtonLabel, + action: (ctx) { + Navigator.pop(ctx); + }, + ), + ); + } + }, + failedSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { + _showSyncFailedDialog( + context, + message: localizations.translate( + i18.syncDialog.syncFailedTitle, + ), + ); + } + }, + failedDownSync: () async { + await localSecureStore.setManualSyncTrigger(true); + if (context.mounted) { + _showSyncFailedDialog( + context, + message: localizations.translate( + i18.syncDialog.downSyncFailedTitle, + ), + ); + } + }, + 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) { + 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, ), - action: (ctx) { - Navigator.pop(ctx); - }, - ), - ); - } - }, - failedSync: () async { - await localSecureStore.setManualSyncTrigger(true); - if (context.mounted) { - _showSyncFailedDialog( - context, - message: localizations.translate( - i18.syncDialog.syncFailedTitle, - ), - ); - } - }, - failedDownSync: () async { - await localSecureStore.setManualSyncTrigger(true); - if (context.mounted) { - _showSyncFailedDialog( - context, - message: localizations.translate( - i18.syncDialog.downSyncFailedTitle, - ), - ); - } - }, - 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) { - 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, - ), - ); - }, - ); - }, - ), - ], - ), + ); + }, + ); + }, + ), + ], ), ), ); @@ -511,7 +501,8 @@ class _HomePageState extends LocalizedState { homeShowcaseData.warehouseManagerManageStock.showcaseKey, i18.home.stockReconciliationLabel: homeShowcaseData.wareHouseManagerStockReconciliation.showcaseKey, - i18.home.mySurveyForm: homeShowcaseData.supervisorMySurveyForm.showcaseKey, + i18.home.mySurveyForm: + homeShowcaseData.supervisorMySurveyForm.showcaseKey, i18.home.fileComplaint: homeShowcaseData.distributorFileComplaint.showcaseKey, i18.home.syncDataLabel: homeShowcaseData.distributorSyncData.showcaseKey, @@ -556,6 +547,10 @@ class _HomePageState extends LocalizedState { .map((label) => homeItemsShowcaseMap[label]!) .toList(); + if (!context.selectedProject.name.contains('IRS')) { + filteredLabels.remove(i18.home.dashboard); + } + final List widgetList = filteredLabels.map((label) => homeItemsMap[label]!).toList(); @@ -576,7 +571,6 @@ class _HomePageState extends LocalizedState { // INFO : Need to add local repo of package Here context.read< LocalRepository>(), - context.read< LocalRepository>(), context.read< @@ -725,14 +719,18 @@ void setPackagesSingleton(BuildContext context) { loggedInIndividualId: context.loggedInIndividualId ?? '', loggedInUserUuid: context.loggedInUserUuid, appVersion: Constants().version, - isHealthFacilityWorker: context.loggedInUserRoles.where((role) => role.code == RolesType.healthFacilityWorker.toValue()).toList().isNotEmpty, + isHealthFacilityWorker: context.loggedInUserRoles + .where((role) => + role.code == RolesType.healthFacilityWorker.toValue()) + .toList() + .isNotEmpty, roles: context.read().state.maybeMap( - orElse: () => const Offstage(), - authenticated: (res) { - return res.userModel.roles - .map((e) => e.code.snakeCase.toUpperCase()) - .toList(); - }), + orElse: () => const Offstage(), + authenticated: (res) { + return res.userModel.roles + .map((e) => e.code.snakeCase.toUpperCase()) + .toList(); + }), ); ReferralReconSingleton().setInitialData( diff --git a/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart b/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart index d14118731..9ec5f06df 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/language_selection.dart @@ -12,6 +12,7 @@ import '../data/local_store/app_shared_preferences.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../router/app_router.dart'; import '../utils/constants.dart'; +import '../utils/environment_config.dart'; import '../utils/i18_key_constants.dart' as i18; import '../utils/utils.dart'; @@ -154,10 +155,14 @@ class _LanguageSelectionPageState extends State { setState(() {}); context.read().add( LocalizationEvent.onLoadLocalization( - module: localizationModulesList - .map((e) => e.name.toString()) - .join(',') - .toString(), + module: 'hcm-boundary-${envConfig.variables.hierarchyType.toLowerCase()},${localizationModulesList + .map((e) + => + e.name.toString() + ) + .join(',') + .toString() + }', tenantId: tenantId, locale: locale, path: Constants.localizationApiPath, diff --git a/apps/health_campaign_field_worker_app/lib/pages/profile.dart b/apps/health_campaign_field_worker_app/lib/pages/profile.dart index b42a78708..b739a8a1f 100644 --- a/apps/health_campaign_field_worker_app/lib/pages/profile.dart +++ b/apps/health_campaign_field_worker_app/lib/pages/profile.dart @@ -59,7 +59,9 @@ class _ProfilePageState extends LocalizedState { _mobileNumberKey: FormControl( value: user?.mobileNumber, validators: [ - CustomValidator.validMobileNumber, + Validators.pattern(Constants.mobileNumberRegExp, + validationMessage: + localizations.translate(i18.common.coreCommonMobileNumber)) ], ), _emailId: FormControl( @@ -147,9 +149,9 @@ class _ProfilePageState extends LocalizedState { onPressed: () async { final connectivityResult = await (Connectivity().checkConnectivity()); - final isOnline = connectivityResult == + final isOnline = connectivityResult.firstOrNull == ConnectivityResult.wifi || - connectivityResult == + connectivityResult.firstOrNull == ConnectivityResult.mobile; if (!isOnline) { @@ -283,7 +285,7 @@ class _ProfilePageState extends LocalizedState { .translate(e.code)), formControlName: _genderKey, )) - .toList(), + , ], ); }, 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 4ea93bd81..02dd968be 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 @@ -10,7 +10,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import '../../../blocs/app_initialization/app_initialization.dart'; import '../../../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; -import '../../../blocs/sync/sync.dart'; import '../../../models/downsync/downsync.dart'; import '../../../router/app_router.dart'; import '../../../utils/i18_key_constants.dart' as i18; @@ -34,17 +33,17 @@ class BeneficiariesReportState extends LocalizedState { int pendingSyncCount = 0; BoundaryModel? selectedBoundary; StreamController downloadProgress = StreamController(); + late StreamSubscription? syncSubscription; @override void initState() { - final syncBloc = context.read(); - syncBloc.add(SyncRefreshEvent(context.loggedInUserUuid)); - + context.syncRefresh(); final bloc = context.read(); bloc.add( const BeneficiaryDownSyncEvent.downSyncReport(), ); super.initState(); + listenToSyncCount(); } @override @@ -55,6 +54,12 @@ class BeneficiariesReportState extends LocalizedState { super.deactivate(); } + @override + void dispose() { + syncSubscription?.cancel(); + super.dispose(); + } + @override Widget build(BuildContext context) { final theme = Theme.of(context); @@ -86,346 +91,333 @@ class BeneficiariesReportState extends LocalizedState { ), header: const BackNavigationHelpHeaderWidget(), children: [ - BlocListener( - listener: (ctx, syncState) { - setState(() { - pendingSyncCount = syncState.maybeWhen( - orElse: () => 0, - pendingSync: (count) => count, - ); - }); - }, - child: BlocListener( - listener: (ctx, state) { - state.maybeWhen( - orElse: () => false, - loading: (isPop) => { - if (isPop) - { - Navigator.of(context, rootNavigator: true) - .popUntil((route) => route is! PopupRoute), - }, - DigitSyncDialog.show( - context, - type: DigitSyncDialogType.inProgress, - label: 'Loading', - barrierDismissible: false, - ), - }, - getBatchSize: ( - batchSize, - projectId, - boundaryCode, - pendingSync, - boundaryName, - ) => - context.read().add( - DownSyncCheckTotalCountEvent( - projectId: context.projectId, - boundaryCode: boundaryCode, - pendingSyncCount: pendingSyncCount, - boundaryName: boundaryName, - batchSize: batchSize, - ), - ), - report: (downSyncCriteriaList) { - setState(() { - downSyncList = downSyncCriteriaList; - }); - }, - pendingSync: () => showDownloadDialog( + BlocListener( + listener: (ctx, state) { + state.maybeWhen( + orElse: () => false, + loading: (isPop) => { + if (isPop) + { + Navigator.of(context, rootNavigator: true) + .popUntil((route) => route is! PopupRoute), + }, + DigitSyncDialog.show( context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.syncDialog.pendingSyncLabel, - ), - projectId: context.projectId, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - batchSize: 5, - totalCount: 0, - content: localizations.translate( - i18.syncDialog.pendingSyncContent, - ), - primaryButtonLabel: localizations.translate( - i18.acknowledgementSuccess.goToHome, - ), - boundaryName: selectedBoundary!.name.toString(), + type: DigitSyncDialogType.inProgress, + label: 'Loading', + barrierDismissible: false, + ), + }, + getBatchSize: ( + batchSize, + projectId, + boundaryCode, + pendingSync, + boundaryName, + ) => + context.read().add( + DownSyncCheckTotalCountEvent( + projectId: context.projectId, + boundaryCode: boundaryCode, + pendingSyncCount: pendingSyncCount, + boundaryName: boundaryName, + batchSize: batchSize, + ), + ), + report: (downSyncCriteriaList) { + setState(() { + downSyncList = downSyncCriteriaList; + }); + }, + pendingSync: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.syncDialog.pendingSyncLabel, ), - dialogType: DigitProgressDialogType.pendingSync, - isPop: true, + projectId: context.projectId, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + batchSize: 5, + totalCount: 0, + content: localizations.translate( + i18.syncDialog.pendingSyncContent, + ), + primaryButtonLabel: localizations.translate( + i18.acknowledgementSuccess.goToHome, + ), + boundaryName: selectedBoundary!.name.toString(), ), - dataFound: (initialServerCount, batchSize) => - showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - initialServerCount > 0 - ? i18.beneficiaryDetails.dataFound - : i18.beneficiaryDetails.noDataFound, - ), - projectId: context.projectId, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - batchSize: 5, - totalCount: initialServerCount, - content: localizations.translate( - initialServerCount > 0 - ? i18.beneficiaryDetails.dataFoundContent - : i18.beneficiaryDetails.noDataFoundContent, - ), - primaryButtonLabel: localizations.translate( - initialServerCount > 0 - ? i18.common.coreCommonDownload - : i18.common.coreCommonGoback, - ), - secondaryButtonLabel: localizations.translate( - initialServerCount > 0 - ? i18.beneficiaryDetails - .proceedWithoutDownloading - : i18.acknowledgementSuccess.goToHome, - ), - boundaryName: selectedBoundary!.name.toString(), + dialogType: DigitProgressDialogType.pendingSync, + isPop: true, + ), + dataFound: (initialServerCount, batchSize) => + showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + initialServerCount > 0 + ? i18.beneficiaryDetails.dataFound + : i18.beneficiaryDetails.noDataFound, + ), + projectId: context.projectId, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + batchSize: 5, + totalCount: initialServerCount, + content: localizations.translate( + initialServerCount > 0 + ? i18.beneficiaryDetails.dataFoundContent + : i18.beneficiaryDetails.noDataFoundContent, ), - dialogType: DigitProgressDialogType.dataFound, - isPop: true, + primaryButtonLabel: localizations.translate( + initialServerCount > 0 + ? i18.common.coreCommonDownload + : i18.common.coreCommonGoback, + ), + secondaryButtonLabel: localizations.translate( + initialServerCount > 0 + ? i18.beneficiaryDetails + .proceedWithoutDownloading + : i18.acknowledgementSuccess.goToHome, + ), + boundaryName: selectedBoundary!.name.toString(), ), - inProgress: (syncCount, totalCount) { - downloadProgress.add( - min( - (syncCount) / (totalCount), - 1, + dialogType: DigitProgressDialogType.dataFound, + isPop: true, + ), + inProgress: (syncCount, totalCount) { + downloadProgress.add( + min( + (syncCount) / (totalCount), + 1, + ), + ); + if (syncCount < 1) { + showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.beneficiaryDetails.dataDownloadInProgress, + ), + projectId: context.projectId, + boundary: selectedBoundary!.code.toString(), + appConfiguartion: appConfiguration, + syncCount: syncCount, + totalCount: totalCount, + prefixLabel: syncCount.toString(), + suffixLabel: totalCount.toString(), + boundaryName: selectedBoundary!.name.toString(), ), + dialogType: DigitProgressDialogType.inProgress, + isPop: true, + downloadProgressController: downloadProgress, ); - if (syncCount < 1) { - showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.beneficiaryDetails.dataDownloadInProgress, - ), - projectId: context.projectId, - boundary: selectedBoundary!.code.toString(), - appConfiguartion: appConfiguration, - syncCount: syncCount, - totalCount: totalCount, - prefixLabel: syncCount.toString(), - suffixLabel: totalCount.toString(), - boundaryName: selectedBoundary!.name.toString(), - ), - dialogType: DigitProgressDialogType.inProgress, - isPop: true, - downloadProgressController: downloadProgress, - ); - } - }, - success: (result) { - int? epochTime = result.lastSyncedTime; + } + }, + success: (result) { + int? epochTime = result.lastSyncedTime; - String date = - '${DigitDateUtils.getTimeFromTimestamp(epochTime!)} on ${DigitDateUtils.getDateFromTimestamp(epochTime)}'; - String dataDescription = "${localizations.translate( - i18.beneficiaryDetails.downloadreport, - )}\n\n\n${localizations.translate( - i18.beneficiaryDetails.boundary, - )} ${result.boundaryName}\n${localizations.translate( - i18.beneficiaryDetails.status, - )} ${localizations.translate( - i18.beneficiaryDetails.downloadcompleted, - )}\n${localizations.translate( - i18.beneficiaryDetails.downloadedon, - )} $date\n${localizations.translate( - i18.beneficiaryDetails.recordsdownload, - )} ${result.totalCount}/${result.totalCount}"; - Navigator.of(context, rootNavigator: true).pop(); - context.router.popAndPush((AcknowledgementRoute( - isDataRecordSuccess: true, - description: dataDescription, - descriptionTableData: { - localizations.translate( - i18.beneficiaryDetails.boundary, - ): result.boundaryName!, - localizations.translate( - i18.beneficiaryDetails.status, - ): localizations.translate( - i18.beneficiaryDetails.downloadcompleted, - ), - localizations.translate( - i18.beneficiaryDetails.downloadtime, - ): date, - localizations.translate( - i18.beneficiaryDetails.totalrecorddownload, - ): '${result.totalCount}/${result.totalCount}', - }, - label: localizations.translate(i18 - .acknowledgementSuccess - .dataDownloadedSuccessLabel), - ))); - }, - failed: () => showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.common.coreCommonDownloadFailed, - ), - projectId: context.projectId, - pendingSyncCount: pendingSyncCount, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - content: localizations.translate( - i18.beneficiaryDetails.dataFoundContent, - ), - primaryButtonLabel: localizations.translate( - i18.syncDialog.retryButtonLabel, - ), - secondaryButtonLabel: localizations.translate( - i18.beneficiaryDetails.proceedWithoutDownloading, + String date = + '${DigitDateUtils.getTimeFromTimestamp(epochTime!)} on ${DigitDateUtils.getDateFromTimestamp(epochTime)}'; + String dataDescription = "${localizations.translate( + i18.beneficiaryDetails.downloadreport, + )}\n\n\n${localizations.translate( + i18.beneficiaryDetails.boundary, + )} ${result.boundaryName}\n${localizations.translate( + i18.beneficiaryDetails.status, + )} ${localizations.translate( + i18.beneficiaryDetails.downloadcompleted, + )}\n${localizations.translate( + i18.beneficiaryDetails.downloadedon, + )} $date\n${localizations.translate( + i18.beneficiaryDetails.recordsdownload, + )} ${result.totalCount}/${result.totalCount}"; + Navigator.of(context, rootNavigator: true).pop(); + context.router.popAndPush((AcknowledgementRoute( + isDataRecordSuccess: true, + description: dataDescription, + descriptionTableData: { + localizations.translate( + i18.beneficiaryDetails.boundary, + ): result.boundaryName!, + localizations.translate( + i18.beneficiaryDetails.status, + ): localizations.translate( + i18.beneficiaryDetails.downloadcompleted, ), - boundaryName: selectedBoundary!.name.toString(), + localizations.translate( + i18.beneficiaryDetails.downloadtime, + ): date, + localizations.translate( + i18.beneficiaryDetails.totalrecorddownload, + ): '${result.totalCount}/${result.totalCount}', + }, + label: localizations.translate(i18 + .acknowledgementSuccess + .dataDownloadedSuccessLabel), + ))); + }, + failed: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.common.coreCommonDownloadFailed, + ), + projectId: context.projectId, + pendingSyncCount: pendingSyncCount, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + content: localizations.translate( + i18.beneficiaryDetails.dataFoundContent, ), - dialogType: DigitProgressDialogType.failed, - isPop: true, + primaryButtonLabel: localizations.translate( + i18.syncDialog.retryButtonLabel, + ), + secondaryButtonLabel: localizations.translate( + i18.beneficiaryDetails.proceedWithoutDownloading, + ), + boundaryName: selectedBoundary!.name.toString(), ), - totalCountCheckFailed: () => showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.beneficiaryDetails.unableToCheckDataInServer, - ), - projectId: context.projectId, - pendingSyncCount: pendingSyncCount, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - primaryButtonLabel: localizations.translate( - i18.syncDialog.retryButtonLabel, - ), - secondaryButtonLabel: localizations.translate( - i18.beneficiaryDetails.proceedWithoutDownloading, - ), - boundaryName: selectedBoundary!.name.toString(), + dialogType: DigitProgressDialogType.failed, + isPop: true, + ), + totalCountCheckFailed: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.beneficiaryDetails.unableToCheckDataInServer, + ), + projectId: context.projectId, + pendingSyncCount: pendingSyncCount, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + primaryButtonLabel: localizations.translate( + i18.syncDialog.retryButtonLabel, + ), + secondaryButtonLabel: localizations.translate( + i18.beneficiaryDetails.proceedWithoutDownloading, ), - dialogType: DigitProgressDialogType.checkFailed, - isPop: true, + boundaryName: selectedBoundary!.name.toString(), ), - insufficientStorage: () => showDownloadDialog( - context, - model: DownloadBeneficiary( - title: localizations.translate( - i18.beneficiaryDetails.insufficientStorage, - ), - content: localizations.translate(i18 - .beneficiaryDetails.insufficientStorageContent), - projectId: context.projectId, - appConfiguartion: appConfiguration, - boundary: selectedBoundary!.code.toString(), - primaryButtonLabel: localizations.translate( - i18.common.coreCommonOk, - ), - boundaryName: selectedBoundary!.name.toString(), + dialogType: DigitProgressDialogType.checkFailed, + isPop: true, + ), + insufficientStorage: () => showDownloadDialog( + context, + model: DownloadBeneficiary( + title: localizations.translate( + i18.beneficiaryDetails.insufficientStorage, ), - dialogType: - DigitProgressDialogType.insufficientStorage, - isPop: true, + content: localizations.translate(i18 + .beneficiaryDetails.insufficientStorageContent), + projectId: context.projectId, + appConfiguartion: appConfiguration, + boundary: selectedBoundary!.code.toString(), + primaryButtonLabel: localizations.translate( + i18.common.coreCommonOk, + ), + boundaryName: selectedBoundary!.name.toString(), ), - ); - }, - child: Column(children: [ - Padding( - padding: const EdgeInsets.all(kPadding), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.beneficiaryDetails.datadownloadreport, - ), - style: theme.textTheme.displayMedium, - overflow: TextOverflow.ellipsis, + dialogType: DigitProgressDialogType.insufficientStorage, + isPop: true, + ), + ); + }, + child: Column(children: [ + Padding( + padding: const EdgeInsets.all(kPadding), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + localizations.translate( + i18.beneficiaryDetails.datadownloadreport, ), + style: theme.textTheme.displayMedium, + overflow: TextOverflow.ellipsis, ), ), - ...downSyncList.map( - (e) => DigitCard( - child: Column( - children: [ - DigitTableCard( - element: { - localizations.translate( - i18.beneficiaryDetails.boundary, - ): e.boundaryName!, - localizations.translate( - i18.beneficiaryDetails.status, - ): e.offset == 0 && e.limit == 0 - ? localizations.translate( - i18.beneficiaryDetails - .downloadcompleted, - ) - : localizations.translate( - i18.beneficiaryDetails - .partialdownloaded, - ), - localizations.translate( - i18.beneficiaryDetails.downloadtime, - ): e.lastSyncedTime != null - ? '${DigitDateUtils.getTimeFromTimestamp(e.lastSyncedTime!)} on ${DigitDateUtils.getDateFromTimestamp(e.lastSyncedTime!)}' - : '--', - localizations.translate( - i18.beneficiaryDetails.totalrecorddownload, - ): e.offset == 0 && e.limit == 0 - ? '${e.totalCount}/${e.totalCount}' - : '${e.offset}/${e.totalCount}', - }, + ), + ...downSyncList.map( + (e) => DigitCard( + child: Column( + children: [ + DigitTableCard( + element: { + localizations.translate( + i18.beneficiaryDetails.boundary, + ): e.boundaryName!, + localizations.translate( + i18.beneficiaryDetails.status, + ): e.offset == 0 && e.limit == 0 + ? localizations.translate( + i18.beneficiaryDetails + .downloadcompleted, + ) + : localizations.translate( + i18.beneficiaryDetails + .partialdownloaded, + ), + localizations.translate( + i18.beneficiaryDetails.downloadtime, + ): e.lastSyncedTime != null + ? '${DigitDateUtils.getTimeFromTimestamp(e.lastSyncedTime!)} on ${DigitDateUtils.getDateFromTimestamp(e.lastSyncedTime!)}' + : '--', + localizations.translate( + i18.beneficiaryDetails.totalrecorddownload, + ): e.offset == 0 && e.limit == 0 + ? '${e.totalCount}/${e.totalCount}' + : '${e.offset}/${e.totalCount}', + }, + ), + DigitOutLineButton( + label: localizations.translate( + i18.beneficiaryDetails.download, ), - DigitOutLineButton( - label: localizations.translate( - i18.beneficiaryDetails.download, + buttonStyle: OutlinedButton.styleFrom( + backgroundColor: Colors.white, + side: BorderSide( + width: 1.0, + color: theme.colorScheme.secondary, ), - buttonStyle: OutlinedButton.styleFrom( - backgroundColor: Colors.white, - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - minimumSize: Size( - MediaQuery.of(context).size.width, - 50, - ), + minimumSize: Size( + MediaQuery.of(context).size.width, + 50, ), - onPressed: () { - setState(() { - selectedBoundary = BoundaryModel( - code: e.locality, - name: e.boundaryName, - ); - }); - context.read().add( - DownSyncGetBatchSizeEvent( - appConfiguration: [ - appConfiguration, - ], - projectId: context.projectId, - boundaryCode: e.locality!, - pendingSyncCount: pendingSyncCount, - boundaryName: - e.boundaryName.toString(), - ), - ); - }, ), - ], - ), + onPressed: () { + setState(() { + selectedBoundary = BoundaryModel( + code: e.locality, + name: e.boundaryName, + ); + }); + context.read().add( + DownSyncGetBatchSizeEvent( + appConfiguration: [ + appConfiguration, + ], + projectId: context.projectId, + boundaryCode: e.locality!, + pendingSyncCount: pendingSyncCount, + boundaryName: e.boundaryName.toString(), + ), + ); + }, + ), + ], ), ), - downSyncList.isEmpty - ? NoResultCard( - align: Alignment.center, - label: localizations.translate( - i18.common.noResultsFound, - ), - ) - : const SizedBox.shrink(), - ]), - ), + ), + downSyncList.isEmpty + ? NoResultCard( + align: Alignment.center, + label: localizations.translate( + i18.common.noResultsFound, + ), + ) + : const SizedBox.shrink(), + ]), ), ], ), @@ -434,4 +426,16 @@ class BeneficiariesReportState extends LocalizedState { ), ); } + + void listenToSyncCount() async { + syncSubscription = context.syncCount().listen((state) { + state.maybeWhen( + orElse: () {}, + pendingSync: (count) { + setState(() { + pendingSyncCount = count; + }); + }); + }); + } } diff --git a/apps/health_campaign_field_worker_app/lib/router/app_router.dart b/apps/health_campaign_field_worker_app/lib/router/app_router.dart index 09b634f34..f588a1f49 100644 --- a/apps/health_campaign_field_worker_app/lib/router/app_router.dart +++ b/apps/health_campaign_field_worker_app/lib/router/app_router.dart @@ -5,20 +5,21 @@ import 'package:closed_household/router/closed_household_router.dart'; import 'package:closed_household/router/closed_household_router.gm.dart'; import 'package:complaints/router/complaints_router.dart'; import 'package:complaints/router/complaints_router.gm.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/router/dashboard_router.dart'; import 'package:digit_dss/router/dashboard_router.gm.dart'; import 'package:digit_scanner/router/digit_scanner_router.dart'; import 'package:digit_scanner/router/digit_scanner_router.gm.dart'; -import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/router/inventory_router.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; -import 'package:survey_form/router/survey_form_router.dart'; -import 'package:survey_form/router/survey_form_router.gm.dart'; import 'package:referral_reconciliation/router/referral_reconciliation_router.dart'; import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:registration_delivery/router/registration_delivery_router.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; +import 'package:survey_form/router/survey_form_router.dart'; +import 'package:survey_form/router/survey_form_router.gm.dart'; import '../blocs/localization/app_localization.dart'; import '../pages/acknowledgement.dart'; @@ -86,139 +87,10 @@ class AppRouter extends _$AppRouter { page: UserDashboardRoute.page, path: 'dashboard', ), - AutoRoute( - page: RegistrationDeliveryWrapperRoute.page, - path: 'registration-delivery-wrapper', - children: [ - AutoRoute( - initial: true, - page: SearchBeneficiaryRoute.page, - path: 'search-beneficiary'), - - /// Beneficiary Registration - AutoRoute( - page: BeneficiaryRegistrationWrapperRoute.page, - path: 'beneficiary-registration', - children: [ - AutoRoute( - page: IndividualDetailsRoute.page, - path: 'individual-details'), - AutoRoute( - page: HouseHoldDetailsRoute.page, - path: 'household-details'), - AutoRoute( - page: HouseDetailsRoute.page, path: 'house-details'), - AutoRoute( - page: HouseholdLocationRoute.page, - path: 'household-location', - initial: true, - ), - AutoRoute( - page: BeneficiaryAcknowledgementRoute.page, - path: 'beneficiary-acknowledgement', - ), - AutoRoute( - page: SummaryRoute.page, - path: 'beneficiary-summary', - ), - ], - ), - AutoRoute( - page: BeneficiaryWrapperRoute.page, - path: 'beneficiary', - children: [ - AutoRoute( - page: HouseholdOverviewRoute.page, - path: 'overview', - initial: true, - ), - AutoRoute( - page: BeneficiaryChecklistRoute.page, - path: 'beneficiary-checklist', - ), - AutoRoute( - page: BeneficiaryDetailsRoute.page, - path: 'beneficiary-details', - ), - AutoRoute( - page: DeliverInterventionRoute.page, - path: 'deliver-intervention', - ), - AutoRoute( - page: RefusedDeliveryRoute.page, - path: 'refused-delivery', - ), - AutoRoute( - page: SideEffectsRoute.page, - path: 'side-effects', - ), - AutoRoute( - page: ReferBeneficiaryRoute.page, - path: 'refer-beneficiary', - ), - AutoRoute( - page: DoseAdministeredRoute.page, - path: 'dose-administered', - ), - AutoRoute( - page: SplashAcknowledgementRoute.page, - path: 'splash-acknowledgement', - ), - AutoRoute( - page: ReasonForDeletionRoute.page, - path: 'reason-for-deletion', - ), - AutoRoute( - page: RecordPastDeliveryDetailsRoute.page, - path: 'record-past-delivery-details', - ), - AutoRoute( - page: HouseholdAcknowledgementRoute.page, - path: 'household-acknowledgement', - ), - AutoRoute( - page: DeliverySummaryRoute.page, - path: 'delivery-summary', - ), - ], - ), - ]), - - /// close household - AutoRoute( - page: ClosedHouseholdWrapperRoute.page, - path: 'closed-household-wrapper', - children: [ - AutoRoute( - page: ClosedHouseholdDetailsRoute.page, - path: 'closed-household-details', - initial: true, - ), - AutoRoute( - page: ClosedHouseholdSummaryRoute.page, - path: 'closed-household-summary'), - AutoRoute( - page: ClosedHouseholdAcknowledgementRoute.page, - path: 'closed-household-acknowledgement'), - ]), + ...RegistrationDeliveryRoute().routes, /// close household - AutoRoute( - page: ClosedHouseholdWrapperRoute.page, - path: 'closed-household-wrapper', - children: [ - AutoRoute( - page: ClosedHouseholdDetailsRoute.page, - path: 'closed-household-details', - initial: true, - ), - AutoRoute( - page: ClosedHouseholdSummaryRoute.page, - path: 'closed-household-summary'), - AutoRoute( - page: ClosedHouseholdAcknowledgementRoute.page, - path: 'closed-household-acknowledgement'), - ]), + ...ClosedHouseholdPackageRoute().routes, AutoRoute( page: SurveyFormWrapperRoute.page, @@ -229,10 +101,13 @@ class AppRouter extends _$AppRouter { path: '', ), AutoRoute( - page: SurveyFormBoundaryViewRoute.page, path: 'view-boundary'), + page: SurveyFormBoundaryViewRoute.page, + path: 'view-boundary'), AutoRoute(page: SurveyFormViewRoute.page, path: 'view'), AutoRoute(page: SurveyFormPreviewRoute.page, path: 'preview'), - AutoRoute(page: SurveyFormAcknowledgementRoute.page, path: 'surveyForm-acknowledgement'), + AutoRoute( + page: SurveyFormAcknowledgementRoute.page, + path: 'surveyForm-acknowledgement'), ]), AutoRoute( page: BeneficiaryAcknowledgementRoute.page, @@ -319,86 +194,13 @@ class AppRouter extends _$AppRouter { ), // Attendance Route - AutoRoute( - page: MarkAttendanceRoute.page, - path: 'mark-attendance', - ), - AutoRoute( - page: ManageAttendanceRoute.page, - path: 'manage-attendance', - ), - AutoRoute( - page: AttendanceDateSessionSelectionRoute.page, - path: 'attendance-date-session-selection', - ), - AutoRoute( - page: AttendanceAcknowledgementRoute.page, - path: 'attendance-acknowledgement', - ), + ...AttendanceRoute().routes, //Inventory Route - AutoRoute( - page: ManageStocksRoute.page, - path: 'manage-stocks', - ), - AutoRoute( - page: RecordStockWrapperRoute.page, - path: 'record-stock', - children: [ - AutoRoute( - page: WarehouseDetailsRoute.page, - path: 'warehouse-details', - initial: true), - AutoRoute(page: StockDetailsRoute.page, path: 'details'), - ]), - AutoRoute( - page: InventoryFacilitySelectionRoute.page, - path: 'inventory-select-facilities'), - AutoRoute( - page: StockReconciliationRoute.page, path: 'stock-reconciliation'), - AutoRoute( - page: InventoryReportSelectionRoute.page, - path: 'inventory-report-selection'), - AutoRoute( - page: InventoryReportDetailsRoute.page, - path: 'inventory-report-details'), - AutoRoute( - page: InventoryAcknowledgementRoute.page, - path: 'inventory-acknowledgement'), + ...InventoryRoute().routes, // Referral Reconciliation Route - AutoRoute( - page: HFCreateReferralWrapperRoute.page, - path: 'hf-referral', - children: [ - AutoRoute( - page: ReferralFacilityRoute.page, - path: 'facility-details', - initial: true), - AutoRoute( - page: RecordReferralDetailsRoute.page, - path: 'referral-details'), - AutoRoute( - page: ReferralReasonChecklistRoute.page, - path: 'referral-checklist-create', - ), - AutoRoute( - page: ReferralReasonChecklistPreviewRoute.page, - path: 'referral-checklist-view', - ), - ]), - AutoRoute( - page: ReferralReconAcknowledgementRoute.page, - path: 'referral-acknowledgement', - ), - AutoRoute( - page: ReferralReconProjectFacilitySelectionRoute.page, - path: 'referral-project-facility', - ), - AutoRoute( - page: SearchReferralReconciliationsRoute.page, - path: 'search-referrals', - ), + ...ReferralReconciliationRoute().routes, ], ) ]; 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 d58ea8b9a..7a1584285 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 @@ -16,14 +16,14 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:isar/isar.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:recase/recase.dart'; +import 'package:sync_service/data/sync_service.dart'; +import 'package:sync_service/models/bandwidth/bandwidth_model.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/no_sql/schema/service_registry.dart'; import '../data/local_store/secure_store/secure_store.dart'; -import '../data/network_manager.dart'; import '../data/remote_client.dart'; import '../data/repositories/remote/bandwidth_check.dart'; -import '../models/bandwidth/bandwidth_model.dart'; import '../widgets/network_manager_provider_wrapper.dart'; import 'environment_config.dart'; import 'utils.dart'; @@ -203,11 +203,8 @@ void onStart(ServiceInstance service) async { ), ), ); - final isSyncCompleted = await const NetworkManager( - configuration: NetworkManagerConfiguration( - persistenceConfig: PersistenceConfiguration.offlineFirst, - ), - ).performSync( + // Insert sync logic here + final isSyncCompleted = await SyncService().performSync( localRepositories: Constants.getLocalRepositories( _sql, _isar, 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 fbec1a2db..fe95a6767 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/constants.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/constants.dart @@ -16,6 +16,7 @@ import 'package:path_provider/path_provider.dart'; import 'package:referral_reconciliation/referral_reconciliation.dart'; import 'package:registration_delivery/registration_delivery.dart'; import 'package:survey_form/survey_form.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../data/local_store/no_sql/schema/app_configuration.dart'; import '../data/local_store/no_sql/schema/entity_mapper.dart'; @@ -24,6 +25,8 @@ import '../data/local_store/no_sql/schema/project_types.dart'; import '../data/local_store/no_sql/schema/row_versions.dart'; import '../data/local_store/no_sql/schema/service_registry.dart'; import '../data/repositories/remote/downsync.dart'; +import '../data/sync_registry.dart'; +import '../data/sync_service_mapper.dart'; import '../firebase_options.dart'; import 'environment_config.dart'; import 'utils.dart'; @@ -32,12 +35,15 @@ class Constants { late Future _isar; late String _version; static final Constants _instance = Constants._(); + Constants._() { _isar = openIsar(); } + factory Constants() { return _instance; } + Future initialize(version) async { await initializeAllMappers(); setInitialDataOfPackages(); @@ -85,6 +91,9 @@ class Constants { static const String boundaryLocalizationPath = 'rainmaker-boundary-admin'; + static RegExp mobileNumberRegExp = + RegExp(r'^(?=.{10}$)[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'); + static List getLocalRepositories( LocalSqlDataStore sql, Isar isar, @@ -278,6 +287,15 @@ class Constants { InventorySingleton().setTenantId(tenantId: envConfig.variables.tenantId); LocationTrackerSingleton() .setTenantId(tenantId: envConfig.variables.tenantId); + SyncServiceSingleton().setData( + syncDownRetryCount: envConfig.variables.syncDownRetryCount, + persistenceConfiguration: PersistenceConfiguration.offlineFirst, + entityMapper: SyncServiceMapper(), + ); + SyncServiceSingleton().setRegistries(SyncServiceRegistry()); + SyncServiceSingleton().registries?.registerSyncRegistries({ + DataModelType.complaints: (remote) => CustomSyncRegistry(remote), + }); } } @@ -287,6 +305,7 @@ final scaffoldMessengerKey = GlobalKey(); class KeyValue { String label; dynamic key; + KeyValue(this.label, this.key); } @@ -295,6 +314,7 @@ class StatusKeys { bool isBeneficiaryRefused; bool isBeneficiaryReferred; bool isStatusReset; + StatusKeys(this.isNotEligible, this.isBeneficiaryRefused, this.isBeneficiaryReferred, this.isStatusReset); } @@ -340,6 +360,7 @@ class DownloadBeneficiary { String? prefixLabel; String? suffixLabel; AppConfiguration? appConfiguartion; + DownloadBeneficiary({ required this.title, required this.projectId, 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 210e906b5..de4dff872 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 @@ -226,4 +226,16 @@ extension ContextUtilityExtensions on BuildContext { throw AppException('Could not fetch ${T.runtimeType}'); } } + + // sync refresh + void syncRefresh() { + final syncBloc = _get(); + syncBloc.add(SyncRefreshEvent(loggedInUserUuid)); + } + + // insert sync count + Stream syncCount() { + final syncBloc = _get(); + return syncBloc.stream; + } } diff --git a/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart b/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart index 433ebfb92..d2a24e841 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/extensions/extensions.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:attendance_management/attendance_management.dart'; import 'package:closed_household/utils/utils.dart'; import 'package:collection/collection.dart'; @@ -13,6 +15,7 @@ import 'package:referral_reconciliation/utils/utils.dart'; import 'package:registration_delivery/registration_delivery.dart'; // Importing necessary packages and files import 'package:survey_form/utils/utils.dart'; +import 'package:sync_service/sync_service_lib.dart'; import '../../blocs/auth/auth.dart'; import '../../blocs/project/project.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart b/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart index 3ac69b4c7..4da7c38a1 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/localization_delegates.dart @@ -20,7 +20,6 @@ import 'package:referral_reconciliation/blocs/app_localization.dart' as referral_reconciliation_localization; import 'package:registration_delivery/blocs/app_localization.dart' as registration_delivery_localization; -import 'package:digit_components/blocs/localization.dart' as component_localization; import 'package:survey_form/blocs/app_localization.dart' as survey_form_localization; 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 6b5d19fc3..fe1c005f5 100644 --- a/apps/health_campaign_field_worker_app/lib/utils/utils.dart +++ b/apps/health_campaign_field_worker_app/lib/utils/utils.dart @@ -5,14 +5,12 @@ import 'dart:io'; import 'package:attendance_management/attendance_management.dart' as attendance_mappers; - import 'package:complaints/complaints.init.dart' as complaints_mappers; import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:digit_components/theme/digit_theme.dart'; import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_components/widgets/digit_dialog.dart'; import 'package:digit_components/widgets/digit_sync_dialog.dart'; -import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/data_model.init.dart' as data_model_mappers; import 'package:digit_dss/digit_dss.dart' as dss_mappers; import 'package:disable_battery_optimization/disable_battery_optimization.dart'; @@ -27,8 +25,7 @@ import 'package:referral_reconciliation/referral_reconciliation.dart' as referral_reconciliation_mappers; import 'package:registration_delivery/registration_delivery.init.dart' as registration_delivery_mappers; -import 'package:survey_form/survey_form.init.dart' - as survey_form_mappers; +import 'package:survey_form/survey_form.init.dart' as survey_form_mappers; import '../blocs/app_initialization/app_initialization.dart'; import '../blocs/projects_beneficiary_downsync/project_beneficiaries_downsync.dart'; @@ -96,14 +93,14 @@ performBackgroundService({ }) async { final connectivityResult = await (Connectivity().checkConnectivity()); - final isOnline = connectivityResult == ConnectivityResult.wifi || - connectivityResult == ConnectivityResult.mobile; + final isOnline = connectivityResult.firstOrNull == ConnectivityResult.wifi || + connectivityResult.firstOrNull == ConnectivityResult.mobile; final service = FlutterBackgroundService(); var isRunning = await service.isRunning(); if (stopService) { if (isRunning) { - if (!isBackground && context != null) { + if (!isBackground && context != null && context.mounted) { if (context.mounted) { DigitToast.show( context, @@ -409,53 +406,6 @@ initializeAllMappers() async { await Future.wait(initializations); } -int getSyncCount(List oplogs) { - int count = oplogs.where((element) { - if (element.syncedDown == false && element.syncedUp == true) { - 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.sideEffect: - case DataModelType.referral: - case DataModelType.hFReferral: - case DataModelType.attendance: - case DataModelType.service: - return true; - default: - return false; - } - } else { - switch (element.entityType) { - // add syncCount case for package - 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: - case DataModelType.hFReferral: - case DataModelType.attendance: - case DataModelType.userLocation: - return true; - default: - return false; - } - } - }).length; - - return count; -} - class LocalizationParams { static final LocalizationParams _singleton = LocalizationParams._internal(); 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 4ed1bb053..e59929a49 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 @@ -41,11 +41,11 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorScheme.onSurface, padding: EdgeInsets.zero, ), onPressed: () { - context.router.pop(); + context.router.maybePop(); handleback != null ? handleback!() : null; }, icon: const Icon(Icons.arrow_left_sharp), diff --git a/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart b/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart index 0e0af70d8..7b00ea572 100644 --- a/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart +++ b/apps/health_campaign_field_worker_app/lib/widgets/network_manager_provider_wrapper.dart @@ -15,15 +15,9 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:inventory_management/inventory_management.dart'; -import 'package:inventory_management/inventory_management.dart'; -import 'package:inventory_management/inventory_management.dart'; import 'package:isar/isar.dart'; import 'package:provider/provider.dart'; import 'package:referral_reconciliation/referral_reconciliation.dart'; -import 'package:referral_reconciliation/referral_reconciliation.dart'; -import 'package:referral_reconciliation/referral_reconciliation.dart'; -import 'package:registration_delivery/registration_delivery.dart'; -import 'package:registration_delivery/registration_delivery.dart'; import 'package:registration_delivery/registration_delivery.dart'; import 'package:survey_form/survey_form.dart'; diff --git a/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart b/apps/health_campaign_field_worker_app/lib/widgets/sidebar/side_bar.dart index 07530a05d..688e0984b 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 @@ -13,6 +13,7 @@ import '../../blocs/localization/localization.dart'; import '../../models/data_model.dart'; import '../../models/entities/roles_type.dart'; import '../../router/app_router.dart'; +import '../../utils/environment_config.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; @@ -33,13 +34,12 @@ class SideBar extends StatelessWidget { : false; return BlocBuilder(builder: (context, state) { - return Column( - children: [ + return SingleChildScrollView( + child: Column(children: [ Container( color: theme.colorScheme.secondary.withOpacity(0.12), child: SizedBox( width: MediaQuery.of(context).size.width, - height: 280, child: state.maybeMap( authenticated: (value) => Column( mainAxisAlignment: MainAxisAlignment.center, @@ -110,9 +110,7 @@ class SideBar extends StatelessWidget { i18.common.coreCommonlanguage, ), icon: Icons.language, - onPressed: () { - - }, + onPressed: () {}, content: Offstage( offstage: languages == null, child: BlocBuilder( @@ -130,14 +128,8 @@ class SideBar extends StatelessWidget { context .read() .add(LocalizationEvent.onLoadLocalization( - module: localizationModulesList - .interfaces - .where((element) => - element.type == - Modules.localizationModule) - .map((e) => e.name.toString()) - .join(',') - .toString(), + module: + "hcm-boundary-${envConfig.variables.hierarchyType.toLowerCase()},${localizationModulesList.interfaces.where((element) => element.type == Modules.localizationModule).map((e) => e.name.toString()).join(',')}", tenantId: appConfig.tenantId ?? "default", locale: value.value.toString(), @@ -185,9 +177,9 @@ class SideBar extends StatelessWidget { onPressed: () async { final connectivityResult = await (Connectivity().checkConnectivity()); - final isOnline = - connectivityResult == ConnectivityResult.wifi || - connectivityResult == ConnectivityResult.mobile; + final isOnline = connectivityResult.firstOrNull == + ConnectivityResult.wifi || + connectivityResult.firstOrNull == ConnectivityResult.mobile; if (isOnline) { if (context.mounted) { @@ -242,7 +234,7 @@ class SideBar extends StatelessWidget { 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 d096797b2..dff3b3736 100644 --- a/apps/health_campaign_field_worker_app/pubspec.lock +++ b/apps/health_campaign_field_worker_app/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "4eec93681221723a686ad580c2e7d960e1017cf1a4e0a263c2573c2c6b0bf5cd" + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" url: "https://pub.dev" source: hosted - version: "1.3.25" + version: "1.3.35" analyzer: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -68,12 +68,13 @@ packages: attendance_management: dependency: "direct main" description: - path: "../../packages/attendance_management" - relative: true - source: path - version: "1.0.3-dev.1" + name: attendance_management + sha256: "7221a7ed0d20cbbb45357dca59c6f6aa247e935247eeb5a8991b79fa809200e4" + url: "https://pub.dev" + source: hosted + version: "1.0.3" audioplayers: - dependency: "direct main" + dependency: transitive description: name: audioplayers sha256: c05c6147124cd63e725e861335a8b4d57300b80e6e92cea7c145c739223bbaef @@ -132,26 +133,26 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" battery_plus: dependency: "direct main" description: name: battery_plus - sha256: ba605aeafd6609cb5f8020c609a51941803a5fb2b6a7576f7c7eeeb52d29e750 + sha256: ccc1322fee1153a0f89e663e0eac2f64d659da506454cf24dcad75eb08ae138b url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" battery_plus_platform_interface: dependency: transitive description: @@ -212,10 +213,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -228,18 +229,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -257,29 +258,29 @@ packages: source: hosted version: "8.9.2" camera: - dependency: "direct main" + dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "594b40a5ea0e144fdfe49e4036abe4ec9bd578b2ce3aabdb0668a02db376a1e8" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.7" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -292,10 +293,10 @@ packages: dependency: transitive description: name: camera_web - sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" url: "https://pub.dev" source: hosted - version: "0.3.4" + version: "0.3.5" characters: dependency: transitive description: @@ -308,10 +309,10 @@ packages: dependency: transitive description: name: charcode - sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -324,10 +325,10 @@ packages: dependency: transitive description: name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.4.1" + version: "0.4.2" clock: dependency: transitive description: @@ -339,10 +340,11 @@ packages: closed_household: dependency: "direct main" description: - path: "../../packages/closed_household" - relative: true - source: path - version: "1.0.1+1" + name: closed_household + sha256: d3e78f1a1f65a88b695d37d4fbf217cd3e259c8fdb11402dfb821225a11726c2 + url: "https://pub.dev" + source: hosted + version: "1.0.3" code_builder: dependency: transitive description: @@ -362,58 +364,59 @@ packages: complaints: dependency: "direct main" description: - path: "../../packages/complaints" - relative: true - source: path - version: "0.0.1-dev.2" + name: complaints + sha256: "6e383d4be32cee58696258c2f58176ef9869b2afc4aeed252e4b3757eb4bfb76" + url: "https://pub.dev" + source: hosted + version: "1.0.0" connectivity_plus: dependency: "direct main" description: name: connectivity_plus - sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0" + sha256: "876849631b0c7dc20f8b471a2a03142841b482438e3b707955464f5ffca3e4c3" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.1.0" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface - sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a + sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204" url: "https://pub.dev" source: hosted - version: "1.2.4" + version: "2.0.1" convert: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" coverage: dependency: transitive description: name: coverage - sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 url: "https://pub.dev" source: hosted - version: "1.6.4" + version: "1.11.1" cross_file: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" csslib: dependency: transitive description: @@ -441,12 +444,11 @@ packages: dart_mappable_builder: dependency: "direct dev" description: - path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" - url: "https://github.com/egovernments/health-campaign-field-worker-app/" - source: git - version: "4.2.0" + name: dart_mappable_builder + sha256: "04a6e7117382f8a8689b3e363bee6c3de8c9ea4332e664148fe01bd576eb1126" + url: "https://pub.dev" + source: hosted + version: "4.3.0" dart_style: dependency: transitive description: @@ -506,60 +508,67 @@ packages: digit_components: dependency: "direct main" description: - path: "../../packages/digit_components" - relative: true - source: path - version: "1.0.2+1" + name: digit_components + sha256: "7097c7e8bd2fa96415eb4049a7fc2e4cb3dcb5a913d63703ca69cb785a069300" + url: "https://pub.dev" + source: hosted + version: "1.0.3" digit_data_model: dependency: "direct main" description: - path: "../../packages/digit_data_model" - relative: true - source: path - version: "1.0.5-dev.1" + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f + url: "https://pub.dev" + source: hosted + version: "1.0.5" digit_dss: dependency: "direct main" description: - path: "../../packages/digit_dss" - relative: true - source: path - version: "1.0.2" + name: digit_dss + sha256: cb5ae888503260dff1df2d4785ba2cac39a20348cfcd660e2212a8965b948dba + url: "https://pub.dev" + source: hosted + version: "1.0.3" digit_firebase_services: dependency: "direct main" description: - path: "../../packages/digit_firebase_services" - relative: true - source: path + name: digit_firebase_services + sha256: ce76521d797e123b6fc95c9dfad7d4a918a93b97f57aecd0e1d517b46190909d + url: "https://pub.dev" + source: hosted version: "0.0.1" digit_location_tracker: dependency: "direct main" description: - path: "../../packages/digit_location_tracker" - relative: true - source: path - version: "0.0.1-dev.1" + name: digit_location_tracker + sha256: a93bda5b07db112210e08c7a76f0627957d931d5106c8a7db8876503cc2fd06f + url: "https://pub.dev" + source: hosted + version: "1.0.0" digit_scanner: dependency: "direct main" description: - path: "../../packages/digit_scanner" - relative: true - source: path - version: "1.0.3+1" + name: digit_scanner + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a + url: "https://pub.dev" + source: hosted + version: "1.0.4" digit_showcase: dependency: "direct main" description: - path: "../../packages/digit_showcase" - relative: true - source: path + name: digit_showcase + sha256: "75b67298f1860ad757827b15af752b677f934b5275b887e36b15e25a5285e498" + url: "https://pub.dev" + source: hosted version: "1.0.0" digit_ui_components: dependency: "direct main" description: name: digit_ui_components - sha256: e38f163515aa6a6c5283754e741b21f33fb3a6c0a1fc171a1e4e6620510d46ae + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "0.0.1+7" + version: "0.0.2-dev.4" dio: dependency: "direct main" description: @@ -572,10 +581,10 @@ packages: dependency: transitive description: name: dio_web_adapter - sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "2.0.0" disable_battery_optimization: dependency: "direct main" description: @@ -584,14 +593,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" - disk_space: + disk_space_update: dependency: "direct main" description: - name: disk_space - sha256: fb27eb2d09ac04784f45b95b1355538b2355c76a081eeaa8439d1a5cfa263888 + name: disk_space_update + sha256: "65e19384334779537f7ec83a939c5991bf56bfe016672335ea47d62374f08a3c" url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.0.2" dotted_border: dependency: transitive description: @@ -604,10 +613,10 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -620,26 +629,26 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" easy_stepper: dependency: transitive description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5+1" equatable: dependency: transitive description: name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.7" expandable: dependency: "direct main" description: @@ -660,42 +669,42 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" file_picker: dependency: transitive description: name: file_picker - sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" url: "https://pub.dev" source: hosted - version: "8.0.0+1" + version: "8.0.7" file_selector_linux: dependency: transitive description: name: file_selector_linux - sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "0.9.2+1" + version: "0.9.3+2" file_selector_macos: dependency: transitive description: name: file_selector_macos - sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "0.9.4" + version: "0.9.4+2" file_selector_platform_interface: dependency: transitive description: @@ -708,50 +717,50 @@ packages: dependency: transitive description: name: file_selector_windows - sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "0.9.3+2" + version: "0.9.3+3" firebase_core: dependency: transitive description: name: firebase_core - sha256: "53316975310c8af75a96e365f9fccb67d1c544ef0acdbf0d88bbe30eedd1c4f9" + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" url: "https://pub.dev" source: hosted - version: "2.27.0" + version: "2.32.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: e30da58198a6d4b49d5bce4e852f985c32cb10db329ebef9473db2b9f09ce810 + sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6 url: "https://pub.dev" source: hosted - version: "5.3.0" + version: "5.3.1" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: c8e1d59385eee98de63c92f961d2a7062c5d9a65e7f45bdc7f1b0b205aab2492 + sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88" url: "https://pub.dev" source: hosted - version: "2.11.5" + version: "2.17.5" firebase_crashlytics: dependency: transitive description: name: firebase_crashlytics - sha256: c4f1b723d417bc9c4774810e774ff91df8fb0032d33fb2888b2c887e865581b8 + sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" url: "https://pub.dev" source: hosted - version: "3.4.18" + version: "3.5.7" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface - sha256: c5a11fca3df76a98e3fa68fde8b10a08aacb9a7639f619fbfd4dad6c67a08643 + sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" url: "https://pub.dev" source: hosted - version: "3.6.25" + version: "3.6.35" fixnum: dependency: transitive description: @@ -830,10 +839,10 @@ packages: dependency: transitive description: name: flutter_dropzone_platform_interface - sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + sha256: b4e2df75364bab2f4c3ca32b87193267d786b6e158c3f345c3a1daeb911d82b9 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.0.6" flutter_dropzone_web: dependency: transitive description: @@ -910,18 +919,18 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_local_notifications: dependency: "direct main" description: name: flutter_local_notifications - sha256: "55b9b229307a10974b26296ff29f2e132256ba4bd74266939118eaefa941cb00" + sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35" url: "https://pub.dev" source: hosted - version: "16.3.3" + version: "17.2.4" flutter_local_notifications_linux: dependency: transitive description: @@ -947,10 +956,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.22" flutter_portal: dependency: "direct main" description: @@ -1027,10 +1036,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" url: "https://pub.dev" source: hosted - version: "2.0.10+1" + version: "2.0.16" flutter_test: dependency: "direct dev" description: flutter @@ -1050,13 +1059,13 @@ packages: source: sdk version: "0.0.0" fluttertoast: - dependency: "direct main" + dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" formula_parser: dependency: transitive description: @@ -1085,10 +1094,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -1106,18 +1115,18 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.3.1" + version: "4.6.1" geolocator_apple: dependency: transitive description: name: geolocator_apple - sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.3.8+1" geolocator_platform_interface: dependency: transitive description: @@ -1154,36 +1163,36 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: - dependency: "direct main" + dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" group_radio_button: - dependency: "direct main" + dependency: transitive description: name: group_radio_button sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" @@ -1191,7 +1200,7 @@ packages: source: hosted version: "1.3.0" gs1_barcode_parser: - dependency: "direct main" + dependency: transitive description: name: gs1_barcode_parser sha256: ff171bc40038de3f7178fbc32eaf9eebc3d35a3c4c00bb0281fe4a976d853a42 @@ -1242,10 +1251,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -1274,34 +1283,34 @@ packages: dependency: transitive description: name: image_picker - sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.1.2" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" url: "https://pub.dev" source: hosted - version: "0.8.9+6" + version: "0.8.12+12" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.6" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" url: "https://pub.dev" source: hosted - version: "0.8.9+1" + version: "0.8.12+1" image_picker_linux: dependency: transitive description: @@ -1322,10 +1331,10 @@ packages: dependency: transitive description: name: image_picker_platform_interface - sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" url: "https://pub.dev" source: hosted - version: "2.9.3" + version: "2.10.0" image_picker_windows: dependency: transitive description: @@ -1343,25 +1352,26 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" inventory_management: dependency: "direct main" description: - path: "../../packages/inventory_management" - relative: true - source: path - version: "1.0.3+5" + name: inventory_management + sha256: e8ac85b2a4cfdcabdb9a0e49bc3231953b9c5c7e02c6aabadda6ffc3b78ef128 + url: "https://pub.dev" + source: hosted + version: "1.0.4" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" isar: dependency: "direct main" description: @@ -1410,70 +1420,94 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" lottie: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" material_design_icons_flutter: dependency: "direct main" description: @@ -1486,10 +1520,10 @@ packages: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -1542,34 +1576,34 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" package_info_plus: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.1.1" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -1582,34 +1616,34 @@ packages: dependency: transitive description: name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -1634,14 +1668,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" - url: "https://pub.dev" - source: hosted - version: "1.11.1" permission_handler: dependency: "direct main" description: @@ -1670,10 +1696,10 @@ packages: dependency: transitive description: name: permission_handler_html - sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" url: "https://pub.dev" source: hosted - version: "0.1.1" + version: "0.1.3+5" permission_handler_platform_interface: dependency: transitive description: @@ -1702,10 +1728,10 @@ packages: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -1718,10 +1744,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "7.0.2" + version: "8.0.0" pointer_interceptor: dependency: transitive description: @@ -1750,10 +1776,10 @@ packages: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" provider: dependency: "direct main" description: @@ -1766,10 +1792,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: @@ -1782,10 +1808,10 @@ packages: dependency: transitive description: name: qr - sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" + sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" qr_flutter: dependency: "direct main" description: @@ -1798,18 +1824,18 @@ packages: dependency: transitive description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1821,17 +1847,19 @@ packages: referral_reconciliation: dependency: "direct main" description: - path: "../../packages/referral_reconciliation" - relative: true - source: path - version: "1.0.3-dev.1" + name: referral_reconciliation + sha256: "0b7e439b105b7cc4c89cff822b801ab8eecce497031be1572e5415aa1e871208" + url: "https://pub.dev" + source: hosted + version: "1.0.3" registration_delivery: dependency: "direct main" description: - path: "../../packages/registration_delivery" - relative: true - source: path - version: "1.0.4-dev.5" + name: registration_delivery + sha256: "4dd6e6781e367edf806d838e58771dff838eeff0d444534079a468789cadfbcb" + url: "https://pub.dev" + source: hosted + version: "1.0.5+2" remove_emoji_input_formatter: dependency: transitive description: @@ -1852,34 +1880,34 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2" + sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.3.2" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" + sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.5.3" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "2ba0510d3017f91655b7543e9ee46d48619de2a2af38e5c790423f7007c7ccc1" + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" shared_preferences_platform_interface: dependency: transitive description: @@ -1892,18 +1920,18 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" + sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.4.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "398084b47b7f92110683cac45c6dc4aae853db47e470e5ddcd52cab7f7196ab2" + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" shelf: dependency: transitive description: @@ -1924,10 +1952,10 @@ packages: dependency: transitive description: name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.3" shelf_web_socket: dependency: transitive description: @@ -1961,18 +1989,18 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: name: source_maps - sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" url: "https://pub.dev" source: hosted - version: "0.10.12" + version: "0.10.13" source_span: dependency: transitive description: @@ -1981,54 +2009,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - speech_to_text: - dependency: "direct main" - description: - name: speech_to_text - sha256: "57fef1d41bdebe298e84842c89bb4ac91f31cdbec7830c8cb1fc6b91d03abd42" - url: "https://pub.dev" - source: hosted - version: "6.6.0" - speech_to_text_macos: + sprintf: dependency: transitive description: - name: speech_to_text_macos - sha256: e685750f7542fcaa087a5396ee471e727ec648bf681f4da83c84d086322173f6 + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" url: "https://pub.dev" source: hosted - version: "1.1.0" - speech_to_text_platform_interface: - dependency: transitive - description: - name: speech_to_text_platform_interface - sha256: a1935847704e41ee468aad83181ddd2423d0833abe55d769c59afca07adb5114 - url: "https://pub.dev" - source: hosted - version: "2.3.0" + version: "7.0.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" sqlite3_flutter_libs: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: "7ae52b23366e5295005022e62fa093f64bfe190810223ea0ebf733a4cd140bce" + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.26" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -2046,7 +2058,7 @@ packages: source: hosted version: "2.1.2" stream_transform: - dependency: "direct main" + dependency: transitive description: name: stream_transform sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" @@ -2064,10 +2076,11 @@ packages: survey_form: dependency: "direct main" description: - path: "../../packages/survey_form" - relative: true - source: path - version: "0.0.1-dev.2" + name: survey_form + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" + url: "https://pub.dev" + source: hosted + version: "1.0.0" sync_http: dependency: transitive description: @@ -2076,6 +2089,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + sync_service: + dependency: "direct main" + description: + name: sync_service + sha256: ba4720b48bf4a80c3299118000bf7851dae871480b75ab95f0e5a830cddc2e39 + url: "https://pub.dev" + source: hosted + version: "0.0.1-dev.1" synchronized: dependency: transitive description: @@ -2096,34 +2117,34 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" time: dependency: transitive description: name: time - sha256: ad8e018a6c9db36cb917a031853a1aae49467a93e0d464683e029537d848c221 + sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" timezone: dependency: transitive description: @@ -2181,45 +2202,45 @@ packages: source: hosted version: "0.7.0" url_launcher: - dependency: "direct main" + dependency: transitive description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.3.2" + version: "6.3.9" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.3.2" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.2.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.2" url_launcher_platform_interface: dependency: transitive description: @@ -2232,50 +2253,50 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.15" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.16" vector_math: dependency: transitive description: @@ -2296,10 +2317,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "11.10.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -2312,26 +2333,26 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" webkit_inspection_protocol: dependency: transitive description: @@ -2344,18 +2365,18 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" win32_registry: dependency: transitive description: name: win32_registry - sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" + sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.5" workmanager: dependency: "direct main" description: @@ -2368,10 +2389,10 @@ packages: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: @@ -2384,10 +2405,10 @@ packages: dependency: transitive description: name: xxh3 - sha256: cbeb0e1d10f4c6bf67b650f395eac0cc689425b5efc2ba0cc3d3e069a0beaeec + sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" yaml: dependency: transitive description: @@ -2397,5 +2418,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <=3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.1 <3.9.0" + flutter: ">=3.22.0" diff --git a/apps/health_campaign_field_worker_app/pubspec.yaml b/apps/health_campaign_field_worker_app/pubspec.yaml index c5c9d5380..c85e790ba 100644 --- a/apps/health_campaign_field_worker_app/pubspec.yaml +++ b/apps/health_campaign_field_worker_app/pubspec.yaml @@ -1,7 +1,7 @@ name: health_campaign_field_worker_app description: A new Flutter project. publish_to: 'none' -version: 1.5.0+0 +version: 1.6.0+0 environment: sdk: '>=3.0.0 <=4.0.0' @@ -10,101 +10,86 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 - freezed_annotation: ^2.1.0 - json_annotation: ^4.7.0 - uuid: ^3.0.6 - intl: ^0.18.0 - drift: ^2.0.0 - sqlite3_flutter_libs: ^0.5.10 - path_provider: ^2.0.11 - path: ^1.8.2 - digit_ui_components: 0.0.1+7 - digit_components: ^1.0.2 - auto_route: ^7.8.4 - flutter_bloc: ^8.1.1 - collection: ^1.16.0 - reactive_forms: ^14.1.0 - location: ^5.0.0 - dart_mappable: ^4.2.0 - dio: ^5.4.2+1 - flutter_keyboard_visibility: ^5.4.0 - isar: ^3.0.5 - isar_flutter_libs: ^3.0.5 + freezed_annotation: ^2.4.1 + json_annotation: ^4.9.0 + uuid: ^4.4.0 + intl: ^0.19.0 + drift: ^2.18.0 + sqlite3_flutter_libs: ^0.5.11+1 + path_provider: ^2.1.3 + path: ^1.9.0 + digit_ui_components: ^0.0.2-dev.4 + digit_components: ^1.0.3 + auto_route: ^8.3.0 + flutter_bloc: ^8.1.5 + collection: ^1.18.0 + reactive_forms: ^17.0.0 + location: ^6.0.2 + dart_mappable: ^4.2.2 + dio: ^5.4.3+1 + flutter_keyboard_visibility: ^5.4.1 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 nested: ^1.0.0 - flutter_dotenv: ^5.0.2 + flutter_dotenv: ^5.1.0 flutter_localizations: sdk: flutter - provider: ^6.0.5 + provider: ^6.1.2 recase: ^4.1.0 - drift_db_viewer: ^2.0.0 - bloc_concurrency: ^0.2.1 - stream_transform: ^2.1.0 - fluttertoast: ^8.1.2 - flutter_secure_storage: ^9.0.0 - group_radio_button: ^1.3.0 - flutter_portal: ^1.1.3 - url_launcher: ^6.1.10 - connectivity_plus: ^5.0.2 + drift_db_viewer: ^2.1.0 + bloc_concurrency: ^0.2.5 + flutter_secure_storage: ^9.2.2 + connectivity_plus: ^6.0.3 material_design_icons_flutter: ^7.0.7296 - shared_preferences: ^2.1.0 - pretty_dio_logger: ^1.2.0-beta-1 - pluto_grid: ^7.0.1 - speech_to_text: ^6.1.1 + shared_preferences: ^2.2.3 + pretty_dio_logger: ^1.3.1 + pluto_grid: ^8.0.0 + flutter_portal: ^1.1.4 flutter_background_service: ^5.0.5 - flutter_local_notifications: ^16.3.0 - device_info_plus: ^9.0.1 - battery_plus: ^5.0.2 - workmanager: ^0.5.1 + flutter_local_notifications: ^17.1.2 + device_info_plus: ^9.1.2 + battery_plus: ^6.0.1 + workmanager: ^0.5.2 digit_firebase_services: ^0.0.1 - package_info_plus: ^5.0.1 + package_info_plus: ^8.0.0 expandable: ^5.0.1 - flutter_svg: ^2.0.8 + flutter_svg: ^2.0.10+1 digit_showcase: ^1.0.0 - audioplayers: ^5.2.0 - gs1_barcode_parser: ^1.0.5 qr_flutter: ^4.1.0 - disk_space: ^0.2.1 - google_mlkit_barcode_scanning: ^0.10.0 - camera: ^0.10.5+7 - attendance_management: ^1.0.2+4 - digit_scanner: ^1.0.3+1 - inventory_management: ^1.0.3+4 - referral_reconciliation: ^1.0.2+2 - digit_data_model: ^1.0.5-dev.1 - registration_delivery: ^1.0.3+2 + disk_space_update: ^0.0.2 + sync_service: ^0.0.1-dev.1 + attendance_management: ^1.0.3 + digit_scanner: ^1.0.4 + inventory_management: ^1.0.4 + referral_reconciliation: ^1.0.3 + digit_data_model: ^1.0.5 + registration_delivery: ^1.0.5+2 disable_battery_optimization: ^1.1.1 - digit_dss: ^1.0.1 - closed_household: ^1.0.1+1 - digit_location_tracker: ^0.0.1-dev.1 + digit_dss: ^1.0.3 + closed_household: ^1.0.3 + digit_location_tracker: ^1.0.0 permission_handler: ^11.3.1 - survey_form: ^0.0.1-dev.2 - complaints: ^0.0.1-dev.2 + survey_form: ^1.0.0 + complaints: ^1.0.0 dev_dependencies: flutter_test: sdk: flutter integration_test: sdk: flutter - flutter_lints: ^3.0.1 - freezed: ^2.1.0+1 - build_runner: ^2.4.7 - json_serializable: ^6.4.0 - drift_dev: ^2.14.1 - auto_route_generator: ^7.3.2 + flutter_lints: ^4.0.0 + freezed: ^2.5.2 + build_runner: ^2.4.11 + json_serializable: ^6.8.0 + drift_dev: ^2.18.0 + auto_route_generator: ^8.0.0 bloc_test: ^9.1.0 mocktail: ^1.0.2 - dart_mappable_builder: - git: - url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master - path: ./packages/dart_mappable_builder - isar_generator: ^3.0.5 + dart_mappable_builder: ^4.2.2 + isar_generator: ^3.1.0+1 flutter_launcher_icons: ^0.13.1 hrk_flutter_test_batteries: ^0.8.0 -dependency_overrides: - intl: ^0.18.0 - flutter_icons: android: 'ic_launcher' ios: true diff --git a/mason_templates/digit_entity/hooks/lib/models.mapper.dart b/mason_templates/digit_entity/hooks/lib/models.mapper.dart index 8d504b44e..fd19a57f5 100644 --- a/mason_templates/digit_entity/hooks/lib/models.mapper.dart +++ b/mason_templates/digit_entity/hooks/lib/models.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'models.dart'; @@ -135,10 +135,8 @@ mixin ConfigModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ConfigModelMapper.ensureInitialized() - .isValueEqual(this as ConfigModel, other)); + return ConfigModelMapper.ensureInitialized() + .equalsValue(this as ConfigModel, other); } @override @@ -356,10 +354,8 @@ mixin EnumValuesMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - EnumValuesMapper.ensureInitialized() - .isValueEqual(this as EnumValues, other)); + return EnumValuesMapper.ensureInitialized() + .equalsValue(this as EnumValues, other); } @override @@ -528,10 +524,8 @@ mixin AttributeModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributeModelMapper.ensureInitialized() - .isValueEqual(this as AttributeModel, other)); + return AttributeModelMapper.ensureInitialized() + .equalsValue(this as AttributeModel, other); } @override @@ -719,10 +713,8 @@ mixin TableReferenceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TableReferenceModelMapper.ensureInitialized() - .isValueEqual(this as TableReferenceModel, other)); + return TableReferenceModelMapper.ensureInitialized() + .equalsValue(this as TableReferenceModel, other); } @override diff --git a/mason_templates/digit_entity/hooks/pubspec.lock b/mason_templates/digit_entity/hooks/pubspec.lock index eb6d23478..336b23c54 100644 --- a/mason_templates/digit_entity/hooks/pubspec.lock +++ b/mason_templates/digit_entity/hooks/pubspec.lock @@ -93,10 +93,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "220ae4553e50d7c21a17c051afc7b183d28a24a420502e842f303f8e4e6edced" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -173,17 +173,17 @@ packages: dependency: "direct main" description: name: dart_mappable - sha256: "7b6d38ae95f1ae8ffa65df9a5464f14b56c2de94699a035202ca4cd3a0ba249e" + sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.2.2" dart_mappable_builder: dependency: "direct dev" description: path: "../../../packages/dart_mappable_builder" relative: true source: path - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -284,10 +284,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "4.0.0" logging: dependency: transitive description: @@ -364,10 +364,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pointycastle: dependency: transitive description: @@ -548,10 +548,10 @@ packages: dependency: transitive description: name: type_plus - sha256: "2e33cfac2e129297d5874567bdf7587502ec359881e9318551e014d91b02f84a" + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" typed_data: dependency: transitive description: @@ -601,4 +601,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/mason_templates/digit_entity/hooks/pubspec.yaml b/mason_templates/digit_entity/hooks/pubspec.yaml index 26db869d1..159b35c54 100644 --- a/mason_templates/digit_entity/hooks/pubspec.yaml +++ b/mason_templates/digit_entity/hooks/pubspec.yaml @@ -6,14 +6,14 @@ environment: sdk: '>=3.0.0 <=4.0.0' dev_dependencies: - build_runner: ^2.3.3 + build_runner: ^2.4.11 dart_mappable_builder: path: ../../../packages/dart_mappable_builder - lints: ^2.0.0 + lints: ^4.0.0 test: ^1.16.0 dependencies: collection: ^1.17.0 - dart_mappable: ^4.2.0 + dart_mappable: ^4.2.2 mason: any - path: ^1.8.3 + path: ^1.9.0 recase: ^4.1.0 diff --git a/mason_templates/freezed_bloc/hooks/pubspec.lock b/mason_templates/freezed_bloc/hooks/pubspec.lock index 13b67253e..c65f972de 100644 --- a/mason_templates/freezed_bloc/hooks/pubspec.lock +++ b/mason_templates/freezed_bloc/hooks/pubspec.lock @@ -85,10 +85,10 @@ packages: dependency: "direct main" description: name: build_runner - sha256: "220ae4553e50d7c21a17c051afc7b183d28a24a420502e842f303f8e4e6edced" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -474,4 +474,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/mason_templates/freezed_bloc/hooks/pubspec.yaml b/mason_templates/freezed_bloc/hooks/pubspec.yaml index 36a6f8093..f1cd2fc92 100644 --- a/mason_templates/freezed_bloc/hooks/pubspec.yaml +++ b/mason_templates/freezed_bloc/hooks/pubspec.yaml @@ -6,4 +6,4 @@ environment: dependencies: mason: any recase: ^4.1.0 - build_runner: ^2.2.1 + build_runner: ^2.4.11 diff --git a/melos.yaml b/melos.yaml index 7e89a33b8..b2010b918 100644 --- a/melos.yaml +++ b/melos.yaml @@ -14,15 +14,15 @@ command: post: melos generate scripts: - generate: - description: Generate code for all packages. - run: melos run generate-flutter --no-select && melos run generate-dart --no-select + description: Generate code for all packages (Flutter and Dart). + run: | + melos run generate-flutter --no-select & exec: - concurrency: 1 + concurrency: 2 generate-flutter: - description: Generate code for all flutter packages. + description: Generate code for all Flutter packages. run: flutter packages run build_runner build --delete-conflicting-outputs exec: concurrency: 1 @@ -31,17 +31,6 @@ scripts: dependsOn: - build_runner - generate-dart: - description: Generate code for all packages. - run: dart run build_runner build --delete-conflicting-outputs - exec: - concurrency: 1 - packageFilters: - dart: true - flutter: false - dependsOn: - - build_runner - generate-hooks: description: Generate hooks for all packages. run: dart run build_runner build --delete-conflicting-outputs @@ -80,7 +69,7 @@ scripts: description: Run all Flutter tests in this project. run: melos run test --no-select exec: - concurrency: 1 + concurrency: 2 packageFilters: flutter: true dirExists: test @@ -100,4 +89,3 @@ scripts: concurrency: 1 packageFilters: dart: true - diff --git a/packages/attendance_management/CHANGELOG.md b/packages/attendance_management/CHANGELOG.md index 3f8c6380a..3eba96001 100644 --- a/packages/attendance_management/CHANGELOG.md +++ b/packages/attendance_management/CHANGELOG.md @@ -1,32 +1,38 @@ -## 1.0.3-dev.1 +## 1.0.3 + * Updated digit_data_model to latest version -* Updated survey_form to latest version +* Updated flutter version to 3.22 * Migrated to digit_ui_components ## 1.0.2+4 + * Fix for boundaryCode in attendance logs ## 1.0.2+3 + * Updated Attendance Singleton to add boundary ## 1.0.2+2 + * Updated digit_components, digit_data_model * Added boundaryCode to additionalDetails of attendanceLogs ## 1.0.2+1 + * Updated Digit_components ## 1.0.2 + * Capturing location on attendance submit * Pagination issue fix to fetch all attendees ## 0.0.0-dev.1 -* Initial release of the package +* Initial release of the package * Features: - - Manage Attendance: Mark attendance of the employees and send the data to parent application. - - Select Session: Select the session for which the attendance is to be marked. - - Mark Attendance: Mark the attendance of the employees. + - Manage Attendance: Mark attendance of the employees and send the data to parent application. + - Select Session: Select the session for which the attendance is to be marked. + - Mark Attendance: Mark the attendance of the employees. ## 0.0.0-dev.2 @@ -36,7 +42,6 @@ * Updated intl package version - ## 0.0.0-dev.4 * Updated digit_components version for dropdown fix @@ -62,10 +67,13 @@ * Added try catch for local repository to handle db lock ## 1.0.1+1 + * Get Precise location on Submitting latitude longitude details ## 1.0.2-dev.1 + * Removed captured Location Dialog on attendance submit ## 1.0.2-dev.2 + * Updated registers search to fetch all attendees to avoid limit on overall query \ No newline at end of file diff --git a/packages/attendance_management/lib/blocs/attendance_bloc.dart b/packages/attendance_management/lib/blocs/attendance_bloc.dart index 9c4766635..dee2199b7 100644 --- a/packages/attendance_management/lib/blocs/attendance_bloc.dart +++ b/packages/attendance_management/lib/blocs/attendance_bloc.dart @@ -6,7 +6,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import '../utils/typedefs.dart'; -import '../utils/utils.dart'; // Part of the code generated by Freezed for immutable classes part 'attendance_bloc.freezed.dart'; @@ -84,7 +83,7 @@ class AttendanceBloc extends Bloc { emit(const RegisterLoading()); // Finding and emitting the selected register based on ID final selectedRegister = - await event.registers.where((e) => e.id == event.registerID).first; + event.registers.where((e) => e.id == event.registerID).first; emit(SelectedRegisterLoaded( selectedRegister: selectedRegister, )); diff --git a/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart b/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart index 049d06088..a1678f173 100644 --- a/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart +++ b/packages/attendance_management/lib/blocs/attendance_individual_bloc.dart @@ -82,9 +82,7 @@ class AttendanceIndividualBloc checkResponse(filteredLogs ?? [], attendees, event); } catch (ex) { - String? error = ex as String; - - emit(AttendanceIndividualState.error(error)); + emit(AttendanceIndividualState.error(ex.toString())); } } @@ -176,7 +174,10 @@ class AttendanceIndividualBloc "latitude": event.latitude, "longitude": event.longitude, } - : null), + : { + EnumValues.boundaryCode.toValue(): + AttendanceSingleton().boundary?.code, + }), AttendanceLogModel( individualId: e.individualId, registerId: e.registerId, @@ -196,11 +197,13 @@ class AttendanceIndividualBloc ? { EnumValues.latitude.toValue(): event.latitude, EnumValues.longitude.toValue(): event.longitude, - EnumValues.boundaryCode.toValue(): AttendanceSingleton().boundary?.code, + EnumValues.boundaryCode.toValue(): + AttendanceSingleton().boundary?.code, } : { - EnumValues.boundaryCode.toValue(): AttendanceSingleton().boundary?.code, - }) + EnumValues.boundaryCode.toValue(): + AttendanceSingleton().boundary?.code, + }) ]); } }); @@ -406,6 +409,7 @@ class AttendanceIndividualEvent with _$AttendanceIndividualEvent { required int limit, @Default(false) bool isSingleSession, }) = AttendanceIndividualLogSearchEvent; + // Event for marking individual attendance const factory AttendanceIndividualEvent.individualAttendanceMark({ @Default(0) int entryTime, @@ -415,6 +419,7 @@ class AttendanceIndividualEvent with _$AttendanceIndividualEvent { required String individualId, required String registerId, }) = AttendanceMarkEvent; + // Event for saving attendance as draft const factory AttendanceIndividualEvent.saveAsDraft({ required int entryTime, @@ -436,10 +441,13 @@ class AttendanceIndividualEvent with _$AttendanceIndividualEvent { @freezed class AttendanceIndividualState with _$AttendanceIndividualState { const AttendanceIndividualState._(); + // Initial state const factory AttendanceIndividualState.initial() = _Initial; + // Loading state const factory AttendanceIndividualState.loading() = _Loading; + // Loaded state with attendance data factory AttendanceIndividualState.loaded({ List? attendanceSearchModelList, @@ -450,6 +458,7 @@ class AttendanceIndividualState with _$AttendanceIndividualState { @Default(10) int limitData, @Default(false) bool viewOnly, }) = _AttendanceRowModelLoaded; + // Error state const factory AttendanceIndividualState.error(String? error) = _Error; } diff --git a/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart b/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart index bb334b754..0b3a67bd3 100644 --- a/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart +++ b/packages/attendance_management/lib/data/repositories/remote/attendance_logs.dart @@ -7,7 +7,6 @@ import 'package:attendance_management/attendance_management.dart'; import 'package:digit_data_model/utils/constants.dart'; import 'package:dio/dio.dart'; -import '../../../utils/utils.dart'; class AttendanceLogRemoteRepository extends RemoteRepository { diff --git a/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart b/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart index 260df0672..917603e03 100644 --- a/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart +++ b/packages/attendance_management/lib/data/repositories/remote/attendance_register.dart @@ -7,7 +7,6 @@ import 'package:attendance_management/attendance_management.dart'; import 'package:digit_data_model/utils/constants.dart'; import 'package:dio/dio.dart'; -import '../../../utils/utils.dart'; class AttendanceRemoteRepository extends RemoteRepository< AttendanceRegisterModel, AttendanceRegisterSearchModel> { diff --git a/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart b/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart index 8b69af9a6..adda2fee0 100644 --- a/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart +++ b/packages/attendance_management/lib/models/entities/attendance_log.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attendance_log.dart'; @@ -149,10 +149,8 @@ mixin AttendanceLogSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceLogSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceLogSearchModel, other)); + return AttendanceLogSearchModelMapper.ensureInitialized() + .equalsValue(this as AttendanceLogSearchModel, other); } @override @@ -416,10 +414,8 @@ mixin AttendanceLogModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceLogModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceLogModel, other)); + return AttendanceLogModelMapper.ensureInitialized() + .equalsValue(this as AttendanceLogModel, other); } @override diff --git a/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart b/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart index 53331fead..ef49e4603 100644 --- a/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart +++ b/packages/attendance_management/lib/models/entities/attendance_register.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attendance_register.dart'; @@ -140,10 +140,8 @@ mixin AttendanceRegisterSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceRegisterSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceRegisterSearchModel, other)); + return AttendanceRegisterSearchModelMapper.ensureInitialized() + .equalsValue(this as AttendanceRegisterSearchModel, other); } @override @@ -414,10 +412,8 @@ mixin AttendanceRegisterModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendanceRegisterModelMapper.ensureInitialized() - .isValueEqual(this as AttendanceRegisterModel, other)); + return AttendanceRegisterModelMapper.ensureInitialized() + .equalsValue(this as AttendanceRegisterModel, other); } @override diff --git a/packages/attendance_management/lib/models/entities/attendee.mapper.dart b/packages/attendance_management/lib/models/entities/attendee.mapper.dart index c4f7680a5..49bd9c081 100644 --- a/packages/attendance_management/lib/models/entities/attendee.mapper.dart +++ b/packages/attendance_management/lib/models/entities/attendee.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attendee.dart'; @@ -92,10 +92,8 @@ mixin AttendeeSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendeeSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttendeeSearchModel, other)); + return AttendeeSearchModelMapper.ensureInitialized() + .equalsValue(this as AttendeeSearchModel, other); } @override @@ -295,10 +293,8 @@ mixin AttendeeModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendeeModelMapper.ensureInitialized() - .isValueEqual(this as AttendeeModel, other)); + return AttendeeModelMapper.ensureInitialized() + .equalsValue(this as AttendeeModel, other); } @override @@ -509,10 +505,8 @@ mixin AttendeeAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttendeeAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as AttendeeAdditionalFields, other)); + return AttendeeAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as AttendeeAdditionalFields, other); } @override diff --git a/packages/attendance_management/lib/models/entities/enum_values.mapper.dart b/packages/attendance_management/lib/models/entities/enum_values.mapper.dart index b553a3b88..314ca9539 100644 --- a/packages/attendance_management/lib/models/entities/enum_values.mapper.dart +++ b/packages/attendance_management/lib/models/entities/enum_values.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'enum_values.dart'; diff --git a/packages/attendance_management/lib/models/entities/register_status.mapper.dart b/packages/attendance_management/lib/models/entities/register_status.mapper.dart index 159b11caf..476d9bfd6 100644 --- a/packages/attendance_management/lib/models/entities/register_status.mapper.dart +++ b/packages/attendance_management/lib/models/entities/register_status.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'register_status.dart'; diff --git a/packages/attendance_management/lib/models/entities/staff.mapper.dart b/packages/attendance_management/lib/models/entities/staff.mapper.dart index 299ed1d01..134b80c4b 100644 --- a/packages/attendance_management/lib/models/entities/staff.mapper.dart +++ b/packages/attendance_management/lib/models/entities/staff.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'staff.dart'; @@ -97,10 +97,8 @@ mixin StaffSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StaffSearchModelMapper.ensureInitialized() - .isValueEqual(this as StaffSearchModel, other)); + return StaffSearchModelMapper.ensureInitialized() + .equalsValue(this as StaffSearchModel, other); } @override @@ -290,10 +288,8 @@ mixin StaffModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StaffModelMapper.ensureInitialized() - .isValueEqual(this as StaffModel, other)); + return StaffModelMapper.ensureInitialized() + .equalsValue(this as StaffModel, other); } @override @@ -492,10 +488,8 @@ mixin StaffAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StaffAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as StaffAdditionalFields, other)); + return StaffAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as StaffAdditionalFields, other); } @override diff --git a/packages/attendance_management/lib/pages/manage_attendance.dart b/packages/attendance_management/lib/pages/manage_attendance.dart index c70a48f86..59f6975be 100644 --- a/packages/attendance_management/lib/pages/manage_attendance.dart +++ b/packages/attendance_management/lib/pages/manage_attendance.dart @@ -7,6 +7,7 @@ import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -90,13 +91,13 @@ class _ManageAttendancePageState extends State { register.attendees?.length ?? 0, localization.translate(i18.attendance.startDateLabel): register.startDate != null - ? AttendanceDateTimeManagement.getDateFromTimestamp( - register.startDate!) + ? AttendanceDateTimeManagement + .getDateFromTimestamp(register.startDate!) : localization.translate(i18.common.coreCommonNA), localization.translate(i18.attendance.endDateLabel): register.endDate != null - ? AttendanceDateTimeManagement.getDateFromTimestamp( - register.endDate!) + ? AttendanceDateTimeManagement + .getDateFromTimestamp(register.endDate!) : localization.translate(i18.common.coreCommonNA), localization.translate(i18.attendance.statusLabel): register.endDate != null && @@ -174,7 +175,8 @@ class _ManageAttendancePageState extends State { children: [ Padding( padding: - EdgeInsets.all(theme.spacerTheme.spacer2).copyWith( + EdgeInsets.all(theme.spacerTheme.spacer2) + .copyWith( top: 2, left: theme.spacerTheme.spacer2 * 2, ), @@ -197,8 +199,8 @@ class _ManageAttendancePageState extends State { ...list, if (list.length > 1) PoweredByDigit( - version: AttendanceSingleton() - .appVersion), // Show here if more than one register + version: AttendanceSingleton().appVersion), + // Show here if more than one register ], ), registerLoading: () => const Center( @@ -270,53 +272,52 @@ class RegisterCard extends StatelessWidget { var localization = AttendanceLocalization.of(context); return DigitCard( - padding: EdgeInsets.all(theme.spacerTheme.spacer2), - margin: EdgeInsets.all(theme.spacerTheme.spacer2), - children: [ - LabelValueList( - labelFlex: theme.spacerTheme.spacer3.toInt(), - padding: EdgeInsets.all(theme.spacerTheme.spacer3), - items: data.keys.map((e) { - return LabelValuePair(label: e, value: data[e]?.toString() ?? ''); - }).toList(), - ), - show - ? Button( - size: ButtonSize.large, - type: ButtonType.primary, - mainAxisSize: MainAxisSize.max, - label: - AttendanceLocalization.of(context) + padding: EdgeInsets.all(theme.spacerTheme.spacer2), + margin: EdgeInsets.all(theme.spacerTheme.spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.all(theme.spacerTheme.spacer3), + items: data.keys.map((e) { + return LabelValueItem( + label: e, labelFlex: 5, value: data[e]?.toString() ?? ''); + }).toList(), + ), + show + ? DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: AttendanceLocalization.of(context) .translate(i18.attendance.openRegister), - onPressed: () async { - if (noOfAttendees == 0) { - Toast.showToast( - context, - message: localization.translate( - i18.attendance.noAttendeesEnrolledMessage), - type: ToastType.error, - ); - } else if (startDate != null && - startDate!.millisecondsSinceEpoch > - DateTime.now().millisecondsSinceEpoch) { - Toast.showToast( - context, - message: localization - .translate(i18.attendance.registerNotStarted), - type: ToastType.error, - ); - } else { - await context.router.push( - AttendanceDateSessionSelectionRoute( - registers: registers, - registerID: registerId, - ), - ); - attendanceBloc.add(const AttendanceEvents.initial()); - } - }, - ) - : const Offstage(),] - ); + onPressed: () async { + if (noOfAttendees == 0) { + Toast.showToast( + context, + message: localization.translate( + i18.attendance.noAttendeesEnrolledMessage), + type: ToastType.error, + ); + } else if (startDate != null && + startDate!.millisecondsSinceEpoch > + DateTime.now().millisecondsSinceEpoch) { + Toast.showToast( + context, + message: localization + .translate(i18.attendance.registerNotStarted), + type: ToastType.error, + ); + } else { + await context.router.push( + AttendanceDateSessionSelectionRoute( + registers: registers, + registerID: registerId, + ), + ); + attendanceBloc.add(const AttendanceEvents.initial()); + } + }, + ) + : const Offstage(), + ]); } } diff --git a/packages/attendance_management/lib/pages/mark_attendance.dart b/packages/attendance_management/lib/pages/mark_attendance.dart index 48f8a2ee3..22c34b733 100644 --- a/packages/attendance_management/lib/pages/mark_attendance.dart +++ b/packages/attendance_management/lib/pages/mark_attendance.dart @@ -3,18 +3,18 @@ import 'dart:async'; import 'package:attendance_management/attendance_management.dart'; import 'package:attendance_management/utils/extensions/extensions.dart'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_ui_components/widgets/atoms/digit_loader.dart'; -import 'package:digit_ui_components/widgets/molecules/digit_table.dart' - as table; import 'package:digit_data_model/data/data_repository.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/component_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_loader.dart'; import 'package:digit_ui_components/widgets/atoms/digit_search_bar.dart'; import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart' + as table; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; @@ -156,15 +156,16 @@ class _MarkAttendancePageState extends State { attendanceCollectionModel!, viewOnly); return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, footer: viewOnly ? const SizedBox.shrink() : DigitCard( - margin: EdgeInsets.only(top: theme.spacerTheme.spacer4), + margin: EdgeInsets.only( + top: theme.spacerTheme.spacer4), children: [ - Button( - size: ButtonSize.large, - type: ButtonType.secondary, + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, mainAxisSize: MainAxisSize.max, onPressed: () { checkIfAllAttendeesMarked( @@ -183,9 +184,9 @@ class _MarkAttendancePageState extends State { .saveAndMarkLaterLabel, ), ), - Button( - size: ButtonSize.large, - type: ButtonType.primary, + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, mainAxisSize: MainAxisSize.max, onPressed: !viewOnly ? () { @@ -199,8 +200,7 @@ class _MarkAttendancePageState extends State { context, ); } - : () { - }, + : () {}, label: localizations.translate( (!viewOnly) ? i18.common.coreCommonSubmit @@ -268,6 +268,7 @@ class _MarkAttendancePageState extends State { children: [ tableData.isNotEmpty ? table.DigitTable( + showSelectedState: false, tableHeight: viewOnly ? MediaQuery.of(context) .size @@ -301,8 +302,7 @@ class _MarkAttendancePageState extends State { }, loading: () { return Center( - child: - DigitLoaders.circularLoader(context: context), + child: DigitLoaders.inlineLoader(), ); }, ); @@ -409,9 +409,9 @@ class _MarkAttendancePageState extends State { SizedBox( width: 100, height: 40, - child: Button( - size: ButtonSize.large, - type: ButtonType.primary, + child: DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, mainAxisSize: MainAxisSize.max, label: k.translate( i18.attendance.closeButton, @@ -496,12 +496,12 @@ class _MarkAttendancePageState extends State { description: '${localizations.translate(i18.attendance.confirmationDesc)} \n\n${localizations.translate(i18.attendance.confirmationDescNote)}', actions: [ - Button( + DigitButton( label: localizations.translate( i18.attendance.proceed, ), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, onPressed: () { individualLogBloc?.add(SaveAsDraftEvent( entryTime: widget.entryTime, @@ -519,11 +519,11 @@ class _MarkAttendancePageState extends State { navigateToAcknowledgement(localizations); }, ), - Button( + DigitButton( label: localizations .translate(i18.common.coreCommonGoback), - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, onPressed: () { Navigator.of( context, diff --git a/packages/attendance_management/lib/pages/session_select.dart b/packages/attendance_management/lib/pages/session_select.dart index d1f897825..a79de6369 100644 --- a/packages/attendance_management/lib/pages/session_select.dart +++ b/packages/attendance_management/lib/pages/session_select.dart @@ -3,6 +3,7 @@ import 'package:attendance_management/utils/extensions/extensions.dart'; import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; @@ -98,260 +99,275 @@ class _AttendanceDateSessionSelectionPageState showHelp: true, showLogoutCTA: false, ), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - padding: EdgeInsets.all( - theme.spacerTheme.spacer2), + padding: + EdgeInsets.all(theme.spacerTheme.spacer2), children: [ - ReactiveValueListenableBuilder( - formControlName: _dateOfSession, - builder: (context, value, _) { - return Button( - size: ButtonSize.large, - type: ButtonType.primary, - mainAxisSize: MainAxisSize.max, - label: localizations.translate( - isAttendanceCompleted( - value.value as DateTime) - ? i18.attendance.viewAttendance - : i18.attendance.markAttendance, - ), - onPressed: () async { - form.markAllAsTouched(); - if (selectedRegister - .additionalDetails?[ - EnumValues.sessions - .toValue()] == - 2 && - form - .control(_sessionRadio) - .value == - null) { - form - .control(_sessionRadio) - .setErrors({'': true}); + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + label: localizations.translate( + isAttendanceCompleted(form + .control(_dateOfSession) + .value as DateTime) + ? i18.attendance.viewAttendance + : i18.attendance.markAttendance, + ), + onPressed: () async { + form.markAllAsTouched(); + if (selectedRegister.additionalDetails?[ + EnumValues.sessions + .toValue()] == + 2 && + form.control(_sessionRadio).value == + null) { + form + .control(_sessionRadio) + .setErrors({'': true}); - form.control(_sessionRadio).setValidators([Validators.required]); + form + .control(_sessionRadio) + .setValidators( + [Validators.required]); - // Ensure form control is updated after changing validators - form.control(_sessionRadio).updateValueAndValidity(); - } else { - if (!form.valid) { - return; - } else { - final session = form - .control(_sessionRadio) - .value; - DateTime dateSession = form - .control(_dateOfSession) - .value; + // Ensure form control is updated after changing validators + form + .control(_sessionRadio) + .updateValueAndValidity(); + } else { + if (!form.valid) { + return; + } else { + final session = form + .control(_sessionRadio) + .value; + DateTime dateSession = form + .control(_dateOfSession) + .value; - final entryTime = selectedRegister - .additionalDetails?[ - EnumValues.sessions - .toValue()] == - 2 - ? AttendanceDateTimeManagement - .getMillisecondEpoch( - dateSession, - form - .control( - _sessionRadio) - .value != - null - ? int.parse(form + final entryTime = selectedRegister + .additionalDetails?[ + EnumValues.sessions + .toValue()] == + 2 + ? AttendanceDateTimeManagement + .getMillisecondEpoch( + dateSession, + form .control( _sessionRadio) - .value) - : 0, - "entryTime", - ) - : (DateTime( - dateSession.year, - dateSession.month, - dateSession.day, - 9) - .millisecondsSinceEpoch); + .value != + null + ? int.parse(form + .control( + _sessionRadio) + .value) + : 0, + "entryTime", + ) + : (DateTime( + dateSession.year, + dateSession.month, + dateSession.day, + 9) + .millisecondsSinceEpoch); - final exitTime = selectedRegister - .additionalDetails?[ - EnumValues.sessions - .toValue()] == - 2 - ? AttendanceDateTimeManagement - .getMillisecondEpoch( - dateSession, - form - .control( - _sessionRadio) - .value != - null - ? int.parse(form + final exitTime = selectedRegister + .additionalDetails?[ + EnumValues.sessions + .toValue()] == + 2 + ? AttendanceDateTimeManagement + .getMillisecondEpoch( + dateSession, + form .control( _sessionRadio) - .value) - : 1, - "exitTime", - ) - : (DateTime( - dateSession.year, - dateSession.month, - dateSession.day, - 18) - .millisecondsSinceEpoch); - - final submit = - await context.router.push( - MarkAttendanceRoute( - attendees: selectedRegister - .attendees != + .value != null - //Filtering attendees based on current time and enrollment date of the attendee - ? (selectedRegister - .attendees ?? - []) - .where((att) => - att.enrollmentDate != - null && - att.enrollmentDate! <= - entryTime) - .toList() - : [], - dateTime: dateSession, - session: session != null ? int.parse(session) : null, - entryTime: entryTime, - exitTime: exitTime, - registerId: - selectedRegister.id, - tenantId: selectedRegister - .tenantId - .toString(), - ), - ); - if (submit == null) { - form - .control(_sessionRadio) - .value = null; - } - } + ? int.parse(form + .control( + _sessionRadio) + .value) + : 1, + "exitTime", + ) + : (DateTime( + dateSession.year, + dateSession.month, + dateSession.day, + 18) + .millisecondsSinceEpoch); + + final submit = + await context.router.push( + MarkAttendanceRoute( + attendees: selectedRegister + .attendees != + null + //Filtering attendees based on current time and enrollment date of the attendee + ? (selectedRegister + .attendees ?? + []) + .where((att) => + att.enrollmentDate != + null && + att.enrollmentDate! <= + entryTime) + .toList() + : [], + dateTime: dateSession, + session: session != null + ? int.parse(session) + : null, + entryTime: entryTime, + exitTime: exitTime, + registerId: selectedRegister.id, + tenantId: selectedRegister + .tenantId + .toString(), + ), + ); + if (submit == null) { + form + .control(_sessionRadio) + .value = null; } - }, - ); - })] - ), + } + } + }, + ) + ]), children: [ - DigitCard( - children: [ - Text( - localizations.translate( - i18.attendance.selectSession, - ), - style: DigitTheme.instance.mobileTheme - .textTheme.displayMedium, - ), - ReactiveWrapperField( - formControlName: _dateOfSession, - builder: (field){ - return LabeledField( - label: localizations.translate( - i18.attendance.dateOfSession, - ), - child: DigitDateFormInput( - onChange: (val) => { - form.control(_dateOfSession).markAsTouched(), - form.control(_dateOfSession).value = AttendanceDateTimeManagement.getFormattedDateToDateTime(val), - }, - initialValue: AttendanceDateTimeManagement.getDateString(form.control(_dateOfSession).value), - firstDate: selectedRegister.startDate != - null - ? DateTime - .fromMillisecondsSinceEpoch( - selectedRegister.startDate!) - : null, - lastDate: selectedRegister.endDate != null - ? selectedRegister.endDate! < - DateTime.now() - .millisecondsSinceEpoch - ? DateTime - .fromMillisecondsSinceEpoch( - selectedRegister - .endDate!) - : DateTime.now() - : null, - cancelText: localizations.translate( - i18.common.coreCommonCancel), - confirmText: localizations - .translate(i18.common.coreCommonOk), - ), - );} + DigitCard(children: [ + Text( + localizations.translate( + i18.attendance.selectSession, ), - - if (selectedRegister.additionalDetails?[ - EnumValues.sessions.toValue()] == - 2) - ReactiveWrapperField( - formControlName: _sessionRadio, - validationMessages: { - 'required': (_) => + style: DigitTheme.instance.mobileTheme + .textTheme.displayMedium, + ), + ReactiveWrapperField( + formControlName: _dateOfSession, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.attendance.dateOfSession, + ), + child: DigitDateFormInput( + onChange: (val) => { + form + .control(_dateOfSession) + .markAsTouched(), + form + .control(_dateOfSession) + .value = + AttendanceDateTimeManagement + .getFormattedDateToDateTime( + val), + }, + initialValue: + AttendanceDateTimeManagement + .getDateString(form + .control(_dateOfSession) + .value), + firstDate: selectedRegister + .startDate != + null + ? DateTime + .fromMillisecondsSinceEpoch( + selectedRegister + .startDate!) + : null, + lastDate: selectedRegister + .endDate != + null + ? selectedRegister.endDate! < + DateTime.now() + .millisecondsSinceEpoch + ? DateTime + .fromMillisecondsSinceEpoch( + selectedRegister + .endDate!) + : DateTime.now() + : null, + cancelText: localizations.translate( + i18.common.coreCommonCancel), + confirmText: localizations.translate( - i18.attendance.plzSelectSession), - }, - showErrors: (control) => control.invalid && - control.touched, - // Ensures error is shown if invalid and touched - builder: (field) { - return LabeledField( - isRequired: true, - label: localizations.translate(i18 - .attendance.sessionDescForRadio), - child: RadioList( - onChanged: (val) { - form - .control( - _sessionRadio) - .markAsTouched(); - form - .control( - _sessionRadio) - .value = val.code; - }, - groupValue: form - .control( - _sessionRadio) - .value ?? "", - errorMessage: field.errorText, - radioButtons:[ - RadioButtonModel( - code: "0", - name: localizations - .translate(i18.attendance.morningSession,) - ), - RadioButtonModel( - code: "1", - name: localizations - .translate(i18.attendance.eveningSession,) - ) - ] - ), - ); - }), - ] - ), + i18.common.coreCommonOk), + ), + ); + }), + if (selectedRegister.additionalDetails?[ + EnumValues.sessions.toValue()] == + 2) + ReactiveWrapperField( + formControlName: _sessionRadio, + validationMessages: { + 'required': (_) => + localizations.translate(i18 + .attendance.plzSelectSession), + }, + showErrors: (control) => + control.invalid && control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate(i18 + .attendance + .sessionDescForRadio), + child: RadioList( + onChanged: (val) { + form + .control(_sessionRadio) + .markAsTouched(); + form + .control(_sessionRadio) + .value = val.code; + }, + groupValue: form + .control(_sessionRadio) + .value ?? + "", + errorMessage: field.errorText, + radioDigitButtons: [ + RadioButtonModel( + code: "0", + name: localizations + .translate( + i18.attendance + .morningSession, + )), + RadioButtonModel( + code: "1", + name: localizations + .translate( + i18.attendance + .eveningSession, + )) + ]), + ); + }), + ]), if (showInfoCard( selectedRegister, DateTime.now(), )) - DigitCard( - children: [InfoCard( + DigitCard(children: [ + InfoCard( title: localizations.translate( - i18.attendance.missedAttendanceHeader, + i18.attendance.missedAttendanceHeader, ), type: InfoType.info, description: localizations.translate( getMissedDays(context), ), - ),] - ) + ), + ]) else const SizedBox(), ], @@ -366,10 +382,7 @@ class _AttendanceDateSessionSelectionPageState return fb.group({ _dateOfSession: FormControl(value: DateTime.now(), validators: []), - _sessionRadio: FormControl( - value: null, - validators: [] - ), + _sessionRadio: FormControl(value: null, validators: []), }); } @@ -412,11 +425,13 @@ class _AttendanceDateSessionSelectionPageState if ((register.attendanceLog ?? []).isNotEmpty) { final selectDateCompleted = register.attendanceLog ?.where((l) => - AttendanceDateTimeManagement.getFilteredDate(l.keys.first.toString()) == - AttendanceDateTimeManagement.getFilteredDate(selectedDate.toString())) - .first - .values - .first; + AttendanceDateTimeManagement.getFilteredDate( + l.keys.first.toString()) == + AttendanceDateTimeManagement.getFilteredDate( + selectedDate.toString())) + .firstOrNull + ?.values + .firstOrNull; return selectDateCompleted; } diff --git a/packages/attendance_management/lib/router/attendance_router.dart b/packages/attendance_management/lib/router/attendance_router.dart index 25159dc22..941cf3044 100644 --- a/packages/attendance_management/lib/router/attendance_router.dart +++ b/packages/attendance_management/lib/router/attendance_router.dart @@ -4,26 +4,16 @@ import 'attendance_router.gm.dart'; @AutoRouterConfig.module() class AttendanceRoute extends $AttendanceRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ - AutoRoute( - page: MarkAttendanceRoute.page, - path: 'mark-attendance', - ), - AutoRoute( - page: ManageAttendanceRoute.page, - path: 'manage-attendance', - ), + AutoRoute(page: ManageAttendanceRoute.page), AutoRoute( page: AttendanceDateSessionSelectionRoute.page, - path: 'attendance-date-session-selection', ), AutoRoute( - page: AttendanceAcknowledgementRoute.page, - path: 'attendance-acknowledgement', + page: MarkAttendanceRoute.page, ), + AutoRoute(page: AttendanceAcknowledgementRoute.page), ]; } diff --git a/packages/attendance_management/lib/utils/date_util_attendance.dart b/packages/attendance_management/lib/utils/date_util_attendance.dart index 4707998b9..2473fecf7 100644 --- a/packages/attendance_management/lib/utils/date_util_attendance.dart +++ b/packages/attendance_management/lib/utils/date_util_attendance.dart @@ -39,7 +39,7 @@ class AttendanceDateTimeManagement { } static String getDateString(DateTime date) { - final DateFormat formatter = DateFormat('yyyy-MM-dd'); + final DateFormat formatter = DateFormat('dd/MM/yyyy'); return formatter.format(date); } diff --git a/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart b/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart index 2c70dd300..eb912631c 100644 --- a/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart +++ b/packages/attendance_management/lib/widgets/attendance_acknowledgement.dart @@ -19,7 +19,7 @@ class AttendanceAcknowledgementPage extends LocalizedStatefulWidget { final VoidCallback? secondaryAction; final String? secondaryLabel; - AttendanceAcknowledgementPage({ + const AttendanceAcknowledgementPage({ super.key, super.appLocalizations, required this.label, @@ -60,22 +60,20 @@ class _AttendanceAcknowledgementPageState i18.acknowledgementSuccess.acknowledgementDescriptionText, ), actions: [ - Button( + DigitButton( label: widget.actionLabel ?? '', - onPressed: widget.action ?? (){}, - type: ButtonType.primary, - size: ButtonSize.large, + onPressed: widget.action ?? () {}, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, ), - Button( - type: ButtonType.secondary, - size: ButtonSize.large, + DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, label: widget.secondaryLabel ?? '', - onPressed: widget.secondaryAction ?? (){}, + onPressed: widget.secondaryAction ?? () {}, ), - - ] - ), + ]), ], )); } diff --git a/packages/attendance_management/lib/widgets/back_navigation_help_header.dart b/packages/attendance_management/lib/widgets/back_navigation_help_header.dart index 886f6e828..3989fc620 100644 --- a/packages/attendance_management/lib/widgets/back_navigation_help_header.dart +++ b/packages/attendance_management/lib/widgets/back_navigation_help_header.dart @@ -35,7 +35,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorScheme.onSurface, padding: EdgeInsets.zero, ), onPressed: () { diff --git a/packages/attendance_management/pubspec.lock b/packages/attendance_management/pubspec.lock index de4b65da0..1ac5cfd25 100644 --- a/packages/attendance_management/pubspec.lock +++ b/packages/attendance_management/pubspec.lock @@ -61,18 +61,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -130,13 +130,13 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -165,26 +165,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -257,22 +257,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" - connectivity_plus: - dependency: "direct main" - description: - name: connectivity_plus - sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0" - url: "https://pub.dev" - source: hosted - version: "5.0.2" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a - url: "https://pub.dev" - source: hosted - version: "1.2.4" convert: dependency: transitive description: @@ -293,10 +277,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -325,11 +309,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -346,14 +330,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - dbus: - dependency: transitive - description: - name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" - url: "https://pub.dev" - source: hosted - version: "0.7.10" diff_match_patch: dependency: transitive description: @@ -362,29 +338,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: "direct main" - description: - path: "../digit_components" - relative: true - source: path - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "1.0.5" digit_ui_components: dependency: "direct main" description: name: digit_ui_components - sha256: e38f163515aa6a6c5283754e741b21f33fb3a6c0a1fc171a1e4e6620510d46ae + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "0.0.1+7" + version: "0.0.2-dev.4" dio: dependency: "direct main" description: @@ -413,10 +382,10 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -429,10 +398,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" fake_async: dependency: transitive description: @@ -542,62 +511,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.13" - flutter_keyboard_visibility: - dependency: transitive - description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" - url: "https://pub.dev" - source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: - dependency: transitive - description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: - dependency: transitive - description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: - dependency: transitive - description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: - dependency: transitive - description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: - dependency: transitive - description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.dev" - source: hosted - version: "1.0.0" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" flutter_localizations: dependency: transitive description: flutter @@ -640,14 +561,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -697,10 +610,10 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.3.1" + version: "4.6.1" geolocator_apple: dependency: transitive description: @@ -745,10 +658,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -777,10 +690,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -865,10 +778,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -917,38 +830,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" - lints: + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: "direct dev" description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -961,34 +898,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -1013,14 +950,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.dev" - source: hosted - version: "0.5.0" node_preamble: dependency: transitive description: @@ -1049,10 +978,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -1141,14 +1070,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -1181,22 +1102,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: transitive description: @@ -1282,6 +1195,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1302,10 +1223,10 @@ packages: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1350,26 +1271,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1462,10 +1383,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: @@ -1478,10 +1399,10 @@ packages: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: @@ -1526,10 +1447,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1542,10 +1463,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1595,5 +1516,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <=3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/attendance_management/pubspec.yaml b/packages/attendance_management/pubspec.yaml index c7f3736ea..be9f0307b 100644 --- a/packages/attendance_management/pubspec.yaml +++ b/packages/attendance_management/pubspec.yaml @@ -1,6 +1,6 @@ name: attendance_management description: Digit UI attendance management specification - This tool is designed for tracking user attendance with customizable session counts per day. -version: 1.0.3-dev.1 +version: 1.0.3 homepage: "https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/attendance_management" repository: "https://github.com/egovernments/health-campaign-field-worker-app" @@ -11,43 +11,43 @@ environment: dependencies: flutter: sdk: flutter - digit_ui_components: 0.0.1+7 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 path: ^1.8.2 drift_db_viewer: ^2.0.0 - auto_route: ^7.8.4 - digit_data_model: ^1.0.5-dev.1 - connectivity_plus: ^5.0.2 - collection: ^1.16.0 - location: ^5.0.0 - dio: ^5.1.2 + digit_data_model: ^1.0.5 + reactive_forms: ^17.0.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 + lints: ^4.0.0 json_serializable: ^6.4.0 - freezed: ^2.2.0 + freezed: ^2.5.2 bloc_test: ^9.1.0 mocktail: ^1.0.2 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - drift_dev: ^2.14.1 - auto_route_generator: ^7.3.2 + drift_dev: ^2.18.0 + build_runner: ^2.4.11 + auto_route_generator: 8.0.0 flutter: assets: diff --git a/packages/attendance_management/test/unit/search_attendee_by_name_test.dart b/packages/attendance_management/test/unit/search_attendee_by_name_test.dart index 5247ab06f..af8ff53c3 100644 --- a/packages/attendance_management/test/unit/search_attendee_by_name_test.dart +++ b/packages/attendance_management/test/unit/search_attendee_by_name_test.dart @@ -1,6 +1,5 @@ // Import necessary packages for testing. import 'package:attendance_management/data/repositories/local/attendance_logs.dart'; -import 'package:attendance_management/models/entities/attendee.dart'; import 'package:attendance_management/utils/typedefs.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:attendance_management/blocs/attendance_individual_bloc.dart'; diff --git a/packages/auto_route/pubspec.lock b/packages/auto_route/pubspec.lock deleted file mode 100644 index 0d28f4bc7..000000000 --- a/packages/auto_route/pubspec.lock +++ /dev/null @@ -1,541 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - args: - dependency: transitive - description: - name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" - url: "https://pub.dev" - source: hosted - version: "2.5.0" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - auto_route_generator: - dependency: "direct dev" - description: - name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" - url: "https://pub.dev" - source: hosted - version: "7.3.2" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - build_config: - dependency: transitive - description: - name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 - url: "https://pub.dev" - source: hosted - version: "1.1.1" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" - url: "https://pub.dev" - source: hosted - version: "4.0.1" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - build_runner: - dependency: "direct dev" - description: - name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" - url: "https://pub.dev" - source: hosted - version: "2.4.9" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" - url: "https://pub.dev" - source: hosted - version: "7.3.0" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb - url: "https://pub.dev" - source: hosted - version: "8.9.2" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" - collection: - dependency: "direct main" - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" - url: "https://pub.dev" - source: hosted - version: "2.3.6" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - graphs: - dependency: transitive - description: - name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" - source: hosted - version: "0.7.1" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - lints: - dependency: transitive - description: - name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 - url: "https://pub.dev" - source: hosted - version: "3.0.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - meta: - dependency: "direct main" - description: - name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" - source: hosted - version: "1.10.0" - mime: - dependency: transitive - description: - name: mime - sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" - url: "https://pub.dev" - source: hosted - version: "1.0.6" - mockito: - dependency: "direct dev" - description: - name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" - url: "https://pub.dev" - source: hosted - version: "5.4.4" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - timing: - dependency: transitive - description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://pub.dev" - source: hosted - version: "0.3.0" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" - xml: - dependency: transitive - description: - name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" - source: hosted - version: "6.5.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" diff --git a/packages/closed_household/CHANGELOG.md b/packages/closed_household/CHANGELOG.md index 5d25ceb15..122b4041a 100644 --- a/packages/closed_household/CHANGELOG.md +++ b/packages/closed_household/CHANGELOG.md @@ -1,5 +1,7 @@ -## 1.0.2-dev.1 +## 1.0.3 + * Updated digit_data_model to latest version +* Updated flutter version to 3.22 * Migrated to digit_ui_components ## 1.0.1+1 diff --git a/packages/closed_household/lib/pages/closed_household_acknowledgement.dart b/packages/closed_household/lib/pages/closed_household_acknowledgement.dart index b4dd01487..8aba0f1de 100644 --- a/packages/closed_household/lib/pages/closed_household_acknowledgement.dart +++ b/packages/closed_household/lib/pages/closed_household_acknowledgement.dart @@ -9,7 +9,6 @@ import '../../../widgets/localized.dart'; @RoutePage() class ClosedHouseholdAcknowledgementPage extends LocalizedStatefulWidget { - const ClosedHouseholdAcknowledgementPage({ super.key, super.appLocalizations, @@ -36,7 +35,7 @@ class _ClosedHouseholdAcknowledgementPageState i18.acknowledgementSuccess.acknowledgementDescriptionText, ), actions: [ - Button( + DigitButton( label: localizations .translate(i18.acknowledgementSuccess.actionLabelText), onPressed: () { @@ -44,12 +43,11 @@ class _ClosedHouseholdAcknowledgementPageState // Pop twice to navigate back to the previous screen parent.popUntilRoot(); }, - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, ) - ] - ), + ]), ), ); } diff --git a/packages/closed_household/lib/pages/closed_household_details.dart b/packages/closed_household/lib/pages/closed_household_details.dart index c9e8809b0..55e1e4559 100644 --- a/packages/closed_household/lib/pages/closed_household_details.dart +++ b/packages/closed_household/lib/pages/closed_household_details.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:closed_household/closed_household.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/component_utils.dart'; import 'package:digit_ui_components/widgets/atoms/text_block.dart'; @@ -12,6 +12,7 @@ import 'package:reactive_forms/reactive_forms.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../router/closed_household_router.gm.dart'; +import '../utils/utils.dart'; import '../widgets/back_navigation_help_header.dart'; import '../widgets/localized.dart'; @@ -55,6 +56,7 @@ class ClosedHouseholdDetailsPageState Widget build(BuildContext context) { final theme = Theme.of(context); final bloc = context.read(); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -86,7 +88,7 @@ class ClosedHouseholdDetailsPageState child: BlocBuilder( builder: (context, state) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -95,147 +97,151 @@ class ClosedHouseholdDetailsPageState ], ), footer: DigitCard( - padding: EdgeInsets.all(theme.spacerTheme.spacer2), - children: [ - BlocBuilder( - builder: (context, locationState) { - return Button( - size: ButtonSize.large, - type: ButtonType.primary, - mainAxisSize: MainAxisSize.max, - onPressed: () { - if(!form.valid && form - .control( - _householdHeadNameKey,) - .value.length>0) { - return; - } - final String? householdHeadName = form - .control(_householdHeadNameKey) - .value as String?; + margin: const EdgeInsets.only(top: spacer2), + children: [ + BlocBuilder( + builder: (context, locationState) { + return DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + if (!form.valid && + form + .control( + _householdHeadNameKey, + ) + .value + .length > + 0) { + return; + } + final String? householdHeadName = form + .control(_householdHeadNameKey) + .value as String?; - context.read().add( - ClosedHouseholdEvent.handleSummary( - latitude: locationState.latitude!, - longitude: locationState.longitude!, - locationAccuracy: locationState.accuracy!, - householdHeadName: householdHeadName != null && - householdHeadName.trim().isNotEmpty - ? householdHeadName - : null, - ), - ); + context.read().add( + ClosedHouseholdEvent.handleSummary( + latitude: locationState.latitude!, + longitude: locationState.longitude!, + locationAccuracy: locationState.accuracy!, + householdHeadName: householdHeadName != + null && + householdHeadName.trim().isNotEmpty + ? householdHeadName + : null, + ), + ); - context.router.push(ClosedHouseholdSummaryRoute()); - }, - label: localizations.translate( + context.router.push(ClosedHouseholdSummaryRoute()); + }, + label: localizations.translate( i18.common.coreCommonNext, - ), - ); - }, - ),] - ), + ), + ); + }, + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - children: [ - DigitTextBlock( - heading: localizations.translate( - i18.closeHousehold.closeHouseHoldDetailLabel, - ), - headingStyle: theme.textTheme.displayMedium, - description: localizations.translate( - i18.closeHousehold.closeHouseHoldDetailDescLabel, - ), + margin: const EdgeInsets.all(spacer2), + children: [ + DigitTextBlock( + padding: const EdgeInsets.all(0), + heading: localizations.translate( + i18.closeHousehold.closeHouseHoldDetailLabel, ), - DigitCard(children: [ - ReactiveWrapperField( - formControlName: - _administrationAreaKey, - showErrors: (control) => - control.invalid && - control.touched, - // Ensures error is shown if invalid and touched - builder: (field) { - return LabeledField( - label: localizations.translate( - i18.closeHousehold.villageName, - ), - child: DigitTextFormInput( - errorMessage: field.errorText, - readOnly: true, - initialValue: form - .control( - _administrationAreaKey) - .value, - ), - ); - }), - ReactiveWrapperField( - formControlName: - _accuracyKey, - showErrors: (control) => - control.invalid && - control.touched, - // Ensures error is shown if invalid and touched - builder: (field) { - return LabeledField( - label: localizations.translate( - i18.closeHousehold.accuracyLabel, - ), - child: DigitTextFormInput( - errorMessage: field.errorText, - readOnly: true, - initialValue: (form - .control( - _accuracyKey,) - .value).toString(), - ), - ); - }), - ReactiveWrapperField( - validationMessages: { - 'maxLength': (_) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - 'minLength': (_) => localizations - .translate(i18.common.min2CharsRequired) - .replaceAll('{}', '2'), - }, - formControlName: - _householdHeadNameKey, - showErrors: (control) => - control.invalid && - control.touched && control.value != '', - // Ensures error is shown if invalid and touched - builder: (field) { - return LabeledField( - label: localizations.translate( - i18.closeHousehold.headNameLabel, - ), - child: DigitTextFormInput( - maxLength: 64, - charCount: true, - onChange: (val) => { - form - .control( - _householdHeadNameKey,) - .markAsTouched(), - form + headingStyle: textTheme.headingXl, + description: localizations.translate( + i18.closeHousehold.closeHouseHoldDetailDescLabel, + ), + ), + ReactiveWrapperField( + formControlName: _administrationAreaKey, + showErrors: (control) => + control.invalid && control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.closeHousehold.villageName, + ), + child: DigitTextFormInput( + errorMessage: field.errorText, + readOnly: true, + initialValue: + form.control(_administrationAreaKey).value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _accuracyKey, + showErrors: (control) => + control.invalid && control.touched, + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.closeHousehold.accuracyLabel, + ), + child: DigitTextFormInput( + errorMessage: field.errorText, + readOnly: true, + initialValue: (form .control( - _householdHeadNameKey,) - .value = val, - }, - errorMessage: field.errorText, - initialValue: form + _accuracyKey, + ) + .value) + .toString(), + ), + ); + }), + ReactiveWrapperField( + validationMessages: { + 'maxLength': (_) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + 'minLength': (_) => localizations + .translate(i18.common.min2CharsRequired) + .replaceAll('{}', '2'), + }, + formControlName: _householdHeadNameKey, + showErrors: (control) => + control.invalid && + control.touched && + control.value != '', + // Ensures error is shown if invalid and touched + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.closeHousehold.headNameLabel, + ), + child: DigitTextFormInput( + maxLength: 64, + charCount: true, + onChange: (val) => { + form .control( - _householdHeadNameKey,) - .value, - ), - ); - }), - ]),] - ), + _householdHeadNameKey, + ) + .markAsTouched(), + form + .control( + _householdHeadNameKey, + ) + .value = val, + }, + errorMessage: field.errorText, + initialValue: form + .control( + _householdHeadNameKey, + ) + .value, + ), + ); + }), + ]), ), ], ); @@ -255,6 +261,9 @@ class ClosedHouseholdDetailsPageState _householdHeadNameKey: FormControl( value: null, validators: [ + Validators.delegate( + CustomValidator.requiredMin, + ), Validators.maxLength(200), Validators.minLength(2), ], diff --git a/packages/closed_household/lib/pages/closed_household_summary.dart b/packages/closed_household/lib/pages/closed_household_summary.dart index ddae49932..52915aadf 100644 --- a/packages/closed_household/lib/pages/closed_household_summary.dart +++ b/packages/closed_household/lib/pages/closed_household_summary.dart @@ -8,6 +8,7 @@ import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/date_utils.dart'; import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -15,7 +16,6 @@ import '../../../widgets/localized.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../widgets/back_navigation_help_header.dart'; -import '../widgets/showcase/showcase_button.dart'; @RoutePage() class ClosedHouseholdSummaryPage extends LocalizedStatefulWidget { @@ -51,138 +51,141 @@ class ClosedHouseholdSummaryPageState builder: (context, householdState) { return Scaffold( body: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const BackNavigationHelpHeaderWidget( showHelp: false, - showcaseButton: ShowcaseButton(), ), footer: DigitCard( - padding: - EdgeInsets.all(theme.spacerTheme.spacer2), - children: [ - BlocBuilder( - builder: (context, scannerState) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - Button( - size: ButtonSize.large, - type: ButtonType.secondary, - mainAxisSize: MainAxisSize.max, - onPressed: () { - Navigator.of(context).push( - // [TODO: Add the route to auto_route] - MaterialPageRoute( - builder: (context) => const DigitScannerPage( - quantity: 1, - isGS1code: false, - singleValue: true, - ), - settings: - const RouteSettings(name: '/qr-scanner'), - ), - ); - }, - prefixIcon: Icons.qr_code, - label: localizations.translate(i18 - .closeHousehold.closeHouseholdVoucherScannerLabel), - ), - SizedBox( - height: theme.spacerTheme.spacer3, - ), - Button( - size: ButtonSize.large, - type: ButtonType.primary, - mainAxisSize: MainAxisSize.max, - onPressed: () { - context.read().add( - ClosedHouseholdEvent.handleSubmit( - context: context, - householdHeadName: - householdState.householdHeadName, - locationAccuracy: - householdState.locationAccuracy, - longitude: householdState.longitude, - latitude: householdState.latitude, - tag: scannerState.qrCodes.isNotEmpty - ? scannerState.qrCodes.first - : null)); + margin: const EdgeInsets.only(top: spacer2), + children: [ + BlocBuilder( + builder: (context, scannerState) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + Navigator.of(context).push( + // [TODO: Add the route to auto_route] + MaterialPageRoute( + builder: (context) => const DigitScannerPage( + quantity: 1, + isGS1code: false, + singleValue: true, + ), + settings: + const RouteSettings(name: '/qr-scanner'), + ), + ); + }, + prefixIcon: Icons.qr_code, + label: localizations.translate(i18.closeHousehold + .closeHouseholdVoucherScannerLabel), + ), + SizedBox( + height: theme.spacerTheme.spacer3, + ), + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.read().add( + ClosedHouseholdEvent.handleSubmit( + context: context, + householdHeadName: + householdState.householdHeadName, + locationAccuracy: + householdState.locationAccuracy, + longitude: householdState.longitude, + latitude: householdState.latitude, + tag: scannerState.qrCodes.isNotEmpty + ? scannerState.qrCodes.first + : null)); - ///clear the scanner - context.router - .push(ClosedHouseholdAcknowledgementRoute()); - }, - label: localizations + ///clear the scanner + context.router + .push(ClosedHouseholdAcknowledgementRoute()); + }, + label: localizations .translate(i18.common.coreCommonSubmit), - ), - ], - ); - }),] - ), + ), + ], + ); + }), + ]), slivers: [ SliverToBoxAdapter( child: Column( children: [ - DigitCard( - children: [ - LabelValueList( - labelFlex: theme.spacerTheme.spacer2.toInt(), + DigitCard(margin: const EdgeInsets.all(spacer2), children: [ + LabelValueSummary( + padding: EdgeInsets.zero, heading: localizations.translate( i18.closeHousehold.closeHouseholdSummaryLabel), withDivider: false, items: [ - LabelValuePair( + LabelValueItem( label: localizations.translate( i18.closeHousehold.closeHouseholdDate), value: (DigitDateUtils.getDateFromTimestamp( DateTime.now().millisecondsSinceEpoch, dateFormat: 'dd MMM yyyy')) .toString(), + labelFlex: 5, ), - LabelValuePair( + LabelValueItem( label: localizations.translate( i18.closeHousehold.closeHouseholdVillageName), value: ClosedHouseholdSingleton() .boundary! .name .toString(), + labelFlex: 5, ), - LabelValuePair( + LabelValueItem( label: localizations.translate( i18.closeHousehold.closeHouseholdHeadName), value: householdState.householdHeadName ?? localizations .translate(i18.common.coreCommonNA), + labelFlex: 5, ), - LabelValuePair( + LabelValueItem( label: localizations.translate(i18 .closeHousehold.closeHouseholdGpsAccuracyLabel), - value: householdState.locationAccuracy != null - ? '${householdState.locationAccuracy.toStringAsFixed(2)} ${localizations.translate(i18.common.coreCommonMeters)}' - : localizations - .translate(i18.common.coreCommonNA), + value: + '${householdState.locationAccuracy.toStringAsFixed(2)} ${localizations.translate(i18.common.coreCommonMeters)}', + labelFlex: 5, ), ]), - ] - ), + ]), BlocBuilder( builder: (context, state) { if (state.qrCodes.isNotEmpty) { return DigitCard( - children: [LabelValueList( - labelFlex: theme.spacerTheme.spacer2.toInt(), - heading: localizations.translate(i18.closeHousehold - .closeHouseholdVoucherSummaryLabel), - withDivider: false, - items: [ - LabelValuePair( - label: localizations.translate(i18.closeHousehold - .closeHouseholdVoucherCodeLabel), - value: state.qrCodes.first, + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .closeHousehold + .closeHouseholdVoucherSummaryLabel), + withDivider: false, + items: [ + LabelValueItem( + label: localizations.translate(i18 + .closeHousehold + .closeHouseholdVoucherCodeLabel), + value: state.qrCodes.first, + labelFlex: 5, + ), + ], ), - ], - ),] - ); + ]); } else { return const SizedBox(); } diff --git a/packages/closed_household/lib/pages/closed_household_wrapper.dart b/packages/closed_household/lib/pages/closed_household_wrapper.dart index 3f1e994e4..f202fa42d 100644 --- a/packages/closed_household/lib/pages/closed_household_wrapper.dart +++ b/packages/closed_household/lib/pages/closed_household_wrapper.dart @@ -3,10 +3,10 @@ import 'package:closed_household/blocs/closed_household.dart'; import 'package:closed_household/closed_household.dart'; import 'package:closed_household/utils/extensions/extensions.dart'; import 'package:digit_data_model/models/entities/individual.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; -import 'package:location/location.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:location/location.dart'; import 'package:registration_delivery/models/entities/household.dart'; import 'package:registration_delivery/models/entities/household_member.dart'; import 'package:registration_delivery/models/entities/project_beneficiary.dart'; diff --git a/packages/closed_household/lib/router/closed_household_router.dart b/packages/closed_household/lib/router/closed_household_router.dart index ead0995e8..29c5b6526 100644 --- a/packages/closed_household/lib/router/closed_household_router.dart +++ b/packages/closed_household/lib/router/closed_household_router.dart @@ -2,21 +2,18 @@ import 'package:auto_route/auto_route.dart'; import 'closed_household_router.gm.dart'; - @AutoRouterConfig.module() class ClosedHouseholdPackageRoute extends $ClosedHouseholdPackageRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: ClosedHouseholdWrapperRoute.page, path: 'closed-household-wrapper', children: [ AutoRoute( - page: ClosedHouseholdDetailsRoute.page, - path: 'closed-household-details', + page: ClosedHouseholdDetailsRoute.page, + path: 'closed-household-details', initial: true, ), AutoRoute( @@ -26,6 +23,5 @@ class ClosedHouseholdPackageRoute extends $ClosedHouseholdPackageRoute { page: ClosedHouseholdAcknowledgementRoute.page, path: 'closed-household-acknowledgement'), ]), - ]; } diff --git a/packages/closed_household/lib/widgets/back_navigation_help_header.dart b/packages/closed_household/lib/widgets/back_navigation_help_header.dart index 5259147dc..4d80b066c 100644 --- a/packages/closed_household/lib/widgets/back_navigation_help_header.dart +++ b/packages/closed_household/lib/widgets/back_navigation_help_header.dart @@ -1,7 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:closed_household/blocs/app_localization.dart'; import 'package:closed_household/widgets/showcase/showcase_button.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -29,32 +31,32 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: EdgeInsets.all( theme.spacerTheme.spacer2/ 2), + padding: EdgeInsets.all( theme.spacerTheme.spacer2), child: Row( children: [ Expanded( child: Row( children: [ if (showBackNavigation) - Flexible( - child: TextButton.icon( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () { - context.router.maybePop(); - handleBack != null ? handleBack!() : null; - }, - icon: const Icon(Icons.arrow_left_sharp), - label: Text( - ClosedHouseholdLocalization.of(context).translate( - i18.common.coreCommonBack, - ), - overflow: TextOverflow.ellipsis, + DigitBackButton(label: ClosedHouseholdLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size: MediaQuery.of(context).size.width < 500 + ? Theme.of(context).spacerTheme.spacer5 + : Theme.of(context).spacerTheme.spacer6, + color: Theme.of(context).colorTheme.primary.primary2, ), ), - ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) ], ), ), diff --git a/packages/closed_household/pubspec.lock b/packages/closed_household/pubspec.lock index 76890865c..704277232 100644 --- a/packages/closed_household/pubspec.lock +++ b/packages/closed_household/pubspec.lock @@ -117,18 +117,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -186,13 +186,13 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -333,10 +333,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -373,11 +373,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -386,6 +386,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + dartx: + dependency: transitive + description: + name: dartx + sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244" + url: "https://pub.dev" + source: hosted + version: "1.2.0" db_viewer: dependency: transitive description: @@ -402,30 +410,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: transitive - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "1.0.5" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "1.0.4" digit_showcase: dependency: "direct main" description: @@ -438,10 +438,10 @@ packages: dependency: "direct main" description: name: digit_ui_components - sha256: e38f163515aa6a6c5283754e741b21f33fb3a6c0a1fc171a1e4e6620510d46ae + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "0.0.1+7" + version: "0.0.2-dev.4" dio: dependency: transitive description: @@ -470,10 +470,10 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -486,18 +486,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -607,14 +599,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.13" - 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: @@ -713,14 +697,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -730,10 +706,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" formula_parser: dependency: "direct main" description: @@ -778,10 +754,10 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.3.1" + version: "4.6.1" geolocator_apple: dependency: transitive description: @@ -826,26 +802,26 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: @@ -854,6 +830,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.1" + group_radio_button: + dependency: transitive + description: + name: group_radio_button + sha256: "204de8d16b224be7fc72dade0c3afd410ff5a34417d89f74f0fd8be7a8c2b4d6" + url: "https://pub.dev" + source: hosted + version: "1.3.0" gs1_barcode_parser: dependency: "direct main" description: @@ -882,10 +866,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -970,10 +954,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -998,6 +982,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.0+1" + isar_generator: + dependency: "direct dev" + description: + name: isar_generator + sha256: "76c121e1295a30423604f2f819bc255bc79f852f3bc8743a24017df6068ad133" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" js: dependency: transitive description: @@ -1022,6 +1014,30 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -1034,26 +1050,26 @@ packages: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -1066,34 +1082,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -1146,26 +1162,26 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -1258,18 +1274,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "7.0.2" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" + version: "8.0.0" pool: dependency: transitive description: @@ -1302,22 +1310,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1330,18 +1330,10 @@ packages: dependency: "direct main" description: name: registration_delivery - sha256: b7074bf7115e375b9df2ad2937891139fea163024a35958ff177af137574c047 - url: "https://pub.dev" - source: hosted - version: "1.0.3+3" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" + sha256: "8f6843cb5e1acd5e44026b663a28e80086e791107b9131487c7e3a38e43b1229" url: "https://pub.dev" source: hosted - version: "0.0.1+1" + version: "1.0.5" rxdart: dependency: transitive description: @@ -1427,6 +1419,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1447,10 +1447,10 @@ packages: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1483,6 +1483,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + survey_form: + dependency: transitive + description: + name: survey_form + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" + url: "https://pub.dev" + source: hosted + version: "1.0.0" synchronized: dependency: transitive description: @@ -1503,26 +1511,34 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" + time: + dependency: transitive + description: + name: time + sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461" + url: "https://pub.dev" + source: hosted + version: "2.1.5" timing: dependency: transitive description: @@ -1615,10 +1631,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: @@ -1631,10 +1647,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: @@ -1679,10 +1695,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1695,10 +1711,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1739,6 +1755,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.3.0" + xxh3: + dependency: transitive + description: + name: xxh3 + sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916" + url: "https://pub.dev" + source: hosted + version: "1.2.0" yaml: dependency: transitive description: @@ -1748,5 +1772,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/closed_household/pubspec.yaml b/packages/closed_household/pubspec.yaml index 599577c6c..27394bd01 100644 --- a/packages/closed_household/pubspec.yaml +++ b/packages/closed_household/pubspec.yaml @@ -1,6 +1,6 @@ name: closed_household description: This package enables health facility workers to mark household closed and update. -version: 1.0.2-dev.1 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/develop/packages/closed_household repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,14 +11,13 @@ environment: dependencies: flutter: sdk: flutter - digit_ui_components: 0.0.1+7 + digit_ui_components: ^0.0.2-dev.4 flutter_bloc: ^8.1.1 freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + reactive_forms: ^17.0.0 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 + intl: ^0.19.0 flutter_svg: ^2.0.8 dart_mappable: ^4.2.0 drift: ^2.0.0 @@ -26,22 +25,22 @@ dependencies: path_provider: ^2.0.11 path: ^1.8.2 drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 + uuid: ^4.4.0 recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.2 + pluto_grid: ^8.0.0 + digit_scanner: ^1.0.4 gs1_barcode_parser: ^1.0.5 - auto_route: ^7.8.4 - digit_data_model: ^1.0.5-dev.1 - package_info_plus: ^5.0.1 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + package_info_plus: ^8.0.0 digit_showcase: ^1.0.0 collection: ^1.16.0 flutter_keyboard_visibility: ^5.4.0 stream_transform: ^2.1.0 async: ^2.11.0 formula_parser: ^2.0.1 - registration_delivery: ^1.0.3+1 - location: ^5.0.0 + registration_delivery: ^1.0.5 + location: ^6.0.2 dev_dependencies: @@ -56,9 +55,11 @@ dev_dependencies: dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 + build_runner: ^2.4.11 + isar_generator: ^3.1.0+1 flutter: assets: diff --git a/packages/complaints/CHANGELOG.md b/packages/complaints/CHANGELOG.md index 315ba0fd9..215f5481b 100644 --- a/packages/complaints/CHANGELOG.md +++ b/packages/complaints/CHANGELOG.md @@ -1,8 +1,15 @@ +## 1.0.0 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model to latest version + ## 0.0.1-dev.1 + * Migrated to digit_ui_components * Updated digit_data_model to latest version ## 0.0.1-dev.1 + * Moved pgr models, blocs, local remote repository from digit_data_model * Updated digit_data_model * PGR Complaints Initial Release \ No newline at end of file diff --git a/packages/complaints/assets/animated_json/alert.json b/packages/complaints/assets/animated_json/alert.json new file mode 100644 index 000000000..171b416cd --- /dev/null +++ b/packages/complaints/assets/animated_json/alert.json @@ -0,0 +1,1127 @@ +{ + "nm": "48 - Warning", + "ddd": 0, + "h": 500, + "w": 500, + "meta": { + "g": "LottieFiles AE " + }, + "layers": [ + { + "ty": 3, + "nm": "48 - Warning", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 180, + 180, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250.045, + 290.339, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "Line", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + -1, + 21.25, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 12 + }, + { + "s": [ + 55.556, + 55.556, + 100 + ], + "t": 32 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 85.533, + 85.887, + 0 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 180 + ], + "t": 12 + }, + { + "s": [ + 0 + ], + "t": 32 + } + ], + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 28, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0, + "y": 1 + }, + "s": [ + 0 + ], + "t": 22 + }, + { + "s": [ + 40 + ], + "t": 42 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2, + "parent": 5 + }, + { + "ty": 4, + "nm": "Dot", + "sr": 1, + "st": 0, + "op": 144, + "ip": 12, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Shape 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1, + 80 + ], + [ + -1, + -37.5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 0.1, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 33, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 3, + "parent": 2 + }, + { + "ty": 4, + "nm": "Tri Outlines", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 2, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -3.267, + -5.554 + ], + [ + 0, + 0 + ], + [ + 6.537, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 3.268, + -5.554 + ], + [ + 0, + 0 + ], + [ + 3.315, + 5.634 + ], + [ + 0, + 0 + ], + [ + -6.536, + 0 + ] + ], + "v": [ + [ + -81.948, + 59.861 + ], + [ + -7.284, + -67.044 + ], + [ + 7.284, + -67.044 + ], + [ + 81.948, + 59.861 + ], + [ + 74.664, + 72.598 + ], + [ + -74.664, + 72.598 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.7255, + 0.098, + 0 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 85.513, + 72.848 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 4, + "parent": 1 + }, + { + "ty": 3, + "nm": "Tri", + "sr": 1, + "st": 0, + "op": 144, + "ip": 10, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 85.513, + 72.848, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0, + 0, + 100 + ], + "t": 10 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 15 + } + ], + "ix": 6, + "x": "var $bm_rt;\nvar amp, freq, decay, n, t, v;\ntry {\n amp = $bm_div(effect('Scale - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = $bm_div(effect('Scale - Bounce')('ADBE Slider Control-0001'), 20), decay = $bm_div(effect('Scale - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : $bm_sub(time, key(n).time), $bm_rt = 0 < n ? (v = velocityAtTime($bm_sub(key(n).time, $bm_div(thisComp.frameDuration, 10))), $bm_sum(value, $bm_div($bm_mul($bm_mul($bm_div(v, 100), amp), Math.sin($bm_mul($bm_mul($bm_mul(freq, t), 2), Math.PI))), Math.exp($bm_mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}" + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 59.955, + 37.467, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [ + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Overshoot", + "ix": 1, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 10, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Bounce", + "ix": 2, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 35, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + }, + { + "ty": 5, + "mn": "ADBE Slider Control", + "nm": "Scale - Friction", + "ix": 3, + "en": 1, + "ef": [ + { + "ty": 0, + "mn": "ADBE Slider Control-0001", + "nm": "Slider", + "ix": 1, + "v": { + "a": 0, + "k": 65, + "ix": 1, + "x": "var $bm_rt;\n$bm_rt = clamp(value, 0, 100);" + } + } + ] + } + ], + "ind": 5, + "parent": 1 + }, + { + "ty": 1, + "nm": "Plate_white", + "sr": 1, + "st": 0, + "op": 144, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 250, + 250, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "sc": "#ffffff", + "sh": 500, + "sw": 500, + "ind": 6 + } + ], + "v": "5.5.7", + "fr": 48, + "op": 144, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/complaints/assets/animated_json/error.json b/packages/complaints/assets/animated_json/error.json new file mode 100644 index 000000000..96b4f9626 --- /dev/null +++ b/packages/complaints/assets/animated_json/error.json @@ -0,0 +1,728 @@ +{ + "nm": "ckeck", + "ddd": 0, + "h": 50, + "w": 50, + "meta": { + "g": "@lottiefiles/toolkit-js 0.33.2" + }, + "layers": [ + { + "ty": 4, + "nm": "! Outlines", + "sr": 1, + "st": 0, + "op": 213, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 2, + 12, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.653, + "y": -0.834 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 73 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.127, + "y": 1.695 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 25, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Group 1", + "ix": 1, + "cix": 2, + "np": 4, + "it": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ], + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ] + ], + "o": [ + [ + 0, + -1.104 + ], + [ + 1.104, + 0 + ], + [ + 0, + 1.104 + ], + [ + -1.104, + 0 + ] + ], + "v": [ + [ + -2, + 10 + ], + [ + 0, + 8 + ], + [ + 2, + 10 + ], + [ + 0, + 12 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 2", + "ix": 2, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + -1.036, + 5 + ], + [ + -2, + -6.625 + ], + [ + -2, + -12 + ], + [ + 2, + -12 + ], + [ + 2, + -6.625 + ], + [ + 1.052, + 5 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "mm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Merge", + "nm": "Merge Paths 1", + "mm": 1 + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0.099, + 9.982 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 2.099, + 21.982 + ], + "ix": 2 + }, + "r": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 0 + ], + "t": 10 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 12 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 14 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 16 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 18 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + 5 + ], + "t": 20 + }, + { + "o": { + "x": 0.167, + "y": 0.167 + }, + "i": { + "x": 0.833, + "y": 0.833 + }, + "s": [ + -5 + ], + "t": 22 + }, + { + "s": [ + 0 + ], + "t": 24 + } + ], + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + } + ], + "ind": 1 + }, + { + "ty": 4, + "nm": "Shape Layer 1", + "sr": 1, + "st": 0, + "op": 193, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 10, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.41, + "y": -0.602 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 100, + 100, + 100 + ], + "t": 60 + }, + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.436, + "y": 1.492 + }, + "s": [ + 115, + 115, + 100 + ], + "t": 83 + }, + { + "s": [ + 100, + 100, + 100 + ], + "t": 90 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 25, + 35, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Ellipse 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "el", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Ellipse", + "nm": "Ellipse Path 1", + "d": 1, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 3 + }, + "s": { + "a": 0, + "k": [ + 40, + 40 + ], + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 1, + 1, + 1 + ], + "ix": 3 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 0, + "k": 100, + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 0, + "k": 0, + "ix": 1 + }, + "m": 1 + } + ], + "ind": 2 + } + ], + "v": "5.6.5", + "fr": 60, + "op": 180, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/complaints/assets/animated_json/success.json b/packages/complaints/assets/animated_json/success.json new file mode 100644 index 000000000..43192f708 --- /dev/null +++ b/packages/complaints/assets/animated_json/success.json @@ -0,0 +1,917 @@ +{ + "nm": "sucess", + "ddd": 0, + "h": 120, + "w": 120, + "meta": { + "g": "LottieFiles AE 0.1.21" + }, + "layers": [ + { + "ty": 3, + "nm": "scale up null", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 111, + 111, + 100 + ], + "t": 27 + }, + { + "o": { + "x": 0.167, + "y": 0 + }, + "i": { + "x": 0.833, + "y": 1 + }, + "s": [ + 101, + 101, + 100 + ], + "t": 36 + }, + { + "s": [ + 121, + 121, + 100 + ], + "t": 42.0000017106951 + } + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 60, + 60, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 0, + "ix": 11 + } + }, + "ef": [], + "ind": 1 + }, + { + "ty": 4, + "nm": "spark", + "sr": 1, + "st": 35.0000014255792, + "op": 335.00001364483, + "ip": 35.0000014255792, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0.5, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Rectangle 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "rc", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Rect", + "nm": "Rectangle Path 1", + "d": 1, + "p": { + "a": 1, + "k": [ + { + "o": { + "x": 0.333, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 0, + -21 + ], + "t": 35, + "ti": [ + 0, + 1.5 + ], + "to": [ + 0, + -1.5 + ] + }, + { + "s": [ + 0, + -30 + ], + "t": 53.0000021587343 + } + ], + "ix": 3 + }, + "r": { + "a": 0, + "k": 0, + "ix": 4 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.976, + "y": 0 + }, + "i": { + "x": 0.667, + "y": 1 + }, + "s": [ + 2, + 0 + ], + "t": 35 + }, + { + "o": { + "x": 0.33299999999999996, + "y": 0 + }, + "i": { + "x": 0.15355432054499818, + "y": 0.9999999999999999 + }, + "s": [ + 2, + 8 + ], + "t": 42 + }, + { + "s": [ + 1.633, + 0 + ], + "t": 53.0000021587343 + } + ], + "ix": 2 + } + }, + { + "ty": "fl", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Fill", + "nm": "Fill 1", + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 4 + }, + "r": 1, + "o": { + "a": 0, + "k": 100, + "ix": 5 + } + }, + { + "ty": "tr", + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "p": { + "a": 0, + "k": [ + 0, + -8 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + } + } + ] + }, + { + "ty": "rp", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Repeater", + "nm": "Repeater 1", + "ix": 2, + "m": 1, + "c": { + "a": 0, + "k": 8, + "ix": 1 + }, + "o": { + "a": 0, + "k": 0, + "ix": 2 + }, + "tr": { + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 45, + "ix": 4 + }, + "sa": { + "a": 0, + "k": 0 + }, + "so": { + "a": 0, + "k": 100, + "ix": 5 + }, + "eo": { + "a": 0, + "k": 100, + "ix": 6 + } + } + } + ], + "ind": 2, + "parent": 1 + }, + { + "ty": 4, + "nm": "check", + "sr": 1, + "st": 10.0000004073083, + "op": 310.000012626559, + "ip": 22.0000008960784, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": false, + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 3.5, + 3.75 + ], + [ + -12.973, + 5.349 + ], + [ + -6.124, + -9.992 + ], + [ + 12.125, + -7.431 + ], + [ + 7.431, + 12.125 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + -3.5, + -3.75 + ], + [ + 10.764, + -2.941 + ], + [ + 7.431, + 12.125 + ], + [ + -12.125, + 7.431 + ], + [ + -7.431, + -12.125 + ] + ], + "v": [ + [ + 15.25, + -9.688 + ], + [ + -5.75, + 10.062 + ], + [ + -16, + 0.25 + ], + [ + -6.777, + -24.849 + ], + [ + 21.955, + -13.456 + ], + [ + 13.456, + 21.955 + ], + [ + -21.955, + 13.456 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 10 + }, + { + "s": [ + 23 + ], + "t": 40.0000016292334 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 17 + }, + { + "s": [ + 0 + ], + "t": 45.0000018328876 + } + ], + "ix": 1 + }, + "m": 1 + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 4, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + } + ], + "ind": 3, + "parent": 1 + }, + { + "ty": 4, + "nm": "circle", + "sr": 1, + "st": 0, + "op": 300.00001221925, + "ip": 0, + "hd": false, + "ddd": 0, + "bm": 0, + "hasMask": false, + "ao": 0, + "ks": { + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6 + }, + "sk": { + "a": 0, + "k": 0 + }, + "p": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 2 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "sa": { + "a": 0, + "k": 0 + }, + "o": { + "a": 0, + "k": 100, + "ix": 11 + } + }, + "ef": [], + "shapes": [ + { + "ty": "sh", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Shape - Group", + "nm": "Path 1", + "ix": 1, + "d": 1, + "ks": { + "a": 0, + "k": { + "c": true, + "i": [ + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ], + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ] + ], + "o": [ + [ + 14.221, + 0 + ], + [ + 0, + 14.221 + ], + [ + -14.221, + 0 + ], + [ + 0, + -14.221 + ] + ], + "v": [ + [ + 0, + -25.75 + ], + [ + 25.75, + 0 + ], + [ + 0, + 25.75 + ], + [ + -25.75, + 0 + ] + ] + }, + "ix": 2 + } + }, + { + "ty": "st", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 1, + "lj": 1, + "ml": 4, + "o": { + "a": 0, + "k": 100, + "ix": 4 + }, + "w": { + "a": 0, + "k": 2, + "ix": 5 + }, + "c": { + "a": 0, + "k": [ + 0.9804, + 0.9804, + 0.9804 + ], + "ix": 3 + } + }, + { + "ty": "tm", + "bm": 0, + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 3, + "e": { + "a": 1, + "k": [ + { + "o": { + "x": 0.714, + "y": 0 + }, + "i": { + "x": 0.351, + "y": 1 + }, + "s": [ + 100 + ], + "t": 0 + }, + { + "s": [ + 100 + ], + "t": 30.0000012219251 + } + ], + "ix": 2 + }, + "o": { + "a": 0, + "k": 0, + "ix": 3 + }, + "s": { + "a": 1, + "k": [ + { + "o": { + "x": 0.742, + "y": 0 + }, + "i": { + "x": 0.363, + "y": 1 + }, + "s": [ + 100 + ], + "t": 7 + }, + { + "s": [ + 0 + ], + "t": 33.0000013441176 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 4, + "parent": 1 + } + ], + "v": "5.5.7", + "fr": 29.9700012207031, + "op": 60.0000024438501, + "ip": 0, + "assets": [] +} \ No newline at end of file diff --git a/packages/complaints/example/lib/main.dart b/packages/complaints/example/lib/main.dart index 7642de2f9..eafbce267 100644 --- a/packages/complaints/example/lib/main.dart +++ b/packages/complaints/example/lib/main.dart @@ -2,18 +2,19 @@ import 'dart:convert'; import 'package:complaints/blocs/localization/app_localization.dart'; import 'package:complaints/complaints.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; void main() { runApp(MyApp()); } -class Language{ + +class Language { late String label; late String value; - Language(this.label,this.value); + Language(this.label, this.value); } class Localization { @@ -24,15 +25,13 @@ class Localization { late String module; late String locale; - } -Future loadLocalizedStrings() async{ +Future loadLocalizedStrings() async { final String jsonString = - await rootBundle.loadString('lib/localization_strings.json'); + await rootBundle.loadString('lib/localization_strings.json'); final decode = json.decode(jsonString); - List localizationList; localizationList = decode.map((e) { final data = e; @@ -56,17 +55,15 @@ class MyApp extends StatelessWidget { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: MyHomePage(title: "Complaints Package Demo"), - locale: Locale('en','MZ'), - supportedLocales: [const Locale('en','MZ')], + locale: Locale('en', 'MZ'), + supportedLocales: [const Locale('en', 'MZ')], localizationsDelegates: [ - ComplaintsLocalization.getDelegate(loadLocalizedStrings(), [ - Language("English", "en_MZ") - ]), + ComplaintsLocalization.getDelegate( + loadLocalizedStrings(), [Language("English", "en_MZ")]), // Add other localizations delegates if needed ], ); @@ -77,14 +74,11 @@ class MyHomePage extends StatefulWidget { final String title; MyHomePage({super.key, required this.title}); - @override State createState() => _MyHomePageState(); } class _MyHomePageState extends State { - - @override void initState() { super.initState(); @@ -94,30 +88,23 @@ class _MyHomePageState extends State { Widget build(BuildContext context) { final theme = Theme.of(context); return Scaffold( - appBar: AppBar( - title: Text("PGR-Complaints Example"), - ), - body: Center( - child :DigitOutLineButton( - onPressed: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) => - ComplaintsAcknowledgementPage(), - ), - ); - }, - label: "Demo Acknowledgemnet", - buttonStyle: OutlinedButton.styleFrom( - shape: const BeveledRectangleBorder(), - padding: const EdgeInsets.all(14), - side: BorderSide( - width: 1.0, - color: theme.colorScheme.primary, - ), + appBar: AppBar( + title: Text("PGR-Complaints Example"), ), - ), - ) - ); + body: Center( + child: DigitButton( + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) => + ComplaintsAcknowledgementPage(), + ), + ); + }, + label: "Demo Acknowledgemnet", + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + ), + )); } } diff --git a/packages/complaints/example/pubspec.lock b/packages/complaints/example/pubspec.lock index e78473cf3..5cf8bac6d 100644 --- a/packages/complaints/example/pubspec.lock +++ b/packages/complaints/example/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.1.4" bloc: dependency: transitive description: @@ -129,6 +129,46 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d + url: "https://pub.dev" + source: hosted + version: "0.3.4" characters: dependency: transitive description: @@ -137,6 +177,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -175,7 +223,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1-dev.1" + version: "1.0.0" convert: dependency: transitive description: @@ -184,6 +232,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" crypto: dependency: transitive description: @@ -192,6 +248,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" cupertino_icons: dependency: "direct main" description: @@ -216,30 +280,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.6" - db_viewer: + digit_data_model: dependency: transitive description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - digit_components: - dependency: "direct main" - description: - name: digit_components - sha256: "01320d4c72829045e789d1a56e23ff2bd85dad6a1831d27bd507a1acaceae17e" + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.1" - digit_data_model: + version: "1.0.5" + digit_ui_components: dependency: transitive description: - name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "0.0.2-dev.4" dio: dependency: transitive description: @@ -256,30 +312,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - drift: + dotted_border: dependency: transitive description: - name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: transitive - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted version: "2.1.0" - easy_stepper: + drift: dependency: transitive description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + name: drift + sha256: c2d073d35ad441730812f4ea05b5dd031fb81c5f9786a4f5fb77ecd6307b6f74 url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.22.1" fake_async: dependency: transitive description: @@ -304,91 +352,91 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: + version: "8.0.0+1" + file_selector_linux: dependency: transitive description: - name: flutter_bloc - sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" url: "https://pub.dev" source: hosted - version: "8.1.6" - flutter_dotenv: + version: "0.9.2+1" + file_selector_macos: dependency: transitive description: - name: flutter_dotenv - sha256: "9357883bdd153ab78cbf9ffa07656e336b8bbb2b5a3ca596b0b27e119f7c7d77" + name: file_selector_macos + sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 url: "https://pub.dev" source: hosted - version: "5.1.0" - flutter_focus_watcher: + version: "0.9.4" + file_selector_platform_interface: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_windows + sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "0.9.3+2" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "8.1.6" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: b4e2df75364bab2f4c3ca32b87193267d786b6e158c3f345c3a1daeb911d82b9 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.0.6" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: @@ -397,6 +445,19 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + url: "https://pub.dev" + source: hosted + version: "2.0.19" flutter_spinkit: dependency: transitive description: @@ -405,6 +466,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: transitive description: @@ -418,14 +487,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -455,6 +516,54 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd + url: "https://pub.dev" + source: hosted + version: "2.3.7" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -467,10 +576,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -495,14 +604,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -519,14 +636,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + url: "https://pub.dev" + source: hosted + version: "1.0.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + url: "https://pub.dev" + source: hosted + version: "0.8.9+6" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" + source: hosted + version: "3.0.2" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + url: "https://pub.dev" + source: hosted + version: "0.8.9+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" + source: hosted + version: "2.9.3" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -567,6 +748,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -579,26 +784,26 @@ packages: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -611,34 +816,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -679,30 +884,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + path: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "2.0.1" - path: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -783,14 +980,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -823,22 +1012,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: transitive description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: transitive description: @@ -847,14 +1028,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" shelf: dependency: transitive description: @@ -884,14 +1057,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: bb174b3ec2527f9c5f680f73a89af8149dd99782fbb56ea88ad0807c5638f2ed url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.7" sqlite3_flutter_libs: dependency: transitive description: @@ -944,10 +1125,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" timing: dependency: transitive description: @@ -972,14 +1153,94 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" + url: "https://pub.dev" + source: hosted + version: "6.2.6" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + url: "https://pub.dev" + source: hosted + version: "6.2.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: @@ -1012,6 +1273,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" watcher: dependency: transitive description: @@ -1024,10 +1301,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -1069,5 +1346,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/complaints/example/pubspec.yaml b/packages/complaints/example/pubspec.yaml index fe8d3212d..f582f74fe 100644 --- a/packages/complaints/example/pubspec.yaml +++ b/packages/complaints/example/pubspec.yaml @@ -35,9 +35,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - digit_components: ^1.0.0+2 complaints: - path : ../ + path: ../ diff --git a/packages/complaints/lib/data/repositories/oplog/oplog.dart b/packages/complaints/lib/data/repositories/oplog/oplog.dart index 7e79e9ba6..6472721fc 100644 --- a/packages/complaints/lib/data/repositories/oplog/oplog.dart +++ b/packages/complaints/lib/data/repositories/oplog/oplog.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; import 'package:isar/isar.dart'; - import '../../../models/pgr_complaints.dart'; class PgrServiceOpLogManager extends OpLogManager { @@ -60,37 +59,37 @@ class PgrServiceOpLogManager extends OpLogManager { return entriesList; } - //Note: PendingDownSync is not required for PGR Create Oplogs. This creates Mapper Exception issue for checking pending downsync entries of complaints type - // @override - // Future>> getPendingDownSync( - // DataModelType type, { - // required String createdBy, - // }) async { - // final pendingEntries = await isar.opLogs - // .filter() - // .entityTypeEqualTo(type) - // .serverGeneratedIdIsNotNull() - // .syncedUpEqualTo(true) - // .syncedDownEqualTo(false) - // .createdByEqualTo(createdBy) - // .sortByCreatedAt() - // .findAll(); - // - // final entriesList = pendingEntries - // .map((e) { - // final entity = e.getEntity(); - // if ([ - // PgrServiceApplicationStatus.created, - // PgrServiceApplicationStatus.pendingAssignment, - // ].contains(entity.applicationStatus)) { - // return OpLogEntry.fromOpLog(e); - // } - // - // return null; - // }) - // .whereNotNull() - // .toList(); - // - // return entriesList; - // } +//Note: PendingDownSync is not required for PGR Create Oplogs. This creates Mapper Exception issue for checking pending downsync entries of complaints type +// @override +// Future>> getPendingDownSync( +// DataModelType type, { +// required String createdBy, +// }) async { +// final pendingEntries = await isar.opLogs +// .filter() +// .entityTypeEqualTo(type) +// .serverGeneratedIdIsNotNull() +// .syncedUpEqualTo(true) +// .syncedDownEqualTo(false) +// .createdByEqualTo(createdBy) +// .sortByCreatedAt() +// .findAll(); +// +// final entriesList = pendingEntries +// .map((e) { +// final entity = e.getEntity(); +// if ([ +// PgrServiceApplicationStatus.created, +// PgrServiceApplicationStatus.pendingAssignment, +// ].contains(entity.applicationStatus)) { +// return OpLogEntry.fromOpLog(e); +// } +// +// return null; +// }) +// .whereNotNull() +// .toList(); +// +// return entriesList; +// } } diff --git a/packages/complaints/lib/models/entities/additional_fields_type.mapper.dart b/packages/complaints/lib/models/entities/additional_fields_type.mapper.dart index cf6a34c4d..256792837 100644 --- a/packages/complaints/lib/models/entities/additional_fields_type.mapper.dart +++ b/packages/complaints/lib/models/entities/additional_fields_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'additional_fields_type.dart'; diff --git a/packages/complaints/lib/models/pgr_address.mapper.dart b/packages/complaints/lib/models/pgr_address.mapper.dart index 9eeb30f87..3bfdb6804 100644 --- a/packages/complaints/lib/models/pgr_address.mapper.dart +++ b/packages/complaints/lib/models/pgr_address.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pgr_address.dart'; @@ -181,10 +181,8 @@ mixin PgrAddressModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrAddressModelMapper.ensureInitialized() - .isValueEqual(this as PgrAddressModel, other)); + return PgrAddressModelMapper.ensureInitialized() + .equalsValue(this as PgrAddressModel, other); } @override @@ -408,10 +406,8 @@ mixin GeoLocationMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - GeoLocationMapper.ensureInitialized() - .isValueEqual(this as GeoLocation, other)); + return GeoLocationMapper.ensureInitialized() + .equalsValue(this as GeoLocation, other); } @override diff --git a/packages/complaints/lib/models/pgr_complaints.mapper.dart b/packages/complaints/lib/models/pgr_complaints.mapper.dart index be32e8224..6eeec0982 100644 --- a/packages/complaints/lib/models/pgr_complaints.mapper.dart +++ b/packages/complaints/lib/models/pgr_complaints.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pgr_complaints.dart'; @@ -93,10 +93,8 @@ mixin PgrComplaintModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplaintModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplaintModel, other)); + return PgrComplaintModelMapper.ensureInitialized() + .equalsValue(this as PgrComplaintModel, other); } @override @@ -321,10 +319,8 @@ mixin PgrServiceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceModel, other)); + return PgrServiceModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceModel, other); } @override @@ -609,10 +605,8 @@ mixin PgrComplainantModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplainantModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplainantModel, other)); + return PgrComplainantModelMapper.ensureInitialized() + .equalsValue(this as PgrComplainantModel, other); } @override @@ -828,10 +822,8 @@ mixin PgrRolesModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrRolesModelMapper.ensureInitialized() - .isValueEqual(this as PgrRolesModel, other)); + return PgrRolesModelMapper.ensureInitialized() + .equalsValue(this as PgrRolesModel, other); } @override @@ -989,10 +981,8 @@ mixin PgrWorkflowModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrWorkflowModelMapper.ensureInitialized() - .isValueEqual(this as PgrWorkflowModel, other)); + return PgrWorkflowModelMapper.ensureInitialized() + .equalsValue(this as PgrWorkflowModel, other); } @override @@ -1226,10 +1216,8 @@ mixin PgrServiceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceSearchModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceSearchModel, other)); + return PgrServiceSearchModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceSearchModel, other); } @override @@ -1450,10 +1438,8 @@ mixin PgrFiltersMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrFiltersMapper.ensureInitialized() - .isValueEqual(this as PgrFilters, other)); + return PgrFiltersMapper.ensureInitialized() + .equalsValue(this as PgrFilters, other); } @override @@ -1601,10 +1587,8 @@ mixin PgrSearchKeysMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrSearchKeysMapper.ensureInitialized() - .isValueEqual(this as PgrSearchKeys, other)); + return PgrSearchKeysMapper.ensureInitialized() + .equalsValue(this as PgrSearchKeys, other); } @override @@ -1734,10 +1718,8 @@ mixin PgrAdditionalDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrAdditionalDetailsMapper.ensureInitialized() - .isValueEqual(this as PgrAdditionalDetails, other)); + return PgrAdditionalDetailsMapper.ensureInitialized() + .equalsValue(this as PgrAdditionalDetails, other); } @override diff --git a/packages/complaints/lib/models/pgr_complaints_response.mapper.dart b/packages/complaints/lib/models/pgr_complaints_response.mapper.dart index be1b0230e..7a21f6b75 100644 --- a/packages/complaints/lib/models/pgr_complaints_response.mapper.dart +++ b/packages/complaints/lib/models/pgr_complaints_response.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pgr_complaints_response.dart'; @@ -98,10 +98,8 @@ mixin PgrServiceCreateResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceCreateResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceCreateResponseModel, other)); + return PgrServiceCreateResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceCreateResponseModel, other); } @override @@ -281,10 +279,8 @@ mixin PgrComplaintResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplaintResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplaintResponseModel, other)); + return PgrComplaintResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrComplaintResponseModel, other); } @override @@ -507,10 +503,8 @@ mixin PgrServiceResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrServiceResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrServiceResponseModel, other)); + return PgrServiceResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrServiceResponseModel, other); } @override @@ -763,10 +757,8 @@ mixin PgrComplainantResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - PgrComplainantResponseModelMapper.ensureInitialized() - .isValueEqual(this as PgrComplainantResponseModel, other)); + return PgrComplainantResponseModelMapper.ensureInitialized() + .equalsValue(this as PgrComplainantResponseModel, other); } @override diff --git a/packages/complaints/lib/pages/complaints_acknowledgement.dart b/packages/complaints/lib/pages/complaints_acknowledgement.dart index 968a452e6..09bc70f70 100644 --- a/packages/complaints/lib/pages/complaints_acknowledgement.dart +++ b/packages/complaints/lib/pages/complaints_acknowledgement.dart @@ -1,8 +1,9 @@ - import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:flutter/material.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; +import 'package:flutter/material.dart'; import '../utils/i18_key_constants.dart' as i18; @@ -24,19 +25,39 @@ class ComplaintsAcknowledgementPageState extends LocalizedState { @override Widget build(BuildContext context) { + final theme= Theme.of(context); + final textTheme =theme.digitTextTheme(context); return Scaffold( - body: DigitAcknowledgement.success( - action: () { - context.router.maybePop(); - }, - actionLabel: - localizations.translate(i18.complaints.acknowledgementAction), - description: localizations.translate( - i18.complaints.acknowledgementDescription, - ), - label: localizations.translate(i18.complaints.acknowledgementLabel), - subLabel: - "${localizations.translate(i18.complaints.acknowledgementSubLabelMain)}\n${localizations.translate(i18.complaints.acknowledgementSubLabelSub)}", + body: PanelCard( + title: localizations.translate(i18.complaints.acknowledgementLabel), + type: PanelType.success, + additionalDetails: [ + Text(localizations.translate( + i18.complaints.acknowledgementSubLabelMain) + , + style: textTheme.bodyS.copyWith( + color: theme.colorTheme.paper.primary + ), + ), + Text(localizations.translate( + i18.complaints.acknowledgementSubLabelSub), + style: textTheme.bodyS.copyWith( + color: theme.colorTheme.paper.primary + ), + ), + ], + description: localizations.translate( + i18.complaints.acknowledgementDescription, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.complaints.acknowledgementAction), + onPressed: () => context.router.maybePop(), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + ) + ], ), ); } diff --git a/packages/complaints/lib/pages/inbox/complaints_details_view.dart b/packages/complaints/lib/pages/inbox/complaints_details_view.dart index 368a8c8df..da65714e5 100644 --- a/packages/complaints/lib/pages/inbox/complaints_details_view.dart +++ b/packages/complaints/lib/pages/inbox/complaints_details_view.dart @@ -1,7 +1,9 @@ -import 'package:auto_route/annotations.dart'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_divider.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:recase/recase.dart'; @@ -25,249 +27,105 @@ class ComplaintsDetailsViewPage extends StatelessWidget { final router = context.router; final theme = Theme.of(context); final localizations = ComplaintsLocalization.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: Column( children: [ const BackNavigationHelpHeaderWidget(), Align( alignment: Alignment.centerLeft, child: Padding( - padding: const EdgeInsets.only(left: 8.0, top: 20.0), + padding: const EdgeInsets.only(left: spacer2, top: spacer2, bottom: spacer2), child: Text( localizations .translate(i18.complaints.complaintsDetailsLabel), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), ), ), ], ), - footer: SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - router.pop(); - }, - child: Center( - child: Text( - localizations.translate(i18.common.corecommonclose), - ), + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + onPressed: () { + router.pop(); + }, + label: localizations.translate(i18.common.corecommonclose), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, ), - ), - ), - ), + ]), children: [ DigitCard( - child: Column( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxNumberLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.serviceRequestId ?? - "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", - style: TextStyle( - color: complaint.serviceRequestId != null - ? theme.colorScheme.secondary - : const DigitColors().woodsmokeBlack, - ), - ), - ), - ], + LabelValueSummary( + padding: EdgeInsets.zero, + items: [ + LabelValueItem( + label: localizations.translate(i18.complaints.inboxNumberLabel), + value: complaint.serviceRequestId ?? + "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", + valueTextStyle: complaint.serviceRequestId !=null ? textTheme.bodyS.copyWith(color: theme.colorTheme.primary.primary1) : null , + labelFlex: 5, ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxTypeLabel), - style: theme.textTheme.headlineSmall, - ), + LabelValueItem( + label: localizations.translate(i18.complaints.inboxTypeLabel), + value: localizations.translate( + complaint.serviceCode.snakeCase.toUpperCase().trim(), ), - Expanded( - flex: 2, - child: Text( - localizations.translate( - complaint.serviceCode.snakeCase - .toUpperCase() - .trim(), - ), - ), - ), - ], + labelFlex: 5, ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxDateLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.auditDetails?.createdTime.toDateTime - .getFormattedDate() ?? - "", - ), - ), - ], + LabelValueItem( + label: localizations.translate(i18.complaints.inboxDateLabel), + value: complaint.auditDetails?.createdTime.toDateTime + .getFormattedDate() ?? + "", + labelFlex: 5, ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.complainantName), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.user.name ?? "", - ), - ), - ], + LabelValueItem( + label: localizations.translate(i18.complaints.complainantName), + value: complaint.user.name ?? "", + labelFlex: 5, ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxAreaLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.address.locality?.name ?? "", - ), - ), - ], + LabelValueItem( + label: localizations.translate(i18.complaints.inboxAreaLabel), + value: complaint.address.locality?.name ?? "", + labelFlex: 5, ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations.translate( - i18.complaints.complainantContactNumber, - ), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - complaint.user.mobileNumber ?? "", - ), - ), - ], + LabelValueItem( + label: localizations.translate( + i18.complaints.complainantContactNumber, + ), + value: complaint.user.mobileNumber ?? "", + labelFlex: 5, ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.inboxStatusLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - localizations.translate( - "COMPLAINTS_STATUS_${complaint.applicationStatus.name.snakeCase.toUpperCase()}", - ), - ), - ), - ], + LabelValueItem( + label: localizations.translate(i18.complaints.inboxStatusLabel), + value: localizations.translate( + "COMPLAINTS_STATUS_${complaint.applicationStatus.name.snakeCase.toUpperCase()}", + ), + labelFlex: 5, ), - ), - const DigitDivider(), - Padding( - padding: const EdgeInsets.only(top: 16, bottom: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 3, - child: Text( - localizations - .translate(i18.complaints.complaintDescription), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 2, - child: Text( - localizations.translate( - complaint.description, - ), - ), - ), - ], + LabelValueItem( + label: localizations + .translate(i18.complaints.complaintDescription), + value: localizations.translate( + complaint.description, + ), + labelFlex: 5, ), - ), - ], - ), - ), + ] + ) + ]), ], ), ); diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox.dart b/packages/complaints/lib/pages/inbox/complaints_inbox.dart index ed04baa35..3f1df3037 100644 --- a/packages/complaints/lib/pages/inbox/complaints_inbox.dart +++ b/packages/complaints/lib/pages/inbox/complaints_inbox.dart @@ -1,7 +1,11 @@ -import 'package:auto_route/annotations.dart'; import 'package:auto_route/auto_route.dart'; import 'package:complaints/router/complaints_router.gm.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/app_logger.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:recase/recase.dart'; @@ -30,6 +34,7 @@ class ComplaintsInboxPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); final router = context.router; return Scaffold( @@ -38,7 +43,6 @@ class ComplaintsInboxPageState extends LocalizedState { final inboxItems = state.isFiltered ? state.filteredComplaints : state.complaints; - // TODO(ajil): Fix this scrollable component return Column( children: [ Expanded( @@ -52,85 +56,69 @@ class ComplaintsInboxPageState extends LocalizedState { SliverToBoxAdapter( child: Padding( padding: const EdgeInsets.only( - left: kPadding * 2, - bottom: kPadding, + left: spacer2 * 2, + bottom: spacer2, ), child: Text( localizations.translate( i18.complaints.inboxHeading, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), ), ), ...[ SliverToBoxAdapter( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.secondary, - padding: - const EdgeInsets.only(left: kPadding * 2), - ), - onPressed: () { - router.push(ComplaintsInboxSearchRoute()); - }, - child: Row( - children: [ - const Icon(Icons.search), - const SizedBox( - width: 5, - ), - Text(localizations.translate( + child: Padding( + padding: const EdgeInsets.only(bottom: spacer2), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.only(left: spacer2 * 2), + child: DigitButton( + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + prefixIcon: Icons.search, + label: localizations.translate( i18.complaints.searchCTA, - )), - ], + ), + onPressed: () { + router.push(ComplaintsInboxSearchRoute()); + }, + ), ), - ), - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.secondary, + Padding( padding: EdgeInsets.zero, - ), - onPressed: () { - router.push(ComplaintsInboxFilterRoute()); - }, - child: Row( - children: [ - const Icon(Icons.filter_list_alt), - const SizedBox( - width: 5, - ), - Text(localizations.translate( + child: DigitButton( + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + label: localizations.translate( i18.complaints.filterCTA, - )), - ], + ), + prefixIcon: Icons.filter_list_alt, + onPressed: () { + router.push(ComplaintsInboxFilterRoute()); + }, + ), ), - ), - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.secondary, + Padding( padding: - const EdgeInsets.only(right: kPadding * 2), - ), - onPressed: () { - router.push(ComplaintsInboxSortRoute()); - }, - child: Row( - children: [ - const Icon(Icons.segment), - const SizedBox( - width: 5, - ), - Text(localizations.translate( + const EdgeInsets.only(right: spacer2 * 2), + child: DigitButton( + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + label: localizations.translate( i18.complaints.sortCTA, - )), - ], + ), + prefixIcon: Icons.segment, + onPressed: () { + router.push(ComplaintsInboxSortRoute()); + }, + ), ), - ), - ], + ], + ), ), ), SliverList( @@ -165,43 +153,41 @@ class ComplaintsInboxPageState extends LocalizedState { ], ), ), - SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - var loggedInUserUuid = - ComplaintsSingleton().loggedInUserUuid; - final bloc = context.read(); - - await router.push( - ComplaintsRegistrationWrapperRoute(), - ); + DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + label: localizations.translate( + i18.complaints.fileComplaintAction, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + var loggedInUserUuid = + ComplaintsSingleton().loggedInUserUuid; + final bloc = context.read(); - try { - bloc.add( - ComplaintInboxLoadComplaintsEvent( - createdByUserId: loggedInUserUuid, - ), - ); - } catch (error) { - AppLogger.instance.error( - title: 'Error', - message: 'Error while loading complaints', + await router.push( + ComplaintsRegistrationWrapperRoute(), ); - } - }, - child: Center( - child: Text( - localizations.translate( - i18.complaints.fileComplaintAction, - ), - ), + + try { + bloc.add( + ComplaintInboxLoadComplaintsEvent( + createdByUserId: loggedInUserUuid, + ), + ); + } catch (error) { + AppLogger.instance.error( + title: 'Error', + message: 'Error while loading complaints', + ); + } + }, ), - ), - ), - ), + ]), ], ); }, @@ -223,163 +209,66 @@ class _ComplaintsInboxItem extends StatelessWidget { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return DigitCard( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxNumberLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - item.serviceRequestId ?? - "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", - style: TextStyle( - color: item.serviceRequestId != null - ? theme.colorScheme.secondary - : const DigitColors().woodsmokeBlack, - ), - ), - ), - ], - ), + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + items: [ + LabelValueItem( + label: localizations + .translate(i18.complaints.inboxNumberLabel), + value: item.serviceRequestId ?? + "${localizations.translate(i18.complaints.inboxNotGeneratedLabel)}\n${localizations.translate(i18.complaints.inboxSyncRequiredLabel)}", + valueTextStyle: item.serviceRequestId !=null ? textTheme.bodyS.copyWith(color: theme.colorTheme.primary.primary1) : null , + labelFlex: 5, ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxTypeLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - localizations.translate( - item.serviceCode.snakeCase.toUpperCase().trim(), - ), - ), - ), - ], + LabelValueItem( + label: localizations.translate(i18.complaints.inboxTypeLabel), + value: localizations.translate( + item.serviceCode.snakeCase.toUpperCase().trim(), ), + labelFlex: 5, ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxDateLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - item.auditDetails?.createdTime.toDateTime - .getFormattedDate() ?? - "", - ), - ), - ], - ), + LabelValueItem( + label: + localizations.translate(i18.complaints.inboxDateLabel), + value: item.auditDetails?.createdTime.toDateTime + .getFormattedDate() ?? + "", + labelFlex: 5, ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxAreaLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - item.address.locality?.name ?? "", - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: 8), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - flex: 2, - child: Text( - localizations.translate(i18.complaints.inboxStatusLabel), - style: theme.textTheme.headlineSmall, - ), - ), - Expanded( - flex: 3, - child: Text( - localizations.translate( - "COMPLAINTS_STATUS_${item.applicationStatus.name.snakeCase.toUpperCase()}", - ), - ), - ), - ], - ), + + LabelValueItem( + label: + localizations.translate(i18.complaints.inboxAreaLabel), + value: item.address.locality?.name ?? "", + labelFlex: 5, ), - Padding( - padding: const EdgeInsets.only(top: kPadding * 2), - child: Row( - children: [ - Expanded( - flex: 1, - child: OutlinedButton( - onPressed: () { - context.router.push(ComplaintsDetailsViewRoute( - complaint: item, - )); - }, - style: OutlinedButton.styleFrom( - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, - ), - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), - ), - child: Text( - localizations.translate(i18.searchBeneficiary.iconLabel), - style: DigitTheme - .instance.mobileTheme.textTheme.headlineSmall - ?.apply( - color: theme.colorScheme.secondary, - ), - ), - ), - ), - ], - ), + LabelValueItem( + label: localizations + .translate(i18.complaints.inboxStatusLabel), + value: localizations.translate( + "COMPLAINTS_STATUS_${item.applicationStatus.name.snakeCase.toUpperCase()}", + ), + labelFlex: 5, ), ], ), - ); + DigitButton( + label: + localizations.translate(i18.searchBeneficiary.iconLabel), + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.router.push(ComplaintsDetailsViewRoute( + complaint: item, + )); + }, + ), + ]); } } diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox_filter.dart b/packages/complaints/lib/pages/inbox/complaints_inbox_filter.dart index 64afb6256..1f643f9bc 100644 --- a/packages/complaints/lib/pages/inbox/complaints_inbox_filter.dart +++ b/packages/complaints/lib/pages/inbox/complaints_inbox_filter.dart @@ -1,14 +1,12 @@ import 'dart:collection'; - - import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_checkbox.dart'; - import 'package:digit_data_model/models/entities/pgr_application_status.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:recase/recase.dart'; @@ -53,6 +51,7 @@ class ComplaintsInboxFilterPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( backgroundColor: theme.colorScheme.onPrimary, @@ -78,22 +77,20 @@ class ComplaintsInboxFilterPageState Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, + Padding( + padding: EdgeInsets.zero, + child: DigitButton( + label: "", + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + onPressed: () => context.router.maybePop(), + prefixIcon: Icons.close, ), - onPressed: () => context.router.maybePop(), - child: const Row( - children: [ - Icon(Icons.close), - ], - ), - ), + ) ], ), Padding( - padding: const EdgeInsets.only(left: 16), + padding: const EdgeInsets.only(left: spacer4), child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -106,114 +103,95 @@ class ComplaintsInboxFilterPageState localizations.translate( i18.complaints.complaintInboxFilterHeading, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), Padding( - padding: const EdgeInsets.only(left: 5), - child: TextButton( - onPressed: () { - clearFilters(formGroup); - }, - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: const EdgeInsets.all(9), - side: BorderSide( - width: 1, - color: theme.colorScheme.outline, - ), - ), - child: const Column( - children: [ - Icon(Icons.autorenew), - ], - ), - ), - ), + padding: const EdgeInsets.only(left: spacer1), + child: DigitButton( + label: "", + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + onPressed: () { + clearFilters(formGroup); + }, + prefixIcon: Icons.autorenew, + )), ], ), ), ], ), - enableFixedButton: true, - footer: SizedBox( - child: DigitCard( - 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: DigitOutLineButton( - label: localizations.translate( - i18.complaints.complaintsFilterClearAll, - ), - onPressed: () { - clearFilters(formGroup); - }, - buttonStyle: OutlinedButton.styleFrom( - shape: const BeveledRectangleBorder(), - padding: const EdgeInsets.all(14), - side: BorderSide( - width: 1.0, - color: theme.colorScheme.secondary, + enableFixedDigitButton: true, + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + label: localizations.translate( + i18.complaints.complaintsFilterClearAll, ), + onPressed: () { + clearFilters(formGroup); + }, ), ), - ), - const SizedBox(width: 10), - Expanded( - flex: 1, - child: DigitElevatedButton( - onPressed: () { - if (!formGroup.valid) return; + const SizedBox(width: 10), + Expanded( + flex: 1, + child: DigitButton( + label: localizations + .translate(i18.complaints.filterCTA), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { + if (!formGroup.valid) return; - final bloc = context.read(); + final bloc = + context.read(); - final assignedTo = formGroup - .control(_complaintAssignmentType) - .value as String?; + final assignedTo = formGroup + .control(_complaintAssignmentType) + .value as String?; - final complaintType = formGroup - .control(_complaintType) - .value as String?; + final complaintType = formGroup + .control(_complaintType) + .value as String?; - final locality = formGroup - .control(_complaintLocality) - .value as String?; + final locality = formGroup + .control(_complaintLocality) + .value as String?; - bloc.add( - ComplaintInboxFilterComplaintsEvent( - complaintAssignedTo: assignedTo, - currentUserName: - ComplaintsSingleton().loggedInUserName, - complaintTypeCode: complaintType, - locality: locality, - complaintStatus: statuses.toList(), - createdByUserId: - ComplaintsSingleton().loggedInUserUuid, - ), - ); + bloc.add( + ComplaintInboxFilterComplaintsEvent( + complaintAssignedTo: assignedTo, + currentUserName: + ComplaintsSingleton().loggedInUserName, + complaintTypeCode: complaintType, + locality: locality, + complaintStatus: statuses.toList(), + createdByUserId: + ComplaintsSingleton().loggedInUserUuid, + ), + ); - context.router.pop(); - }, - child: Center( - child: Text( - localizations - .translate(i18.complaints.filterCTA), - ), + context.router.pop(); + }, ), ), - ), - ], - ), - ), - ), + ], + ), + ]), children: [ Padding( - padding: const EdgeInsets.all(16), + padding: const EdgeInsets.all(spacer4), child: Column( children: [ BlocBuilder( @@ -263,86 +241,123 @@ class ComplaintsInboxFilterPageState BlocBuilder( builder: (context, state) { - return RadioGroup.builder( - groupValue: formGroup - .control(_complaintAssignmentType) - .value ?? - "", - onChanged: (changedValue) { - setState(() { - formGroup - .control(_complaintAssignmentType) - .value = changedValue; - }); - }, - items: _complaintAssignmentTypes, - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate(item.trim()), + return Align( + alignment: Alignment.topLeft, + child: RadioList( + containerPadding: const EdgeInsets.only(bottom: spacer4), + radioDigitButtons: _complaintAssignmentTypes + .asMap() + .entries + .map((item) => RadioButtonModel( + code: item.value, + name: localizations.translate( + item.value.trim()), + )) + .toList(), + groupValue: formGroup + .control( + _complaintAssignmentType) + .value ?? + "", + onChanged: (changedValue) { + setState(() { + formGroup + .control( + _complaintAssignmentType) + .value = changedValue.code; + }); + }, ), ); }, ), - DigitReactiveSearchDropdown( + LabeledField( label: localizations.translate( i18.complaints.complaintsTypeHeading, ), - form: formGroup, - menuItems: complaintTypes.toList(), - formControlName: _complaintType, - valueMapper: (value) { - return localizations.translate( - value - .toString() - .trim() - .snakeCase - .toUpperCase(), - ); - }, - emptyText: localizations - .translate(i18.common.noMatchFound), + child: DigitDropdown( + items: complaintTypes + .toList() + .asMap() + .entries + .map((item) => DropdownItem( + name: localizations.translate( + item.value + .toString() + .trim() + .snakeCase + .toUpperCase()), + code: item.value, + )) + .toList(), + emptyItemText: localizations + .translate(i18.common.noMatchFound), + isSearchable: true, + onSelect: (value) => formGroup + .control(_complaintType) + .value = value.code, + ), ), - DigitReactiveSearchDropdown( - label: localizations - .translate(i18.complaints.locality), - form: formGroup, - menuItems: locality.toList(), - formControlName: _complaintLocality, - valueMapper: (value) => localizations - .translate(value.toString().trim()), - emptyText: localizations - .translate(i18.common.noMatchFound), + Padding( + padding: const EdgeInsets.only(top: spacer4), + child: LabeledField( + label: localizations + .translate(i18.complaints.locality), + child: DigitDropdown( + items: locality + .toList() + .asMap() + .entries + .map((item) => DropdownItem( + name: localizations.translate( + item.value + .toString() + .trim()), + code: item.value, + )) + .toList(), + emptyItemText: localizations + .translate(i18.common.noMatchFound), + onSelect: (value) => formGroup + .control(_complaintLocality) + .value = value.code, + ), + ), ), if (uniqueStatuses.isNotEmpty) ...[ - LabeledField( - label: localizations.translate( - i18.complaints.inboxStatusLabel, - ), - child: Column( - children: [ - ...uniqueStatuses.map((e) => Padding( - padding: const EdgeInsets.only( - top: 16, - ), - child: DigitCheckbox( - label: - '${localizations.translate('COMPLAINTS_STATUS_${e.name.snakeCase.toUpperCase()}')} (${statusCount[e.index]})', - value: selected[e] ?? false, - onChanged: (value) { - setState(() { - if (selected[e]!) { - statuses.remove(e); - selected[e] = false; + Padding( + padding: const EdgeInsets.only(top: spacer4), + child: LabeledField( + label: localizations.translate( + i18.complaints.inboxStatusLabel, + ), + child: Column( + children: [ + ...uniqueStatuses.map((e) => Padding( + padding: const EdgeInsets.only( + top: spacer2, + ), + child: DigitCheckbox( + label: + '${localizations.translate('COMPLAINTS_STATUS_${e.name.snakeCase.toUpperCase()}')} (${statusCount[e.index]})', + value: selected[e] ?? false, + onChanged: (value) { + setState(() { + if (selected[e]!) { + statuses.remove(e); + selected[e] = false; - return; - } + return; + } - selected[e] = true; - statuses.add(e); - }); - }, - ), - )), - ], + selected[e] = true; + statuses.add(e); + }); + }, + ), + )), + ], + ), ), ), ], diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox_search.dart b/packages/complaints/lib/pages/inbox/complaints_inbox_search.dart index c44542c29..50af6eb82 100644 --- a/packages/complaints/lib/pages/inbox/complaints_inbox_search.dart +++ b/packages/complaints/lib/pages/inbox/complaints_inbox_search.dart @@ -1,6 +1,7 @@ - import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -32,6 +33,7 @@ class ComplaintsInboxSearchPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); final bloc = context.read(); return Scaffold( @@ -47,22 +49,20 @@ class ComplaintsInboxSearchPageState Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () => context.router.pop(), - child: const Row( - children: [ - Icon(Icons.close), - ], + Padding( + padding: EdgeInsets.zero, + child: DigitButton( + label: "", + onPressed: () => context.router.pop(), + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + prefixIcon: Icons.close, ), - ), + ) ], ), Padding( - padding: const EdgeInsets.only(left: 20), + padding: const EdgeInsets.only(left: spacer5), child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -71,94 +71,103 @@ class ComplaintsInboxSearchPageState localizations.translate( i18.complaints.complaintInboxSearchHeading, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), ], ), ), ], ), - footer: SizedBox( - child: DigitCard( - 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: DigitElevatedButton( - onPressed: () { - formGroup.markAllAsTouched(); + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + mainAxisSize: MainAxisSize.max, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + label: localizations + .translate(i18.complaints.searchCTA), + onPressed: () { + formGroup.markAllAsTouched(); - if (!formGroup.valid) return; + if (!formGroup.valid) return; - final complaintNumberValue = - formGroup.control(_complaintNumber).value; - final mobileNumberValue = - formGroup.control(_mobileNumber).value; + final complaintNumberValue = + formGroup.control(_complaintNumber).value; + final mobileNumberValue = + formGroup.control(_mobileNumber).value; - bloc.add( - ComplaintInboxSearchComplaintsEvent( - mobileNumber: mobileNumberValue == "" - ? null - : mobileNumberValue, - complaintNumber: complaintNumberValue == "" + bloc.add( + ComplaintInboxSearchComplaintsEvent( + mobileNumber: mobileNumberValue == "" + ? null + : mobileNumberValue, + complaintNumber: + complaintNumberValue == "" ? null : complaintNumberValue, - createdByUserId: ComplaintsSingleton().loggedInUserUuid, - ), - ); - - context.router.pop(); - }, - child: Center( - child: Text( - localizations - .translate(i18.complaints.searchCTA), - ), + createdByUserId: ComplaintsSingleton() + .loggedInUserUuid, ), - ), - ), - ], - ), - ), - ), + ); + + context.router.pop(); + }, + ), + ]), children: [ Column( children: [ BlocBuilder( builder: (context, state) { return Padding( - padding: const EdgeInsets.all(kPadding * 2), + padding: const EdgeInsets.all(spacer2 * 2), child: Column( children: [ - DigitTextFormField( - formControlName: _complaintNumber, - label: localizations.translate( - i18.complaints.inboxNumberLabel, - ), - maxLength: 65, - ), - DigitTextFormField( - formControlName: _mobileNumber, - label: localizations.translate( - i18.common.coreCommonMobileNumber, - ), - maxLength: 10, - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - validationMessages: { - 'mobileNumber': (object) => - localizations.translate(i18 - .individualDetails - .mobileNumberInvalidFormatValidationMessage), - }, - ), + ReactiveWrapperField( + formControlName: _complaintNumber, + builder: (context) { + return LabeledField( + label: localizations.translate( + i18.complaints.inboxNumberLabel, + ), + child: DigitTextFormInput( + onChange: (value){ + formGroup.control(_complaintNumber).value = value; + }, + charCount: true, + maxLength: 65, + ), + ); + }), + ReactiveWrapperField( + formControlName: _mobileNumber, + showErrors: (control) => control.invalid && control.touched, + validationMessages: { + 'mobileNumber': (object) => + localizations.translate(i18 + .individualDetails + .mobileNumberInvalidFormatValidationMessage), + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.common.coreCommonMobileNumber, + ), + child: DigitTextFormInput( + charCount: true, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter + .digitsOnly, + ], + onChange: (value)=>formGroup.control(_mobileNumber).value=value, + errorMessage: field.errorText, + maxLength: 10, + ), + ); + }), ], ), ); @@ -182,7 +191,8 @@ class ComplaintsInboxSearchPageState value: state.searchKeys?.complaintNumber, ), _mobileNumber: FormControl( - validators: [CustomValidator.validMobileNumber], + validators: [Validators.delegate( + (validator) => CustomValidator.validMobileNumber(validator))], value: state.searchKeys?.complainantMobileNumber, ), }); diff --git a/packages/complaints/lib/pages/inbox/complaints_inbox_sort.dart b/packages/complaints/lib/pages/inbox/complaints_inbox_sort.dart index 8a512e36e..57516c9fd 100644 --- a/packages/complaints/lib/pages/inbox/complaints_inbox_sort.dart +++ b/packages/complaints/lib/pages/inbox/complaints_inbox_sort.dart @@ -1,9 +1,11 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; import 'package:reactive_forms/reactive_forms.dart'; import '/blocs/complaints_inbox/complaints_inbox.dart'; @@ -36,6 +38,7 @@ class ComplaintsInboxSortPageState final theme = Theme.of(context); final bloc = context.read(); final router = context.router; + final textTheme = theme.digitTextTheme(context); return Scaffold( backgroundColor: theme.colorScheme.onPrimary, @@ -52,22 +55,20 @@ class ComplaintsInboxSortPageState Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - TextButton( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () => context.router.pop(), - child: const Row( - children: [ - Icon(Icons.close), - ], + Padding( + padding: EdgeInsets.zero, + child: DigitButton( + label: "", + onPressed: () => context.router.pop(), + type: DigitButtonType.tertiary, + size: DigitButtonSize.large, + prefixIcon: Icons.close, ), ), ], ), Padding( - padding: const EdgeInsets.only(left: 20), + padding: const EdgeInsets.only(left: spacer5), child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, @@ -76,83 +77,69 @@ class ComplaintsInboxSortPageState localizations.translate( i18.complaints.complaintInboxSortHeading, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), ], ), ), ], ), - footer: SizedBox( - child: DigitCard( - 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: DigitElevatedButton( - onPressed: () { - formGroup.markAllAsTouched(); + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + padding: const EdgeInsets.all(spacer2), + children: [DigitButton( + type: DigitButtonType.primary, + size: DigitButtonSize.large, + label: localizations + .translate(i18.complaints.sortCTA), + mainAxisSize: MainAxisSize.max, + onPressed: () { + formGroup.markAllAsTouched(); - var sortOrder = - formGroup.control(_sortOrder).value; + var sortOrder = + formGroup.control(_sortOrder).value; - if (!formGroup.valid || sortOrder == null) { - return; - } + if (!formGroup.valid || sortOrder == null) { + return; + } - bloc.add( - ComplaintInboxSortComplaintsEvent( - sortOrder, - ), - ); - router.pop(); - }, - child: Center( - child: Text( - localizations - .translate(i18.complaints.sortCTA), - ), - ), - ), + bloc.add( + ComplaintInboxSortComplaintsEvent( + sortOrder, ), - ], - ), - ), + ); + router.pop(); + }, + ),] ), children: [ - Column( - children: [ - Column( - children: [ - BlocBuilder( - builder: (context, state) { - // TODO(neel): Use Reactive components if possible + BlocBuilder( + builder: (context, state) { - return RadioGroup.builder( - groupValue: - formGroup.control(_sortOrder).value ?? - "", - onChanged: (changedValue) { - setState(() { - formGroup.control(_sortOrder).value = - changedValue; - }); - }, - items: sortOrders, - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate(item.trim()), - ), - ); - }, - ), - ], - ), - ], + return Padding( + padding: const EdgeInsets.only(top: spacer2), + child: RadioList( + radioDigitButtons: sortOrders + .asMap() + .entries + .map( + (item)=>RadioButtonModel( + code: item.value, + name: localizations.translate(item.value.trim()), + ) + ).toList(), + groupValue: + formGroup.control(_sortOrder).value ?? + "", + onChanged: (changedValue) { + formGroup.control(_sortOrder).value = + changedValue.code; + }, + ), + ); + }, ), ], ); diff --git a/packages/complaints/lib/pages/registration/complaint_type.dart b/packages/complaints/lib/pages/registration/complaint_type.dart index f20cc19f1..32e7de2d4 100644 --- a/packages/complaints/lib/pages/registration/complaint_type.dart +++ b/packages/complaints/lib/pages/registration/complaint_type.dart @@ -2,20 +2,20 @@ import 'package:auto_route/auto_route.dart'; import 'package:complaints/complaints.dart'; import 'package:complaints/router/complaints_router.gm.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; import 'package:reactive_forms/reactive_forms.dart'; import 'package:recase/recase.dart'; - import '/utils/i18_key_constants.dart' as i18; import '/widgets/header/back_navigation_help_header.dart'; import '/widgets/localized.dart'; - @RoutePage() class ComplaintTypePage extends LocalizedStatefulWidget { const ComplaintTypePage({ @@ -36,6 +36,7 @@ class ComplaintTypePageState extends LocalizedState { final bloc = context.read(); final router = context.router; final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -55,147 +56,134 @@ class ComplaintTypePageState extends LocalizedState { header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), - enableFixedButton: true, + enableFixedDigitButton: true, 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, - ); - } else { - form.control(_otherComplaintType).setValidators( - [], - autoValidate: true, - ); - } - - setState(() { - form.markAllAsTouched(); - }); - - if (!form.valid) return; - - state.whenOrNull( - create: ( - - loading, - complaintType, - _, - addressModel, - complaintsDetailsModel, + cardType: CardType.primary, + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + mainAxisSize: MainAxisSize.max, + label: localizations.translate(i18.complaints.actionLabel), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + 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, - ), + bloc.add( + ComplaintsRegistrationEvent.saveComplaintType( + complaintType: + form.control(_complaintType).value, + otherComplaintDescription: + otherComplaintTypeValue, + ), + ); + }, ); - }, - ); - router.push(ComplaintsLocationRoute()); - }, - child: Center( - child: Text( - localizations.translate(i18.complaints.actionLabel), + router.push(ComplaintsLocationRoute()); + }, ), - ), - ), - ), + ]), 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.complaints.complaintsTypeHeading, - ), - style: theme.textTheme.displayMedium, - ), + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + Text( + localizations.translate( + i18.complaints.complaintsTypeHeading, ), - LabeledField( - label: localizations.translate( - i18.complaints.complaintsTypeLabel, - ), - child: RadioGroup.builder( - - groupValue: - form.control(_complaintType).value ?? "", - - onChanged: (changedValue) { - if (form.control(_complaintType).disabled) return; - - setState(() { - - form.control(_complaintType).value = - changedValue; - }); - }, - textStyle: TextStyle( - color: form.control(_complaintType).disabled - ? theme.colorScheme.shadow - : theme.colorScheme.onBackground, - - ), - items: ComplaintsSingleton().complaintTypes ?? [], - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate( - item.snakeCase.toUpperCase().trim(), + style: textTheme.headingXl, + ), + LabeledField( + label: localizations.translate( + i18.complaints.complaintsTypeLabel, + ), + child: RadioList( + containerPadding: const EdgeInsets.only(bottom: spacer4), + radioDigitButtons: (ComplaintsSingleton().complaintTypes?.isNotEmpty ?? false) + ? ComplaintsSingleton().complaintTypes! + .map( + (item) => RadioButtonModel( + code: item, + name: localizations.translate( + item.toString().snakeCase.toUpperCase().trim(), ), ), - ), + ).toList(): + [], + groupValue: + form.control(_complaintType).value ?? "", + onChanged: (changedValue) { + if (form.control(_complaintType).disabled) return; + setState(() { + form.control(_complaintType).value = + changedValue.code; + }); + }, ), - if (form.control(_complaintType).value == "Other") ...[ - DigitTextFormField( + ), + if (form.control(_complaintType).value == "Other") ...[ + ReactiveWrapperField( formControlName: _otherComplaintType, - label: "", - maxLength: 100, validationMessages: { 'required': (object) => localizations.translate( - i18.complaints.validationRequiredError, - ), - + i18.complaints.validationRequiredError, + ), }, - ), - ], - if (form.touched && - form.control(_complaintType).invalid) ...[ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.only( - top: 5, - bottom: 5, - ), - child: Text( - localizations.translate( - i18.complaints.validationRadioRequiredError, - ), - style: TextStyle( - color: DigitTheme.instance.colors.lavaRed, - ), - ), + showErrors: (control)=>control.invalid && control.touched, + builder: (field) { + return DigitTextFormInput( + charCount: true, + errorMessage: field.errorText, + initialValue: field.value, + onChange: (value) => form.control(_otherComplaintType).value=value, + ); + }), + ], + if (form.touched && + form.control(_complaintType).invalid) ...[ + Align( + alignment: Alignment.topLeft, + child: Text( + localizations.translate( + i18.complaints.validationRadioRequiredError, + ), + style: TextStyle( + color: theme.colorTheme.alert.error, ), ), - ], - const SizedBox(height: 16), + ), ], - ), - ), + ]), ), ], ); diff --git a/packages/complaints/lib/pages/registration/complaints_details.dart b/packages/complaints/lib/pages/registration/complaints_details.dart index f0c1d8d5d..5ec000717 100644 --- a/packages/complaints/lib/pages/registration/complaints_details.dart +++ b/packages/complaints/lib/pages/registration/complaints_details.dart @@ -1,19 +1,22 @@ - import 'package:auto_route/auto_route.dart'; import 'package:complaints/router/complaints_router.gm.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:group_radio_button/group_radio_button.dart'; +import 'package:intl/intl.dart'; import 'package:reactive_forms/reactive_forms.dart'; import '../../../blocs/complaints_registration/complaints_registration.dart'; import '../../../models/complaints.dart'; - import '../../../utils/i18_key_constants.dart' as i18; import '../../../utils/utils.dart'; import '../../../widgets/header/back_navigation_help_header.dart'; @@ -30,8 +33,7 @@ class ComplaintsDetailsPage extends LocalizedStatefulWidget { State createState() => ComplaintsDetailsPageState(); } -class ComplaintsDetailsPageState - extends LocalizedState { +class ComplaintsDetailsPageState extends LocalizedState { static const _dateOfComplaint = 'dateOfComplaint'; static const _administrativeArea = 'administrativeArea'; static const _complaintRaisedFor = 'complaintRaisedFor'; @@ -51,21 +53,20 @@ class ComplaintsDetailsPageState i18.complaints.raisedForMyself, i18.complaints.raisedForAnotherUser, ]; + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( form: () => bloc.state.map( create: (value) => buildForm(value), persisted: (value) => - - throw const InvalidComplaintsRegistrationStateException(), + throw const InvalidComplaintsRegistrationStateException(), view: (value) => buildForm(value), ), builder: (_, form, __) => BlocListener( listener: (context, state) { context.navigateTo(const ComplaintsInboxWrapperRoute()); }, - child: BlocConsumer( listener: (context, complaintState) { @@ -79,376 +80,401 @@ class ComplaintsDetailsPageState final isRaisedForSelf = form.control(_complaintRaisedFor).value == i18.complaints.raisedForMyself; - return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget(), ], ), - footer: SizedBox( - child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: - - const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () async { - setState(() { - form.markAllAsTouched(); - }); - - if (form.control(_complaintDetailsForm).disabled) { - router.parent()?.maybePop(); - } - - if (!form.valid){ - return; - } - - FocusManager.instance.primaryFocus?.unfocus(); - - final dateOfComplaint = - form.control(_dateOfComplaint).value as DateTime; - - final complaintRaisedFor = - form.control(_complaintRaisedFor).value as String; - - final complainantName = - form.control(_complainantName).value as String; - - final complainantContactNumber = form - .control(_complainantContactNumber) - .value as String; - - final supervisorName = - form.control(_supervisorName).value as String?; - - - final supervisorContactNumber = form - .control(_supervisorContactNumber) - .value as String?; - - final complaintDescription = - - form.control(_complaintDescription).value as String; - - - state.whenOrNull( - create: ( + footer: DigitCard( + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + label: form.control(_complaintDetailsForm).disabled + ? localizations + .translate(i18.complaints.backToInbox) + : localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + setState(() { + form.markAllAsTouched(); + }); + + if (form.control(_complaintDetailsForm).disabled) { + router.parent()?.maybePop(); + } + + if (!form.valid) { + return; + } + + FocusManager.instance.primaryFocus?.unfocus(); + + final dateOfComplaint = + form.control(_dateOfComplaint).value as DateTime; + + final complaintRaisedFor = + form.control(_complaintRaisedFor).value as String; + + final administrativeArea = + form.control(_administrativeArea).value as String; + + final complainantName = + form.control(_complainantName).value as String; + + final complainantContactNumber = form + .control(_complainantContactNumber) + .value as String; + + final supervisorName = + form.control(_supervisorName).value as String?; + + final supervisorContactNumber = form + .control(_supervisorContactNumber) + .value as String?; + + final complaintDescription = form + .control(_complaintDescription) + .value as String; + + state.whenOrNull( + create: ( loading, complaintType, _, addressModel, complaintsDetailsModel, - ) { - bloc.add( - ComplaintsRegistrationEvent.saveComplaintDetails( - boundaryModel: ComplaintsSingleton().boundary, - complaintsDetailsModel: ComplaintsDetailsModel( - administrativeArea: - ComplaintsSingleton().boundary.code.toString(), - dateOfComplaint: dateOfComplaint, - complaintRaisedFor: complaintRaisedFor, - complainantName: complainantName, - complainantContactNumber: - complainantContactNumber, - supervisorName: supervisorName, - supervisorContactNumber: - supervisorContactNumber, - - complaintDescription: complaintDescription, + ) { + bloc.add( + ComplaintsRegistrationEvent + .saveComplaintDetails( + boundaryModel: ComplaintsSingleton().boundary, + complaintsDetailsModel: + ComplaintsDetailsModel( + administrativeArea: ComplaintsSingleton() + .boundary + .code + .toString(), + dateOfComplaint: dateOfComplaint, + complaintRaisedFor: complaintRaisedFor, + complainantName: complainantName, + complainantContactNumber: + complainantContactNumber, + supervisorName: supervisorName, + supervisorContactNumber: + supervisorContactNumber, + complaintDescription: complaintDescription, + ), ), - ), - ); - }, - ); - - - final userId = ComplaintsSingleton().loggedInUserUuid; + ); + }, + ); + final userId = ComplaintsSingleton().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, + showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( + i18.complaints.dialogTitle, + ), + type: PopUpType.simple, + description: localizations.translate( + i18.complaints.dialogContent, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonSubmit, + ), + onPressed: () { + bloc.add( + ComplaintsRegistrationSubmitComplaintEvent( + userId: userId, + ), + ); + Navigator.of(context, rootNavigator: true) + .pop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + ), + DigitButton( + label: localizations.translate( + i18.common.coreCommonCancel, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ]), + ); + }, + ), + ]), + children: [ + DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + Text( + localizations.translate( + i18.complaints.complaintsDetailsLabel, + ), + style: textTheme.headingXl, + ), + LabeledField( + label: localizations.translate( + i18.complaints.dateOfComplaint, + ), + child: DigitDateFormInput( + isRequired: true, + readOnly: true, + initialValue: DateFormat('yyyy-MM-dd') + .format(form.control(_dateOfComplaint).value), + initialDate: DateTime.now(), + confirmText: localizations.translate( + i18.common.coreCommonOk, + ), + cancelText: localizations.translate( + i18.common.coreCommonCancel, + ), + ), + ), + LabeledField( + label: localizations.translate( + i18.householdLocation.administrationAreaFormLabel, + ), + child: DigitTextFormInput( + isRequired: true, + readOnly: true, + initialValue: form.control(_administrativeArea).value, + ), + ), + LabeledField( + label: localizations.translate( + i18.complaints.complainantTypeQuestion, + ), + isRequired: true, + child: Column( + children: [ + Align( + alignment: AlignmentDirectional.topStart, + child: Padding( + padding: const EdgeInsets.only(top: spacer2), + child: RadioList( + containerPadding: const EdgeInsets.only(bottom: spacer3), + radioDigitButtons: complainantRaisedFor + .map((item) => RadioButtonModel( + code: item, + name: + localizations.translate(item.trim()), + )) + .toList(), + groupValue: + form.control(_complaintRaisedFor).value ?? "", + onChanged: (changedValue) { + if (form.control(_complaintRaisedFor).disabled) + return; + + if (changedValue.code == + i18.complaints.raisedForAnotherUser) { + form.control(_complainantName).value = ""; + form.control(_complainantContactNumber).value = + ""; + } else { + form.control(_complainantName).value = + ComplaintsSingleton().userName; + form.control(_complainantContactNumber).value = + ComplaintsSingleton().userMobileNumber; + } + + setState(() { + form.control(_complaintRaisedFor).value = + changedValue.code; + }); + }, ), - action: (context) { - - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, + ), + if (form.touched && + form.control(_complaintRaisedFor).invalid) ...[ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only( + top: spacer1, + bottom: spacer1, + ), + child: Text( + localizations.translate(i18 + .complaints.validationRadioRequiredError), + style: TextStyle( + color: theme.colorTheme.alert.error, + ), + ), ), - action: (context) { - - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, ), - ), - ); - - if (submit != true) return; - - - bloc.add( - ComplaintsRegistrationSubmitComplaintEvent( - userId: userId, - ), - ); - - }, - child: Center( - child: Text( - form.control(_complaintDetailsForm).disabled - ? localizations - - .translate(i18.complaints.backToInbox) - : localizations - .translate(i18.common.coreCommonSubmit), - - ), + ], + ], ), ), - ), - ), - children: [ - DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.complaints.complaintsDetailsLabel, - ), - style: theme.textTheme.displayMedium, - ), - Column(children: [ - DigitDateFormPicker( + ReactiveWrapperField( + formControlName: _complainantName, + validationMessages: { + 'required': (object) => localizations.translate( + i18.complaints.validationRequiredError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '64'), + }, + builder: (field) { + return LabeledField( label: localizations.translate( - i18.complaints.dateOfComplaint, + i18.complaints.complainantName, ), - formControlName: _dateOfComplaint, isRequired: true, - isEnabled: false, - initialDate: DateTime.now(), - confirmText: localizations.translate( - i18.common.coreCommonOk, + child: DigitTextFormInput( + readOnly:(isRaisedForSelf)? + (field.value == null || field.value.isEmpty) + ? false + : true:false, + initialValue: field.value, + isRequired: true, + errorMessage: field.errorText, + onChange: (value) => form + .control(_complainantName) + .value = value, ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - ), - DigitTextFormField( - formControlName: _administrativeArea, + ); + }), + ReactiveWrapperField( + formControlName: _complainantContactNumber, + validationMessages: { + 'mobileNumber': (object) => + localizations.translate(i18.individualDetails + .mobileNumberInvalidFormatValidationMessage), + 'required': (object) => localizations.translate( + i18.complaints.validationRequiredError), + 'minLength': (object) => localizations.translate( + i18.complaints.validationMinLengthError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '10'), + }, + builder: (field) { + return LabeledField( label: localizations.translate( - i18.householdLocation.administrationAreaFormLabel, + i18.complaints.complainantContactNumber, ), isRequired: true, - readOnly: true, - ), - LabeledField( - label: "${localizations.translate( - i18.complaints.complainantTypeQuestion, - )} *", - child: Column( - children: [ - RadioGroup.builder( - groupValue: - - form.control(_complaintRaisedFor).value ?? - "", - - onChanged: (changedValue) { - if (form - .control(_complaintRaisedFor) - .disabled) return; - - if (changedValue == - i18.complaints.raisedForAnotherUser) { - form.control(_complainantName).value = ""; - form - .control(_complainantContactNumber) - .value = ""; - } - - else{ - form.control(_complainantName).value = - ComplaintsSingleton().userName; - form.control(_complainantContactNumber).value = - ComplaintsSingleton().userMobileNumber; - - } - - setState(() { - form.control(_complaintRaisedFor).value = - changedValue; - }); - }, - textStyle: TextStyle( - color: form - - .control(_complaintRaisedFor) - .disabled - - ? theme.colorScheme.shadow - : theme.colorScheme.onBackground, - ), - items: complainantRaisedFor, - itemBuilder: (item) => RadioButtonBuilder( - localizations.translate(item.trim()), - ), - ), - if (form.touched && - form - .control(_complaintRaisedFor) - .invalid) ...[ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.only( - top: 5, - bottom: 5, - ), - child: Text( - localizations.translate(i18.complaints - .validationRadioRequiredError), - style: TextStyle( - color: DigitTheme - .instance.colors.lavaRed, - ), - ), - ), - ), - ], + child: DigitTextFormInput( + readOnly: (isRaisedForSelf)?(field.value == + null || + field.value.isEmpty) + ? false + : true:false, + initialValue: field.value, + isRequired: true, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, ], + errorMessage: field.errorText, + onChange: (value) => form + .control(_complainantContactNumber) + .value = value, ), - ), - - Column( - children: [ - DigitTextFormField( - formControlName: _complainantName, - label: localizations.translate( - i18.complaints.complainantName, - ), - readOnly: isRaisedForSelf, - isRequired: true, - validationMessages: { - 'required': (object) => - localizations.translate(i18.complaints - .validationRequiredError), - 'maxLength': (object) => localizations - .translate( - i18.common.maxCharsRequired) - .replaceAll('{}', '64'), - }, - ), - DigitTextFormField( - formControlName: _complainantContactNumber, - label: localizations.translate( - i18.complaints.complainantContactNumber, - ), - readOnly: isRaisedForSelf, - isRequired: true, - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - validationMessages: { - 'mobileNumber': (object) => - localizations.translate(i18 - .individualDetails - .mobileNumberInvalidFormatValidationMessage), - 'required': (object) => - localizations.translate(i18.complaints - .validationRequiredError), - 'minLength': (object) => - localizations.translate(i18.complaints - .validationMinLengthError), - 'maxLength': (object) => localizations - .translate( - i18.common.maxCharsRequired) - .replaceAll('{}', '10'), - }, - ), - ], - ), - - DigitTextFormField( - formControlName: _supervisorName, + ); + }), + ReactiveWrapperField( + formControlName: _supervisorName, + validationMessages: { + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '64'), + }, + builder: (field) { + return LabeledField( label: localizations.translate( i18.complaints.supervisorName, ), - validationMessages: { - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '64'), - }, - ), - DigitTextFormField( - formControlName: _supervisorContactNumber, + child: DigitTextFormInput( + errorMessage: field.errorText, + initialValue: field.value, + onChange: (value) => + form.control(_supervisorName).value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _supervisorContactNumber, + showErrors: (control)=>control.touched, + validationMessages: { + 'mobileNumber': (object) => localizations.translate( + i18.individualDetails + .mobileNumberInvalidFormatValidationMessage, + ), + 'minLength': (object) => localizations.translate( + i18.complaints.validationMinLengthError), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '10'), + }, + builder: (field) { + return LabeledField( label: localizations.translate( i18.complaints.supervisorContactNumber, ), - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - validationMessages: { - 'mobileNumber': (object) => - localizations.translate( - i18.individualDetails - .mobileNumberInvalidFormatValidationMessage, - ), - 'minLength': (object) => localizations.translate( - i18.complaints.validationMinLengthError), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '10'), - }, - ), - DigitTextFormField( - formControlName: _complaintDescription, + child: DigitTextFormInput( + keyboardType: TextInputType.number, + initialValue: field.value, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + errorMessage: field.errorText, + onChange: (value) => form + .control(_supervisorContactNumber) + .value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _complaintDescription, + validationMessages: { + 'required': (object) => localizations.translate( + i18.complaints.validationRequiredError, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', '1000'), + }, + builder: (field) { + return LabeledField( label: localizations.translate( i18.complaints.complaintDescription, ), - minLines: 3, - maxLines: 3, isRequired: true, - validationMessages: { - 'required': (object) => localizations.translate( - - i18.complaints.validationRequiredError, - ), - - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', '1000'), - }, - ), - ]), - ], - ), - ), + child: DigitTextAreaFormInput( + initialValue: field.value, + maxLine: 3, + errorMessage: field.errorText, + isRequired: true, + onChange: (value) => form + .control(_complaintDescription) + .value = value, + ), + ); + }), + ]), ], ); }, @@ -472,11 +498,9 @@ class ComplaintsDetailsPageState validators: [], ), _administrativeArea: FormControl( - - value: localizations.translate( - (complaintDetails?.administrativeArea ?? ComplaintsSingleton().boundary.name) - .toString()), - + value: localizations.translate((complaintDetails?.administrativeArea ?? + ComplaintsSingleton().boundary.name) + .toString()), disabled: shouldDisableForm, validators: [Validators.required], ), @@ -495,7 +519,8 @@ class ComplaintsDetailsPageState disabled: shouldDisableForm, validators: [ Validators.required, - CustomValidator.validMobileNumber, + Validators.delegate( + (validator) => CustomValidator.validMobileNumber(validator)), Validators.minLength(10), Validators.maxLength(10) ], @@ -509,7 +534,8 @@ class ComplaintsDetailsPageState value: complaintDetails?.supervisorContactNumber, disabled: shouldDisableForm, validators: [ - CustomValidator.validMobileNumber, + Validators.delegate( + (validator) => CustomValidator.validMobileNumber(validator)), Validators.maxLength(10), Validators.minLength(10), ], diff --git a/packages/complaints/lib/pages/registration/complaints_location.dart b/packages/complaints/lib/pages/registration/complaints_location.dart index 9003d9cf3..a7f5df7f4 100644 --- a/packages/complaints/lib/pages/registration/complaints_location.dart +++ b/packages/complaints/lib/pages/registration/complaints_location.dart @@ -1,15 +1,16 @@ - +import 'dart:math'; import 'package:auto_route/auto_route.dart'; import 'package:complaints/router/complaints_router.gm.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.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'; - - import '../../models/pgr_address.dart'; import '/blocs/complaints_registration/complaints_registration.dart'; import '/utils/i18_key_constants.dart' as i18; @@ -17,7 +18,6 @@ import '/utils/utils.dart'; import '/widgets/header/back_navigation_help_header.dart'; import '/widgets/localized.dart'; - @RoutePage() class ComplaintsLocationPage extends LocalizedStatefulWidget { const ComplaintsLocationPage({ @@ -45,6 +45,7 @@ class ComplaintsLocationPageState final theme = Theme.of(context); final bloc = context.read(); final router = context.router; + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ReactiveFormBuilder( @@ -77,148 +78,157 @@ class ComplaintsLocationPageState ComplaintsRegistrationState>( builder: (context, state) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget(), ], ), footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - onPressed: () { - form.markAllAsTouched(); + cardType: CardType.primary, + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + label: + localizations.translate(i18.complaints.actionLabel), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + 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()); + }, ), - ), - ), - ), + ]), children: [ DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.only(bottom: kPadding), - child: Text( - localizations.translate( - i18.complaints.complaintsLocationLabel, - ), - style: theme.textTheme.displayMedium, - ), - ), - Column(children: [ - DigitTextFormField( - formControlName: _addressLine1Key, + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ + Text( + localizations.translate( + i18.complaints.complaintsLocationLabel, + ), + style: textTheme.headingXl, + ), + ReactiveWrapperField( + formControlName: _addressLine1Key, + showErrors: (control) => control.invalid, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.min2CharsRequired, + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + builder: (field) { + return LabeledField( label: localizations.translate( i18.householdLocation .householdAddressLine1LabelText, ), - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), - }, - ), - DigitTextFormField( - formControlName: _addressLine2Key, + child: DigitTextFormInput( + errorMessage: field.errorText, + initialValue: field.value, + onChange: (value) => form + .control(_addressLine1Key) + .value = value, + ), + ); + }), + ReactiveWrapperField( + formControlName: _addressLine2Key, + builder: (field) { + return LabeledField( label: localizations.translate( i18.householdLocation .householdAddressLine2LabelText, ), - 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, + padding: const EdgeInsets.only(top: spacer2 / 2), + child: DigitTextFormInput( + maxLength: maxLength, + initialValue: field.value, + onChange: (value) => form + .control(_addressLine2Key) + .value = value, + errorMessage: field.errorText, + ), + ); + }), + ReactiveWrapperField( + formControlName: _landmarkKey, + builder: (field) { + return LabeledField( label: localizations.translate( i18.householdLocation.landmarkFormLabel, ), - 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, - formControlName: _postalCodeKey, + padding: const EdgeInsets.only(top: spacer2 / 2), + child: DigitTextFormInput( + initialValue: field.value, + onChange: (value) => form + .control(_landmarkKey) + .value = value, + errorMessage: field.errorText, + ), + ); + }), + ReactiveWrapperField( + formControlName: _postalCodeKey, + builder: (field) { + return LabeledField( label: localizations.translate( i18.householdLocation.postalCodeFormLabel, ), - 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), - ), - ]), - ], - ), - ), + padding: const EdgeInsets.only(top: spacer2 / 3.5), + child: DigitTextFormInput( + keyboardType: TextInputType.text, + initialValue: field.value, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + onChange: (value) => form + .control(_postalCodeKey) + .value = value, + ), + ); + }), + ]), ], ); }, @@ -240,9 +250,8 @@ class ComplaintsLocationPageState value: addressModel?.buildingName, disabled: shouldDisableForm, validators: [ - - CustomValidator.requiredMin, - + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(maxLength), ], ), @@ -250,9 +259,8 @@ class ComplaintsLocationPageState value: addressModel?.street, disabled: shouldDisableForm, validators: [ - - CustomValidator.requiredMin, - + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(maxLength), ], ), @@ -260,9 +268,8 @@ class ComplaintsLocationPageState value: addressModel?.landmark, disabled: shouldDisableForm, validators: [ - - CustomValidator.requiredMin, - + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(maxLength), ], ), @@ -270,18 +277,16 @@ class ComplaintsLocationPageState value: addressModel?.pincode, disabled: shouldDisableForm, validators: [ - - CustomValidator.requiredMin, - + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(6), ], ), _latKey: FormControl( value: addressModel?.geoLocation?.latitude, validators: [ - - CustomValidator.requiredMin, - + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), ], ), _lngKey: FormControl( diff --git a/packages/complaints/lib/pages/registration/complaints_registration_wrapper.dart b/packages/complaints/lib/pages/registration/complaints_registration_wrapper.dart index 4e722115d..50dc872dc 100644 --- a/packages/complaints/lib/pages/registration/complaints_registration_wrapper.dart +++ b/packages/complaints/lib/pages/registration/complaints_registration_wrapper.dart @@ -1,7 +1,8 @@ import 'dart:convert'; import 'package:auto_route/auto_route.dart'; - +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:location/location.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -35,50 +36,55 @@ class ComplaintsRegistrationWrapperPage extends StatelessWidget @override Widget wrappedRoute(BuildContext context) { - return BlocProvider( - create: (context) { - ComplaintsRegistrationState initialState; - - final pgrItem = pgrServiceModel; - - if (pgrItem != null) { - final additionalDetails = PgrAdditionalDetails.fromJson( - jsonDecode(pgrItem.additionalDetail!), - ); - - initialState = ComplaintsRegistrationViewState( - complaintType: pgrItem.serviceCode, - addressModel: pgrItem.address, - complaintsDetailsModel: ComplaintsDetailsModel( - administrativeArea: pgrItem.address.locality?.name ?? '', - complainantContactNumber: pgrItem.user.mobileNumber ?? '', - complainantName: pgrItem.user.name ?? '', - complaintDescription: pgrItem.description, - complaintRaisedFor: - - ComplaintsSingleton().userMobileNumber != pgrItem.user.mobileNumber - ? 'Another user' - : 'Myself', - - dateOfComplaint: pgrItem.auditDetails?.createdTime.toDateTime ?? - DateTime.now(), - supervisorContactNumber: - additionalDetails.supervisorContactNumber ?? '', - supervisorName: additionalDetails.supervisorName ?? '', - ), - ); - } else { - initialState = const ComplaintsRegistrationCreateState(); - } - - return ComplaintsRegistrationBloc( - initialState, - - pgrServiceRepository: - context.repository(context), + return MultiBlocProvider( + providers: [ + BlocProvider(create: (context) => LocationBloc(location: Location()),), + BlocProvider(create: (context) { + ComplaintsRegistrationState initialState; + + final pgrItem = pgrServiceModel; + + if (pgrItem != null) { + final additionalDetails = PgrAdditionalDetails.fromJson( + jsonDecode(pgrItem.additionalDetail!), + ); + initialState = ComplaintsRegistrationViewState( + complaintType: pgrItem.serviceCode, + addressModel: pgrItem.address, + complaintsDetailsModel: ComplaintsDetailsModel( + administrativeArea: pgrItem.address.locality?.name ?? '', + complainantContactNumber: pgrItem.user.mobileNumber ?? '', + complainantName: pgrItem.user.name ?? '', + complaintDescription: pgrItem.description, + complaintRaisedFor: + + ComplaintsSingleton().userMobileNumber != pgrItem.user.mobileNumber + ? 'Another user' + : 'Myself', + + dateOfComplaint: pgrItem.auditDetails?.createdTime.toDateTime ?? + DateTime.now(), + supervisorContactNumber: + additionalDetails.supervisorContactNumber ?? '', + supervisorName: additionalDetails.supervisorName ?? '', + ), ); - }, + } else { + initialState = const ComplaintsRegistrationCreateState(); + } + + return ComplaintsRegistrationBloc( + initialState, + + pgrServiceRepository: + context.repository(context), + + ); + }, + ) + ], + child: this, ); } diff --git a/packages/complaints/lib/utils/constants.dart b/packages/complaints/lib/utils/constants.dart index 3186df232..2f23f6f43 100644 --- a/packages/complaints/lib/utils/constants.dart +++ b/packages/complaints/lib/utils/constants.dart @@ -1,3 +1,5 @@ - - -const String noResultSvg = 'assets/icons/svg/no_result.svg'; \ No newline at end of file +class Constants { + static String noResultSvg = 'assets/icons/svg/no_result.svg'; + static RegExp mobileNumberRegExp = + RegExp(r'^(?=.{10}$)[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'); +} diff --git a/packages/complaints/lib/widgets/boundary_selection_wrapper.dart b/packages/complaints/lib/widgets/boundary_selection_wrapper.dart index 5489b088f..176bbb9eb 100644 --- a/packages/complaints/lib/widgets/boundary_selection_wrapper.dart +++ b/packages/complaints/lib/widgets/boundary_selection_wrapper.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:complaints/router/complaints_router.gm.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/blocs/boundary/boundary.dart'; +import 'package:digit_ui_components/utils/app_logger.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/packages/complaints/lib/widgets/header/back_navigation_help_header.dart b/packages/complaints/lib/widgets/header/back_navigation_help_header.dart index 3bb5b41c3..65f84d33d 100644 --- a/packages/complaints/lib/widgets/header/back_navigation_help_header.dart +++ b/packages/complaints/lib/widgets/header/back_navigation_help_header.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; import 'package:flutter/material.dart'; import '/blocs/localization/app_localization.dart'; @@ -26,36 +29,35 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: const EdgeInsets.all(spacer2), child: Row( children: [ Expanded( child: Row( children: [ if (showBackNavigation) - Flexible( - child: TextButton.icon( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onSurface, - padding: EdgeInsets.zero, - ), - onPressed: () { - context.router.maybePop(); - handleBack != null ? handleBack!() : null; - }, - icon: const Icon(Icons.arrow_left_sharp), - label: Text( - ComplaintsLocalization.of(context).translate( - i18.common.coreCommonBack, - ), - overflow: TextOverflow.ellipsis, + + DigitBackButton(label: ComplaintsLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size:Theme.of(context).spacerTheme.spacer5, + color: Theme.of(context).colorTheme.primary.primary2, ), ), - ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) ], ), ), - SizedBox(width: showHelp ? kPadding * 2 : 0), + SizedBox(width: showHelp ? spacer2 * 2 : 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/complaints/lib/widgets/no_result_card/no_result_card.dart b/packages/complaints/lib/widgets/no_result_card/no_result_card.dart index fc7d52119..f7b27c178 100644 --- a/packages/complaints/lib/widgets/no_result_card/no_result_card.dart +++ b/packages/complaints/lib/widgets/no_result_card/no_result_card.dart @@ -23,7 +23,7 @@ class NoResultCard extends StatelessWidget { child: Column( children: [ SvgPicture.asset( - noResultSvg, + Constants.noResultSvg, width: 340, height: 200, ), diff --git a/packages/complaints/pubspec.lock b/packages/complaints/pubspec.lock index e451fcd62..20435b65a 100644 --- a/packages/complaints/pubspec.lock +++ b/packages/complaints/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" ansicolor: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -53,18 +53,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -133,10 +133,10 @@ packages: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -153,6 +153,46 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" + url: "https://pub.dev" + source: hosted + version: "0.3.5" characters: dependency: transitive description: @@ -161,6 +201,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -197,34 +245,42 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" coverage: dependency: transitive description: name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 + url: "https://pub.dev" + source: hosted + version: "1.11.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" - cupertino_icons: + version: "3.0.6" + csslib: dependency: transitive description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.0.2" dart_mappable: dependency: "direct main" description: @@ -237,11 +293,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -250,14 +306,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.6" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" diff_match_patch: dependency: transitive description: @@ -266,22 +314,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: + digit_data_model: dependency: "direct main" description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" + name: digit_data_model + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.2+1" - digit_data_model: + version: "1.0.5" + digit_ui_components: dependency: "direct main" description: - name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "0.0.2-dev.4" dio: dependency: "direct main" description: @@ -294,34 +342,26 @@ packages: dependency: transitive description: name: dio_web_adapter - sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - drift: - dependency: "direct main" - description: - name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" url: "https://pub.dev" source: hosted - version: "2.15.0" - drift_db_viewer: + version: "2.0.0" + dotted_border: dependency: transitive description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted version: "2.1.0" - easy_stepper: - dependency: transitive + drift: + dependency: "direct main" description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + name: drift + sha256: "4e0ffee40d23f0b809e6cff1ad202886f51d629649073ed42d9cd1d194ea943e" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.19.1+1" fake_async: dependency: transitive description: @@ -334,10 +374,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -346,99 +386,112 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + name: file_picker + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" url: "https://pub.dev" source: hosted - version: "1.1.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.0.7" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.6" - flutter_dotenv: - dependency: "direct main" + version: "0.9.3+2" + file_selector_macos: + dependency: transitive description: - name: flutter_dotenv - sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "5.2.1" - flutter_focus_watcher: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "0.9.3+3" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: - dependency: transitive + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "8.1.6" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.2.0" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + url: "https://pub.dev" + source: hosted + version: "2.0.22" flutter_spinkit: dependency: transitive description: @@ -447,27 +500,27 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" url: "https://pub.dev" source: hosted - version: "2.0.10+1" + version: "2.0.16" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -501,10 +554,58 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -517,18 +618,18 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" group_radio_button: dependency: "direct main" description: @@ -545,14 +646,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -569,22 +678,86 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" isar: dependency: "direct main" description: @@ -625,78 +798,102 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: - dependency: transitive + dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" lottie: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -745,62 +942,54 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: + path: dependency: transitive description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "2.0.1" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -829,10 +1018,10 @@ packages: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.2" platform: dependency: transitive description: @@ -849,14 +1038,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -889,22 +1070,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -913,14 +1086,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" shelf: dependency: transitive description: @@ -941,10 +1106,10 @@ packages: dependency: transitive description: name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.3" shelf_web_socket: dependency: transitive description: @@ -978,10 +1143,10 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: @@ -998,22 +1163,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" sqlite3_flutter_libs: dependency: transitive description: name: sqlite3_flutter_libs - sha256: "7ae52b23366e5295005022e62fa093f64bfe190810223ea0ebf733a4cd140bce" + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.26" + version: "0.5.27" stack_trace: dependency: transitive description: @@ -1058,26 +1231,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1102,38 +1275,118 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.15" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.16" vector_math: dependency: transitive description: @@ -1142,14 +1395,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1162,18 +1423,18 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" webkit_inspection_protocol: dependency: transitive description: @@ -1186,26 +1447,26 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: name: xml - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.5.0" yaml: dependency: transitive description: @@ -1215,5 +1476,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/complaints/pubspec.yaml b/packages/complaints/pubspec.yaml index d3f9238e7..462456135 100644 --- a/packages/complaints/pubspec.yaml +++ b/packages/complaints/pubspec.yaml @@ -1,7 +1,8 @@ name: complaints description: This package offers filing complaints features, allowing users to file complaints. -version: 0.0.1-dev.2 -homepage: +version: 1.0.0 +homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/referral_reconciliation +repository: https://github.com/egovernments/health-campaign-field-worker-app environment: sdk: '>=3.0.0 <4.0.0' @@ -10,37 +11,37 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.0+2 + digit_ui_components: ^0.0.2-dev.4 flutter_bloc: ^8.1.1 freezed_annotation: ^2.1.0 build_runner: ^2.2.1 - auto_route: ^7.8.4 - digit_data_model: ^1.0.5-dev.1 + auto_route: ^8.1.3 + intl: ^0.19.0 + location: ^6.0.2 + isar: ^3.1.0+1 + digit_data_model: ^1.0.5 dart_mappable: ^4.2.0 group_radio_button: ^1.3.0 - reactive_forms: ^14.1.0 + reactive_forms: ^17.0.0 recase: ^4.1.0 - flutter_dotenv: ^5.0.2 flutter_svg: ^2.0.8 path_provider: ^2.0.11 - intl: ^0.18.0 drift: ^2.0.0 dio: ^5.1.2 - isar: ^3.0.5 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 - auto_route_generator: ^7.3.2 + flutter_lints: ^4.0.0 + auto_route_generator: ^8.0.0 freezed: ^2.1.0+1 json_serializable: ^6.4.0 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder bloc_test: ^9.1.0 mocktail: ^1.0.2 @@ -52,6 +53,7 @@ dev_dependencies: flutter: assets: - assets/icons/svg/ + - assets/animated_json/ # To add assets to your package, add an assets section, like this: # assets: diff --git a/packages/dart_mappable_builder/CHANGELOG.md b/packages/dart_mappable_builder/CHANGELOG.md index f7193e5e2..3a56b9e64 100644 --- a/packages/dart_mappable_builder/CHANGELOG.md +++ b/packages/dart_mappable_builder/CHANGELOG.md @@ -1,3 +1,16 @@ +# 4.2.3 + +- Added lint ignores for 'override_on_non_overriding_member'. + +# 4.2.2 + +- Fixed issues with adding unnecessary '__type' property for nullable generics. +- Improved serialization consistency and equality handling. + +# 4.2.1 + +- Performance improvements. + # 4.2.0 - Added custom typedef for mapping fields to resolve naming conflict. @@ -16,7 +29,7 @@ # 4.0.1 - Added support for generic typed parameters for deep copyWith. -- Added lint ignores for 'unnecessary_cast', 'strict_raw_type' and 'inference_failure_on_untyped_parameter' +- Added lint ignores for 'unnecessary_cast', 'strict_raw_type' and 'inference_failure_on_untyped_parameter'. # 4.0.0 diff --git a/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart b/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart index 7948974c0..b9ea0c084 100644 --- a/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart +++ b/packages/dart_mappable_builder/lib/src/builders/mappable_builder.dart @@ -101,7 +101,7 @@ class MappableBuilder implements Builder { '// coverage:ignore-file\n' '// GENERATED CODE - DO NOT MODIFY BY HAND\n' '// ignore_for_file: type=lint\n' - '// ignore_for_file: unused_element, unnecessary_cast\n' + '// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member\n' '// ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter\n\n' 'part of \'$libraryPath\';\n\n' '${output.join('\n\n')}\n' //, diff --git a/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart b/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart index 33999abab..0a0948d3a 100644 --- a/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart +++ b/packages/dart_mappable_builder/lib/src/generators/mixins/decoding_mixin.dart @@ -74,7 +74,7 @@ mixin DecodingMixin on MapperGenerator { output.write(''' @override DecodingContext inherit(DecodingContext context) { - return context.inherit(args: [${args.join(', ')}]); + return context.inherit(args: () => [${args.join(', ')}]); } '''); } diff --git a/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart b/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart index 6bf327061..245661e15 100644 --- a/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart +++ b/packages/dart_mappable_builder/lib/src/generators/mixins/equals_mixin.dart @@ -12,10 +12,7 @@ mixin EqualsMixin on MapperGenerator { return ''' @override bool operator ==(Object other) { - return identical(this, other) || ( - runtimeType == other.runtimeType && - ${element.mapperName}.ensureInitialized().isValueEqual(this as ${element.selfTypeParam}, other) - ); + return ${element.mapperName}.ensureInitialized().equalsValue(this as ${element.selfTypeParam}, other); } @override diff --git a/packages/dart_mappable_builder/pubspec.yaml b/packages/dart_mappable_builder/pubspec.yaml index e9060e895..fd1a7e646 100644 --- a/packages/dart_mappable_builder/pubspec.yaml +++ b/packages/dart_mappable_builder/pubspec.yaml @@ -1,6 +1,6 @@ name: dart_mappable_builder description: Improved json serialization and data classes with full support for generics, inheritance, customization and more. -version: 4.2.0 +version: 4.2.3 repository: https://github.com/schultek/dart_mappable issue_tracker: https://github.com/schultek/dart_mappable/issues funding: @@ -14,7 +14,7 @@ dependencies: ansicolor: ^2.0.1 build: ^2.0.0 collection: ^1.15.0 - dart_mappable: ^4.2.0 + dart_mappable: ^4.2.2 dart_style: ^2.2.4 glob: ^2.1.0 path: ^1.8.0 diff --git a/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart b/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart index d16954bf0..4e0a02a5f 100644 --- a/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart +++ b/packages/dart_mappable_builder/test/utils/temp_asset_writer.dart @@ -46,7 +46,7 @@ class TempAssetWriter implements RecordingAssetWriter { } Stream _run(String code) async* { - var main = File(path.join(dir.path, 'lib/digit_scanner.dart')); + var main = File(path.join(dir.path, 'lib/main.dart')); main.writeAsStringSync(code); diff --git a/packages/digit_components/CHANGELOG.md b/packages/digit_components/CHANGELOG.md index 93100a196..f22e87447 100644 --- a/packages/digit_components/CHANGELOG.md +++ b/packages/digit_components/CHANGELOG.md @@ -1,121 +1,165 @@ +## 1.0.3 + +* Upgraded to Flutter 3.22 + ## 1.0.2+1 + * Added description field for Labeled Field component ## 1.0.2 + * Added privacy notice component ## 1.0.1+1 + * Changed similar dialogs to a common hideDialog ## 1.0.1 + * Added new loader dialog ## 1.0.0+9 + * Added maximum validation for digit_integer_form_picker ## 1.0.0+8 + * Added close icon button for digit_dialog ## 1.0.0+7 + * Added buttonDisabled for DigitIconButton ## 1.0.0+6 + * Added text direction for DigitIconButton * SelectionBox UI fixes * Details card UI fixes ## 1.0.0+5 + * Added new component details_card ## 1.0.0+4 + * Added new component selected box ## 1.0.0+3 + * Capture and Hide Location Dialog added to utils ## 1.0.0+2 + * DigitTextField component update ## 1.0.0+1 + * Stable release with searchable dropdown fix ## 1.0.0 + * Stable release ## 0.0.3+16 + * Removed flutter_localizations dependency ## 0.0.3+15 + * Updated digit_components to develop branch ## 0.0.3+14 + * Reactive Drop down fix ## 0.0.3+13 + * Fixed empty string issue in searchable_dropdown_field ## 0.0.3+12 + * Downgraded intl to 0.18.0 ## 0.0.3+11 + * Removed flutter localizations dependency ## 0.0.3+10 + * Updated homepage url ## 0.0.3+9 + * Updated homepage url ## 0.0.3+8 + * Updated intl version and added pubspec_override ## 0.0.3+7 + * Updated intl version and added pubspec_override ## 0.0.3+6 + * Updated flutter repository url ## 0.0.3+5 + * Updated flutter sdk version ## 0.0.3+4 + * Updated example folder ## 0.0.3+3 + * Updated intl version 0.18.1 ## 0.0.3+2 + * Updated repository URL and dart doc ## 0.0.3+1 + * Synced digit_components with flutter 3.16.5 version ## 0.0.2+1 + * Updated digit_components missing utils and components ## 0.0.2+0 + * Updated digit_components to the latest version ## 0.0.1+8 + * Updated Images in ReadMe File ## 0.0.1+6 + * Updated Components behaviour in ReadMe File ## 0.0.1+5 + * Example file with Reactive Forms ## 0.0.1+4 + * dart doc added and auto generated files added ## 0.0.1+3 + * example file added ## 0.0.1+2 + * Read Me file modified with Components example ## 0.0.1+1 + * Read Me file added ## 0.0.1 + * Initial Releaase \ No newline at end of file diff --git a/packages/digit_components/example/pubspec.lock b/packages/digit_components/example/pubspec.lock index 9939c4849..d3c1ce88c 100644 --- a/packages/digit_components/example/pubspec.lock +++ b/packages/digit_components/example/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -101,18 +101,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -236,10 +236,10 @@ packages: dependency: transitive description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d09e974ec9148480072f8a7d3b0779dfdbc1a3ec1ff7daa7fbda95b0c1fe7453 url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5" fake_async: dependency: transitive description: @@ -252,10 +252,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -353,10 +353,15 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_spinkit: dependency: transitive description: @@ -387,10 +392,10 @@ packages: dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "7eae679e596a44fdf761853a706f74979f8dd3cd92cf4e23cae161fda091b847" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.6" freezed: dependency: "direct dev" description: @@ -411,10 +416,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -427,10 +432,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -451,10 +456,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -483,10 +488,10 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -519,38 +524,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -563,34 +592,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.2" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -643,26 +672,26 @@ packages: dependency: transitive description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.0" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: transitive description: @@ -675,18 +704,18 @@ packages: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "9c96da072b421e98183f9ea7464898428e764bc0ce5567f27ec8693442e72514" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.5" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -771,26 +800,26 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" reactive_flutter_typeahead: dependency: transitive description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" remove_emoji_input_formatter: dependency: transitive description: @@ -920,26 +949,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -968,10 +997,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -984,18 +1013,18 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" webkit_inspection_protocol: dependency: transitive description: @@ -1008,10 +1037,10 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.1" xdg_directories: dependency: transitive description: @@ -1037,5 +1066,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_components/example/pubspec.yaml b/packages/digit_components/example/pubspec.yaml index b45e84d18..2ae7a4779 100644 --- a/packages/digit_components/example/pubspec.yaml +++ b/packages/digit_components/example/pubspec.yaml @@ -34,7 +34,7 @@ dependencies: digit_components: path: ../../digit_components collection: ^1.16.0 - reactive_forms: ^14.1.0 + reactive_forms: ^17.0.0 # The following adds the Cupertino Icons font to your application. @@ -44,7 +44,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - freezed: ^2.1.0+1 + freezed: ^2.5.2 build_runner: ^2.2.1 json_serializable: ^6.4.0 bloc_test: ^9.1.0 @@ -56,7 +56,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/digit_components/lib/theme/digit_theme.dart b/packages/digit_components/lib/theme/digit_theme.dart index f6fa1b73a..7352ebda3 100644 --- a/packages/digit_components/lib/theme/digit_theme.dart +++ b/packages/digit_components/lib/theme/digit_theme.dart @@ -32,7 +32,7 @@ class DigitTheme { return ThemeData( colorScheme: colorScheme, useMaterial3: false, - scaffoldBackgroundColor: colorScheme.background, + scaffoldBackgroundColor: colorScheme.surface, textTheme: mobileTypography.textTheme, appBarTheme: const AppBarTheme(elevation: 0), elevatedButtonTheme: elevatedButtonTheme, @@ -52,9 +52,7 @@ class DigitTheme { onSecondary: colors.white, error: colors.lavaRed, onError: colors.white, - background: colors.seaShellGray, - onBackground: colors.woodsmokeBlack, - surface: colors.alabasterWhite, + surface: colors.seaShellGray, onSurface: colors.woodsmokeBlack, onSurfaceVariant: colors.darkSpringGreen, tertiaryContainer: colors.tropicalBlue, 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 22bb2ce2d..5ae868fdf 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 @@ -108,7 +108,7 @@ class DigitIntegerFormPicker extends StatelessWidget { height: kPadding * 5, child: Material( shape: border, - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, child: InkWell(onTap: onPressed, child: Icon(icon)), ), ); diff --git a/packages/digit_components/lib/widgets/atoms/digit_stepper.dart b/packages/digit_components/lib/widgets/atoms/digit_stepper.dart index 71d3163bb..4b45e2ff9 100644 --- a/packages/digit_components/lib/widgets/atoms/digit_stepper.dart +++ b/packages/digit_components/lib/widgets/atoms/digit_stepper.dart @@ -1,6 +1,7 @@ import 'package:digit_components/theme/colors.dart'; import 'package:digit_components/theme/digit_theme.dart'; import 'package:easy_stepper/easy_stepper.dart'; +import 'package:flutter/material.dart'; class DigitStepper extends StatelessWidget { final int activeStep; @@ -112,21 +113,26 @@ class DigitStepper extends StatelessWidget { Widget build(BuildContext context) { return EasyStepper( activeStep: activeStep, - lineLength: lineLength, - lineSpace: lineSpace, - lineType: lineType, + lineStyle: LineStyle( + lineLength: lineLength, + lineSpace: lineSpace, + lineType: lineType, + defaultLineColor: defaultLineColor ?? const DigitColors().cloudGray, + lineThickness: lineThickness, + activeLineColor: activeLineColor, + unreachedLineColor: + unreachedLineColor ?? const DigitColors().cloudGray, + finishedLineColor: finishedLineColor ?? const DigitColors().cloudGray, + ), maxReachedStep: maxStepReached, - defaultLineColor: defaultLineColor ?? const DigitColors().cloudGray, activeStepBackgroundColor: activeStepBackgroundColor ?? const DigitColors().burningOrange, activeStepBorderColor: activeStepBorderColor, activeStepTextColor: activeStepTextColor ?? DigitTheme.instance.colorScheme.onSurface, - activeLineColor: activeLineColor, activeStepBorderType: activeStepBorderType ?? defaultStepBorderType, activeStepIconColor: activeStepIconColor, alignment: alignment, - unreachedLineColor: unreachedLineColor ?? const DigitColors().cloudGray, unreachedStepBorderColor: unreachedStepBorderColor ?? const DigitColors().cloudGray, unreachedStepBorderType: @@ -137,7 +143,6 @@ class DigitStepper extends StatelessWidget { unreachedStepBackgroundColor ?? const DigitColors().cloudGray, unreachedStepTextColor: unreachedStepTextColor ?? DigitTheme.instance.colorScheme.onSurface, - finishedLineColor: finishedLineColor ?? const DigitColors().cloudGray, finishedStepBackgroundColor: finishedStepBackgroundColor ?? const DigitColors().burningOrange, finishedStepTextColor: @@ -151,7 +156,6 @@ class DigitStepper extends StatelessWidget { showLoadingAnimation: showLoadingAnimation, stepRadius: stepRadius, showStepBorder: showStepBorder, - lineThickness: lineThickness, onStepReached: onStepReached, disableScroll: disableScroll, enableStepTapping: enableStepTapping, @@ -162,7 +166,7 @@ class DigitStepper extends StatelessWidget { loadingAnimation: loadingAnimation, padding: padding, showTitle: showTitle, - stepAnimationCurve: stepAnimationCurve ?? stepReachedAnimationEffect, + stepAnimationCurve: stepAnimationCurve ?? stepReachedAnimationEffect ?? Curves.easeInOut, stepAnimationDuration: stepAnimationDuration ?? stepReachedAnimationDuration, stepBorderRadius: stepBorderRadius, diff --git a/packages/digit_components/lib/widgets/molecules/digit_table.dart b/packages/digit_components/lib/widgets/molecules/digit_table.dart index d966c40cc..75cfbb9d0 100644 --- a/packages/digit_components/lib/widgets/molecules/digit_table.dart +++ b/packages/digit_components/lib/widgets/molecules/digit_table.dart @@ -111,7 +111,7 @@ class DigitTable extends StatelessWidget { color: index == selectedIndex ? DigitTheme.instance.colorScheme.tertiary : index % 2 == 0 - ? DigitTheme.instance.colorScheme.background + ? DigitTheme.instance.colorScheme.surface : DigitTheme.instance.colorScheme.surface, child: Row( mainAxisAlignment: centerData == null @@ -175,7 +175,7 @@ class DigitTable extends StatelessWidget { color: selectedIndex == index ? DigitTheme.instance.colorScheme.tertiary : index % 2 == 0 - ? DigitTheme.instance.colorScheme.background + ? DigitTheme.instance.colorScheme.surface : DigitTheme.instance.colorScheme.surface, border: Border( left: tableCellBorder, diff --git a/packages/digit_components/pubspec.lock b/packages/digit_components/pubspec.lock index e9d52e3a2..d224d1427 100644 --- a/packages/digit_components/pubspec.lock +++ b/packages/digit_components/pubspec.lock @@ -5,34 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" - ansicolor: - dependency: transitive - description: - name: ansicolor - sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" - url: "https://pub.dev" - source: hosted - version: "2.0.3" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -93,10 +85,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -109,18 +101,18 @@ packages: dependency: "direct main" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -189,18 +181,18 @@ packages: dependency: transitive description: name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" cupertino_icons: dependency: transitive description: @@ -209,21 +201,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" - dart_mappable: - dependency: transitive - description: - name: dart_mappable - sha256: "47269caf2060533c29b823ff7fa9706502355ffcb61e7f2a374e3a0fb2f2c3f0" - url: "https://pub.dev" - source: hosted - version: "4.2.2" - dart_mappable_builder: - dependency: "direct overridden" - description: - path: "../dart_mappable_builder" - relative: true - source: path - version: "4.2.0" dart_style: dependency: transitive description: @@ -244,10 +221,10 @@ packages: dependency: "direct main" description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5+1" fake_async: dependency: transitive description: @@ -260,10 +237,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -289,10 +266,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "8.1.5" + version: "8.1.6" flutter_focus_watcher: dependency: "direct main" description: @@ -353,10 +330,15 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_spinkit: dependency: "direct main" description: @@ -387,10 +369,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -403,18 +385,18 @@ packages: dependency: "direct main" description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -427,18 +409,18 @@ packages: dependency: "direct main" description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" horizontal_data_table: dependency: "direct main" description: @@ -451,10 +433,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -475,10 +457,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -511,38 +493,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: "direct main" description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: "direct main" description: @@ -555,50 +561,50 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.2" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mocktail: dependency: "direct dev" description: name: mocktail - sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53" + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.4" nested: dependency: transitive description: @@ -635,50 +641,50 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: transitive description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -699,18 +705,18 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" platform: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: "direct main" description: @@ -755,26 +761,26 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" reactive_flutter_typeahead: dependency: "direct main" description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" remove_emoji_input_formatter: dependency: "direct main" description: @@ -840,10 +846,10 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: @@ -904,26 +910,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -932,14 +938,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - type_plus: - dependency: transitive - description: - name: type_plus - sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 - url: "https://pub.dev" - source: hosted - version: "2.1.1" typed_data: dependency: transitive description: @@ -960,10 +958,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -976,10 +974,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.0" web_socket_channel: dependency: transitive description: @@ -1000,10 +998,10 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -1021,5 +1019,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_components/pubspec.yaml b/packages/digit_components/pubspec.yaml index b1b428884..10ea58d9c 100644 --- a/packages/digit_components/pubspec.yaml +++ b/packages/digit_components/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_components description: Digit UI Design specification Flutter widgets. Import this package by adding digit_components in respective pubspec.yaml dependencies. -version: 1.0.2+1 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_components repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -13,23 +13,23 @@ dependencies: sdk: flutter flutter_bloc: ^8.1.1 freezed_annotation: ^2.2.0 - google_fonts: ^4.0.4 + google_fonts: ^6.2.0 horizontal_data_table: ^4.1.3 - location: ^5.0.0 - location_platform_interface: ^3.0.0 + location: ^6.0.2 + location_platform_interface: ^4.0.0 json_annotation: ^4.7.0 logging: ^1.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + build_runner: ^2.4.10 + reactive_forms: ^17.0.0 plugin_platform_interface: ^2.1.3 - fluttertoast: ^8.1.2 + fluttertoast: ^8.2.6 flutter_spinkit: ^5.1.0 - reactive_flutter_typeahead: ^0.8.1 - flutter_typeahead: ^4.3.7 + reactive_flutter_typeahead: ^2.1.1 + flutter_typeahead: ^4.6.2 overlay_builder: ^1.1.0 - package_info_plus: ^5.0.1 - easy_stepper: ^0.5.2+1 - intl: ^0.18.0 + package_info_plus: ^8.0.0 + easy_stepper: ^0.8.5 + intl: ^0.19.0 flutter_focus_watcher: ^2.0.0 remove_emoji_input_formatter: ^0.0.1+1 @@ -37,11 +37,11 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 json_serializable: ^6.4.0 freezed: ^2.2.0 bloc_test: ^9.1.0 - mocktail: ^0.3.0 + mocktail: ^1.0.3 flutter: assets: diff --git a/packages/digit_data_model/CHANGELOG.md b/packages/digit_data_model/CHANGELOG.md index 094746386..87e9b781f 100644 --- a/packages/digit_data_model/CHANGELOG.md +++ b/packages/digit_data_model/CHANGELOG.md @@ -1,7 +1,18 @@ +## 1.0.5 + +* Upgrade to Flutter 3.22 +* Added project_type in Project Table +* Changed isActive to bool in Service Attribute table + ## 1.0.5-dev.1 * Merged pgr and survey_form package changes +## 1.0.4+1 + +* Bug Fix: + * Updated syncRetryCount,syncRetryInterval and errorPath to dynamic + ## 1.0.4 * Added user_action entity for digit_location_tracker package @@ -37,7 +48,7 @@ ## 1.0.4-dev.1 -* Separated PGR Package +* Separated PGR Package * Moved Models, Bloc, Repositories related to PGR Package ## 1.0.3 @@ -48,11 +59,11 @@ ## 1.0.3-dev.4 * Updated individual local search results with user uuid mapping - + ## 1.0.3-dev.3 -* Created localization table - - Creation of the localization table. +* Created localization table + - Creation of the localization table. ## 1.0.3-dev.2 @@ -86,7 +97,7 @@ ## 0.0.0-dev.2 -* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used +* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used - Integration of Boundary v2 with the option to use Boundary v1 version 0.0.0-dev.1. ## 0.0.0-dev.1 diff --git a/packages/digit_data_model/lib/data/data_repository.dart b/packages/digit_data_model/lib/data/data_repository.dart index 6561840fd..869831b1f 100644 --- a/packages/digit_data_model/lib/data/data_repository.dart +++ b/packages/digit_data_model/lib/data/data_repository.dart @@ -297,7 +297,7 @@ abstract class RemoteRepository 5; + int get schemaVersion => 5; // Increment schema version + + @override + MigrationStrategy get migration => + MigrationStrategy( + onUpgrade: (migrator, from, to) async { + if (from < 5) { + //Add column for projectType in Project Table + try { + await migrator.addColumn(project, project.projectType); + } catch (e) {} + } + if (from < 5) { + await customStatement(''' + CREATE TABLE attributes_temp ( + id TEXT, + dataType TEXT, + referenceId TEXT, + tenantId TEXT, + code TEXT, + values TEXT, + isActive BOOLEAN, + required BOOLEAN, + regex TEXT, + "order" INTEGER, + auditCreatedBy TEXT, + nonRecoverableError BOOLEAN DEFAULT 0, + auditCreatedTime INTEGER, + clientCreatedTime INTEGER, + clientModifiedBy TEXT, + clientCreatedBy TEXT, + clientModifiedTime INTEGER, + auditModifiedBy TEXT, + auditModifiedTime INTEGER, + isDeleted BOOLEAN DEFAULT 0, + rowVersion INTEGER, + additionalFields TEXT, + additionalDetails TEXT + ); + '''); + + // Step 2: Copy data from the old table to the new table + await customStatement(''' + INSERT INTO attributes_temp ( + id, dataType, referenceId, tenantId, code, values, isActive, required, regex, "order", + auditCreatedBy, nonRecoverableError, auditCreatedTime, clientCreatedTime, + clientModifiedBy, clientCreatedBy, clientModifiedTime, auditModifiedBy, + auditModifiedTime, isDeleted, rowVersion, additionalFields, additionalDetails + ) + SELECT + id, dataType, referenceId, tenantId, code, values, + CASE isActive WHEN 'true' THEN 1 WHEN 'false' THEN 0 ELSE NULL END, + required, regex, "order", + auditCreatedBy, nonRecoverableError, auditCreatedTime, clientCreatedTime, + clientModifiedBy, clientCreatedBy, clientModifiedTime, auditModifiedBy, + auditModifiedTime, isDeleted, rowVersion, additionalFields, additionalDetails + FROM attributes; + '''); + + // Step 3: Drop the old table + await migrator.deleteTable('attributes'); + + // Step 4: Rename the new table to the old table's name + await customStatement( + 'ALTER TABLE attributes_temp RENAME TO attributes;'); + } + }, + ); /// The `_openConnection` method opens a connection to the database. /// It returns a `LazyDatabase` that opens the database when it is first accessed. @@ -124,24 +190,4 @@ class LocalSqlDataStore extends _$LocalSqlDataStore { return NativeDatabase(file, logStatements: true, setup: (data) {}); }); } - - @override - MigrationStrategy get migration { - return MigrationStrategy(onCreate: (Migrator m) async { - await m.createAll(); - }, onUpgrade: (Migrator m, int from, int to) async { - if (from < 5) { - //Add column for projectType in Project Table - try { - AppLogger.instance.info('Applying migration $from to $to'); - await m.addColumn(project, project.projectType); - } catch (e) { - AppLogger.instance.error( - title: 'migration', - message: e.toString(), - ); - } - } - }); - } } diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart index b8b4f63c6..cef14c5c3 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/sql_store.g.dart @@ -20618,9 +20618,12 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { static const VerificationMeta _beneficiaryTypeMeta = const VerificationMeta('beneficiaryType'); @override - late final GeneratedColumn beneficiaryType = GeneratedColumn( - 'beneficiary_type', aliasedName, true, - type: DriftSqlType.string, requiredDuringInsert: false); + late final GeneratedColumnWithTypeConverter + beneficiaryType = GeneratedColumn( + 'beneficiary_type', aliasedName, true, + type: DriftSqlType.int, requiredDuringInsert: false) + .withConverter( + $TargetTable.$converterbeneficiaryTypen); static const VerificationMeta _additionalFieldsMeta = const VerificationMeta('additionalFields'); @override @@ -20745,12 +20748,7 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { rowVersion.isAcceptableOrUnknown( data['row_version']!, _rowVersionMeta)); } - if (data.containsKey('beneficiary_type')) { - context.handle( - _beneficiaryTypeMeta, - beneficiaryType.isAcceptableOrUnknown( - data['beneficiary_type']!, _beneficiaryTypeMeta)); - } + context.handle(_beneficiaryTypeMeta, const VerificationResult.success()); if (data.containsKey('additional_fields')) { context.handle( _additionalFieldsMeta, @@ -20798,8 +20796,9 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { .read(DriftSqlType.bool, data['${effectivePrefix}is_deleted']), rowVersion: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}row_version']), - beneficiaryType: attachedDatabase.typeMapping.read( - DriftSqlType.string, data['${effectivePrefix}beneficiary_type']), + beneficiaryType: $TargetTable.$converterbeneficiaryTypen.fromSql( + attachedDatabase.typeMapping.read( + DriftSqlType.int, data['${effectivePrefix}beneficiary_type'])), additionalFields: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}additional_fields']), ); @@ -20809,6 +20808,13 @@ class $TargetTable extends Target with TableInfo<$TargetTable, TargetData> { $TargetTable createAlias(String alias) { return $TargetTable(attachedDatabase, alias); } + + static JsonTypeConverter2 + $converterbeneficiaryType = + const EnumIndexConverter(BeneficiaryType.values); + static JsonTypeConverter2 + $converterbeneficiaryTypen = + JsonTypeConverter2.asNullable($converterbeneficiaryType); } class TargetData extends DataClass implements Insertable { @@ -20828,7 +20834,7 @@ class TargetData extends DataClass implements Insertable { final String? tenantId; final bool? isDeleted; final int? rowVersion; - final String? beneficiaryType; + final BeneficiaryType? beneficiaryType; final String? additionalFields; const TargetData( {required this.id, @@ -20899,7 +20905,8 @@ class TargetData extends DataClass implements Insertable { map['row_version'] = Variable(rowVersion); } if (!nullToAbsent || beneficiaryType != null) { - map['beneficiary_type'] = Variable(beneficiaryType); + map['beneficiary_type'] = Variable( + $TargetTable.$converterbeneficiaryTypen.toSql(beneficiaryType)); } if (!nullToAbsent || additionalFields != null) { map['additional_fields'] = Variable(additionalFields); @@ -20986,7 +20993,8 @@ class TargetData extends DataClass implements Insertable { tenantId: serializer.fromJson(json['tenantId']), isDeleted: serializer.fromJson(json['isDeleted']), rowVersion: serializer.fromJson(json['rowVersion']), - beneficiaryType: serializer.fromJson(json['beneficiaryType']), + beneficiaryType: $TargetTable.$converterbeneficiaryTypen + .fromJson(serializer.fromJson(json['beneficiaryType'])), additionalFields: serializer.fromJson(json['additionalFields']), ); } @@ -21010,7 +21018,8 @@ class TargetData extends DataClass implements Insertable { 'tenantId': serializer.toJson(tenantId), 'isDeleted': serializer.toJson(isDeleted), 'rowVersion': serializer.toJson(rowVersion), - 'beneficiaryType': serializer.toJson(beneficiaryType), + 'beneficiaryType': serializer.toJson( + $TargetTable.$converterbeneficiaryTypen.toJson(beneficiaryType)), 'additionalFields': serializer.toJson(additionalFields), }; } @@ -21032,7 +21041,7 @@ class TargetData extends DataClass implements Insertable { Value tenantId = const Value.absent(), Value isDeleted = const Value.absent(), Value rowVersion = const Value.absent(), - Value beneficiaryType = const Value.absent(), + Value beneficiaryType = const Value.absent(), Value additionalFields = const Value.absent()}) => TargetData( id: id ?? this.id, @@ -21163,7 +21172,7 @@ class TargetCompanion extends UpdateCompanion { final Value tenantId; final Value isDeleted; final Value rowVersion; - final Value beneficiaryType; + final Value beneficiaryType; final Value additionalFields; final Value rowid; const TargetCompanion({ @@ -21225,7 +21234,7 @@ class TargetCompanion extends UpdateCompanion { Expression? tenantId, Expression? isDeleted, Expression? rowVersion, - Expression? beneficiaryType, + Expression? beneficiaryType, Expression? additionalFields, Expression? rowid, }) { @@ -21271,7 +21280,7 @@ class TargetCompanion extends UpdateCompanion { Value? tenantId, Value? isDeleted, Value? rowVersion, - Value? beneficiaryType, + Value? beneficiaryType, Value? additionalFields, Value? rowid}) { return TargetCompanion( @@ -21349,7 +21358,8 @@ class TargetCompanion extends UpdateCompanion { map['row_version'] = Variable(rowVersion.value); } if (beneficiaryType.present) { - map['beneficiary_type'] = Variable(beneficiaryType.value); + map['beneficiary_type'] = Variable( + $TargetTable.$converterbeneficiaryTypen.toSql(beneficiaryType.value)); } if (additionalFields.present) { map['additional_fields'] = Variable(additionalFields.value); @@ -25205,9 +25215,12 @@ class $AttributesTable extends Attributes static const VerificationMeta _isActiveMeta = const VerificationMeta('isActive'); @override - late final GeneratedColumn isActive = GeneratedColumn( + late final GeneratedColumn isActive = GeneratedColumn( 'is_active', aliasedName, true, - type: DriftSqlType.string, requiredDuringInsert: false); + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: + GeneratedColumn.constraintIsAlways('CHECK ("is_active" IN (0, 1))')); static const VerificationMeta _requiredMeta = const VerificationMeta('required'); @override @@ -25488,7 +25501,7 @@ class $AttributesTable extends Attributes values: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}values']), isActive: attachedDatabase.typeMapping - .read(DriftSqlType.string, data['${effectivePrefix}is_active']), + .read(DriftSqlType.bool, data['${effectivePrefix}is_active']), required: attachedDatabase.typeMapping .read(DriftSqlType.bool, data['${effectivePrefix}required']), regex: attachedDatabase.typeMapping @@ -25537,7 +25550,7 @@ class Attribute extends DataClass implements Insertable { final String? tenantId; final String? code; final String? values; - final String? isActive; + final bool? isActive; final bool? required; final String? regex; final int? order; @@ -25600,7 +25613,7 @@ class Attribute extends DataClass implements Insertable { map['values'] = Variable(values); } if (!nullToAbsent || isActive != null) { - map['is_active'] = Variable(isActive); + map['is_active'] = Variable(isActive); } if (!nullToAbsent || required != null) { map['required'] = Variable(required); @@ -25730,7 +25743,7 @@ class Attribute extends DataClass implements Insertable { tenantId: serializer.fromJson(json['tenantId']), code: serializer.fromJson(json['code']), values: serializer.fromJson(json['values']), - isActive: serializer.fromJson(json['isActive']), + isActive: serializer.fromJson(json['isActive']), required: serializer.fromJson(json['required']), regex: serializer.fromJson(json['regex']), order: serializer.fromJson(json['order']), @@ -25761,7 +25774,7 @@ class Attribute extends DataClass implements Insertable { 'tenantId': serializer.toJson(tenantId), 'code': serializer.toJson(code), 'values': serializer.toJson(values), - 'isActive': serializer.toJson(isActive), + 'isActive': serializer.toJson(isActive), 'required': serializer.toJson(required), 'regex': serializer.toJson(regex), 'order': serializer.toJson(order), @@ -25788,7 +25801,7 @@ class Attribute extends DataClass implements Insertable { Value tenantId = const Value.absent(), Value code = const Value.absent(), Value values = const Value.absent(), - Value isActive = const Value.absent(), + Value isActive = const Value.absent(), Value required = const Value.absent(), Value regex = const Value.absent(), Value order = const Value.absent(), @@ -25943,7 +25956,7 @@ class AttributesCompanion extends UpdateCompanion { final Value tenantId; final Value code; final Value values; - final Value isActive; + final Value isActive; final Value required; final Value regex; final Value order; @@ -26020,7 +26033,7 @@ class AttributesCompanion extends UpdateCompanion { Expression? tenantId, Expression? code, Expression? values, - Expression? isActive, + Expression? isActive, Expression? required, Expression? regex, Expression? order, @@ -26076,7 +26089,7 @@ class AttributesCompanion extends UpdateCompanion { Value? tenantId, Value? code, Value? values, - Value? isActive, + Value? isActive, Value? required, Value? regex, Value? order, @@ -26144,7 +26157,7 @@ class AttributesCompanion extends UpdateCompanion { map['values'] = Variable(values.value); } if (isActive.present) { - map['is_active'] = Variable(isActive.value); + map['is_active'] = Variable(isActive.value); } if (required.present) { map['required'] = Variable(required.value); @@ -36940,6 +36953,13 @@ class $SideEffectTable extends SideEffect late final GeneratedColumn taskClientReferenceId = GeneratedColumn('task_client_reference_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); + static const VerificationMeta _projectBeneficiaryClientReferenceIdMeta = + const VerificationMeta('projectBeneficiaryClientReferenceId'); + @override + late final GeneratedColumn projectBeneficiaryClientReferenceId = + GeneratedColumn( + 'project_beneficiary_client_reference_id', aliasedName, true, + type: DriftSqlType.string, requiredDuringInsert: false); static const VerificationMeta _reAttemptsMeta = const VerificationMeta('reAttempts'); @override @@ -37049,6 +37069,7 @@ class $SideEffectTable extends SideEffect id, projectId, taskClientReferenceId, + projectBeneficiaryClientReferenceId, reAttempts, symptoms, auditCreatedBy, @@ -37089,6 +37110,13 @@ class $SideEffectTable extends SideEffect taskClientReferenceId.isAcceptableOrUnknown( data['task_client_reference_id']!, _taskClientReferenceIdMeta)); } + if (data.containsKey('project_beneficiary_client_reference_id')) { + context.handle( + _projectBeneficiaryClientReferenceIdMeta, + projectBeneficiaryClientReferenceId.isAcceptableOrUnknown( + data['project_beneficiary_client_reference_id']!, + _projectBeneficiaryClientReferenceIdMeta)); + } if (data.containsKey('re_attempts')) { context.handle( _reAttemptsMeta, @@ -37197,6 +37225,9 @@ class $SideEffectTable extends SideEffect taskClientReferenceId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}task_client_reference_id']), + projectBeneficiaryClientReferenceId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}project_beneficiary_client_reference_id']), reAttempts: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}re_attempts']), symptoms: attachedDatabase.typeMapping @@ -37242,6 +37273,7 @@ class SideEffectData extends DataClass implements Insertable { final String? id; final String? projectId; final String? taskClientReferenceId; + final String? projectBeneficiaryClientReferenceId; final int? reAttempts; final String? symptoms; final String? auditCreatedBy; @@ -37262,6 +37294,7 @@ class SideEffectData extends DataClass implements Insertable { {this.id, this.projectId, this.taskClientReferenceId, + this.projectBeneficiaryClientReferenceId, this.reAttempts, this.symptoms, this.auditCreatedBy, @@ -37290,6 +37323,10 @@ class SideEffectData extends DataClass implements Insertable { if (!nullToAbsent || taskClientReferenceId != null) { map['task_client_reference_id'] = Variable(taskClientReferenceId); } + if (!nullToAbsent || projectBeneficiaryClientReferenceId != null) { + map['project_beneficiary_client_reference_id'] = + Variable(projectBeneficiaryClientReferenceId); + } if (!nullToAbsent || reAttempts != null) { map['re_attempts'] = Variable(reAttempts); } @@ -37348,6 +37385,10 @@ class SideEffectData extends DataClass implements Insertable { taskClientReferenceId: taskClientReferenceId == null && nullToAbsent ? const Value.absent() : Value(taskClientReferenceId), + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId == null && nullToAbsent + ? const Value.absent() + : Value(projectBeneficiaryClientReferenceId), reAttempts: reAttempts == null && nullToAbsent ? const Value.absent() : Value(reAttempts), @@ -37405,6 +37446,8 @@ class SideEffectData extends DataClass implements Insertable { projectId: serializer.fromJson(json['projectId']), taskClientReferenceId: serializer.fromJson(json['taskClientReferenceId']), + projectBeneficiaryClientReferenceId: serializer + .fromJson(json['projectBeneficiaryClientReferenceId']), reAttempts: serializer.fromJson(json['reAttempts']), symptoms: serializer.fromJson(json['symptoms']), auditCreatedBy: serializer.fromJson(json['auditCreatedBy']), @@ -37432,6 +37475,8 @@ class SideEffectData extends DataClass implements Insertable { 'projectId': serializer.toJson(projectId), 'taskClientReferenceId': serializer.toJson(taskClientReferenceId), + 'projectBeneficiaryClientReferenceId': + serializer.toJson(projectBeneficiaryClientReferenceId), 'reAttempts': serializer.toJson(reAttempts), 'symptoms': serializer.toJson(symptoms), 'auditCreatedBy': serializer.toJson(auditCreatedBy), @@ -37455,6 +37500,8 @@ class SideEffectData extends DataClass implements Insertable { {Value id = const Value.absent(), Value projectId = const Value.absent(), Value taskClientReferenceId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), Value reAttempts = const Value.absent(), Value symptoms = const Value.absent(), Value auditCreatedBy = const Value.absent(), @@ -37477,6 +37524,10 @@ class SideEffectData extends DataClass implements Insertable { taskClientReferenceId: taskClientReferenceId.present ? taskClientReferenceId.value : this.taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId.present + ? projectBeneficiaryClientReferenceId.value + : this.projectBeneficiaryClientReferenceId, reAttempts: reAttempts.present ? reAttempts.value : this.reAttempts, symptoms: symptoms.present ? symptoms.value : this.symptoms, auditCreatedBy: @@ -37519,6 +37570,8 @@ class SideEffectData extends DataClass implements Insertable { ..write('id: $id, ') ..write('projectId: $projectId, ') ..write('taskClientReferenceId: $taskClientReferenceId, ') + ..write( + 'projectBeneficiaryClientReferenceId: $projectBeneficiaryClientReferenceId, ') ..write('reAttempts: $reAttempts, ') ..write('symptoms: $symptoms, ') ..write('auditCreatedBy: $auditCreatedBy, ') @@ -37544,6 +37597,7 @@ class SideEffectData extends DataClass implements Insertable { id, projectId, taskClientReferenceId, + projectBeneficiaryClientReferenceId, reAttempts, symptoms, auditCreatedBy, @@ -37567,6 +37621,8 @@ class SideEffectData extends DataClass implements Insertable { other.id == this.id && other.projectId == this.projectId && other.taskClientReferenceId == this.taskClientReferenceId && + other.projectBeneficiaryClientReferenceId == + this.projectBeneficiaryClientReferenceId && other.reAttempts == this.reAttempts && other.symptoms == this.symptoms && other.auditCreatedBy == this.auditCreatedBy && @@ -37589,6 +37645,7 @@ class SideEffectCompanion extends UpdateCompanion { final Value id; final Value projectId; final Value taskClientReferenceId; + final Value projectBeneficiaryClientReferenceId; final Value reAttempts; final Value symptoms; final Value auditCreatedBy; @@ -37610,6 +37667,7 @@ class SideEffectCompanion extends UpdateCompanion { this.id = const Value.absent(), this.projectId = const Value.absent(), this.taskClientReferenceId = const Value.absent(), + this.projectBeneficiaryClientReferenceId = const Value.absent(), this.reAttempts = const Value.absent(), this.symptoms = const Value.absent(), this.auditCreatedBy = const Value.absent(), @@ -37632,6 +37690,7 @@ class SideEffectCompanion extends UpdateCompanion { this.id = const Value.absent(), this.projectId = const Value.absent(), this.taskClientReferenceId = const Value.absent(), + this.projectBeneficiaryClientReferenceId = const Value.absent(), this.reAttempts = const Value.absent(), this.symptoms = const Value.absent(), this.auditCreatedBy = const Value.absent(), @@ -37654,6 +37713,7 @@ class SideEffectCompanion extends UpdateCompanion { Expression? id, Expression? projectId, Expression? taskClientReferenceId, + Expression? projectBeneficiaryClientReferenceId, Expression? reAttempts, Expression? symptoms, Expression? auditCreatedBy, @@ -37677,6 +37737,9 @@ class SideEffectCompanion extends UpdateCompanion { if (projectId != null) 'project_id': projectId, if (taskClientReferenceId != null) 'task_client_reference_id': taskClientReferenceId, + if (projectBeneficiaryClientReferenceId != null) + 'project_beneficiary_client_reference_id': + projectBeneficiaryClientReferenceId, if (reAttempts != null) 're_attempts': reAttempts, if (symptoms != null) 'symptoms': symptoms, if (auditCreatedBy != null) 'audit_created_by': auditCreatedBy, @@ -37703,6 +37766,7 @@ class SideEffectCompanion extends UpdateCompanion { {Value? id, Value? projectId, Value? taskClientReferenceId, + Value? projectBeneficiaryClientReferenceId, Value? reAttempts, Value? symptoms, Value? auditCreatedBy, @@ -37725,6 +37789,9 @@ class SideEffectCompanion extends UpdateCompanion { projectId: projectId ?? this.projectId, taskClientReferenceId: taskClientReferenceId ?? this.taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId ?? + this.projectBeneficiaryClientReferenceId, reAttempts: reAttempts ?? this.reAttempts, symptoms: symptoms ?? this.symptoms, auditCreatedBy: auditCreatedBy ?? this.auditCreatedBy, @@ -37758,6 +37825,10 @@ class SideEffectCompanion extends UpdateCompanion { map['task_client_reference_id'] = Variable(taskClientReferenceId.value); } + if (projectBeneficiaryClientReferenceId.present) { + map['project_beneficiary_client_reference_id'] = + Variable(projectBeneficiaryClientReferenceId.value); + } if (reAttempts.present) { map['re_attempts'] = Variable(reAttempts.value); } @@ -37818,6 +37889,8 @@ class SideEffectCompanion extends UpdateCompanion { ..write('id: $id, ') ..write('projectId: $projectId, ') ..write('taskClientReferenceId: $taskClientReferenceId, ') + ..write( + 'projectBeneficiaryClientReferenceId: $projectBeneficiaryClientReferenceId, ') ..write('reAttempts: $reAttempts, ') ..write('symptoms: $symptoms, ') ..write('auditCreatedBy: $auditCreatedBy, ') @@ -39131,6 +39204,7 @@ class LocalizationCompanion extends UpdateCompanion { abstract class _$LocalSqlDataStore extends GeneratedDatabase { _$LocalSqlDataStore(QueryExecutor e) : super(e); + _$LocalSqlDataStoreManager get managers => _$LocalSqlDataStoreManager(this); late final $AttendanceRegisterTable attendanceRegister = $AttendanceRegisterTable(this); late final $AttendanceTable attendance = $AttendanceTable(this); @@ -39327,3 +39401,15771 @@ abstract class _$LocalSqlDataStore extends GeneratedDatabase { localizationModule ]; } + +typedef $$AttendanceRegisterTableInsertCompanionBuilder + = AttendanceRegisterCompanion Function({ + Value id, + required String tenantId, + required String registerNumber, + required String name, + required String referenceId, + required String serviceCode, + required String status, + Value startDate, + Value endDate, + Value additionalFields, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value rowid, +}); +typedef $$AttendanceRegisterTableUpdateCompanionBuilder + = AttendanceRegisterCompanion Function({ + Value id, + Value tenantId, + Value registerNumber, + Value name, + Value referenceId, + Value serviceCode, + Value status, + Value startDate, + Value endDate, + Value additionalFields, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value rowid, +}); + +class $$AttendanceRegisterTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttendanceRegisterTable, + AttendanceRegisterData, + $$AttendanceRegisterTableFilterComposer, + $$AttendanceRegisterTableOrderingComposer, + $$AttendanceRegisterTableProcessedTableManager, + $$AttendanceRegisterTableInsertCompanionBuilder, + $$AttendanceRegisterTableUpdateCompanionBuilder> { + $$AttendanceRegisterTableTableManager( + _$LocalSqlDataStore db, $AttendanceRegisterTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttendanceRegisterTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$AttendanceRegisterTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttendanceRegisterTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerNumber = const Value.absent(), + Value name = const Value.absent(), + Value referenceId = const Value.absent(), + Value serviceCode = const Value.absent(), + Value status = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceRegisterCompanion( + id: id, + tenantId: tenantId, + registerNumber: registerNumber, + name: name, + referenceId: referenceId, + serviceCode: serviceCode, + status: status, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String tenantId, + required String registerNumber, + required String name, + required String referenceId, + required String serviceCode, + required String status, + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceRegisterCompanion.insert( + id: id, + tenantId: tenantId, + registerNumber: registerNumber, + name: name, + referenceId: referenceId, + serviceCode: serviceCode, + status: status, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + )); +} + +class $$AttendanceRegisterTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttendanceRegisterTable, + AttendanceRegisterData, + $$AttendanceRegisterTableFilterComposer, + $$AttendanceRegisterTableOrderingComposer, + $$AttendanceRegisterTableProcessedTableManager, + $$AttendanceRegisterTableInsertCompanionBuilder, + $$AttendanceRegisterTableUpdateCompanionBuilder> { + $$AttendanceRegisterTableProcessedTableManager(super.$state); +} + +class $$AttendanceRegisterTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttendanceRegisterTable> { + $$AttendanceRegisterTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerNumber => $state.composableBuilder( + column: $state.table.registerNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttendanceRegisterTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttendanceRegisterTable> { + $$AttendanceRegisterTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerNumber => $state.composableBuilder( + column: $state.table.registerNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AttendanceTableInsertCompanionBuilder = AttendanceCompanion Function({ + Value id, + Value clientReferenceId, + required String tenantId, + required String registerId, + required String individualId, + Value time, + Value status, + Value type, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value uploadToServer, + Value rowid, +}); +typedef $$AttendanceTableUpdateCompanionBuilder = AttendanceCompanion Function({ + Value id, + Value clientReferenceId, + Value tenantId, + Value registerId, + Value individualId, + Value time, + Value status, + Value type, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value uploadToServer, + Value rowid, +}); + +class $$AttendanceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttendanceTable, + AttendanceData, + $$AttendanceTableFilterComposer, + $$AttendanceTableOrderingComposer, + $$AttendanceTableProcessedTableManager, + $$AttendanceTableInsertCompanionBuilder, + $$AttendanceTableUpdateCompanionBuilder> { + $$AttendanceTableTableManager(_$LocalSqlDataStore db, $AttendanceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttendanceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AttendanceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttendanceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerId = const Value.absent(), + Value individualId = const Value.absent(), + Value time = const Value.absent(), + Value status = const Value.absent(), + Value type = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value uploadToServer = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceCompanion( + id: id, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + time: time, + status: status, + type: type, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + uploadToServer: uploadToServer, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + required String tenantId, + required String registerId, + required String individualId, + Value time = const Value.absent(), + Value status = const Value.absent(), + Value type = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value uploadToServer = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendanceCompanion.insert( + id: id, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + time: time, + status: status, + type: type, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + uploadToServer: uploadToServer, + rowid: rowid, + ), + )); +} + +class $$AttendanceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttendanceTable, + AttendanceData, + $$AttendanceTableFilterComposer, + $$AttendanceTableOrderingComposer, + $$AttendanceTableProcessedTableManager, + $$AttendanceTableInsertCompanionBuilder, + $$AttendanceTableUpdateCompanionBuilder> { + $$AttendanceTableProcessedTableManager(super.$state); +} + +class $$AttendanceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttendanceTable> { + $$AttendanceTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get time => $state.composableBuilder( + column: $state.table.time, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get uploadToServer => $state.composableBuilder( + column: $state.table.uploadToServer, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttendanceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttendanceTable> { + $$AttendanceTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get time => $state.composableBuilder( + column: $state.table.time, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get uploadToServer => $state.composableBuilder( + column: $state.table.uploadToServer, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AttendeeTableInsertCompanionBuilder = AttendeeCompanion Function({ + Value id, + required String tenantId, + required String registerId, + required String individualId, + Value status, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value enrollmentDate, + Value denrollmentDate, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$AttendeeTableUpdateCompanionBuilder = AttendeeCompanion Function({ + Value id, + Value tenantId, + Value registerId, + Value individualId, + Value status, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditCreatedBy, + Value auditModifiedBy, + Value auditModifiedTime, + Value enrollmentDate, + Value denrollmentDate, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$AttendeeTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttendeeTable, + AttendeeData, + $$AttendeeTableFilterComposer, + $$AttendeeTableOrderingComposer, + $$AttendeeTableProcessedTableManager, + $$AttendeeTableInsertCompanionBuilder, + $$AttendeeTableUpdateCompanionBuilder> { + $$AttendeeTableTableManager(_$LocalSqlDataStore db, $AttendeeTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttendeeTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AttendeeTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttendeeTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerId = const Value.absent(), + Value individualId = const Value.absent(), + Value status = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendeeCompanion( + id: id, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + status: status, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String tenantId, + required String registerId, + required String individualId, + Value status = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttendeeCompanion.insert( + id: id, + tenantId: tenantId, + registerId: registerId, + individualId: individualId, + status: status, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditCreatedBy: auditCreatedBy, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$AttendeeTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttendeeTable, + AttendeeData, + $$AttendeeTableFilterComposer, + $$AttendeeTableOrderingComposer, + $$AttendeeTableProcessedTableManager, + $$AttendeeTableInsertCompanionBuilder, + $$AttendeeTableUpdateCompanionBuilder> { + $$AttendeeTableProcessedTableManager(super.$state); +} + +class $$AttendeeTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttendeeTable> { + $$AttendeeTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttendeeTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttendeeTable> { + $$AttendeeTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AddressTableInsertCompanionBuilder = AddressCompanion Function({ + Value id, + Value relatedClientReferenceId, + Value doorNo, + Value latitude, + Value longitude, + Value locationAccuracy, + Value addressLine1, + Value addressLine2, + Value landmark, + Value city, + Value pincode, + Value buildingName, + Value street, + Value boundaryType, + Value boundary, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value localityBoundaryCode, + Value localityBoundaryName, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value type, + Value additionalFields, + Value rowid, +}); +typedef $$AddressTableUpdateCompanionBuilder = AddressCompanion Function({ + Value id, + Value relatedClientReferenceId, + Value doorNo, + Value latitude, + Value longitude, + Value locationAccuracy, + Value addressLine1, + Value addressLine2, + Value landmark, + Value city, + Value pincode, + Value buildingName, + Value street, + Value boundaryType, + Value boundary, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value localityBoundaryCode, + Value localityBoundaryName, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value type, + Value additionalFields, + Value rowid, +}); + +class $$AddressTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AddressTable, + Addres, + $$AddressTableFilterComposer, + $$AddressTableOrderingComposer, + $$AddressTableProcessedTableManager, + $$AddressTableInsertCompanionBuilder, + $$AddressTableUpdateCompanionBuilder> { + $$AddressTableTableManager(_$LocalSqlDataStore db, $AddressTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AddressTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AddressTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$AddressTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value relatedClientReferenceId = const Value.absent(), + Value doorNo = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value locationAccuracy = const Value.absent(), + Value addressLine1 = const Value.absent(), + Value addressLine2 = const Value.absent(), + Value landmark = const Value.absent(), + Value city = const Value.absent(), + Value pincode = const Value.absent(), + Value buildingName = const Value.absent(), + Value street = const Value.absent(), + Value boundaryType = const Value.absent(), + Value boundary = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value localityBoundaryCode = const Value.absent(), + Value localityBoundaryName = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value type = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AddressCompanion( + id: id, + relatedClientReferenceId: relatedClientReferenceId, + doorNo: doorNo, + latitude: latitude, + longitude: longitude, + locationAccuracy: locationAccuracy, + addressLine1: addressLine1, + addressLine2: addressLine2, + landmark: landmark, + city: city, + pincode: pincode, + buildingName: buildingName, + street: street, + boundaryType: boundaryType, + boundary: boundary, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + localityBoundaryCode: localityBoundaryCode, + localityBoundaryName: localityBoundaryName, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + type: type, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value relatedClientReferenceId = const Value.absent(), + Value doorNo = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value locationAccuracy = const Value.absent(), + Value addressLine1 = const Value.absent(), + Value addressLine2 = const Value.absent(), + Value landmark = const Value.absent(), + Value city = const Value.absent(), + Value pincode = const Value.absent(), + Value buildingName = const Value.absent(), + Value street = const Value.absent(), + Value boundaryType = const Value.absent(), + Value boundary = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value localityBoundaryCode = const Value.absent(), + Value localityBoundaryName = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value type = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AddressCompanion.insert( + id: id, + relatedClientReferenceId: relatedClientReferenceId, + doorNo: doorNo, + latitude: latitude, + longitude: longitude, + locationAccuracy: locationAccuracy, + addressLine1: addressLine1, + addressLine2: addressLine2, + landmark: landmark, + city: city, + pincode: pincode, + buildingName: buildingName, + street: street, + boundaryType: boundaryType, + boundary: boundary, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + localityBoundaryCode: localityBoundaryCode, + localityBoundaryName: localityBoundaryName, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + type: type, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$AddressTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AddressTable, + Addres, + $$AddressTableFilterComposer, + $$AddressTableOrderingComposer, + $$AddressTableProcessedTableManager, + $$AddressTableInsertCompanionBuilder, + $$AddressTableUpdateCompanionBuilder> { + $$AddressTableProcessedTableManager(super.$state); +} + +class $$AddressTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AddressTable> { + $$AddressTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get relatedClientReferenceId => + $state.composableBuilder( + column: $state.table.relatedClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get doorNo => $state.composableBuilder( + column: $state.table.doorNo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get locationAccuracy => $state.composableBuilder( + column: $state.table.locationAccuracy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get addressLine1 => $state.composableBuilder( + column: $state.table.addressLine1, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get addressLine2 => $state.composableBuilder( + column: $state.table.addressLine2, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get landmark => $state.composableBuilder( + column: $state.table.landmark, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get city => $state.composableBuilder( + column: $state.table.city, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get pincode => $state.composableBuilder( + column: $state.table.pincode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get buildingName => $state.composableBuilder( + column: $state.table.buildingName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get street => $state.composableBuilder( + column: $state.table.street, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundaryType => $state.composableBuilder( + column: $state.table.boundaryType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundary => $state.composableBuilder( + column: $state.table.boundary, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get localityBoundaryCode => $state.composableBuilder( + column: $state.table.localityBoundaryCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get localityBoundaryName => $state.composableBuilder( + column: $state.table.localityBoundaryName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters get type => + $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AddressTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AddressTable> { + $$AddressTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get relatedClientReferenceId => + $state.composableBuilder( + column: $state.table.relatedClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get doorNo => $state.composableBuilder( + column: $state.table.doorNo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get locationAccuracy => $state.composableBuilder( + column: $state.table.locationAccuracy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get addressLine1 => $state.composableBuilder( + column: $state.table.addressLine1, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get addressLine2 => $state.composableBuilder( + column: $state.table.addressLine2, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get landmark => $state.composableBuilder( + column: $state.table.landmark, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get city => $state.composableBuilder( + column: $state.table.city, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get pincode => $state.composableBuilder( + column: $state.table.pincode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get buildingName => $state.composableBuilder( + column: $state.table.buildingName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get street => $state.composableBuilder( + column: $state.table.street, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundaryType => $state.composableBuilder( + column: $state.table.boundaryType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundary => $state.composableBuilder( + column: $state.table.boundary, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get localityBoundaryCode => $state.composableBuilder( + column: $state.table.localityBoundaryCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get localityBoundaryName => $state.composableBuilder( + column: $state.table.localityBoundaryName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$NameTableInsertCompanionBuilder = NameCompanion Function({ + Value id, + Value individualClientReferenceId, + Value givenName, + Value familyName, + Value otherNames, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$NameTableUpdateCompanionBuilder = NameCompanion Function({ + Value id, + Value individualClientReferenceId, + Value givenName, + Value familyName, + Value otherNames, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$NameTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $NameTable, + NameData, + $$NameTableFilterComposer, + $$NameTableOrderingComposer, + $$NameTableProcessedTableManager, + $$NameTableInsertCompanionBuilder, + $$NameTableUpdateCompanionBuilder> { + $$NameTableTableManager(_$LocalSqlDataStore db, $NameTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$NameTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$NameTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$NameTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + Value givenName = const Value.absent(), + Value familyName = const Value.absent(), + Value otherNames = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + NameCompanion( + id: id, + individualClientReferenceId: individualClientReferenceId, + givenName: givenName, + familyName: familyName, + otherNames: otherNames, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + Value givenName = const Value.absent(), + Value familyName = const Value.absent(), + Value otherNames = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + NameCompanion.insert( + id: id, + individualClientReferenceId: individualClientReferenceId, + givenName: givenName, + familyName: familyName, + otherNames: otherNames, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$NameTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $NameTable, + NameData, + $$NameTableFilterComposer, + $$NameTableOrderingComposer, + $$NameTableProcessedTableManager, + $$NameTableInsertCompanionBuilder, + $$NameTableUpdateCompanionBuilder> { + $$NameTableProcessedTableManager(super.$state); +} + +class $$NameTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $NameTable> { + $$NameTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualClientReferenceId => $state + .composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get givenName => $state.composableBuilder( + column: $state.table.givenName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get familyName => $state.composableBuilder( + column: $state.table.familyName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get otherNames => $state.composableBuilder( + column: $state.table.otherNames, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$NameTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $NameTable> { + $$NameTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualClientReferenceId => + $state.composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get givenName => $state.composableBuilder( + column: $state.table.givenName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get familyName => $state.composableBuilder( + column: $state.table.familyName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get otherNames => $state.composableBuilder( + column: $state.table.otherNames, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$BoundaryTableInsertCompanionBuilder = BoundaryCompanion Function({ + Value code, + Value name, + Value label, + Value latitude, + Value longitude, + Value materializedPath, + Value auditCreatedBy, + Value boundaryNum, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value rowid, +}); +typedef $$BoundaryTableUpdateCompanionBuilder = BoundaryCompanion Function({ + Value code, + Value name, + Value label, + Value latitude, + Value longitude, + Value materializedPath, + Value auditCreatedBy, + Value boundaryNum, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value rowid, +}); + +class $$BoundaryTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $BoundaryTable, + BoundaryData, + $$BoundaryTableFilterComposer, + $$BoundaryTableOrderingComposer, + $$BoundaryTableProcessedTableManager, + $$BoundaryTableInsertCompanionBuilder, + $$BoundaryTableUpdateCompanionBuilder> { + $$BoundaryTableTableManager(_$LocalSqlDataStore db, $BoundaryTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$BoundaryTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$BoundaryTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$BoundaryTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value code = const Value.absent(), + Value name = const Value.absent(), + Value label = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value materializedPath = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value boundaryNum = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + BoundaryCompanion( + code: code, + name: name, + label: label, + latitude: latitude, + longitude: longitude, + materializedPath: materializedPath, + auditCreatedBy: auditCreatedBy, + boundaryNum: boundaryNum, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value code = const Value.absent(), + Value name = const Value.absent(), + Value label = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value materializedPath = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value boundaryNum = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + BoundaryCompanion.insert( + code: code, + name: name, + label: label, + latitude: latitude, + longitude: longitude, + materializedPath: materializedPath, + auditCreatedBy: auditCreatedBy, + boundaryNum: boundaryNum, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + )); +} + +class $$BoundaryTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $BoundaryTable, + BoundaryData, + $$BoundaryTableFilterComposer, + $$BoundaryTableOrderingComposer, + $$BoundaryTableProcessedTableManager, + $$BoundaryTableInsertCompanionBuilder, + $$BoundaryTableUpdateCompanionBuilder> { + $$BoundaryTableProcessedTableManager(super.$state); +} + +class $$BoundaryTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $BoundaryTable> { + $$BoundaryTableFilterComposer(super.$state); + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get label => $state.composableBuilder( + column: $state.table.label, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get materializedPath => $state.composableBuilder( + column: $state.table.materializedPath, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundaryNum => $state.composableBuilder( + column: $state.table.boundaryNum, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$BoundaryTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $BoundaryTable> { + $$BoundaryTableOrderingComposer(super.$state); + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get label => $state.composableBuilder( + column: $state.table.label, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get materializedPath => $state.composableBuilder( + column: $state.table.materializedPath, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundaryNum => $state.composableBuilder( + column: $state.table.boundaryNum, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$DocumentTableInsertCompanionBuilder = DocumentCompanion Function({ + Value id, + Value documentType, + Value fileStoreId, + Value documentUid, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$DocumentTableUpdateCompanionBuilder = DocumentCompanion Function({ + Value id, + Value documentType, + Value fileStoreId, + Value documentUid, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$DocumentTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $DocumentTable, + DocumentData, + $$DocumentTableFilterComposer, + $$DocumentTableOrderingComposer, + $$DocumentTableProcessedTableManager, + $$DocumentTableInsertCompanionBuilder, + $$DocumentTableUpdateCompanionBuilder> { + $$DocumentTableTableManager(_$LocalSqlDataStore db, $DocumentTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$DocumentTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$DocumentTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$DocumentTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value documentType = const Value.absent(), + Value fileStoreId = const Value.absent(), + Value documentUid = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DocumentCompanion( + id: id, + documentType: documentType, + fileStoreId: fileStoreId, + documentUid: documentUid, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value documentType = const Value.absent(), + Value fileStoreId = const Value.absent(), + Value documentUid = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DocumentCompanion.insert( + id: id, + documentType: documentType, + fileStoreId: fileStoreId, + documentUid: documentUid, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$DocumentTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $DocumentTable, + DocumentData, + $$DocumentTableFilterComposer, + $$DocumentTableOrderingComposer, + $$DocumentTableProcessedTableManager, + $$DocumentTableInsertCompanionBuilder, + $$DocumentTableUpdateCompanionBuilder> { + $$DocumentTableProcessedTableManager(super.$state); +} + +class $$DocumentTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $DocumentTable> { + $$DocumentTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get documentType => $state.composableBuilder( + column: $state.table.documentType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get fileStoreId => $state.composableBuilder( + column: $state.table.fileStoreId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get documentUid => $state.composableBuilder( + column: $state.table.documentUid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$DocumentTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $DocumentTable> { + $$DocumentTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get documentType => $state.composableBuilder( + column: $state.table.documentType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get fileStoreId => $state.composableBuilder( + column: $state.table.fileStoreId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get documentUid => $state.composableBuilder( + column: $state.table.documentUid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$FacilityTableInsertCompanionBuilder = FacilityCompanion Function({ + required String id, + Value isPermanent, + Value usage, + Value storageCapacity, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value name, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$FacilityTableUpdateCompanionBuilder = FacilityCompanion Function({ + Value id, + Value isPermanent, + Value usage, + Value storageCapacity, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value name, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$FacilityTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $FacilityTable, + FacilityData, + $$FacilityTableFilterComposer, + $$FacilityTableOrderingComposer, + $$FacilityTableProcessedTableManager, + $$FacilityTableInsertCompanionBuilder, + $$FacilityTableUpdateCompanionBuilder> { + $$FacilityTableTableManager(_$LocalSqlDataStore db, $FacilityTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$FacilityTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$FacilityTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$FacilityTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value isPermanent = const Value.absent(), + Value usage = const Value.absent(), + Value storageCapacity = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + FacilityCompanion( + id: id, + isPermanent: isPermanent, + usage: usage, + storageCapacity: storageCapacity, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + name: name, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value isPermanent = const Value.absent(), + Value usage = const Value.absent(), + Value storageCapacity = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + FacilityCompanion.insert( + id: id, + isPermanent: isPermanent, + usage: usage, + storageCapacity: storageCapacity, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + name: name, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$FacilityTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $FacilityTable, + FacilityData, + $$FacilityTableFilterComposer, + $$FacilityTableOrderingComposer, + $$FacilityTableProcessedTableManager, + $$FacilityTableInsertCompanionBuilder, + $$FacilityTableUpdateCompanionBuilder> { + $$FacilityTableProcessedTableManager(super.$state); +} + +class $$FacilityTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $FacilityTable> { + $$FacilityTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isPermanent => $state.composableBuilder( + column: $state.table.isPermanent, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get usage => $state.composableBuilder( + column: $state.table.usage, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get storageCapacity => $state.composableBuilder( + column: $state.table.storageCapacity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$FacilityTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $FacilityTable> { + $$FacilityTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isPermanent => $state.composableBuilder( + column: $state.table.isPermanent, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get usage => $state.composableBuilder( + column: $state.table.usage, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get storageCapacity => $state.composableBuilder( + column: $state.table.storageCapacity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProductTableInsertCompanionBuilder = ProductCompanion Function({ + Value id, + Value type, + Value name, + Value manufacturer, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProductTableUpdateCompanionBuilder = ProductCompanion Function({ + Value id, + Value type, + Value name, + Value manufacturer, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProductTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProductTable, + ProductData, + $$ProductTableFilterComposer, + $$ProductTableOrderingComposer, + $$ProductTableProcessedTableManager, + $$ProductTableInsertCompanionBuilder, + $$ProductTableUpdateCompanionBuilder> { + $$ProductTableTableManager(_$LocalSqlDataStore db, $ProductTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProductTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProductTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$ProductTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value type = const Value.absent(), + Value name = const Value.absent(), + Value manufacturer = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductCompanion( + id: id, + type: type, + name: name, + manufacturer: manufacturer, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value type = const Value.absent(), + Value name = const Value.absent(), + Value manufacturer = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductCompanion.insert( + id: id, + type: type, + name: name, + manufacturer: manufacturer, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProductTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProductTable, + ProductData, + $$ProductTableFilterComposer, + $$ProductTableOrderingComposer, + $$ProductTableProcessedTableManager, + $$ProductTableInsertCompanionBuilder, + $$ProductTableUpdateCompanionBuilder> { + $$ProductTableProcessedTableManager(super.$state); +} + +class $$ProductTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProductTable> { + $$ProductTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get manufacturer => $state.composableBuilder( + column: $state.table.manufacturer, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProductTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProductTable> { + $$ProductTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get manufacturer => $state.composableBuilder( + column: $state.table.manufacturer, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProductVariantTableInsertCompanionBuilder = ProductVariantCompanion + Function({ + required String id, + Value productId, + Value sku, + Value variation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProductVariantTableUpdateCompanionBuilder = ProductVariantCompanion + Function({ + Value id, + Value productId, + Value sku, + Value variation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProductVariantTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProductVariantTable, + ProductVariantData, + $$ProductVariantTableFilterComposer, + $$ProductVariantTableOrderingComposer, + $$ProductVariantTableProcessedTableManager, + $$ProductVariantTableInsertCompanionBuilder, + $$ProductVariantTableUpdateCompanionBuilder> { + $$ProductVariantTableTableManager( + _$LocalSqlDataStore db, $ProductVariantTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProductVariantTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProductVariantTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProductVariantTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value productId = const Value.absent(), + Value sku = const Value.absent(), + Value variation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductVariantCompanion( + id: id, + productId: productId, + sku: sku, + variation: variation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value productId = const Value.absent(), + Value sku = const Value.absent(), + Value variation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProductVariantCompanion.insert( + id: id, + productId: productId, + sku: sku, + variation: variation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProductVariantTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProductVariantTable, + ProductVariantData, + $$ProductVariantTableFilterComposer, + $$ProductVariantTableOrderingComposer, + $$ProductVariantTableProcessedTableManager, + $$ProductVariantTableInsertCompanionBuilder, + $$ProductVariantTableUpdateCompanionBuilder> { + $$ProductVariantTableProcessedTableManager(super.$state); +} + +class $$ProductVariantTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProductVariantTable> { + $$ProductVariantTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productId => $state.composableBuilder( + column: $state.table.productId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get sku => $state.composableBuilder( + column: $state.table.sku, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get variation => $state.composableBuilder( + column: $state.table.variation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProductVariantTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProductVariantTable> { + $$ProductVariantTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productId => $state.composableBuilder( + column: $state.table.productId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get sku => $state.composableBuilder( + column: $state.table.sku, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get variation => $state.composableBuilder( + column: $state.table.variation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectTableInsertCompanionBuilder = ProjectCompanion Function({ + Value projectType, + required String id, + Value projectTypeId, + Value projectNumber, + Value subProjectTypeId, + Value isTaskEnabled, + Value parent, + required String name, + Value department, + Value description, + Value referenceId, + Value projectHierarchy, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectTableUpdateCompanionBuilder = ProjectCompanion Function({ + Value projectType, + Value id, + Value projectTypeId, + Value projectNumber, + Value subProjectTypeId, + Value isTaskEnabled, + Value parent, + Value name, + Value department, + Value description, + Value referenceId, + Value projectHierarchy, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); + +class $$ProjectTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectTable, + ProjectData, + $$ProjectTableFilterComposer, + $$ProjectTableOrderingComposer, + $$ProjectTableProcessedTableManager, + $$ProjectTableInsertCompanionBuilder, + $$ProjectTableUpdateCompanionBuilder> { + $$ProjectTableTableManager(_$LocalSqlDataStore db, $ProjectTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$ProjectTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value projectType = const Value.absent(), + Value id = const Value.absent(), + Value projectTypeId = const Value.absent(), + Value projectNumber = const Value.absent(), + Value subProjectTypeId = const Value.absent(), + Value isTaskEnabled = const Value.absent(), + Value parent = const Value.absent(), + Value name = const Value.absent(), + Value department = const Value.absent(), + Value description = const Value.absent(), + Value referenceId = const Value.absent(), + Value projectHierarchy = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectCompanion( + projectType: projectType, + id: id, + projectTypeId: projectTypeId, + projectNumber: projectNumber, + subProjectTypeId: subProjectTypeId, + isTaskEnabled: isTaskEnabled, + parent: parent, + name: name, + department: department, + description: description, + referenceId: referenceId, + projectHierarchy: projectHierarchy, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value projectType = const Value.absent(), + required String id, + Value projectTypeId = const Value.absent(), + Value projectNumber = const Value.absent(), + Value subProjectTypeId = const Value.absent(), + Value isTaskEnabled = const Value.absent(), + Value parent = const Value.absent(), + required String name, + Value department = const Value.absent(), + Value description = const Value.absent(), + Value referenceId = const Value.absent(), + Value projectHierarchy = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectCompanion.insert( + projectType: projectType, + id: id, + projectTypeId: projectTypeId, + projectNumber: projectNumber, + subProjectTypeId: subProjectTypeId, + isTaskEnabled: isTaskEnabled, + parent: parent, + name: name, + department: department, + description: description, + referenceId: referenceId, + projectHierarchy: projectHierarchy, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectTable, + ProjectData, + $$ProjectTableFilterComposer, + $$ProjectTableOrderingComposer, + $$ProjectTableProcessedTableManager, + $$ProjectTableInsertCompanionBuilder, + $$ProjectTableUpdateCompanionBuilder> { + $$ProjectTableProcessedTableManager(super.$state); +} + +class $$ProjectTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectTable> { + $$ProjectTableFilterComposer(super.$state); + ColumnFilters get projectType => $state.composableBuilder( + column: $state.table.projectType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectTypeId => $state.composableBuilder( + column: $state.table.projectTypeId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectNumber => $state.composableBuilder( + column: $state.table.projectNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get subProjectTypeId => $state.composableBuilder( + column: $state.table.subProjectTypeId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isTaskEnabled => $state.composableBuilder( + column: $state.table.isTaskEnabled, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get parent => $state.composableBuilder( + column: $state.table.parent, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get department => $state.composableBuilder( + column: $state.table.department, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectHierarchy => $state.composableBuilder( + column: $state.table.projectHierarchy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectTable> { + $$ProjectTableOrderingComposer(super.$state); + ColumnOrderings get projectType => $state.composableBuilder( + column: $state.table.projectType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectTypeId => $state.composableBuilder( + column: $state.table.projectTypeId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectNumber => $state.composableBuilder( + column: $state.table.projectNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get subProjectTypeId => $state.composableBuilder( + column: $state.table.subProjectTypeId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isTaskEnabled => $state.composableBuilder( + column: $state.table.isTaskEnabled, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get parent => $state.composableBuilder( + column: $state.table.parent, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get department => $state.composableBuilder( + column: $state.table.department, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectHierarchy => $state.composableBuilder( + column: $state.table.projectHierarchy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectBeneficiaryTableInsertCompanionBuilder + = ProjectBeneficiaryCompanion Function({ + Value id, + Value projectId, + Value beneficiaryId, + Value tag, + Value beneficiaryClientReferenceId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + required int dateOfRegistration, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectBeneficiaryTableUpdateCompanionBuilder + = ProjectBeneficiaryCompanion Function({ + Value id, + Value projectId, + Value beneficiaryId, + Value tag, + Value beneficiaryClientReferenceId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value dateOfRegistration, + Value additionalFields, + Value rowid, +}); + +class $$ProjectBeneficiaryTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectBeneficiaryTable, + ProjectBeneficiaryData, + $$ProjectBeneficiaryTableFilterComposer, + $$ProjectBeneficiaryTableOrderingComposer, + $$ProjectBeneficiaryTableProcessedTableManager, + $$ProjectBeneficiaryTableInsertCompanionBuilder, + $$ProjectBeneficiaryTableUpdateCompanionBuilder> { + $$ProjectBeneficiaryTableTableManager( + _$LocalSqlDataStore db, $ProjectBeneficiaryTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectBeneficiaryTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$ProjectBeneficiaryTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectBeneficiaryTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value tag = const Value.absent(), + Value beneficiaryClientReferenceId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value dateOfRegistration = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectBeneficiaryCompanion( + id: id, + projectId: projectId, + beneficiaryId: beneficiaryId, + tag: tag, + beneficiaryClientReferenceId: beneficiaryClientReferenceId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfRegistration: dateOfRegistration, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value tag = const Value.absent(), + Value beneficiaryClientReferenceId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + required int dateOfRegistration, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectBeneficiaryCompanion.insert( + id: id, + projectId: projectId, + beneficiaryId: beneficiaryId, + tag: tag, + beneficiaryClientReferenceId: beneficiaryClientReferenceId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfRegistration: dateOfRegistration, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectBeneficiaryTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectBeneficiaryTable, + ProjectBeneficiaryData, + $$ProjectBeneficiaryTableFilterComposer, + $$ProjectBeneficiaryTableOrderingComposer, + $$ProjectBeneficiaryTableProcessedTableManager, + $$ProjectBeneficiaryTableInsertCompanionBuilder, + $$ProjectBeneficiaryTableUpdateCompanionBuilder> { + $$ProjectBeneficiaryTableProcessedTableManager(super.$state); +} + +class $$ProjectBeneficiaryTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectBeneficiaryTable> { + $$ProjectBeneficiaryTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tag => $state.composableBuilder( + column: $state.table.tag, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get beneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.beneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfRegistration => $state.composableBuilder( + column: $state.table.dateOfRegistration, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectBeneficiaryTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectBeneficiaryTable> { + $$ProjectBeneficiaryTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tag => $state.composableBuilder( + column: $state.table.tag, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.beneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfRegistration => $state.composableBuilder( + column: $state.table.dateOfRegistration, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectFacilityTableInsertCompanionBuilder = ProjectFacilityCompanion + Function({ + required String id, + required String facilityId, + required String projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectFacilityTableUpdateCompanionBuilder = ProjectFacilityCompanion + Function({ + Value id, + Value facilityId, + Value projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProjectFacilityTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectFacilityTable, + ProjectFacilityData, + $$ProjectFacilityTableFilterComposer, + $$ProjectFacilityTableOrderingComposer, + $$ProjectFacilityTableProcessedTableManager, + $$ProjectFacilityTableInsertCompanionBuilder, + $$ProjectFacilityTableUpdateCompanionBuilder> { + $$ProjectFacilityTableTableManager( + _$LocalSqlDataStore db, $ProjectFacilityTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectFacilityTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectFacilityTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectFacilityTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value facilityId = const Value.absent(), + Value projectId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectFacilityCompanion( + id: id, + facilityId: facilityId, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + required String facilityId, + required String projectId, + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectFacilityCompanion.insert( + id: id, + facilityId: facilityId, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectFacilityTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectFacilityTable, + ProjectFacilityData, + $$ProjectFacilityTableFilterComposer, + $$ProjectFacilityTableOrderingComposer, + $$ProjectFacilityTableProcessedTableManager, + $$ProjectFacilityTableInsertCompanionBuilder, + $$ProjectFacilityTableUpdateCompanionBuilder> { + $$ProjectFacilityTableProcessedTableManager(super.$state); +} + +class $$ProjectFacilityTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectFacilityTable> { + $$ProjectFacilityTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectFacilityTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectFacilityTable> { + $$ProjectFacilityTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectProductVariantTableInsertCompanionBuilder + = ProjectProductVariantCompanion Function({ + required String productVariantId, + Value type, + Value isBaseUnitVariant, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectProductVariantTableUpdateCompanionBuilder + = ProjectProductVariantCompanion Function({ + Value productVariantId, + Value type, + Value isBaseUnitVariant, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProjectProductVariantTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectProductVariantTable, + ProjectProductVariantData, + $$ProjectProductVariantTableFilterComposer, + $$ProjectProductVariantTableOrderingComposer, + $$ProjectProductVariantTableProcessedTableManager, + $$ProjectProductVariantTableInsertCompanionBuilder, + $$ProjectProductVariantTableUpdateCompanionBuilder> { + $$ProjectProductVariantTableTableManager( + _$LocalSqlDataStore db, $ProjectProductVariantTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: $$ProjectProductVariantTableFilterComposer( + ComposerState(db, table)), + orderingComposer: $$ProjectProductVariantTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectProductVariantTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value productVariantId = const Value.absent(), + Value type = const Value.absent(), + Value isBaseUnitVariant = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectProductVariantCompanion( + productVariantId: productVariantId, + type: type, + isBaseUnitVariant: isBaseUnitVariant, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String productVariantId, + Value type = const Value.absent(), + Value isBaseUnitVariant = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectProductVariantCompanion.insert( + productVariantId: productVariantId, + type: type, + isBaseUnitVariant: isBaseUnitVariant, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectProductVariantTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectProductVariantTable, + ProjectProductVariantData, + $$ProjectProductVariantTableFilterComposer, + $$ProjectProductVariantTableOrderingComposer, + $$ProjectProductVariantTableProcessedTableManager, + $$ProjectProductVariantTableInsertCompanionBuilder, + $$ProjectProductVariantTableUpdateCompanionBuilder> { + $$ProjectProductVariantTableProcessedTableManager(super.$state); +} + +class $$ProjectProductVariantTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectProductVariantTable> { + $$ProjectProductVariantTableFilterComposer(super.$state); + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isBaseUnitVariant => $state.composableBuilder( + column: $state.table.isBaseUnitVariant, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ComposableFilter projectResourceRefs( + ComposableFilter Function($$ProjectResourceTableFilterComposer f) f) { + final $$ProjectResourceTableFilterComposer composer = + $state.composerBuilder( + composer: this, + getCurrentColumn: (t) => t.productVariantId, + referencedTable: $state.db.projectResource, + getReferencedColumn: (t) => t.resource, + builder: (joinBuilder, parentComposers) => + $$ProjectResourceTableFilterComposer(ComposerState($state.db, + $state.db.projectResource, joinBuilder, parentComposers))); + return f(composer); + } +} + +class $$ProjectProductVariantTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectProductVariantTable> { + $$ProjectProductVariantTableOrderingComposer(super.$state); + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isBaseUnitVariant => $state.composableBuilder( + column: $state.table.isBaseUnitVariant, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectResourceTableInsertCompanionBuilder = ProjectResourceCompanion + Function({ + Value id, + Value projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + required String resource, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectResourceTableUpdateCompanionBuilder = ProjectResourceCompanion + Function({ + Value id, + Value projectId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value resource, + Value additionalFields, + Value rowid, +}); + +class $$ProjectResourceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectResourceTable, + ProjectResourceData, + $$ProjectResourceTableFilterComposer, + $$ProjectResourceTableOrderingComposer, + $$ProjectResourceTableProcessedTableManager, + $$ProjectResourceTableInsertCompanionBuilder, + $$ProjectResourceTableUpdateCompanionBuilder> { + $$ProjectResourceTableTableManager( + _$LocalSqlDataStore db, $ProjectResourceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectResourceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectResourceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectResourceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value resource = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectResourceCompanion( + id: id, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + resource: resource, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + required String resource, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectResourceCompanion.insert( + id: id, + projectId: projectId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + resource: resource, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectResourceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectResourceTable, + ProjectResourceData, + $$ProjectResourceTableFilterComposer, + $$ProjectResourceTableOrderingComposer, + $$ProjectResourceTableProcessedTableManager, + $$ProjectResourceTableInsertCompanionBuilder, + $$ProjectResourceTableUpdateCompanionBuilder> { + $$ProjectResourceTableProcessedTableManager(super.$state); +} + +class $$ProjectResourceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectResourceTable> { + $$ProjectResourceTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + $$ProjectProductVariantTableFilterComposer get resource { + final $$ProjectProductVariantTableFilterComposer composer = + $state.composerBuilder( + composer: this, + getCurrentColumn: (t) => t.resource, + referencedTable: $state.db.projectProductVariant, + getReferencedColumn: (t) => t.productVariantId, + builder: (joinBuilder, parentComposers) => + $$ProjectProductVariantTableFilterComposer(ComposerState( + $state.db, + $state.db.projectProductVariant, + joinBuilder, + parentComposers))); + return composer; + } +} + +class $$ProjectResourceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectResourceTable> { + $$ProjectResourceTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + $$ProjectProductVariantTableOrderingComposer get resource { + final $$ProjectProductVariantTableOrderingComposer composer = + $state.composerBuilder( + composer: this, + getCurrentColumn: (t) => t.resource, + referencedTable: $state.db.projectProductVariant, + getReferencedColumn: (t) => t.productVariantId, + builder: (joinBuilder, parentComposers) => + $$ProjectProductVariantTableOrderingComposer(ComposerState( + $state.db, + $state.db.projectProductVariant, + joinBuilder, + parentComposers))); + return composer; + } +} + +typedef $$ProjectStaffTableInsertCompanionBuilder = ProjectStaffCompanion + Function({ + required String id, + Value staffId, + Value userId, + Value projectId, + Value channel, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectStaffTableUpdateCompanionBuilder = ProjectStaffCompanion + Function({ + Value id, + Value staffId, + Value userId, + Value projectId, + Value channel, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value startDate, + Value endDate, + Value additionalFields, + Value rowid, +}); + +class $$ProjectStaffTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectStaffTable, + ProjectStaffData, + $$ProjectStaffTableFilterComposer, + $$ProjectStaffTableOrderingComposer, + $$ProjectStaffTableProcessedTableManager, + $$ProjectStaffTableInsertCompanionBuilder, + $$ProjectStaffTableUpdateCompanionBuilder> { + $$ProjectStaffTableTableManager( + _$LocalSqlDataStore db, $ProjectStaffTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectStaffTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectStaffTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectStaffTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value staffId = const Value.absent(), + Value userId = const Value.absent(), + Value projectId = const Value.absent(), + Value channel = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectStaffCompanion( + id: id, + staffId: staffId, + userId: userId, + projectId: projectId, + channel: channel, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value staffId = const Value.absent(), + Value userId = const Value.absent(), + Value projectId = const Value.absent(), + Value channel = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value startDate = const Value.absent(), + Value endDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectStaffCompanion.insert( + id: id, + staffId: staffId, + userId: userId, + projectId: projectId, + channel: channel, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + startDate: startDate, + endDate: endDate, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectStaffTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectStaffTable, + ProjectStaffData, + $$ProjectStaffTableFilterComposer, + $$ProjectStaffTableOrderingComposer, + $$ProjectStaffTableProcessedTableManager, + $$ProjectStaffTableInsertCompanionBuilder, + $$ProjectStaffTableUpdateCompanionBuilder> { + $$ProjectStaffTableProcessedTableManager(super.$state); +} + +class $$ProjectStaffTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectStaffTable> { + $$ProjectStaffTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get staffId => $state.composableBuilder( + column: $state.table.staffId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get channel => $state.composableBuilder( + column: $state.table.channel, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectStaffTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectStaffTable> { + $$ProjectStaffTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get staffId => $state.composableBuilder( + column: $state.table.staffId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get channel => $state.composableBuilder( + column: $state.table.channel, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get startDate => $state.composableBuilder( + column: $state.table.startDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get endDate => $state.composableBuilder( + column: $state.table.endDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ProjectTypeTableInsertCompanionBuilder = ProjectTypeCompanion + Function({ + Value id, + Value name, + Value code, + Value group, + Value beneficiaryType, + Value eligibilityCriteria, + Value taskProcedure, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ProjectTypeTableUpdateCompanionBuilder = ProjectTypeCompanion + Function({ + Value id, + Value name, + Value code, + Value group, + Value beneficiaryType, + Value eligibilityCriteria, + Value taskProcedure, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ProjectTypeTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ProjectTypeTable, + ProjectTypeData, + $$ProjectTypeTableFilterComposer, + $$ProjectTypeTableOrderingComposer, + $$ProjectTypeTableProcessedTableManager, + $$ProjectTypeTableInsertCompanionBuilder, + $$ProjectTypeTableUpdateCompanionBuilder> { + $$ProjectTypeTableTableManager( + _$LocalSqlDataStore db, $ProjectTypeTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ProjectTypeTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ProjectTypeTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ProjectTypeTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value name = const Value.absent(), + Value code = const Value.absent(), + Value group = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value eligibilityCriteria = const Value.absent(), + Value taskProcedure = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectTypeCompanion( + id: id, + name: name, + code: code, + group: group, + beneficiaryType: beneficiaryType, + eligibilityCriteria: eligibilityCriteria, + taskProcedure: taskProcedure, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value name = const Value.absent(), + Value code = const Value.absent(), + Value group = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value eligibilityCriteria = const Value.absent(), + Value taskProcedure = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ProjectTypeCompanion.insert( + id: id, + name: name, + code: code, + group: group, + beneficiaryType: beneficiaryType, + eligibilityCriteria: eligibilityCriteria, + taskProcedure: taskProcedure, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ProjectTypeTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ProjectTypeTable, + ProjectTypeData, + $$ProjectTypeTableFilterComposer, + $$ProjectTypeTableOrderingComposer, + $$ProjectTypeTableProcessedTableManager, + $$ProjectTypeTableInsertCompanionBuilder, + $$ProjectTypeTableUpdateCompanionBuilder> { + $$ProjectTypeTableProcessedTableManager(super.$state); +} + +class $$ProjectTypeTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ProjectTypeTable> { + $$ProjectTypeTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get group => $state.composableBuilder( + column: $state.table.group, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters + get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get eligibilityCriteria => $state.composableBuilder( + column: $state.table.eligibilityCriteria, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskProcedure => $state.composableBuilder( + column: $state.table.taskProcedure, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ProjectTypeTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ProjectTypeTable> { + $$ProjectTypeTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get group => $state.composableBuilder( + column: $state.table.group, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get eligibilityCriteria => $state.composableBuilder( + column: $state.table.eligibilityCriteria, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskProcedure => $state.composableBuilder( + column: $state.table.taskProcedure, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$IndividualTableInsertCompanionBuilder = IndividualCompanion Function({ + Value id, + Value individualId, + Value userId, + Value userUuid, + Value dateOfBirth, + Value mobileNumber, + Value altContactNumber, + Value email, + Value fatherName, + Value husbandName, + Value photo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value bloodGroup, + Value gender, + Value additionalFields, + Value rowid, +}); +typedef $$IndividualTableUpdateCompanionBuilder = IndividualCompanion Function({ + Value id, + Value individualId, + Value userId, + Value userUuid, + Value dateOfBirth, + Value mobileNumber, + Value altContactNumber, + Value email, + Value fatherName, + Value husbandName, + Value photo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value bloodGroup, + Value gender, + Value additionalFields, + Value rowid, +}); + +class $$IndividualTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $IndividualTable, + IndividualData, + $$IndividualTableFilterComposer, + $$IndividualTableOrderingComposer, + $$IndividualTableProcessedTableManager, + $$IndividualTableInsertCompanionBuilder, + $$IndividualTableUpdateCompanionBuilder> { + $$IndividualTableTableManager(_$LocalSqlDataStore db, $IndividualTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$IndividualTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$IndividualTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$IndividualTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualId = const Value.absent(), + Value userId = const Value.absent(), + Value userUuid = const Value.absent(), + Value dateOfBirth = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value email = const Value.absent(), + Value fatherName = const Value.absent(), + Value husbandName = const Value.absent(), + Value photo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value gender = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IndividualCompanion( + id: id, + individualId: individualId, + userId: userId, + userUuid: userUuid, + dateOfBirth: dateOfBirth, + mobileNumber: mobileNumber, + altContactNumber: altContactNumber, + email: email, + fatherName: fatherName, + husbandName: husbandName, + photo: photo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + bloodGroup: bloodGroup, + gender: gender, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value individualId = const Value.absent(), + Value userId = const Value.absent(), + Value userUuid = const Value.absent(), + Value dateOfBirth = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value email = const Value.absent(), + Value fatherName = const Value.absent(), + Value husbandName = const Value.absent(), + Value photo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value gender = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IndividualCompanion.insert( + id: id, + individualId: individualId, + userId: userId, + userUuid: userUuid, + dateOfBirth: dateOfBirth, + mobileNumber: mobileNumber, + altContactNumber: altContactNumber, + email: email, + fatherName: fatherName, + husbandName: husbandName, + photo: photo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + bloodGroup: bloodGroup, + gender: gender, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$IndividualTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $IndividualTable, + IndividualData, + $$IndividualTableFilterComposer, + $$IndividualTableOrderingComposer, + $$IndividualTableProcessedTableManager, + $$IndividualTableInsertCompanionBuilder, + $$IndividualTableUpdateCompanionBuilder> { + $$IndividualTableProcessedTableManager(super.$state); +} + +class $$IndividualTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $IndividualTable> { + $$IndividualTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userUuid => $state.composableBuilder( + column: $state.table.userUuid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfBirth => $state.composableBuilder( + column: $state.table.dateOfBirth, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get email => $state.composableBuilder( + column: $state.table.email, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get fatherName => $state.composableBuilder( + column: $state.table.fatherName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get husbandName => $state.composableBuilder( + column: $state.table.husbandName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters get bloodGroup => + $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters get gender => + $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$IndividualTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $IndividualTable> { + $$IndividualTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userUuid => $state.composableBuilder( + column: $state.table.userUuid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfBirth => $state.composableBuilder( + column: $state.table.dateOfBirth, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get email => $state.composableBuilder( + column: $state.table.email, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get fatherName => $state.composableBuilder( + column: $state.table.fatherName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get husbandName => $state.composableBuilder( + column: $state.table.husbandName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get bloodGroup => $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get gender => $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$IdentifierTableInsertCompanionBuilder = IdentifierCompanion Function({ + Value id, + Value identifierType, + Value identifierId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$IdentifierTableUpdateCompanionBuilder = IdentifierCompanion Function({ + Value id, + Value identifierType, + Value identifierId, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$IdentifierTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $IdentifierTable, + IdentifierData, + $$IdentifierTableFilterComposer, + $$IdentifierTableOrderingComposer, + $$IdentifierTableProcessedTableManager, + $$IdentifierTableInsertCompanionBuilder, + $$IdentifierTableUpdateCompanionBuilder> { + $$IdentifierTableTableManager(_$LocalSqlDataStore db, $IdentifierTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$IdentifierTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$IdentifierTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$IdentifierTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value identifierType = const Value.absent(), + Value identifierId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IdentifierCompanion( + id: id, + identifierType: identifierType, + identifierId: identifierId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value identifierType = const Value.absent(), + Value identifierId = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + IdentifierCompanion.insert( + id: id, + identifierType: identifierType, + identifierId: identifierId, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$IdentifierTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $IdentifierTable, + IdentifierData, + $$IdentifierTableFilterComposer, + $$IdentifierTableOrderingComposer, + $$IdentifierTableProcessedTableManager, + $$IdentifierTableInsertCompanionBuilder, + $$IdentifierTableUpdateCompanionBuilder> { + $$IdentifierTableProcessedTableManager(super.$state); +} + +class $$IdentifierTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $IdentifierTable> { + $$IdentifierTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get identifierType => $state.composableBuilder( + column: $state.table.identifierType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get identifierId => $state.composableBuilder( + column: $state.table.identifierId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$IdentifierTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $IdentifierTable> { + $$IdentifierTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get identifierType => $state.composableBuilder( + column: $state.table.identifierType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get identifierId => $state.composableBuilder( + column: $state.table.identifierId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$StockTableInsertCompanionBuilder = StockCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value transactingPartyId, + Value transactingPartyType, + Value quantity, + Value waybillNumber, + Value receiverId, + Value receiverType, + Value senderId, + Value senderType, + Value dateOfEntry, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + Value transactionType, + Value transactionReason, + Value additionalFields, + Value rowid, +}); +typedef $$StockTableUpdateCompanionBuilder = StockCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value transactingPartyId, + Value transactingPartyType, + Value quantity, + Value waybillNumber, + Value receiverId, + Value receiverType, + Value senderId, + Value senderType, + Value dateOfEntry, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value transactionType, + Value transactionReason, + Value additionalFields, + Value rowid, +}); + +class $$StockTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $StockTable, + StockData, + $$StockTableFilterComposer, + $$StockTableOrderingComposer, + $$StockTableProcessedTableManager, + $$StockTableInsertCompanionBuilder, + $$StockTableUpdateCompanionBuilder> { + $$StockTableTableManager(_$LocalSqlDataStore db, $StockTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$StockTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$StockTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$StockTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value transactingPartyId = const Value.absent(), + Value transactingPartyType = const Value.absent(), + Value quantity = const Value.absent(), + Value waybillNumber = const Value.absent(), + Value receiverId = const Value.absent(), + Value receiverType = const Value.absent(), + Value senderId = const Value.absent(), + Value senderType = const Value.absent(), + Value dateOfEntry = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value transactionType = const Value.absent(), + Value transactionReason = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockCompanion( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + transactingPartyId: transactingPartyId, + transactingPartyType: transactingPartyType, + quantity: quantity, + waybillNumber: waybillNumber, + receiverId: receiverId, + receiverType: receiverType, + senderId: senderId, + senderType: senderType, + dateOfEntry: dateOfEntry, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + transactionType: transactionType, + transactionReason: transactionReason, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value transactingPartyId = const Value.absent(), + Value transactingPartyType = const Value.absent(), + Value quantity = const Value.absent(), + Value waybillNumber = const Value.absent(), + Value receiverId = const Value.absent(), + Value receiverType = const Value.absent(), + Value senderId = const Value.absent(), + Value senderType = const Value.absent(), + Value dateOfEntry = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value transactionType = const Value.absent(), + Value transactionReason = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockCompanion.insert( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + transactingPartyId: transactingPartyId, + transactingPartyType: transactingPartyType, + quantity: quantity, + waybillNumber: waybillNumber, + receiverId: receiverId, + receiverType: receiverType, + senderId: senderId, + senderType: senderType, + dateOfEntry: dateOfEntry, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + transactionType: transactionType, + transactionReason: transactionReason, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$StockTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $StockTable, + StockData, + $$StockTableFilterComposer, + $$StockTableOrderingComposer, + $$StockTableProcessedTableManager, + $$StockTableInsertCompanionBuilder, + $$StockTableUpdateCompanionBuilder> { + $$StockTableProcessedTableManager(super.$state); +} + +class $$StockTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $StockTable> { + $$StockTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactingPartyId => $state.composableBuilder( + column: $state.table.transactingPartyId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactingPartyType => $state.composableBuilder( + column: $state.table.transactingPartyType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get waybillNumber => $state.composableBuilder( + column: $state.table.waybillNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get receiverId => $state.composableBuilder( + column: $state.table.receiverId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get receiverType => $state.composableBuilder( + column: $state.table.receiverType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get senderId => $state.composableBuilder( + column: $state.table.senderId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get senderType => $state.composableBuilder( + column: $state.table.senderType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfEntry => $state.composableBuilder( + column: $state.table.dateOfEntry, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactionType => $state.composableBuilder( + column: $state.table.transactionType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get transactionReason => $state.composableBuilder( + column: $state.table.transactionReason, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$StockTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $StockTable> { + $$StockTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactingPartyId => $state.composableBuilder( + column: $state.table.transactingPartyId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactingPartyType => $state.composableBuilder( + column: $state.table.transactingPartyType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get waybillNumber => $state.composableBuilder( + column: $state.table.waybillNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get receiverId => $state.composableBuilder( + column: $state.table.receiverId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get receiverType => $state.composableBuilder( + column: $state.table.receiverType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get senderId => $state.composableBuilder( + column: $state.table.senderId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get senderType => $state.composableBuilder( + column: $state.table.senderType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfEntry => $state.composableBuilder( + column: $state.table.dateOfEntry, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactionType => $state.composableBuilder( + column: $state.table.transactionType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get transactionReason => $state.composableBuilder( + column: $state.table.transactionReason, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$StockReconciliationTableInsertCompanionBuilder + = StockReconciliationCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value physicalCount, + Value calculatedCount, + Value commentsOnReconciliation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + required int dateOfReconciliation, + Value additionalFields, + Value rowid, +}); +typedef $$StockReconciliationTableUpdateCompanionBuilder + = StockReconciliationCompanion Function({ + Value id, + Value tenantId, + Value facilityId, + Value productVariantId, + Value referenceId, + Value referenceIdType, + Value physicalCount, + Value calculatedCount, + Value commentsOnReconciliation, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value dateOfReconciliation, + Value additionalFields, + Value rowid, +}); + +class $$StockReconciliationTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $StockReconciliationTable, + StockReconciliationData, + $$StockReconciliationTableFilterComposer, + $$StockReconciliationTableOrderingComposer, + $$StockReconciliationTableProcessedTableManager, + $$StockReconciliationTableInsertCompanionBuilder, + $$StockReconciliationTableUpdateCompanionBuilder> { + $$StockReconciliationTableTableManager( + _$LocalSqlDataStore db, $StockReconciliationTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: $$StockReconciliationTableFilterComposer( + ComposerState(db, table)), + orderingComposer: $$StockReconciliationTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$StockReconciliationTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value physicalCount = const Value.absent(), + Value calculatedCount = const Value.absent(), + Value commentsOnReconciliation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value dateOfReconciliation = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockReconciliationCompanion( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + physicalCount: physicalCount, + calculatedCount: calculatedCount, + commentsOnReconciliation: commentsOnReconciliation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfReconciliation: dateOfReconciliation, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value facilityId = const Value.absent(), + Value productVariantId = const Value.absent(), + Value referenceId = const Value.absent(), + Value referenceIdType = const Value.absent(), + Value physicalCount = const Value.absent(), + Value calculatedCount = const Value.absent(), + Value commentsOnReconciliation = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + required int dateOfReconciliation, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StockReconciliationCompanion.insert( + id: id, + tenantId: tenantId, + facilityId: facilityId, + productVariantId: productVariantId, + referenceId: referenceId, + referenceIdType: referenceIdType, + physicalCount: physicalCount, + calculatedCount: calculatedCount, + commentsOnReconciliation: commentsOnReconciliation, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + dateOfReconciliation: dateOfReconciliation, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$StockReconciliationTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $StockReconciliationTable, + StockReconciliationData, + $$StockReconciliationTableFilterComposer, + $$StockReconciliationTableOrderingComposer, + $$StockReconciliationTableProcessedTableManager, + $$StockReconciliationTableInsertCompanionBuilder, + $$StockReconciliationTableUpdateCompanionBuilder> { + $$StockReconciliationTableProcessedTableManager(super.$state); +} + +class $$StockReconciliationTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $StockReconciliationTable> { + $$StockReconciliationTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get physicalCount => $state.composableBuilder( + column: $state.table.physicalCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get calculatedCount => $state.composableBuilder( + column: $state.table.calculatedCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get commentsOnReconciliation => + $state.composableBuilder( + column: $state.table.commentsOnReconciliation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dateOfReconciliation => $state.composableBuilder( + column: $state.table.dateOfReconciliation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$StockReconciliationTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $StockReconciliationTable> { + $$StockReconciliationTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get facilityId => $state.composableBuilder( + column: $state.table.facilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceIdType => $state.composableBuilder( + column: $state.table.referenceIdType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get physicalCount => $state.composableBuilder( + column: $state.table.physicalCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get calculatedCount => $state.composableBuilder( + column: $state.table.calculatedCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get commentsOnReconciliation => + $state.composableBuilder( + column: $state.table.commentsOnReconciliation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dateOfReconciliation => $state.composableBuilder( + column: $state.table.dateOfReconciliation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$TargetTableInsertCompanionBuilder = TargetCompanion Function({ + required String id, + Value clientReferenceId, + Value totalNo, + Value targetNo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value beneficiaryType, + Value additionalFields, + Value rowid, +}); +typedef $$TargetTableUpdateCompanionBuilder = TargetCompanion Function({ + Value id, + Value clientReferenceId, + Value totalNo, + Value targetNo, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value beneficiaryType, + Value additionalFields, + Value rowid, +}); + +class $$TargetTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $TargetTable, + TargetData, + $$TargetTableFilterComposer, + $$TargetTableOrderingComposer, + $$TargetTableProcessedTableManager, + $$TargetTableInsertCompanionBuilder, + $$TargetTableUpdateCompanionBuilder> { + $$TargetTableTableManager(_$LocalSqlDataStore db, $TargetTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$TargetTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$TargetTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$TargetTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value totalNo = const Value.absent(), + Value targetNo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TargetCompanion( + id: id, + clientReferenceId: clientReferenceId, + totalNo: totalNo, + targetNo: targetNo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + beneficiaryType: beneficiaryType, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String id, + Value clientReferenceId = const Value.absent(), + Value totalNo = const Value.absent(), + Value targetNo = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value beneficiaryType = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TargetCompanion.insert( + id: id, + clientReferenceId: clientReferenceId, + totalNo: totalNo, + targetNo: targetNo, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + beneficiaryType: beneficiaryType, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$TargetTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $TargetTable, + TargetData, + $$TargetTableFilterComposer, + $$TargetTableOrderingComposer, + $$TargetTableProcessedTableManager, + $$TargetTableInsertCompanionBuilder, + $$TargetTableUpdateCompanionBuilder> { + $$TargetTableProcessedTableManager(super.$state); +} + +class $$TargetTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $TargetTable> { + $$TargetTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get totalNo => $state.composableBuilder( + column: $state.table.totalNo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get targetNo => $state.composableBuilder( + column: $state.table.targetNo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters + get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$TargetTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $TargetTable> { + $$TargetTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get totalNo => $state.composableBuilder( + column: $state.table.totalNo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get targetNo => $state.composableBuilder( + column: $state.table.targetNo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryType => $state.composableBuilder( + column: $state.table.beneficiaryType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ServiceTableInsertCompanionBuilder = ServiceCompanion Function({ + Value id, + required String clientId, + Value serviceDefId, + Value isActive, + Value accountId, + Value additionalDetails, + Value createdAt, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ServiceTableUpdateCompanionBuilder = ServiceCompanion Function({ + Value id, + Value clientId, + Value serviceDefId, + Value isActive, + Value accountId, + Value additionalDetails, + Value createdAt, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ServiceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ServiceTable, + ServiceData, + $$ServiceTableFilterComposer, + $$ServiceTableOrderingComposer, + $$ServiceTableProcessedTableManager, + $$ServiceTableInsertCompanionBuilder, + $$ServiceTableUpdateCompanionBuilder> { + $$ServiceTableTableManager(_$LocalSqlDataStore db, $ServiceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ServiceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ServiceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$ServiceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientId = const Value.absent(), + Value serviceDefId = const Value.absent(), + Value isActive = const Value.absent(), + Value accountId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value createdAt = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceCompanion( + id: id, + clientId: clientId, + serviceDefId: serviceDefId, + isActive: isActive, + accountId: accountId, + additionalDetails: additionalDetails, + createdAt: createdAt, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String clientId, + Value serviceDefId = const Value.absent(), + Value isActive = const Value.absent(), + Value accountId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value createdAt = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceCompanion.insert( + id: id, + clientId: clientId, + serviceDefId: serviceDefId, + isActive: isActive, + accountId: accountId, + additionalDetails: additionalDetails, + createdAt: createdAt, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ServiceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ServiceTable, + ServiceData, + $$ServiceTableFilterComposer, + $$ServiceTableOrderingComposer, + $$ServiceTableProcessedTableManager, + $$ServiceTableInsertCompanionBuilder, + $$ServiceTableUpdateCompanionBuilder> { + $$ServiceTableProcessedTableManager(super.$state); +} + +class $$ServiceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ServiceTable> { + $$ServiceTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientId => $state.composableBuilder( + column: $state.table.clientId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceDefId => $state.composableBuilder( + column: $state.table.serviceDefId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdAt => $state.composableBuilder( + column: $state.table.createdAt, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ServiceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ServiceTable> { + $$ServiceTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientId => $state.composableBuilder( + column: $state.table.clientId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceDefId => $state.composableBuilder( + column: $state.table.serviceDefId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdAt => $state.composableBuilder( + column: $state.table.createdAt, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ServiceAttributesTableInsertCompanionBuilder + = ServiceAttributesCompanion Function({ + Value attributeCode, + Value value, + Value dataType, + Value referenceId, + Value additionalDetails, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ServiceAttributesTableUpdateCompanionBuilder + = ServiceAttributesCompanion Function({ + Value attributeCode, + Value value, + Value dataType, + Value referenceId, + Value additionalDetails, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ServiceAttributesTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ServiceAttributesTable, + ServiceAttribute, + $$ServiceAttributesTableFilterComposer, + $$ServiceAttributesTableOrderingComposer, + $$ServiceAttributesTableProcessedTableManager, + $$ServiceAttributesTableInsertCompanionBuilder, + $$ServiceAttributesTableUpdateCompanionBuilder> { + $$ServiceAttributesTableTableManager( + _$LocalSqlDataStore db, $ServiceAttributesTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ServiceAttributesTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$ServiceAttributesTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ServiceAttributesTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value attributeCode = const Value.absent(), + Value value = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceAttributesCompanion( + attributeCode: attributeCode, + value: value, + dataType: dataType, + referenceId: referenceId, + additionalDetails: additionalDetails, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value attributeCode = const Value.absent(), + Value value = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceAttributesCompanion.insert( + attributeCode: attributeCode, + value: value, + dataType: dataType, + referenceId: referenceId, + additionalDetails: additionalDetails, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ServiceAttributesTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ServiceAttributesTable, + ServiceAttribute, + $$ServiceAttributesTableFilterComposer, + $$ServiceAttributesTableOrderingComposer, + $$ServiceAttributesTableProcessedTableManager, + $$ServiceAttributesTableInsertCompanionBuilder, + $$ServiceAttributesTableUpdateCompanionBuilder> { + $$ServiceAttributesTableProcessedTableManager(super.$state); +} + +class $$ServiceAttributesTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ServiceAttributesTable> { + $$ServiceAttributesTableFilterComposer(super.$state); + ColumnFilters get attributeCode => $state.composableBuilder( + column: $state.table.attributeCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get value => $state.composableBuilder( + column: $state.table.value, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ServiceAttributesTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ServiceAttributesTable> { + $$ServiceAttributesTableOrderingComposer(super.$state); + ColumnOrderings get attributeCode => $state.composableBuilder( + column: $state.table.attributeCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get value => $state.composableBuilder( + column: $state.table.value, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ServiceDefinitionTableInsertCompanionBuilder + = ServiceDefinitionCompanion Function({ + Value id, + Value tenantId, + Value code, + Value isActive, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ServiceDefinitionTableUpdateCompanionBuilder + = ServiceDefinitionCompanion Function({ + Value id, + Value tenantId, + Value code, + Value isActive, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ServiceDefinitionTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ServiceDefinitionTable, + ServiceDefinitionData, + $$ServiceDefinitionTableFilterComposer, + $$ServiceDefinitionTableOrderingComposer, + $$ServiceDefinitionTableProcessedTableManager, + $$ServiceDefinitionTableInsertCompanionBuilder, + $$ServiceDefinitionTableUpdateCompanionBuilder> { + $$ServiceDefinitionTableTableManager( + _$LocalSqlDataStore db, $ServiceDefinitionTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ServiceDefinitionTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$ServiceDefinitionTableOrderingComposer( + ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ServiceDefinitionTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value isActive = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceDefinitionCompanion( + id: id, + tenantId: tenantId, + code: code, + isActive: isActive, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value isActive = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ServiceDefinitionCompanion.insert( + id: id, + tenantId: tenantId, + code: code, + isActive: isActive, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ServiceDefinitionTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $ServiceDefinitionTable, + ServiceDefinitionData, + $$ServiceDefinitionTableFilterComposer, + $$ServiceDefinitionTableOrderingComposer, + $$ServiceDefinitionTableProcessedTableManager, + $$ServiceDefinitionTableInsertCompanionBuilder, + $$ServiceDefinitionTableUpdateCompanionBuilder> { + $$ServiceDefinitionTableProcessedTableManager(super.$state); +} + +class $$ServiceDefinitionTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ServiceDefinitionTable> { + $$ServiceDefinitionTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ServiceDefinitionTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ServiceDefinitionTable> { + $$ServiceDefinitionTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$LocalityTableInsertCompanionBuilder = LocalityCompanion Function({ + required String code, + Value name, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$LocalityTableUpdateCompanionBuilder = LocalityCompanion Function({ + Value code, + Value name, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$LocalityTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $LocalityTable, + LocalityData, + $$LocalityTableFilterComposer, + $$LocalityTableOrderingComposer, + $$LocalityTableProcessedTableManager, + $$LocalityTableInsertCompanionBuilder, + $$LocalityTableUpdateCompanionBuilder> { + $$LocalityTableTableManager(_$LocalSqlDataStore db, $LocalityTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$LocalityTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$LocalityTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$LocalityTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value code = const Value.absent(), + Value name = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + LocalityCompanion( + code: code, + name: name, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String code, + Value name = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + LocalityCompanion.insert( + code: code, + name: name, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$LocalityTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $LocalityTable, + LocalityData, + $$LocalityTableFilterComposer, + $$LocalityTableOrderingComposer, + $$LocalityTableProcessedTableManager, + $$LocalityTableInsertCompanionBuilder, + $$LocalityTableUpdateCompanionBuilder> { + $$LocalityTableProcessedTableManager(super.$state); +} + +class $$LocalityTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $LocalityTable> { + $$LocalityTableFilterComposer(super.$state); + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$LocalityTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $LocalityTable> { + $$LocalityTableOrderingComposer(super.$state); + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$StaffTableInsertCompanionBuilder = StaffCompanion Function({ + Value id, + required String tenantId, + required String registerId, + required String userId, + Value enrollmentDate, + Value denrollmentDate, + Value rowid, +}); +typedef $$StaffTableUpdateCompanionBuilder = StaffCompanion Function({ + Value id, + Value tenantId, + Value registerId, + Value userId, + Value enrollmentDate, + Value denrollmentDate, + Value rowid, +}); + +class $$StaffTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $StaffTable, + StaffData, + $$StaffTableFilterComposer, + $$StaffTableOrderingComposer, + $$StaffTableProcessedTableManager, + $$StaffTableInsertCompanionBuilder, + $$StaffTableUpdateCompanionBuilder> { + $$StaffTableTableManager(_$LocalSqlDataStore db, $StaffTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$StaffTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$StaffTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$StaffTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value registerId = const Value.absent(), + Value userId = const Value.absent(), + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StaffCompanion( + id: id, + tenantId: tenantId, + registerId: registerId, + userId: userId, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String tenantId, + required String registerId, + required String userId, + Value enrollmentDate = const Value.absent(), + Value denrollmentDate = const Value.absent(), + Value rowid = const Value.absent(), + }) => + StaffCompanion.insert( + id: id, + tenantId: tenantId, + registerId: registerId, + userId: userId, + enrollmentDate: enrollmentDate, + denrollmentDate: denrollmentDate, + rowid: rowid, + ), + )); +} + +class $$StaffTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $StaffTable, + StaffData, + $$StaffTableFilterComposer, + $$StaffTableOrderingComposer, + $$StaffTableProcessedTableManager, + $$StaffTableInsertCompanionBuilder, + $$StaffTableUpdateCompanionBuilder> { + $$StaffTableProcessedTableManager(super.$state); +} + +class $$StaffTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $StaffTable> { + $$StaffTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$StaffTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $StaffTable> { + $$StaffTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get registerId => $state.composableBuilder( + column: $state.table.registerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userId => $state.composableBuilder( + column: $state.table.userId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get enrollmentDate => $state.composableBuilder( + column: $state.table.enrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get denrollmentDate => $state.composableBuilder( + column: $state.table.denrollmentDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$AttributesTableInsertCompanionBuilder = AttributesCompanion Function({ + Value id, + Value dataType, + Value referenceId, + Value tenantId, + Value code, + Value values, + Value isActive, + Value required, + Value regex, + Value order, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value additionalDetails, + Value rowid, +}); +typedef $$AttributesTableUpdateCompanionBuilder = AttributesCompanion Function({ + Value id, + Value dataType, + Value referenceId, + Value tenantId, + Value code, + Value values, + Value isActive, + Value required, + Value regex, + Value order, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value additionalDetails, + Value rowid, +}); + +class $$AttributesTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $AttributesTable, + Attribute, + $$AttributesTableFilterComposer, + $$AttributesTableOrderingComposer, + $$AttributesTableProcessedTableManager, + $$AttributesTableInsertCompanionBuilder, + $$AttributesTableUpdateCompanionBuilder> { + $$AttributesTableTableManager(_$LocalSqlDataStore db, $AttributesTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$AttributesTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$AttributesTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$AttributesTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value values = const Value.absent(), + Value isActive = const Value.absent(), + Value required = const Value.absent(), + Value regex = const Value.absent(), + Value order = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttributesCompanion( + id: id, + dataType: dataType, + referenceId: referenceId, + tenantId: tenantId, + code: code, + values: values, + isActive: isActive, + required: required, + regex: regex, + order: order, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + additionalDetails: additionalDetails, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value dataType = const Value.absent(), + Value referenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value code = const Value.absent(), + Value values = const Value.absent(), + Value isActive = const Value.absent(), + Value required = const Value.absent(), + Value regex = const Value.absent(), + Value order = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value additionalDetails = const Value.absent(), + Value rowid = const Value.absent(), + }) => + AttributesCompanion.insert( + id: id, + dataType: dataType, + referenceId: referenceId, + tenantId: tenantId, + code: code, + values: values, + isActive: isActive, + required: required, + regex: regex, + order: order, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + additionalDetails: additionalDetails, + rowid: rowid, + ), + )); +} + +class $$AttributesTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $AttributesTable, + Attribute, + $$AttributesTableFilterComposer, + $$AttributesTableOrderingComposer, + $$AttributesTableProcessedTableManager, + $$AttributesTableInsertCompanionBuilder, + $$AttributesTableUpdateCompanionBuilder> { + $$AttributesTableProcessedTableManager(super.$state); +} + +class $$AttributesTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $AttributesTable> { + $$AttributesTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get values => $state.composableBuilder( + column: $state.table.values, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get required => $state.composableBuilder( + column: $state.table.required, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get regex => $state.composableBuilder( + column: $state.table.regex, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get order => $state.composableBuilder( + column: $state.table.order, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$AttributesTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $AttributesTable> { + $$AttributesTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get dataType => $state.composableBuilder( + column: $state.table.dataType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referenceId => $state.composableBuilder( + column: $state.table.referenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get values => $state.composableBuilder( + column: $state.table.values, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isActive => $state.composableBuilder( + column: $state.table.isActive, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get required => $state.composableBuilder( + column: $state.table.required, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get regex => $state.composableBuilder( + column: $state.table.regex, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get order => $state.composableBuilder( + column: $state.table.order, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalDetails => $state.composableBuilder( + column: $state.table.additionalDetails, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$PgrServiceTableInsertCompanionBuilder = PgrServiceCompanion Function({ + required bool active, + required String clientReferenceId, + Value id, + required String tenantId, + required String serviceCode, + required String description, + Value serviceRequestId, + Value accountId, + required PgrServiceApplicationStatus applicationStatus, + Value source, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required bool isDeleted, + required int rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$PgrServiceTableUpdateCompanionBuilder = PgrServiceCompanion Function({ + Value active, + Value clientReferenceId, + Value id, + Value tenantId, + Value serviceCode, + Value description, + Value serviceRequestId, + Value accountId, + Value applicationStatus, + Value source, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$PgrServiceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $PgrServiceTable, + PgrServiceData, + $$PgrServiceTableFilterComposer, + $$PgrServiceTableOrderingComposer, + $$PgrServiceTableProcessedTableManager, + $$PgrServiceTableInsertCompanionBuilder, + $$PgrServiceTableUpdateCompanionBuilder> { + $$PgrServiceTableTableManager(_$LocalSqlDataStore db, $PgrServiceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$PgrServiceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$PgrServiceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$PgrServiceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value active = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value serviceCode = const Value.absent(), + Value description = const Value.absent(), + Value serviceRequestId = const Value.absent(), + Value accountId = const Value.absent(), + Value applicationStatus = + const Value.absent(), + Value source = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + PgrServiceCompanion( + active: active, + clientReferenceId: clientReferenceId, + id: id, + tenantId: tenantId, + serviceCode: serviceCode, + description: description, + serviceRequestId: serviceRequestId, + accountId: accountId, + applicationStatus: applicationStatus, + source: source, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required bool active, + required String clientReferenceId, + Value id = const Value.absent(), + required String tenantId, + required String serviceCode, + required String description, + Value serviceRequestId = const Value.absent(), + Value accountId = const Value.absent(), + required PgrServiceApplicationStatus applicationStatus, + Value source = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required bool isDeleted, + required int rowVersion, + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + PgrServiceCompanion.insert( + active: active, + clientReferenceId: clientReferenceId, + id: id, + tenantId: tenantId, + serviceCode: serviceCode, + description: description, + serviceRequestId: serviceRequestId, + accountId: accountId, + applicationStatus: applicationStatus, + source: source, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$PgrServiceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $PgrServiceTable, + PgrServiceData, + $$PgrServiceTableFilterComposer, + $$PgrServiceTableOrderingComposer, + $$PgrServiceTableProcessedTableManager, + $$PgrServiceTableInsertCompanionBuilder, + $$PgrServiceTableUpdateCompanionBuilder> { + $$PgrServiceTableProcessedTableManager(super.$state); +} + +class $$PgrServiceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $PgrServiceTable> { + $$PgrServiceTableFilterComposer(super.$state); + ColumnFilters get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get serviceRequestId => $state.composableBuilder( + column: $state.table.serviceRequestId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnWithTypeConverterFilters + get applicationStatus => $state.composableBuilder( + column: $state.table.applicationStatus, + builder: (column, joinBuilders) => ColumnWithTypeConverterFilters( + column, + joinBuilders: joinBuilders)); + + ColumnFilters get source => $state.composableBuilder( + column: $state.table.source, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$PgrServiceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $PgrServiceTable> { + $$PgrServiceTableOrderingComposer(super.$state); + ColumnOrderings get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceCode => $state.composableBuilder( + column: $state.table.serviceCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get description => $state.composableBuilder( + column: $state.table.description, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get serviceRequestId => $state.composableBuilder( + column: $state.table.serviceRequestId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountId => $state.composableBuilder( + column: $state.table.accountId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get applicationStatus => $state.composableBuilder( + column: $state.table.applicationStatus, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get source => $state.composableBuilder( + column: $state.table.source, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$PgrComplainantTableInsertCompanionBuilder = PgrComplainantCompanion + Function({ + Value id, + required String clientReferenceId, + required String complaintClientReferenceId, + Value userName, + Value name, + Value type, + Value mobileNumber, + Value emailId, + required String tenantId, + Value uuid, + required bool active, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required bool isDeleted, + required int rowVersion, + Value rowid, +}); +typedef $$PgrComplainantTableUpdateCompanionBuilder = PgrComplainantCompanion + Function({ + Value id, + Value clientReferenceId, + Value complaintClientReferenceId, + Value userName, + Value name, + Value type, + Value mobileNumber, + Value emailId, + Value tenantId, + Value uuid, + Value active, + Value auditCreatedBy, + Value auditCreatedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value rowid, +}); + +class $$PgrComplainantTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $PgrComplainantTable, + PgrComplainantData, + $$PgrComplainantTableFilterComposer, + $$PgrComplainantTableOrderingComposer, + $$PgrComplainantTableProcessedTableManager, + $$PgrComplainantTableInsertCompanionBuilder, + $$PgrComplainantTableUpdateCompanionBuilder> { + $$PgrComplainantTableTableManager( + _$LocalSqlDataStore db, $PgrComplainantTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$PgrComplainantTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$PgrComplainantTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$PgrComplainantTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value complaintClientReferenceId = const Value.absent(), + Value userName = const Value.absent(), + Value name = const Value.absent(), + Value type = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + Value tenantId = const Value.absent(), + Value uuid = const Value.absent(), + Value active = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value rowid = const Value.absent(), + }) => + PgrComplainantCompanion( + id: id, + clientReferenceId: clientReferenceId, + complaintClientReferenceId: complaintClientReferenceId, + userName: userName, + name: name, + type: type, + mobileNumber: mobileNumber, + emailId: emailId, + tenantId: tenantId, + uuid: uuid, + active: active, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + required String clientReferenceId, + required String complaintClientReferenceId, + Value userName = const Value.absent(), + Value name = const Value.absent(), + Value type = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + required String tenantId, + Value uuid = const Value.absent(), + required bool active, + Value auditCreatedBy = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required bool isDeleted, + required int rowVersion, + Value rowid = const Value.absent(), + }) => + PgrComplainantCompanion.insert( + id: id, + clientReferenceId: clientReferenceId, + complaintClientReferenceId: complaintClientReferenceId, + userName: userName, + name: name, + type: type, + mobileNumber: mobileNumber, + emailId: emailId, + tenantId: tenantId, + uuid: uuid, + active: active, + auditCreatedBy: auditCreatedBy, + auditCreatedTime: auditCreatedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + rowid: rowid, + ), + )); +} + +class $$PgrComplainantTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $PgrComplainantTable, + PgrComplainantData, + $$PgrComplainantTableFilterComposer, + $$PgrComplainantTableOrderingComposer, + $$PgrComplainantTableProcessedTableManager, + $$PgrComplainantTableInsertCompanionBuilder, + $$PgrComplainantTableUpdateCompanionBuilder> { + $$PgrComplainantTableProcessedTableManager(super.$state); +} + +class $$PgrComplainantTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $PgrComplainantTable> { + $$PgrComplainantTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get complaintClientReferenceId => + $state.composableBuilder( + column: $state.table.complaintClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$PgrComplainantTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $PgrComplainantTable> { + $$PgrComplainantTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get complaintClientReferenceId => + $state.composableBuilder( + column: $state.table.complaintClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$UserTableInsertCompanionBuilder = UserCompanion Function({ + Value id, + Value userName, + Value salutation, + Value name, + Value gender, + Value mobileNumber, + Value emailId, + Value altContactNumber, + Value pan, + Value aadhaarNumber, + Value permanentAddress, + Value permanentCity, + Value permanentPinCode, + Value correspondenceAddress, + Value correspondenceCity, + Value correspondencePinCode, + Value alternatemobilenumber, + Value active, + Value locale, + Value type, + Value accountLocked, + Value accountLockedDate, + Value fatherOrHusbandName, + Value relationship, + Value signature, + Value bloodGroup, + Value photo, + Value identificationMark, + Value createdBy, + Value lastModifiedBy, + Value tenantId, + Value uuid, + Value createdDate, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$UserTableUpdateCompanionBuilder = UserCompanion Function({ + Value id, + Value userName, + Value salutation, + Value name, + Value gender, + Value mobileNumber, + Value emailId, + Value altContactNumber, + Value pan, + Value aadhaarNumber, + Value permanentAddress, + Value permanentCity, + Value permanentPinCode, + Value correspondenceAddress, + Value correspondenceCity, + Value correspondencePinCode, + Value alternatemobilenumber, + Value active, + Value locale, + Value type, + Value accountLocked, + Value accountLockedDate, + Value fatherOrHusbandName, + Value relationship, + Value signature, + Value bloodGroup, + Value photo, + Value identificationMark, + Value createdBy, + Value lastModifiedBy, + Value tenantId, + Value uuid, + Value createdDate, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$UserTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $UserTable, + UserData, + $$UserTableFilterComposer, + $$UserTableOrderingComposer, + $$UserTableProcessedTableManager, + $$UserTableInsertCompanionBuilder, + $$UserTableUpdateCompanionBuilder> { + $$UserTableTableManager(_$LocalSqlDataStore db, $UserTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$UserTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$UserTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$UserTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value userName = const Value.absent(), + Value salutation = const Value.absent(), + Value name = const Value.absent(), + Value gender = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value pan = const Value.absent(), + Value aadhaarNumber = const Value.absent(), + Value permanentAddress = const Value.absent(), + Value permanentCity = const Value.absent(), + Value permanentPinCode = const Value.absent(), + Value correspondenceAddress = const Value.absent(), + Value correspondenceCity = const Value.absent(), + Value correspondencePinCode = const Value.absent(), + Value alternatemobilenumber = const Value.absent(), + Value active = const Value.absent(), + Value locale = const Value.absent(), + Value type = const Value.absent(), + Value accountLocked = const Value.absent(), + Value accountLockedDate = const Value.absent(), + Value fatherOrHusbandName = const Value.absent(), + Value relationship = const Value.absent(), + Value signature = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value photo = const Value.absent(), + Value identificationMark = const Value.absent(), + Value createdBy = const Value.absent(), + Value lastModifiedBy = const Value.absent(), + Value tenantId = const Value.absent(), + Value uuid = const Value.absent(), + Value createdDate = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + UserCompanion( + id: id, + userName: userName, + salutation: salutation, + name: name, + gender: gender, + mobileNumber: mobileNumber, + emailId: emailId, + altContactNumber: altContactNumber, + pan: pan, + aadhaarNumber: aadhaarNumber, + permanentAddress: permanentAddress, + permanentCity: permanentCity, + permanentPinCode: permanentPinCode, + correspondenceAddress: correspondenceAddress, + correspondenceCity: correspondenceCity, + correspondencePinCode: correspondencePinCode, + alternatemobilenumber: alternatemobilenumber, + active: active, + locale: locale, + type: type, + accountLocked: accountLocked, + accountLockedDate: accountLockedDate, + fatherOrHusbandName: fatherOrHusbandName, + relationship: relationship, + signature: signature, + bloodGroup: bloodGroup, + photo: photo, + identificationMark: identificationMark, + createdBy: createdBy, + lastModifiedBy: lastModifiedBy, + tenantId: tenantId, + uuid: uuid, + createdDate: createdDate, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value userName = const Value.absent(), + Value salutation = const Value.absent(), + Value name = const Value.absent(), + Value gender = const Value.absent(), + Value mobileNumber = const Value.absent(), + Value emailId = const Value.absent(), + Value altContactNumber = const Value.absent(), + Value pan = const Value.absent(), + Value aadhaarNumber = const Value.absent(), + Value permanentAddress = const Value.absent(), + Value permanentCity = const Value.absent(), + Value permanentPinCode = const Value.absent(), + Value correspondenceAddress = const Value.absent(), + Value correspondenceCity = const Value.absent(), + Value correspondencePinCode = const Value.absent(), + Value alternatemobilenumber = const Value.absent(), + Value active = const Value.absent(), + Value locale = const Value.absent(), + Value type = const Value.absent(), + Value accountLocked = const Value.absent(), + Value accountLockedDate = const Value.absent(), + Value fatherOrHusbandName = const Value.absent(), + Value relationship = const Value.absent(), + Value signature = const Value.absent(), + Value bloodGroup = const Value.absent(), + Value photo = const Value.absent(), + Value identificationMark = const Value.absent(), + Value createdBy = const Value.absent(), + Value lastModifiedBy = const Value.absent(), + Value tenantId = const Value.absent(), + Value uuid = const Value.absent(), + Value createdDate = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + UserCompanion.insert( + id: id, + userName: userName, + salutation: salutation, + name: name, + gender: gender, + mobileNumber: mobileNumber, + emailId: emailId, + altContactNumber: altContactNumber, + pan: pan, + aadhaarNumber: aadhaarNumber, + permanentAddress: permanentAddress, + permanentCity: permanentCity, + permanentPinCode: permanentPinCode, + correspondenceAddress: correspondenceAddress, + correspondenceCity: correspondenceCity, + correspondencePinCode: correspondencePinCode, + alternatemobilenumber: alternatemobilenumber, + active: active, + locale: locale, + type: type, + accountLocked: accountLocked, + accountLockedDate: accountLockedDate, + fatherOrHusbandName: fatherOrHusbandName, + relationship: relationship, + signature: signature, + bloodGroup: bloodGroup, + photo: photo, + identificationMark: identificationMark, + createdBy: createdBy, + lastModifiedBy: lastModifiedBy, + tenantId: tenantId, + uuid: uuid, + createdDate: createdDate, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$UserTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $UserTable, + UserData, + $$UserTableFilterComposer, + $$UserTableOrderingComposer, + $$UserTableProcessedTableManager, + $$UserTableInsertCompanionBuilder, + $$UserTableUpdateCompanionBuilder> { + $$UserTableProcessedTableManager(super.$state); +} + +class $$UserTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $UserTable> { + $$UserTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get salutation => $state.composableBuilder( + column: $state.table.salutation, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get gender => $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get pan => $state.composableBuilder( + column: $state.table.pan, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get aadhaarNumber => $state.composableBuilder( + column: $state.table.aadhaarNumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get permanentAddress => $state.composableBuilder( + column: $state.table.permanentAddress, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get permanentCity => $state.composableBuilder( + column: $state.table.permanentCity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get permanentPinCode => $state.composableBuilder( + column: $state.table.permanentPinCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get correspondenceAddress => $state.composableBuilder( + column: $state.table.correspondenceAddress, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get correspondenceCity => $state.composableBuilder( + column: $state.table.correspondenceCity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get correspondencePinCode => $state.composableBuilder( + column: $state.table.correspondencePinCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get alternatemobilenumber => $state.composableBuilder( + column: $state.table.alternatemobilenumber, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountLocked => $state.composableBuilder( + column: $state.table.accountLocked, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get accountLockedDate => $state.composableBuilder( + column: $state.table.accountLockedDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get fatherOrHusbandName => $state.composableBuilder( + column: $state.table.fatherOrHusbandName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get relationship => $state.composableBuilder( + column: $state.table.relationship, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get signature => $state.composableBuilder( + column: $state.table.signature, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get bloodGroup => $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get identificationMark => $state.composableBuilder( + column: $state.table.identificationMark, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get lastModifiedBy => $state.composableBuilder( + column: $state.table.lastModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$UserTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $UserTable> { + $$UserTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get userName => $state.composableBuilder( + column: $state.table.userName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get salutation => $state.composableBuilder( + column: $state.table.salutation, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get gender => $state.composableBuilder( + column: $state.table.gender, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get mobileNumber => $state.composableBuilder( + column: $state.table.mobileNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get emailId => $state.composableBuilder( + column: $state.table.emailId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get altContactNumber => $state.composableBuilder( + column: $state.table.altContactNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get pan => $state.composableBuilder( + column: $state.table.pan, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get aadhaarNumber => $state.composableBuilder( + column: $state.table.aadhaarNumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get permanentAddress => $state.composableBuilder( + column: $state.table.permanentAddress, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get permanentCity => $state.composableBuilder( + column: $state.table.permanentCity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get permanentPinCode => $state.composableBuilder( + column: $state.table.permanentPinCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get correspondenceAddress => $state.composableBuilder( + column: $state.table.correspondenceAddress, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get correspondenceCity => $state.composableBuilder( + column: $state.table.correspondenceCity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get correspondencePinCode => $state.composableBuilder( + column: $state.table.correspondencePinCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get alternatemobilenumber => $state.composableBuilder( + column: $state.table.alternatemobilenumber, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get active => $state.composableBuilder( + column: $state.table.active, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get type => $state.composableBuilder( + column: $state.table.type, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountLocked => $state.composableBuilder( + column: $state.table.accountLocked, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get accountLockedDate => $state.composableBuilder( + column: $state.table.accountLockedDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get fatherOrHusbandName => $state.composableBuilder( + column: $state.table.fatherOrHusbandName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get relationship => $state.composableBuilder( + column: $state.table.relationship, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get signature => $state.composableBuilder( + column: $state.table.signature, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get bloodGroup => $state.composableBuilder( + column: $state.table.bloodGroup, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get photo => $state.composableBuilder( + column: $state.table.photo, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get identificationMark => $state.composableBuilder( + column: $state.table.identificationMark, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get lastModifiedBy => $state.composableBuilder( + column: $state.table.lastModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get uuid => $state.composableBuilder( + column: $state.table.uuid, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$DownsyncTableInsertCompanionBuilder = DownsyncCompanion Function({ + Value locality, + Value projectId, + Value offset, + Value limit, + Value lastSyncedTime, + Value totalCount, + Value boundaryName, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$DownsyncTableUpdateCompanionBuilder = DownsyncCompanion Function({ + Value locality, + Value projectId, + Value offset, + Value limit, + Value lastSyncedTime, + Value totalCount, + Value boundaryName, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$DownsyncTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $DownsyncTable, + DownsyncData, + $$DownsyncTableFilterComposer, + $$DownsyncTableOrderingComposer, + $$DownsyncTableProcessedTableManager, + $$DownsyncTableInsertCompanionBuilder, + $$DownsyncTableUpdateCompanionBuilder> { + $$DownsyncTableTableManager(_$LocalSqlDataStore db, $DownsyncTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$DownsyncTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$DownsyncTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$DownsyncTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value locality = const Value.absent(), + Value projectId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value boundaryName = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCompanion( + locality: locality, + projectId: projectId, + offset: offset, + limit: limit, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + boundaryName: boundaryName, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value locality = const Value.absent(), + Value projectId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value boundaryName = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCompanion.insert( + locality: locality, + projectId: projectId, + offset: offset, + limit: limit, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + boundaryName: boundaryName, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$DownsyncTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $DownsyncTable, + DownsyncData, + $$DownsyncTableFilterComposer, + $$DownsyncTableOrderingComposer, + $$DownsyncTableProcessedTableManager, + $$DownsyncTableInsertCompanionBuilder, + $$DownsyncTableUpdateCompanionBuilder> { + $$DownsyncTableProcessedTableManager(super.$state); +} + +class $$DownsyncTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $DownsyncTable> { + $$DownsyncTableFilterComposer(super.$state); + ColumnFilters get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get boundaryName => $state.composableBuilder( + column: $state.table.boundaryName, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$DownsyncTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $DownsyncTable> { + $$DownsyncTableOrderingComposer(super.$state); + ColumnOrderings get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get boundaryName => $state.composableBuilder( + column: $state.table.boundaryName, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$DownsyncCriteriaTableInsertCompanionBuilder + = DownsyncCriteriaCompanion Function({ + Value locality, + Value tenantId, + Value offset, + Value limit, + Value projectId, + Value lastSyncedTime, + Value totalCount, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$DownsyncCriteriaTableUpdateCompanionBuilder + = DownsyncCriteriaCompanion Function({ + Value locality, + Value tenantId, + Value offset, + Value limit, + Value projectId, + Value lastSyncedTime, + Value totalCount, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$DownsyncCriteriaTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $DownsyncCriteriaTable, + DownsyncCriteriaData, + $$DownsyncCriteriaTableFilterComposer, + $$DownsyncCriteriaTableOrderingComposer, + $$DownsyncCriteriaTableProcessedTableManager, + $$DownsyncCriteriaTableInsertCompanionBuilder, + $$DownsyncCriteriaTableUpdateCompanionBuilder> { + $$DownsyncCriteriaTableTableManager( + _$LocalSqlDataStore db, $DownsyncCriteriaTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$DownsyncCriteriaTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$DownsyncCriteriaTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$DownsyncCriteriaTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value locality = const Value.absent(), + Value tenantId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value projectId = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCriteriaCompanion( + locality: locality, + tenantId: tenantId, + offset: offset, + limit: limit, + projectId: projectId, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value locality = const Value.absent(), + Value tenantId = const Value.absent(), + Value offset = const Value.absent(), + Value limit = const Value.absent(), + Value projectId = const Value.absent(), + Value lastSyncedTime = const Value.absent(), + Value totalCount = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + DownsyncCriteriaCompanion.insert( + locality: locality, + tenantId: tenantId, + offset: offset, + limit: limit, + projectId: projectId, + lastSyncedTime: lastSyncedTime, + totalCount: totalCount, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$DownsyncCriteriaTableProcessedTableManager + extends ProcessedTableManager< + _$LocalSqlDataStore, + $DownsyncCriteriaTable, + DownsyncCriteriaData, + $$DownsyncCriteriaTableFilterComposer, + $$DownsyncCriteriaTableOrderingComposer, + $$DownsyncCriteriaTableProcessedTableManager, + $$DownsyncCriteriaTableInsertCompanionBuilder, + $$DownsyncCriteriaTableUpdateCompanionBuilder> { + $$DownsyncCriteriaTableProcessedTableManager(super.$state); +} + +class $$DownsyncCriteriaTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $DownsyncCriteriaTable> { + $$DownsyncCriteriaTableFilterComposer(super.$state); + ColumnFilters get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$DownsyncCriteriaTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $DownsyncCriteriaTable> { + $$DownsyncCriteriaTableOrderingComposer(super.$state); + ColumnOrderings get locality => $state.composableBuilder( + column: $state.table.locality, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get offset => $state.composableBuilder( + column: $state.table.offset, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get limit => $state.composableBuilder( + column: $state.table.limit, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get lastSyncedTime => $state.composableBuilder( + column: $state.table.lastSyncedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get totalCount => $state.composableBuilder( + column: $state.table.totalCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$HFReferralTableInsertCompanionBuilder = HFReferralCompanion Function({ + Value id, + Value tenantId, + Value name, + Value projectId, + Value projectFacilityId, + Value symptomSurveyId, + Value beneficiaryId, + Value referralCode, + Value nationalLevelId, + Value symptom, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$HFReferralTableUpdateCompanionBuilder = HFReferralCompanion Function({ + Value id, + Value tenantId, + Value name, + Value projectId, + Value projectFacilityId, + Value symptomSurveyId, + Value beneficiaryId, + Value referralCode, + Value nationalLevelId, + Value symptom, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$HFReferralTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $HFReferralTable, + HFReferralData, + $$HFReferralTableFilterComposer, + $$HFReferralTableOrderingComposer, + $$HFReferralTableProcessedTableManager, + $$HFReferralTableInsertCompanionBuilder, + $$HFReferralTableUpdateCompanionBuilder> { + $$HFReferralTableTableManager(_$LocalSqlDataStore db, $HFReferralTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$HFReferralTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$HFReferralTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$HFReferralTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value projectId = const Value.absent(), + Value projectFacilityId = const Value.absent(), + Value symptomSurveyId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value referralCode = const Value.absent(), + Value nationalLevelId = const Value.absent(), + Value symptom = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HFReferralCompanion( + id: id, + tenantId: tenantId, + name: name, + projectId: projectId, + projectFacilityId: projectFacilityId, + symptomSurveyId: symptomSurveyId, + beneficiaryId: beneficiaryId, + referralCode: referralCode, + nationalLevelId: nationalLevelId, + symptom: symptom, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value tenantId = const Value.absent(), + Value name = const Value.absent(), + Value projectId = const Value.absent(), + Value projectFacilityId = const Value.absent(), + Value symptomSurveyId = const Value.absent(), + Value beneficiaryId = const Value.absent(), + Value referralCode = const Value.absent(), + Value nationalLevelId = const Value.absent(), + Value symptom = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HFReferralCompanion.insert( + id: id, + tenantId: tenantId, + name: name, + projectId: projectId, + projectFacilityId: projectFacilityId, + symptomSurveyId: symptomSurveyId, + beneficiaryId: beneficiaryId, + referralCode: referralCode, + nationalLevelId: nationalLevelId, + symptom: symptom, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$HFReferralTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $HFReferralTable, + HFReferralData, + $$HFReferralTableFilterComposer, + $$HFReferralTableOrderingComposer, + $$HFReferralTableProcessedTableManager, + $$HFReferralTableInsertCompanionBuilder, + $$HFReferralTableUpdateCompanionBuilder> { + $$HFReferralTableProcessedTableManager(super.$state); +} + +class $$HFReferralTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $HFReferralTable> { + $$HFReferralTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectFacilityId => $state.composableBuilder( + column: $state.table.projectFacilityId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get symptomSurveyId => $state.composableBuilder( + column: $state.table.symptomSurveyId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referralCode => $state.composableBuilder( + column: $state.table.referralCode, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nationalLevelId => $state.composableBuilder( + column: $state.table.nationalLevelId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get symptom => $state.composableBuilder( + column: $state.table.symptom, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$HFReferralTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $HFReferralTable> { + $$HFReferralTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get name => $state.composableBuilder( + column: $state.table.name, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectFacilityId => $state.composableBuilder( + column: $state.table.projectFacilityId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get symptomSurveyId => $state.composableBuilder( + column: $state.table.symptomSurveyId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get beneficiaryId => $state.composableBuilder( + column: $state.table.beneficiaryId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referralCode => $state.composableBuilder( + column: $state.table.referralCode, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nationalLevelId => $state.composableBuilder( + column: $state.table.nationalLevelId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get symptom => $state.composableBuilder( + column: $state.table.symptom, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$HouseholdTableInsertCompanionBuilder = HouseholdCompanion Function({ + Value id, + Value memberCount, + Value latitude, + Value longitude, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$HouseholdTableUpdateCompanionBuilder = HouseholdCompanion Function({ + Value id, + Value memberCount, + Value latitude, + Value longitude, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$HouseholdTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $HouseholdTable, + HouseholdData, + $$HouseholdTableFilterComposer, + $$HouseholdTableOrderingComposer, + $$HouseholdTableProcessedTableManager, + $$HouseholdTableInsertCompanionBuilder, + $$HouseholdTableUpdateCompanionBuilder> { + $$HouseholdTableTableManager(_$LocalSqlDataStore db, $HouseholdTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$HouseholdTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$HouseholdTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$HouseholdTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value memberCount = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdCompanion( + id: id, + memberCount: memberCount, + latitude: latitude, + longitude: longitude, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value memberCount = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdCompanion.insert( + id: id, + memberCount: memberCount, + latitude: latitude, + longitude: longitude, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$HouseholdTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $HouseholdTable, + HouseholdData, + $$HouseholdTableFilterComposer, + $$HouseholdTableOrderingComposer, + $$HouseholdTableProcessedTableManager, + $$HouseholdTableInsertCompanionBuilder, + $$HouseholdTableUpdateCompanionBuilder> { + $$HouseholdTableProcessedTableManager(super.$state); +} + +class $$HouseholdTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $HouseholdTable> { + $$HouseholdTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get memberCount => $state.composableBuilder( + column: $state.table.memberCount, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$HouseholdTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $HouseholdTable> { + $$HouseholdTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get memberCount => $state.composableBuilder( + column: $state.table.memberCount, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get latitude => $state.composableBuilder( + column: $state.table.latitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get longitude => $state.composableBuilder( + column: $state.table.longitude, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$HouseholdMemberTableInsertCompanionBuilder = HouseholdMemberCompanion + Function({ + Value id, + Value householdId, + Value householdClientReferenceId, + Value individualId, + Value individualClientReferenceId, + required bool isHeadOfHousehold, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$HouseholdMemberTableUpdateCompanionBuilder = HouseholdMemberCompanion + Function({ + Value id, + Value householdId, + Value householdClientReferenceId, + Value individualId, + Value individualClientReferenceId, + Value isHeadOfHousehold, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$HouseholdMemberTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $HouseholdMemberTable, + HouseholdMemberData, + $$HouseholdMemberTableFilterComposer, + $$HouseholdMemberTableOrderingComposer, + $$HouseholdMemberTableProcessedTableManager, + $$HouseholdMemberTableInsertCompanionBuilder, + $$HouseholdMemberTableUpdateCompanionBuilder> { + $$HouseholdMemberTableTableManager( + _$LocalSqlDataStore db, $HouseholdMemberTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$HouseholdMemberTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$HouseholdMemberTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$HouseholdMemberTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value householdId = const Value.absent(), + Value householdClientReferenceId = const Value.absent(), + Value individualId = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + Value isHeadOfHousehold = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdMemberCompanion( + id: id, + householdId: householdId, + householdClientReferenceId: householdClientReferenceId, + individualId: individualId, + individualClientReferenceId: individualClientReferenceId, + isHeadOfHousehold: isHeadOfHousehold, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value householdId = const Value.absent(), + Value householdClientReferenceId = const Value.absent(), + Value individualId = const Value.absent(), + Value individualClientReferenceId = const Value.absent(), + required bool isHeadOfHousehold, + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + HouseholdMemberCompanion.insert( + id: id, + householdId: householdId, + householdClientReferenceId: householdClientReferenceId, + individualId: individualId, + individualClientReferenceId: individualClientReferenceId, + isHeadOfHousehold: isHeadOfHousehold, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$HouseholdMemberTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $HouseholdMemberTable, + HouseholdMemberData, + $$HouseholdMemberTableFilterComposer, + $$HouseholdMemberTableOrderingComposer, + $$HouseholdMemberTableProcessedTableManager, + $$HouseholdMemberTableInsertCompanionBuilder, + $$HouseholdMemberTableUpdateCompanionBuilder> { + $$HouseholdMemberTableProcessedTableManager(super.$state); +} + +class $$HouseholdMemberTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $HouseholdMemberTable> { + $$HouseholdMemberTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get householdId => $state.composableBuilder( + column: $state.table.householdId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get householdClientReferenceId => + $state.composableBuilder( + column: $state.table.householdClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get individualClientReferenceId => $state + .composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isHeadOfHousehold => $state.composableBuilder( + column: $state.table.isHeadOfHousehold, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$HouseholdMemberTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $HouseholdMemberTable> { + $$HouseholdMemberTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get householdId => $state.composableBuilder( + column: $state.table.householdId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get householdClientReferenceId => + $state.composableBuilder( + column: $state.table.householdClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualId => $state.composableBuilder( + column: $state.table.individualId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get individualClientReferenceId => + $state.composableBuilder( + column: $state.table.individualClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isHeadOfHousehold => $state.composableBuilder( + column: $state.table.isHeadOfHousehold, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$TaskTableInsertCompanionBuilder = TaskCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryId, + Value projectBeneficiaryClientReferenceId, + Value createdBy, + Value status, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value plannedStartDate, + Value plannedEndDate, + Value actualStartDate, + Value actualEndDate, + Value createdDate, + Value additionalFields, + Value rowid, +}); +typedef $$TaskTableUpdateCompanionBuilder = TaskCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryId, + Value projectBeneficiaryClientReferenceId, + Value createdBy, + Value status, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value plannedStartDate, + Value plannedEndDate, + Value actualStartDate, + Value actualEndDate, + Value createdDate, + Value additionalFields, + Value rowid, +}); + +class $$TaskTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $TaskTable, + TaskData, + $$TaskTableFilterComposer, + $$TaskTableOrderingComposer, + $$TaskTableProcessedTableManager, + $$TaskTableInsertCompanionBuilder, + $$TaskTableUpdateCompanionBuilder> { + $$TaskTableTableManager(_$LocalSqlDataStore db, $TaskTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$TaskTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$TaskTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => $$TaskTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value createdBy = const Value.absent(), + Value status = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value plannedStartDate = const Value.absent(), + Value plannedEndDate = const Value.absent(), + Value actualStartDate = const Value.absent(), + Value actualEndDate = const Value.absent(), + Value createdDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskCompanion( + id: id, + projectId: projectId, + projectBeneficiaryId: projectBeneficiaryId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + createdBy: createdBy, + status: status, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + plannedStartDate: plannedStartDate, + plannedEndDate: plannedEndDate, + actualStartDate: actualStartDate, + actualEndDate: actualEndDate, + createdDate: createdDate, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value createdBy = const Value.absent(), + Value status = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value plannedStartDate = const Value.absent(), + Value plannedEndDate = const Value.absent(), + Value actualStartDate = const Value.absent(), + Value actualEndDate = const Value.absent(), + Value createdDate = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskCompanion.insert( + id: id, + projectId: projectId, + projectBeneficiaryId: projectBeneficiaryId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + createdBy: createdBy, + status: status, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + plannedStartDate: plannedStartDate, + plannedEndDate: plannedEndDate, + actualStartDate: actualStartDate, + actualEndDate: actualEndDate, + createdDate: createdDate, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$TaskTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $TaskTable, + TaskData, + $$TaskTableFilterComposer, + $$TaskTableOrderingComposer, + $$TaskTableProcessedTableManager, + $$TaskTableInsertCompanionBuilder, + $$TaskTableUpdateCompanionBuilder> { + $$TaskTableProcessedTableManager(super.$state); +} + +class $$TaskTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $TaskTable> { + $$TaskTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryId => $state.composableBuilder( + column: $state.table.projectBeneficiaryId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get plannedStartDate => $state.composableBuilder( + column: $state.table.plannedStartDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get plannedEndDate => $state.composableBuilder( + column: $state.table.plannedEndDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get actualStartDate => $state.composableBuilder( + column: $state.table.actualStartDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get actualEndDate => $state.composableBuilder( + column: $state.table.actualEndDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$TaskTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $TaskTable> { + $$TaskTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryId => $state.composableBuilder( + column: $state.table.projectBeneficiaryId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdBy => $state.composableBuilder( + column: $state.table.createdBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get status => $state.composableBuilder( + column: $state.table.status, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get plannedStartDate => $state.composableBuilder( + column: $state.table.plannedStartDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get plannedEndDate => $state.composableBuilder( + column: $state.table.plannedEndDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get actualStartDate => $state.composableBuilder( + column: $state.table.actualStartDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get actualEndDate => $state.composableBuilder( + column: $state.table.actualEndDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get createdDate => $state.composableBuilder( + column: $state.table.createdDate, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$TaskResourceTableInsertCompanionBuilder = TaskResourceCompanion + Function({ + required String clientReferenceId, + Value taskclientReferenceId, + Value taskId, + Value id, + Value productVariantId, + Value quantity, + Value isDelivered, + Value deliveryComment, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$TaskResourceTableUpdateCompanionBuilder = TaskResourceCompanion + Function({ + Value clientReferenceId, + Value taskclientReferenceId, + Value taskId, + Value id, + Value productVariantId, + Value quantity, + Value isDelivered, + Value deliveryComment, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$TaskResourceTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $TaskResourceTable, + TaskResourceData, + $$TaskResourceTableFilterComposer, + $$TaskResourceTableOrderingComposer, + $$TaskResourceTableProcessedTableManager, + $$TaskResourceTableInsertCompanionBuilder, + $$TaskResourceTableUpdateCompanionBuilder> { + $$TaskResourceTableTableManager( + _$LocalSqlDataStore db, $TaskResourceTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$TaskResourceTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$TaskResourceTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$TaskResourceTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value clientReferenceId = const Value.absent(), + Value taskclientReferenceId = const Value.absent(), + Value taskId = const Value.absent(), + Value id = const Value.absent(), + Value productVariantId = const Value.absent(), + Value quantity = const Value.absent(), + Value isDelivered = const Value.absent(), + Value deliveryComment = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskResourceCompanion( + clientReferenceId: clientReferenceId, + taskclientReferenceId: taskclientReferenceId, + taskId: taskId, + id: id, + productVariantId: productVariantId, + quantity: quantity, + isDelivered: isDelivered, + deliveryComment: deliveryComment, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String clientReferenceId, + Value taskclientReferenceId = const Value.absent(), + Value taskId = const Value.absent(), + Value id = const Value.absent(), + Value productVariantId = const Value.absent(), + Value quantity = const Value.absent(), + Value isDelivered = const Value.absent(), + Value deliveryComment = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + TaskResourceCompanion.insert( + clientReferenceId: clientReferenceId, + taskclientReferenceId: taskclientReferenceId, + taskId: taskId, + id: id, + productVariantId: productVariantId, + quantity: quantity, + isDelivered: isDelivered, + deliveryComment: deliveryComment, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$TaskResourceTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $TaskResourceTable, + TaskResourceData, + $$TaskResourceTableFilterComposer, + $$TaskResourceTableOrderingComposer, + $$TaskResourceTableProcessedTableManager, + $$TaskResourceTableInsertCompanionBuilder, + $$TaskResourceTableUpdateCompanionBuilder> { + $$TaskResourceTableProcessedTableManager(super.$state); +} + +class $$TaskResourceTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $TaskResourceTable> { + $$TaskResourceTableFilterComposer(super.$state); + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskclientReferenceId => $state.composableBuilder( + column: $state.table.taskclientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskId => $state.composableBuilder( + column: $state.table.taskId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDelivered => $state.composableBuilder( + column: $state.table.isDelivered, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get deliveryComment => $state.composableBuilder( + column: $state.table.deliveryComment, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$TaskResourceTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $TaskResourceTable> { + $$TaskResourceTableOrderingComposer(super.$state); + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskclientReferenceId => $state.composableBuilder( + column: $state.table.taskclientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskId => $state.composableBuilder( + column: $state.table.taskId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get productVariantId => $state.composableBuilder( + column: $state.table.productVariantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get quantity => $state.composableBuilder( + column: $state.table.quantity, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDelivered => $state.composableBuilder( + column: $state.table.isDelivered, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get deliveryComment => $state.composableBuilder( + column: $state.table.deliveryComment, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$SideEffectTableInsertCompanionBuilder = SideEffectCompanion Function({ + Value id, + Value projectId, + Value taskClientReferenceId, + Value projectBeneficiaryClientReferenceId, + Value reAttempts, + Value symptoms, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$SideEffectTableUpdateCompanionBuilder = SideEffectCompanion Function({ + Value id, + Value projectId, + Value taskClientReferenceId, + Value projectBeneficiaryClientReferenceId, + Value reAttempts, + Value symptoms, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$SideEffectTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $SideEffectTable, + SideEffectData, + $$SideEffectTableFilterComposer, + $$SideEffectTableOrderingComposer, + $$SideEffectTableProcessedTableManager, + $$SideEffectTableInsertCompanionBuilder, + $$SideEffectTableUpdateCompanionBuilder> { + $$SideEffectTableTableManager(_$LocalSqlDataStore db, $SideEffectTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$SideEffectTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$SideEffectTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$SideEffectTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value taskClientReferenceId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value reAttempts = const Value.absent(), + Value symptoms = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + SideEffectCompanion( + id: id, + projectId: projectId, + taskClientReferenceId: taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + reAttempts: reAttempts, + symptoms: symptoms, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value taskClientReferenceId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value reAttempts = const Value.absent(), + Value symptoms = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + SideEffectCompanion.insert( + id: id, + projectId: projectId, + taskClientReferenceId: taskClientReferenceId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + reAttempts: reAttempts, + symptoms: symptoms, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$SideEffectTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $SideEffectTable, + SideEffectData, + $$SideEffectTableFilterComposer, + $$SideEffectTableOrderingComposer, + $$SideEffectTableProcessedTableManager, + $$SideEffectTableInsertCompanionBuilder, + $$SideEffectTableUpdateCompanionBuilder> { + $$SideEffectTableProcessedTableManager(super.$state); +} + +class $$SideEffectTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $SideEffectTable> { + $$SideEffectTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get taskClientReferenceId => $state.composableBuilder( + column: $state.table.taskClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get reAttempts => $state.composableBuilder( + column: $state.table.reAttempts, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get symptoms => $state.composableBuilder( + column: $state.table.symptoms, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$SideEffectTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $SideEffectTable> { + $$SideEffectTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get taskClientReferenceId => $state.composableBuilder( + column: $state.table.taskClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get reAttempts => $state.composableBuilder( + column: $state.table.reAttempts, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get symptoms => $state.composableBuilder( + column: $state.table.symptoms, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$ReferralTableInsertCompanionBuilder = ReferralCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryClientReferenceId, + Value referrerId, + Value recipientType, + Value recipientId, + Value reasons, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + required String clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); +typedef $$ReferralTableUpdateCompanionBuilder = ReferralCompanion Function({ + Value id, + Value projectId, + Value projectBeneficiaryClientReferenceId, + Value referrerId, + Value recipientType, + Value recipientId, + Value reasons, + Value auditCreatedBy, + Value nonRecoverableError, + Value auditCreatedTime, + Value clientCreatedTime, + Value clientModifiedBy, + Value clientCreatedBy, + Value clientModifiedTime, + Value auditModifiedBy, + Value auditModifiedTime, + Value clientReferenceId, + Value tenantId, + Value isDeleted, + Value rowVersion, + Value additionalFields, + Value rowid, +}); + +class $$ReferralTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $ReferralTable, + ReferralData, + $$ReferralTableFilterComposer, + $$ReferralTableOrderingComposer, + $$ReferralTableProcessedTableManager, + $$ReferralTableInsertCompanionBuilder, + $$ReferralTableUpdateCompanionBuilder> { + $$ReferralTableTableManager(_$LocalSqlDataStore db, $ReferralTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ReferralTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ReferralTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$ReferralTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value referrerId = const Value.absent(), + Value recipientType = const Value.absent(), + Value recipientId = const Value.absent(), + Value reasons = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + Value clientReferenceId = const Value.absent(), + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ReferralCompanion( + id: id, + projectId: projectId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + referrerId: referrerId, + recipientType: recipientType, + recipientId: recipientId, + reasons: reasons, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + Value id = const Value.absent(), + Value projectId = const Value.absent(), + Value projectBeneficiaryClientReferenceId = + const Value.absent(), + Value referrerId = const Value.absent(), + Value recipientType = const Value.absent(), + Value recipientId = const Value.absent(), + Value reasons = const Value.absent(), + Value auditCreatedBy = const Value.absent(), + Value nonRecoverableError = const Value.absent(), + Value auditCreatedTime = const Value.absent(), + Value clientCreatedTime = const Value.absent(), + Value clientModifiedBy = const Value.absent(), + Value clientCreatedBy = const Value.absent(), + Value clientModifiedTime = const Value.absent(), + Value auditModifiedBy = const Value.absent(), + Value auditModifiedTime = const Value.absent(), + required String clientReferenceId, + Value tenantId = const Value.absent(), + Value isDeleted = const Value.absent(), + Value rowVersion = const Value.absent(), + Value additionalFields = const Value.absent(), + Value rowid = const Value.absent(), + }) => + ReferralCompanion.insert( + id: id, + projectId: projectId, + projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, + referrerId: referrerId, + recipientType: recipientType, + recipientId: recipientId, + reasons: reasons, + auditCreatedBy: auditCreatedBy, + nonRecoverableError: nonRecoverableError, + auditCreatedTime: auditCreatedTime, + clientCreatedTime: clientCreatedTime, + clientModifiedBy: clientModifiedBy, + clientCreatedBy: clientCreatedBy, + clientModifiedTime: clientModifiedTime, + auditModifiedBy: auditModifiedBy, + auditModifiedTime: auditModifiedTime, + clientReferenceId: clientReferenceId, + tenantId: tenantId, + isDeleted: isDeleted, + rowVersion: rowVersion, + additionalFields: additionalFields, + rowid: rowid, + ), + )); +} + +class $$ReferralTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $ReferralTable, + ReferralData, + $$ReferralTableFilterComposer, + $$ReferralTableOrderingComposer, + $$ReferralTableProcessedTableManager, + $$ReferralTableInsertCompanionBuilder, + $$ReferralTableUpdateCompanionBuilder> { + $$ReferralTableProcessedTableManager(super.$state); +} + +class $$ReferralTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $ReferralTable> { + $$ReferralTableFilterComposer(super.$state); + ColumnFilters get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get referrerId => $state.composableBuilder( + column: $state.table.referrerId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get recipientType => $state.composableBuilder( + column: $state.table.recipientType, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get recipientId => $state.composableBuilder( + column: $state.table.recipientId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get reasons => $state.composableBuilder( + column: $state.table.reasons, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$ReferralTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $ReferralTable> { + $$ReferralTableOrderingComposer(super.$state); + ColumnOrderings get id => $state.composableBuilder( + column: $state.table.id, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectId => $state.composableBuilder( + column: $state.table.projectId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get projectBeneficiaryClientReferenceId => + $state.composableBuilder( + column: $state.table.projectBeneficiaryClientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get referrerId => $state.composableBuilder( + column: $state.table.referrerId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get recipientType => $state.composableBuilder( + column: $state.table.recipientType, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get recipientId => $state.composableBuilder( + column: $state.table.recipientId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get reasons => $state.composableBuilder( + column: $state.table.reasons, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedBy => $state.composableBuilder( + column: $state.table.auditCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get nonRecoverableError => $state.composableBuilder( + column: $state.table.nonRecoverableError, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditCreatedTime => $state.composableBuilder( + column: $state.table.auditCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedTime => $state.composableBuilder( + column: $state.table.clientCreatedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedBy => $state.composableBuilder( + column: $state.table.clientModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientCreatedBy => $state.composableBuilder( + column: $state.table.clientCreatedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientModifiedTime => $state.composableBuilder( + column: $state.table.clientModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedBy => $state.composableBuilder( + column: $state.table.auditModifiedBy, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get auditModifiedTime => $state.composableBuilder( + column: $state.table.auditModifiedTime, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get clientReferenceId => $state.composableBuilder( + column: $state.table.clientReferenceId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get tenantId => $state.composableBuilder( + column: $state.table.tenantId, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get isDeleted => $state.composableBuilder( + column: $state.table.isDeleted, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get rowVersion => $state.composableBuilder( + column: $state.table.rowVersion, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get additionalFields => $state.composableBuilder( + column: $state.table.additionalFields, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +typedef $$LocalizationTableInsertCompanionBuilder = LocalizationCompanion + Function({ + required String locale, + required String code, + required String message, + required String module, + Value rowid, +}); +typedef $$LocalizationTableUpdateCompanionBuilder = LocalizationCompanion + Function({ + Value locale, + Value code, + Value message, + Value module, + Value rowid, +}); + +class $$LocalizationTableTableManager extends RootTableManager< + _$LocalSqlDataStore, + $LocalizationTable, + LocalizationData, + $$LocalizationTableFilterComposer, + $$LocalizationTableOrderingComposer, + $$LocalizationTableProcessedTableManager, + $$LocalizationTableInsertCompanionBuilder, + $$LocalizationTableUpdateCompanionBuilder> { + $$LocalizationTableTableManager( + _$LocalSqlDataStore db, $LocalizationTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$LocalizationTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$LocalizationTableOrderingComposer(ComposerState(db, table)), + getChildManagerBuilder: (p) => + $$LocalizationTableProcessedTableManager(p), + getUpdateCompanionBuilder: ({ + Value locale = const Value.absent(), + Value code = const Value.absent(), + Value message = const Value.absent(), + Value module = const Value.absent(), + Value rowid = const Value.absent(), + }) => + LocalizationCompanion( + locale: locale, + code: code, + message: message, + module: module, + rowid: rowid, + ), + getInsertCompanionBuilder: ({ + required String locale, + required String code, + required String message, + required String module, + Value rowid = const Value.absent(), + }) => + LocalizationCompanion.insert( + locale: locale, + code: code, + message: message, + module: module, + rowid: rowid, + ), + )); +} + +class $$LocalizationTableProcessedTableManager extends ProcessedTableManager< + _$LocalSqlDataStore, + $LocalizationTable, + LocalizationData, + $$LocalizationTableFilterComposer, + $$LocalizationTableOrderingComposer, + $$LocalizationTableProcessedTableManager, + $$LocalizationTableInsertCompanionBuilder, + $$LocalizationTableUpdateCompanionBuilder> { + $$LocalizationTableProcessedTableManager(super.$state); +} + +class $$LocalizationTableFilterComposer + extends FilterComposer<_$LocalSqlDataStore, $LocalizationTable> { + $$LocalizationTableFilterComposer(super.$state); + ColumnFilters get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get message => $state.composableBuilder( + column: $state.table.message, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); + + ColumnFilters get module => $state.composableBuilder( + column: $state.table.module, + builder: (column, joinBuilders) => + ColumnFilters(column, joinBuilders: joinBuilders)); +} + +class $$LocalizationTableOrderingComposer + extends OrderingComposer<_$LocalSqlDataStore, $LocalizationTable> { + $$LocalizationTableOrderingComposer(super.$state); + ColumnOrderings get locale => $state.composableBuilder( + column: $state.table.locale, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get code => $state.composableBuilder( + column: $state.table.code, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get message => $state.composableBuilder( + column: $state.table.message, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); + + ColumnOrderings get module => $state.composableBuilder( + column: $state.table.module, + builder: (column, joinBuilders) => + ColumnOrderings(column, joinBuilders: joinBuilders)); +} + +class _$LocalSqlDataStoreManager { + final _$LocalSqlDataStore _db; + _$LocalSqlDataStoreManager(this._db); + $$AttendanceRegisterTableTableManager get attendanceRegister => + $$AttendanceRegisterTableTableManager(_db, _db.attendanceRegister); + $$AttendanceTableTableManager get attendance => + $$AttendanceTableTableManager(_db, _db.attendance); + $$AttendeeTableTableManager get attendee => + $$AttendeeTableTableManager(_db, _db.attendee); + $$AddressTableTableManager get address => + $$AddressTableTableManager(_db, _db.address); + $$NameTableTableManager get name => $$NameTableTableManager(_db, _db.name); + $$BoundaryTableTableManager get boundary => + $$BoundaryTableTableManager(_db, _db.boundary); + $$DocumentTableTableManager get document => + $$DocumentTableTableManager(_db, _db.document); + $$FacilityTableTableManager get facility => + $$FacilityTableTableManager(_db, _db.facility); + $$ProductTableTableManager get product => + $$ProductTableTableManager(_db, _db.product); + $$ProductVariantTableTableManager get productVariant => + $$ProductVariantTableTableManager(_db, _db.productVariant); + $$ProjectTableTableManager get project => + $$ProjectTableTableManager(_db, _db.project); + $$ProjectBeneficiaryTableTableManager get projectBeneficiary => + $$ProjectBeneficiaryTableTableManager(_db, _db.projectBeneficiary); + $$ProjectFacilityTableTableManager get projectFacility => + $$ProjectFacilityTableTableManager(_db, _db.projectFacility); + $$ProjectProductVariantTableTableManager get projectProductVariant => + $$ProjectProductVariantTableTableManager(_db, _db.projectProductVariant); + $$ProjectResourceTableTableManager get projectResource => + $$ProjectResourceTableTableManager(_db, _db.projectResource); + $$ProjectStaffTableTableManager get projectStaff => + $$ProjectStaffTableTableManager(_db, _db.projectStaff); + $$ProjectTypeTableTableManager get projectType => + $$ProjectTypeTableTableManager(_db, _db.projectType); + $$IndividualTableTableManager get individual => + $$IndividualTableTableManager(_db, _db.individual); + $$IdentifierTableTableManager get identifier => + $$IdentifierTableTableManager(_db, _db.identifier); + $$StockTableTableManager get stock => + $$StockTableTableManager(_db, _db.stock); + $$StockReconciliationTableTableManager get stockReconciliation => + $$StockReconciliationTableTableManager(_db, _db.stockReconciliation); + $$TargetTableTableManager get target => + $$TargetTableTableManager(_db, _db.target); + $$ServiceTableTableManager get service => + $$ServiceTableTableManager(_db, _db.service); + $$ServiceAttributesTableTableManager get serviceAttributes => + $$ServiceAttributesTableTableManager(_db, _db.serviceAttributes); + $$ServiceDefinitionTableTableManager get serviceDefinition => + $$ServiceDefinitionTableTableManager(_db, _db.serviceDefinition); + $$LocalityTableTableManager get locality => + $$LocalityTableTableManager(_db, _db.locality); + $$StaffTableTableManager get staff => + $$StaffTableTableManager(_db, _db.staff); + $$AttributesTableTableManager get attributes => + $$AttributesTableTableManager(_db, _db.attributes); + $$PgrServiceTableTableManager get pgrService => + $$PgrServiceTableTableManager(_db, _db.pgrService); + $$PgrComplainantTableTableManager get pgrComplainant => + $$PgrComplainantTableTableManager(_db, _db.pgrComplainant); + $$UserTableTableManager get user => $$UserTableTableManager(_db, _db.user); + $$DownsyncTableTableManager get downsync => + $$DownsyncTableTableManager(_db, _db.downsync); + $$DownsyncCriteriaTableTableManager get downsyncCriteria => + $$DownsyncCriteriaTableTableManager(_db, _db.downsyncCriteria); + $$HFReferralTableTableManager get hFReferral => + $$HFReferralTableTableManager(_db, _db.hFReferral); + $$HouseholdTableTableManager get household => + $$HouseholdTableTableManager(_db, _db.household); + $$HouseholdMemberTableTableManager get householdMember => + $$HouseholdMemberTableTableManager(_db, _db.householdMember); + $$TaskTableTableManager get task => $$TaskTableTableManager(_db, _db.task); + $$TaskResourceTableTableManager get taskResource => + $$TaskResourceTableTableManager(_db, _db.taskResource); + $$SideEffectTableTableManager get sideEffect => + $$SideEffectTableTableManager(_db, _db.sideEffect); + $$ReferralTableTableManager get referral => + $$ReferralTableTableManager(_db, _db.referral); + $$LocalizationTableTableManager get localization => + $$LocalizationTableTableManager(_db, _db.localization); +} diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart index 82d1ecdb3..18e330a5c 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/attributes.dart @@ -9,7 +9,7 @@ class Attributes extends Table { TextColumn get tenantId => text().nullable()(); TextColumn get code => text().nullable()(); TextColumn get values => text().nullable()(); - TextColumn get isActive => text().nullable()(); + BoolColumn get isActive => boolean().nullable()(); BoolColumn get required => boolean().nullable()(); TextColumn get regex => text().nullable()(); IntColumn get order => integer().nullable()(); diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart index bc048e1f5..faafe7a2e 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/package_tables/side_effect.dart @@ -9,6 +9,7 @@ class SideEffect extends Table { TextColumn get id => text().nullable()(); TextColumn get projectId => text().nullable()(); TextColumn get taskClientReferenceId => text().nullable()(); + TextColumn get projectBeneficiaryClientReferenceId => text().nullable()(); IntColumn get reAttempts => integer().nullable()(); TextColumn get symptoms => text().nullable()(); TextColumn get auditCreatedBy => text().nullable()(); diff --git a/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart b/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart index 09140859b..604debbf3 100644 --- a/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart +++ b/packages/digit_data_model/lib/data/local_store/sql_store/tables/target.dart @@ -1,6 +1,7 @@ // Generated using mason. Do not modify by hand import 'package:drift/drift.dart'; +import '../../../../models/entities/beneficiary_type.dart'; class Target extends Table { TextColumn get id => text()(); @@ -21,8 +22,7 @@ class Target extends Table { BoolColumn get isDeleted => boolean().nullable().withDefault(const Constant(false))(); IntColumn get rowVersion => integer().nullable()(); - TextColumn get beneficiaryType => text().nullable()(); - + IntColumn get beneficiaryType => intEnum().nullable()(); TextColumn get additionalFields => text().nullable()(); @override diff --git a/packages/digit_data_model/lib/data/repositories/local/facility.dart b/packages/digit_data_model/lib/data/repositories/local/facility.dart index faf3a42f3..2da80ea13 100644 --- a/packages/digit_data_model/lib/data/repositories/local/facility.dart +++ b/packages/digit_data_model/lib/data/repositories/local/facility.dart @@ -1,11 +1,8 @@ import 'dart:async'; import 'package:digit_data_model/data_model.dart'; -import 'package:digit_data_model/models/oplog/oplog_entry.dart'; import 'package:drift/drift.dart'; -import '../../../utils/utils.dart'; - class FacilityLocalRepository extends LocalRepository { FacilityLocalRepository(super.sql, super.opLogManager); diff --git a/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart b/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart index d9787d915..7df9705b5 100644 --- a/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart +++ b/packages/digit_data_model/lib/data/repositories/oplog/oplog.dart @@ -72,7 +72,7 @@ abstract class OpLogManager { .syncedDownEqualTo(false) .nonRecoverableErrorEqualTo(false) .syncDownRetryCountGreaterThan( - 5 - 1, + DigitDataModelSingleton().syncDownRetryCount - 1, ) .createdByEqualTo(createdBy) .findAllSync(); @@ -112,7 +112,8 @@ abstract class OpLogManager { var oplogs = isar.opLogs .filter() .syncedUpEqualTo(true) - .syncDownRetryCountLessThan(5) + .syncDownRetryCountLessThan( + DigitDataModelSingleton().syncDownRetryCount) .syncedDownEqualTo(false) .entityTypeEqualTo(type) .findAllSync(); @@ -145,7 +146,7 @@ abstract class OpLogManager { }); } catch (e) { if (kDebugMode) { - print('error in isar ${e}'); + print('error in isar $e'); } rethrow; } @@ -299,7 +300,8 @@ abstract class OpLogManager { OpLogEntry updatedEntry = entry.copyWith( syncDownRetryCount: syncDownRetryCount + 1, ); - if (updatedEntry.syncDownRetryCount >= 5) { + if (updatedEntry.syncDownRetryCount >= + DigitDataModelSingleton().syncDownRetryCount) { markAsNonRecoverable = true; updatedEntry = updatedEntry.copyWith(nonRecoverableError: true); } @@ -315,7 +317,8 @@ abstract class OpLogManager { await Future.delayed(const Duration(seconds: 1)); } else { await Future.delayed(Duration( - seconds: 5 * oplogs.first.syncDownRetryCount, + seconds: DigitDataModelSingleton().retryTimeInterval * + oplogs.first.syncDownRetryCount, )); } diff --git a/packages/digit_data_model/lib/data/repositories/remote/attributes.dart b/packages/digit_data_model/lib/data/repositories/remote/attributes.dart index 2f4ceb4b0..7e6179356 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/attributes.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/attributes.dart @@ -1,7 +1,6 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/attributes.dart'; class AttributesRemoteRepository extends RemoteRepository { AttributesRemoteRepository( diff --git a/packages/digit_data_model/lib/data/repositories/remote/product.dart b/packages/digit_data_model/lib/data/repositories/remote/product.dart index e36138872..90ad1d2a6 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/product.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/product.dart @@ -2,8 +2,6 @@ import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/product.dart'; - class ProductRemoteRepository extends RemoteRepository { ProductRemoteRepository( diff --git a/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart b/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart index 671dcba84..4d6a30046 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/project_staff.dart @@ -2,8 +2,6 @@ import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/project_staff.dart'; - class ProjectStaffRemoteRepository extends RemoteRepository { ProjectStaffRemoteRepository( diff --git a/packages/digit_data_model/lib/data/repositories/remote/user.dart b/packages/digit_data_model/lib/data/repositories/remote/user.dart index e22f40b43..25b5182af 100644 --- a/packages/digit_data_model/lib/data/repositories/remote/user.dart +++ b/packages/digit_data_model/lib/data/repositories/remote/user.dart @@ -2,8 +2,6 @@ import 'package:digit_data_model/data_model.dart'; -import '../../../models/entities/user.dart'; - class UserRemoteRepository extends RemoteRepository { UserRemoteRepository( diff --git a/packages/digit_data_model/lib/data_model.mapper.dart b/packages/digit_data_model/lib/data_model.mapper.dart index e4376db08..6e29b4079 100644 --- a/packages/digit_data_model/lib/data_model.mapper.dart +++ b/packages/digit_data_model/lib/data_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'data_model.dart'; @@ -194,10 +194,8 @@ mixin AdditionalFieldMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AdditionalFieldMapper.ensureInitialized() - .isValueEqual(this as AdditionalField, other)); + return AdditionalFieldMapper.ensureInitialized() + .equalsValue(this as AdditionalField, other); } @override @@ -317,10 +315,8 @@ mixin AuditDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AuditDetailsMapper.ensureInitialized() - .isValueEqual(this as AuditDetails, other)); + return AuditDetailsMapper.ensureInitialized() + .equalsValue(this as AuditDetails, other); } @override @@ -458,10 +454,8 @@ mixin ClientAuditDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ClientAuditDetailsMapper.ensureInitialized() - .isValueEqual(this as ClientAuditDetails, other)); + return ClientAuditDetailsMapper.ensureInitialized() + .equalsValue(this as ClientAuditDetails, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/address.dart b/packages/digit_data_model/lib/models/entities/address.dart index 9c88211c2..b704c2204 100644 --- a/packages/digit_data_model/lib/models/entities/address.dart +++ b/packages/digit_data_model/lib/models/entities/address.dart @@ -2,7 +2,6 @@ import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; import '../../data_model.dart'; import 'address_type.dart'; diff --git a/packages/digit_data_model/lib/models/entities/address.mapper.dart b/packages/digit_data_model/lib/models/entities/address.mapper.dart index 89fcaaa67..28507a4cd 100644 --- a/packages/digit_data_model/lib/models/entities/address.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/address.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'address.dart'; @@ -123,10 +123,8 @@ mixin AddressSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AddressSearchModelMapper.ensureInitialized() - .isValueEqual(this as AddressSearchModel, other)); + return AddressSearchModelMapper.ensureInitialized() + .equalsValue(this as AddressSearchModel, other); } @override @@ -290,10 +288,8 @@ mixin AddressAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AddressAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as AddressAdditionalFields, other)); + return AddressAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as AddressAdditionalFields, other); } @override @@ -546,10 +542,8 @@ mixin AddressModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AddressModelMapper.ensureInitialized() - .isValueEqual(this as AddressModel, other)); + return AddressModelMapper.ensureInitialized() + .equalsValue(this as AddressModel, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/address_type.mapper.dart b/packages/digit_data_model/lib/models/entities/address_type.mapper.dart index 38b8d7007..6b1f6bee8 100644 --- a/packages/digit_data_model/lib/models/entities/address_type.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/address_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'address_type.dart'; diff --git a/packages/digit_data_model/lib/models/entities/attributes.dart b/packages/digit_data_model/lib/models/entities/attributes.dart index 29f317708..baf346b22 100644 --- a/packages/digit_data_model/lib/models/entities/attributes.dart +++ b/packages/digit_data_model/lib/models/entities/attributes.dart @@ -3,11 +3,8 @@ import 'dart:convert'; import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'attributes.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) @@ -18,7 +15,7 @@ class AttributesSearchModel extends EntitySearchModel final String? referenceId; final String? tenantId; final String? code; - final String? isActive; + final bool? isActive; final bool? required; final String? regex; final int? order; @@ -62,7 +59,7 @@ class AttributesModel extends EntityModel with AttributesModelMappable { final String? tenantId; final String? code; final List? values; - final String? isActive; + final bool? isActive; final bool? required; final String? regex; final int? order; diff --git a/packages/digit_data_model/lib/models/entities/attributes.mapper.dart b/packages/digit_data_model/lib/models/entities/attributes.mapper.dart index 2b9f5e138..5a68b648f 100644 --- a/packages/digit_data_model/lib/models/entities/attributes.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/attributes.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'attributes.dart'; @@ -36,8 +36,8 @@ class AttributesSearchModelMapper static String? _$code(AttributesSearchModel v) => v.code; static const Field _f$code = Field('code', _$code, opt: true); - static String? _$isActive(AttributesSearchModel v) => v.isActive; - static const Field _f$isActive = + static bool? _$isActive(AttributesSearchModel v) => v.isActive; + static const Field _f$isActive = Field('isActive', _$isActive, opt: true); static bool? _$required(AttributesSearchModel v) => v.required; static const Field _f$required = @@ -136,10 +136,8 @@ mixin AttributesSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributesSearchModelMapper.ensureInitialized() - .isValueEqual(this as AttributesSearchModel, other)); + return AttributesSearchModelMapper.ensureInitialized() + .equalsValue(this as AttributesSearchModel, other); } @override @@ -167,7 +165,7 @@ abstract class AttributesSearchModelCopyWith< String? referenceId, String? tenantId, String? code, - String? isActive, + bool? isActive, bool? required, String? regex, int? order, @@ -270,8 +268,8 @@ class AttributesModelMapper extends SubClassMapperBase { static List? _$values(AttributesModel v) => v.values; static const Field> _f$values = Field('values', _$values, opt: true); - static String? _$isActive(AttributesModel v) => v.isActive; - static const Field _f$isActive = + static bool? _$isActive(AttributesModel v) => v.isActive; + static const Field _f$isActive = Field('isActive', _$isActive, opt: true); static bool? _$required(AttributesModel v) => v.required; static const Field _f$required = @@ -388,10 +386,8 @@ mixin AttributesModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributesModelMapper.ensureInitialized() - .isValueEqual(this as AttributesModel, other)); + return AttributesModelMapper.ensureInitialized() + .equalsValue(this as AttributesModel, other); } @override @@ -429,7 +425,7 @@ abstract class AttributesModelCopyWith<$R, $In extends AttributesModel, $Out> String? tenantId, String? code, List? values, - String? isActive, + bool? isActive, bool? required, String? regex, int? order, @@ -634,10 +630,8 @@ mixin AttributesAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AttributesAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as AttributesAdditionalFields, other)); + return AttributesAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as AttributesAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart b/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart index 76e592df1..349f9b2d5 100644 --- a/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/beneficiary_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'beneficiary_type.dart'; diff --git a/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart b/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart index 733eba168..32f4c16b5 100644 --- a/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/blood_group.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'blood_group.dart'; diff --git a/packages/digit_data_model/lib/models/entities/boundary.mapper.dart b/packages/digit_data_model/lib/models/entities/boundary.mapper.dart index 8c97c5c8b..2032b0d27 100644 --- a/packages/digit_data_model/lib/models/entities/boundary.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/boundary.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'boundary.dart'; @@ -127,10 +127,8 @@ mixin BoundarySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - BoundarySearchModelMapper.ensureInitialized() - .isValueEqual(this as BoundarySearchModel, other)); + return BoundarySearchModelMapper.ensureInitialized() + .equalsValue(this as BoundarySearchModel, other); } @override @@ -361,10 +359,8 @@ mixin BoundaryModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - BoundaryModelMapper.ensureInitialized() - .isValueEqual(this as BoundaryModel, other)); + return BoundaryModelMapper.ensureInitialized() + .equalsValue(this as BoundaryModel, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/document.dart b/packages/digit_data_model/lib/models/entities/document.dart index 81f253c85..ce00e17c0 100644 --- a/packages/digit_data_model/lib/models/entities/document.dart +++ b/packages/digit_data_model/lib/models/entities/document.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'document.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/document.mapper.dart b/packages/digit_data_model/lib/models/entities/document.mapper.dart index eee399a0a..35b3ded04 100644 --- a/packages/digit_data_model/lib/models/entities/document.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/document.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'document.dart'; @@ -101,10 +101,8 @@ mixin DocumentSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DocumentSearchModelMapper.ensureInitialized() - .isValueEqual(this as DocumentSearchModel, other)); + return DocumentSearchModelMapper.ensureInitialized() + .equalsValue(this as DocumentSearchModel, other); } @override @@ -306,10 +304,8 @@ mixin DocumentModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DocumentModelMapper.ensureInitialized() - .isValueEqual(this as DocumentModel, other)); + return DocumentModelMapper.ensureInitialized() + .equalsValue(this as DocumentModel, other); } @override @@ -511,10 +507,8 @@ mixin DocumentAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DocumentAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as DocumentAdditionalFields, other)); + return DocumentAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as DocumentAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/facility.dart b/packages/digit_data_model/lib/models/entities/facility.dart index c080247bc..85c5ef8b8 100644 --- a/packages/digit_data_model/lib/models/entities/facility.dart +++ b/packages/digit_data_model/lib/models/entities/facility.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'facility.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/facility.mapper.dart b/packages/digit_data_model/lib/models/entities/facility.mapper.dart index 2808cd68d..644c635ee 100644 --- a/packages/digit_data_model/lib/models/entities/facility.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/facility.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'facility.dart'; @@ -120,10 +120,8 @@ mixin FacilitySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - FacilitySearchModelMapper.ensureInitialized() - .isValueEqual(this as FacilitySearchModel, other)); + return FacilitySearchModelMapper.ensureInitialized() + .equalsValue(this as FacilitySearchModel, other); } @override @@ -341,10 +339,8 @@ mixin FacilityModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - FacilityModelMapper.ensureInitialized() - .isValueEqual(this as FacilityModel, other)); + return FacilityModelMapper.ensureInitialized() + .equalsValue(this as FacilityModel, other); } @override @@ -553,10 +549,8 @@ mixin FacilityAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - FacilityAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as FacilityAdditionalFields, other)); + return FacilityAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as FacilityAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/gender.mapper.dart b/packages/digit_data_model/lib/models/entities/gender.mapper.dart index 36baec89d..c74bca2e7 100644 --- a/packages/digit_data_model/lib/models/entities/gender.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/gender.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'gender.dart'; diff --git a/packages/digit_data_model/lib/models/entities/identifier.dart b/packages/digit_data_model/lib/models/entities/identifier.dart index a9535705a..7f1bef489 100644 --- a/packages/digit_data_model/lib/models/entities/identifier.dart +++ b/packages/digit_data_model/lib/models/entities/identifier.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'identifier.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) class IdentifierSearchModel extends EntitySearchModel with IdentifierSearchModelMappable { diff --git a/packages/digit_data_model/lib/models/entities/identifier.mapper.dart b/packages/digit_data_model/lib/models/entities/identifier.mapper.dart index bf319ec4c..558e5b5d7 100644 --- a/packages/digit_data_model/lib/models/entities/identifier.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/identifier.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'identifier.dart'; @@ -117,10 +117,8 @@ mixin IdentifierSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IdentifierSearchModelMapper.ensureInitialized() - .isValueEqual(this as IdentifierSearchModel, other)); + return IdentifierSearchModelMapper.ensureInitialized() + .equalsValue(this as IdentifierSearchModel, other); } @override @@ -332,10 +330,8 @@ mixin IdentifierModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IdentifierModelMapper.ensureInitialized() - .isValueEqual(this as IdentifierModel, other)); + return IdentifierModelMapper.ensureInitialized() + .equalsValue(this as IdentifierModel, other); } @override @@ -537,10 +533,8 @@ mixin IdentifierAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IdentifierAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as IdentifierAdditionalFields, other)); + return IdentifierAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as IdentifierAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/individual.dart b/packages/digit_data_model/lib/models/entities/individual.dart index 2da1478ed..53178d784 100644 --- a/packages/digit_data_model/lib/models/entities/individual.dart +++ b/packages/digit_data_model/lib/models/entities/individual.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'individual.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/individual.mapper.dart b/packages/digit_data_model/lib/models/entities/individual.mapper.dart index cc22920b7..35c441d5d 100644 --- a/packages/digit_data_model/lib/models/entities/individual.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/individual.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'individual.dart'; @@ -143,10 +143,8 @@ mixin IndividualSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IndividualSearchModelMapper.ensureInitialized() - .isValueEqual(this as IndividualSearchModel, other)); + return IndividualSearchModelMapper.ensureInitialized() + .equalsValue(this as IndividualSearchModel, other); } @override @@ -478,10 +476,8 @@ mixin IndividualModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IndividualModelMapper.ensureInitialized() - .isValueEqual(this as IndividualModel, other)); + return IndividualModelMapper.ensureInitialized() + .equalsValue(this as IndividualModel, other); } @override @@ -759,10 +755,8 @@ mixin IndividualAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - IndividualAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as IndividualAdditionalFields, other)); + return IndividualAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as IndividualAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/locality.dart b/packages/digit_data_model/lib/models/entities/locality.dart index 5a1ff3997..2751a6425 100644 --- a/packages/digit_data_model/lib/models/entities/locality.dart +++ b/packages/digit_data_model/lib/models/entities/locality.dart @@ -2,7 +2,6 @@ import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; import '../../data_model.dart'; part 'locality.mapper.dart'; diff --git a/packages/digit_data_model/lib/models/entities/locality.mapper.dart b/packages/digit_data_model/lib/models/entities/locality.mapper.dart index 8aa1db256..61bd36ade 100644 --- a/packages/digit_data_model/lib/models/entities/locality.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/locality.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'locality.dart'; @@ -105,10 +105,8 @@ mixin LocalitySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LocalitySearchModelMapper.ensureInitialized() - .isValueEqual(this as LocalitySearchModel, other)); + return LocalitySearchModelMapper.ensureInitialized() + .equalsValue(this as LocalitySearchModel, other); } @override @@ -282,10 +280,8 @@ mixin LocalityModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LocalityModelMapper.ensureInitialized() - .isValueEqual(this as LocalityModel, other)); + return LocalityModelMapper.ensureInitialized() + .equalsValue(this as LocalityModel, other); } @override @@ -474,10 +470,8 @@ mixin LocalityAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - LocalityAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as LocalityAdditionalFields, other)); + return LocalityAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as LocalityAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/name.dart b/packages/digit_data_model/lib/models/entities/name.dart index 46b582136..36285fb68 100644 --- a/packages/digit_data_model/lib/models/entities/name.dart +++ b/packages/digit_data_model/lib/models/entities/name.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'name.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/name.mapper.dart b/packages/digit_data_model/lib/models/entities/name.mapper.dart index a93c89a05..4e5f20855 100644 --- a/packages/digit_data_model/lib/models/entities/name.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/name.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'name.dart'; @@ -122,10 +122,8 @@ mixin NameSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - NameSearchModelMapper.ensureInitialized() - .isValueEqual(this as NameSearchModel, other)); + return NameSearchModelMapper.ensureInitialized() + .equalsValue(this as NameSearchModel, other); } @override @@ -332,10 +330,8 @@ mixin NameModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - NameModelMapper.ensureInitialized() - .isValueEqual(this as NameModel, other)); + return NameModelMapper.ensureInitialized() + .equalsValue(this as NameModel, other); } @override @@ -534,10 +530,8 @@ mixin NameAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - NameAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as NameAdditionalFields, other)); + return NameAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as NameAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/pgr_application_status.mapper.dart b/packages/digit_data_model/lib/models/entities/pgr_application_status.mapper.dart index 34759f6df..b60c63f04 100644 --- a/packages/digit_data_model/lib/models/entities/pgr_application_status.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/pgr_application_status.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'pgr_application_status.dart'; diff --git a/packages/digit_data_model/lib/models/entities/product.mapper.dart b/packages/digit_data_model/lib/models/entities/product.mapper.dart index 42026801f..8e54975cc 100644 --- a/packages/digit_data_model/lib/models/entities/product.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/product.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'product.dart'; @@ -119,10 +119,8 @@ mixin ProductSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProductSearchModel, other)); + return ProductSearchModelMapper.ensureInitialized() + .equalsValue(this as ProductSearchModel, other); } @override @@ -354,10 +352,8 @@ mixin ProductModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductModelMapper.ensureInitialized() - .isValueEqual(this as ProductModel, other)); + return ProductModelMapper.ensureInitialized() + .equalsValue(this as ProductModel, other); } @override @@ -559,10 +555,8 @@ mixin ProductAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProductAdditionalFields, other)); + return ProductAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProductAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/product_variant.dart b/packages/digit_data_model/lib/models/entities/product_variant.dart index 914beede2..c66237896 100644 --- a/packages/digit_data_model/lib/models/entities/product_variant.dart +++ b/packages/digit_data_model/lib/models/entities/product_variant.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'product_variant.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart b/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart index 3b637633d..892f9fae1 100644 --- a/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/product_variant.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'product_variant.dart'; @@ -119,10 +119,8 @@ mixin ProductVariantSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductVariantSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProductVariantSearchModel, other)); + return ProductVariantSearchModelMapper.ensureInitialized() + .equalsValue(this as ProductVariantSearchModel, other); } @override @@ -342,10 +340,8 @@ mixin ProductVariantModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductVariantModelMapper.ensureInitialized() - .isValueEqual(this as ProductVariantModel, other)); + return ProductVariantModelMapper.ensureInitialized() + .equalsValue(this as ProductVariantModel, other); } @override @@ -547,10 +543,8 @@ mixin ProductVariantAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProductVariantAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProductVariantAdditionalFields, other)); + return ProductVariantAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProductVariantAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project.mapper.dart b/packages/digit_data_model/lib/models/entities/project.mapper.dart index 6dfb6d72e..93b01d581 100644 --- a/packages/digit_data_model/lib/models/entities/project.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project.dart'; @@ -47,6 +47,9 @@ class ProjectSearchModelMapper extends SubClassMapperBase { static String? _$tenantId(ProjectSearchModel v) => v.tenantId; static const Field _f$tenantId = Field('tenantId', _$tenantId, opt: true); + static String? _$projectType(ProjectSearchModel v) => v.projectType; + static const Field _f$projectType = + Field('projectType', _$projectType, opt: true); static int? _$startDate(ProjectSearchModel v) => v.startDate; static const Field _f$startDate = Field('startDate', _$startDate, opt: true); @@ -69,9 +72,6 @@ class ProjectSearchModelMapper extends SubClassMapperBase { static DateTime? _$endDateTime(ProjectSearchModel v) => v.endDateTime; static const Field _f$endDateTime = Field('endDateTime', _$endDateTime, mode: FieldMode.member); - static String? _$projectType(ProjectSearchModel v) => v.projectType; - static const Field _f$projectType = - Field('projectType', _$projectType, mode: FieldMode.member); @override final MappableFields fields = const { @@ -84,6 +84,7 @@ class ProjectSearchModelMapper extends SubClassMapperBase { #department: _f$department, #referenceId: _f$referenceId, #tenantId: _f$tenantId, + #projectType: _f$projectType, #startDate: _f$startDate, #endDate: _f$endDate, #boundaryCode: _f$boundaryCode, @@ -91,7 +92,6 @@ class ProjectSearchModelMapper extends SubClassMapperBase { #additionalFields: _f$additionalFields, #startDateTime: _f$startDateTime, #endDateTime: _f$endDateTime, - #projectType: _f$projectType, }; @override final bool ignoreNull = true; @@ -115,6 +115,7 @@ class ProjectSearchModelMapper extends SubClassMapperBase { department: data.dec(_f$department), referenceId: data.dec(_f$referenceId), tenantId: data.dec(_f$tenantId), + projectType: data.dec(_f$projectType), startDate: data.dec(_f$startDate), endDate: data.dec(_f$endDate), boundaryCode: data.dec(_f$boundaryCode)); @@ -155,10 +156,8 @@ mixin ProjectSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectSearchModel, other)); + return ProjectSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectSearchModel, other); } @override @@ -188,6 +187,7 @@ abstract class ProjectSearchModelCopyWith<$R, $In extends ProjectSearchModel, String? department, String? referenceId, String? tenantId, + String? projectType, int? startDate, int? endDate, String? boundaryCode}); @@ -214,6 +214,7 @@ class _ProjectSearchModelCopyWithImpl<$R, $Out> Object? department = $none, Object? referenceId = $none, Object? tenantId = $none, + Object? projectType = $none, Object? startDate = $none, Object? endDate = $none, Object? boundaryCode = $none}) => @@ -227,6 +228,7 @@ class _ProjectSearchModelCopyWithImpl<$R, $Out> if (department != $none) #department: department, if (referenceId != $none) #referenceId: referenceId, if (tenantId != $none) #tenantId: tenantId, + if (projectType != $none) #projectType: projectType, if (startDate != $none) #startDate: startDate, if (endDate != $none) #endDate: endDate, if (boundaryCode != $none) #boundaryCode: boundaryCode @@ -244,6 +246,7 @@ class _ProjectSearchModelCopyWithImpl<$R, $Out> department: data.get(#department, or: $value.department), referenceId: data.get(#referenceId, or: $value.referenceId), tenantId: data.get(#tenantId, or: $value.tenantId), + projectType: data.get(#projectType, or: $value.projectType), startDate: data.get(#startDate, or: $value.startDate), endDate: data.get(#endDate, or: $value.endDate), boundaryCode: data.get(#boundaryCode, or: $value.boundaryCode)); @@ -457,10 +460,8 @@ mixin ProjectModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectModelMapper.ensureInitialized() - .isValueEqual(this as ProjectModel, other)); + return ProjectModelMapper.ensureInitialized() + .equalsValue(this as ProjectModel, other); } @override @@ -745,10 +746,8 @@ mixin ProjectAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectAdditionalFields, other)); + return ProjectAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectAdditionalFields, other); } @override @@ -878,10 +877,8 @@ mixin ProjectAdditionalDetailsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectAdditionalDetailsMapper.ensureInitialized() - .isValueEqual(this as ProjectAdditionalDetails, other)); + return ProjectAdditionalDetailsMapper.ensureInitialized() + .equalsValue(this as ProjectAdditionalDetails, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart b/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart index 1b891440d..3353c030a 100644 --- a/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_facility.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_facility.dart'; @@ -115,10 +115,8 @@ mixin ProjectFacilitySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectFacilitySearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectFacilitySearchModel, other)); + return ProjectFacilitySearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectFacilitySearchModel, other); } @override @@ -339,10 +337,8 @@ mixin ProjectFacilityModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectFacilityModelMapper.ensureInitialized() - .isValueEqual(this as ProjectFacilityModel, other)); + return ProjectFacilityModelMapper.ensureInitialized() + .equalsValue(this as ProjectFacilityModel, other); } @override @@ -543,10 +539,8 @@ mixin ProjectFacilityAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectFacilityAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectFacilityAdditionalFields, other)); + return ProjectFacilityAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectFacilityAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_product_variant.dart b/packages/digit_data_model/lib/models/entities/project_product_variant.dart index a1e687a51..0dd6ea6ea 100644 --- a/packages/digit_data_model/lib/models/entities/project_product_variant.dart +++ b/packages/digit_data_model/lib/models/entities/project_product_variant.dart @@ -1,11 +1,8 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; -import '../../data/local_store/sql_store/sql_store.dart'; - part 'project_product_variant.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) diff --git a/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart b/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart index dd63099a7..c19cb4a16 100644 --- a/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_product_variant.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_product_variant.dart'; @@ -110,10 +110,8 @@ mixin ProjectProductVariantSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectProductVariantSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectProductVariantSearchModel, other)); + return ProjectProductVariantSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectProductVariantSearchModel, other); } @override @@ -310,10 +308,8 @@ mixin ProjectProductVariantModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectProductVariantModelMapper.ensureInitialized() - .isValueEqual(this as ProjectProductVariantModel, other)); + return ProjectProductVariantModelMapper.ensureInitialized() + .equalsValue(this as ProjectProductVariantModel, other); } @override @@ -530,11 +526,8 @@ mixin ProjectProductVariantAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectProductVariantAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ProjectProductVariantAdditionalFields, other)); + return ProjectProductVariantAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectProductVariantAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart b/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart index e0c425dca..a34218678 100644 --- a/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_resource.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_resource.dart'; @@ -109,10 +109,8 @@ mixin ProjectResourceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectResourceSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectResourceSearchModel, other)); + return ProjectResourceSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectResourceSearchModel, other); } @override @@ -322,10 +320,8 @@ mixin ProjectResourceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectResourceModelMapper.ensureInitialized() - .isValueEqual(this as ProjectResourceModel, other)); + return ProjectResourceModelMapper.ensureInitialized() + .equalsValue(this as ProjectResourceModel, other); } @override @@ -532,10 +528,8 @@ mixin ProjectResourceAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectResourceAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectResourceAdditionalFields, other)); + return ProjectResourceAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectResourceAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_staff.dart b/packages/digit_data_model/lib/models/entities/project_staff.dart index 6172bd4c4..1bb606f3c 100644 --- a/packages/digit_data_model/lib/models/entities/project_staff.dart +++ b/packages/digit_data_model/lib/models/entities/project_staff.dart @@ -1,7 +1,6 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; part 'project_staff.mapper.dart'; diff --git a/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart b/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart index b53029adf..892f4c054 100644 --- a/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_staff.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_staff.dart'; @@ -136,10 +136,8 @@ mixin ProjectStaffSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectStaffSearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectStaffSearchModel, other)); + return ProjectStaffSearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectStaffSearchModel, other); } @override @@ -391,10 +389,8 @@ mixin ProjectStaffModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectStaffModelMapper.ensureInitialized() - .isValueEqual(this as ProjectStaffModel, other)); + return ProjectStaffModelMapper.ensureInitialized() + .equalsValue(this as ProjectStaffModel, other); } @override @@ -608,10 +604,8 @@ mixin ProjectStaffAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectStaffAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectStaffAdditionalFields, other)); + return ProjectStaffAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectStaffAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/project_type.mapper.dart b/packages/digit_data_model/lib/models/entities/project_type.mapper.dart index d011cde6a..9e497f98a 100644 --- a/packages/digit_data_model/lib/models/entities/project_type.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/project_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_type.dart'; @@ -172,10 +172,8 @@ mixin ProjectTypeModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectTypeModelMapper.ensureInitialized() - .isValueEqual(this as ProjectTypeModel, other)); + return ProjectTypeModelMapper.ensureInitialized() + .equalsValue(this as ProjectTypeModel, other); } @override @@ -451,10 +449,8 @@ mixin ProjectTypeAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectTypeAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ProjectTypeAdditionalFields, other)); + return ProjectTypeAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectTypeAdditionalFields, other); } @override @@ -607,10 +603,8 @@ mixin ProjectCycleMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectCycleMapper.ensureInitialized() - .isValueEqual(this as ProjectCycle, other)); + return ProjectCycleMapper.ensureInitialized() + .equalsValue(this as ProjectCycle, other); } @override @@ -777,10 +771,8 @@ mixin ProjectCycleDeliveryMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectCycleDeliveryMapper.ensureInitialized() - .isValueEqual(this as ProjectCycleDelivery, other)); + return ProjectCycleDeliveryMapper.ensureInitialized() + .equalsValue(this as ProjectCycleDelivery, other); } @override @@ -947,10 +939,8 @@ mixin DeliveryDoseCriteriaMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DeliveryDoseCriteriaMapper.ensureInitialized() - .isValueEqual(this as DeliveryDoseCriteria, other)); + return DeliveryDoseCriteriaMapper.ensureInitialized() + .equalsValue(this as DeliveryDoseCriteria, other); } @override @@ -1100,10 +1090,8 @@ mixin DeliveryProductVariantMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DeliveryProductVariantMapper.ensureInitialized() - .isValueEqual(this as DeliveryProductVariant, other)); + return DeliveryProductVariantMapper.ensureInitialized() + .equalsValue(this as DeliveryProductVariant, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/target.dart b/packages/digit_data_model/lib/models/entities/target.dart index d96f3c08c..461309bb1 100644 --- a/packages/digit_data_model/lib/models/entities/target.dart +++ b/packages/digit_data_model/lib/models/entities/target.dart @@ -34,7 +34,7 @@ class TargetModel extends EntityModel with TargetModelMappable { final bool? nonRecoverableError; final String? tenantId; final int? rowVersion; - final String? beneficiaryType; + final BeneficiaryType? beneficiaryType; final TargetAdditionalFields? additionalFields; TargetModel({ diff --git a/packages/digit_data_model/lib/models/entities/target.mapper.dart b/packages/digit_data_model/lib/models/entities/target.mapper.dart index 7cb86ee06..968b78a98 100644 --- a/packages/digit_data_model/lib/models/entities/target.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/target.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'target.dart'; @@ -93,10 +93,8 @@ mixin TargetSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TargetSearchModelMapper.ensureInitialized() - .isValueEqual(this as TargetSearchModel, other)); + return TargetSearchModelMapper.ensureInitialized() + .equalsValue(this as TargetSearchModel, other); } @override @@ -185,8 +183,8 @@ class TargetModelMapper extends SubClassMapperBase { static int? _$rowVersion(TargetModel v) => v.rowVersion; static const Field _f$rowVersion = Field('rowVersion', _$rowVersion, opt: true); - static String? _$beneficiaryType(TargetModel v) => v.beneficiaryType; - static const Field _f$beneficiaryType = + static BeneficiaryType? _$beneficiaryType(TargetModel v) => v.beneficiaryType; + static const Field _f$beneficiaryType = Field('beneficiaryType', _$beneficiaryType, opt: true); static AuditDetails? _$auditDetails(TargetModel v) => v.auditDetails; static const Field _f$auditDetails = @@ -274,10 +272,8 @@ mixin TargetModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TargetModelMapper.ensureInitialized() - .isValueEqual(this as TargetModel, other)); + return TargetModelMapper.ensureInitialized() + .equalsValue(this as TargetModel, other); } @override @@ -311,7 +307,7 @@ abstract class TargetModelCopyWith<$R, $In extends TargetModel, $Out> bool? nonRecoverableError, String? tenantId, int? rowVersion, - String? beneficiaryType, + BeneficiaryType? beneficiaryType, AuditDetails? auditDetails, ClientAuditDetails? clientAuditDetails, bool? isDeleted}); @@ -477,10 +473,8 @@ mixin TargetAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TargetAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as TargetAdditionalFields, other)); + return TargetAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as TargetAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/user.mapper.dart b/packages/digit_data_model/lib/models/entities/user.mapper.dart index 3f2bb616a..f492b70df 100644 --- a/packages/digit_data_model/lib/models/entities/user.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/user.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'user.dart'; @@ -102,10 +102,8 @@ mixin UserSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserSearchModelMapper.ensureInitialized() - .isValueEqual(this as UserSearchModel, other)); + return UserSearchModelMapper.ensureInitialized() + .equalsValue(this as UserSearchModel, other); } @override @@ -435,10 +433,8 @@ mixin UserModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserModelMapper.ensureInitialized() - .isValueEqual(this as UserModel, other)); + return UserModelMapper.ensureInitialized() + .equalsValue(this as UserModel, other); } @override @@ -759,10 +755,8 @@ mixin UserAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as UserAdditionalFields, other)); + return UserAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as UserAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/entities/user_action.mapper.dart b/packages/digit_data_model/lib/models/entities/user_action.mapper.dart index 172de3356..8d078e2d5 100644 --- a/packages/digit_data_model/lib/models/entities/user_action.mapper.dart +++ b/packages/digit_data_model/lib/models/entities/user_action.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'user_action.dart'; @@ -111,10 +111,8 @@ mixin UserActionSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserActionSearchModelMapper.ensureInitialized() - .isValueEqual(this as UserActionSearchModel, other)); + return UserActionSearchModelMapper.ensureInitialized() + .equalsValue(this as UserActionSearchModel, other); } @override @@ -336,10 +334,8 @@ mixin UserActionModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserActionModelMapper.ensureInitialized() - .isValueEqual(this as UserActionModel, other)); + return UserActionModelMapper.ensureInitialized() + .equalsValue(this as UserActionModel, other); } @override @@ -562,10 +558,8 @@ mixin UserActionAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - UserActionAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as UserActionAdditionalFields, other)); + return UserActionAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as UserActionAdditionalFields, other); } @override diff --git a/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart b/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart index 3fcb7836d..79d1bb093 100644 --- a/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart +++ b/packages/digit_data_model/lib/models/oplog/oplog_entry.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'oplog_entry.dart'; @@ -276,10 +276,8 @@ mixin OpLogEntryMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - OpLogEntryMapper.ensureInitialized() - .isValueEqual(this as OpLogEntry, other)); + return OpLogEntryMapper.ensureInitialized() + .equalsValue(this as OpLogEntry, other); } @override @@ -465,10 +463,8 @@ mixin AdditionalIdMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AdditionalIdMapper.ensureInitialized() - .isValueEqual(this as AdditionalId, other)); + return AdditionalIdMapper.ensureInitialized() + .equalsValue(this as AdditionalId, other); } @override diff --git a/packages/digit_data_model/pubspec.lock b/packages/digit_data_model/pubspec.lock index c005c2793..52da34c0e 100644 --- a/packages/digit_data_model/pubspec.lock +++ b/packages/digit_data_model/pubspec.lock @@ -109,10 +109,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -229,11 +229,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -250,14 +250,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" diff_match_patch: dependency: transitive description: @@ -266,13 +258,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: "direct main" - description: - path: "../digit_components" - relative: true - source: path - version: "1.0.2+1" dio: dependency: "direct main" description: @@ -285,26 +270,18 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: "direct main" - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.18.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" fake_async: dependency: transitive description: @@ -354,44 +331,15 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" - flutter_spinkit: - dependency: transitive - description: - name: flutter_spinkit - sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 - url: "https://pub.dev" - source: hosted - version: "5.2.1" + version: "4.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fluttertoast: - dependency: transitive - description: - name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" - url: "https://pub.dev" - source: hosted - version: "8.2.5" freezed: dependency: "direct dev" description: @@ -424,14 +372,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" - google_fonts: - dependency: transitive - description: - name: google_fonts - sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" - url: "https://pub.dev" - source: hosted - version: "4.0.4" graphs: dependency: transitive description: @@ -440,30 +380,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.1" - horizontal_data_table: - dependency: transitive - description: - name: horizontal_data_table - sha256: c8ab5256bbced698a729f3e0ff2cb0e8e97416cdbb082860370eaf883badf722 - url: "https://pub.dev" - source: hosted - version: "4.3.1" - html: - dependency: transitive - description: - name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" - url: "https://pub.dev" - source: hosted - version: "0.15.4" - http: - dependency: transitive - description: - name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" - url: "https://pub.dev" - source: hosted - version: "0.13.6" http_multi_server: dependency: transitive description: @@ -536,14 +452,38 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" logging: dependency: transitive description: @@ -556,26 +496,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -620,10 +560,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -688,14 +628,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -736,14 +668,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" shelf: dependency: transitive description: @@ -821,6 +745,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -833,18 +765,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -889,26 +821,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" time: dependency: transitive description: @@ -945,10 +877,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_math: dependency: transitive description: @@ -961,10 +893,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -977,10 +909,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1030,5 +962,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/digit_data_model/pubspec.yaml b/packages/digit_data_model/pubspec.yaml index 7f37b835f..5298d5f6a 100644 --- a/packages/digit_data_model/pubspec.yaml +++ b/packages/digit_data_model/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_data_model description: The digit_data_model package is a data modeling library. It defines various classes, enums, and functions. -version: 1.0.5-dev.1 +version: 1.0.5+1 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_data_model repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,36 +11,34 @@ environment: dependencies: flutter: sdk: flutter - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 dart_mappable: ^4.2.0 - drift: ^2.0.0 - sqlite3_flutter_libs: ^0.5.10 - path_provider: ^2.0.11 - path: ^1.8.2 - drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 + drift: ^2.18.0 + sqlite3_flutter_libs: ^0.5.23 + path_provider: ^2.1.3 + path: ^1.9.0 + uuid: ^4.4.0 recase: ^4.1.0 - isar: ^3.0.5 - isar_flutter_libs: ^3.0.5 - dio: ^5.1.2 - mocktail: ^1.0.2 - collection: ^1.16.0 - digit_components: ^1.0.2 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 + dio: ^5.4.3+1 + mocktail: ^1.0.3 + collection: ^1.18.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 - build_runner: ^2.4.9 + build_runner: ^2.4.11 json_serializable: ^6.4.0 - drift_dev: ^2.14.1 + drift_dev: ^2.18.0 bloc_test: ^9.1.0 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder isar_generator: ^3.0.5 @@ -50,33 +48,33 @@ dev_dependencies: # 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 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 +# 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/digit_dss/CHANGELOG.md b/packages/digit_dss/CHANGELOG.md index 4350f8da1..dbf14003e 100644 --- a/packages/digit_dss/CHANGELOG.md +++ b/packages/digit_dss/CHANGELOG.md @@ -1,26 +1,39 @@ +## 1.0.3 + +* Updated to latest package versions +* Updated flutter version to 3.22 +* Migrated to digit_ui_components + ## 1.0.2 + * Bug fixes - * Added last sync time + * Added last sync time * Added amount enum ## 1.0.1 + * Bug fixes * Added enums for dss charts * Fixed chart delete issue * Updated digit_scanner package, digit_components, digit_data_model, attendance_management ## 1.0.0 + * Initial DSS Dashboard Release supporting metric and table charts ## 0.0.1-dev.4 -* Added error toast for network failure + +* Added error toast for network failure * No result card added if no charts available ## 0.0.1-dev.3 + * Fixed user uuid search for dss charts ## 0.0.1-dev.2 + * Added userIds and project Id filters for all dss charts ## 0.0.1-dev.1 + * Initial DSS Dashboard Release diff --git a/packages/digit_dss/lib/blocs/dashboard.dart b/packages/digit_dss/lib/blocs/dashboard.dart index b41be19c3..f1da76177 100644 --- a/packages/digit_dss/lib/blocs/dashboard.dart +++ b/packages/digit_dss/lib/blocs/dashboard.dart @@ -3,12 +3,12 @@ import 'dart:async'; // Import the dart:async library for asynchronous operation import 'package:attendance_management/attendance_management.dart'; import 'package:attendance_management/utils/typedefs.dart'; import 'package:collection/collection.dart'; // Import the collection package for collection utilities -import 'package:digit_components/models/digit_table_model.dart'; // Import the digit_table_model.dart file from the digit_components package -import 'package:digit_components/theme/colors.dart'; // Import the colors.dart file from the digit_components package -import 'package:digit_components/theme/digit_theme.dart'; // Import the digit_theme.dart file from the digit_components package -import 'package:digit_components/utils/date_utils.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/digit_dss.dart'; // Import the digit_dss.dart file from the digit_dss package +import 'package:digit_ui_components/theme/colors.dart'; +import 'package:digit_ui_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; // Import the flutter_bloc package for state management import 'package:freezed_annotation/freezed_annotation.dart'; // Import the freezed_annotation package for code generation @@ -80,11 +80,11 @@ class DashboardBloc extends Bloc { ), ); List attendeesIndividualIds = []; - registers.forEach((r) { + for (var r in registers) { r.attendees?.where((a) => a.individualId != null).forEach((att) { attendeesIndividualIds.add(att.individualId.toString()); }); - }); + } final individuals = await individualDataRepository.search(IndividualSearchModel( id: attendeesIndividualIds, @@ -177,7 +177,7 @@ class DashboardBloc extends Bloc { for (DashboardResponse chart in tableCharts) { if ((chart.data ?? []).isNotEmpty) { // Create table headers - final List tableHeaderList = chart.data?.first.plots + final List tableHeaderList = chart.data?.first.plots ?.where((p) => p.name != DSSEnums.serialNumber.toValue() && p.name != DSSEnums.startDate.toValue() && @@ -185,10 +185,7 @@ class DashboardBloc extends Bloc { p.name != null) .map((e) { final headerData = transformToLocaleCode(e.name ?? ''); - return TableHeader( - headerData ?? '', - cellKey: e.name, - ); + return DigitTableColumn(header: headerData, cellValue: e.name!); }).toList() ?? []; @@ -200,7 +197,7 @@ class DashboardBloc extends Bloc { p.name != DSSEnums.startDate.toValue() && p.name != DSSEnums.endDate.toValue()) .mapIndexed( - (i, plot) => TableData( + (i, plot) => DigitTableData( plot.symbol == DSSEnums.number.toValue() || plot.symbol == DSSEnums.percentage.toValue() || plot.symbol == DSSEnums.amount.toValue() @@ -220,17 +217,17 @@ class DashboardBloc extends Bloc { : double.parse(plot.value.toString()) .toStringAsFixed(2) : plot.label.toString(), - cellKey: plot.name, + cellKey: plot.name!, style: DigitTheme.instance.mobileTheme.textTheme.bodyMedium ?.apply( color: i == 0 - ? const DigitColors().burningOrange - : const DigitColors().woodsmokeBlack, + ? const DigitColors().light.primary1 + : const DigitColors().light.textPrimary, ), ), ) .toList(); - return TableDataRow(rowTableData ?? []); + return DigitTableRow(tableRow: rowTableData!); }).toList(); tableWrapperList.add(TableWrapper( headerList: tableHeaderList, @@ -300,8 +297,8 @@ class MetricWrapper { // Class for wrapping table data class TableWrapper { - final List headerList; // List of table headers - final List tableData; // List of table data rows + final List headerList; // List of table headers + final List tableData; // List of table data rows TableWrapper({ required this.headerList, diff --git a/packages/digit_dss/lib/data/remote/dashboard.dart b/packages/digit_dss/lib/data/remote/dashboard.dart index 8f6a2a321..3108d5c2b 100644 --- a/packages/digit_dss/lib/data/remote/dashboard.dart +++ b/packages/digit_dss/lib/data/remote/dashboard.dart @@ -1,8 +1,8 @@ import 'dart:async'; // Import the dart:async library for asynchronous operations import 'dart:convert'; // Import the dart:convert library for JSON encoding and decoding -import 'package:digit_components/utils/app_logger.dart'; // Import the app_logger.dart file from the digit_components package import 'package:digit_dss/data/local_store/no_sql/schema/dashboard_response.dart'; // Import the dashboard_response.dart file from the digit_dss package +import 'package:digit_ui_components/utils/app_logger.dart'; import 'package:dio/dio.dart'; // Import the dio package for HTTP client functionality import 'package:flutter/material.dart'; import 'package:isar/isar.dart'; // Import the isar package for database management diff --git a/packages/digit_dss/lib/models/entities/chart_data.dart b/packages/digit_dss/lib/models/entities/chart_data.dart index 5e66310db..184c533f6 100644 --- a/packages/digit_dss/lib/models/entities/chart_data.dart +++ b/packages/digit_dss/lib/models/entities/chart_data.dart @@ -1,6 +1,5 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; -import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/models/entities/insight.dart'; import 'package:digit_dss/models/entities/plots.dart'; diff --git a/packages/digit_dss/lib/models/entities/chart_data.mapper.dart b/packages/digit_dss/lib/models/entities/chart_data.mapper.dart index 9a69bda16..afb59e1f5 100644 --- a/packages/digit_dss/lib/models/entities/chart_data.mapper.dart +++ b/packages/digit_dss/lib/models/entities/chart_data.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'chart_data.dart'; @@ -110,10 +110,8 @@ mixin DashboardChartDataModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardChartDataModelMapper.ensureInitialized() - .isValueEqual(this as DashboardChartDataModel, other)); + return DashboardChartDataModelMapper.ensureInitialized() + .equalsValue(this as DashboardChartDataModel, other); } @override diff --git a/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart b/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart index 078f5d311..6f79c3cd9 100644 --- a/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart +++ b/packages/digit_dss/lib/models/entities/dashboard_request.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'dashboard_request.dart'; @@ -80,10 +80,8 @@ mixin DashboardRequestModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardRequestModelMapper.ensureInitialized() - .isValueEqual(this as DashboardRequestModel, other)); + return DashboardRequestModelMapper.ensureInitialized() + .equalsValue(this as DashboardRequestModel, other); } @override @@ -242,10 +240,8 @@ mixin AggregationRequestDtoMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - AggregationRequestDtoMapper.ensureInitialized() - .isValueEqual(this as AggregationRequestDto, other)); + return AggregationRequestDtoMapper.ensureInitialized() + .equalsValue(this as AggregationRequestDto, other); } @override @@ -410,10 +406,8 @@ mixin RequestDateMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - RequestDateMapper.ensureInitialized() - .isValueEqual(this as RequestDate, other)); + return RequestDateMapper.ensureInitialized() + .equalsValue(this as RequestDate, other); } @override @@ -529,10 +523,8 @@ mixin DSSHeadersMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DSSHeadersMapper.ensureInitialized() - .isValueEqual(this as DSSHeaders, other)); + return DSSHeadersMapper.ensureInitialized() + .equalsValue(this as DSSHeaders, other); } @override diff --git a/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart b/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart index 3d5f63a52..c116e0b23 100644 --- a/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart +++ b/packages/digit_dss/lib/models/entities/dashboard_response_model.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'dashboard_response_model.dart'; @@ -92,10 +92,8 @@ mixin DashboardResponseSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardResponseSearchModelMapper.ensureInitialized() - .isValueEqual(this as DashboardResponseSearchModel, other)); + return DashboardResponseSearchModelMapper.ensureInitialized() + .equalsValue(this as DashboardResponseSearchModel, other); } @override @@ -268,10 +266,8 @@ mixin DashboardResponseModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardResponseModelMapper.ensureInitialized() - .isValueEqual(this as DashboardResponseModel, other)); + return DashboardResponseModelMapper.ensureInitialized() + .equalsValue(this as DashboardResponseModel, other); } @override diff --git a/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart b/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart index ce46f6324..94fcf02e9 100644 --- a/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart +++ b/packages/digit_dss/lib/models/entities/dss_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'dss_enums.dart'; diff --git a/packages/digit_dss/lib/models/entities/insight.dart b/packages/digit_dss/lib/models/entities/insight.dart index 763711b0d..d87dd17f1 100644 --- a/packages/digit_dss/lib/models/entities/insight.dart +++ b/packages/digit_dss/lib/models/entities/insight.dart @@ -1,6 +1,5 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; -import 'package:digit_data_model/data_model.dart'; part 'insight.mapper.dart'; diff --git a/packages/digit_dss/lib/models/entities/insight.mapper.dart b/packages/digit_dss/lib/models/entities/insight.mapper.dart index a260a0986..83442b816 100644 --- a/packages/digit_dss/lib/models/entities/insight.mapper.dart +++ b/packages/digit_dss/lib/models/entities/insight.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'insight.dart'; @@ -99,10 +99,8 @@ mixin InsightModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - InsightModelMapper.ensureInitialized() - .isValueEqual(this as InsightModel, other)); + return InsightModelMapper.ensureInitialized() + .equalsValue(this as InsightModel, other); } @override diff --git a/packages/digit_dss/lib/models/entities/plots.dart b/packages/digit_dss/lib/models/entities/plots.dart index 526377ef1..3b2fd7248 100644 --- a/packages/digit_dss/lib/models/entities/plots.dart +++ b/packages/digit_dss/lib/models/entities/plots.dart @@ -1,6 +1,5 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; -import 'package:digit_data_model/data_model.dart'; part 'plots.mapper.dart'; diff --git a/packages/digit_dss/lib/models/entities/plots.mapper.dart b/packages/digit_dss/lib/models/entities/plots.mapper.dart index 7369df595..133345c7c 100644 --- a/packages/digit_dss/lib/models/entities/plots.mapper.dart +++ b/packages/digit_dss/lib/models/entities/plots.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'plots.dart'; @@ -107,10 +107,8 @@ mixin DashboardPlotModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - DashboardPlotModelMapper.ensureInitialized() - .isValueEqual(this as DashboardPlotModel, other)); + return DashboardPlotModelMapper.ensureInitialized() + .equalsValue(this as DashboardPlotModel, other); } @override diff --git a/packages/digit_dss/lib/pages/dashboard/dashboard.dart b/packages/digit_dss/lib/pages/dashboard/dashboard.dart index f81d390c2..f838572b1 100644 --- a/packages/digit_dss/lib/pages/dashboard/dashboard.dart +++ b/packages/digit_dss/lib/pages/dashboard/dashboard.dart @@ -1,9 +1,14 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/models/digit_table_model.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_dss/blocs/dashboard.dart'; import 'package:digit_dss/widgets/back_navigation_help_header.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_info_card.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_loader.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_toast.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_table.dart'; +import 'package:digit_ui_components/widgets/powered_by_digit.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -50,7 +55,7 @@ class UserDashboardPageState extends LocalizedState { setState(() { isLoading = true; }); - Loaders.showLoadingDialog(context); + DigitLoaders.overlayLoader(context: context); } }, fetched: ( @@ -61,12 +66,12 @@ class UserDashboardPageState extends LocalizedState { ) { Navigator.of(context, rootNavigator: true).pop(); if (isNetworkError == true) { - DigitToast.show(context, - options: DigitToastOptions( + Toast.showToast( + context, + message: localizations.translate(i18.dashboard.someErrorOccured), - true, - DigitTheme.instance.mobileTheme, - )); + type: ToastType.error, + ); } setState(() { @@ -78,11 +83,11 @@ class UserDashboardPageState extends LocalizedState { setState(() { isLoading = false; }); - DigitToast.show(context, - options: DigitToastOptions( - localizations.translate(i18.dashboard.someErrorOccured), - true, - DigitTheme.instance.mobileTheme)); + Toast.showToast( + context, + message: localizations.translate(i18.dashboard.someErrorOccured), + type: ToastType.error, + ); }); }, builder: (context, dashboardState) { return RefreshIndicator( @@ -92,21 +97,7 @@ class UserDashboardPageState extends LocalizedState { fetched: (metricData, tableData, selectedDate, isNetworkError) async { bool isConnected = await getIsConnected(); - if (isConnected) { - context.read().add(DashboardRefreshEvent( - projectId: DashboardSingleton().projectId, - syncFromServer: true, - selectedDate: selectedDate ?? DateTime.now(), - )); - } else { - DigitToast.show(context, - options: DigitToastOptions( - localizations - .translate(i18.dashboard.networkFailureError), - true, - DigitTheme.instance.mobileTheme, - )); - } + fetchData(isConnected, selectedDate); }); return Future.delayed(const Duration(seconds: 1)); @@ -141,35 +132,29 @@ class UserDashboardPageState extends LocalizedState { ), ...(tableData ?? []) .map((table) => Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer1), child: DigitTable( - headerList: table.headerList.map((header) { - return TableHeader( - localizations.translate(header.label), - cellKey: header.cellKey, - ); - }).toList(), - tableData: table.tableData, - height: ((table.tableData.length) + 1) * 65, - columnWidth: - MediaQuery.of(context).size.width / 2, - columnRowFixedHeight: 65, - scrollPhysics: (table.tableData.length ?? - 0) > - 5 + scrollPhysics: (table.tableData.length) > 5 ? const ClampingScrollPhysics() : const NeverScrollableScrollPhysics(), + rows: table.tableData, + columns: table.headerList, + tableHeight: + MediaQuery.of(context).size.height * .3, + showSelectedState: false, + showPagination: false, ), )) .toList(), if ((tableData ?? []).isNotEmpty) Align( alignment: Alignment.center, - child: DigitInfoCard( + child: InfoCard( title: localizations .translate(i18.dashboard.noteHeader), description: localizations .translate(i18.dashboard.noteDescription), + type: InfoType.info, ), ) ], @@ -181,4 +166,20 @@ class UserDashboardPageState extends LocalizedState { ); }); } + + void fetchData(bool isConnected, DateTime? selectedDate) { + if (isConnected) { + context.read().add(DashboardRefreshEvent( + projectId: DashboardSingleton().projectId, + syncFromServer: true, + selectedDate: selectedDate ?? DateTime.now(), + )); + } else { + Toast.showToast( + context, + message: localizations.translate(i18.dashboard.networkFailureError), + type: ToastType.error, + ); + } + } } diff --git a/packages/digit_dss/lib/router/dashboard_router.dart b/packages/digit_dss/lib/router/dashboard_router.dart index f20ca702e..e9db233f5 100644 --- a/packages/digit_dss/lib/router/dashboard_router.dart +++ b/packages/digit_dss/lib/router/dashboard_router.dart @@ -4,10 +4,8 @@ import 'dashboard_router.gm.dart'; @AutoRouterConfig.module() class DashboardRoute extends $DashboardRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: UserDashboardRoute.page, diff --git a/packages/digit_dss/lib/utils/utils.dart b/packages/digit_dss/lib/utils/utils.dart index 08334cf1d..00c407f6d 100644 --- a/packages/digit_dss/lib/utils/utils.dart +++ b/packages/digit_dss/lib/utils/utils.dart @@ -1,11 +1,12 @@ import 'dart:io'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_dss/blocs/app_localization.dart'; import 'package:digit_dss/data/local_store/no_sql/schema/dashboard_config_schema.dart'; import 'package:digit_dss/data/remote/dashboard.dart'; import 'package:digit_dss/models/entities/dashboard_request.dart'; +import 'package:digit_ui_components/theme/digit_theme.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; import 'package:isar/isar.dart'; @@ -43,7 +44,7 @@ Widget buildMetric( width: MediaQuery.of(context).size.width / 3.6, child: Divider( indent: 0, - height: kPadding, + height: spacer1, endIndent: 0, thickness: 2, color: DigitTheme.instance.mobileTheme.colorScheme.outline, diff --git a/packages/digit_dss/lib/widgets/back_navigation_help_header.dart b/packages/digit_dss/lib/widgets/back_navigation_help_header.dart index c374ca8bb..124e10f5c 100644 --- a/packages/digit_dss/lib/widgets/back_navigation_help_header.dart +++ b/packages/digit_dss/lib/widgets/back_navigation_help_header.dart @@ -1,6 +1,6 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_dss/blocs/app_localization.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -26,7 +26,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: const EdgeInsets.all(spacer1 / 2), child: Row( children: [ Expanded( @@ -36,7 +36,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorScheme.primary, padding: EdgeInsets.zero, ), onPressed: () { @@ -55,7 +55,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { ], ), ), - SizedBox(width: showHelp ? kPadding * 2 : 0), + SizedBox(width: showHelp ? spacer2 : 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart b/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart index ab9ae35be..9575ea32d 100644 --- a/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart +++ b/packages/digit_dss/lib/widgets/dashboard/dashboard_metric_card.dart @@ -1,8 +1,8 @@ import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/utils/date_utils.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_dss/widgets/localized.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -34,158 +34,154 @@ class _DashboardMetricCardState extends LocalizedState { return BlocBuilder( builder: (context, dashboardState) { - return DigitCard( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: const EdgeInsets.symmetric( - horizontal: kPadding * 2, - vertical: kPadding * 2, - ), - child: Text( - localizations.translate( - i18.dashboard.dashboardLabel, - ), - style: theme.textTheme.displayMedium, + return DigitCard(children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: spacer2, + vertical: spacer2, + ), + child: Text( + localizations.translate( + i18.dashboard.dashboardLabel, ), + style: theme.textTheme.displayMedium, ), - Expanded( - child: InkWell( - onTap: () async { - bool isConnected = await getIsConnected(); - if (isConnected) { - DateTime? pickedDate = await showDatePicker( - context: context, - initialDate: DateTime.now(), - firstDate: DateTime(1900), - lastDate: DateTime.now(), - ); - - if (pickedDate != null && pickedDate != DateTime.now()) { - final dashboardBloc = context.read(); - dashboardBloc.add(DashboardRefreshEvent( - selectedDate: pickedDate.toLocal(), - projectId: DashboardSingleton().projectId, - syncFromServer: true, - )); - } - } else { - DigitToast.show(context, - options: DigitToastOptions( - localizations - .translate(i18.dashboard.networkFailureError), - true, - DigitTheme.instance.mobileTheme)); - } - }, - child: Container( - alignment: Alignment.centerRight, - padding: const EdgeInsets.only(bottom: 12), - child: Wrap( - crossAxisAlignment: WrapCrossAlignment.center, - children: [ - Text( - dashboardState.maybeWhen( - orElse: () => '', - fetched: (metricData, tableData, selectedDate, - isNetworkError) => - '${DigitDateUtils.getMonth(selectedDate?.toLocal() ?? DateTime.now())} - ${(selectedDate?.toLocal() ?? DateTime.now()).day}, ${(selectedDate?.toLocal() ?? DateTime.now()).year}'), - style: theme.textTheme.bodyMedium - ?.apply(color: theme.colorScheme.secondary), + ), + Expanded( + child: InkWell( + onTap: () async { + bool isConnected = await getIsConnected(); + fetchChartData(isConnected); + }, + child: Container( + alignment: Alignment.centerRight, + padding: const EdgeInsets.only(bottom: 12), + child: Wrap( + crossAxisAlignment: WrapCrossAlignment.center, + children: [ + Text( + dashboardState.maybeWhen( + orElse: () => '', + fetched: (metricData, tableData, selectedDate, + isNetworkError) => + '${DigitDateUtils.getMonth(selectedDate?.toLocal() ?? DateTime.now())} - ${(selectedDate?.toLocal() ?? DateTime.now()).day}, ${(selectedDate?.toLocal() ?? DateTime.now()).year}'), + style: theme.textTheme.bodyMedium + ?.apply(color: theme.colorScheme.secondary), + ), + const Padding( + padding: EdgeInsets.only(right: 3.0), + child: Visibility( + child: Icon(Icons.arrow_drop_down), ), - const Padding( - padding: EdgeInsets.only(right: 3.0), - child: Visibility( - child: Icon(Icons.arrow_drop_down), - ), - ) - ]), - ), + ) + ]), ), - ) - ], - ), - Padding( - padding: const EdgeInsets.only(top: kPadding, bottom: kPadding), - child: Wrap( - spacing: 2.0, // Space between items - runSpacing: 2.0, // Space between lines - alignment: WrapAlignment.start, - children: [ - ...dashboardState.maybeWhen( - orElse: () => [], - fetched: - (metricData, tableData, selectedDate, isNetworkError) { - return metricData != null - ? metricData.entries - .where((m) => m.value.isHorizontal == true) - .mapIndexed(( - i, - entry, - ) { - return SizedBox( - height: MediaQuery.of(context).size.width / 3.8, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - buildMetric( - context, - entry.key, - entry.value.value, - i, - localizations, - ), - if (entry.key != - metricData.entries.last.key) - VerticalDivider( - width: kPadding, - color: DigitTheme.instance.mobileTheme - .colorScheme.outline, - thickness: 2, - ), - ], - ), - ); - }).toList() - : []; - }), - ...dashboardState.maybeWhen( - orElse: () => [], - fetched: - (metricData, tableData, selectedDate, isNetworkError) { - return metricData != null - ? metricData.entries - .where((m) => m.value.isHorizontal == false) - .mapIndexed(( - i, - entry, - ) { - return Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: kPadding), - child: Text( - '${entry.value.value} ${localizations.translate(entry.value.header)}', - textAlign: TextAlign.start, - style: DigitTheme.instance.mobileTheme - .textTheme.bodyMedium, + ), + ) + ], + ), + Padding( + padding: const EdgeInsets.only(top: spacer1, bottom: spacer1), + child: Wrap( + spacing: 2.0, // Space between items + runSpacing: 2.0, // Space between lines + alignment: WrapAlignment.start, + children: [ + ...dashboardState.maybeWhen( + orElse: () => [], + fetched: + (metricData, tableData, selectedDate, isNetworkError) { + return metricData != null + ? metricData.entries + .where((m) => m.value.isHorizontal == true) + .mapIndexed(( + i, + entry, + ) { + return SizedBox( + height: MediaQuery.of(context).size.width / 3.8, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + buildMetric( + context, + entry.key, + entry.value.value, + i, + localizations, ), + if (entry.key != metricData.entries.last.key) + VerticalDivider( + width: spacer1, + color: DigitTheme.instance.mobileTheme + .colorScheme.outline, + thickness: 2, + ), + ], + ), + ); + }).toList() + : []; + }), + ...dashboardState.maybeWhen( + orElse: () => [], + fetched: + (metricData, tableData, selectedDate, isNetworkError) { + return metricData != null + ? metricData.entries + .where((m) => m.value.isHorizontal == false) + .mapIndexed(( + i, + entry, + ) { + return Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: spacer1), + child: Text( + '${entry.value.value} ${localizations.translate(entry.value.header)}', + textAlign: TextAlign.start, + style: DigitTheme.instance.mobileTheme + .textTheme.bodyMedium, ), - ); - }).toList() - : []; - }), - ], - ), + ), + ); + }).toList() + : []; + }), + ], ), - ], - )); + ), + ]); }); } + + void fetchChartData(bool isConnected) async { + if (isConnected) { + DateTime? pickedDate = await showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime(1900), + lastDate: DateTime.now(), + ); + + if (pickedDate != null && pickedDate != DateTime.now() && mounted) { + final dashboardBloc = context.read(); + dashboardBloc.add(DashboardRefreshEvent( + selectedDate: pickedDate.toLocal(), + projectId: DashboardSingleton().projectId, + syncFromServer: true, + )); + } + } else { + Toast.showToast(context, + message: localizations.translate(i18.dashboard.networkFailureError), + type: ToastType.error); + } + } } diff --git a/packages/digit_dss/lib/widgets/no_result_card.dart b/packages/digit_dss/lib/widgets/no_result_card.dart index f63d1eb56..7c31a4071 100644 --- a/packages/digit_dss/lib/widgets/no_result_card.dart +++ b/packages/digit_dss/lib/widgets/no_result_card.dart @@ -1,5 +1,5 @@ import 'package:attendance_management/utils/constants.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -20,7 +20,7 @@ class NoResultCard extends StatelessWidget { return Align( alignment: align, child: Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer1), child: Column( children: [ SvgPicture.asset(noResultSvg), diff --git a/packages/digit_dss/pubspec.lock b/packages/digit_dss/pubspec.lock index cedd55147..70d370a71 100644 --- a/packages/digit_dss/pubspec.lock +++ b/packages/digit_dss/pubspec.lock @@ -9,6 +9,14 @@ packages: url: "https://pub.dev" source: hosted version: "61.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" + url: "https://pub.dev" + source: hosted + version: "1.3.35" analyzer: dependency: transitive description: @@ -60,27 +68,26 @@ packages: attendance_management: dependency: "direct main" description: - name: attendance_management - sha256: f1b4373e8d0d9f8227ede0d25d4141f0d16d18ac2525c0347b844098cdab080f - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" + path: "../attendance_management" + relative: true + source: path + version: "1.0.3" auto_route: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -141,10 +148,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -169,6 +176,46 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.2" + camera: + dependency: transitive + description: + name: camera + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" + url: "https://pub.dev" + source: hosted + version: "0.11.0+2" + camera_android_camerax: + dependency: transitive + description: + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" + url: "https://pub.dev" + source: hosted + version: "0.6.8+2" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + url: "https://pub.dev" + source: hosted + version: "0.9.17+5" + camera_platform_interface: + dependency: transitive + description: + name: camera_platform_interface + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + url: "https://pub.dev" + source: hosted + version: "2.8.0" + camera_web: + dependency: transitive + description: + name: camera_web + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" + url: "https://pub.dev" + source: hosted + version: "0.3.5" characters: dependency: transitive description: @@ -225,22 +272,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0" - url: "https://pub.dev" - source: hosted - version: "5.0.2" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a - url: "https://pub.dev" - source: hosted - version: "1.2.4" convert: dependency: transitive description: @@ -257,6 +288,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" crypto: dependency: transitive description: @@ -265,14 +304,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" - cupertino_icons: + csslib: dependency: transitive description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.0.2" dart_mappable: dependency: "direct main" description: @@ -287,7 +326,7 @@ packages: path: "../dart_mappable_builder" relative: true source: path - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -312,14 +351,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - dbus: - dependency: transitive - description: - name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" - url: "https://pub.dev" - source: hosted - version: "0.7.10" diff_match_patch: dependency: transitive description: @@ -328,21 +359,28 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: "direct main" - description: - name: digit_components - sha256: "9cca4d9a546037080afe02b6ade82fdf01574e11f5656ad12120fd6966578616" - url: "https://pub.dev" - source: hosted - version: "1.0.1+1" digit_data_model: dependency: "direct main" description: path: "../digit_data_model" relative: true source: path - version: "1.0.4" + version: "1.0.5" + digit_firebase_services: + dependency: "direct overridden" + description: + path: "../digit_firebase_services" + relative: true + source: path + version: "0.0.1" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" dio: dependency: "direct main" description: @@ -359,14 +397,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" drift: dependency: transitive description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: transitive description: @@ -379,18 +425,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -415,83 +453,131 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: "2ca051989f69d1b2ca012b2cf3ccf78c70d40144f0861ff2c063493f7c8c3d45" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.0.5" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.6" - flutter_focus_watcher: + version: "0.9.3+2" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+3" + firebase_core: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: firebase_core + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "2.32.0" + firebase_core_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: firebase_core_platform_interface + sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "5.3.1" + firebase_core_web: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: firebase_core_web + sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.17.5" + firebase_crashlytics: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: firebase_crashlytics + sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.5.7" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" + url: "https://pub.dev" + source: hosted + version: "3.6.35" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: + dependency: transitive + description: + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + flutter_dropzone_platform_interface: + dependency: transitive + description: + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + flutter_dropzone_web: + dependency: transitive + description: + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 + url: "https://pub.dev" + source: hosted + version: "3.0.13" flutter_lints: dependency: "direct dev" description: @@ -500,6 +586,19 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" + url: "https://pub.dev" + source: hosted + version: "2.0.22" flutter_spinkit: dependency: transitive description: @@ -508,27 +607,27 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.16" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -566,6 +665,54 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -578,10 +725,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "6.2.1" graphs: dependency: transitive description: @@ -598,14 +745,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -622,14 +777,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -686,6 +905,30 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -698,26 +941,26 @@ packages: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -730,34 +973,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -782,14 +1025,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.dev" - source: hosted - version: "0.5.0" node_preamble: dependency: transitive description: @@ -818,26 +1053,34 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" + source: hosted + version: "1.0.1" path_parsing: dependency: transitive description: @@ -918,14 +1161,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -958,22 +1193,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: transitive description: @@ -982,14 +1209,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" shelf: dependency: transitive description: @@ -1067,6 +1286,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1087,10 +1314,10 @@ packages: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1135,26 +1362,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" time: dependency: transitive description: @@ -1187,38 +1414,118 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.15" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.16" vector_math: dependency: transitive description: @@ -1227,14 +1534,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1247,10 +1562,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1308,5 +1623,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/digit_dss/pubspec.yaml b/packages/digit_dss/pubspec.yaml index 7a3ce4180..8b0865af8 100644 --- a/packages/digit_dss/pubspec.yaml +++ b/packages/digit_dss/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_dss description: "DSS Dashboard for campaign management" -version: 1.0.2 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/develop/packages/digit_dss repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,22 +11,22 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.1+1 - flutter_bloc: ^8.1.1 - reactive_forms: ^14.1.0 - intl: ^0.18.0 - freezed_annotation: ^2.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + freezed_annotation: ^2.4.1 flutter_svg: ^2.0.8 dart_mappable: ^4.2.0 - auto_route: ^7.8.4 - digit_data_model: ^1.0.3+1 - package_info_plus: ^5.0.1 - collection: ^1.16.0 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + package_info_plus: ^8.0.0 + collection: ^1.18.0 async: ^2.11.0 - dio: ^5.4.2+1 - isar: ^3.0.5 - isar_flutter_libs: ^3.0.5 - attendance_management: ^1.0.2+1 + dio: ^5.4.3+1 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 + attendance_management: ^1.0.3 dev_dependencies: flutter_test: @@ -35,16 +35,16 @@ dev_dependencies: freezed: ^2.1.0+1 json_serializable: ^6.4.0 drift_dev: ^2.14.1 - build_runner: ^2.4.7 + build_runner: ^2.4.11 bloc_test: ^9.1.0 mocktail: ^1.0.2 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 - isar_generator: ^3.0.5 + auto_route_generator: ^8.0.0 + isar_generator: ^3.1.0+1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/digit_firebase_services/pubspec.lock b/packages/digit_firebase_services/pubspec.lock index bf1e0562e..7b890a488 100644 --- a/packages/digit_firebase_services/pubspec.lock +++ b/packages/digit_firebase_services/pubspec.lock @@ -1,14 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" _flutterfire_internals: dependency: transitive description: @@ -17,30 +9,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.25" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - ansicolor: - dependency: transitive - description: - name: ansicolor - sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" - url: "https://pub.dev" - source: hosted - version: "2.0.3" - args: - dependency: transitive - description: - name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" - url: "https://pub.dev" - source: hosted - version: "2.5.0" async: dependency: transitive description: @@ -49,14 +17,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" - bloc: - dependency: transitive - description: - name: bloc - sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" - url: "https://pub.dev" - source: hosted - version: "8.1.4" boolean_selector: dependency: transitive description: @@ -65,14 +25,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" characters: dependency: transitive description: @@ -97,92 +49,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - dart_mappable: - dependency: transitive - description: - name: dart_mappable - sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382 - url: "https://pub.dev" - source: hosted - version: "4.3.0" - dart_mappable_builder: - dependency: "direct overridden" - description: - path: "../dart_mappable_builder" - relative: true - source: path - version: "4.2.0" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" - url: "https://pub.dev" - source: hosted - version: "2.3.6" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - digit_data_model: - dependency: "direct overridden" - description: - path: "../digit_data_model" - relative: true - source: path - version: "1.0.4" - dio: - dependency: transitive - description: - name: dio - sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" - url: "https://pub.dev" - source: hosted - version: "5.7.0" - dio_web_adapter: - dependency: transitive - description: - name: dio_web_adapter - sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - drift: - dependency: transitive - description: - name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: transitive - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" fake_async: dependency: transitive description: @@ -191,22 +57,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" firebase_core: dependency: "direct main" description: @@ -219,10 +69,10 @@ packages: dependency: transitive description: name: firebase_core_platform_interface - sha256: e30da58198a6d4b49d5bce4e852f985c32cb10db329ebef9473db2b9f09ce810 + sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 url: "https://pub.dev" source: hosted - version: "5.3.0" + version: "5.0.0" firebase_core_web: dependency: transitive description: @@ -252,14 +102,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_bloc: - dependency: transitive - description: - name: flutter_bloc - sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a - url: "https://pub.dev" - source: hosted - version: "8.1.6" flutter_lints: dependency: "direct dev" description: @@ -278,62 +120,38 @@ packages: description: flutter source: sdk version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 - url: "https://pub.dev" - source: hosted - version: "2.4.4" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - isar: + js: dependency: transitive description: - name: isar - sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "3.1.0+1" - isar_flutter_libs: + version: "0.6.7" + leak_tracker: dependency: transitive description: - name: isar_flutter_libs - sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "3.1.0+1" - js: + version: "10.0.4" + leak_tracker_flutter_testing: dependency: transitive description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "0.6.7" - json_annotation: + version: "3.0.3" + leak_tracker_testing: dependency: transitive description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "4.9.0" + version: "3.0.1" lints: dependency: transitive description: @@ -342,126 +160,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" - source: hosted - version: "1.10.0" - mocktail: - dependency: transitive - description: - name: mocktail - sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.0.4" - nested: - dependency: transitive - description: - name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" + version: "1.12.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - path_provider: - dependency: transitive - description: - name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 - url: "https://pub.dev" - source: hosted - version: "2.1.4" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d - url: "https://pub.dev" - source: hosted - version: "2.2.4" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - platform: - dependency: transitive - description: - name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "3.1.6" + version: "1.9.0" plugin_platform_interface: dependency: transitive description: @@ -470,43 +200,11 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - provider: - dependency: transitive - description: - name: provider - sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c - url: "https://pub.dev" - source: hosted - version: "6.1.2" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - recase: - dependency: transitive - description: - name: recase - sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 - url: "https://pub.dev" - source: hosted - version: "4.1.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" source_span: dependency: transitive description: @@ -515,22 +213,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - sqlite3: - dependency: transitive - description: - name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - sqlite3_flutter_libs: - dependency: transitive - description: - name: sqlite3_flutter_libs - sha256: "7ae52b23366e5295005022e62fa093f64bfe190810223ea0ebf733a4cd140bce" - url: "https://pub.dev" - source: hosted - version: "0.5.26" stack_trace: dependency: transitive description: @@ -567,34 +249,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - type_plus: - dependency: transitive - description: - name: type_plus - sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 - url: "https://pub.dev" - source: hosted - version: "2.1.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "1.3.2" - uuid: - dependency: transitive - description: - name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" - url: "https://pub.dev" - source: hosted - version: "3.0.7" + version: "0.7.0" vector_math: dependency: transitive description: @@ -603,14 +261,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - watcher: + vm_service: dependency: transitive description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "14.2.1" web: dependency: transitive description: @@ -619,22 +277,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.dev" - source: hosted - version: "1.0.4" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/digit_location_tracker/CHANGELOG.md b/packages/digit_location_tracker/CHANGELOG.md index e0452a61f..8bf1ddd8f 100644 --- a/packages/digit_location_tracker/CHANGELOG.md +++ b/packages/digit_location_tracker/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.0.0 + +* Updated to latest package versions +* Updated flutter version to 3.22 + +## 0.0.1-dev.2 + +* Modified Regex for handling negative latitude, longitude and added new accuracy field +* Added new accuracy field to fetch precise location + ## 0.0.1-dev.1 * Init release of digit_location_tracker diff --git a/packages/digit_location_tracker/README.md b/packages/digit_location_tracker/README.md index be133cdd4..0b6fb25b3 100644 --- a/packages/digit_location_tracker/README.md +++ b/packages/digit_location_tracker/README.md @@ -34,6 +34,8 @@ triggerLocationTracker( now.add(const Duration(hours: 8)).millisecondsSinceEpoch, ); -## Additional information +## Additional Required information -Create location service file in your android folder and replace main activity similar to this https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/MainActivity.kt and https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt +Create location service file in your android folder and replace main activity similar to this +1. https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/MainActivity.kt +2. https://github.com/egovernments/health-campaign-field-worker-app/blob/location_tracker/apps/health_campaign_field_worker_app/android/app/src/main/kotlin/com/digit/hcm/location_service.kt diff --git a/packages/digit_location_tracker/lib/utils/utils.dart b/packages/digit_location_tracker/lib/utils/utils.dart index 8fc217297..dcc22740e 100644 --- a/packages/digit_location_tracker/lib/utils/utils.dart +++ b/packages/digit_location_tracker/lib/utils/utils.dart @@ -30,19 +30,20 @@ Future> parseLocationData(List logs) async { for (var log in logs) { final pattern = RegExp( - r'Latitude:\s*(\d+\.\d+),\s*Longitude:\s*(\d+\.\d+),\s*isSync:\s*(\w+),\s*timestamp:\s*(\d+)'); + r'Latitude:\s*(-?\d+\.\d+),\s*Longitude:\s*(-?\d+\.\d+),\s*Accuracy:\s*(\d+\.\d+),\s*isSync:\s*(\w+),\s*timestamp:\s*(\d+)'); final match = pattern.firstMatch(log); if (match != null) { final latitude = double.parse(match.group(1)!); final longitude = double.parse(match.group(2)!); - final isSync = match.group(3)!.toLowerCase() == 'true'; - final timestamp = int.parse(match.group(4)!); + final accuracy = double.parse(match.group(3)!); + final isSync = match.group(4)!.toLowerCase() == 'true'; + final timestamp = int.parse(match.group(5)!); locationDataList.add(UserActionModel( latitude: latitude, longitude: longitude, - locationAccuracy: 1.3, + locationAccuracy: accuracy, tenantId: LocationTrackerSingleton().tenantId, clientReferenceId: IdGen.instance.identifier, isSync: isSync, diff --git a/packages/digit_location_tracker/pubspec.lock b/packages/digit_location_tracker/pubspec.lock index ddd73fe05..d425cd382 100644 --- a/packages/digit_location_tracker/pubspec.lock +++ b/packages/digit_location_tracker/pubspec.lock @@ -5,18 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" + url: "https://pub.dev" + source: hosted + version: "1.3.35" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" ansicolor: dependency: transitive description: @@ -29,10 +37,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -119,7 +127,7 @@ packages: path: "../dart_mappable_builder" relative: true source: path - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -128,21 +136,20 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.6" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" digit_data_model: dependency: "direct main" description: path: "../digit_data_model" relative: true source: path - version: "1.0.4" + version: "1.0.5" + digit_firebase_services: + dependency: "direct overridden" + description: + path: "../digit_firebase_services" + relative: true + source: path + version: "0.0.1" dio: dependency: transitive description: @@ -163,18 +170,10 @@ packages: dependency: transitive description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: transitive - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + sha256: "4e0ffee40d23f0b809e6cff1ad202886f51d629649073ed42d9cd1d194ea943e" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.19.1+1" fake_async: dependency: transitive description: @@ -199,6 +198,54 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" + firebase_core: + dependency: transitive + description: + name: firebase_core + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" + url: "https://pub.dev" + source: hosted + version: "2.32.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6 + url: "https://pub.dev" + source: hosted + version: "5.3.1" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88" + url: "https://pub.dev" + source: hosted + version: "2.17.5" + firebase_crashlytics: + dependency: transitive + description: + name: firebase_crashlytics + sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" + url: "https://pub.dev" + source: hosted + version: "3.5.7" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" + url: "https://pub.dev" + source: hosted + version: "3.6.35" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -318,6 +365,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -330,58 +401,58 @@ packages: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: "direct main" description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mocktail: dependency: transitive description: @@ -402,18 +473,18 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -538,10 +609,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" recase: dependency: transitive description: @@ -571,14 +642,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" sqlite3_flutter_libs: dependency: transitive description: @@ -623,10 +702,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" type_plus: dependency: transitive description: @@ -647,10 +726,10 @@ packages: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_math: dependency: transitive description: @@ -659,6 +738,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" watcher: dependency: transitive description: @@ -671,10 +758,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" xdg_directories: dependency: transitive description: @@ -692,5 +779,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/digit_location_tracker/pubspec.yaml b/packages/digit_location_tracker/pubspec.yaml index 034dbddde..d60b93dfe 100644 --- a/packages/digit_location_tracker/pubspec.yaml +++ b/packages/digit_location_tracker/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_location_tracker description: "A comprehensive package to enable location_tracking in the application" -version: 0.0.1-dev.1 +version: 1.0.0 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_location_tracker repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -13,30 +13,30 @@ dependencies: sdk: flutter flutter_background_service: ^5.0.10 flutter_bloc: ^8.1.1 - freezed_annotation: ^2.2.0 - location: ^5.0.0 - location_platform_interface: ^3.0.0 + freezed_annotation: ^2.2.0 + location: ^6.0.2 + location_platform_interface: ^4.0.0 permission_handler: ^11.3.1 path_provider: ^2.0.11 isar: ^3.0.5 - digit_data_model: ^1.0.4 + digit_data_model: ^1.0.5 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: - -# plugin: -# platforms: -# android: -# package: com.digit.location_tracker -# pluginClass: LocationTrackerPlugin + + # 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: + + # plugin: + # platforms: + # android: + # package: com.digit.location_tracker + # pluginClass: LocationTrackerPlugin # To add assets to your package, add an assets section, like this: # assets: diff --git a/packages/digit_scanner/CHANGELOG.md b/packages/digit_scanner/CHANGELOG.md index be2b5caae..b627973c4 100644 --- a/packages/digit_scanner/CHANGELOG.md +++ b/packages/digit_scanner/CHANGELOG.md @@ -1,10 +1,19 @@ +## 1.0.4 + +* Updated to latest package versions +* Updated flutter version to 3.22 +* Migrated to digit_ui_components + ## 1.0.3+1 + * Updated Digit_Components ## 1.0.3 + * Manual code entry fixes with stable version ## 1.0.3-dev.1 + * Fix for manual entry result not reflecting ## 1.0.2 diff --git a/packages/digit_scanner/example/lib/main.dart b/packages/digit_scanner/example/lib/main.dart index 7fba5e7f3..c9d0c59ab 100644 --- a/packages/digit_scanner/example/lib/main.dart +++ b/packages/digit_scanner/example/lib/main.dart @@ -58,7 +58,6 @@ class MyHomePage extends StatefulWidget { } class _MyHomePageState extends State { - int _counter = 0; DigitScannerBloc scannerBloc = DigitScannerBloc(const DigitScannerState()); diff --git a/packages/digit_scanner/example/pubspec.lock b/packages/digit_scanner/example/pubspec.lock index 75da90ebe..68f0a788d 100644 --- a/packages/digit_scanner/example/pubspec.lock +++ b/packages/digit_scanner/example/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.1.4" bloc: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -157,18 +157,18 @@ packages: dependency: transitive description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -189,42 +189,42 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+3" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 url: "https://pub.dev" source: hosted - version: "2.7.4" + version: "2.8.0" camera_web: dependency: transitive description: name: camera_web - sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.4" characters: dependency: transitive description: @@ -233,6 +233,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -277,18 +285,26 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -305,29 +321,29 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.6" - digit_components: - dependency: transitive - description: - name: digit_components - sha256: "9cca4d9a546037080afe02b6ade82fdf01574e11f5656ad12120fd6966578616" - url: "https://pub.dev" - source: hosted - version: "1.0.1+1" digit_scanner: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.0.3+1" - easy_stepper: + version: "1.0.4" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" + url: "https://pub.dev" + source: hosted + version: "0.0.2-dev.4" + dotted_border: dependency: transitive description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.1.0" fake_async: dependency: transitive description: @@ -340,10 +356,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -352,99 +368,112 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.1.4" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.5" - flutter_focus_watcher: + version: "0.9.3+2" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+3" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.2.0" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.22" flutter_spinkit: dependency: transitive description: @@ -453,6 +482,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: transitive description: @@ -466,14 +503,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -483,18 +512,18 @@ packages: dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed_annotation: dependency: transitive description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: @@ -503,6 +532,54 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -515,42 +592,42 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" gs1_barcode_parser: dependency: transitive description: name: gs1_barcode_parser - sha256: "9aaff47bdab7177deaf9248cc861ef41cf611d3f828498cb40b64bedcbf53391" + sha256: ff171bc40038de3f7178fbc32eaf9eebc3d35a3c4c00bb0281fe4a976d853a42 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.1.0" horizontal_data_table: dependency: transitive description: @@ -559,14 +636,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -583,14 +668,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -615,38 +764,62 @@ packages: url: "https://pub.dev" source: hosted version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -659,42 +832,42 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" nested: dependency: transitive description: @@ -719,30 +892,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + path: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "2.0.1" - path: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -755,26 +920,26 @@ packages: dependency: transitive description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -795,10 +960,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" petitparser: dependency: transitive description: @@ -811,10 +976,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -823,14 +988,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -859,34 +1016,18 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" + version: "1.3.0" reactive_forms: dependency: transitive description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" + version: "17.0.1" shelf: dependency: transitive description: @@ -899,10 +1040,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -976,10 +1117,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" timing: dependency: transitive description: @@ -996,14 +1137,94 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" + sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.5.0" vector_graphics: dependency: transitive description: @@ -1036,6 +1257,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" watcher: dependency: transitive description: @@ -1048,26 +1285,34 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.1" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -1093,5 +1338,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_scanner/example/pubspec.yaml b/packages/digit_scanner/example/pubspec.yaml index a61d03b65..da03c7944 100644 --- a/packages/digit_scanner/example/pubspec.yaml +++ b/packages/digit_scanner/example/pubspec.yaml @@ -37,7 +37,8 @@ dependencies: cupertino_icons: ^1.0.2 flutter_bloc: ^8.1.1 digit_scanner: - path: ../ + path: ../../digit_scanner + digit_ui_components: ^0.0.2-dev.4 dev_dependencies: flutter_test: @@ -48,7 +49,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/digit_scanner/lib/pages/qr_scanner.dart b/packages/digit_scanner/lib/pages/qr_scanner.dart index c4e4b037e..a248139df 100644 --- a/packages/digit_scanner/lib/pages/qr_scanner.dart +++ b/packages/digit_scanner/lib/pages/qr_scanner.dart @@ -3,10 +3,12 @@ import 'dart:io'; import 'package:audioplayers/audioplayers.dart'; import 'package:auto_route/auto_route.dart'; import 'package:camera/camera.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_scanner/utils/scanner_utils.dart'; import 'package:digit_scanner/widgets/localized.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:google_mlkit_barcode_scanning/google_mlkit_barcode_scanning.dart'; @@ -96,8 +98,8 @@ class _DigitScannerPageState extends LocalizedState { ), ), Positioned( - top: kPadding * 1.5, - left: kPadding, + top: spacer1 * 1.5, + left: spacer1, child: SizedBox( child: InkWell( onTap: () async { @@ -165,7 +167,7 @@ class _DigitScannerPageState extends LocalizedState { mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( - padding: const EdgeInsets.only(top: kPadding), + padding: const EdgeInsets.only(top: spacer1), child: Text( localizations.translate( i18.scanner.manualScan, @@ -190,7 +192,7 @@ class _DigitScannerPageState extends LocalizedState { }, child: Padding( padding: - const EdgeInsets.only(top: kPadding), + const EdgeInsets.only(top: spacer1), child: Text( localizations.translate( i18.scanner.enterManualCode, @@ -212,37 +214,43 @@ class _DigitScannerPageState extends LocalizedState { bottom: 0, width: MediaQuery.of(context).size.width, child: DigitCard( - margin: const EdgeInsets.only(top: kPadding), + margin: const EdgeInsets.only(top: spacer1), padding: const EdgeInsets.fromLTRB( - kPadding, 0, kPadding, 0), - child: DigitElevatedButton( - child: Text(localizations - .translate(i18.common.coreCommonSubmit)), - onPressed: () async { - if (widget.isGS1code && - result.length < widget.quantity) { - DigitScannerUtils().buildDialog( - context, - localizations, - widget.quantity, - ); - } else { - final bloc = context.read(); - bloc.add(DigitScannerEvent.handleScanner( - barCode: state.barCodes, - qrCode: state.qrCodes, - )); - Navigator.of( - context, - ).pop(); - } - }, - ), + spacer3, spacer1, spacer3, spacer1), + children: [ + DigitButton( + label: localizations + .translate(i18.common.coreCommonSubmit), + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + type: DigitButtonType.primary, + onPressed: () async { + if (widget.isGS1code && + result.length < widget.quantity) { + DigitScannerUtils().buildDialog( + context, + localizations, + widget.quantity, + ); + } else { + final bloc = + context.read(); + bloc.add(DigitScannerEvent.handleScanner( + barCode: state.barCodes, + qrCode: state.qrCodes, + )); + Navigator.of( + context, + ).pop(); + } + }, + ), + ], ), ), Positioned( - bottom: (kPadding * 7.5), + bottom: (spacer1 * 10), height: widget.isGS1code ? state.barCodes.length < 3 ? (state.barCodes.length * 60) + 80 @@ -257,8 +265,8 @@ class _DigitScannerPageState extends LocalizedState { decoration: BoxDecoration( color: theme.colorScheme.onError, borderRadius: const BorderRadius.only( - topLeft: Radius.circular(kPadding + 4), - topRight: Radius.circular(kPadding + 4), + topLeft: Radius.circular(spacer1 + 4), + topRight: Radius.circular(spacer1 + 4), ), ), child: Column( @@ -269,14 +277,14 @@ class _DigitScannerPageState extends LocalizedState { decoration: BoxDecoration( color: theme.colorScheme.onError, borderRadius: const BorderRadius.only( - topLeft: Radius.circular(kPadding * 2), - topRight: Radius.circular(kPadding * 2), + topLeft: Radius.circular(spacer2), + topRight: Radius.circular(spacer2), ), ), padding: const EdgeInsets.only( - bottom: kPadding * 2, - top: kPadding * 2, - left: kPadding * 3, + bottom: spacer2, + top: spacer2, + left: spacer3, ), width: MediaQuery.of(context).size.width, child: widget.isGS1code @@ -300,13 +308,13 @@ class _DigitScannerPageState extends LocalizedState { shape: const Border(), title: Container( margin: const EdgeInsets.only( - left: kPadding, - right: kPadding, + left: spacer1, + right: spacer1, ), - height: kPadding * 6, + height: spacer9, decoration: BoxDecoration( - color: DigitTheme.instance - .colorScheme.background, + color: DigitTheme + .instance.colorScheme.surface, border: Border.all( color: DigitTheme .instance.colorScheme.outline, @@ -318,7 +326,7 @@ class _DigitScannerPageState extends LocalizedState { ), ), padding: - const EdgeInsets.all(kPadding), + const EdgeInsets.all(spacer2), child: Row( crossAxisAlignment: CrossAxisAlignment.end, @@ -345,6 +353,9 @@ class _DigitScannerPageState extends LocalizedState { ), ), IconButton( + padding: const EdgeInsets.only( + bottom: spacer2, + ), icon: Icon( Icons.delete, color: @@ -407,22 +418,30 @@ class _DigitScannerPageState extends LocalizedState { return ReactiveFormBuilder( form: () => buildForm(), builder: (context, form, child) { - return DigitCard( - child: ScrollableContent( - backgroundColor: theme.colorScheme.onError, - header: GestureDetector( - onTap: () { - setState(() { - manualCode = false; - initializeCameras(); - }); - }, - child: const Align( - alignment: Alignment.topRight, - child: Icon(Icons.close), + return ScrollableContent( + backgroundColor: theme.colorScheme.onError, + header: GestureDetector( + onTap: () { + setState(() { + manualCode = false; + initializeCameras(); + }); + }, + child: Align( + alignment: Alignment.topRight, + child: Icon( + Icons.close, + color: Theme.of(context) + .colorTheme + .text + .primary, ), ), - footer: DigitElevatedButton( + ), + footer: Padding( + padding: const EdgeInsets.all(spacer4), + child: DigitButton( + mainAxisSize: MainAxisSize.max, onPressed: () async { if (form .control(_manualCodeFormKey) @@ -434,13 +453,12 @@ class _DigitScannerPageState extends LocalizedState { .toString() .trim() .isEmpty) { - DigitToast.show(context, - options: DigitToastOptions( - localizations.translate( - i18.scanner.enterManualCode), - true, - theme, - )); + Toast.showToast( + context, + type: ToastType.error, + message: localizations.translate( + i18.scanner.enterManualCode), + ); } else { final bloc = context.read(); @@ -468,11 +486,15 @@ class _DigitScannerPageState extends LocalizedState { }); } }, - child: Text(localizations.translate( + type: DigitButtonType.primary, + size: DigitButtonSize.large, + label: localizations.translate( i18.common.coreCommonSubmit, - )), + ), ), - children: [ + ), + children: [ + DigitCard(children: [ Align( alignment: Alignment.topLeft, child: Text( @@ -483,16 +505,25 @@ class _DigitScannerPageState extends LocalizedState { ), ), const SizedBox( - height: kPadding * 2, + height: spacer2, ), - DigitTextFormField( + ReactiveWrapperField( formControlName: _manualCodeFormKey, - label: localizations.translate( - i18.scanner.resourceCode, - ), + builder: (field) { + return InputField( + label: localizations.translate( + i18.scanner.resourceCode, + ), + type: InputType.text, + onChange: (value) { + form + .control(_manualCodeFormKey) + .value = value; + }); + }, ), - ], - ), + ]) + ], ); }); }) diff --git a/packages/digit_scanner/lib/router/digit_scanner_router.dart b/packages/digit_scanner/lib/router/digit_scanner_router.dart index e6fbc4f00..fe16085e0 100644 --- a/packages/digit_scanner/lib/router/digit_scanner_router.dart +++ b/packages/digit_scanner/lib/router/digit_scanner_router.dart @@ -4,10 +4,8 @@ import 'digit_scanner_router.gm.dart'; @AutoRouterConfig.module() class DigitScannerPackageRoute extends $DigitScannerPackageRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: DigitScannerRoute.page, diff --git a/packages/digit_scanner/lib/utils/scanner_utils.dart b/packages/digit_scanner/lib/utils/scanner_utils.dart index e78bc7f52..a9cd4748f 100644 --- a/packages/digit_scanner/lib/utils/scanner_utils.dart +++ b/packages/digit_scanner/lib/utils/scanner_utils.dart @@ -1,9 +1,10 @@ import 'package:audioplayers/audioplayers.dart'; import 'package:camera/camera.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_scanner/blocs/app_localization.dart'; import 'package:digit_scanner/utils/extensions/extensions.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:google_mlkit_barcode_scanning/google_mlkit_barcode_scanning.dart'; @@ -25,39 +26,49 @@ class DigitScannerUtils { i18.scanner.scannerDialogContent, ) .replaceAll('{quantity}', quantity.toString()); - await DigitDialog.show( - context, - options: DigitDialogOptions( - titleText: localizations.translate( + await showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( i18.scanner.scannerDialogTitle, ), - contentText: contentLocalization, - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.scanner.scannerDialogPrimaryAction, + onOutsideTap: () { + Navigator.of(popupContext).pop(); + }, + description:contentLocalization, + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations.translate( + i18.scanner.scannerDialogPrimaryAction, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, ), - action: (ctx) { - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, - ), - secondaryAction: DigitDialogActions( - label: localizations.translate( - i18.scanner.scannerDialogSecondaryAction, + DigitButton( + label: localizations.translate( + i18.scanner.scannerDialogSecondaryAction, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + + Navigator.of( + context, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, ), - action: (ctx) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - - Navigator.of( - context, - ).pop(); - }, - ), + ], ), ); } @@ -96,7 +107,14 @@ class DigitScannerUtils { setText(''); // Process the image to detect barcodes - final barcodes = await barcodeScanner.processImage(inputImage); + final List barcodes; + + try { + barcodes = await barcodeScanner.processImage(inputImage); + } catch (e) { + debugPrint('Error processing image: $e'); + return; + } // Check if the input image has valid metadata for size and rotation if (inputImage.metadata?.size != null && @@ -189,13 +207,10 @@ class DigitScannerUtils { // Check if the player has completed playing or if the result list is empty if (player.state == PlayerState.completed || result.isEmpty) { // Display a toast message with the provided error message - DigitToast.show( + Toast.showToast( context, - options: DigitToastOptions( - localizations.translate(message), // Translate the message - true, // Show as an error - DigitTheme.instance.mobileTheme, // Use the current theme - ), + type: ToastType.error, + message: localizations.translate(message), ); } diff --git a/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart b/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart index 669930959..a2d06f18f 100644 --- a/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart +++ b/packages/digit_scanner/lib/widgets/vision_detector_views/camera_view.dart @@ -1,17 +1,19 @@ import 'dart:io'; import 'package:camera/camera.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_scanner/blocs/app_localization.dart'; import 'package:digit_scanner/utils/i18_key_constants.dart' as i18; import 'package:digit_scanner/widgets/localized.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_mlkit_commons/google_mlkit_commons.dart'; class CameraView extends LocalizedStatefulWidget { const CameraView({ - Key? key, + super.key, required this.customPaint, required this.onImage, this.onCameraFeedReady, @@ -20,7 +22,7 @@ class CameraView extends LocalizedStatefulWidget { this.initialCameraLensDirection = CameraLensDirection.back, required this.cameraController, required this.cameras, - }) : super(key: key); + }); final CustomPaint? customPaint; final Function(InputImage inputImage) onImage; @@ -44,7 +46,6 @@ class _CameraViewState extends State { double _maxAvailableZoom = 1.0; double _minAvailableExposureOffset = 0.0; double _maxAvailableExposureOffset = 0.0; - double _currentExposureOffset = 0.0; bool _changingCameraLens = false; @override @@ -75,13 +76,14 @@ class _CameraViewState extends State { } Widget _liveFeedBody(BuildContext context) { + final theme = Theme.of(context); final localizations = ScannerLocalization.of(context); if (_cameras.isEmpty) return Container(); if (_controller == null) return Container(); if (_controller?.value.isInitialized == false) return Container(); return Container( - color: DigitTheme.instance.colorScheme.onSurface, + color: theme.colorTheme.generic.background, child: Stack( fit: StackFit.expand, children: [ @@ -116,10 +118,11 @@ class _CameraViewState extends State { child: FloatingActionButton( heroTag: Object(), onPressed: () => Navigator.of(context).pop(), - backgroundColor: DigitTheme.instance.colorScheme.onSurface, - child: const Icon( + backgroundColor: Theme.of(context).colorTheme.generic.background, + child: Icon( Icons.arrow_back_ios_outlined, size: 20, + color: Theme.of(context).colorTheme.text.primary, ), ), ), @@ -181,7 +184,7 @@ class _CameraViewState extends State { min: _minAvailableZoom, max: _maxAvailableZoom, activeColor: DigitTheme.instance.colorScheme.onPrimary, - inactiveColor: const DigitColors().seaShellGray, + inactiveColor: const DigitColors().light.genericBackground, onChanged: (value) async { setState(() { _currentZoomLevel = value; @@ -201,7 +204,7 @@ class _CameraViewState extends State { child: Center( child: Text( '${_currentZoomLevel.toStringAsFixed(1)}x', - style: TextStyle(color: const DigitColors().white), + style: TextStyle(color: const DigitColors().light.paperPrimary), ), ), ), @@ -227,7 +230,7 @@ class _CameraViewState extends State { padding: const EdgeInsets.all(3.0), decoration: BoxDecoration( border: Border.all( - width: kPadding / 2, + width: spacer1, color: DigitTheme.instance.colorScheme.error, ), ), @@ -253,12 +256,17 @@ class _CameraViewState extends State { _controller?.getMaxZoomLevel().then((value) { _maxAvailableZoom = value; }); - _currentExposureOffset = 0.0; _controller?.getMinExposureOffset().then((value) { _minAvailableExposureOffset = value; + if (kDebugMode) { + print('minAvailableExposureOffset: $_minAvailableExposureOffset'); + } }); _controller?.getMaxExposureOffset().then((value) { _maxAvailableExposureOffset = value; + if (kDebugMode) { + print('maxAvailableExposureOffset: $_maxAvailableExposureOffset'); + } }); _controller?.startImageStream(_processCameraImage).then((value) { if (widget.onCameraFeedReady != null) { @@ -339,16 +347,28 @@ class _CameraViewState extends State { // * nv21 for Android // * bgra8888 for iOS if (format == null || - (Platform.isAndroid && format != InputImageFormat.nv21) || - (Platform.isIOS && format != InputImageFormat.bgra8888)) return null; + (Platform.isAndroid && + !(format == InputImageFormat.nv21 || + format == InputImageFormat.yv12 || + format == InputImageFormat.yuv_420_888)) || + (Platform.isIOS && + !(format == InputImageFormat.bgra8888 || + format == InputImageFormat.yuv420))) { + return null; + } // since format is constraint to nv21 or bgra8888, both only have one plane - if (image.planes.length != 1) return null; + if (image.planes.isEmpty) return null; final plane = image.planes.first; + final WriteBuffer allBytes = WriteBuffer(); + for (Plane plane in image.planes) { + allBytes.putUint8List(plane.bytes); + } + final bytes = allBytes.done().buffer.asUint8List(); // compose InputImage using bytes return InputImage.fromBytes( - bytes: plane.bytes, + bytes: bytes, metadata: InputImageMetadata( size: Size(image.width.toDouble(), image.height.toDouble()), rotation: rotation, // used only in Android diff --git a/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart b/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart index bb2ba9b14..6eb654aa2 100644 --- a/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart +++ b/packages/digit_scanner/lib/widgets/vision_detector_views/detector_view.dart @@ -9,7 +9,7 @@ enum DetectorViewMode { liveFeed, gallery } class DetectorView extends StatefulWidget { const DetectorView({ - Key? key, + super.key, required this.title, required this.onImage, this.customPaint, @@ -21,7 +21,7 @@ class DetectorView extends StatefulWidget { this.onCameraLensDirectionChanged, required this.cameraController, required this.cameras, - }) : super(key: key); + }); final String title; final CustomPaint? customPaint; diff --git a/packages/digit_scanner/pubspec.lock b/packages/digit_scanner/pubspec.lock index db34b99ff..340757dba 100644 --- a/packages/digit_scanner/pubspec.lock +++ b/packages/digit_scanner/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" archive: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -101,18 +101,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.1.4" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -173,18 +173,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -205,42 +205,42 @@ packages: dependency: "direct main" description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+3" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 url: "https://pub.dev" source: hosted - version: "2.7.4" + version: "2.8.0" camera_web: dependency: transitive description: name: camera_web - sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" + sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.4" characters: dependency: transitive description: @@ -249,6 +249,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -293,26 +301,34 @@ packages: dependency: transitive description: name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.2" cross_file: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -337,22 +353,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: + digit_ui_components: dependency: "direct main" description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.2+1" - easy_stepper: + version: "0.0.2-dev.4" + dotted_border: dependency: transitive description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.1.0" fake_async: dependency: transitive description: @@ -365,10 +381,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -377,99 +393,112 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: "16dc141db5a2ccc6520ebb6a2eb5945b1b09e95085c021d9f914f8ded7f1465c" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.1.4" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.5" - flutter_focus_watcher: + version: "0.9.3+2" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+3" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.2.0" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.22" flutter_spinkit: dependency: transitive description: @@ -478,6 +507,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: @@ -491,14 +528,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -508,10 +537,10 @@ packages: dependency: transitive description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -524,18 +553,66 @@ packages: dependency: "direct main" description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "0.2.3" glob: dependency: transitive description: @@ -548,42 +625,42 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: "direct main" description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: "direct main" description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" gs1_barcode_parser: dependency: "direct main" description: name: gs1_barcode_parser - sha256: "9aaff47bdab7177deaf9248cc861ef41cf611d3f828498cb40b64bedcbf53391" + sha256: ff171bc40038de3f7178fbc32eaf9eebc3d35a3c4c00bb0281fe4a976d853a42 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.1.0" horizontal_data_table: dependency: transitive description: @@ -592,14 +669,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -616,14 +701,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -656,38 +805,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" location: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -700,42 +873,42 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" mocktail: dependency: "direct dev" description: @@ -776,30 +949,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive + path: + dependency: "direct main" description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "2.0.1" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -812,26 +977,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -852,10 +1017,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" petitparser: dependency: transitive description: @@ -868,10 +1033,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -880,14 +1045,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -916,34 +1073,18 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" + version: "1.3.0" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" - url: "https://pub.dev" - source: hosted - version: "14.3.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "0.0.1+1" + version: "17.0.1" shelf: dependency: transitive description: @@ -1001,10 +1142,10 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: @@ -1021,6 +1162,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -1073,26 +1222,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1109,14 +1258,94 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.0" vector_graphics: dependency: transitive description: @@ -1149,14 +1378,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1169,10 +1406,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -1193,10 +1430,10 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -1222,5 +1459,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/digit_scanner/pubspec.yaml b/packages/digit_scanner/pubspec.yaml index 0e08b4c1b..ce9e6f89f 100644 --- a/packages/digit_scanner/pubspec.yaml +++ b/packages/digit_scanner/pubspec.yaml @@ -17,7 +17,7 @@ repository: https://github.com/egovernments/health-campaign-field-worker-app # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.3+1 +version: 1.0.4 environment: sdk: '>=2.19.4 <3.9.0' @@ -35,31 +35,31 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - google_mlkit_barcode_scanning: ^0.10.0 - camera: ^0.10.5+7 + google_mlkit_barcode_scanning: ^0.12.0 + camera: ^0.11.0+1 + digit_ui_components: ^0.0.2-dev.4 + reactive_forms: ^17.0.0 gs1_barcode_parser: ^1.0.5 - digit_components: ^1.0.1+1 flutter_bloc: ^8.1.1 freezed_annotation: ^2.1.0 overlay_builder: ^1.1.0 flutter_svg: ^2.0.8 - audioplayers: ^5.2.0 - auto_route: ^7.8.4 - path_provider: ^2.0.11 - path: ^1.8.2 - google_mlkit_commons: ^0.6.0 - reactive_forms: ^14.1.0 + audioplayers: ^5.2.1 + auto_route: ^8.1.3 + path_provider: ^2.1.3 + path: ^1.9.0 + google_mlkit_commons: ^0.7.1 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 json_serializable: ^6.4.0 freezed: ^2.2.0 bloc_test: ^9.1.0 - mocktail: ^1.0.2 - build_runner: ^2.4.7 - auto_route_generator: ^7.3.2 + mocktail: ^1.0.3 + build_runner: ^2.4.11 + auto_route_generator: ^8.0.0 # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is diff --git a/packages/digit_showcase/CHANGELOG.md b/packages/digit_showcase/CHANGELOG.md index 69ebf0931..027cc5f03 100644 --- a/packages/digit_showcase/CHANGELOG.md +++ b/packages/digit_showcase/CHANGELOG.md @@ -1,7 +1,12 @@ -## 0.0.0-dev.1 +## 1.0.1 -* Digit Showcase initial release. +* Updated to latest package versions +* Updated flutter version to 3.22.1 ## 1.0.0 -* Stable release \ No newline at end of file +* Stable release + +## 0.0.0-dev.1 + +* Digit Showcase initial release. diff --git a/packages/digit_showcase/lib/tooltip_widget.dart b/packages/digit_showcase/lib/tooltip_widget.dart index 5d260e060..3c10f2167 100644 --- a/packages/digit_showcase/lib/tooltip_widget.dart +++ b/packages/digit_showcase/lib/tooltip_widget.dart @@ -452,7 +452,7 @@ class _ToolTipWidgetState extends State TextButton( style: TextButton.styleFrom( foregroundColor: - theme.colorScheme.onBackground, + theme.colorScheme.surface, tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), @@ -535,7 +535,7 @@ class _ToolTipWidgetState extends State final textPainter = TextPainter( text: TextSpan(text: text, style: style), maxLines: 1, - textScaleFactor: MediaQuery.of(context).textScaleFactor, + textScaler: MediaQuery.of(context).textScaler, textDirection: TextDirection.ltr, )..layout(); return textPainter.size; diff --git a/packages/digit_showcase/pubspec.lock b/packages/digit_showcase/pubspec.lock index d994e77f0..6f0b0670d 100644 --- a/packages/digit_showcase/pubspec.lock +++ b/packages/digit_showcase/pubspec.lock @@ -58,55 +58,79 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" sky_engine: dependency: transitive description: flutter @@ -156,10 +180,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" vector_math: dependency: transitive description: @@ -168,14 +192,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - web: + vm_service: dependency: transitive description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "14.2.1" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" - flutter: ">=1.17.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/digit_showcase/pubspec.yaml b/packages/digit_showcase/pubspec.yaml index c44965e5b..97f0b148e 100644 --- a/packages/digit_showcase/pubspec.yaml +++ b/packages/digit_showcase/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_showcase description: Customized showcase view -version: 1.0.0 +version: 1.0.1 homepage: "https://github.com/egovernments/health-campaign-field-worker-app/tree/develop/packages/digit_showcase" environment: @@ -14,7 +14,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/forms_engine/lib/widgets/integer_builder.dart b/packages/forms_engine/lib/widgets/integer_builder.dart index 77a7c8b56..1d9c13a46 100644 --- a/packages/forms_engine/lib/widgets/integer_builder.dart +++ b/packages/forms_engine/lib/widgets/integer_builder.dart @@ -73,7 +73,7 @@ class JsonSchemaIntegerBuilder extends JsonSchemaBuilder { aspectRatio: 1, child: Material( shape: border, - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, child: InkWell(onTap: onPressed, child: Icon(icon)), ), ); diff --git a/packages/forms_engine/pubspec.lock b/packages/forms_engine/pubspec.lock index 1fbd7a910..b3553cb93 100644 --- a/packages/forms_engine/pubspec.lock +++ b/packages/forms_engine/pubspec.lock @@ -109,10 +109,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.7" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -228,19 +228,18 @@ packages: digit_components: dependency: "direct main" description: - name: digit_components - sha256: "8e5d120f2c16c0d8ffaf4d0de1218da5e492061d6bb9245214589fb1ea5ec09e" - url: "https://pub.dev" - source: hosted - version: "0.0.3+16" + path: "../digit_components" + relative: true + source: path + version: "1.0.2+1" easy_stepper: dependency: transitive description: name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.8.5+1" fake_async: dependency: transitive description: @@ -282,10 +281,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "8.1.3" + version: "8.1.6" flutter_focus_watcher: dependency: transitive description: @@ -350,6 +349,11 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_spinkit: dependency: transitive description: @@ -380,10 +384,10 @@ packages: dependency: transitive description: name: fluttertoast - sha256: dfdde255317af381bfc1c486ed968d5a43a2ded9c931e87cbecd88767d6a71c1 + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.4" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -420,10 +424,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -444,10 +448,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -468,10 +472,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -504,6 +508,30 @@ packages: url: "https://pub.dev" source: hosted version: "6.7.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -516,26 +544,26 @@ packages: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -548,34 +576,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.2" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -588,10 +616,10 @@ packages: dependency: transitive description: name: mocktail - sha256: f603ebd85a576e5914870b02e5839fc5d0243b867bf710651cf239a28ebb365e + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" nested: dependency: transitive description: @@ -628,34 +656,34 @@ packages: dependency: transitive description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: transitive description: name: path_provider - sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" path_provider_android: dependency: transitive description: @@ -708,10 +736,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.1.8" pointer_interceptor: dependency: transitive description: @@ -764,18 +792,18 @@ packages: dependency: transitive description: name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 + sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a url: "https://pub.dev" source: hosted - version: "0.8.1" + version: "2.1.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" remove_emoji_input_formatter: dependency: transitive description: @@ -905,26 +933,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -953,10 +981,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -969,10 +997,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.0" web_socket_channel: dependency: transitive description: @@ -1014,5 +1042,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.19.2" diff --git a/packages/forms_engine/pubspec.yaml b/packages/forms_engine/pubspec.yaml index b1bc6a5d7..21b136a7e 100644 --- a/packages/forms_engine/pubspec.yaml +++ b/packages/forms_engine/pubspec.yaml @@ -13,10 +13,10 @@ dependencies: flutter: sdk: flutter freezed_annotation: ^2.1.0 - intl: ^0.18.0 + intl: ^0.19.0 json_annotation: ^4.7.0 - reactive_forms: ^14.1.0 - digit_components: ^0.0.1 + reactive_forms: ^17.0.0 + digit_components: ^1.0.1+1 flutter_bloc: ^8.1.1 dev_dependencies: diff --git a/packages/inventory_management/CHANGELOG.md b/packages/inventory_management/CHANGELOG.md index e097bdc3b..b0623ce75 100644 --- a/packages/inventory_management/CHANGELOG.md +++ b/packages/inventory_management/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.4 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model, digit_scanner to latest version +* Migrated to digit_ui_components + ## 1.0.3+5 * Added audit and client audit details in stock reconciliation diff --git a/packages/inventory_management/lib/models/entities/inventory_enums.dart b/packages/inventory_management/lib/models/entities/inventory_enums.dart index 088580334..71f754c35 100644 --- a/packages/inventory_management/lib/models/entities/inventory_enums.dart +++ b/packages/inventory_management/lib/models/entities/inventory_enums.dart @@ -6,9 +6,9 @@ part 'inventory_enums.mapper.dart'; @MappableEnum(caseStyle: CaseStyle.upperCase) enum InventoryManagementEnums { @MappableValue("waybill_quantity") - waybill_quantity, + wayBillQuantity, @MappableValue("vehicle_number") - vehicle_number, + vehicleNumber, @MappableValue("comments") comments, @MappableValue("deliveryTeam") diff --git a/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart b/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart index 30e88ba7d..233bdfeac 100644 --- a/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart +++ b/packages/inventory_management/lib/models/entities/inventory_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'inventory_enums.dart'; @@ -28,9 +28,9 @@ class InventoryManagementEnumsMapper InventoryManagementEnums decode(dynamic value) { switch (value) { case "waybill_quantity": - return InventoryManagementEnums.waybill_quantity; + return InventoryManagementEnums.wayBillQuantity; case "vehicle_number": - return InventoryManagementEnums.vehicle_number; + return InventoryManagementEnums.vehicleNumber; case "comments": return InventoryManagementEnums.comments; case "deliveryTeam": @@ -51,9 +51,9 @@ class InventoryManagementEnumsMapper @override dynamic encode(InventoryManagementEnums self) { switch (self) { - case InventoryManagementEnums.waybill_quantity: + case InventoryManagementEnums.wayBillQuantity: return "waybill_quantity"; - case InventoryManagementEnums.vehicle_number: + case InventoryManagementEnums.vehicleNumber: return "vehicle_number"; case InventoryManagementEnums.comments: return "comments"; diff --git a/packages/inventory_management/lib/models/entities/stock.mapper.dart b/packages/inventory_management/lib/models/entities/stock.mapper.dart index 7780aa6e6..42a21a2cc 100644 --- a/packages/inventory_management/lib/models/entities/stock.mapper.dart +++ b/packages/inventory_management/lib/models/entities/stock.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'stock.dart'; @@ -176,10 +176,8 @@ mixin StockSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockSearchModelMapper.ensureInitialized() - .isValueEqual(this as StockSearchModel, other)); + return StockSearchModelMapper.ensureInitialized() + .equalsValue(this as StockSearchModel, other); } @override @@ -522,10 +520,8 @@ mixin StockModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockModelMapper.ensureInitialized() - .isValueEqual(this as StockModel, other)); + return StockModelMapper.ensureInitialized() + .equalsValue(this as StockModel, other); } @override @@ -779,10 +775,8 @@ mixin StockAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as StockAdditionalFields, other)); + return StockAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as StockAdditionalFields, other); } @override diff --git a/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart b/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart index a4b0c3724..9f0670c03 100644 --- a/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart +++ b/packages/inventory_management/lib/models/entities/stock_reconciliation.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'stock_reconciliation.dart'; @@ -141,10 +141,8 @@ mixin StockReconciliationSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockReconciliationSearchModelMapper.ensureInitialized() - .isValueEqual(this as StockReconciliationSearchModel, other)); + return StockReconciliationSearchModelMapper.ensureInitialized() + .equalsValue(this as StockReconciliationSearchModel, other); } @override @@ -417,10 +415,8 @@ mixin StockReconciliationModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockReconciliationModelMapper.ensureInitialized() - .isValueEqual(this as StockReconciliationModel, other)); + return StockReconciliationModelMapper.ensureInitialized() + .equalsValue(this as StockReconciliationModel, other); } @override @@ -664,11 +660,8 @@ mixin StockReconciliationAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - StockReconciliationAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as StockReconciliationAdditionalFields, other)); + return StockReconciliationAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as StockReconciliationAdditionalFields, other); } @override diff --git a/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart b/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart index 24c1feb4f..71851923b 100644 --- a/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart +++ b/packages/inventory_management/lib/models/entities/transaction_reason.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'transaction_reason.dart'; diff --git a/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart b/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart index 2582c989a..e6c25cc67 100644 --- a/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart +++ b/packages/inventory_management/lib/models/entities/transaction_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'transaction_type.dart'; diff --git a/packages/inventory_management/lib/pages/acknowledgement.dart b/packages/inventory_management/lib/pages/acknowledgement.dart index 2b48899f4..20fc3b2dc 100644 --- a/packages/inventory_management/lib/pages/acknowledgement.dart +++ b/packages/inventory_management/lib/pages/acknowledgement.dart @@ -1,16 +1,20 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; + import '../utils/i18_key_constants.dart' as i18; import '../widgets/localized.dart'; @RoutePage() class InventoryAcknowledgementPage extends LocalizedStatefulWidget { - bool isDataRecordSuccess; - String? label; - String? description; - Map? descriptionTableData; - InventoryAcknowledgementPage({ + final bool isDataRecordSuccess; + final String? label; + final String? description; + final Map? descriptionTableData; + + const InventoryAcknowledgementPage({ super.key, super.appLocalizations, this.isDataRecordSuccess = false, @@ -31,26 +35,39 @@ class AcknowledgementPageState final theme = Theme.of(context); return Scaffold( - body: DigitAcknowledgement.success( - description: widget.description ?? + body: PanelCard( + title: widget.label ?? localizations.translate( - i18.acknowledgementSuccess.acknowledgementDescriptionText, + i18.acknowledgementSuccess.acknowledgementLabelText, ), - descriptionWidget: widget.isDataRecordSuccess - ? DigitTableCard( - element: widget.descriptionTableData ?? {}, - ) - : null, - label: widget.label ?? + type: PanelType.success, + description: widget.description ?? localizations.translate( - i18.acknowledgementSuccess.acknowledgementLabelText, + i18.acknowledgementSuccess.acknowledgementDescriptionText, ), - action: () { - context.router.maybePop(); - }, - enableBackToSearch: widget.isDataRecordSuccess ? false : true, - actionLabel: - localizations.translate(i18.acknowledgementSuccess.actionLabelText), + + /// TODO: need to update this as listview card + // additionWidgets: widget.isDataRecordSuccess + // ? DigitTableCard( + // element: widget.descriptionTableData ?? {}, + // ) + // : null, + actions: [ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () { + context.router.maybePop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + ], + // action: () { + // context.router.maybePop(); + // }, + // enableBackToSearch: widget.isDataRecordSuccess ? false : true, + // actionLabel: + // localizations.translate(i18.acknowledgementSuccess.actionLabelText), ), bottomNavigationBar: Offstage( offstage: !widget.isDataRecordSuccess, @@ -58,43 +75,30 @@ class AcknowledgementPageState child: SizedBox( height: 150, child: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB(kPadding, 0, kPadding, 0), - child: Column( - children: [ - DigitElevatedButton( - child: Text(localizations - .translate(i18.acknowledgementSuccess.goToHome)), - onPressed: () { - context.router.popUntilRoot(); - }, - ), - const SizedBox( - height: 12, - ), - DigitOutLineButton( - onPressed: () { - context.router.popUntilRoot(); - }, - label: localizations - .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, - ), - minimumSize: Size( - MediaQuery.of(context).size.width, - 50, - ), - ), - ), - ], - ), + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + label: localizations + .translate(i18.acknowledgementSuccess.goToHome), + onPressed: () { + context.router.popUntilRoot(); + }, + ), + const SizedBox( + height: 12, + ), + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, + onPressed: () { + context.router.popUntilRoot(); + }, + label: localizations + .translate(i18.acknowledgementSuccess.downloadmoredata), + ), + ], ), ), ), diff --git a/packages/inventory_management/lib/pages/facility_selection.dart b/packages/inventory_management/lib/pages/facility_selection.dart index 08b6d667f..ae7acdeb7 100644 --- a/packages/inventory_management/lib/pages/facility_selection.dart +++ b/packages/inventory_management/lib/pages/facility_selection.dart @@ -1,7 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/utils/constants.dart'; import 'package:inventory_management/widgets/localized.dart'; @@ -37,6 +39,7 @@ class InventoryFacilitySelectionPageState color: theme.colorScheme.outline, width: 1.0, ); + final textTheme = theme.digitTextTheme(context); return SafeArea( child: ReactiveFormBuilder( @@ -67,29 +70,31 @@ class InventoryFacilitySelectionPageState color: Colors.white, child: Padding( padding: const EdgeInsets.symmetric( - horizontal: kPadding * 2), + horizontal: spacer4), child: Column( children: [ Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate( i18.common.facilitySearchHeaderLabel, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), ), - const DigitTextFormField( - suffix: Padding( - padding: EdgeInsets.all(kPadding), - child: Icon(Icons.search), - ), - label: '', - formControlName: _facilityName, + ReactiveWrapperField( + formControlName: _facilityName, + builder: (field) { + return DigitSearchFormInput( + onChange: (value){ + field.control.value = value; + }, + ); + } ), ], ), @@ -104,13 +109,12 @@ class InventoryFacilitySelectionPageState return Container( color: Colors.white, padding: const EdgeInsets.symmetric( - horizontal: kPadding), + horizontal: spacer2), child: Container( margin: const EdgeInsets.symmetric( - horizontal: kPadding), + horizontal: spacer2), decoration: BoxDecoration( - color: - DigitTheme.instance.colors.alabasterWhite, + color:Theme.of(context).colorTheme.paper.secondary, border: Border( top: index == 0 ? borderSide : BorderSide.none, @@ -126,10 +130,9 @@ class InventoryFacilitySelectionPageState Navigator.of(context).pop(facility); }, child: Container( - margin: const EdgeInsets.all(kPadding), + margin: const EdgeInsets.all(spacer2), decoration: BoxDecoration( - color: DigitTheme - .instance.colors.alabasterWhite, + color: Theme.of(context).colorTheme.paper.secondary, border: Border( bottom: BorderSide( color: theme.colorScheme.outline, @@ -138,7 +141,7 @@ class InventoryFacilitySelectionPageState ), ), child: Padding( - padding: const EdgeInsets.all(kPadding * 2), + padding: const EdgeInsets.all(spacer4), child: Text( localizations.translate( '$facilityPrefix${facility.id}'), diff --git a/packages/inventory_management/lib/pages/manage_stocks.dart b/packages/inventory_management/lib/pages/manage_stocks.dart index 8730c8634..dd9c583d3 100644 --- a/packages/inventory_management/lib/pages/manage_stocks.dart +++ b/packages/inventory_management/lib/pages/manage_stocks.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/menu_card.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; @@ -28,6 +31,7 @@ class ManageStocksPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ScrollableContent( @@ -38,86 +42,99 @@ class ManageStocksPageState extends LocalizedState { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: const EdgeInsets.fromLTRB( - kPadding * 2, kPadding, kPadding * 2, kPadding), + padding: const EdgeInsets.only(left: spacer2, right: spacer2, bottom: spacer4), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate(i18.manageStock.label), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.center, ), ), ), 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, + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockReceiptLabel), + description: localizations + .translate(i18.manageStock.recordStockReceiptDescription), + icon: Icons.file_download_outlined, + onTap: () { + context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.receipt, + ), + ); + }, + ), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockIssuedLabel), + description: localizations.translate( + i18.manageStock.recordStockIssuedDescription), + icon: Icons.file_upload_outlined, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.dispatch, + ), + )), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockReturnedLabel), + description: localizations.translate( + i18.manageStock.recordStockReturnedDescription, + ), + icon: Icons.settings_backup_restore, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.returned, + ), + )), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockDamagedLabel), + description: localizations.translate( + i18.manageStock.recordStockDamagedDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.damaged, + ), + )), + ), + const SizedBox(height: spacer4,), + Padding( + padding: const EdgeInsets.only(left: spacer2, right: spacer2), + child: MenuCard( + heading: localizations + .translate(i18.manageStock.recordStockLossLabel), + description: localizations.translate( + i18.manageStock.recordStockDamagedDescription, ), - ); - }, + icon: Icons.store, + onTap: () => context.router.push( + RecordStockWrapperRoute( + type: StockRecordEntryType.loss, + ), + )), ), - 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, - ), - )), - 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, - ), - )), - 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, - ), - )), - 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, - ), - )), ]), - const SizedBox(height: 16), + const SizedBox(height: spacer4), ], ), ], diff --git a/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart b/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart index b066065f4..3b82830a9 100644 --- a/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart +++ b/packages/inventory_management/lib/pages/record_stock/record_stock_wrapper.dart @@ -1,11 +1,14 @@ // Importing necessary packages and modules import 'package:auto_route/auto_route.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:inventory_management/inventory_management.dart'; import 'package:inventory_management/utils/extensions/extensions.dart'; import 'package:inventory_management/widgets/component_wrapper/facility_bloc_wrapper.dart'; import 'package:inventory_management/widgets/component_wrapper/product_variant_bloc_wrapper.dart'; +import 'package:location/location.dart'; + import '../../blocs/record_stock.dart'; // This class is a wrapper for the RecordStock page. @@ -39,15 +42,24 @@ class RecordStockWrapperPage extends StatelessWidget projectId: InventorySingleton().projectId, child: ProductVariantBlocWrapper( projectId: InventorySingleton().projectId, - child: BlocProvider( - create: (_) => RecordStockBloc( - stockRepository: - context.repository(context), - RecordStockCreateState( - entryType: type, - projectId: InventorySingleton().projectId, + child: MultiBlocProvider( + providers: [ + BlocProvider( + create: (context) { + return RecordStockBloc( + stockRepository: context + .repository(context), + RecordStockCreateState( + entryType: type, + projectId: InventorySingleton().projectId, + ), + ); + }, + ), + BlocProvider( + create: (_) => LocationBloc(location: Location()), ), - ), + ], child: this, ), ), diff --git a/packages/inventory_management/lib/pages/record_stock/stock_details.dart b/packages/inventory_management/lib/pages/record_stock/stock_details.dart index be040e8e4..c6117b1fc 100644 --- a/packages/inventory_management/lib/pages/record_stock/stock_details.dart +++ b/packages/inventory_management/lib/pages/record_stock/stock_details.dart @@ -1,10 +1,15 @@ import 'package:auto_route/auto_route.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:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/utils/component_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:gs1_barcode_parser/gs1_barcode_parser.dart'; @@ -46,6 +51,7 @@ class StockDetailsPageState extends LocalizedState { List transportTypes = []; List scannedResources = []; + TextEditingController controller1 = TextEditingController(); FormGroup _form(StockRecordEntryType stockType) { return fb.group({ @@ -54,7 +60,7 @@ class StockDetailsPageState extends LocalizedState { validators: [Validators.required], ), _transactionQuantityKey: FormControl(validators: [ - Validators.number, + Validators.number(), Validators.required, Validators.min(0), Validators.max(10000), @@ -84,9 +90,9 @@ class StockDetailsPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); bool isWareHouseMgr = InventorySingleton().isWareHouseMgr; - final parser = GS1BarcodeParser.defaultParser(); return PopScope( onPopInvoked: (didPop) { @@ -120,7 +126,6 @@ class StockDetailsPageState extends LocalizedState { const module = i18.stockDetails; String pageTitle; - String transactionPartyLabel; String quantityCountLabel; String? transactionReasonLabel; String? transactionReason; @@ -131,23 +136,18 @@ class StockDetailsPageState extends LocalizedState { switch (entryType) { case StockRecordEntryType.receipt: pageTitle = module.receivedPageTitle; - transactionPartyLabel = - module.selectTransactingPartyReceived; quantityCountLabel = module.quantityReceivedLabel; transactionType = TransactionType.received.toValue(); break; case StockRecordEntryType.dispatch: pageTitle = module.issuedPageTitle; - transactionPartyLabel = module.selectTransactingPartyIssued; quantityCountLabel = module.quantitySentLabel; transactionType = TransactionType.dispatched.toValue(); break; case StockRecordEntryType.returned: pageTitle = module.returnedPageTitle; - transactionPartyLabel = - module.selectTransactingPartyReturned; quantityCountLabel = module.quantityReturnedLabel; transactionType = TransactionType.received.toValue(); break; @@ -164,8 +164,6 @@ class StockDetailsPageState extends LocalizedState { break; case StockRecordEntryType.damaged: pageTitle = module.damagedPageTitle; - transactionPartyLabel = - module.selectTransactingPartyReceivedFromDamaged; quantityCountLabel = module.quantityDamagedLabel; transactionReasonLabel = module.transactionReasonDamaged; transactionType = TransactionType.dispatched.toValue(); @@ -208,607 +206,684 @@ class StockDetailsPageState extends LocalizedState { }, ), ]), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - margin: const EdgeInsets.fromLTRB(0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, - 0, - kPadding, - 0, - ), - child: ReactiveFormConsumer( - builder: (context, form, child) { - if (form - .control(_deliveryTeamKey) - .value - .toString() - .isEmpty || - form.control(_deliveryTeamKey).value == null || - scannerState.qrCodes.isNotEmpty) { - form.control(_deliveryTeamKey).value = - scannerState.qrCodes.isNotEmpty - ? scannerState.qrCodes.last - : ''; - } - return DigitElevatedButton( - onPressed: !form.valid - ? null - : () async { - form.markAllAsTouched(); - if (!form.valid) { - return; - } - final primaryId = - BlocProvider.of( - context, - ).state.primaryId; - final secondaryParty = - selectedFacilityId != null - ? FacilityModel( - id: selectedFacilityId - .toString(), - ) - : null; - final deliveryTeamName = form - .control(_deliveryTeamKey) - .value as String?; - - if (deliveryTeamSelected && - (form - .control( - _deliveryTeamKey, - ) - .value == - null || - form - .control(_deliveryTeamKey) - .value - .toString() - .trim() - .isEmpty)) { - DigitToast.show( + margin: const EdgeInsets.fromLTRB(0, spacer2, 0, 0), + children: [ + ReactiveFormConsumer( + builder: (context, form, child) { + if (form + .control(_deliveryTeamKey) + .value + .toString() + .isEmpty || + form.control(_deliveryTeamKey).value == + null || + scannerState.qrCodes.isNotEmpty) { + form.control(_deliveryTeamKey).value = + scannerState.qrCodes.isNotEmpty + ? scannerState.qrCodes.last + : ''; + } + return DigitButton( + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: !form.valid + ? () {} + : () async { + form.markAllAsTouched(); + if (!form.valid) { + return; + } + final primaryId = + BlocProvider.of( context, - options: DigitToastOptions( - localizations.translate( + ).state.primaryId; + final secondaryParty = + selectedFacilityId != null + ? FacilityModel( + id: selectedFacilityId + .toString(), + ) + : null; + final deliveryTeamName = form + .control(_deliveryTeamKey) + .value as String?; + + if (deliveryTeamSelected && + (form + .control( + _deliveryTeamKey, + ) + .value == + null || + form + .control(_deliveryTeamKey) + .value + .toString() + .trim() + .isEmpty)) { + Toast.showToast( + context, + type: ToastType.error, + message: localizations.translate( i18.stockDetails.teamCodeRequired, ), - true, - theme, - ), - ); - } else if ((primaryId == - secondaryParty?.id) || - (primaryId == deliveryTeamName)) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( + ); + } else if ((primaryId == + secondaryParty?.id) || + (primaryId == deliveryTeamName)) { + Toast.showToast( + context, + type: ToastType.error, + message: localizations.translate( i18.stockDetails .senderReceiverValidation, ), - true, - theme, - ), - ); - } else { - FocusManager.instance.primaryFocus - ?.unfocus(); - context - .read() - .add(const LoadLocationEvent()); - DigitComponentsUtils() - .showLocationCapturingDialog( - context, - localizations.translate(i18 - .common.locationCapturing), - DigitSyncDialogType.inProgress); - Future.delayed( - const Duration(seconds: 2), - () async { - DigitComponentsUtils() - .hideDialog(context); - final bloc = - context.read(); + ); + } else { + FocusManager.instance.primaryFocus + ?.unfocus(); + context + .read() + .add(const LoadLocationEvent()); + DigitComponentsUtils.showDialog( + context, + localizations.translate( + i18.common.locationCapturing), + DialogType.inProgress); + Future.delayed( + const Duration(seconds: 2), + () async { + DigitComponentsUtils.hideDialog( + context); + final bloc = + context.read(); - final productVariant = form - .control(_productVariantKey) - .value as ProductVariantModel; + final productVariant = form + .control(_productVariantKey) + .value as ProductVariantModel; - switch (entryType) { - case StockRecordEntryType.receipt: - transactionReason = - TransactionReason.received - .toValue(); - break; - case StockRecordEntryType.dispatch: - transactionReason = null; - break; - case StockRecordEntryType.returned: - transactionReason = - TransactionReason.returned - .toValue(); - break; - default: - transactionReason = form - .control( - _transactionReasonKey, - ) - .value as String?; - break; - } + switch (entryType) { + case StockRecordEntryType.receipt: + transactionReason = + TransactionReason.received + .toValue(); + break; + case StockRecordEntryType + .dispatch: + transactionReason = null; + break; + case StockRecordEntryType + .returned: + transactionReason = + TransactionReason.returned + .toValue(); + break; + default: + transactionReason = form + .control( + _transactionReasonKey, + ) + .value as String?; + break; + } - final quantity = form - .control(_transactionQuantityKey) - .value; + final quantity = form + .control( + _transactionQuantityKey) + .value; - final waybillNumber = form - .control(_waybillNumberKey) - .value as String?; + final waybillNumber = form + .control(_waybillNumberKey) + .value as String?; - final waybillQuantity = form - .control(_waybillQuantityKey) - .value as String?; + final waybillQuantity = form + .control(_waybillQuantityKey) + .value as String?; - final vehicleNumber = form - .control(_vehicleNumberKey) - .value as String?; + final vehicleNumber = form + .control(_vehicleNumberKey) + .value as String?; - final lat = locationState.latitude; - final lng = locationState.longitude; + final lat = locationState.latitude; + final lng = locationState.longitude; - final hasLocationData = - lat != null && lng != null; + final hasLocationData = + lat != null && lng != null; - final comments = form - .control(_commentsKey) - .value as String?; + final comments = form + .control(_commentsKey) + .value as String?; - final deliveryTeamName = form - .control(_deliveryTeamKey) - .value as String?; + final deliveryTeamName = form + .control(_deliveryTeamKey) + .value as String?; - String? senderId; - String? senderType; - String? receiverId; - String? receiverType; + String? senderId; + String? senderType; + String? receiverId; + String? receiverType; - final primaryType = - BlocProvider.of( - context, - ).state.primaryType; + final primaryType = BlocProvider.of< + RecordStockBloc>( + context, + ).state.primaryType; - final primaryId = - BlocProvider.of( - context, - ).state.primaryId; + final primaryId = BlocProvider.of< + RecordStockBloc>( + context, + ).state.primaryId; - switch (entryType) { - case StockRecordEntryType.receipt: - case StockRecordEntryType.loss: - case StockRecordEntryType.damaged: - case StockRecordEntryType.returned: - if (deliveryTeamSelected) { - senderId = deliveryTeamName; - senderType = "STAFF"; - } else { - senderId = secondaryParty?.id; - senderType = "WAREHOUSE"; - } - receiverId = primaryId; - receiverType = primaryType; + switch (entryType) { + case StockRecordEntryType.receipt: + case StockRecordEntryType.loss: + case StockRecordEntryType.damaged: + case StockRecordEntryType + .returned: + if (deliveryTeamSelected) { + senderId = deliveryTeamName; + senderType = "STAFF"; + } else { + senderId = secondaryParty?.id; + senderType = "WAREHOUSE"; + } + receiverId = primaryId; + receiverType = primaryType; - break; - case StockRecordEntryType.dispatch: - if (deliveryTeamSelected) { - receiverId = deliveryTeamName; - receiverType = "STAFF"; - } else { - receiverId = secondaryParty?.id; - receiverType = "WAREHOUSE"; - } - senderId = primaryId; - senderType = primaryType; - break; - } + break; + case StockRecordEntryType + .dispatch: + if (deliveryTeamSelected) { + receiverId = deliveryTeamName; + receiverType = "STAFF"; + } else { + receiverId = + secondaryParty?.id; + receiverType = "WAREHOUSE"; + } + senderId = primaryId; + senderType = primaryType; + break; + } - final stockModel = StockModel( - clientReferenceId: - IdGen.i.identifier, - productVariantId: productVariant.id, - transactionReason: - transactionReason, - transactionType: transactionType, - referenceId: stockState.projectId, - referenceIdType: 'PROJECT', - quantity: quantity.toString(), - wayBillNumber: waybillNumber, - receiverId: receiverId, - receiverType: receiverType, - senderId: senderId, - senderType: senderType, - auditDetails: AuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - InventorySingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - additionalFields: [ - waybillQuantity, - vehicleNumber, - comments, - ].any((element) => - element != null) || - hasLocationData - ? StockAdditionalFields( - version: 1, - fields: [ - AdditionalField( - InventoryManagementEnums - .name - .toValue(), - InventorySingleton() - .loggedInUser - ?.name, - ), - if (waybillQuantity != - null && - waybillQuantity - .trim() - .isNotEmpty) - AdditionalField( - 'waybill_quantity', - waybillQuantity, - ), - if (vehicleNumber != - null && - vehicleNumber - .trim() - .isNotEmpty) - AdditionalField( - 'vehicle_number', - vehicleNumber, - ), - if (comments != null && - comments - .trim() - .isNotEmpty) - AdditionalField( - 'comments', - comments, - ), - if (deliveryTeamName != - null && - deliveryTeamName - .trim() - .isNotEmpty) - AdditionalField( - 'deliveryTeam', - deliveryTeamName, - ), - if (hasLocationData) ...[ - AdditionalField( - 'lat', - lat, - ), + final stockModel = StockModel( + clientReferenceId: + IdGen.i.identifier, + productVariantId: + productVariant.id, + transactionReason: + transactionReason, + transactionType: transactionType, + referenceId: stockState.projectId, + referenceIdType: 'PROJECT', + quantity: quantity.toString(), + wayBillNumber: waybillNumber, + receiverId: receiverId, + receiverType: receiverType, + senderId: senderId, + senderType: senderType, + auditDetails: AuditDetails( + createdBy: InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + InventorySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + additionalFields: [ + waybillQuantity, + vehicleNumber, + comments, + ].any((element) => + element != null) || + hasLocationData + ? StockAdditionalFields( + version: 1, + fields: [ AdditionalField( - 'lng', - lng, + InventoryManagementEnums + .name + .toValue(), + InventorySingleton() + .loggedInUser + ?.name, ), + if (waybillQuantity != + null && + waybillQuantity + .trim() + .isNotEmpty) + AdditionalField( + 'waybill_quantity', + waybillQuantity, + ), + if (vehicleNumber != + null && + vehicleNumber + .trim() + .isNotEmpty) + AdditionalField( + 'vehicle_number', + vehicleNumber, + ), + if (comments != null && + comments + .trim() + .isNotEmpty) + AdditionalField( + 'comments', + comments, + ), + if (deliveryTeamName != + null && + deliveryTeamName + .trim() + .isNotEmpty) + AdditionalField( + 'deliveryTeam', + deliveryTeamName, + ), + if (hasLocationData) ...[ + AdditionalField( + 'lat', + lat, + ), + AdditionalField( + 'lng', + lng, + ), + ], + if (scannerState + .barCodes + .isNotEmpty) + addBarCodesToFields( + scannerState + .barCodes), ], - if (scannerState - .barCodes.isNotEmpty) - addBarCodesToFields( - scannerState - .barCodes), - ], - ) - : null, - ); - - bloc.add( - RecordStockSaveStockDetailsEvent( - stockModel: stockModel, - ), - ); + ) + : null, + ); - final submit = - await DigitDialog.show( - context, - options: DigitDialogOptions( - key: const Key('submitDialog'), - titleText: - localizations.translate( - i18.stockDetails.dialogTitle, - ), - contentText: - localizations.translate( - i18.stockDetails.dialogContent, + bloc.add( + RecordStockSaveStockDetailsEvent( + stockModel: stockModel, ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonSubmit, + ); + + final submit = + await showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( + i18.stockDetails.dialogTitle, ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); + onOutsideTap: () { + Navigator.of(popupContext) + .pop(false); }, - ), - secondaryAction: - DigitDialogActions( - label: localizations.translate( - i18.common.coreCommonCancel, + description: + localizations.translate( + i18.stockDetails + .dialogContent, ), - action: (context) => - Navigator.of( - context, - rootNavigator: true, - ).pop(false), + type: PopUpType.simple, + actions: [ + DigitButton( + label: + localizations.translate( + i18.common + .coreCommonSubmit, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(true); + }, + type: + DigitButtonType.primary, + size: DigitButtonSize.large, + ), + DigitButton( + label: + localizations.translate( + i18.common + .coreCommonCancel, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType + .secondary, + size: DigitButtonSize.large, + ), + ], ), - ), - ); + ) as bool; - if (submit ?? false) { - bloc.add( - const RecordStockCreateStockEntryEvent(), - ); - } - }); - } - }, - child: Center( - child: Text( - localizations - .translate(i18.common.coreCommonSubmit), - ), - ), - ); - }), + if (submit ?? false) { + bloc.add( + const RecordStockCreateStockEntryEvent(), + ); + } + }); + } + }, + isDisabled: !form.valid, + label: localizations + .translate(i18.common.coreCommonSubmit), + ); + }) + ], ), children: [ DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate(pageTitle), - style: theme.textTheme.displayMedium, - ), - BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: CircularProgressIndicator(), + children: [ + Text( + localizations.translate(pageTitle), + style: textTheme.headingXl, + ), + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: CircularProgressIndicator(), + ), + empty: () => Center( + child: Text(localizations.translate( + i18.stockDetails.noProductsFound, + )), + ), + fetched: (productVariants) { + return ReactiveWrapperField( + formControlName: _productVariantKey, + validationMessages: { + 'required': (object) => + '${module.selectProductLabel}_IS_REQUIRED', + }, + showErrors: (control) => + control.invalid && control.touched, + builder: (field) { + return LabeledField( + label: localizations.translate( + module.selectProductLabel, + ), + isRequired: true, + child: DigitDropdown( + errorMessage: field.errorText, + emptyItemText: + localizations.translate( + i18.common.noMatchFound, + ), + items: productVariants + .map((variant) { + return DropdownItem( + name: localizations.translate( + variant.sku ?? variant.id, + ), + code: variant.id, + ); + }).toList(), + onSelect: (value) { + /// Find the selected product variant model by matching the id + final selectedVariant = + productVariants.firstWhere( + (variant) => + variant.id == value.code, + ); + + /// Update the form control with the selected product variant model + field.control.value = + selectedVariant; + }, + ), + ); + }, + ); + }, + ); + }, + ), + if ([ + StockRecordEntryType.loss, + StockRecordEntryType.damaged, + ].contains(entryType)) + ReactiveWrapperField( + formControlName: _transactionReasonKey, + builder: (field) { + return LabeledField( + label: localizations.translate( + transactionReasonLabel ?? 'Reason', ), - empty: () => Center( - child: Text(localizations.translate( - i18.stockDetails.noProductsFound, - )), + isRequired: true, + child: DigitDropdown( + emptyItemText: localizations.translate( + i18.common.noMatchFound, + ), + items: reasons!.map((reason) { + return DropdownItem( + name: + localizations.translate(reason), + code: reason.toString(), + ); + }).toList(), + onSelect: (value) { + final selectedReason = + reasons?.firstWhere( + (reason) => + reason.toString() == value.code, + ); + field.control.value = selectedReason; + }, ), - fetched: (productVariants) { - return DigitReactiveDropdown< - ProductVariantModel>( - key: const Key(_productVariantKey), - formControlName: _productVariantKey, - label: localizations.translate( - module.selectProductLabel, - ), - isRequired: true, - valueMapper: (value) { - return localizations.translate( - value.sku ?? value.id, - ); - }, - menuItems: productVariants, - validationMessages: { - 'required': (object) => - '${module.selectProductLabel}_IS_REQUIRED', - }, - ); - }, ); }, ), - if ([ - StockRecordEntryType.loss, - StockRecordEntryType.damaged, - ].contains(entryType)) - DigitReactiveDropdown( - key: const Key(_transactionReasonKey), - label: localizations.translate( - transactionReasonLabel ?? 'Reason', - ), - menuItems: reasons ?? [], - formControlName: _transactionReasonKey, - valueMapper: (value) => - localizations.translate(value), - isRequired: true, - ), - BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: - CircularProgressIndicator(), + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: CircularProgressIndicator(), + ), + fetched: (facilities, allFacilities) { + return Column( + children: [ + const SizedBox( + height: spacer4, ), - fetched: (facilities, allFacilities) { - return InkWell( - onTap: () async { - clearQRCodes(); - form - .control(_deliveryTeamKey) - .value = ''; + InkWell( + onTap: () async { + clearQRCodes(); + form + .control(_deliveryTeamKey) + .value = ''; - final facility = - await context.router.push( - InventoryFacilitySelectionRoute( - facilities: - allFacilities)) - as FacilityModel?; + final facility = + await context.router.push( + InventoryFacilitySelectionRoute( + facilities: + facilities)) + as FacilityModel?; - if (facility == null) return; - form - .control(_secondaryPartyKey) - .value = - localizations.translate( - 'FAC_${facility.id}', - ); - - setState(() { - selectedFacilityId = - facility.id; - }); - if (facility.id == - 'Delivery Team') { + if (facility == null) return; + form + .control(_secondaryPartyKey) + .value = + localizations.translate( + 'FAC_${facility.id}', + ); + controller1.text = + localizations.translate( + 'FAC_${facility.id}'); setState(() { - deliveryTeamSelected = true; + selectedFacilityId = + facility.id; }); - } else { - setState(() { - deliveryTeamSelected = false; - }); - } - }, - child: IgnorePointer( - child: DigitTextFormField( - key: const Key( - _secondaryPartyKey), - hideKeyboard: true, - label: localizations.translate( - '${pageTitle}_${i18.stockReconciliationDetails.stockLabel}', - ), - isRequired: true, - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.nameLabelText}_IS_REQUIRED', - ), - }, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: - _secondaryPartyKey, - onTap: () async { - clearQRCodes(); - form - .control(_deliveryTeamKey) - .value = ''; - - final facility = - await context.router.push( - InventoryFacilitySelectionRoute( - facilities: allFacilities, - ), - ) as FacilityModel?; - - if (facility == null) return; - form - .control( - _secondaryPartyKey) - .value = - localizations.translate( - 'FAC_${facility.id}', - ); - + if (facility.id == + 'Delivery Team') { setState(() { - selectedFacilityId = - facility.id; + deliveryTeamSelected = true; }); - if (facility.id == - 'Delivery Team') { - setState(() { - deliveryTeamSelected = - true; - }); - } else { - setState(() { - deliveryTeamSelected = - false; - }); - } - }, - ), - ), - ); - }); - }, - ), - Visibility( - visible: deliveryTeamSelected, - child: DigitTextFormField( - label: localizations.translate( - i18.stockReconciliationDetails - .teamCodeLabel, - ), - onChanged: (val) { - String? value = val.value as String?; - if (value != null && - value.trim().isNotEmpty) { - context.read().add( - DigitScannerEvent.handleScanner( - barCode: [], - qrCode: [value], - manualCode: value, + } else { + setState(() { + deliveryTeamSelected = + false; + }); + } + }, + child: IgnorePointer( + child: ReactiveWrapperField( + formControlName: + _secondaryPartyKey, + validationMessages: { + 'required': (object) => + localizations + .translate( + '${i18.individualDetails.nameLabelText}_IS_REQUIRED', + ), + }, + showErrors: (control) => + control.invalid && + control.touched, + builder: (field) { + return InputField( + type: InputType.search, + isRequired: true, + label: localizations + .translate( + '${pageTitle}_${i18.stockReconciliationDetails.stockLabel}', + ), + onChange: (value) { + field.control + .markAsTouched(); + }, + controller: controller1, + errorMessage: + field.errorText, + ); + }), ), - ); - } else { - clearQRCodes(); - } - }, - suffix: IconButton( - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 5, - isGS1code: false, - singleValue: false, ), - settings: const RouteSettings( - name: '/qr-scanner'), - ), + ], ); - }, - icon: Icon( - Icons.qr_code_2, - color: theme.colorScheme.secondary, - ), - ), - isRequired: deliveryTeamSelected, - maxLines: 3, + }); + }, + ), + // TODO: as this case i need to set when occurring + Visibility( + visible: deliveryTeamSelected, + child: ReactiveWrapperField( formControlName: _deliveryTeamKey, - ), - ), - DigitTextFormField( - key: const Key(_transactionQuantityKey), + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockReconciliationDetails + .teamCodeLabel, + ), + isRequired: deliveryTeamSelected, + suffixIcon: Icons.qr_code_2, + onSuffixTap: (value) { + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: false, + singleValue: false, + ), + settings: const RouteSettings( + name: '/qr-scanner'), + ), + ); + }, + onChange: (val) { + String? value = val; + if (value != null && + value.trim().isNotEmpty) { + context + .read() + .add( + DigitScannerEvent + .handleScanner( + barCode: [], + qrCode: [value], + manualCode: value, + ), + ); + } else { + clearQRCodes(); + } + }, + ); + }), + // DigitTextFormField( + // label: localizations.translate( + // i18.stockReconciliationDetails + // .teamCodeLabel, + // ), + // onChanged: (val) { + // String? value = val.value as String?; + // if (value != null && + // value.trim().isNotEmpty) { + // context.read().add( + // DigitScannerEvent.handleScanner( + // barCode: [], + // qrCode: [value], + // manualCode: value, + // ), + // ); + // } else { + // clearQRCodes(); + // } + // }, + // suffix: IconButton( + // onPressed: () { + // //[TODO: Add route to auto_route] + // Navigator.of(context).push( + // MaterialPageRoute( + // builder: (context) => + // const DigitScannerPage( + // quantity: 5, + // isGS1code: false, + // singleValue: false, + // ), + // settings: const RouteSettings( + // name: '/qr-scanner'), + // ), + // ); + // }, + // icon: Icon( + // Icons.qr_code_2, + // color: theme.colorScheme.secondary, + // ), + // ), + // isRequired: deliveryTeamSelected, + // maxLines: 3, + // formControlName: _deliveryTeamKey, + // ), + ), + ReactiveWrapperField( formControlName: _transactionQuantityKey, - keyboardType: - const TextInputType.numberWithOptions( - decimal: true, - ), - isRequired: true, validationMessages: { "number": (object) => localizations.translate( @@ -821,182 +896,208 @@ class StockDetailsPageState extends LocalizedState { '${quantityCountLabel}_MIN_ERROR', ), }, - onChanged: (val) { - if (val.value != null) { - if (val.value > 10000000000) { - form - .control(_transactionQuantityKey) - .value = 10000; - } - } - }, - label: localizations.translate( - quantityCountLabel, - ), - ), - if (isWareHouseMgr) - DigitTextFormField( - key: const Key(_waybillNumberKey), + showErrors: (control) => + control.invalid && control.touched, + builder: (field) { + return LabeledField( label: localizations.translate( - i18.stockDetails.waybillNumberLabel, - ), - formControlName: _waybillNumberKey, - keyboardType: - const TextInputType.numberWithOptions( - decimal: true, + quantityCountLabel, ), - validationMessages: { - 'maxLength': (object) => localizations - .translate( - i18.common.maxCharsRequired) - .replaceAll('{}', '200'), - 'minLength': (object) => localizations - .translate( - i18.common.min2CharsRequired) - .replaceAll('{}', ''), - }), - if (isWareHouseMgr) - DigitTextFormField( - label: localizations.translate( - i18.stockDetails - .quantityOfProductIndicatedOnWaybillLabel, + isRequired: true, + child: BaseDigitFormInput( + errorMessage: field.errorText, + keyboardType: const TextInputType + .numberWithOptions( + decimal: true, + ), + onChange: (val) { + field.control.markAsTouched(); + if (int.parse(val) > 10000000000) { + field.control.value = 10000; + } else { + if (val != '') { + field.control.value = + int.parse(val); + } else { + field.control.value = null; + } + } + }, ), - formControlName: _waybillQuantityKey, - onChanged: (val) { - if (val.toString().isEmpty || - val.value == null) { - form - .control(_waybillQuantityKey) - .value = '0'; - } - }), - if (isWareHouseMgr) - transportTypes.isNotEmpty - ? DigitReactiveDropdown( - key: const Key(_typeOfTransportKey), - isRequired: false, - label: localizations.translate( - i18.stockDetails.transportTypeLabel, - ), - valueMapper: (e) => e, - onChanged: (value) { - setState(() { - form.control( - _typeOfTransportKey, - ); - }); - }, - initialValue: - transportTypes.firstOrNull?.name, - menuItems: transportTypes.map( - (e) { - return localizations - .translate(e.name); - }, - ).toList(), - formControlName: _typeOfTransportKey, - ) - : const Offstage(), - if (isWareHouseMgr) - DigitTextFormField( - label: localizations.translate( - i18.stockDetails.vehicleNumberLabel, - ), - formControlName: _vehicleNumberKey, - ), - DigitTextFormField( - label: localizations.translate( - i18.stockDetails.commentsLabel, - ), - minLines: 2, - maxLines: 3, - formControlName: _commentsKey, - ), - scannerState.barCodes.isEmpty - ? DigitOutlineIconButton( - buttonStyle: OutlinedButton.styleFrom( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.zero, - ), + ); + }), + if (isWareHouseMgr) + ReactiveWrapperField( + formControlName: _waybillNumberKey, + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockDetails.waybillNumberLabel, ), - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 5, - isGS1code: true, - singleValue: false, + onChange: (val) { + field.control.value = val; + }, + ); + }), + if (isWareHouseMgr) + ReactiveWrapperField( + formControlName: _waybillQuantityKey, + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockDetails + .quantityOfProductIndicatedOnWaybillLabel, + ), + onChange: (val) { + if (val == '') { + field.control.value = '0'; + } else { + field.control.value = val; + } + }, + ); + }), + if (isWareHouseMgr) + transportTypes.isNotEmpty + ? ReactiveWrapperField( + formControlName: _typeOfTransportKey, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.stockDetails + .transportTypeLabel, + ), + child: DigitDropdown( + emptyItemText: + localizations.translate( + i18.common.noMatchFound, ), - settings: const RouteSettings( - name: '/qr-scanner'), + items: transportTypes.map((type) { + return DropdownItem( + name: localizations + .translate(type.name), + code: type.code, + ); + }).toList(), + onSelect: (value) { + field.control.value = + value.name; + }, ), ); }, - icon: Icons.qr_code, + ) + : const Offstage(), + if (isWareHouseMgr) + ReactiveWrapperField( + formControlName: _vehicleNumberKey, + builder: (field) { + return InputField( + type: InputType.text, label: localizations.translate( - i18.common.scanBales, + i18.stockDetails.vehicleNumberLabel, ), - ) - : Column(children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate(i18 - .stockDetails - .scannedResources), - style: DigitTheme - .instance - .mobileTheme - .textTheme - .labelSmall, - ), + onChange: (val) { + field.control.value = val; + }, + ); + }), + ReactiveWrapperField( + formControlName: _commentsKey, + builder: (field) { + return InputField( + type: InputType.textArea, + label: localizations.translate( + i18.stockDetails.commentsLabel, + ), + onChange: (val) { + field.control.value = val; + }, + ); + }), + scannerState.barCodes.isEmpty + ? DigitButton( + mainAxisSize: MainAxisSize.max, + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + onPressed: () { + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: true, + singleValue: false, ), - Padding( - padding: const EdgeInsets.only( - bottom: kPadding * 2, - ), - child: IconButton( - alignment: - Alignment.centerRight, - color: - theme.colorScheme.secondary, - icon: const Icon(Icons.edit), - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 5, - isGS1code: true, - singleValue: false, - ), - settings: - const RouteSettings( - name: - '/qr-scanner'), + settings: const RouteSettings( + name: '/qr-scanner'), + ), + ); + }, + prefixIcon: Icons.qr_code, + label: localizations.translate( + i18.common.scanBales, + ), + ) + : Column(children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Align( + alignment: Alignment.centerLeft, + child: Text( + localizations.translate(i18 + .stockDetails + .scannedResources), + style: DigitTheme + .instance + .mobileTheme + .textTheme + .labelSmall, + ), + ), + Padding( + padding: const EdgeInsets.only( + bottom: spacer4, + ), + child: IconButton( + alignment: Alignment.centerRight, + color: theme + .colorTheme.primary.primary1, + icon: const Icon(Icons.edit), + onPressed: () { + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: true, + singleValue: false, ), - ); - }, - ), + settings: + const RouteSettings( + name: + '/qr-scanner'), + ), + ); + }, ), - ], - ), - ...scannedResources.map((e) => Align( - alignment: Alignment.centerLeft, - child: Text(e - .elements.values.first.data - .toString()), - )) - ]) - ], - ), + ), + ], + ), + ...scannedResources.map((e) => Align( + alignment: Alignment.centerLeft, + child: Text(e + .elements.values.first.data + .toString()), + )) + ]) + ], ), ], ); diff --git a/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart b/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart index de24d5850..023454d86 100644 --- a/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart +++ b/packages/inventory_management/lib/pages/record_stock/warehouse_details.dart @@ -1,11 +1,15 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_toaster.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:intl/intl.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; import 'package:reactive_forms/reactive_forms.dart'; @@ -35,6 +39,7 @@ class WarehouseDetailsPageState extends LocalizedState { static const _teamCodeKey = 'teamCode'; bool deliveryTeamSelected = false; String? selectedFacilityId; + TextEditingController controller1 = TextEditingController(); @override void initState() { @@ -65,6 +70,7 @@ class WarehouseDetailsPageState extends LocalizedState { Widget build(BuildContext context) { final theme = Theme.of(context); final recordStockBloc = BlocProvider.of(context); + final textTheme = theme.digitTextTheme(context); return InventorySingleton().projectId.isEmpty ? Center( @@ -123,131 +129,118 @@ class WarehouseDetailsPageState extends LocalizedState { footer: SizedBox( child: DigitCard( margin: const EdgeInsets.fromLTRB( - 0, kPadding, 0, 0), - padding: const EdgeInsets.fromLTRB( - kPadding, - 0, - kPadding, - 0, - ), - child: ReactiveFormConsumer( - builder: (context, form, child) { - return DigitElevatedButton( - onPressed: !form.valid - ? null - : () { - form.markAllAsTouched(); - if (!form.valid) { - return; - } - final dateOfRecord = form - .control(_dateOfEntryKey) - .value as DateTime; + 0, spacer2, 0, 0), + children:[ + ReactiveFormConsumer( + builder: (context, form, child) { + return DigitButton( + type: DigitButtonType.primary, + mainAxisSize: MainAxisSize.max, + size: DigitButtonSize.large, + isDisabled: !form.valid, + label: localizations.translate( + i18.householdDetails.actionLabel, + ), + onPressed: !form.valid + ? (){} + : () { + form.markAllAsTouched(); + if (!form.valid) { + return; + } + final dateOfRecord = form + .control(_dateOfEntryKey) + .value as DateTime; - final teamCode = form - .control(_teamCodeKey) - .value as String?; + final teamCode = form + .control(_teamCodeKey) + .value as String?; - final facility = - deliveryTeamSelected - ? FacilityModel( - id: teamCode ?? - 'Delivery Team', - ) - : selectedFacilityId != - null - ? FacilityModel( - id: selectedFacilityId - .toString(), - ) - : null; + final facility = + deliveryTeamSelected + ? FacilityModel( + id: teamCode ?? + 'Delivery Team', + ) + : selectedFacilityId != + null + ? FacilityModel( + id: selectedFacilityId + .toString(), + ) + : null; - context - .read() - .add( - const DigitScannerEvent - .handleScanner( - qrCode: [], - barCode: []), - ); - if (facility == null) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.stockDetails - .facilityRequired, - ), - true, - theme, - ), - ); - } else if (deliveryTeamSelected && - (teamCode == null || - teamCode - .trim() - .isEmpty)) { - DigitToast.show( - context, - options: DigitToastOptions( - localizations.translate( - i18.stockDetails - .teamCodeRequired, - ), - true, - theme, - ), - ); - } else { - recordStockBloc.add( - RecordStockSaveTransactionDetailsEvent( - dateOfRecord: dateOfRecord, - facilityModel: InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr! - ? FacilityModel( - id: teamCode - .toString(), - ) - : facility, - primaryId: facility.id == - "Delivery Team" - ? teamCode ?? '' - : facility.id, - primaryType: (InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr! && - deliveryTeamSelected) || - deliveryTeamSelected - ? "STAFF" - : "WAREHOUSE", - ), - ); - context.router.push( - StockDetailsRoute(), - ); - } - }, - child: child!, - ); - }, - child: Center( - child: Text( - localizations.translate( - i18.householdDetails.actionLabel, - ), - ), + context + .read() + .add( + const DigitScannerEvent + .handleScanner( + qrCode: [], + barCode: []), + ); + if (facility == null) { + Toast.showToast( + type: ToastType.error, + context, + message: localizations.translate( + i18.stockDetails + .facilityRequired, + ), + ); + } else if (deliveryTeamSelected && + (teamCode == null || + teamCode + .trim() + .isEmpty)) { + Toast.showToast( + context, + type: ToastType.error, + message:localizations.translate( + i18.stockDetails + .teamCodeRequired, + ), + ); + } else { + recordStockBloc.add( + RecordStockSaveTransactionDetailsEvent( + dateOfRecord: dateOfRecord, + facilityModel: InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr! + ? FacilityModel( + id: teamCode + .toString(), + ) + : facility, + primaryId: facility.id == + "Delivery Team" + ? teamCode ?? '' + : facility.id, + primaryType: (InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr! && + deliveryTeamSelected) || + deliveryTeamSelected + ? "STAFF" + : "WAREHOUSE", + ), + ); + context.router.push( + StockDetailsRoute(), + ); + } + }, + ); + }, ), - ), + ] ), ), children: [ DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + margin: const EdgeInsets.all(spacer2), children: [ Text( InventorySingleton().isDistributor! && @@ -261,44 +254,56 @@ class WarehouseDetailsPageState extends LocalizedState { i18.warehouseDetails .warehouseDetailsLabel, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, ), - Column(children: [ - DigitDateFormPicker( - isEnabled: false, + ReactiveWrapperField( formControlName: _dateOfEntryKey, - label: localizations.translate( - i18.warehouseDetails.dateOfReceipt, - ), - isRequired: false, - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - ), - DigitTextFormField( - readOnly: true, + builder: (field) { + return InputField( + type: InputType.date, + label: localizations.translate( + i18.warehouseDetails + .dateOfReceipt, + ), + confirmText: localizations.translate( + i18.common.coreCommonOk, + ), + cancelText: localizations.translate( + i18.common.coreCommonCancel, + ), + initialValue: DateFormat( + 'dd/MM/yy') + .format( + field.control.value), + readOnly: true, + ); + }), + ReactiveWrapperField( formControlName: _administrativeUnitKey, - label: localizations.translate( - i18.warehouseDetails - .administrativeUnit, - ), - ), - ]), + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.warehouseDetails + .administrativeUnit, + ), + initialValue: field.control.value, + readOnly: true, + ); + } + ), InkWell( onTap: () async { clearQRCodes(); form.control(_teamCodeKey).value = ''; final facility = - await Navigator.of(context).push( + await Navigator.of(context).push( MaterialPageRoute( builder: (context) => InventoryFacilitySelectionPage( - facilities: facilities, - ), + facilities: facilities, + ), ), ); @@ -306,6 +311,8 @@ class WarehouseDetailsPageState extends LocalizedState { form.control(_warehouseKey).value = localizations.translate( 'FAC_${facility.id}'); + controller1.text = localizations.translate( + 'FAC_${facility.id}'); setState(() { selectedFacilityId = facility.id; @@ -321,123 +328,82 @@ class WarehouseDetailsPageState extends LocalizedState { } }, child: IgnorePointer( - child: DigitTextFormField( - hideKeyboard: true, - padding: const EdgeInsets.only( - bottom: kPadding, - ), - isRequired: true, - label: localizations.translate( - i18.stockReconciliationDetails - .facilityLabel, - ), - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.nameLabelText}_IS_REQUIRED', - ), - }, - suffix: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.search), - ), - formControlName: _warehouseKey, - readOnly: true, - onTap: () async { - context - .read() - .add( - const DigitScannerEvent - .handleScanner( - barCode: [], - qrCode: [], + child: ReactiveWrapperField( + formControlName: _warehouseKey, + validationMessages: { + 'required': (object) => + localizations.translate( + '${i18.individualDetails + .nameLabelText}_IS_REQUIRED', ), - ); - form.control(_teamCodeKey).value = - ''; - final facility = - await Navigator.of(context) - .push( - MaterialPageRoute( - builder: (context) => - InventoryFacilitySelectionPage( - facilities: facilities, + }, + showErrors: (control) => control.invalid && control.touched, + builder: (field) { + return InputField( + type: InputType.search, + label: localizations.translate( + i18.stockReconciliationDetails + .facilityLabel, ), - ), - ); - - if (facility == null) return; - form.control(_warehouseKey).value = - localizations.translate( - 'FAC_${facility.id}'); - - setState(() { - selectedFacilityId = facility.id; - }); - if (facility.id == - 'Delivery Team') { - setState(() { - deliveryTeamSelected = true; - }); - } else { - setState(() { - deliveryTeamSelected = false; - }); + controller: controller1, + isRequired: true, + errorMessage: field.errorText, + onChange: (value) { + field.control.markAsTouched(); + }, + ); } - }, ), ), ), if (deliveryTeamSelected) - DigitTextFormField( - label: localizations.translate( - i18.stockReconciliationDetails - .teamCodeLabel, - ), - formControlName: _teamCodeKey, - onChanged: (val) { - String? value = val as String?; - if (value != null && - value.trim().isNotEmpty) { - context - .read() - .add( - DigitScannerEvent - .handleScanner( - barCode: [], - qrCode: [value], + ReactiveWrapperField( + formControlName: _teamCodeKey, + builder: (field) { + return InputField( + type: InputType.text, + label: localizations.translate( + i18.stockReconciliationDetails + .teamCodeLabel, + ), + isRequired: deliveryTeamSelected, + suffixIcon: Icons.qr_code_2, + onSuffixTap: (value){ + //[TODO: Add route to auto_route] + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 5, + isGS1code: false, + singleValue: false, + ), + settings: const RouteSettings( + name: '/qr-scanner'), ), ); - } else { - clearQRCodes(); - } - }, - isRequired: true, - suffix: IconButton( - onPressed: () { - //[TODO: Add route to auto_route] - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 1, - isGS1code: false, - singleValue: false, - ), - settings: const RouteSettings( - name: '/qr-scanner'), - ), + }, + onChange: (val) { + String? value = val; + if (value != null && + value.trim().isNotEmpty) { + context + .read() + .add( + DigitScannerEvent + .handleScanner( + barCode: [], + qrCode: [value], + ), + ); + } else { + clearQRCodes(); + } + }, ); - }, - icon: Icon( - Icons.qr_code_2, - color: theme.colorScheme.secondary, - ), - ), - ), - ], - ), - ), + }) + ]), + ], ); }, diff --git a/packages/inventory_management/lib/pages/reports/report_details.dart b/packages/inventory_management/lib/pages/reports/report_details.dart index 1cefbb72c..22e86346d 100644 --- a/packages/inventory_management/lib/pages/reports/report_details.dart +++ b/packages/inventory_management/lib/pages/reports/report_details.dart @@ -1,7 +1,10 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; -import 'package:digit_components/digit_components.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; @@ -21,7 +24,6 @@ import '../../models/entities/stock.dart'; import '../../models/entities/stock_reconciliation.dart'; import '../../utils/utils.dart'; import '../../widgets/back_navigation_help_header.dart'; -import '../facility_selection.dart'; @RoutePage() class InventoryReportDetailsPage extends LocalizedStatefulWidget { @@ -44,6 +46,8 @@ class InventoryReportDetailsPageState static const _facilityKey = 'facilityKey'; String? selectedFacilityId; + TextEditingController controller1 = TextEditingController(); + /// Handles the selection of a facility and product variant from the form and triggers the loading of the corresponding inventory report data. /// /// This function takes a [FormGroup] and an [InventoryReportBloc] as parameters. @@ -118,17 +122,17 @@ class InventoryReportDetailsPageState ), child: Scaffold( bottomNavigationBar: DigitCard( - padding: const EdgeInsets.all(8.0), - child: DigitElevatedButton( - onPressed: () => context.router.popUntilRoot(), - child: Text( - localizations.translate( + children: [ + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, + mainAxisSize: MainAxisSize.max, + onPressed: () => context.router.popUntilRoot(), + label: localizations.translate( i18.inventoryReportDetails.backToHomeButtonLabel, ), - textAlign: TextAlign.center, - maxLines: 1, ), - ), + ], ), body: BlocBuilder( builder: (context, inventoryReportState) { @@ -147,13 +151,14 @@ class InventoryReportDetailsPageState children: [ const BackNavigationHelpHeaderWidget(), Container( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.centerLeft, child: Text( title, maxLines: 1, - style: Theme.of(context).textTheme.displayMedium, + style: + Theme.of(context).digitTextTheme(context).headingXl, ), ), ), @@ -190,31 +195,32 @@ class InventoryReportDetailsPageState return Column( children: [ DigitCard( - child: Column( - children: [ - if (isWareHouseManager) - BlocConsumer( - listener: (context, state) => - state.whenOrNull( - empty: () => - NoFacilitiesAssignedDialog - .show( - context, - localizations, - ), + margin: const EdgeInsets.all(spacer2), + children: [ + if (isWareHouseManager) + BlocConsumer( + listener: (context, state) => + state.whenOrNull( + empty: () => + NoFacilitiesAssignedDialog + .show( + context, + localizations, ), - builder: (context, state) { - final facilities = - state.whenOrNull( - fetched: (facilities, - allFacilities) => - facilities, - ) ?? - []; - - return InkWell( - onTap: () async { + ), + builder: (context, state) { + final facilities = + state.whenOrNull( + fetched: (facilities, + allFacilities) => + facilities, + ) ?? + []; + + return InkWell( + onTap: () async { + if (mounted) { final stockReconciliationBloc = context.read< StockReconciliationBloc>(); @@ -226,8 +232,9 @@ class InventoryReportDetailsPageState facilities)) as FacilityModel?; - if (facility == null) + if (facility == null) { return; + } form .control(_facilityKey) .value = @@ -239,143 +246,125 @@ class InventoryReportDetailsPageState selectedFacilityId = facility.id; }); + + controller1.text = + localizations.translate( + 'FAC_${facility.id}'); stockReconciliationBloc.add( StockReconciliationSelectFacilityEvent( facility, ), ); - handleSelection( - form, - context.read< - InventoryReportBloc>()); + if (mounted) { + handleSelection( + form, + context.read< + InventoryReportBloc>()); + } + } + }, + child: IgnorePointer( + child: ReactiveWrapperField( + formControlName: + _facilityKey, + builder: (field) { + return InputField( + type: InputType.search, + isRequired: true, + controller: controller1, + label: localizations + .translate( + i18.stockReconciliationDetails + .facilityLabel, + ), + ); + }, + ), + ), + ); + }, + ), + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: + CircularProgressIndicator(), + ), + empty: () => Center( + child: Text( + i18.stockDetails + .noProductsFound, + ), + ), + fetched: (productVariants) { + return ReactiveWrapperField( + formControlName: + _productVariantKey, + validationMessages: { + 'required': (object) => + localizations.translate( + i18.common + .corecommonRequired, + ), }, - child: IgnorePointer( - child: DigitTextFormField( - key: const Key( - _facilityKey), + builder: (field) { + return LabeledField( + isRequired: true, label: localizations .translate( i18.stockReconciliationDetails - .facilityLabel, - ), - suffix: const Padding( - padding: - EdgeInsets.all(8.0), - child: - Icon(Icons.search), + .productLabel, ), - formControlName: - _facilityKey, - readOnly: false, - isRequired: true, - onTap: () async { - final stockReconciliationBloc = - context.read< - StockReconciliationBloc>(); - - final facility = await context - .router - .push(InventoryFacilitySelectionRoute( - facilities: - facilities)) - as FacilityModel?; - - if (facility == null) - return; - form - .control( - _facilityKey) - .value = + child: DigitDropdown( + emptyItemText: localizations .translate( - 'FAC_${facility.id}', - ); - - setState(() { - selectedFacilityId = - facility.id; - }); - form - .control( - _facilityKey) - .value = facility; - stockReconciliationBloc - .add( - StockReconciliationSelectFacilityEvent( - facility, - ), - ); - - handleSelection( - form, - context.read< - InventoryReportBloc>()); - }, - ), - ), + i18.common + .noMatchFound, + ), + items: productVariants + .map((variant) { + return DropdownItem( + name: localizations + .translate( + variant.sku ?? + variant.id, + ), + code: variant.id, + ); + }).toList(), + onSelect: (value) { + /// Find the selected product variant model by matching the id + final selectedVariant = + productVariants + .firstWhere( + (variant) => + variant.id == + value.code, + ); + + /// Update the form control with the selected product variant model + field.control.value = + selectedVariant; + + handleSelection( + form, + context.read< + InventoryReportBloc>()); + }, + ), + ); + }, ); }, - ), - BlocBuilder< - InventoryProductVariantBloc, - InventoryProductVariantState>( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: - CircularProgressIndicator(), - ), - empty: () => Center( - child: Text( - i18.stockDetails - .noProductsFound, - ), - ), - fetched: (productVariants) { - return DigitReactiveSearchDropdown< - ProductVariantModel>( - key: const Key( - _productVariantKey), - label: - localizations.translate( - i18.stockReconciliationDetails - .productLabel, - ), - form: form, - menuItems: productVariants, - formControlName: - _productVariantKey, - isRequired: true, - valueMapper: (value) { - return localizations - .translate( - value.sku ?? value.id, - ); - }, - onSelected: (value) { - handleSelection( - form, - context.read< - InventoryReportBloc>()); - }, - validationMessage: - localizations.translate( - i18.common - .corecommonRequired, - ), - emptyText: - localizations.translate( - i18.common.noMatchFound, - ), - ); - }, - ); - }, - ), - ], - ), + ); + }, + ), + ], ), Expanded( child: Align( @@ -395,8 +384,7 @@ class InventoryReportDetailsPageState if (data.isEmpty) { return Padding( padding: const EdgeInsets.all( - kPadding * 2, - ), + spacer4), child: _NoReportContent( title: title, message: noRecordsMessage, @@ -505,8 +493,7 @@ class InventoryReportDetailsPageState if (data.isEmpty) { return Padding( padding: const EdgeInsets.all( - kPadding * 2, - ), + spacer4), child: _NoReportContent( title: title, message: noRecordsMessage, @@ -799,6 +786,9 @@ class InventoryReportDetailsPageState } return (double.tryParse(count.value.toString()) ?? 0.0).toStringAsFixed(0); } + + handleFacilitySelection( + FormGroup form, List facilities) async {} } class _ReportDetailsContent extends StatelessWidget { @@ -813,12 +803,12 @@ class _ReportDetailsContent extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.all(kPadding), + padding: const EdgeInsets.all(spacer2), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - const SizedBox(height: kPadding * 2), + const SizedBox(height: spacer4), Flexible( child: ReadonlyDigitGrid( data: data, @@ -847,7 +837,7 @@ class _NoReportContent extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox( - height: kPadding * 2, + height: spacer4, width: double.maxFinite, ), Center( diff --git a/packages/inventory_management/lib/pages/reports/report_selection.dart b/packages/inventory_management/lib/pages/reports/report_selection.dart index 5f7cfd145..ad2301125 100644 --- a/packages/inventory_management/lib/pages/reports/report_selection.dart +++ b/packages/inventory_management/lib/pages/reports/report_selection.dart @@ -1,5 +1,7 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/menu_card.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/router/inventory_router.gm.dart'; @@ -30,6 +32,7 @@ class InventoryReportSelectionPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ScrollableContent( @@ -43,112 +46,130 @@ class InventoryReportSelectionPageState children: [ Padding( padding: const EdgeInsets.fromLTRB( - kPadding * 2, kPadding, kPadding * 2, kPadding), + spacer4, spacer2, spacer4, spacer2), child: Align( alignment: Alignment.topLeft, child: Text( localizations.translate(i18.inventoryReportSelection.label), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.center, ), ), ), Column(children: [ - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportReceiptLabel, - ), - description: localizations.translate(i18 - .inventoryReportSelection - .inventoryReportReceiptDescription), - prefixIcon: Icons.login, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.receipt, + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportReceiptLabel, + ), + description: localizations.translate(i18 + .inventoryReportSelection + .inventoryReportReceiptDescription), + icon: Icons.login, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.receipt, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportIssuedLabel, - ), - description: localizations.translate(i18 - .inventoryReportSelection - .inventoryReportIssuedDescription), - prefixIcon: Icons.logout, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.dispatch, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportIssuedLabel, + ), + description: localizations.translate(i18 + .inventoryReportSelection + .inventoryReportIssuedDescription), + icon: Icons.logout, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.dispatch, + ), ), ), ), - DigitListView( - title: localizations.translate(i18 - .inventoryReportSelection.inventoryReportReturnedLabel), - description: localizations.translate( - i18.inventoryReportSelection - .inventoryReportReturnedDescription, - ), - prefixIcon: Icons.settings_backup_restore, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.returned, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate(i18 + .inventoryReportSelection.inventoryReportReturnedLabel), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportReturnedDescription, + ), + icon: Icons.settings_backup_restore, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.returned, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportDamagedLabel, - ), - description: localizations.translate( - i18.inventoryReportSelection - .inventoryReportDamagedDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.damage, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportDamagedLabel, + ), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportDamagedDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.damage, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection.inventoryReportLossLabel, - ), - description: localizations.translate( - i18.inventoryReportSelection.inventoryReportLossDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.loss, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection.inventoryReportLossLabel, + ), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportLossDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.loss, + ), ), ), ), - DigitListView( - title: localizations.translate( - i18.inventoryReportSelection - .inventoryReportReconciliationLabel, - ), - description: localizations.translate( - i18.inventoryReportSelection - .inventoryReportReconciliationDescription, - ), - prefixIcon: Icons.store, - sufixIcon: Icons.arrow_circle_right, - onPressed: () => context.router.push( - InventoryReportDetailsRoute( - reportType: InventoryReportType.reconciliation, + const SizedBox(height: spacer4), + Padding( + padding: const EdgeInsets.symmetric(horizontal: spacer2), + child: MenuCard( + heading: localizations.translate( + i18.inventoryReportSelection + .inventoryReportReconciliationLabel, + ), + description: localizations.translate( + i18.inventoryReportSelection + .inventoryReportReconciliationDescription, + ), + icon: Icons.store, + onTap: () => context.router.push( + InventoryReportDetailsRoute( + reportType: InventoryReportType.reconciliation, + ), ), ), ), ]), - const SizedBox(height: 16), + const SizedBox(height: spacer4), ], ), ], diff --git a/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart b/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart index a1257b850..ecb0cbcd1 100644 --- a/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart +++ b/packages/inventory_management/lib/pages/stock_reconciliation/stock_reconciliation.dart @@ -1,7 +1,13 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; -import 'package:digit_components/widgets/atoms/digit_divider.dart'; import 'package:digit_data_model/data_model.dart'; +import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_divider.dart'; +import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; +import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; @@ -38,6 +44,7 @@ class StockReconciliationPageState static const _manualCountKey = 'manualCountKey'; static const _reconciliationCommentsKey = 'reconciliationCommentsKey'; String? selectedFacilityId; + TextEditingController controller1 = TextEditingController(); FormGroup _form(bool isDistributor) { return fb.group({ @@ -48,9 +55,9 @@ class StockReconciliationPageState _manualCountKey: FormControl( value: '0', validators: [ - Validators.number, + Validators.number(), Validators.required, - CustomValidator.validStockCount, + Validators.delegate(CustomValidator.validStockCount) ], ), _reconciliationCommentsKey: FormControl(), @@ -103,500 +110,497 @@ class StockReconciliationPageState builder: (ctx, form, child) { return Scaffold( body: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const BackNavigationHelpHeaderWidget(), footer: SizedBox( child: DigitCard( - 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 || - (form - .control(_productVariantKey) - .value == - null) - ? null - : () async { - form.markAllAsTouched(); - FocusManager.instance.primaryFocus - ?.unfocus(); - if (!form.valid) return; + margin: const EdgeInsets.fromLTRB( + 0, spacer2, 0, 0), + children: [ + ReactiveFormConsumer( + builder: (ctx, form, child) => + DigitButton( + mainAxisSize: MainAxisSize.max, + size: DigitButtonSize.large, + type: DigitButtonType.primary, + onPressed: !form.valid || + (form + .control( + _productVariantKey) + .value == + null) + ? () {} + : () async { + form.markAllAsTouched(); + FocusManager + .instance.primaryFocus + ?.unfocus(); + if (!form.valid) return; - final bloc = ctx.read< - StockReconciliationBloc>(); + final bloc = ctx.read< + StockReconciliationBloc>(); - final facilityId = - InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr! - ? FacilityModel( - id: InventorySingleton() - .loggedInUserUuid!, - ) - : FacilityModel( - id: selectedFacilityId - .toString(), - ); - - final productVariant = form - .control(_productVariantKey) - .value as ProductVariantModel; + final facilityId = + InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr! + ? FacilityModel( + id: InventorySingleton() + .loggedInUserUuid!, + ) + : FacilityModel( + id: selectedFacilityId + .toString(), + ); - final calculatedCount = form - .control(_manualCountKey) - .value as String; + final productVariant = form + .control(_productVariantKey) + .value as ProductVariantModel; - final comments = form - .control( - _reconciliationCommentsKey, - ) - .value as String?; + final calculatedCount = form + .control(_manualCountKey) + .value as String; - final model = - StockReconciliationModel( - clientReferenceId: - IdGen.i.identifier, - dateOfReconciliation: stockState - .dateOfReconciliation - .millisecondsSinceEpoch, - facilityId: facilityId.id, - productVariantId: - productVariant.id, - calculatedCount: stockState - .stockInHand - .toInt(), - commentsOnReconciliation: - comments, - physicalCount: int.tryParse( - calculatedCount, - ) ?? - 0, - auditDetails: AuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: InventorySingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: - InventorySingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - ); + final comments = form + .control( + _reconciliationCommentsKey, + ) + .value as String?; - final submit = - await DigitDialog.show( - context, - options: DigitDialogOptions( - key: const Key('submitDialog'), - titleText: - localizations.translate( - i18.stockReconciliationDetails - .dialogTitle, - ), - contentText: - localizations.translate( - i18.stockReconciliationDetails - .dialogContent, - ), - primaryAction: - DigitDialogActions( - label: - localizations.translate( - i18.common.coreCommonSubmit, + final model = + StockReconciliationModel( + clientReferenceId: + IdGen.i.identifier, + dateOfReconciliation: stockState + .dateOfReconciliation + .millisecondsSinceEpoch, + facilityId: facilityId.id, + productVariantId: + productVariant.id, + calculatedCount: stockState + .stockInHand + .toInt(), + commentsOnReconciliation: + comments, + physicalCount: int.tryParse( + calculatedCount, + ) ?? + 0, + auditDetails: AuditDetails( + createdBy: + InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), ), - action: (context) { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - ), - secondaryAction: - DigitDialogActions( - label: - localizations.translate( - i18.common.coreCommonCancel, + clientAuditDetails: + ClientAuditDetails( + createdBy: + InventorySingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + InventorySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), ), - action: (context) => + ); + + final submit = + await showCustomPopup( + context: context, + builder: (popupContext) => + Popup( + title: + localizations.translate( + i18.stockReconciliationDetails + .dialogTitle, + ), + onOutsideTap: () { Navigator.of( - context, - rootNavigator: true, - ).pop(false), - ), - ), - ); + popupContext, + rootNavigator: true, + ).pop(false); + }, + description: + localizations.translate( + i18.stockReconciliationDetails + .dialogContent, + ), + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations + .translate( + i18.common + .coreCommonSubmit, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(true); + }, + type: DigitButtonType + .primary, + size: DigitButtonSize + .large, + ), + DigitButton( + label: localizations + .translate( + i18.common + .coreCommonCancel, + ), + onPressed: () { + Navigator.of( + popupContext, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType + .secondary, + size: DigitButtonSize + .large, + ), + ], + ), + ) as bool; - if (submit ?? false) { - bloc.add( - StockReconciliationCreateEvent( - model, - ), - ); - } - }, - child: Center( - child: Text( - localizations.translate( + if (submit ?? false) { + bloc.add( + StockReconciliationCreateEvent( + model, + ), + ); + } + }, + label: localizations.translate( i18.common.coreCommonSubmit, ), ), ), - ), - ), - ), + ]), ), children: [ DigitCard( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - localizations.translate( - i18.stockReconciliationDetails - .reconciliationPageTitle, + margin: const EdgeInsets.all(spacer2), + children: [ + Text( + localizations.translate( + i18.stockReconciliationDetails + .reconciliationPageTitle, + ), + style: Theme.of(context).digitTextTheme(context).headingXl, + ), + if (InventorySingleton().isWareHouseMgr!) + BlocConsumer( + listener: (context, state) => + state.whenOrNull( + empty: () => + NoFacilitiesAssignedDialog.show( + context, + localizations, + ), ), - style: Theme.of(context) - .textTheme - .displayMedium, + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: + CircularProgressIndicator(), + ), + fetched: + (facilities, allFacilities) { + return Column( + children: [ + InkWell( + onTap: () async { + final stockReconciliationBloc = + context.read< + StockReconciliationBloc>(); + final facility = await context + .router + .push(InventoryFacilitySelectionRoute( + facilities: + facilities)) + as FacilityModel?; + + if (facility == null) + return; + form + .control(_facilityKey) + .value = + localizations + .translate( + 'FAC_${facility.id}', + ); + controller1.text = + localizations + .translate( + 'FAC_${facility.id}', + ); + setState(() { + selectedFacilityId = + facility.id; + }); + stockReconciliationBloc + .add( + StockReconciliationSelectFacilityEvent( + facility, + ), + ); + }, + child: IgnorePointer( + child: + ReactiveWrapperField( + formControlName: + _facilityKey, + builder: (field) { + return InputField( + type: InputType + .search, + isRequired: true, + controller: + controller1, + label: localizations + .translate( + i18.stockReconciliationDetails + .facilityLabel, + ), + ); + }, + ), + ), + ), + ], + ); + }); + }, ), - if (InventorySingleton().isWareHouseMgr!) - BlocConsumer( - listener: (context, state) => - state.whenOrNull( - empty: () => - NoFacilitiesAssignedDialog.show( - context, - localizations, + BlocBuilder( + builder: (context, state) { + return state.maybeWhen( + orElse: () => const Offstage(), + loading: () => const Center( + child: CircularProgressIndicator(), + ), + empty: () => Center( + child: Text( + i18.stockDetails.noProductsFound, ), ), - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: - CircularProgressIndicator(), + fetched: (productVariants) { + return ReactiveWrapperField( + formControlName: _productVariantKey, + validationMessages: { + 'required': (error) => + localizations.translate(i18 + .common + .corecommonRequired), + }, + showErrors: (control) => + control.invalid && + control.touched, + builder: (field) { + return LabeledField( + isRequired: true, + label: localizations.translate( + i18.stockReconciliationDetails + .productLabel, + ), + child: DigitDropdown( + emptyItemText: + localizations.translate( + i18.common.noMatchFound, ), - fetched: - (facilities, allFacilities) { - return InkWell( - onTap: () async { - final stockReconciliationBloc = - context.read< - StockReconciliationBloc>(); - final facility = await context - .router - .push(InventoryFacilitySelectionRoute( - facilities: - facilities)) - as FacilityModel?; - - if (facility == null) { - return; - } - form - .control(_facilityKey) - .value = - localizations.translate( - 'FAC_${facility.id}', - ); - setState(() { - selectedFacilityId = - facility.id; - }); - stockReconciliationBloc.add( - StockReconciliationSelectFacilityEvent( - facility, - ), - ); - }, - child: IgnorePointer( - child: DigitTextFormField( - key: const Key( - _facilityKey), - hideKeyboard: true, - label: localizations + items: productVariants + .map((variant) { + return DropdownItem( + name: localizations .translate( - i18.stockReconciliationDetails - .facilityLabel, - ), - suffix: const Padding( - padding: - EdgeInsets.all(8.0), - child: - Icon(Icons.search), + variant.sku ?? + variant.id, ), - formControlName: - _facilityKey, - readOnly: true, - isRequired: true, - onTap: () async { - final stockReconciliationBloc = - context.read< - StockReconciliationBloc>(); + code: variant.id, + ); + }).toList(), + onSelect: (value) { + field.control + .markAsTouched(); - final facility = await context - .router - .push(InventoryFacilitySelectionRoute( - facilities: - facilities)) - as FacilityModel?; + /// Find the selected product variant model by matching the id + final selectedVariant = + productVariants + .firstWhere( + (variant) => + variant.id == + value.code, + ); - if (facility == null) { - return; - } - form - .control( - _facilityKey) - .value = - localizations - .translate( - 'FAC_${facility.id}', - ); - setState(() { - selectedFacilityId = - facility.id; - }); - stockReconciliationBloc - .add( - StockReconciliationSelectFacilityEvent( - facility, + /// Update the form control with the selected product variant model + field.control.value = + selectedVariant; + + ctx + .read< + StockReconciliationBloc>() + .add( + StockReconciliationSelectProductEvent( + value.code, + isDistributor: InventorySingleton() + .isDistributor! && + !InventorySingleton() + .isWareHouseMgr!, ), ); - }, - ), - ), - ); - }); + }, + ), + ); + }, + ); }, - ), - BlocBuilder( - builder: (context, state) { - return state.maybeWhen( - orElse: () => const Offstage(), - loading: () => const Center( - child: CircularProgressIndicator(), - ), - empty: () => Center( - child: Text( - i18.stockDetails.noProductsFound, - ), - ), - fetched: (productVariants) { - return DigitReactiveSearchDropdown< - ProductVariantModel>( - key: - const Key(_productVariantKey), - label: localizations.translate( - i18.stockReconciliationDetails - .productLabel, - ), - form: form, - menuItems: productVariants, - formControlName: - _productVariantKey, - isRequired: true, - valueMapper: (value) { - return localizations.translate( - value.sku ?? value.id, - ); - }, - onSelected: (value) { - ctx - .read< - StockReconciliationBloc>() - .add( - StockReconciliationSelectProductEvent( - value.id, - isDistributor: InventorySingleton() - .isDistributor! && - !InventorySingleton() - .isWareHouseMgr!, - ), - ); - }, - validationMessage: - localizations.translate(i18 - .common - .corecommonRequired), - emptyText: - localizations.translate( - i18.common.noMatchFound, - ), - ); - }, - ); - }, - ), - DigitTableCard( - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate(i18 - .stockReconciliationDetails - .dateOfReconciliation): - DateFormat('dd MMMM yyyy').format( - stockState.dateOfReconciliation, - ), - }, - ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockReceived'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockReceived, - ): stockState.stockReceived - .toStringAsFixed(0), - }, - ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockIssued'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockIssued, - ): stockState.stockIssued - .toStringAsFixed(0), - }, - ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockReturned'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockReturned, - ): stockState.stockReturned - .toStringAsFixed(0), - }, + ); + }, + ), + LabelValueItem( + label: localizations.translate(i18 + .stockReconciliationDetails + .dateOfReconciliation), + value: DateFormat('dd MMMM yyyy').format( + stockState.dateOfReconciliation), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockReceived, ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockLost'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockLost, - ): stockState.stockLost - .toStringAsFixed(0), - }, + value: stockState.stockReceived + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockIssued, ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockDamaged'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockDamaged, - ): stockState.stockDamaged - .toStringAsFixed(0), - }, + value: stockState.stockIssued + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockReturned, ), - const DigitDivider(), - DigitTableCard( - key: const Key('stockReconStockOnHand'), - fraction: 2.5, - gap: kPadding, - element: { - localizations.translate( - i18.stockReconciliationDetails - .stockOnHand, - ): stockState.stockInHand - .toStringAsFixed(0), - }, + value: stockState.stockReturned + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails.stockLost, ), - DigitInfoCard( - margin: EdgeInsets.zero, - icon: Icons.info, - backgroundColor: - theme.colorScheme.tertiaryContainer, - iconColor: theme.colorScheme.surfaceTint, - description: localizations.translate( - i18.stockReconciliationDetails - .infoCardContent, - ), - title: localizations.translate( - i18.stockReconciliationDetails - .infoCardTitle, - ), + value: + stockState.stockLost.toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate( + i18.stockReconciliationDetails + .stockDamaged, ), - const SizedBox( - height: kPadding * 2, + value: stockState.stockDamaged + .toStringAsFixed(0), + labelFlex: 5, + ), + const DigitDivider(), + LabelValueItem( + label: localizations.translate(i18 + .stockReconciliationDetails + .stockOnHand), + value: stockState.stockInHand + .toStringAsFixed(0), + labelFlex: 5, + ), + InfoCard( + type: InfoType.info, + description: localizations.translate( + i18.stockReconciliationDetails + .infoCardContent, ), - const DigitDivider(), - const SizedBox( - height: kPadding, + title: localizations.translate( + i18.stockReconciliationDetails + .infoCardTitle, ), - DigitTextFormField( - key: const Key(_manualCountKey), - isRequired: true, - label: localizations.translate( - i18.stockReconciliationDetails - .manualCountLabel, - ), + ), + const DigitDivider(), + ReactiveWrapperField( formControlName: _manualCountKey, - keyboardType: - const TextInputType.numberWithOptions( - decimal: false, - ), validationMessages: { - "required": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountRequiredError), - "number": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountInvalidType), - "min": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountMinError), - "max": (object) => - localizations.translate(i18 - .stockReconciliationDetails - .manualCountMaxError), + "required": (object) => i18 + .stockReconciliationDetails + .manualCountRequiredError, + "number": (object) => i18 + .stockReconciliationDetails + .manualCountInvalidType, + "min": (object) => i18 + .stockReconciliationDetails + .manualCountMinError, + "max": (object) => i18 + .stockReconciliationDetails + .manualCountMaxError, }, - ), - DigitTextFormField( - label: localizations.translate( - i18.stockReconciliationDetails - .commentsLabel, - ), - maxLines: 3, - minLines: 3, - formControlName: - _reconciliationCommentsKey, - ), - ], - ), + showErrors: (control) => + control.invalid && control.touched, + builder: (field) { + return LabeledField( + label: localizations.translate( + i18.stockReconciliationDetails + .manualCountLabel, + ), + isRequired: true, + child: BaseDigitFormInput( + errorMessage: field.errorText, + keyboardType: const TextInputType + .numberWithOptions( + decimal: false, + ), + initialValue: '0', + onChange: (value) { + field.control.markAsTouched(); + field.control.value = value; + }, + ), + ); + }), + ReactiveWrapperField( + formControlName: _reconciliationCommentsKey, + builder: (field) { + return InputField( + type: InputType.textArea, + label: localizations.translate( + i18.stockReconciliationDetails + .commentsLabel, + ), + textAreaScroll: TextAreaScroll.smart, + onChange: (value) { + field.control.value = value; + }, + ); + }, + ), + ], ), ], ), diff --git a/packages/inventory_management/lib/router/inventory_router.dart b/packages/inventory_management/lib/router/inventory_router.dart index 7f2e849f5..e333f5c14 100644 --- a/packages/inventory_management/lib/router/inventory_router.dart +++ b/packages/inventory_management/lib/router/inventory_router.dart @@ -4,10 +4,8 @@ import 'inventory_router.gm.dart'; @AutoRouterConfig.module() class InventoryRoute extends $InventoryRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: ManageStocksRoute.page, diff --git a/packages/inventory_management/lib/widgets/back_navigation_help_header.dart b/packages/inventory_management/lib/widgets/back_navigation_help_header.dart index a3c76941e..7a327946d 100644 --- a/packages/inventory_management/lib/widgets/back_navigation_help_header.dart +++ b/packages/inventory_management/lib/widgets/back_navigation_help_header.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/theme/spacers.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; import 'package:flutter/material.dart'; import 'package:inventory_management/blocs/app_localization.dart'; @@ -26,36 +29,33 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(kPadding / 2), + padding: const EdgeInsets.all(spacer1), child: Row( children: [ Expanded( child: Row( children: [ if (showBackNavigation) - Flexible( - child: TextButton.icon( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () { - context.router.maybePop(); - handleBack != null ? handleBack!() : null; - }, - icon: const Icon(Icons.arrow_left_sharp), - label: Text( - InventoryLocalization.of(context).translate( - i18.common.coreCommonBack, - ), - overflow: TextOverflow.ellipsis, + DigitBackButton(label: InventoryLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size:Theme.of(context).spacerTheme.spacer5, ), ), - ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) ], ), ), - SizedBox(width: showHelp ? kPadding * 2 : 0), + SizedBox(width: showHelp ? spacer2: 0), if (showHelp) TextButton( style: TextButton.styleFrom(padding: EdgeInsets.zero), diff --git a/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart b/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart index d7d0d9358..6388e73dd 100644 --- a/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart +++ b/packages/inventory_management/lib/widgets/inventory/no_facilities_assigned_dialog.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_components/digit_components.dart'; +import 'package:digit_ui_components/enum/app_enums.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; +import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; import '../../../utils/i18_key_constants.dart' as i18; import '../../blocs/app_localization.dart'; @@ -7,29 +10,34 @@ import '../../blocs/app_localization.dart'; class NoFacilitiesAssignedDialog { static Future show( BuildContext context, InventoryLocalization localizations) { - return DigitDialog.show( - context, - options: DigitDialogOptions( - titleIcon: Icon( - Icons.warning, - color: Theme.of(context).colorScheme.error, - ), - titleText: localizations.translate( - i18.warehouseDetails.noFacilitiesAssigned, - ), - contentText: localizations.translate( - i18.warehouseDetails.noFacilitiesAssignedDescription, - ), - primaryAction: DigitDialogActions( - label: localizations.translate( - i18.common.corecommonclose, + return + showCustomPopup( + context: context, + builder: (popupContext) => Popup( + title: localizations.translate( + i18.warehouseDetails.noFacilitiesAssigned, ), - action: (dialogContext) { - Navigator.of(context, rootNavigator: true).pop(); - context.router.maybePop(); + onOutsideTap: () { + Navigator.of(popupContext).pop(); }, + description:localizations.translate( + i18.warehouseDetails.noFacilitiesAssignedDescription, + ), + type: PopUpType.alert, + actions: [ + DigitButton( + label: localizations.translate( + i18.common.corecommonclose, + ), + onPressed: () { + Navigator.of(popupContext, rootNavigator: true).pop(); + popupContext.router.maybePop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + ), + ], ), - ), - ); + ); } } diff --git a/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart b/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart index fd5d36d7d..e94fd8dbf 100644 --- a/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart +++ b/packages/inventory_management/lib/widgets/reports/readonly_pluto_grid.dart @@ -1,4 +1,4 @@ -import 'package:digit_components/theme/colors.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../utils/i18_key_constants.dart' as i18; @@ -35,6 +35,7 @@ class ReadonlyDigitGrid extends LocalizedStatefulWidget { class ReadonlyDigitGridState extends LocalizedState { @override Widget build(BuildContext context) { + final theme = Theme.of(context); // Returns a PlutoGrid with the given configuration and data return PlutoGrid( mode: PlutoGridMode.readOnly, @@ -51,15 +52,15 @@ class ReadonlyDigitGridState extends LocalizedState { restoreAutoSizeAfterFrozenColumn: true, ), style: PlutoGridStyleConfig( - gridBorderColor: const DigitColors().seaShellGray, - oddRowColor: const DigitColors().seaShellGray, - borderColor: const DigitColors().seaShellGray, + gridBorderColor: theme.colorTheme.generic.background, + oddRowColor: theme.colorTheme.generic.background, + borderColor: theme.colorTheme.generic.background, iconColor: Colors.transparent, evenRowColor: Colors.transparent, - activatedColor: const DigitColors().burningOrange.withOpacity( + activatedColor: theme.colorTheme.primary.primary1.withOpacity( 0.2, ), - activatedBorderColor: const DigitColors().burningOrange.withOpacity( + activatedBorderColor: theme.colorTheme.primary.primary1.withOpacity( 0.8, ), enableRowColorAnimation: true, diff --git a/packages/inventory_management/pubspec.lock b/packages/inventory_management/pubspec.lock index 1bb76bac8..db72d69b2 100644 --- a/packages/inventory_management/pubspec.lock +++ b/packages/inventory_management/pubspec.lock @@ -117,18 +117,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -186,13 +186,13 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -333,10 +333,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -345,6 +345,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: transitive description: @@ -364,12 +372,11 @@ packages: dart_mappable_builder: dependency: "direct dev" description: - path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" - url: "https://github.com/egovernments/health-campaign-field-worker-app/" - source: git - version: "4.2.0" + name: dart_mappable_builder + sha256: ab5cf9086862d3fceb9773e945b5f95cc5471a28c782a4fc451bd400a4e0c64e + url: "https://pub.dev" + source: hosted + version: "4.2.3" dart_style: dependency: transitive description: @@ -394,46 +401,54 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: "direct main" - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "1.0.5" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a + url: "https://pub.dev" + source: hosted + version: "1.0.4" + digit_ui_components: + dependency: "direct main" + description: + name: digit_ui_components + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "0.0.2-dev.4" dio: - dependency: transitive + dependency: "direct main" description: name: dio sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" url: "https://pub.dev" source: hosted version: "5.4.3+1" + dotted_border: + dependency: transitive + description: + name: dotted_border + sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" + url: "https://pub.dev" + source: hosted + version: "2.1.0" drift: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -446,18 +461,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" - url: "https://pub.dev" - source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -482,91 +489,104 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" - fixnum: + file_picker: dependency: transitive description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + name: file_picker + sha256: "2ca051989f69d1b2ca012b2cf3ccf78c70d40144f0861ff2c063493f7c8c3d45" url: "https://pub.dev" source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_bloc: - dependency: "direct main" + version: "8.0.5" + file_selector_linux: + dependency: transitive description: - name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "8.1.5" - flutter_focus_watcher: + version: "0.9.3+2" + file_selector_macos: dependency: transitive description: - name: flutter_focus_watcher - sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79 + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility: + version: "0.9.4+2" + file_selector_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: + version: "0.9.3+3" + fixnum: dependency: transitive description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + url: "https://pub.dev" + source: hosted + version: "8.1.5" + flutter_dropzone: dependency: transitive description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + name: flutter_dropzone + sha256: b399c60411f9bf9c4c2f97933c6a3a185859e75aade8897831e76cee4346c8e1 url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: + version: "3.0.7" + flutter_dropzone_platform_interface: dependency: transitive description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + name: flutter_dropzone_platform_interface + sha256: "96d2c51c86063ba150551c3b40fd26c5a18785bee071c0c751502d28a545df3b" url: "https://pub.dev" source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: + version: "2.2.0" + flutter_dropzone_web: dependency: transitive description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + name: flutter_dropzone_web + sha256: c5a0fdb63b7216352a01761ec1b6eba1982e49541e60675735e2d3d95e207b19 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "3.0.13" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -583,27 +603,27 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.1" + flutter_styled_toast: + dependency: transitive + description: + name: flutter_styled_toast + sha256: e667f13a665820eb0fa8506547e47eacbcddf1948d6d3036cfd3b089bd4b0516 + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.16" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -613,10 +633,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -641,6 +661,54 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + geolocator: + dependency: transitive + description: + name: geolocator + sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + url: "https://pub.dev" + source: hosted + version: "10.1.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" + url: "https://pub.dev" + source: hosted + version: "4.6.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + url: "https://pub.dev" + source: hosted + version: "2.3.8+1" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" + url: "https://pub.dev" + source: hosted + version: "0.2.3" glob: dependency: transitive description: @@ -653,26 +721,26 @@ packages: dependency: transitive description: name: google_fonts - sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: @@ -697,14 +765,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.3.1" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.dev" + source: hosted + version: "0.15.5" http: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -721,14 +797,78 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image_picker: + dependency: transitive + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" + url: "https://pub.dev" + source: hosted + version: "0.8.12+12" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -777,38 +917,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: - dependency: transitive + dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -821,34 +985,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -897,30 +1061,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive + path: + dependency: "direct main" description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "5.0.1" - package_info_plus_platform_interface: + version: "1.9.0" + path_drawing: dependency: transitive description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - path: - dependency: "direct main" - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + name: path_drawing + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_parsing: dependency: transitive description: @@ -1005,18 +1161,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "7.0.2" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" + version: "8.0.0" pool: dependency: transitive description: @@ -1049,22 +1197,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1073,14 +1213,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" rxdart: dependency: transitive description: @@ -1166,6 +1298,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1178,18 +1318,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1242,26 +1382,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1286,38 +1426,118 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.dev" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 + url: "https://pub.dev" + source: hosted + version: "6.3.9" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + url: "https://pub.dev" + source: hosted + version: "3.1.3" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.15" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.16" vector_math: dependency: transitive description: @@ -1326,14 +1546,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1346,10 +1574,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1399,5 +1627,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/inventory_management/pubspec.yaml b/packages/inventory_management/pubspec.yaml index 2f2f75058..344ede57b 100644 --- a/packages/inventory_management/pubspec.yaml +++ b/packages/inventory_management/pubspec.yaml @@ -1,6 +1,6 @@ name: inventory_management description: This package offers inventory management features, allowing users to view stock reports and perform inventory resource reconciliation. -version: 1.0.3+5 +version: 1.0.4 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/inventory_management repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,45 +11,43 @@ environment: dependencies: flutter: sdk: flutter - digit_components: ^1.0.2+1 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 + gs1_barcode_parser: ^1.0.5 + uuid: ^4.4.0 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 path: ^1.8.2 drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.3+1 - gs1_barcode_parser: ^1.0.5 - auto_route: ^7.8.4 - digit_data_model: ^1.0.5-dev.1 - collection: ^1.16.0 + digit_scanner: ^1.0.4 + pluto_grid: ^8.0.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 json_serializable: ^6.4.0 drift_dev: ^2.14.1 bloc_test: ^9.1.0 + build_runner: ^2.4.11 mocktail: ^1.0.2 - dart_mappable_builder: - git: - url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master - path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + dart_mappable_builder: ^4.2.2 + auto_route_generator: ^8.0.0 flutter: assets: diff --git a/packages/inventory_management/test/blocs/record_stock_test.dart b/packages/inventory_management/test/blocs/record_stock_test.dart index 84b5b6947..39a016da6 100644 --- a/packages/inventory_management/test/blocs/record_stock_test.dart +++ b/packages/inventory_management/test/blocs/record_stock_test.dart @@ -30,19 +30,8 @@ void main() { // Grouping tests related to RecordStockBloc group('RecordStockBloc', () { - // Declaring variables for mock and bloc - late RecordStockBloc recordStockBloc; - // Setting up the mock and the bloc for each test - setUp(() { - recordStockBloc = RecordStockBloc( - stockRepository: MockStockDataRepository(), - const RecordStockState.create( - entryType: InventoryReportConstants.entryType, - projectId: InventoryReportConstants.projectId, - ), - ); - }); + setUp(() {}); // Test for saveWarehouseDetails event blocTest( diff --git a/packages/referral_reconciliation/CHANGELOG.md b/packages/referral_reconciliation/CHANGELOG.md index 7cff12142..5d57bc4a1 100644 --- a/packages/referral_reconciliation/CHANGELOG.md +++ b/packages/referral_reconciliation/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.0.3-dev.1 -* Updated digit_data_model to latest version -* Updated survey_form to latest version +## 1.0.3 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model, survey_form to latest version * Migrated to digit_ui_components ## 1.0.2+2 diff --git a/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart b/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart index 477a7dd1a..bb8c7b13d 100644 --- a/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart +++ b/packages/referral_reconciliation/lib/blocs/referral_recon_record.dart @@ -91,20 +91,18 @@ class RecordHFReferralBloc emit(value.copyWith(loading: true)); try { - if (event.hfReferralModel != null) { - referralReconDataRepository?.create(event.hfReferralModel); - emit( - RecordHFReferralPersistedState( - hfReferralModel: event.hfReferralModel, - projectId: value.projectId, - facilityId: value.facilityId, - dateOfEvaluation: value.dateOfEvaluation, - healthFacilityCord: value.healthFacilityCord, - referredBy: value.referredBy, - ), - ); - } - } catch (error) { + referralReconDataRepository?.create(event.hfReferralModel); + emit( + RecordHFReferralPersistedState( + hfReferralModel: event.hfReferralModel, + projectId: value.projectId, + facilityId: value.facilityId, + dateOfEvaluation: value.dateOfEvaluation, + healthFacilityCord: value.healthFacilityCord, + referredBy: value.referredBy, + ), + ); + } catch (error) { emit(value.copyWith(loading: false)); rethrow; } diff --git a/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart b/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart index 3de05f833..4be5d9693 100644 --- a/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart +++ b/packages/referral_reconciliation/lib/blocs/search_referral_reconciliations.dart @@ -53,7 +53,7 @@ class SearchReferralsBloc ); // Update state with fetched referrals. emit(state.copyWith( - referrals: beneficiaries ?? [], + referrals: beneficiaries, loading: false, tag: event.tag, )); diff --git a/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart b/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart index 37aee54c8..9477d3596 100644 --- a/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart +++ b/packages/referral_reconciliation/lib/models/entities/hf_additional_fields.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'hf_additional_fields.dart'; diff --git a/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart b/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart index 8ac04e2ae..35caf2b29 100644 --- a/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart +++ b/packages/referral_reconciliation/lib/models/entities/hf_referral.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'hf_referral.dart'; @@ -152,10 +152,8 @@ mixin HFReferralSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HFReferralSearchModelMapper.ensureInitialized() - .isValueEqual(this as HFReferralSearchModel, other)); + return HFReferralSearchModelMapper.ensureInitialized() + .equalsValue(this as HFReferralSearchModel, other); } @override @@ -500,10 +498,8 @@ mixin HFReferralModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HFReferralModelMapper.ensureInitialized() - .isValueEqual(this as HFReferralModel, other)); + return HFReferralModelMapper.ensureInitialized() + .equalsValue(this as HFReferralModel, other); } @override @@ -730,10 +726,8 @@ mixin HFReferralAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HFReferralAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as HFReferralAdditionalFields, other)); + return HFReferralAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as HFReferralAdditionalFields, other); } @override diff --git a/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart b/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart index 3d6a27c56..4a6a244b6 100644 --- a/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart +++ b/packages/referral_reconciliation/lib/models/entities/referral_recon_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'referral_recon_enums.dart'; diff --git a/packages/referral_reconciliation/lib/pages/acknowledgement.dart b/packages/referral_reconciliation/lib/pages/acknowledgement.dart index c9a5ba5ab..52ecaf0c1 100644 --- a/packages/referral_reconciliation/lib/pages/acknowledgement.dart +++ b/packages/referral_reconciliation/lib/pages/acknowledgement.dart @@ -44,14 +44,14 @@ class _AcknowledgementPageState i18.acknowledgementSuccess.acknowledgementDescriptionText, ), actions: [ - Button( + DigitButton( label: localizations .translate(i18.acknowledgementSuccess.actionLabelText), onPressed: () { context.router.popUntilRoot(); }, - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, ) ]), @@ -62,9 +62,9 @@ class _AcknowledgementPageState height: 150, child: Column( children: [ - Button( - size: ButtonSize.large, - type: ButtonType.primary, + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, mainAxisSize: MainAxisSize.max, label: localizations .translate(i18.acknowledgementSuccess.goToHome), @@ -75,9 +75,9 @@ class _AcknowledgementPageState const SizedBox( height: 12, ), - Button( - size: ButtonSize.large, - type: ButtonType.secondary, + DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, mainAxisSize: MainAxisSize.max, onPressed: () { context.router.popUntilRoot(); diff --git a/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart b/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart index a6b8a5aaf..b93730a75 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/reason_checklist_preview.dart @@ -3,11 +3,11 @@ import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/digit_divider.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; -import 'package:survey_form/survey_form.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; import 'package:referral_reconciliation/utils/constants.dart'; +import 'package:survey_form/survey_form.dart'; import '../../blocs/referral_recon_service_definition.dart'; import '../../router/referral_reconciliation_router.gm.dart'; @@ -32,6 +32,7 @@ class _ReferralReasonChecklistPreviewPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Scaffold( body: ScrollableContent( @@ -48,8 +49,8 @@ class _ReferralReasonChecklistPreviewPageState cardType: CardType.primary, padding: EdgeInsets.all(theme.spacerTheme.spacer2), children: [ - Button( - size: ButtonSize.large, + DigitButton( + size: DigitButtonSize.large, label: localizations .translate(i18.common.corecommonclose), mainAxisSize: MainAxisSize.max, @@ -63,7 +64,7 @@ class _ReferralReasonChecklistPreviewPageState SearchReferralReconciliationsRoute.name); context.router.maybePop(); }, - type: ButtonType.primary, + type: DigitButtonType.primary, ) ]) : const Offstage(); @@ -100,8 +101,7 @@ class _ReferralReasonChecklistPreviewPageState e.createdAt.toString(), ), ), - style: theme - .textTheme.headlineMedium, + style: textTheme.headingM, ), ), Row( @@ -115,7 +115,7 @@ class _ReferralReasonChecklistPreviewPageState ), ), ), - Button( + DigitButton( label: localizations.translate( i18.referralReconciliation .iconLabel, @@ -129,8 +129,8 @@ class _ReferralReasonChecklistPreviewPageState ), ); }, - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, ), ], ), @@ -167,7 +167,7 @@ class _ReferralReasonChecklistPreviewPageState item2?.code ?? '', ), style: - theme.textTheme.displayMedium, + textTheme.headingXl, ), ), ...(value2.attributes ?? []) @@ -192,8 +192,7 @@ class _ReferralReasonChecklistPreviewPageState .translate( "${item2?.code ?? ''}.${e.attributeCode!}", ), - style: theme.textTheme - .headlineSmall, + style: textTheme.headingS, ), ), Container( @@ -214,7 +213,9 @@ class _ReferralReasonChecklistPreviewPageState 'SingleValueList' ? localizations .translate( - 'CORE_COMMON_${e.value.toString().toUpperCase()}', + e.value + .toString() + .toUpperCase(), ) : e.value ?? "", ), diff --git a/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart b/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart index a0b7ee8d0..0406ebf95 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/record_facility_details.dart @@ -59,6 +59,7 @@ class _ReferralFacilityPageState extends LocalizedState { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); // final router = context.router; return BlocConsumer( @@ -88,7 +89,7 @@ class _ReferralFacilityPageState extends LocalizedState { return ReactiveFormBuilder( form: () => buildForm(recordState, projectFacilities), builder: (context, form, child) => ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), @@ -102,8 +103,8 @@ class _ReferralFacilityPageState extends LocalizedState { ValueListenableBuilder( valueListenable: clickedStatus, builder: (context, bool isClicked, _) { - return Button( - size: ButtonSize.large, + return DigitButton( + size: DigitButtonSize.large, label: localizations.translate( i18.common.coreCommonNext, ), @@ -176,7 +177,7 @@ class _ReferralFacilityPageState extends LocalizedState { } } }, - type: ButtonType.primary, + type: DigitButtonType.primary, mainAxisSize: MainAxisSize.max, ); }, @@ -198,7 +199,7 @@ class _ReferralFacilityPageState extends LocalizedState { .facilityDetails, ), style: - theme.textTheme.displayMedium, + textTheme.headingXl, ), ), ], diff --git a/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart b/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart index bd33c4102..075cc8b37 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/record_reason_checklist.dart @@ -3,6 +3,7 @@ import 'dart:math'; import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/input_wrapper.dart'; import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; @@ -12,6 +13,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:referral_reconciliation/utils/constants.dart'; +import 'package:referral_reconciliation/utils/extensions/extensions.dart'; import 'package:survey_form/survey_form.dart'; import '../../blocs/referral_recon_service_definition.dart'; @@ -23,6 +25,7 @@ import '../../widgets/localized.dart'; @RoutePage() class ReferralReasonChecklistPage extends LocalizedStatefulWidget { final String? referralClientRefId; + const ReferralReasonChecklistPage({ super.key, this.referralClientRefId, @@ -60,6 +63,7 @@ class _ReferralReasonChecklistPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return PopScope( canPop: false, @@ -86,16 +90,16 @@ class _ReferralReasonChecklistPageState orElse: () => Text(state.runtimeType.toString()), serviceDefinitionFetch: (value) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( cardType: CardType.primary, padding: EdgeInsets.all(theme.spacerTheme.spacer2), children: [ - Button( - size: ButtonSize.large, + DigitButton( + size: DigitButtonSize.large, label: localizations .translate(i18.common.coreCommonSubmit), - type: ButtonType.primary, + type: DigitButtonType.primary, mainAxisSize: MainAxisSize.max, onPressed: () async { final router = context.router; @@ -141,13 +145,13 @@ class _ReferralReasonChecklistPageState i18.checklist.checklistDialogDescription, ), actions: [ - Button( + DigitButton( label: localizations.translate( i18.checklist .checklistDialogPrimaryAction, ), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, onPressed: () { List attributes = []; @@ -193,35 +197,64 @@ class _ReferralReasonChecklistPageState context.read().add( ServiceCreateEvent( serviceModel: ServiceModel( - createdAt: DigitDateUtils - .getDateFromTimestamp( - DateTime.now() - .toLocal() - .millisecondsSinceEpoch, - dateFormat: - defaultDateTimeFormat, - ), - tenantId: value - .selectedServiceDefinition! - .tenantId, - clientId: widget - .referralClientRefId - .toString(), - serviceDefId: value - .selectedServiceDefinition - ?.id, - attributes: attributes, - rowVersion: 1, - accountId: - ReferralReconSingleton() - .projectId, - additionalDetails: { - "boundaryCode": + createdAt: DigitDateUtils + .getDateFromTimestamp( + DateTime.now() + .toLocal() + .millisecondsSinceEpoch, + dateFormat: + defaultDateTimeFormat, + ), + tenantId: value + .selectedServiceDefinition! + .tenantId, + clientId: widget + .referralClientRefId + .toString(), + serviceDefId: value + .selectedServiceDefinition + ?.id, + attributes: attributes, + rowVersion: 1, + accountId: ReferralReconSingleton() - .boundary - ?.code - }, - ), + .projectId, + auditDetails: + AuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + ReferralReconSingleton() + .userUUid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + ReferralReconSingleton() + .userUUid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + additionalFields: + ServiceAdditionalFields( + version: 1, + fields: [ + AdditionalField( + 'boundaryCode', + SurveyFormSingleton() + .boundary + ?.code) + ])), ), ); @@ -231,13 +264,13 @@ class _ReferralReasonChecklistPageState ).pop(true); }, ), - Button( + DigitButton( label: localizations.translate( i18.checklist .checklistDialogSecondaryAction, ), - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, onPressed: () { Navigator.of( context, @@ -266,7 +299,7 @@ class _ReferralReasonChecklistPageState '${localizations.translate( value.selectedServiceDefinition!.code.toString(), )} ${localizations.translate(i18.checklist.checklist)}', - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), @@ -363,7 +396,7 @@ class _ReferralReasonChecklistPageState '${localizations.translate( '${value.selectedServiceDefinition?.code}.${e.code}', )} ${e.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, + style: textTheme.headingS, ), ], ), @@ -458,6 +491,7 @@ class _ReferralReasonChecklistPageState BuildContext context, ) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); /* Check the data type of the attribute*/ if (item.dataType == 'SingleValueList') { @@ -490,7 +524,7 @@ class _ReferralReasonChecklistPageState '${localizations.translate( '${selectedServiceDefinition?.code}.${item.code}', )} ${item.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, + style: textTheme.headingS, ), ), ), @@ -503,7 +537,7 @@ class _ReferralReasonChecklistPageState child: Padding( padding: EdgeInsets.only(left: theme.spacerTheme.spacer2), child: RadioList( - radioButtons: item.values != null + radioDigitButtons: item.values != null ? item.values! .where((e) => e != i18.checklist.notSelectedKey) .map((e) => RadioButtonModel( @@ -579,7 +613,7 @@ class _ReferralReasonChecklistPageState i18.common.corecommonRequired, ), style: TextStyle( - color: theme.colorScheme.error, + color: theme.colorTheme.alert.error, ), ), ), @@ -605,8 +639,6 @@ class _ReferralReasonChecklistPageState padding: const EdgeInsets.all(8.0), child: FormField( validator: (value) { - print(value); - print(controller[index].text); // Custom validation logic if (((controller[index].text == '') && item.required == true)) { return localizations.translate("${item.code}_REQUIRED"); @@ -687,7 +719,7 @@ class _ReferralReasonChecklistPageState '${localizations.translate( '${selectedServiceDefinition?.code}.${item.code}', )} ${item.required == true ? '*' : ''}', - style: theme.textTheme.headlineSmall, + style: textTheme.headingS, ), ], ), @@ -765,8 +797,8 @@ class _ReferralReasonChecklistPageState : theme.colorTheme.paper.secondary, child: _buildChecklist( matchingChildItem, - initialAttributes?.indexOf(matchingChildItem) ?? - parentIndex, // Pass parentIndex here as we're building at the same level + initialAttributes?.indexOf(matchingChildItem) ?? parentIndex, + // Pass parentIndex here as we're building at the same level selectedServiceDefinition, context, ), diff --git a/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart b/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart index 332fe102c..597ae276f 100644 --- a/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart +++ b/packages/referral_reconciliation/lib/pages/create_referral/record_referral_details.dart @@ -1,10 +1,10 @@ import 'package:auto_route/auto_route.dart'; +import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/dropdown_wrapper.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; -import 'package:survey_form/survey_form.dart'; -import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -12,6 +12,7 @@ import 'package:reactive_forms/reactive_forms.dart'; import 'package:referral_reconciliation/models/entities/referral_recon_enums.dart'; import 'package:referral_reconciliation/router/referral_reconciliation_router.gm.dart'; import 'package:referral_reconciliation/utils/extensions/extensions.dart'; +import 'package:survey_form/survey_form.dart'; import '../../../utils/i18_key_constants.dart' as i18; import '../../blocs/referral_recon_record.dart'; @@ -63,6 +64,7 @@ class _RecordReferralDetailsPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return BlocBuilder( @@ -96,7 +98,7 @@ class _RecordReferralDetailsPageState : null, ); return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), @@ -111,9 +113,9 @@ class _RecordReferralDetailsPageState ValueListenableBuilder( valueListenable: clickedStatus, builder: (context, bool isClicked, _) { - return Button( - size: ButtonSize.large, - type: ButtonType.primary, + return DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, mainAxisSize: MainAxisSize.max, label: localizations .translate(recordState.mapOrNull( @@ -316,6 +318,11 @@ class _RecordReferralDetailsPageState HFReferralAdditionalFields( version: 1, fields: [ + AdditionalField( + "boundaryCode", + ReferralReconSingleton() + .boundary + ?.code), if (hfCoordinator != null && hfCoordinator @@ -433,9 +440,9 @@ class _RecordReferralDetailsPageState ValueListenableBuilder( valueListenable: clickedStatus, builder: (context, bool isClicked, _) { - return Button( - size: ButtonSize.large, - type: ButtonType.primary, + return DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.primary, mainAxisSize: MainAxisSize.max, label: localizations.translate( recordState.mapOrNull( @@ -663,6 +670,11 @@ class _RecordReferralDetailsPageState HFReferralAdditionalFields( version: 1, fields: [ + AdditionalField( + "boundaryCode", + ReferralReconSingleton() + .boundary + ?.code), if (hfCoordinator != null && hfCoordinator @@ -799,7 +811,7 @@ class _RecordReferralDetailsPageState .referralDetails, ), style: - theme.textTheme.displayMedium, + textTheme.headingXl, ), ), ], @@ -1144,7 +1156,7 @@ class _RecordReferralDetailsPageState "", errorMessage: field.errorText, - radioButtons: + radioDigitButtons: ReferralReconSingleton() .referralReasons .map((r) { diff --git a/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart b/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart index 85b09d783..83e2bb29e 100644 --- a/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart +++ b/packages/referral_reconciliation/lib/pages/project_facility/project_facility_selection.dart @@ -35,6 +35,7 @@ class _ReferralReconProjectFacilitySelectionPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); final BorderSide borderSide = BorderSide( color: theme.colorScheme.outline, width: 1.0, @@ -48,7 +49,7 @@ class _ReferralReconProjectFacilitySelectionPageState body: ReactiveFormConsumer( builder: (context, form, _) { final filteredProjectFacilities = - (widget.projectFacilities ?? []).isNotEmpty + (widget.projectFacilities).isNotEmpty ? widget.projectFacilities.where((element) { final query = form.control(_facilityName).value as String?; @@ -87,7 +88,7 @@ class _ReferralReconProjectFacilitySelectionPageState localizations.translate( i18.common.projectFacilitySearchHeaderLabel, ), - style: theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), diff --git a/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart b/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart index f25d9a190..9c86a67c7 100644 --- a/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart +++ b/packages/referral_reconciliation/lib/pages/search_referral_reconciliations.dart @@ -1,18 +1,18 @@ import 'package:auto_route/auto_route.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:digit_scanner/blocs/scanner.dart'; +import 'package:digit_scanner/router/digit_scanner_router.gm.dart'; import 'package:digit_ui_components/enum/app_enums.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; import 'package:digit_ui_components/widgets/atoms/digit_info_card.dart'; import 'package:digit_ui_components/widgets/atoms/digit_search_bar.dart'; import 'package:digit_ui_components/widgets/scrollable_content.dart'; -import 'package:survey_form/survey_form.dart'; -import 'package:digit_data_model/data_model.dart'; -import 'package:digit_scanner/blocs/scanner.dart'; -import 'package:digit_scanner/router/digit_scanner_router.gm.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; import 'package:referral_reconciliation/utils/extensions/extensions.dart'; +import 'package:survey_form/survey_form.dart'; import '../blocs/search_referral_reconciliations.dart'; import '../models/entities/hf_referral.dart'; @@ -57,6 +57,7 @@ class _SearchReferralReconciliationsPageState @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return KeyboardVisibilityBuilder( builder: (context, isKeyboardVisible) => BlocProvider< SearchReferralsBloc>( @@ -105,8 +106,7 @@ class _SearchReferralReconciliationsPageState i18.referralReconciliation .searchReferralsHeader, ), - style: - theme.textTheme.displayMedium, + style: textTheme.headingXl, textAlign: TextAlign.left, ), ), @@ -143,7 +143,8 @@ class _SearchReferralReconciliationsPageState SizedBox( height: theme.spacerTheme.spacer2 * 2), - if (searchState.resultsNotFound) + if (searchState.resultsNotFound && + searchController.text.isNotEmpty) InfoCard( title: localizations.translate(i18 .referralReconciliation @@ -234,8 +235,8 @@ class _SearchReferralReconciliationsPageState const SearchReferralsClearEvent(), ); }; - return Button( - size: ButtonSize.large, + return DigitButton( + size: DigitButtonSize.large, label: localizations.translate( i18.referralReconciliation.createReferralLabel, ), @@ -247,15 +248,15 @@ class _SearchReferralReconciliationsPageState onPressed(); } }, - type: ButtonType.primary, + type: DigitButtonType.primary, ); }, ), SizedBox( height: theme.spacerTheme.spacer2, ), - Button( - size: ButtonSize.large, + DigitButton( + size: DigitButtonSize.large, label: localizations .translate(i18.referralReconciliation.scannerLabel), onPressed: () async { @@ -268,7 +269,7 @@ class _SearchReferralReconciliationsPageState singleValue: true, )); }, - type: ButtonType.secondary, + type: DigitButtonType.secondary, prefixIcon: Icons.qr_code, mainAxisSize: MainAxisSize.max, ), diff --git a/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart b/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart index 161831916..e382a5ca0 100644 --- a/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart +++ b/packages/referral_reconciliation/lib/router/referral_reconciliation_router.dart @@ -4,10 +4,8 @@ import 'referral_reconciliation_router.gm.dart'; @AutoRouterConfig.module() class ReferralReconciliationRoute extends $ReferralReconciliationRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List routes = [ AutoRoute( page: SearchReferralReconciliationsRoute.page, diff --git a/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart b/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart index 0a5f695c7..87a0d7635 100644 --- a/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart +++ b/packages/referral_reconciliation/lib/widgets/back_navigation_help_header.dart @@ -24,6 +24,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Padding( padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), @@ -36,7 +37,7 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { Flexible( child: TextButton.icon( style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, + foregroundColor: theme.colorTheme.primary.primary2, padding: EdgeInsets.zero, ), onPressed: () { diff --git a/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart b/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart index 1eb514dde..d55249f8c 100644 --- a/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart +++ b/packages/referral_reconciliation/lib/widgets/beneficiary_card.dart @@ -23,6 +23,7 @@ class ReferralBeneficiaryCard extends StatelessWidget { @override Widget build(BuildContext context) { final theme = Theme.of(context); + final textTheme = theme.digitTextTheme(context); return Column( mainAxisAlignment: MainAxisAlignment.start, @@ -32,7 +33,7 @@ class ReferralBeneficiaryCard extends StatelessWidget { padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), child: Text( title, - style: theme.textTheme.headlineSmall, + style: textTheme.headingS, ), ), Offstage( @@ -79,14 +80,14 @@ class ReferralBeneficiaryCard extends StatelessWidget { padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), child: Text( subtitle, - style: theme.textTheme.bodyMedium, + style: textTheme.bodyS, ), ), Padding( padding: EdgeInsets.all(theme.spacerTheme.spacer2 / 2), child: Text( description, - style: theme.textTheme.bodySmall, + style: textTheme.bodyS, ), ), ], diff --git a/packages/referral_reconciliation/lib/widgets/view_referral_card.dart b/packages/referral_reconciliation/lib/widgets/view_referral_card.dart index b1f997e33..8efc9af34 100644 --- a/packages/referral_reconciliation/lib/widgets/view_referral_card.dart +++ b/packages/referral_reconciliation/lib/widgets/view_referral_card.dart @@ -72,9 +72,9 @@ class _ViewReferralCardState extends LocalizedState { ), ), Flexible( - child: Button( - size: ButtonSize.large, - type: ButtonType.secondary, + child: DigitButton( + size: DigitButtonSize.large, + type: DigitButtonType.secondary, label: localizations.translate(i18.referralReconciliation.iconLabel), onPressed: widget.onOpenPressed ?? () {}, diff --git a/packages/referral_reconciliation/pubspec.lock b/packages/referral_reconciliation/pubspec.lock index 61b85de94..ed63fd65a 100644 --- a/packages/referral_reconciliation/pubspec.lock +++ b/packages/referral_reconciliation/pubspec.lock @@ -117,18 +117,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -189,10 +189,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -333,10 +333,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -373,11 +373,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -386,14 +386,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" diff_match_patch: dependency: transitive description: @@ -402,40 +394,32 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: transitive - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "1.0.5" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "1.0.4" digit_ui_components: dependency: "direct main" description: name: digit_ui_components - sha256: e38f163515aa6a6c5283754e741b21f33fb3a6c0a1fc171a1e4e6620510d46ae + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "0.0.1+7" + version: "0.0.2-dev.4" dio: - dependency: transitive + dependency: "direct main" description: name: dio sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" @@ -454,34 +438,18 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: "direct main" - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.18.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -591,14 +559,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.13" - 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: @@ -651,10 +611,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_localizations: dependency: transitive description: flutter @@ -697,14 +657,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -714,10 +666,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -754,10 +706,10 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.3.1" + version: "4.6.1" geolocator_apple: dependency: transitive description: @@ -802,26 +754,26 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: @@ -866,10 +818,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -954,10 +906,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -1006,38 +958,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: - dependency: transitive + dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -1050,34 +1026,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -1126,30 +1102,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" - url: "https://pub.dev" - source: hosted - version: "2.0.1" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -1242,18 +1202,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f - url: "https://pub.dev" - source: hosted - version: "7.0.2" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "0.9.3+7" + version: "8.0.0" pool: dependency: transitive description: @@ -1286,22 +1238,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1310,14 +1254,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" rxdart: dependency: transitive description: @@ -1403,6 +1339,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1415,18 +1359,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5 + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.21" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1463,10 +1407,10 @@ packages: dependency: "direct main" description: name: survey_form - sha256: "52532fb3fae06883828d22f870045587bf7122f67cb4de236c82ad4d6de1d7d7" + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" url: "https://pub.dev" source: hosted - version: "0.0.1-dev.2" + version: "1.0.0" synchronized: dependency: transitive description: @@ -1487,26 +1431,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1599,10 +1543,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: @@ -1615,10 +1559,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: @@ -1663,10 +1607,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1679,10 +1623,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1732,5 +1676,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/referral_reconciliation/pubspec.yaml b/packages/referral_reconciliation/pubspec.yaml index bcec51690..0a1746511 100644 --- a/packages/referral_reconciliation/pubspec.yaml +++ b/packages/referral_reconciliation/pubspec.yaml @@ -1,6 +1,6 @@ name: referral_reconciliation description: "This module will enable the health facility supervisors to track referrals made by on-field health workers to different health facilities digitally via the Digit HCM app" -version: 1.0.3-dev.1 +version: 1.0.3 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/referral_reconciliation repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,39 +11,40 @@ environment: dependencies: flutter: sdk: flutter - digit_ui_components: 0.0.1+7 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 + uuid: ^4.4.0 + recase: ^4.1.0 + pluto_grid: ^8.0.0 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 path: ^1.8.2 - drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 - recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.3+1 + digit_scanner: ^1.0.4 group_radio_button: ^1.3.0 - flutter_keyboard_visibility: ^5.4.0 - auto_route: ^7.8.4 - collection: ^1.16.0 - digit_data_model: ^1.0.5-dev.1 + flutter_keyboard_visibility: ^5.4.1 + digit_data_model: ^1.0.5 stream_transform: ^2.1.0 - survey_form: ^0.0.1-dev.2 + survey_form: ^1.0.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 - build_runner: ^2.4.7 + build_runner: ^2.4.11 json_serializable: ^6.4.0 drift_dev: ^2.14.1 bloc_test: ^9.1.0 @@ -51,9 +52,9 @@ dev_dependencies: dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 flutter: assets: diff --git a/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart b/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart index d3d474acb..03a1c0d6e 100644 --- a/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart +++ b/packages/referral_reconciliation/test/blocs/referral_recon_record_test.dart @@ -35,22 +35,7 @@ void main() { // Grouping tests related to RecordStockBloc group('RecordHFReferralBloc', () { - // Declaring variables for mock and bloc - late MockReferralReconSingleton mockReferralReconSingleton; - late RecordHFReferralBloc recordHFReferralBloc; - - // Setting up the mock and the bloc for each test - setUp(() { - mockReferralReconSingleton = MockReferralReconSingleton(); - recordHFReferralBloc = RecordHFReferralBloc( - RecordHFReferralState.create( - projectId: mockProjectId, - facilityId: mockProjectFacilityModel.id, - healthFacilityCord: mockHealthFacilityCoordinator, - dateOfEvaluation: mockDateOfRecord, - ), - ); - }); + setUp(() {}); // Test for saveWarehouseDetails event blocTest( diff --git a/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart b/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart index d47d6d7db..19dd4013b 100644 --- a/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart +++ b/packages/referral_reconciliation/test/blocs/referral_recon_service_definition_test.dart @@ -26,14 +26,10 @@ void main() { registerFallbackValue(FakeServiceDefinitionSearchModel()); }); group('ReferralReconServiceBloc', () { - // Declare variables for MockInventorySingleton and FacilityBloc - late MockReferralReconSingleton mockReferralReconSingleton; late ReferralReconServiceDefinitionBloc serviceBloc; late MockServiceDataRepository serviceDefinitionDataRepository; setUp(() { - // Initialize MockReferralReconSingleton and ReferralReconServiceBloc before each test - mockReferralReconSingleton = MockReferralReconSingleton(); serviceDefinitionDataRepository = MockServiceDataRepository(); serviceBloc = ReferralReconServiceDefinitionBloc( const ReferralReconServiceDefinitionState.empty(), diff --git a/packages/registration_delivery/CHANGELOG.md b/packages/registration_delivery/CHANGELOG.md index ddb41f002..bcad861e0 100644 --- a/packages/registration_delivery/CHANGELOG.md +++ b/packages/registration_delivery/CHANGELOG.md @@ -1,15 +1,35 @@ +## 1.0.5+2 + +* Action label and status change with projectType + +## 1.0.5+1 + +* householdOverViewActionText localization fix + +## 1.0.5 + +* Upgrade to Flutter 3.22 +* Updated latest version's of digit_data_model, survey_form, digit_scanner +* Migrated to digit_ui_components + +## 1.0.3+4 + +* Delivery action label and administered_success status update based on the project + ## 1.0.4-dev.5 + * Updated digit_data_model to latest version * Updated survey_form to latest version * Migrated to digit_ui_components ## 1.0.3+3 + * Updated Service model additionalDetails objectType in digit_data_model package ## 1.0.3+2 * Bug Fix - - * fixed wrong status map of beneficiaryRefused in utils + * fixed wrong status map of beneficiaryRefused in utils * Sorting tasks based on createTime ## 1.0.4-dev.1 @@ -19,8 +39,8 @@ ## 1.0.3+1 * Bug Fixes - - * Reload fix after edit - * Project Beneficiary create for all members if not registered for campaign + * Reload fix after edit + * Project Beneficiary create for all members if not registered for campaign * Updated digit_scanner package, digit_components, digit_data_model ## 1.0.3 @@ -39,11 +59,11 @@ ## 1.0.3-dev.10 -* Removed stepper if number of deliveries is greater than 1 +* Removed stepper if number of deliveries is greater than 1 ## 1.0.3-dev.9 -* Updated localization key +* Updated localization key * Resolved taskStatus key from task table entity ## 1.0.3-dev.8 @@ -60,7 +80,7 @@ ## 1.0.3-dev.5 -* Added count for filter search +* Added count for filter search * Bug fixes ## 1.0.3-dev.4 @@ -71,7 +91,6 @@ * Closed household flow change - ## 1.0.3-dev.2 * Closed household search fixes @@ -147,7 +166,7 @@ ## 0.0.0-dev.2 -* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used +* Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used ## 0.0.0-dev.1 diff --git a/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart b/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart index ba5a9736b..0b2b6f069 100644 --- a/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart +++ b/packages/registration_delivery/lib/blocs/beneficiary_registration/beneficiary_registration.dart @@ -1,7 +1,6 @@ // GENERATED using mason_cli import 'dart:async'; -import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/utils/typedefs.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -409,6 +408,11 @@ class BeneficiaryRegistrationBloc editHousehold: (value) async { emit(value.copyWith(loading: true)); try { + final HouseholdModel? existingHousehold = + (await householdRepository.search(HouseholdSearchModel( + clientReferenceId: [value.householdModel.clientReferenceId], + ))) + .firstOrNull; await householdRepository.update( event.household.copyWith( clientAuditDetails: ClientAuditDetails( @@ -426,6 +430,10 @@ class BeneficiaryRegistrationBloc relatedClientReferenceId: value.householdModel.clientReferenceId, ), + id: existingHousehold?.id, + rowVersion: existingHousehold?.rowVersion ?? 1, + nonRecoverableError: + existingHousehold?.nonRecoverableError ?? false, ), ); final projectBeneficiary = await projectBeneficiaryRepository.search( @@ -492,6 +500,11 @@ class BeneficiaryRegistrationBloc } for (var element in value.individualModel) { + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [element.clientReferenceId], + ))) + .firstOrNull; await individualRepository.update( element.copyWith( address: [ @@ -503,6 +516,10 @@ class BeneficiaryRegistrationBloc ); }), ], + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: + existingIndividual?.nonRecoverableError ?? false, ), ); } @@ -548,7 +565,17 @@ class BeneficiaryRegistrationBloc ], ), ); - await individualRepository.update(individual); + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [individual.clientReferenceId], + ))) + .firstOrNull; + await individualRepository.update(individual.copyWith( + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: + existingIndividual?.nonRecoverableError ?? false, + )); if (projectBeneficiary.isNotEmpty) { if (projectBeneficiary.first.tag != event.tag) { await projectBeneficiaryRepository diff --git a/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart b/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart index 96fc6d58b..e85ac489b 100644 --- a/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart +++ b/packages/registration_delivery/lib/blocs/household_overview/household_overview.dart @@ -222,16 +222,65 @@ class HouseholdOverviewBloc HouseholdOverviewEmitter emit, ) async { // Delete the household from the repository. + final HouseholdModel? existingHousehold = + (await householdRepository.search(HouseholdSearchModel( + clientReferenceId: [event.householdModel.clientReferenceId], + ))) + .firstOrNull; await householdRepository.delete( event.householdModel.copyWith( - rowVersion: event.householdModel.rowVersion, + id: existingHousehold?.id, + rowVersion: existingHousehold?.rowVersion ?? 1, + nonRecoverableError: existingHousehold?.nonRecoverableError ?? false, ), ); // Iterate through individual members of the household. for (final i in event.members) { - // Delete the individual from the repository. - await individualRepository.delete(i); +// Delete the individual from the repository. + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [i.clientReferenceId], + ))) + .firstOrNull; + await individualRepository.delete(i.copyWith( + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: existingIndividual?.nonRecoverableError ?? false, + )); + if (event.projectBeneficiaryType == BeneficiaryType.individual) { + // Search for project beneficiary associated with the deleted individual. + final projectBeneficiaries = await projectBeneficiaryRepository.search( + ProjectBeneficiarySearchModel( + beneficiaryClientReferenceId: [ + i.clientReferenceId, + ], + ), + ); + // Delete the associated project beneficiaries. + for (final projectBeneficiary in projectBeneficiaries) { + await projectBeneficiaryRepository.delete( + projectBeneficiary.copyWith( + rowVersion: projectBeneficiary.rowVersion, + clientAuditDetails: (projectBeneficiary + .clientAuditDetails?.createdBy != + null && + projectBeneficiary.clientAuditDetails?.createdTime != + null) + ? ClientAuditDetails( + createdBy: + projectBeneficiary.clientAuditDetails!.createdBy, + createdTime: + projectBeneficiary.clientAuditDetails!.createdTime, + lastModifiedBy: + projectBeneficiary.clientAuditDetails!.lastModifiedBy, + lastModifiedTime: DateTime.now().millisecondsSinceEpoch, + ) + : null, + ), + ); + } + } // Search for household members associated with the deleted individual. final householdMember = @@ -250,12 +299,23 @@ class HouseholdOverviewBloc } } - // Delete the project beneficiary associated with the household. - await projectBeneficiaryRepository.delete( - event.projectBeneficiaryModel.copyWith( - rowVersion: event.projectBeneficiaryModel.rowVersion, - ), - ); + if (BeneficiaryType.household == event.projectBeneficiaryType) { + // Delete the project beneficiary associated with the household. + final ProjectBeneficiaryModel? existingProjectBeneficiary = + (await projectBeneficiaryRepository + .search(ProjectBeneficiarySearchModel( + clientReferenceId: [event.projectBeneficiaryModel.clientReferenceId], + ))) + .firstOrNull; + await projectBeneficiaryRepository.delete( + event.projectBeneficiaryModel.copyWith( + id: existingProjectBeneficiary?.id, + rowVersion: existingProjectBeneficiary?.rowVersion ?? 1, + nonRecoverableError: + existingProjectBeneficiary?.nonRecoverableError ?? false, + ), + ); + } } // This function handles the deletion of an individual from a household. @@ -263,9 +323,48 @@ class HouseholdOverviewBloc HouseholdOverviewDeleteIndividualEvent event, HouseholdOverviewEmitter emit, ) async { - // Delete the individual from the repository. - await individualRepository.delete(event.individualModel); - +// Delete the individual from the repository. + final IndividualModel? existingIndividual = + (await individualRepository.search(IndividualSearchModel( + clientReferenceId: [event.individualModel.clientReferenceId], + ))) + .firstOrNull; + await individualRepository.delete(event.individualModel.copyWith( + id: existingIndividual?.id, + rowVersion: existingIndividual?.rowVersion ?? 1, + nonRecoverableError: existingIndividual?.nonRecoverableError ?? false, + )); + if (event.projectBeneficiaryType == BeneficiaryType.individual) { + // Search for project beneficiary associated with the deleted individual. + final projectBeneficiaries = await projectBeneficiaryRepository.search( + ProjectBeneficiarySearchModel( + beneficiaryClientReferenceId: [ + event.individualModel.clientReferenceId, + ], + ), + ); + // Delete the associated project beneficiaries. + for (final projectBeneficiary in projectBeneficiaries) { + await projectBeneficiaryRepository.delete( + projectBeneficiary.copyWith( + rowVersion: projectBeneficiary.rowVersion, + clientAuditDetails: (projectBeneficiary + .clientAuditDetails?.createdBy != + null && + projectBeneficiary.clientAuditDetails?.createdTime != null) + ? ClientAuditDetails( + createdBy: projectBeneficiary.clientAuditDetails!.createdBy, + createdTime: + projectBeneficiary.clientAuditDetails!.createdTime, + lastModifiedBy: + projectBeneficiary.clientAuditDetails!.lastModifiedBy, + lastModifiedTime: DateTime.now().millisecondsSinceEpoch, + ) + : null, + ), + ); + } + } // Search for household members associated with the deleted individual. final householdMembers = await householdMemberRepository.search( HouseholdMemberSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart b/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart index 11e576113..b0054207f 100644 --- a/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart +++ b/packages/registration_delivery/lib/blocs/search_households/household_global_seach.dart @@ -331,7 +331,7 @@ class HouseHoldGlobalSearchBloc extends SearchHouseholdsBloc { if (projectBeneficiariesList.isNotEmpty) { if (taskList.isEmpty) { taskList = - await fetchTaskbyProjectBeneficiary(projectBeneficiariesList); + await fetchTaskByProjectBeneficiary(projectBeneficiariesList); } sideEffectsList = await sideEffectDataRepository.search(SideEffectSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart b/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart index 696df872e..c0972ac55 100644 --- a/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart +++ b/packages/registration_delivery/lib/blocs/search_households/individual_global_search.dart @@ -79,14 +79,14 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { clientReferenceId: individualClientReferenceIds.map((e) => e.toString()).toList())); - final List householdMembers = - await fetchHouseholdMembersBulk( + householdMembersList = await fetchHouseholdMembersBulk( individualClientReferenceIds, null, ); - final houseHoldIds = - householdMembers.map((e) => e.householdClientReferenceId!).toList(); + final houseHoldIds = householdMembersList + .map((e) => e.householdClientReferenceId!) + .toList(); householdList = await household.search( HouseholdSearchModel( @@ -94,12 +94,32 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { ), ); + individualsList = await individual.search( + IndividualSearchModel( + clientReferenceId: householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(), + ), + ); + + individualClientReferenceIds = householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(); + projectBeneficiariesList = await projectBeneficiary.search( ProjectBeneficiarySearchModel( - projectId: [RegistrationDeliverySingleton().projectId.toString()], + projectId: [ + event.globalSearchParams.filter!.contains(Status.registered.name) + ? RegistrationDeliverySingleton().projectId.toString() + : '' + ], beneficiaryClientReferenceId: individualClientReferenceIds.map((e) => e).toList())); + individualsList = await individual.search( + IndividualSearchModel(clientReferenceId: individualClientReferenceIds), + ); + List tasksRelated = await _processTasksAndRelatedData( projectBeneficiariesList, taskList, sideEffectsList, referralsList); @@ -108,7 +128,7 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { referralsList = tasksRelated[2]; await _processHouseholdEntries( - householdMembers, + householdMembersList, householdList, individualsList, projectBeneficiariesList, @@ -141,14 +161,6 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { null, ); - final List individualClientReferenceIds = householdMembersList - .map((e) => e.individualClientReferenceId.toString()) - .toList(); - - individualsList = await individual.search( - IndividualSearchModel(clientReferenceId: individualClientReferenceIds), - ); - late List houseHoldClientReferenceIds = []; houseHoldClientReferenceIds = householdMembersList @@ -159,6 +171,33 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { clientReferenceId: houseHoldClientReferenceIds, )); + householdMembersList = await fetchHouseholdMembersBulk( + null, + houseHoldClientReferenceIds, + ); + + individualsList = await individual.search( + IndividualSearchModel( + clientReferenceId: householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(), + ), + ); + + final List individualClientReferenceIds = householdMembersList + .map((e) => e.individualClientReferenceId.toString()) + .toList(); + + projectBeneficiariesList = await projectBeneficiary.search( + ProjectBeneficiarySearchModel( + projectId: [RegistrationDeliverySingleton().projectId.toString()], + beneficiaryClientReferenceId: + individualClientReferenceIds.map((e) => e).toList())); + + individualsList = await individual.search( + IndividualSearchModel(clientReferenceId: individualClientReferenceIds), + ); + finalResults.forEach((element) { taskList.add(element); }); @@ -193,7 +232,7 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { individualClientReferenceIds.map((e) => e.toString()).toList())); // Search for individual results using the extracted IDs and search text. - final List householdMembers = + List householdMembers = await fetchHouseholdMembersBulk( individualClientReferenceIds, null, @@ -205,6 +244,19 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { .toList(), )); + householdMembers = await fetchHouseholdMembersBulk( + null, + householdList.map((e) => e.clientReferenceId).toList(), + ); + + individualsList = await individual.search( + IndividualSearchModel( + clientReferenceId: householdMembers + .map((e) => e.individualClientReferenceId.toString()) + .toList(), + ), + ); + projectBeneficiariesList = await projectBeneficiary.search( ProjectBeneficiarySearchModel( projectId: [RegistrationDeliverySingleton().projectId.toString()], @@ -326,7 +378,7 @@ class IndividualGlobalSearchBloc extends SearchHouseholdsBloc { if (projectBeneficiariesList.isNotEmpty) { if (taskList.isEmpty) { taskList = - await fetchTaskbyProjectBeneficiary(projectBeneficiariesList); + await fetchTaskByProjectBeneficiary(projectBeneficiariesList); } sideEffectsList = await sideEffectDataRepository.search(SideEffectSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/proximity_search.dart b/packages/registration_delivery/lib/blocs/search_households/proximity_search.dart new file mode 100644 index 000000000..e69de29bb diff --git a/packages/registration_delivery/lib/blocs/search_households/search_households.dart b/packages/registration_delivery/lib/blocs/search_households/search_households.dart index ed259aa84..2219eb5cc 100644 --- a/packages/registration_delivery/lib/blocs/search_households/search_households.dart +++ b/packages/registration_delivery/lib/blocs/search_households/search_households.dart @@ -100,7 +100,7 @@ class SearchHouseholdsBloc }, )?.individualClientReferenceId, ); - final tasks = await fetchTaskbyProjectBeneficiary(projectBeneficiaries); + final tasks = await fetchTaskByProjectBeneficiary(projectBeneficiaries); final sideEffects = await sideEffectDataRepository.search(SideEffectSearchModel( @@ -189,7 +189,7 @@ class SearchHouseholdsBloc } // Fetch the task - Future> fetchTaskbyProjectBeneficiary( + Future> fetchTaskByProjectBeneficiary( List projectBeneficiaries, ) async { return await taskDataRepository.search(TaskSearchModel( diff --git a/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart b/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart index 33ef8f30f..67c5966cd 100644 --- a/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart +++ b/packages/registration_delivery/lib/blocs/search_households/tag_by_search.dart @@ -99,7 +99,7 @@ class TagSearchBloc extends SearchHouseholdsBloc { )); // Search for tasks and side effects based on project beneficiaries. - final tasks = await fetchTaskbyProjectBeneficiary(beneficiaries); + final tasks = await fetchTaskByProjectBeneficiary(beneficiaries); final referrals = await referralDataRepository.search(ReferralSearchModel( projectBeneficiaryClientReferenceId: diff --git a/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart index 77ef0896e..f319c6bba 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/household_base.dart @@ -13,6 +13,5 @@ abstract class HouseholdLocalBaseRepository @override DataModelType get type => DataModelType.household; - @override TableInfo get table => sql.household; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart index e1cd54e07..033457ecf 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/household_member_base.dart @@ -9,6 +9,5 @@ abstract class HouseholdMemberLocalBaseRepository @override DataModelType get type => DataModelType.householdMember; - @override TableInfo get table => sql.householdMember; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart index d1f6b4b81..1a4657b45 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/project_beneficiary_base.dart @@ -10,6 +10,5 @@ abstract class ProjectBeneficiaryLocalBaseRepository @override DataModelType get type => DataModelType.projectBeneficiary; - @override TableInfo get table => sql.projectBeneficiary; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart index ec036cfd8..c03e9da60 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/side_effect_base.dart @@ -11,6 +11,5 @@ abstract class SideEffectLocalBaseRepository @override DataModelType get type => DataModelType.sideEffect; - @override TableInfo get table => sql.sideEffect; } diff --git a/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart b/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart index e051ce653..561a4e4b3 100644 --- a/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart +++ b/packages/registration_delivery/lib/data/repositories/local/base/task_base.dart @@ -12,6 +12,5 @@ abstract class TaskLocalBaseRepository @override DataModelType get type => DataModelType.task; - @override TableInfo get table => sql.task; } diff --git a/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart b/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart index 26ffbd225..13dca03cc 100644 --- a/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart +++ b/packages/registration_delivery/lib/data/repositories/local/household_global_search.dart @@ -234,8 +234,7 @@ class HouseHoldGlobalSearchRepository extends LocalRepository { sql.householdMember, sql.householdMember.individualClientReferenceId .equalsExp(sql.individual.clientReferenceId)) - ]) - ..where(sql.householdMember.isHeadOfHousehold.equals(true)); + ]); selectQuery.join([ leftOuterJoin( sql.household, @@ -266,6 +265,20 @@ class HouseHoldGlobalSearchRepository extends LocalRepository { sql.name.givenName.contains( params.nameSearch!, ), + sql.name.familyName.contains( + params.nameSearch!, + ), + buildOr([ + sql.name.givenName.contains( + params.nameSearch!, + ), + sql.name.familyName.contains( + params.nameSearch!, + ), + sql.name.otherNames.equals( + params.nameSearch!, + ), + ]), ]), ])); } @@ -497,7 +510,7 @@ class HouseHoldGlobalSearchRepository extends LocalRepository { var variables = selectQuery.constructQuery().introducedVariables; var indexesLength = selectQuery.constructQuery().variableIndices; - var totalCount; + dynamic totalCount; try { totalCount = await sql diff --git a/packages/registration_delivery/lib/data/repositories/local/household_member.dart b/packages/registration_delivery/lib/data/repositories/local/household_member.dart index 5815eb473..cb1f426bf 100644 --- a/packages/registration_delivery/lib/data/repositories/local/household_member.dart +++ b/packages/registration_delivery/lib/data/repositories/local/household_member.dart @@ -4,7 +4,6 @@ import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; import 'package:registration_delivery/models/entities/household_member.dart'; import 'package:registration_delivery/utils/extensions/extensions.dart'; -import 'package:registration_delivery/utils/utils.dart'; class HouseholdMemberLocalRepository extends LocalRepository { diff --git a/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart b/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart index abd395fef..1dfad5ded 100644 --- a/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart +++ b/packages/registration_delivery/lib/data/repositories/local/individual_global_search.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:math' as math; +import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; import 'package:flutter/material.dart'; @@ -219,19 +220,15 @@ class IndividualGlobalSearchRepository extends LocalRepository { return selectQuery; } else if (params.nameSearch != null || params.nameSearch!.isNotEmpty && selectQuery == null) { - selectQuery = super - .sql - .individual - .select() - .join([joinName(sql), joinIndividualAddress(sql)]); + selectQuery = super.sql.individual.select().join( + [joinName(sql), joinIdentifier(sql), joinIndividualAddress(sql)]); await searchByName(selectQuery, params, sql); selectQuery = selectQuery.join([ leftOuterJoin( sql.householdMember, sql.householdMember.individualClientReferenceId .equalsExp(sql.individual.clientReferenceId)) - ]) - ..where(sql.householdMember.isHeadOfHousehold.equals(true)); + ]); selectQuery.join([ leftOuterJoin( sql.household, @@ -245,9 +242,7 @@ class IndividualGlobalSearchRepository extends LocalRepository { } else if (params.nameSearch != null && params.nameSearch!.isNotEmpty && selectQuery != null) { - selectQuery = selectQuery.join([ - joinName(sql), - ]); + selectQuery = selectQuery.join([joinName(sql), joinIdentifier(sql)]); selectQuery = searchByName(selectQuery, params, sql); } return selectQuery; @@ -261,6 +256,20 @@ class IndividualGlobalSearchRepository extends LocalRepository { sql.name.givenName.contains( params.nameSearch!, ), + sql.name.familyName.contains( + params.nameSearch!, + ), + buildOr([ + sql.name.givenName.contains( + params.nameSearch!, + ), + sql.name.familyName.contains( + params.nameSearch!, + ), + sql.name.otherNames.equals( + params.nameSearch!, + ), + ]), ]), ])); } @@ -325,6 +334,7 @@ class IndividualGlobalSearchRepository extends LocalRepository { Status.closeHousehold.name: Status.closeHousehold, }; var applyFilter = filter; + var appliedFilter = statusMap[filter]!.toValue(); if (selectQuery == null) { selectQuery = sql.select(sql.task).join([ leftOuterJoin( @@ -333,11 +343,11 @@ class IndividualGlobalSearchRepository extends LocalRepository { .equalsExp(sql.task.projectBeneficiaryClientReferenceId)), leftOuterJoin( sql.individual, - sql.individual.clientReferenceId - .equalsExp(sql.projectBeneficiary.beneficiaryClientReferenceId)), + sql.individual.clientReferenceId.equalsExp( + sql.projectBeneficiary.beneficiaryClientReferenceId)), ]) ..where(sql.task.status.equals( - statusMap[applyFilter]!.toValue(), + appliedFilter, )); if (!(params.filter!.contains(Status.notRegistered.name))) { selectQuery @@ -370,6 +380,15 @@ class IndividualGlobalSearchRepository extends LocalRepository { ); } + joinIdentifier(LocalSqlDataStore sql) { + return leftOuterJoin( + sql.identifier, + sql.identifier.clientReferenceId.equalsExp( + sql.individual.clientReferenceId, + ), + ); + } + joinIndividualAddress(LocalSqlDataStore sql) { return leftOuterJoin( sql.address, @@ -393,7 +412,7 @@ class IndividualGlobalSearchRepository extends LocalRepository { var variables = selectQuery.constructQuery().introducedVariables; var indexesLength = selectQuery.constructQuery().variableIndices; - var totalCount; + dynamic totalCount; try { totalCount = await sql @@ -414,38 +433,71 @@ class IndividualGlobalSearchRepository extends LocalRepository { final individual = e.readTableOrNull(sql.individual); final address = e.readTableOrNull(sql.address); final name = e.readTableOrNull(sql.name); + final identifier = e.readTableOrNull(sql.identifier); return IndividualModel( - id: individual?.id, - tenantId: individual?.tenantId, - clientReferenceId: individual!.clientReferenceId, + id: individual.id, + tenantId: individual.tenantId, + individualId: individual.individualId, + clientReferenceId: individual.clientReferenceId, dateOfBirth: individual.dateOfBirth, - name: NameModel( - givenName: name?.givenName, - individualClientReferenceId: individual.clientReferenceId, - tenantId: individual.tenantId, - auditDetails: AuditDetails( - createdBy: individual.auditCreatedBy!, - createdTime: individual.auditCreatedTime!, - lastModifiedBy: individual.auditModifiedBy, - lastModifiedTime: individual.auditModifiedTime, - ), - ), - rowVersion: individual.rowVersion, + mobileNumber: individual.mobileNumber, isDeleted: individual.isDeleted, - auditDetails: AuditDetails( - createdBy: individual.auditCreatedBy!, - createdTime: individual.auditCreatedTime!, - lastModifiedBy: individual.auditModifiedBy, - lastModifiedTime: individual.auditModifiedTime, - ), - address: address == null + rowVersion: individual.rowVersion, + clientAuditDetails: (individual.clientCreatedBy != null && + individual.clientCreatedTime != null) + ? ClientAuditDetails( + createdBy: individual.clientCreatedBy!, + createdTime: individual.clientCreatedTime!, + lastModifiedBy: individual.clientModifiedBy, + lastModifiedTime: individual.clientModifiedTime, + ) + : null, + auditDetails: (individual.auditCreatedBy != null && + individual.auditCreatedTime != null) + ? AuditDetails( + createdBy: individual.auditCreatedBy!, + createdTime: individual.auditCreatedTime!, + lastModifiedBy: individual.auditModifiedBy, + lastModifiedTime: individual.auditModifiedTime, + ) + : null, + name: name == null ? null - : [ - AddressModel( + : NameModel( + id: name.id, + individualClientReferenceId: individual.clientReferenceId, + familyName: name.familyName, + givenName: name.givenName, + otherNames: name.otherNames, + rowVersion: name.rowVersion, + tenantId: name.tenantId, + auditDetails: (name.auditCreatedBy != null && + name.auditCreatedTime != null) + ? AuditDetails( + createdBy: name.auditCreatedBy!, + createdTime: name.auditCreatedTime!, + lastModifiedBy: name.auditModifiedBy, + lastModifiedTime: name.auditModifiedTime, + ) + : null, + clientAuditDetails: (name.clientCreatedBy != null && + name.clientCreatedTime != null) + ? ClientAuditDetails( + createdBy: name.clientCreatedBy!, + createdTime: name.clientCreatedTime!, + lastModifiedBy: name.clientModifiedBy, + lastModifiedTime: name.clientModifiedTime, + ) + : null, + ), + bloodGroup: individual.bloodGroup, + address: [ + address == null + ? null + : AddressModel( id: address.id, - relatedClientReferenceId: - address.relatedClientReferenceId, + relatedClientReferenceId: individual.clientReferenceId, tenantId: address.tenantId, doorNo: address.doorNo, latitude: address.latitude, @@ -456,22 +508,57 @@ class IndividualGlobalSearchRepository extends LocalRepository { addressLine2: address.addressLine2, city: address.city, pincode: address.pincode, + type: address.type, locality: address.localityBoundaryCode != null ? LocalityModel( code: address.localityBoundaryCode!, name: address.localityBoundaryName, ) : null, - type: address.type, rowVersion: address.rowVersion, - auditDetails: AuditDetails( - createdBy: individual.auditCreatedBy!, - createdTime: individual.auditCreatedTime!, - lastModifiedBy: individual.auditModifiedBy, - lastModifiedTime: individual.auditModifiedTime, - ), + auditDetails: (address.auditCreatedBy != null && + address.auditCreatedTime != null) + ? AuditDetails( + createdBy: address.auditCreatedBy!, + createdTime: address.auditCreatedTime!, + lastModifiedBy: address.auditModifiedBy, + lastModifiedTime: address.auditModifiedTime, + ) + : null, + clientAuditDetails: (address.clientCreatedBy != null && + address.clientCreatedTime != null) + ? ClientAuditDetails( + createdBy: address.clientCreatedBy!, + createdTime: address.clientCreatedTime!, + lastModifiedBy: address.clientModifiedBy, + lastModifiedTime: address.clientModifiedTime, + ) + : null, ), - ], + ].whereNotNull().toList(), + gender: individual.gender, + identifiers: [ + if (identifier != null) + IdentifierModel( + id: identifier.id, + clientReferenceId: individual.clientReferenceId, + identifierType: identifier.identifierType, + identifierId: identifier.identifierId, + rowVersion: identifier.rowVersion, + tenantId: identifier.tenantId, + auditDetails: AuditDetails( + createdBy: identifier.auditCreatedBy!, + createdTime: identifier.auditCreatedTime!, + lastModifiedBy: identifier.auditModifiedBy, + lastModifiedTime: identifier.auditModifiedTime, + ), + ), + ], + additionalFields: individual.additionalFields == null + ? null + : IndividualAdditionalFieldsMapper.fromJson( + individual.additionalFields!, + ), ); }) .where((element) => element.isDeleted != true) diff --git a/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart b/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart index 1a63c8013..3beb9ed45 100644 --- a/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart +++ b/packages/registration_delivery/lib/data/repositories/local/project_beneficiary.dart @@ -202,8 +202,7 @@ class ProjectBeneficiaryLocalRepository extends LocalRepository< final updated = entity.copyWith( isDeleted: true, rowVersion: entity.rowVersion, - clientAuditDetails: (entity.clientAuditDetails?.createdBy != null && - entity.clientAuditDetails!.createdTime != null) + clientAuditDetails: (entity.clientAuditDetails?.createdBy != null) ? ClientAuditDetails( createdBy: entity.clientAuditDetails!.createdBy, createdTime: entity.clientAuditDetails!.createdTime, diff --git a/packages/registration_delivery/lib/data/repositories/local/side_effect.dart b/packages/registration_delivery/lib/data/repositories/local/side_effect.dart index 71c57557e..4e7080092 100644 --- a/packages/registration_delivery/lib/data/repositories/local/side_effect.dart +++ b/packages/registration_delivery/lib/data/repositories/local/side_effect.dart @@ -4,7 +4,6 @@ import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; import 'package:registration_delivery/models/entities/side_effect.dart'; -import 'package:registration_delivery/utils/utils.dart'; class SideEffectLocalRepository extends LocalRepository { diff --git a/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart b/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart index 62bd69053..2cec78d77 100644 --- a/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/additional_fields_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'additional_fields_type.dart'; diff --git a/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart b/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart index d51b33c6a..ea054fe4b 100644 --- a/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/deliver_strategy_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'deliver_strategy_type.dart'; diff --git a/packages/registration_delivery/lib/models/entities/household.mapper.dart b/packages/registration_delivery/lib/models/entities/household.mapper.dart index 17d2a4ef9..442a81e82 100644 --- a/packages/registration_delivery/lib/models/entities/household.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/household.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'household.dart'; @@ -132,10 +132,8 @@ mixin HouseholdSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdSearchModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdSearchModel, other)); + return HouseholdSearchModelMapper.ensureInitialized() + .equalsValue(this as HouseholdSearchModel, other); } @override @@ -376,10 +374,8 @@ mixin HouseholdModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdModel, other)); + return HouseholdModelMapper.ensureInitialized() + .equalsValue(this as HouseholdModel, other); } @override @@ -593,10 +589,8 @@ mixin HouseholdAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as HouseholdAdditionalFields, other)); + return HouseholdAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as HouseholdAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/household_member.mapper.dart b/packages/registration_delivery/lib/models/entities/household_member.mapper.dart index 83b8174d6..5856ef4cd 100644 --- a/packages/registration_delivery/lib/models/entities/household_member.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/household_member.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'household_member.dart'; @@ -165,10 +165,8 @@ mixin HouseholdMemberSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdMemberSearchModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdMemberSearchModel, other)); + return HouseholdMemberSearchModelMapper.ensureInitialized() + .equalsValue(this as HouseholdMemberSearchModel, other); } @override @@ -500,10 +498,8 @@ mixin HouseholdMemberModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdMemberModelMapper.ensureInitialized() - .isValueEqual(this as HouseholdMemberModel, other)); + return HouseholdMemberModelMapper.ensureInitialized() + .equalsValue(this as HouseholdMemberModel, other); } @override @@ -726,10 +722,8 @@ mixin HouseholdMemberAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - HouseholdMemberAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as HouseholdMemberAdditionalFields, other)); + return HouseholdMemberAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as HouseholdMemberAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart b/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart index 81ad3c276..dd6b0bd74 100644 --- a/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/project_beneficiary.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'project_beneficiary.dart'; @@ -183,10 +183,8 @@ mixin ProjectBeneficiarySearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectBeneficiarySearchModelMapper.ensureInitialized() - .isValueEqual(this as ProjectBeneficiarySearchModel, other)); + return ProjectBeneficiarySearchModelMapper.ensureInitialized() + .equalsValue(this as ProjectBeneficiarySearchModel, other); } @override @@ -516,10 +514,8 @@ mixin ProjectBeneficiaryModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectBeneficiaryModelMapper.ensureInitialized() - .isValueEqual(this as ProjectBeneficiaryModel, other)); + return ProjectBeneficiaryModelMapper.ensureInitialized() + .equalsValue(this as ProjectBeneficiaryModel, other); } @override @@ -748,11 +744,8 @@ mixin ProjectBeneficiaryAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ProjectBeneficiaryAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ProjectBeneficiaryAdditionalFields, other)); + return ProjectBeneficiaryAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ProjectBeneficiaryAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/referral.mapper.dart b/packages/registration_delivery/lib/models/entities/referral.mapper.dart index 7fd1e1e76..ca225ff86 100644 --- a/packages/registration_delivery/lib/models/entities/referral.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/referral.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'referral.dart'; @@ -143,10 +143,8 @@ mixin ReferralSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ReferralSearchModelMapper.ensureInitialized() - .isValueEqual(this as ReferralSearchModel, other)); + return ReferralSearchModelMapper.ensureInitialized() + .equalsValue(this as ReferralSearchModel, other); } @override @@ -428,10 +426,8 @@ mixin ReferralModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ReferralModelMapper.ensureInitialized() - .isValueEqual(this as ReferralModel, other)); + return ReferralModelMapper.ensureInitialized() + .equalsValue(this as ReferralModel, other); } @override @@ -658,10 +654,8 @@ mixin ReferralAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ReferralAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ReferralAdditionalFields, other)); + return ReferralAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ReferralAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart b/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart index aa90cca7b..6892165ce 100644 --- a/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/reg_form_validations_type.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'reg_form_validations_type.dart'; diff --git a/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart b/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart index 96206f505..442d8d348 100644 --- a/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/registration_delivery_enums.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'registration_delivery_enums.dart'; diff --git a/packages/registration_delivery/lib/models/entities/side_effect.dart b/packages/registration_delivery/lib/models/entities/side_effect.dart index c405455c2..1577f12b8 100644 --- a/packages/registration_delivery/lib/models/entities/side_effect.dart +++ b/packages/registration_delivery/lib/models/entities/side_effect.dart @@ -48,6 +48,7 @@ class SideEffectModel extends EntityModel with SideEffectModelMappable { final String? id; final String? projectId; final String? taskClientReferenceId; + final String? projectBeneficiaryClientReferenceId; final int? reAttempts; final List? symptoms; final bool? nonRecoverableError; @@ -60,6 +61,7 @@ class SideEffectModel extends EntityModel with SideEffectModelMappable { this.additionalFields, this.id, this.projectId, + this.projectBeneficiaryClientReferenceId, this.taskClientReferenceId, this.reAttempts, this.symptoms, @@ -93,6 +95,8 @@ class SideEffectModel extends EntityModel with SideEffectModelMappable { clientReferenceId: Value(clientReferenceId), tenantId: Value(tenantId), rowVersion: Value(rowVersion), + projectBeneficiaryClientReferenceId: + Value(projectBeneficiaryClientReferenceId), ); } } diff --git a/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart b/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart index ad644a277..06ed7253e 100644 --- a/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/side_effect.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'side_effect.dart'; @@ -129,10 +129,8 @@ mixin SideEffectSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SideEffectSearchModelMapper.ensureInitialized() - .isValueEqual(this as SideEffectSearchModel, other)); + return SideEffectSearchModelMapper.ensureInitialized() + .equalsValue(this as SideEffectSearchModel, other); } @override @@ -278,6 +276,13 @@ class SideEffectModelMapper extends SubClassMapperBase { static String? _$projectId(SideEffectModel v) => v.projectId; static const Field _f$projectId = Field('projectId', _$projectId, opt: true); + static String? _$projectBeneficiaryClientReferenceId(SideEffectModel v) => + v.projectBeneficiaryClientReferenceId; + static const Field + _f$projectBeneficiaryClientReferenceId = Field( + 'projectBeneficiaryClientReferenceId', + _$projectBeneficiaryClientReferenceId, + opt: true); static String? _$taskClientReferenceId(SideEffectModel v) => v.taskClientReferenceId; static const Field _f$taskClientReferenceId = @@ -319,6 +324,8 @@ class SideEffectModelMapper extends SubClassMapperBase { #additionalFields: _f$additionalFields, #id: _f$id, #projectId: _f$projectId, + #projectBeneficiaryClientReferenceId: + _f$projectBeneficiaryClientReferenceId, #taskClientReferenceId: _f$taskClientReferenceId, #reAttempts: _f$reAttempts, #symptoms: _f$symptoms, @@ -346,6 +353,8 @@ class SideEffectModelMapper extends SubClassMapperBase { additionalFields: data.dec(_f$additionalFields), id: data.dec(_f$id), projectId: data.dec(_f$projectId), + projectBeneficiaryClientReferenceId: + data.dec(_f$projectBeneficiaryClientReferenceId), taskClientReferenceId: data.dec(_f$taskClientReferenceId), reAttempts: data.dec(_f$reAttempts), symptoms: data.dec(_f$symptoms), @@ -392,10 +401,8 @@ mixin SideEffectModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SideEffectModelMapper.ensureInitialized() - .isValueEqual(this as SideEffectModel, other)); + return SideEffectModelMapper.ensureInitialized() + .equalsValue(this as SideEffectModel, other); } @override @@ -426,6 +433,7 @@ abstract class SideEffectModelCopyWith<$R, $In extends SideEffectModel, $Out> {SideEffectAdditionalFields? additionalFields, String? id, String? projectId, + String? projectBeneficiaryClientReferenceId, String? taskClientReferenceId, int? reAttempts, List? symptoms, @@ -473,6 +481,7 @@ class _SideEffectModelCopyWithImpl<$R, $Out> {Object? additionalFields = $none, Object? id = $none, Object? projectId = $none, + Object? projectBeneficiaryClientReferenceId = $none, Object? taskClientReferenceId = $none, Object? reAttempts = $none, Object? symptoms = $none, @@ -487,6 +496,9 @@ class _SideEffectModelCopyWithImpl<$R, $Out> if (additionalFields != $none) #additionalFields: additionalFields, if (id != $none) #id: id, if (projectId != $none) #projectId: projectId, + if (projectBeneficiaryClientReferenceId != $none) + #projectBeneficiaryClientReferenceId: + projectBeneficiaryClientReferenceId, if (taskClientReferenceId != $none) #taskClientReferenceId: taskClientReferenceId, if (reAttempts != $none) #reAttempts: reAttempts, @@ -507,6 +519,9 @@ class _SideEffectModelCopyWithImpl<$R, $Out> data.get(#additionalFields, or: $value.additionalFields), id: data.get(#id, or: $value.id), projectId: data.get(#projectId, or: $value.projectId), + projectBeneficiaryClientReferenceId: data.get( + #projectBeneficiaryClientReferenceId, + or: $value.projectBeneficiaryClientReferenceId), taskClientReferenceId: data.get(#taskClientReferenceId, or: $value.taskClientReferenceId), reAttempts: data.get(#reAttempts, or: $value.reAttempts), @@ -616,10 +631,8 @@ mixin SideEffectAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - SideEffectAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as SideEffectAdditionalFields, other)); + return SideEffectAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as SideEffectAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/status.mapper.dart b/packages/registration_delivery/lib/models/entities/status.mapper.dart index 3f1896d6e..d14fb9e9b 100644 --- a/packages/registration_delivery/lib/models/entities/status.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/status.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'status.dart'; diff --git a/packages/registration_delivery/lib/models/entities/task.mapper.dart b/packages/registration_delivery/lib/models/entities/task.mapper.dart index b334f9db3..2200cf74b 100644 --- a/packages/registration_delivery/lib/models/entities/task.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/task.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'task.dart'; @@ -188,10 +188,8 @@ mixin TaskSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskSearchModelMapper.ensureInitialized() - .isValueEqual(this as TaskSearchModel, other)); + return TaskSearchModelMapper.ensureInitialized() + .equalsValue(this as TaskSearchModel, other); } @override @@ -543,10 +541,8 @@ mixin TaskModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskModelMapper.ensureInitialized() - .isValueEqual(this as TaskModel, other)); + return TaskModelMapper.ensureInitialized() + .equalsValue(this as TaskModel, other); } @override @@ -801,10 +797,8 @@ mixin TaskAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as TaskAdditionalFields, other)); + return TaskAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as TaskAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart b/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart index e8d69a39b..bad4526c4 100644 --- a/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart +++ b/packages/registration_delivery/lib/models/entities/task_resource.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'task_resource.dart'; @@ -102,10 +102,8 @@ mixin TaskResourceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskResourceSearchModelMapper.ensureInitialized() - .isValueEqual(this as TaskResourceSearchModel, other)); + return TaskResourceSearchModelMapper.ensureInitialized() + .equalsValue(this as TaskResourceSearchModel, other); } @override @@ -315,10 +313,8 @@ mixin TaskResourceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskResourceModelMapper.ensureInitialized() - .isValueEqual(this as TaskResourceModel, other)); + return TaskResourceModelMapper.ensureInitialized() + .equalsValue(this as TaskResourceModel, other); } @override @@ -540,10 +536,8 @@ mixin TaskResourceAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - TaskResourceAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as TaskResourceAdditionalFields, other)); + return TaskResourceAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as TaskResourceAdditionalFields, other); } @override diff --git a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart index 3b7b19ea6..97659817d 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_checklist.dart @@ -5,6 +5,7 @@ import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; @@ -103,16 +104,15 @@ class _BeneficiaryChecklistPageState }, ), ]), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), children: [ - Button( + DigitButton( label: localizations .translate(i18.common.coreCommonSubmit), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () async { // TODO: Submit checklist @@ -224,50 +224,53 @@ class _BeneficiaryChecklistPageState ), ); - showPopup( + showCustomPopup( context: context, - title: localizations.translate(i18 - .deliverIntervention - .beneficiaryChecklistDialogTitle), - type: PopUpType.simple, - actions: [ - Button( - label: localizations.translate( - i18.common.coreCommonYes, - ), - onPressed: () { - context.router.push( - DeliverInterventionRoute(), - ); - Navigator.of(context, - rootNavigator: true) - .pop(); - }, - type: ButtonType.primary, - size: ButtonSize.large), - Button( - label: localizations.translate( - i18.common.coreCommonNo, - ), - onPressed: () { - context.router.push( - RefusedDeliveryRoute(), - ); - Navigator.of( - context, - rootNavigator: true, - ).pop(); - }, - type: ButtonType.secondary, - size: ButtonSize.large) - ]); + builder: (popUpContext) => Popup( + title: localizations.translate(i18 + .deliverIntervention + .beneficiaryChecklistDialogTitle), + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonYes, + ), + onPressed: () { + context.router.push( + DeliverInterventionRoute(), + ); + Navigator.of(context, + rootNavigator: true) + .pop(); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.common.coreCommonNo, + ), + onPressed: () { + context.router.push( + RefusedDeliveryRoute(), + ); + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large) + ])); }, ), ]), children: [ Form( key: checklistFormKey, //assigning key to form - child: DigitCard(padding: EdgeInsets.zero, children: [ + child: DigitCard( + margin: const EdgeInsets.all(spacer2), + children: [ ...initialAttributes!.map(( e, ) { @@ -421,12 +424,12 @@ class _BeneficiaryChecklistPageState ), ] else if (e.dataType == 'Boolean') ...[ if (!(e.code ?? '').contains('.')) - DigitCard(children: [ BlocBuilder( builder: (context, state) { return Align( alignment: Alignment.topLeft, child: SelectionCard( + showParentContainer: true, title: localizations.translate( '${selectedServiceDefinition?.code}.${e.code}', ), @@ -484,13 +487,9 @@ class _BeneficiaryChecklistPageState ); }, ), - ]), ], ]); }), - const SizedBox( - height: 15, - ), ]), ), ], diff --git a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart index dc73803aa..6423490fc 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_details.dart @@ -4,6 +4,7 @@ import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:flutter/material.dart'; @@ -132,7 +133,7 @@ class BeneficiaryDetailsPageState return Scaffold( body: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), @@ -146,283 +147,290 @@ class BeneficiaryDetailsPageState return cycles != null && cycles.isNotEmpty ? deliverState.hasCycleArrived ? DigitCard( - margin: const EdgeInsets.only( - top: spacer2), + margin: + const EdgeInsets.only(top: spacer2), padding: const EdgeInsets.all(spacer2), - children: [Button( - label: '${localizations.translate(i18.beneficiaryDetails.recordCycle)} ' - '${(deliverState.cycle == 0 ? (deliverState.cycle + 1) - : deliverState.cycle).toString()} ${localizations.translate(i18.deliverIntervention.dose)} ' - '${(deliverState.dose).toString()}', - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () async { - final selectedCycle = - cycles.firstWhereOrNull((c) => - c.id == deliverState.cycle); - if (selectedCycle != null) { - bloc.add( - DeliverInterventionEvent - .selectFutureCycleDose( - dose: deliverState.dose, - cycle: - RegistrationDeliverySingleton() - .projectType! - .cycles! - .firstWhere((c) => - c.id == - deliverState - .cycle), - individualModel: - state.selectedIndividual, - ), - ); - showPopup( - context: context, - title: localizations.translate(i18.beneficiaryDetails.resourcesTobeDelivered), - type: PopUpType.simple, - additionalWidgets: [ - buildTableContent( - deliverState, - context, - variant, - state.selectedIndividual, - state.householdMemberWrapper.household + children: [ + DigitButton( + label: + '${localizations.translate(i18.beneficiaryDetails.recordCycle)} ' + '${(deliverState.cycle == 0 ? (deliverState.cycle + 1) : deliverState.cycle).toString()} ${localizations.translate(i18.deliverIntervention.dose)} ' + '${(deliverState.dose).toString()}', + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + final selectedCycle = cycles + .firstWhereOrNull((c) => + c.id == + deliverState.cycle); + if (selectedCycle != null) { + bloc.add( + DeliverInterventionEvent + .selectFutureCycleDose( + dose: deliverState.dose, + cycle: + RegistrationDeliverySingleton() + .projectType! + .cycles! + .firstWhere((c) => + c.id == + deliverState + .cycle), + individualModel: state + .selectedIndividual, ), - ], - actions: [ - Button( - label: localizations.translate(i18.beneficiaryDetails.ctaProceed), - onPressed: () { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - router.push( - DeliverInterventionRoute(), - ); - }, - type: ButtonType.primary, - size: ButtonSize.large - ), - ] - ); - } - }, - ),] - ) + ); + showCustomPopup( + context: context, + builder: (popUpContext) => Popup( + title: localizations + .translate(i18 + .beneficiaryDetails + .resourcesTobeDelivered), + type: PopUpType.simple, + additionalWidgets: [ + buildTableContent( + deliverState, + context, + variant, + state + .selectedIndividual, + state + .householdMemberWrapper + .household), + ], + actions: [ + DigitButton( + label: localizations + .translate(i18 + .beneficiaryDetails + .ctaProceed), + onPressed: () { + Navigator.of( + context, + rootNavigator: + true, + ).pop(); + router.push( + DeliverInterventionRoute(), + ); + }, + type: + DigitButtonType + .primary, + size: + DigitButtonSize + .large), + ]), + ); + } + }, + ), + ]) : const SizedBox.shrink() : DigitCard( - margin: - const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all( - spacer2), - children: [Button( - label: localizations.translate(i18.householdOverView - .householdOverViewActionText), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () { - context.router - .push(DeliverInterventionRoute()); - }, - ),] - ); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: localizations.translate(i18 + .householdOverView + .householdOverViewActionText), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + context.router.push( + DeliverInterventionRoute()); + }, + ), + ]); }, ), children: [ DigitCard( - margin: const EdgeInsets.only( - top: spacer2,bottom: spacer2 - ), - children: [ - Text( - localizations.translate(i18 - .beneficiaryDetails - .beneficiarysDetailsLabelText), - style: textTheme.headingXl, - ), - DigitTableCard( - element: { - localizations.translate( - RegistrationDeliverySingleton() - .beneficiaryType != - BeneficiaryType.individual - ? i18.householdOverView - .householdOverViewHouseholdHeadLabel - : i18.common.coreCommonName, - ): RegistrationDeliverySingleton() - .beneficiaryType != - BeneficiaryType.individual - ? householdMemberWrapper - .headOfHousehold?.name?.givenName - : state.selectedIndividual?.name - ?.givenName ?? - '--', - localizations.translate( - i18.deliverIntervention.idTypeText, - ): () { - final identifiers = + margin: const EdgeInsets.all(spacer2), + children: [ + Text( + localizations.translate(i18.beneficiaryDetails + .beneficiarysDetailsLabelText), + style: textTheme.headingXl, + ), + DigitTableCard( + element: { + localizations.translate( RegistrationDeliverySingleton() .beneficiaryType != BeneficiaryType.individual - ? householdMemberWrapper - .headOfHousehold?.identifiers - : state.selectedIndividual - ?.identifiers; - if (identifiers == null || - identifiers.isEmpty) { - return '--'; - } + ? i18.householdOverView + .householdOverViewHouseholdHeadLabel + : i18.common.coreCommonName, + ): RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? householdMemberWrapper + .headOfHousehold?.name?.givenName + : state.selectedIndividual?.name + ?.givenName ?? + '--', + localizations.translate( + i18.deliverIntervention.idTypeText, + ): () { + final identifiers = + RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? householdMemberWrapper + .headOfHousehold?.identifiers + : state.selectedIndividual + ?.identifiers; + if (identifiers == null || + identifiers.isEmpty) { + return '--'; + } - return localizations.translate( - identifiers.first.identifierType ?? - '--'); - }(), - localizations.translate( - i18.deliverIntervention.idNumberText, - ): () { - final identifiers = - RegistrationDeliverySingleton() - .beneficiaryType != - BeneficiaryType.individual - ? householdMemberWrapper - .headOfHousehold?.identifiers - : state.selectedIndividual - ?.identifiers; - if (identifiers == null || - identifiers.isEmpty) { - return '--'; - } + return localizations.translate( + identifiers.first.identifierType ?? + '--'); + }(), + localizations.translate( + i18.deliverIntervention.idNumberText, + ): () { + final identifiers = + RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? householdMemberWrapper + .headOfHousehold?.identifiers + : state.selectedIndividual + ?.identifiers; + if (identifiers == null || + identifiers.isEmpty) { + return '--'; + } - return maskString(identifiers + return maskString(identifiers .first.identifierId - .toString()) ?? - '--'; - }(), - localizations.translate( - i18.common.coreCommonAge, - ): () { - final dob = - RegistrationDeliverySingleton() - .beneficiaryType != - BeneficiaryType.individual - ? householdMemberWrapper - .headOfHousehold?.dateOfBirth - : state.selectedIndividual - ?.dateOfBirth; - if (dob == null || dob.isEmpty) { - return '--'; - } + .toString()); + }(), + localizations.translate( + i18.common.coreCommonAge, + ): () { + final dob = + RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? householdMemberWrapper + .headOfHousehold?.dateOfBirth + : state.selectedIndividual + ?.dateOfBirth; + if (dob == null || dob.isEmpty) { + return '--'; + } - final int years = - DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - dob, - ) ?? - DateTime.now(), - ).years; - final int months = - DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - dob, - ) ?? - DateTime.now(), - ).months; + final int years = + DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + dob, + ) ?? + DateTime.now(), + ).years; + final int months = + DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + dob, + ) ?? + DateTime.now(), + ).months; - return "$years ${localizations.translate(i18.memberCard.deliverDetailsYearText)} ${localizations.translate(months.toString().toUpperCase())} ${localizations.translate(i18.memberCard.deliverDetailsMonthsText)}"; - }(), - localizations.translate( - i18.common.coreCommonGender, - ): RegistrationDeliverySingleton() - .beneficiaryType != - BeneficiaryType.individual - ? householdMemberWrapper.headOfHousehold - ?.gender?.name.sentenceCase - : state.selectedIndividual?.gender?.name - .sentenceCase ?? - '--', - localizations.translate( - i18.common.coreCommonMobileNumber, - ): RegistrationDeliverySingleton() - .beneficiaryType != - BeneficiaryType.individual - ? householdMemberWrapper - .headOfHousehold?.mobileNumber - : state.selectedIndividual - ?.mobileNumber ?? - '--', - localizations.translate(i18 - .deliverIntervention - .dateOfRegistrationLabel): () { - final date = projectBeneficiary - ?.first?.dateOfRegistration; + return "$years ${localizations.translate(i18.memberCard.deliverDetailsYearText)} ${localizations.translate(months.toString().toUpperCase())} ${localizations.translate(i18.memberCard.deliverDetailsMonthsText)}"; + }(), + localizations.translate( + i18.common.coreCommonGender, + ): RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? householdMemberWrapper.headOfHousehold + ?.gender?.name.sentenceCase + : state.selectedIndividual?.gender?.name + .sentenceCase ?? + '--', + localizations.translate( + i18.common.coreCommonMobileNumber, + ): RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? householdMemberWrapper + .headOfHousehold?.mobileNumber + : state.selectedIndividual + ?.mobileNumber ?? + '--', + localizations.translate(i18 + .deliverIntervention + .dateOfRegistrationLabel): () { + final date = projectBeneficiary + ?.first?.dateOfRegistration; - final registrationDate = - DateTime.fromMillisecondsSinceEpoch( - date ?? - DateTime.now() - .millisecondsSinceEpoch, - ); + final registrationDate = + DateTime.fromMillisecondsSinceEpoch( + date ?? + DateTime.now() + .millisecondsSinceEpoch, + ); - return DateFormat('dd MMMM yyyy') - .format(registrationDate); - }(), - }, - ), - ] - ), + return DateFormat('dd MMMM yyyy') + .format(registrationDate); + }(), + }, + ), + ]), if ((RegistrationDeliverySingleton() .projectType ?.cycles ?? []) .isNotEmpty) DigitCard( - margin: const EdgeInsets.only( - top: spacer2,bottom: spacer2 - ), - children: [ - Column( - children: RegistrationDeliverySingleton() - .projectType - ?.cycles != - null - ? [ - BlocBuilder( - builder: (context, deliverState) { - return Column( - children: [ - (RegistrationDeliverySingleton() - .projectType - ?.cycles ?? - []) - .isNotEmpty - ? RecordDeliveryCycle( - projectCycles: - RegistrationDeliverySingleton() + margin: const EdgeInsets.all(spacer2), + children: [ + Column( + children: RegistrationDeliverySingleton() + .projectType + ?.cycles != + null + ? [ + BlocBuilder( + builder: (context, deliverState) { + return Column( + children: [ + (RegistrationDeliverySingleton() .projectType ?.cycles ?? - [], - taskData: - taskData ?? [], - individualModel: state - .selectedIndividual, - ) - : const Offstage(), - ], - ); - }, - ), - ] - : [], - ), - ] - ) + []) + .isNotEmpty + ? RecordDeliveryCycle( + projectCycles: + RegistrationDeliverySingleton() + .projectType + ?.cycles ?? + [], + taskData: + taskData ?? [], + individualModel: state + .selectedIndividual, + ) + : const Offstage(), + ], + ); + }, + ), + ] + : [], + ), + ]) ], ), ); diff --git a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart index 9b2c4b080..8a786d6a2 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/beneficiary_wrapper.dart @@ -57,9 +57,6 @@ class BeneficiaryWrapperPage extends StatelessWidget { final referral = context.repository(context); - final serviceDefinationRepo = context.repository(context); - return MultiBlocProvider( providers: [ BlocProvider( diff --git a/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart b/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart index 248024f29..24ea7100d 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/deliver_intervention.dart @@ -1,8 +1,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:digit_data_model/data_model.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/component_utils.dart'; import 'package:digit_ui_components/widgets/atoms/digit_stepper.dart'; @@ -247,15 +247,13 @@ class DeliverInterventionPageState ), builder: (context, form, child) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, footer: BlocBuilder( builder: (context, state) { return DigitCard( margin: const EdgeInsets.only( top: spacer2), - padding: - const EdgeInsets.all(spacer2), children: [ ValueListenableBuilder( valueListenable: clickedStatus, @@ -266,14 +264,16 @@ class DeliverInterventionPageState LocationState>( builder: (context, locationState) { - return Button( + return DigitButton( label: localizations .translate( i18.common .coreCommonSubmit, ), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType + .primary, + size: + DigitButtonSize.large, mainAxisSize: MainAxisSize.max, isDisabled: isClicked, @@ -476,14 +476,16 @@ class DeliverInterventionPageState }, )), Center( - child: Button( + child: DigitButton( label: localizations.translate( i18.deliverIntervention .resourceAddBeneficiary, ), - type: ButtonType.tertiary, - size: ButtonSize.medium, + type: DigitButtonType + .tertiary, + size: + DigitButtonSize.medium, isDisabled: ((form.control(_resourceDeliveredKey) as FormArray) .value ?? @@ -786,8 +788,8 @@ class DeliverInterventionPageState ?.cycles![bloc.cycle - 1] .deliveries?[bloc.dose - 1], overViewbloc.selectedIndividual, - overViewbloc.householdMemberWrapper.household)! - .productVariants + overViewbloc.householdMemberWrapper.household) + ?.productVariants ?.length ?? 0; diff --git a/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart b/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart index d876dae36..00102ed38 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/delivery_summary_page.dart @@ -4,6 +4,7 @@ import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:recase/recase.dart'; @@ -13,13 +14,13 @@ import 'package:registration_delivery/models/entities/additional_fields_type.dar import 'package:registration_delivery/models/entities/status.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; import 'package:registration_delivery/utils/constants.dart'; -import 'package:registration_delivery/utils/utils.dart'; import 'package:registration_delivery/widgets/back_navigation_help_header.dart'; import 'package:registration_delivery/widgets/component_wrapper/product_variant_bloc_wrapper.dart'; import 'package:registration_delivery/widgets/showcase/showcase_button.dart'; import '../../../widgets/localized.dart'; import '../../utils/i18_key_constants.dart' as i18; +import '../../utils/utils.dart'; @RoutePage() class DeliverySummaryPage extends LocalizedStatefulWidget { @@ -44,351 +45,374 @@ class DeliverySummaryPageState extends LocalizedState { return ProductVariantBlocWrapper( child: Scaffold( body: BlocConsumer( - listener: (context, deliverState) { - final router = context.router; - }, - builder: (context, deliverState) { - return ScrollableContent( - enableFixedButton: true, - header: Column(children: [ - const BackNavigationHelpHeaderWidget( - showHelp: false, - showcaseButton: ShowcaseButton(), - ), - Padding( - padding: - const EdgeInsets.all(spacer2), - child: Align( - alignment: Alignment.centerLeft, - child: Text( - localizations.translate( - i18.common.coreCommonSummaryDetails, - ), - style: DigitTheme - .instance.mobileTheme.textTheme.displayMedium, - ), + listener: (context, deliverState) { + final router = context.router; + }, + builder: (context, deliverState) { + return ScrollableContent( + enableFixedDigitButton: true, + header: Column(children: [ + const BackNavigationHelpHeaderWidget( + showHelp: false, + showcaseButton: ShowcaseButton(), + ), + Padding( + padding: const EdgeInsets.all(spacer2), + child: Align( + alignment: Alignment.centerLeft, + child: Text( + localizations.translate( + i18.common.coreCommonSummaryDetails, ), + style: DigitTheme + .instance.mobileTheme.textTheme.displayMedium, ), - ]), - footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), - children: [ - ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return Button( - label: localizations.translate(i18.common.coreCommonNext), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - isDisabled: isClicked?true:false, - onPressed: () async { - final submit = await showDialog( - context: context, - builder: (ctx)=> Popup( - title: localizations.translate( - i18.deliverIntervention.dialogTitle), - description: localizations.translate( - i18.deliverIntervention.dialogContent), - actions: [ - Button( - label: localizations - .translate(i18.common.coreCommonSubmit), - onPressed: () { - clickedStatus.value = true; - Navigator.of(context, rootNavigator: true) - .pop(true); - }, - type: ButtonType.primary, - size: ButtonSize.large - ), - Button( - label: localizations - .translate(i18.common.coreCommonCancel), - onPressed:() => Navigator.of(context, + ), + ), + ]), + footer: DigitCard( + margin: const EdgeInsets.only(top: spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: localizations + .translate(i18.common.coreCommonNext), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: isClicked ? true : false, + onPressed: () async { + final submit = await showDialog( + context: context, + builder: (ctx) => Popup( + title: localizations.translate( + i18.deliverIntervention.dialogTitle), + description: localizations.translate( + i18.deliverIntervention.dialogContent), + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonSubmit), + onPressed: () { + clickedStatus.value = true; + Navigator.of(context, + rootNavigator: true) + .pop(true); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.common.coreCommonCancel), + onPressed: () => Navigator.of(context, rootNavigator: true) - .pop(false), - type: ButtonType.secondary, - size: ButtonSize.large - ), - ], - ), - ); - if (submit ?? false) { - if (context.mounted) { - context.read().add( + .pop(false), + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ], + ), + ); + if (submit ?? false) { + if (context.mounted) { + context.read().add( DeliverInterventionSubmitEvent( task: deliverState.oldTask!, isEditing: (deliverState.tasks ?? []) - .isNotEmpty && - RegistrationDeliverySingleton() - .beneficiaryType == - BeneficiaryType.household + .isNotEmpty && + RegistrationDeliverySingleton() + .beneficiaryType == + BeneficiaryType.household ? true : false, boundaryModel: - RegistrationDeliverySingleton() - .boundary!, + RegistrationDeliverySingleton() + .boundary!, ), ); - if (deliverState.futureDeliveries != null && - deliverState - .futureDeliveries!.isNotEmpty && - RegistrationDeliverySingleton() + if (deliverState.futureDeliveries != null && + deliverState.futureDeliveries!.isNotEmpty && + RegistrationDeliverySingleton() .projectType ?.cycles ?.isNotEmpty == - true) { - context.router.popUntilRouteWithName( - BeneficiaryWrapperRoute.name, - ); - context.router.push( - SplashAcknowledgementRoute( - enableBackToSearch: false, - ), - ); - } else { - final reloadState = + true) { + context.router.popUntilRouteWithName( + BeneficiaryWrapperRoute.name, + ); + context.router.push( + SplashAcknowledgementRoute( + enableBackToSearch: false, + ), + ); + } else { + final reloadState = context.read(); - reloadState.add( - HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: + reloadState.add( + HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: RegistrationDeliverySingleton() .beneficiaryType!, - ), - ); - context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - ); - } - } + ), + ); + context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + ); } - }, - ); + } + } }, - ), - ] - ), - slivers: [ - SliverToBoxAdapter( - child: Column( - children: [ - DigitCard( - margin: const EdgeInsets.all(spacer2), - children: [ - LabelValueList( - heading: localizations.translate(i18 - .householdLocation.householdLocationLabelText), - withDivider: true, - labelFlex: 6, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdLocation.villageLabel), - value: deliverState.householdMemberWrapper - ?.household?.address?.locality?.code - .split('_') - .last - .titleCase ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdLocation.landmarkFormLabel), - value: deliverState.householdMemberWrapper - ?.household?.address?.landmark ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - ]), - ] - ), - DigitCard( - margin: const EdgeInsets.all(spacer2), - children: [ - LabelValueList( - heading: localizations.translate( - i18.householdDetails.householdDetailsLabel), - withDivider: true, - labelFlex: 6, - items: [ - LabelValuePair( - label: localizations.translate( - i18.beneficiaryDetails.totalMembers), - value: deliverState.householdMemberWrapper - ?.household?.memberCount - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfPregnantWomenCountLabel), - value: deliverState.householdMemberWrapper - ?.household?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.pregnantWomen - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfChildrenBelow5YearsLabel), - value: deliverState.householdMemberWrapper - ?.household?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.children - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - ]), - ] - ), - DigitCard( - margin: const EdgeInsets.all(spacer2), - children: [ - LabelValueList( - heading: localizations.translate( - i18.householdDetails.houseDetailsLabel), - withDivider: true, - labelFlex: 6, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdDetails.noOfRoomsLabel), - value: deliverState.householdMemberWrapper - ?.household?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.noOfRooms - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdDetails.typeOfStructure), - value: (deliverState - .householdMemberWrapper - ?.household - ?.additionalFields - ?.fields - .where((h) => - h.key == - AdditionalFieldsType - .houseStructureTypes - .toValue()) - .firstOrNull - ?.value ?? - []) - .toString() - .split('|') - .map((item) => getLocalizedMessage(item)) - .toList() - .join(', '), - isInline: true), - ]), - ] - ), - BlocBuilder( - builder: (context, productState) { - final variants = productState.whenOrNull( - fetched: (productVariants) { - final resourcesDelivered = deliverState - .oldTask?.resources - ?.map((e) => TaskResourceInfo( - productVariants + ); + }, + ), + ]), + slivers: [ + SliverToBoxAdapter( + child: Column( + children: [ + DigitCard( + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .householdLocation + .householdLocationLabelText), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdLocation.villageLabel), + value: localizations.translate(deliverState + .householdMemberWrapper + ?.household + ?.address + ?.locality + ?.code + .split('_') + .last + .titleCase ?? + i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdLocation.landmarkFormLabel), + value: deliverState.householdMemberWrapper + ?.household?.address?.landmark ?? + localizations + .translate(i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + ]), + ]), + DigitCard( + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.householdDetailsLabel), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate( + i18.beneficiaryDetails.totalMembers), + value: deliverState.householdMemberWrapper + ?.household?.memberCount + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfPregnantWomenCountLabel), + value: deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType + .pregnantWomen + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfChildrenBelow5YearsLabel), + value: deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType.children + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + ]), + ]), + DigitCard( + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.houseDetailsLabel), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdDetails.noOfRoomsLabel), + value: deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType.noOfRooms + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.householdDetails.typeOfStructure), + value: (deliverState + .householdMemberWrapper + ?.household + ?.additionalFields + ?.fields + .where((h) => + h.key == + AdditionalFieldsType + .houseStructureTypes + .toValue()) + .firstOrNull + ?.value ?? + []) + .toString() + .split('|') + .map( + (item) => getLocalizedMessage(item)) + .toList() + .join(', '), + isInline: true, + labelFlex: 5, + ), + ]), + ]), + BlocBuilder( + builder: (context, productState) { + final variants = productState.whenOrNull( + fetched: (productVariants) { + final resourcesDelivered = deliverState + .oldTask?.resources + ?.map((e) => TaskResourceInfo( + productVariants .where((p) => - p.id == e.productVariantId) + p.id == e.productVariantId) .firstOrNull ?.sku ?? - productVariants - .where((p) => - p.id == e.productVariantId) - .firstOrNull - ?.variation ?? - i18.common.coreCommonNA, - e.quantity ?? '0')) - .toList(); - return resourcesDelivered; - }, - ); - return DigitCard( - margin: const EdgeInsets.all(spacer2), - children: [ - LabelValueList( - heading: localizations.translate( - '${RegistrationDeliverySingleton().selectedProject?.projectType?.toUpperCase()}_${i18.deliverIntervention.deliveryDetailsLabel}_${deliverState.oldTask?.status}'), - withDivider: true, - labelFlex: 6, - items: [ - LabelValuePair( - label: localizations.translate(deliverState - .oldTask?.status == + productVariants + .where((p) => + p.id == e.productVariantId) + .firstOrNull + ?.variation ?? + i18.common.coreCommonNA, + e.quantity ?? '0')) + .toList(); + return resourcesDelivered; + }, + ); + return DigitCard( + margin: const EdgeInsets.all(spacer2), + children: [ + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + '${RegistrationDeliverySingleton().selectedProject?.projectType?.toUpperCase()}_${i18.deliverIntervention.deliveryDetailsLabel}_${deliverState.oldTask?.status}'), + withDivider: true, + items: [ + LabelValueItem( + label: localizations.translate(deliverState + .oldTask?.status == Status.administeredFailed .toValue() || - deliverState.oldTask?.status == - Status.beneficiaryRefused - .toValue() - ? i18.deliverIntervention - .reasonForRefusalLabel - : '${RegistrationDeliverySingleton().selectedProject?.projectType?.toUpperCase()}_${i18.deliverIntervention.typeOfResourceUsed}'), - value: deliverState.oldTask?.status == + deliverState.oldTask?.status == + Status.beneficiaryRefused + .toValue() + ? i18.deliverIntervention + .reasonForRefusalLabel + : '${RegistrationDeliverySingleton().selectedProject?.projectType?.toUpperCase()}_${i18.deliverIntervention.typeOfResourceUsed}'), + value: deliverState.oldTask?.status == Status.administeredFailed .toValue() || - deliverState.oldTask?.status == - Status.beneficiaryRefused - .toValue() - ? getLocalizedMessage(deliverState - .oldTask?.additionalFields?.fields + deliverState.oldTask?.status == + Status.beneficiaryRefused + .toValue() + ? getLocalizedMessage(deliverState + .oldTask + ?.additionalFields + ?.fields .where( (d) => - d.key == - AdditionalFieldsType - .reasonOfRefusal - .toValue(), - ) + d.key == + AdditionalFieldsType + .reasonOfRefusal + .toValue(), + ) .firstOrNull ?.value ?? - i18.common.coreCommonNA) - : variants + i18.common.coreCommonNA) + : variants ?.map((e) => - '${getLocalizedMessage(e.productName)} : ${e.quantityDelivered}') + '${getLocalizedMessage(e.productName)} : ${e.quantityDelivered}') .toList() .join('\n') ?? - localizations.translate( - i18.common.coreCommonNA), - ), - ]), - ] - ); - }), - ], - ), - ) - ]); - }, - )), + localizations.translate( + i18.common.coreCommonNA), + labelFlex: 5, + ), + ]), + ]); + }), + ], + ), + ) + ]); + }, + )), ); } } diff --git a/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart b/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart index 82b0af10e..c48207880 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/dose_administered.dart @@ -1,7 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/data_model.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/table_cell.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_table.dart'; @@ -55,19 +57,19 @@ class DoseAdministeredPageState extends LocalizedState { final theme = Theme.of(context); final localizations = RegistrationDeliveryLocalization.of(context); final overViewBloc = context.read().state; + final textTheme = theme.digitTextTheme(context); // Define a list of TableHeader objects for the header of a table final headerListResource = [ DigitTableColumn( header: localizations.translate(i18.beneficiaryDetails.beneficiaryDose), cellValue: 'dose', - width: MediaQuery.of(context).size.width / - 2.18, + width: MediaQuery.of(context).size.width / 2.18, ), DigitTableColumn( - header: localizations.translate(i18.beneficiaryDetails.beneficiaryResources), + header: localizations + .translate(i18.beneficiaryDetails.beneficiaryResources), cellValue: 'resources', - width: MediaQuery.of(context).size.width / - 2.18, + width: MediaQuery.of(context).size.width / 2.18, ), ]; @@ -80,7 +82,7 @@ class DoseAdministeredPageState extends LocalizedState { return ReactiveFormBuilder( form: () => buildForm(context), builder: (context, form, child) => ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget( showBackNavigation: false, @@ -88,258 +90,259 @@ class DoseAdministeredPageState extends LocalizedState { ), ]), footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: - const EdgeInsets.all(spacer2), - children: [ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return Button( - label: localizations - .translate(i18.common.coreCommonNext), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - isDisabled: isClicked, - onPressed: () { - if (form - .control(_doseAdministeredKey) - .value == - null) { - clickedStatus.value = false; - form - .control(_doseAdministeredKey) - .setErrors({'': true}); - } - form.markAllAsTouched(); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: localizations + .translate(i18.common.coreCommonNext), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: isClicked, + onPressed: () { + if (form.control(_doseAdministeredKey).value == + null) { + clickedStatus.value = false; + form + .control(_doseAdministeredKey) + .setErrors({'': true}); + } + form.markAllAsTouched(); - if (!form.valid) { - return; - } else { - final doseAdministered = form - .control(_doseAdministeredKey) - .value as bool; - final lat = locationState.latitude; - final long = locationState.longitude; - clickedStatus.value = true; - final bloc = context - .read() - .state; - final event = - context.read(); + if (!form.valid) { + return; + } else { + final doseAdministered = form + .control(_doseAdministeredKey) + .value as bool; + final lat = locationState.latitude; + final long = locationState.longitude; + clickedStatus.value = true; + final bloc = context + .read() + .state; + final event = + context.read(); - if (doseAdministered == true && - context.mounted) { - // Iterate through future deliveries + if (doseAdministered == true && + 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( - task: TaskModel( - projectId: - RegistrationDeliverySingleton() - .projectId, - address: address?.copyWith( - relatedClientReferenceId: - clientReferenceId, - id: null, - ), - status: Status.delivered.toValue(), - clientReferenceId: + 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( + task: TaskModel( + projectId: + RegistrationDeliverySingleton() + .projectId, + address: address?.copyWith( + relatedClientReferenceId: clientReferenceId, - projectBeneficiaryClientReferenceId: - bloc.oldTask - ?.projectBeneficiaryClientReferenceId, - tenantId: + id: null, + ), + status: Status.delivered.toValue(), + clientReferenceId: clientReferenceId, + projectBeneficiaryClientReferenceId: bloc + .oldTask + ?.projectBeneficiaryClientReferenceId, + tenantId: + RegistrationDeliverySingleton() + .tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() - .tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - resources: fetchProductVariant( - e, - overViewBloc - .selectedIndividual, - overViewBloc - .householdMemberWrapper - .household) - ?.productVariants - ?.map((variant) => - TaskResourceModel( - clientReferenceId: - IdGen.i.identifier, - tenantId: + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + ), + resources: fetchProductVariant( + e, + overViewBloc + .selectedIndividual, + overViewBloc + .householdMemberWrapper + .household) + ?.productVariants + ?.map((variant) => + TaskResourceModel( + clientReferenceId: + IdGen.i.identifier, + tenantId: + RegistrationDeliverySingleton() + .tenantId, + taskclientReferenceId: + clientReferenceId, + quantity: variant.quantity + .toString(), + productVariantId: variant + .productVariantId, + isDelivered: true, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() - .tenantId, - taskclientReferenceId: - clientReferenceId, - quantity: variant.quantity - .toString(), - productVariantId: variant - .productVariantId, - isDelivered: true, - auditDetails: - AuditDetails( - createdBy: - RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context - .millisecondsSinceEpoch(), - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - RegistrationDeliverySingleton() - .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}", - ), + .loggedInUserUuid!, + createdTime: context + .millisecondsSinceEpoch(), + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .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, + ), + if (lat != null) AdditionalField( - AdditionalFieldsType.doseIndex + AdditionalFieldsType.latitude .toValue(), - "0$doseIndex", + lat, ), + if (long != null) AdditionalField( - AdditionalFieldsType - .deliveryStrategy + AdditionalFieldsType.longitude .toValue(), - e.deliveryStrategy, + long, ), - if (lat != null) - AdditionalField( - AdditionalFieldsType - .latitude - .toValue(), - lat, - ), - if (long != null) - AdditionalField( - AdditionalFieldsType - .longitude - .toValue(), - long, - ), - ], - ), + ], ), - isEditing: false, - boundaryModel: - RegistrationDeliverySingleton() - .boundary!, - )); - } + ), + isEditing: false, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + )); } + } - final reloadState = - context.read(); + final reloadState = + context.read(); - Future.delayed( - const Duration(milliseconds: 1000), - () { - reloadState - .add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - }, - ).then((value) => context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - }, - ); - }, - ),] - ), - children: [ - DigitCard( - margin: const EdgeInsets.only( - top: spacer2, bottom: spacer2), - children: [Text( - localizations.translate( - i18.deliverIntervention.wasTheDoseAdministered, - ), - style: theme.textTheme.displayMedium, - ), - ReactiveWrapperField( - formControlName: _doseAdministeredKey, - builder: (field)=> RadioList( - radioButtons: Constants.yesNo - .map((e) => RadioButtonModel( - code: e.key.toString(), - name: localizations.translate(e.label), - )).toList(), - errorMessage: form.control(_doseAdministeredKey).hasErrors? - localizations.translate( - i18.common.corecommonRequired, - ):null, - groupValue: form.control(_doseAdministeredKey).value.toString()??'', - onChanged: (val) { - form.control(_doseAdministeredKey).value=val.code=='true'?true:false; + Future.delayed( + const Duration(milliseconds: 1000), + () { + reloadState + .add(HouseholdOverviewReloadEvent( + projectId: + RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + }, + ).then((value) => context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } + }, + ); }, ), - ),] - ), + ]), + children: [ + DigitCard( + margin: const EdgeInsets.only( + top: spacer2, bottom: spacer2), + children: [ + Text( + localizations.translate( + i18.deliverIntervention.wasTheDoseAdministered, + ), + style: textTheme.headingXl, + ), + ReactiveWrapperField( + formControlName: _doseAdministeredKey, + builder: (field) => RadioList( + radioDigitButtons: Constants.yesNo + .map((e) => RadioButtonModel( + code: e.key.toString(), + name: localizations.translate(e.label), + )) + .toList(), + errorMessage: + form.control(_doseAdministeredKey).hasErrors + ? localizations.translate( + i18.common.corecommonRequired, + ) + : null, + groupValue: form + .control(_doseAdministeredKey) + .value + .toString() ?? + '', + onChanged: (val) { + form.control(_doseAdministeredKey).value = + val.code == 'true' ? true : false; + }, + ), + ), + ]), BlocBuilder( builder: (context, productState) { return productState.maybeWhen( @@ -352,97 +355,102 @@ class DoseAdministeredPageState extends LocalizedState { ); return DigitCard( - margin: const EdgeInsets.only( - top: spacer2, bottom: spacer2), - children: [BlocBuilder( - builder: (context, deliveryState) { - List tableDataRows = - deliveryState.futureDeliveries!.map((e) { - int doseIndex = deliveryState - .futureDeliveries! - .indexOf(e) + - deliveryState.dose + - 1; - List skus = fetchProductVariant( - e, - overViewBloc.selectedIndividual, - overViewBloc.householdMemberWrapper - .household)! - .productVariants! - .map((ele) { - final pv = variant!.firstWhere( - (element) => - element.id == ele.productVariantId, - ); + margin: const EdgeInsets.only( + top: spacer2, bottom: spacer2), + children: [ + BlocBuilder( + builder: (context, deliveryState) { + List tableDataRows = + deliveryState.futureDeliveries! + .map((e) { + int doseIndex = deliveryState + .futureDeliveries! + .indexOf(e) + + deliveryState.dose + + 1; + List skus = fetchProductVariant( + e, + overViewBloc.selectedIndividual, + overViewBloc + .householdMemberWrapper + .household)! + .productVariants! + .map((ele) { + final pv = variant!.firstWhere( + (element) => + element.id == + ele.productVariantId, + ); - return '${ele.quantity} - ${pv.sku.toString()}'; - }).toList(); + return '${ele.quantity} - ${pv.sku.toString()}'; + }).toList(); - return DigitTableRow(tableRow: [ - DigitTableData( - 'Dose $doseIndex', - cellKey: 'dose', - ), - DigitTableData( - skus.join(' + '), - cellKey: 'resources', - ), - ]); - }).toList(); - - return Column( - children: [ - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.only( - bottom: spacer2 * 2, + return DigitTableRow(tableRow: [ + DigitTableData( + 'Dose $doseIndex', + cellKey: 'dose', + ), + DigitTableData( + skus.join(' + '), + cellKey: 'resources', ), - child: Text( - localizations.translate( - i18.beneficiaryDetails - .resourcesTobeProvided, + ]); + }).toList(); + + return Column( + children: [ + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.only( + bottom: spacer2 * 2, + ), + child: Text( + localizations.translate( + i18.beneficiaryDetails + .resourcesTobeProvided, + ), + style: textTheme.headingXl, + ), ), - style: - theme.textTheme.displayMedium, ), - ), - ), - DigitTableCard( - element: { - localizations.translate( - i18.beneficiaryDetails - .beneficiaryAge, - ): localizations.translate( - fetchProductVariant( - deliveryState - .futureDeliveries - ?.first, - overViewBloc - .selectedIndividual, - overViewBloc - .householdMemberWrapper - .household)! - .condition!), - }, - ), - const Divider( - thickness: 2.0, - ), - DigitTable( - enableBorder: true, - showPagination: false, - columns: headerListResource, - rows: tableDataRows, - tableHeight: - (tableDataRows.length + 1) * 57.5, - ), - ], - ); - }, - ),] - ); + DigitTableCard( + element: { + localizations.translate( + i18.beneficiaryDetails + .beneficiaryAge, + ): localizations.translate( + fetchProductVariant( + deliveryState + .futureDeliveries + ?.first, + overViewBloc + .selectedIndividual, + overViewBloc + .householdMemberWrapper + .household)! + .condition!), + }, + ), + const Divider( + thickness: 2.0, + ), + DigitTable( + enableBorder: true, + showPagination: false, + showSelectedState: false, + columns: headerListResource, + rows: tableDataRows, + tableHeight: + (tableDataRows.length + 1) * + 57.5, + ), + ], + ); + }, + ), + ]); }, ); }, diff --git a/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart b/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart index 90840c919..62d80a1f6 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/facility_selection.dart @@ -49,7 +49,6 @@ class FacilitySelectionPage extends StatelessWidget { .toLowerCase(); final lowerCaseQuery = query.toLowerCase(); return localizedFacilityIdWithPrefix.contains(lowerCaseQuery); - return false; }).toList(); return ScrollableContent( diff --git a/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart b/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart index 755e1ca86..a6ea0f158 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/household_overview.dart @@ -8,12 +8,13 @@ import 'package:digit_ui_components/theme/spacers.dart'; import 'package:digit_ui_components/utils/date_utils.dart'; import 'package:digit_ui_components/widgets/atoms/digit_action_card.dart'; import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; +import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; import 'package:digit_ui_components/widgets/scrollable_content.dart'; import 'package:flutter/material.dart'; -import 'package:survey_form/survey_form.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:survey_form/survey_form.dart'; import '../../blocs/beneficiary_registration/beneficiary_registration.dart'; import '../../blocs/delivery_intervention/deliver_intervention.dart'; @@ -74,94 +75,49 @@ class _HouseholdOverviewPageState body: state.loading ? const Center(child: CircularProgressIndicator()) : ScrollableContent( - header: BackNavigationHelpHeaderWidget( - handleBack: (){ - context.read().add(const SearchHouseholdsEvent.clear()); + header: BackNavigationHelpHeaderWidget( + handleBack: () { + context + .read() + .add(const SearchHouseholdsEvent.clear()); }, ), - enableFixedButton: true, + enableFixedDigitButton: true, footer: Offstage( - offstage: beneficiaryType == BeneficiaryType.individual || isOutsideProjectDateRange(), + offstage: beneficiaryType == BeneficiaryType.individual || + isOutsideProjectDateRange(), child: BlocBuilder( builder: (context, serviceDefinitionState) => BlocBuilder( builder: (ctx, deliverInterventionState) => DigitCard( - margin: - const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), - children: [state.householdMemberWrapper.tasks?.lastOrNull?.status == - Status.administeredSuccess.toValue() - ? Padding( - padding: const EdgeInsets.symmetric( - vertical: spacer2), - child: Button( - label: localizations.translate( - i18.memberCard - .deliverDetailsUpdateLabel, - ), - isDisabled: state.householdMemberWrapper.tasks?.lastOrNull?.status == Status.administeredSuccess.toValue() - ? true : false, - type: ButtonType.secondary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () { - serviceDefinitionState.when( - empty: () {}, - isloading: () {}, - serviceDefinitionFetch: - (value, model) { - if (value - .where((element) => element - .code - .toString() - .contains( - '${RegistrationDeliverySingleton().selectedProject?.name}.${RegistrationDeliveryEnums.iec.toValue()}')) - .toList() - .isEmpty) { - context.router.push( - DeliverInterventionRoute(), - ); - } else { - navigateToChecklist(ctx); - } - }); - }, - ), - ) - : Button( - label: localizations.translate( - i18.householdOverView - .householdOverViewActionText, - ), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - isDisabled: (state.householdMemberWrapper - .projectBeneficiaries ?? - []) - .isEmpty || - state.householdMemberWrapper.tasks - ?.lastOrNull?.status == - Status.closeHousehold.toValue() - ? true : false, - onPressed: () async { - final bloc = ctx - .read(); - - final projectId = - RegistrationDeliverySingleton() - .projectId!; - - bloc.add( - HouseholdOverviewReloadEvent( - projectId: projectId, - projectBeneficiaryType: - beneficiaryType, - ), - ); - + margin: const EdgeInsets.only(top: spacer2), + children: [ + state.householdMemberWrapper.tasks?.lastOrNull + ?.status == + Status.administeredSuccess.toValue() + ? Padding( + padding: const EdgeInsets.symmetric( + vertical: spacer2), + child: DigitButton( + label: localizations.translate( + '${RegistrationDeliverySingleton().selectedProject!.projectType}_${i18.memberCard.deliverDetailsUpdateLabel}', + ), + capitalizeLetters: false, + isDisabled: state + .householdMemberWrapper + .tasks + ?.lastOrNull + ?.status == + Status.administeredSuccess + .toValue() + ? true + : false, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { serviceDefinitionState.when( empty: () {}, isloading: () {}, @@ -183,543 +139,644 @@ class _HouseholdOverviewPageState } }); }, - ),] - ), + ), + ) + : DigitButton( + label: localizations.translate( + '${RegistrationDeliverySingleton().selectedProject!.projectType}_${i18.householdOverView.householdOverViewActionText}', + ), + capitalizeLetters: false, + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: (state.householdMemberWrapper + .projectBeneficiaries ?? + []) + .isEmpty || + state + .householdMemberWrapper + .tasks + ?.lastOrNull + ?.status == + Status.closeHousehold + .toValue() + ? true + : false, + onPressed: () async { + final bloc = + ctx.read(); + + final projectId = + RegistrationDeliverySingleton() + .projectId!; + + bloc.add( + HouseholdOverviewReloadEvent( + projectId: projectId, + projectBeneficiaryType: + beneficiaryType, + ), + ); + + serviceDefinitionState.when( + empty: () {}, + isloading: () {}, + serviceDefinitionFetch: + (value, model) { + if (value + .where((element) => element + .code + .toString() + .contains( + '${RegistrationDeliverySingleton().selectedProject?.name}.${RegistrationDeliveryEnums.iec.toValue()}')) + .toList() + .isEmpty) { + context.router.push( + DeliverInterventionRoute(), + ); + } else { + navigateToChecklist(ctx); + } + }); + }, + ), + ]), ), ), ), slivers: [ SliverToBoxAdapter( child: DigitCard( - children: [Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.max, + margin: const EdgeInsets.all(spacer2), children: [ - if ((state.householdMemberWrapper - .projectBeneficiaries ?? - []) - .isNotEmpty) - Align( - alignment: Alignment.centerLeft, - child: Button( - onPressed: () { - final projectId = - RegistrationDeliverySingleton() - .projectId!; - - final bloc = - context.read(); - bloc.add( - HouseholdOverviewReloadEvent( - projectId: projectId, - projectBeneficiaryType: - beneficiaryType, - ), - ); - showDialog( - context: context, - builder: (ctx)=> ActionCard( - actions: [ - Button( - prefixIcon: Icons.edit, - label: localizations.translate( - i18.householdOverView - .householdOverViewEditLabel, - ), - type: ButtonType.secondary, - size: ButtonSize.large, - onPressed: () async { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - - HouseholdMemberWrapper wrapper = - state - .householdMemberWrapper; - - final timestamp = wrapper - .headOfHousehold - ?.clientAuditDetails - ?.createdTime; - final date = DateTime - .fromMillisecondsSinceEpoch( - timestamp ?? - DateTime.now() - .millisecondsSinceEpoch, - ); + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + if ((state.householdMemberWrapper + .projectBeneficiaries ?? + []) + .isNotEmpty) + Align( + alignment: Alignment.centerLeft, + child: DigitButton( + onPressed: () { + final projectId = + RegistrationDeliverySingleton() + .projectId!; + + final bloc = context + .read(); + bloc.add( + HouseholdOverviewReloadEvent( + projectId: projectId, + projectBeneficiaryType: + beneficiaryType, + ), + ); + showDialog( + context: context, + builder: (ctx) => DigitActionCard( + actions: [ + DigitButton( + prefixIcon: Icons.edit, + label: + localizations.translate( + i18.householdOverView + .householdOverViewEditLabel, + ), + type: + DigitButtonType.secondary, + size: DigitButtonSize.large, + onPressed: () async { + Navigator.of( + context, + rootNavigator: true, + ).pop(); - final address = - wrapper.household?.address; + HouseholdMemberWrapper + wrapper = state + .householdMemberWrapper; + + final timestamp = wrapper + .headOfHousehold + ?.clientAuditDetails + ?.createdTime; + final date = DateTime + .fromMillisecondsSinceEpoch( + timestamp ?? + DateTime.now() + .millisecondsSinceEpoch, + ); - if (address == null) return; + final address = wrapper + .household?.address; - final projectBeneficiary = state - .householdMemberWrapper - .projectBeneficiaries - ?.firstWhereOrNull( - (element) => - element - .beneficiaryClientReferenceId == - wrapper.household - ?.clientReferenceId, - ); + if (address == null) return; + + final projectBeneficiary = state + .householdMemberWrapper + .projectBeneficiaries + ?.firstWhereOrNull( + (element) => + element + .beneficiaryClientReferenceId == + wrapper.household + ?.clientReferenceId, + ); - await context.router.root.push( - BeneficiaryRegistrationWrapperRoute( - initialState: - BeneficiaryRegistrationEditHouseholdState( - addressModel: address, - individualModel: state + await context.router.root + .push( + BeneficiaryRegistrationWrapperRoute( + initialState: + BeneficiaryRegistrationEditHouseholdState( + addressModel: address, + individualModel: state + .householdMemberWrapper + .members ?? + [], + householdModel: state .householdMemberWrapper - .members ?? - [], - householdModel: state - .householdMemberWrapper - .household!, - registrationDate: date, - projectBeneficiaryModel: - projectBeneficiary, - ), - children: [ - HouseholdLocationRoute(), - ], - ), - ); - }, + .household!, + registrationDate: + date, + projectBeneficiaryModel: + projectBeneficiary, + ), + children: [ + HouseholdLocationRoute(), + ], + ), + ); + }, + ), + ], ), - ], + ); + }, + label: localizations.translate( + i18.householdOverView + .householdOverViewEditIconText, ), - ); - }, - label: localizations.translate( - i18.householdOverView - .householdOverViewEditIconText, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + prefixIcon: Icons.edit, + ), + ), + // BlocBuilder( + // builder: (ctx, deliverInterventionState) => + // Offstage( + // offstage: beneficiaryType == + // BeneficiaryType.individual, + // child: Align( + // alignment: Alignment.centerLeft, + // child: DigitIconButton( + // icon: getStatusAttributes(state, + // deliverInterventionState)['icon'], + // iconText: localizations.translate( + // getStatusAttributes(state, + // deliverInterventionState)[ + // 'textLabel'], + // ), // [TODO: map task status accordingly based on projectBeneficiaries and tasks] + // iconTextColor: getStatusAttributes(state, + // deliverInterventionState)['color'], + // iconColor: getStatusAttributes(state, + // deliverInterventionState)['color'], + // ), + // ), + // ), + // ), + Padding( + padding: const EdgeInsets.all(spacer2), + child: Text( + localizations.translate(i18 + .householdOverView + .householdOverViewLabel), + style: textTheme.headingXl, ), - type: ButtonType.tertiary, - size: ButtonSize.medium, - prefixIcon: Icons.edit, ), - ), - // BlocBuilder( - // builder: (ctx, deliverInterventionState) => - // Offstage( - // offstage: beneficiaryType == - // BeneficiaryType.individual, - // child: Align( - // alignment: Alignment.centerLeft, - // child: DigitIconButton( - // icon: getStatusAttributes(state, - // deliverInterventionState)['icon'], - // iconText: localizations.translate( - // getStatusAttributes(state, - // deliverInterventionState)[ - // 'textLabel'], - // ), // [TODO: map task status accordingly based on projectBeneficiaries and tasks] - // iconTextColor: getStatusAttributes(state, - // deliverInterventionState)['color'], - // iconColor: getStatusAttributes(state, - // deliverInterventionState)['color'], - // ), - // ), - // ), - // ), - Padding( - padding: const EdgeInsets.all( - spacer2 - ), - child: Text( - localizations.translate(i18.householdOverView - .householdOverViewLabel), - style: textTheme.headingXl, - ), - ), - Padding( - padding: const EdgeInsets.only( - left: spacer2, - right: spacer2, - ), - child: BlocBuilder( - builder: (ctx, deliverInterventionState) { - - bool shouldShowStatus = beneficiaryType == BeneficiaryType.household; - - return Column( - children: [ - DigitTableCard( - element: { - localizations.translate(i18 - .householdOverView - .householdOverViewHouseholdHeadNameLabel): - state + Padding( + padding: const EdgeInsets.only( + left: spacer2, + right: spacer2, + ), + child: BlocBuilder( + builder: + (ctx, deliverInterventionState) { + bool shouldShowStatus = beneficiaryType == + BeneficiaryType.household; + + return Column( + children: [ + DigitTableCard( + element: { + localizations.translate(i18 + .householdOverView + .householdOverViewHouseholdHeadNameLabel): + state + .householdMemberWrapper + .headOfHousehold + ?.name + ?.givenName ?? + localizations.translate( + i18.common + .coreCommonNA), + localizations.translate( + i18.householdLocation + .administrationAreaFormLabel, + ): localizations.translate(state .householdMemberWrapper .headOfHousehold - ?.name - ?.givenName ?? - localizations.translate( - i18.common.coreCommonNA), - localizations.translate( - i18.householdLocation - .administrationAreaFormLabel, - ): state.householdMemberWrapper.headOfHousehold?.address?.first.locality?.code, - localizations.translate( - i18.deliverIntervention - .memberCountText, - ): state.householdMemberWrapper - .household?.memberCount, - if(shouldShowStatus) - localizations.translate(i18 - .beneficiaryDetails - .status): localizations.translate( - getStatusAttributes(state, - deliverInterventionState)[ - 'textLabel'], - ) - }, - ), - ], - ); - }), - ), - Column( - children: - (state.householdMemberWrapper.members ?? []) - .map( - (e) { - final isHead = state - .householdMemberWrapper - .headOfHousehold - ?.clientReferenceId == - e.clientReferenceId; - final projectBeneficiaryId = state - .householdMemberWrapper - .projectBeneficiaries - ?.firstWhereOrNull((b) => - b.beneficiaryClientReferenceId == - e.clientReferenceId) - ?.clientReferenceId; - - final projectBeneficiary = state - .householdMemberWrapper - .projectBeneficiaries - ?.where( - (element) => - element - .beneficiaryClientReferenceId == - (RegistrationDeliverySingleton() - .beneficiaryType == - BeneficiaryType.individual - ? e.clientReferenceId - : state - .householdMemberWrapper - .household - ?.clientReferenceId), - ) - .toList(); - - final taskData = (projectBeneficiary ?? []) - .isNotEmpty - ? state.householdMemberWrapper.tasks - ?.where((element) => - element - .projectBeneficiaryClientReferenceId == - projectBeneficiary - ?.first.clientReferenceId) - .toList() - : null; - final referralData = (projectBeneficiary ?? + ?.address + ?.first + .locality + ?.code ?? + i18.common.coreCommonNA), + localizations.translate( + i18.deliverIntervention + .memberCountText, + ): state.householdMemberWrapper + .household?.memberCount, + if (shouldShowStatus) + localizations.translate(i18 + .beneficiaryDetails + .status): + localizations.translate( + getStatusAttributes(state, + deliverInterventionState)[ + 'textLabel'], + ) + }, + ), + ], + ); + }), + ), + Column( + children: + (state.householdMemberWrapper.members ?? []) - .isNotEmpty - ? state.householdMemberWrapper.referrals - ?.where((element) => - element - .projectBeneficiaryClientReferenceId == - projectBeneficiary - ?.first.clientReferenceId) - .toList() - : null; - final sideEffectData = taskData != null && - taskData.isNotEmpty - ? state - .householdMemberWrapper.sideEffects - ?.where((element) => - element.taskClientReferenceId == - taskData.lastOrNull?.clientReferenceId) - .toList() - : null; - final ageInYears = e.dateOfBirth != null - ? DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).years - : 0; - final ageInMonths = e.dateOfBirth != null - ? DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).months - : 0; - final currentCycle = - RegistrationDeliverySingleton() - .projectType - ?.cycles - ?.firstWhereOrNull( - (e) => - (e.startDate) < - DateTime.now() - .millisecondsSinceEpoch && - (e.endDate) > - DateTime.now() - .millisecondsSinceEpoch, - ); + .map( + (e) { + final isHead = state + .householdMemberWrapper + .headOfHousehold + ?.clientReferenceId == + e.clientReferenceId; + final projectBeneficiaryId = state + .householdMemberWrapper + .projectBeneficiaries + ?.firstWhereOrNull((b) => + b.beneficiaryClientReferenceId == + e.clientReferenceId) + ?.clientReferenceId; - final isBeneficiaryRefused = - checkIfBeneficiaryRefused( - taskData, - ); - final isBeneficiaryReferred = - checkIfBeneficiaryReferred( - referralData, - currentCycle, - ); - - return MemberCard( - isHead: isHead, - individual: e, - projectBeneficiaries: - projectBeneficiary ?? [], - tasks: taskData, - sideEffects: sideEffectData, - editMemberAction: () async { - final bloc = - ctx.read(); - - Navigator.of( - context, - rootNavigator: true, - ).pop(); - - final address = e.address; - if (address == null || - address.isEmpty) { - return; - } - - final projectId = - RegistrationDeliverySingleton() - .projectId!; - bloc.add( - HouseholdOverviewReloadEvent( - projectId: projectId, - projectBeneficiaryType: - beneficiaryType, - ), - ); + final projectBeneficiary = state + .householdMemberWrapper + .projectBeneficiaries + ?.where( + (element) => + element + .beneficiaryClientReferenceId == + (RegistrationDeliverySingleton() + .beneficiaryType == + BeneficiaryType + .individual + ? e.clientReferenceId + : state + .householdMemberWrapper + .household + ?.clientReferenceId), + ) + .toList(); - await context.router.root.push( - BeneficiaryRegistrationWrapperRoute( - initialState: - BeneficiaryRegistrationEditIndividualState( - individualModel: e, - householdModel: state - .householdMemberWrapper - .household!, - addressModel: address.first, - projectBeneficiaryModel: state - .householdMemberWrapper - .projectBeneficiaries - ?.firstWhereOrNull( - (element) => + final taskData = (projectBeneficiary ?? + []) + .isNotEmpty + ? state.householdMemberWrapper.tasks + ?.where((element) => element - .beneficiaryClientReferenceId == - (RegistrationDeliverySingleton() - .beneficiaryType == - BeneficiaryType - .individual - ? e.clientReferenceId - : state - .householdMemberWrapper - .household - ?.clientReferenceId), - ), - ), - children: [ - IndividualDetailsRoute( - isHeadOfHousehold: isHead, - ), - ], - ), + .projectBeneficiaryClientReferenceId == + projectBeneficiary?.first + .clientReferenceId) + .toList() + : null; + final referralData = (projectBeneficiary ?? + []) + .isNotEmpty + ? state.householdMemberWrapper + .referrals + ?.where((element) => + element + .projectBeneficiaryClientReferenceId == + projectBeneficiary?.first + .clientReferenceId) + .toList() + : null; + final sideEffectData = taskData != + null && + taskData.isNotEmpty + ? state.householdMemberWrapper + .sideEffects + ?.where((element) => + element + .taskClientReferenceId == + taskData.lastOrNull + ?.clientReferenceId) + .toList() + : null; + final ageInYears = e.dateOfBirth != null + ? DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).years + : 0; + final ageInMonths = + e.dateOfBirth != null + ? DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).months + : 0; + final currentCycle = + RegistrationDeliverySingleton() + .projectType + ?.cycles + ?.firstWhereOrNull( + (e) => + (e.startDate) < + DateTime.now() + .millisecondsSinceEpoch && + (e.endDate) > + DateTime.now() + .millisecondsSinceEpoch, + ); + + final isBeneficiaryRefused = + checkIfBeneficiaryRefused( + taskData, ); - }, - setAsHeadAction: () { - ctx.read().add( - HouseholdOverviewSetAsHeadEvent( - individualModel: e, - projectId: - RegistrationDeliverySingleton() - .projectId!, - householdModel: state - .householdMemberWrapper - .household!, + final isBeneficiaryReferred = + checkIfBeneficiaryReferred( + referralData, + currentCycle, + ); + + return MemberCard( + isHead: isHead, + individual: e, + projectBeneficiaries: + projectBeneficiary ?? [], + tasks: taskData, + sideEffects: sideEffectData, + editMemberAction: () async { + final bloc = ctx + .read(); + + Navigator.of( + context, + rootNavigator: true, + ).pop(); + + final address = e.address; + if (address == null || + address.isEmpty) { + return; + } + + final projectId = + RegistrationDeliverySingleton() + .projectId!; + bloc.add( + HouseholdOverviewReloadEvent( + projectId: projectId, projectBeneficiaryType: beneficiaryType, ), ); - Navigator.of( - context, - rootNavigator: true, - ).pop(); - }, - deleteMemberAction: () { - showPopup( - context: context, - title: localizations.translate(i18 - .householdOverView - .householdOverViewActionCardTitle), - type: PopUpType.simple, - actions: [ - Button( - label: localizations.translate(i18.householdOverView - .householdOverViewPrimaryActionLabel), - onPressed: () { - Navigator.of( - context, - rootNavigator: true, - ) - ..pop() - ..pop(); - context - .read< - HouseholdOverviewBloc>() - .add( - HouseholdOverviewEvent - .selectedIndividual( - individualModel: e, - ), - ); - context.router.push( - ReasonForDeletionRoute( - isHousholdDelete: false, - ), - ); - }, - type: ButtonType.primary, - size: ButtonSize.large - ), - Button( - label: localizations.translate(i18.householdOverView - .householdOverViewSecondaryActionLabel), - onPressed: () { - Navigator.of( - context, - rootNavigator: true, - ).pop(); - }, - type: ButtonType.tertiary, - size: ButtonSize.large - ) - ] - ); - }, - isNotEligible: RegistrationDeliverySingleton() - .projectType - ?.cycles != - null - ? !checkEligibilityForAgeAndSideEffect( - DigitDOBAgeConvertor( - years: ageInYears, - months: ageInMonths, + await context.router.root.push( + BeneficiaryRegistrationWrapperRoute( + initialState: + BeneficiaryRegistrationEditIndividualState( + individualModel: e, + householdModel: state + .householdMemberWrapper + .household!, + addressModel: address.first, + projectBeneficiaryModel: state + .householdMemberWrapper + .projectBeneficiaries + ?.firstWhereOrNull( + (element) => + element + .beneficiaryClientReferenceId == + (RegistrationDeliverySingleton() + .beneficiaryType == + BeneficiaryType + .individual + ? e + .clientReferenceId + : state + .householdMemberWrapper + .household + ?.clientReferenceId), + ), + ), + children: [ + IndividualDetailsRoute( + isHeadOfHousehold: isHead, + ), + ], ), + ); + }, + setAsHeadAction: () { + ctx + .read() + .add( + HouseholdOverviewSetAsHeadEvent( + individualModel: e, + projectId: + RegistrationDeliverySingleton() + .projectId!, + householdModel: state + .householdMemberWrapper + .household!, + projectBeneficiaryType: + beneficiaryType, + ), + ); + + Navigator.of( + context, + rootNavigator: true, + ).pop(); + }, + deleteMemberAction: () { + showCustomPopup( + context: context, + builder: (BuildContext) { + return Popup( + title: localizations + .translate(i18 + .householdOverView + .householdOverViewActionCardTitle), + type: PopUpType.simple, + actions: [ + DigitButton( + label: localizations + .translate(i18 + .householdOverView + .householdOverViewPrimaryActionLabel), + onPressed: () { + Navigator.of( + context, + rootNavigator: + true, + ) + ..pop() + ..pop(); + context + .read< + HouseholdOverviewBloc>() + .add( + HouseholdOverviewEvent + .selectedIndividual( + individualModel: + e, + ), + ); + context.router.push( + ReasonForDeletionRoute( + isHousholdDelete: + false, + ), + ); + }, + type: DigitButtonType + .primary, + size: DigitButtonSize + .large), + DigitButton( + label: localizations + .translate(i18 + .householdOverView + .householdOverViewSecondaryActionLabel), + onPressed: () { + Navigator.of( + context, + rootNavigator: + true, + ).pop(); + }, + type: DigitButtonType + .tertiary, + size: DigitButtonSize + .large) + ]); + }, + ); + }, + isNotEligible: RegistrationDeliverySingleton() - .projectType, - (taskData ?? []).isNotEmpty - ? taskData?.lastOrNull - : null, - sideEffectData, - ) - : false, - name: e.name?.givenName ?? ' - - ', - years: (e.dateOfBirth == null - ? null - : DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).years), - months: (e.dateOfBirth == null - ? null - : DigitDateUtils.calculateAge( - DigitDateUtils - .getFormattedDateToDateTime( - e.dateOfBirth!, - ) ?? - DateTime.now(), - ).months), - gender: e.gender?.name, - isBeneficiaryRefused: - isBeneficiaryRefused && - !checkStatus( - taskData, - currentCycle, - ), - isBeneficiaryReferred: - isBeneficiaryReferred, - isDelivered: taskData == null - ? false - : taskData.isNotEmpty && + .projectType + ?.cycles != + null + ? !checkEligibilityForAgeAndSideEffect( + DigitDOBAgeConvertor( + years: ageInYears, + months: ageInMonths, + ), + RegistrationDeliverySingleton() + .projectType, + (taskData ?? []) + .isNotEmpty + ? taskData?.lastOrNull + : null, + sideEffectData, + ) + : false, + name: e.name?.givenName ?? ' - - ', + years: (e.dateOfBirth == null + ? null + : DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).years), + months: (e.dateOfBirth == null + ? null + : DigitDateUtils.calculateAge( + DigitDateUtils + .getFormattedDateToDateTime( + e.dateOfBirth!, + ) ?? + DateTime.now(), + ).months), + gender: e.gender?.name, + isBeneficiaryRefused: + isBeneficiaryRefused && !checkStatus( taskData, currentCycle, - ) - ? true - : false, - localizations: localizations, - projectBeneficiaryClientReferenceId: - projectBeneficiaryId, - ); - }, - ).toList(), - ), - const SizedBox( - height: spacer2, - ), - Center( - child: Button( - isDisabled: (state.householdMemberWrapper - .projectBeneficiaries ?? - []) - .isEmpty, - onPressed: () => addIndividual( - context, - state.householdMemberWrapper - .household!, - ), - label: localizations.translate( - i18.householdOverView - .householdOverViewAddActionText, + ), + isBeneficiaryReferred: + isBeneficiaryReferred, + isDelivered: taskData == null + ? false + : taskData.isNotEmpty && + !checkStatus( + taskData, + currentCycle, + ) + ? true + : false, + localizations: localizations, + projectBeneficiaryClientReferenceId: + projectBeneficiaryId, + ); + }, + ).toList(), ), - prefixIcon: Icons.add_circle, - type: ButtonType.tertiary, - size: ButtonSize.medium, - ), - ), - const SizedBox( - height: spacer2, + const SizedBox( + height: spacer2, + ), + Center( + child: DigitButton( + isDisabled: (state.householdMemberWrapper + .projectBeneficiaries ?? + []) + .isEmpty, + onPressed: () => addIndividual( + context, + state.householdMemberWrapper.household!, + ), + label: localizations.translate( + i18.householdOverView + .householdOverViewAddActionText, + ), + prefixIcon: Icons.add_circle, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + ), + ), + const SizedBox( + height: spacer2, + ), + ], ), - ], - ),] - ), + ]), ), ], ), @@ -761,7 +818,7 @@ class _HouseholdOverviewPageState if (project?.startDate != null && project?.endDate != null) { final now = DateTime.now().millisecondsSinceEpoch; final startDate = project!.startDate!; - final endDate = project!.endDate!; + final endDate = project.endDate!; return now < startDate || now > endDate; } @@ -769,7 +826,6 @@ class _HouseholdOverviewPageState return false; } - getStatusAttributes(HouseholdOverviewState state, DeliverInterventionState deliverInterventionState) { var textLabel = @@ -779,7 +835,11 @@ class _HouseholdOverviewPageState if ((state.householdMemberWrapper.projectBeneficiaries ?? []).isNotEmpty) { textLabel = state.householdMemberWrapper.tasks?.isNotEmpty ?? false - ? getTaskStatus(state.householdMemberWrapper.tasks ?? []).toValue() + ? getTaskStatus(state.householdMemberWrapper.tasks ?? []).toValue() == + Status.administeredSuccess.toValue() + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_${getTaskStatus(state.householdMemberWrapper.tasks ?? []).toValue()}' + : getTaskStatus(state.householdMemberWrapper.tasks ?? []) + .toValue() : Status.registered.toValue(); color = state.householdMemberWrapper.tasks?.isNotEmpty ?? false diff --git a/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart b/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart index e69fb904d..44b3712c8 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/record_past_delivery_details.dart @@ -1,6 +1,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:collection/collection.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; @@ -43,6 +45,7 @@ class RecordPastDeliveryDetailsPageState final theme = Theme.of(context); final localizations = RegistrationDeliveryLocalization.of(context); final router = context.router; + final textTheme = theme.digitTextTheme(context); final futureTaskList = widget.tasks ?.where((task) => task.status == Status.delivered.toValue()) @@ -60,181 +63,189 @@ class RecordPastDeliveryDetailsPageState ), ]), footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), - children: [Button( - label: localizations.translate(i18.common.coreCommonNext), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () { - for (int i = 0; i < (futureTaskList ?? []).length; i++) { - if (form - .control("$_recordDoseAdministeredKey.$i") - .value == - null) { - form - .control("$_recordDoseAdministeredKey.$i") - .setErrors({'': true}); - } - } + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: localizations.translate(i18.common.coreCommonNext), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + for (int i = 0; + i < (futureTaskList ?? []).length; + i++) { + if (form + .control("$_recordDoseAdministeredKey.$i") + .value == + null) { + form + .control("$_recordDoseAdministeredKey.$i") + .setErrors({'': true}); + } + } - form.markAllAsTouched(); + form.markAllAsTouched(); - if (!form.valid) return; + if (!form.valid) return; - showDialog( - context: context, - barrierDismissible: false, - builder: (ctx)=> Popup( - title: localizations.translate(i18 - .deliverIntervention - .didYouObservePreviousAdvEventsTitle), - inlineActions: true, - actions: [ - Button( - label: localizations.translate( - i18.common.coreCommonYes, - ), - onPressed: () async { - router.maybePop(); - final event = - context.read(); - final bloc = context.read(); + showDialog( + context: context, + barrierDismissible: false, + builder: (ctx) => Popup( + title: localizations.translate(i18 + .deliverIntervention + .didYouObservePreviousAdvEventsTitle), + inlineActions: true, + actions: [ + DigitButton( + label: localizations.translate( + i18.common.coreCommonYes, + ), + onPressed: () async { + router.maybePop(); + 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 formControlValue = (form - .control( - "$_recordDoseAdministeredKey.$i", - ) - .value as bool); + final formControlValue = (form + .control( + "$_recordDoseAdministeredKey.$i", + ) + .value as bool); - // Determine the status based on the form control value - final status = formControlValue - ? Status.administeredSuccess.toValue() - : Status.administeredFailed.toValue(); + // Determine the status based on the form control value + final status = formControlValue + ? 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( - task: result, - isEditing: true, - boundaryModel: - RegistrationDeliverySingleton().boundary!, - )); - } - context.router.popUntilRouteWithName( - HouseholdOverviewRoute.name, - ); - Navigator.of(ctx).pop(); - final response = await router.push( - SideEffectsRoute( - tasks: [(futureTaskList ?? []).last], + // Add the updated task to the event + event.add(DeliverInterventionSubmitEvent( + task: result, + isEditing: true, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + )); + } + context.router.popUntilRouteWithName( + HouseholdOverviewRoute.name, + ); + Navigator.of(ctx).pop(); + final response = await router.push( + SideEffectsRoute( + tasks: [(futureTaskList ?? []).last], + ), + ); + if (response == null) { + bloc.add(HouseholdOverviewReloadEvent( + projectId: + RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + } + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.medium), + DigitButton( + label: localizations.translate( + i18.common.coreCommonNo, ), - ); - if (response == null) { - bloc.add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton().projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - } - }, - type: ButtonType.secondary, - size: ButtonSize.medium - ), - Button( - label: localizations.translate( - i18.common.coreCommonNo, - ), - onPressed: () { - router.maybePop(); - final event = - context.read(); + onPressed: () { + router.maybePop(); + final event = + 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 bool); + final formControllValue = (form + .control( + "$_recordDoseAdministeredKey.$i", + ) + .value as bool); - // 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( - task: result, - isEditing: true, - boundaryModel: - RegistrationDeliverySingleton().boundary!, - )); - } - final bloc = context.read(); + // Add the updated task to the event + event.add(DeliverInterventionSubmitEvent( + task: result, + isEditing: true, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + )); + } + final bloc = + context.read(); - bloc.add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton().projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); + bloc.add(HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); - event.add(DeliverInterventionSearchEvent( - taskSearch: TaskSearchModel( - projectBeneficiaryClientReferenceId: bloc.state - .householdMemberWrapper.projectBeneficiaries - ?.map((e) => e.clientReferenceId) - .toList(), - ), - )); - context.router.popUntilRouteWithName( - SearchBeneficiaryRoute.name, - ); - bloc.add(HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton().projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - Navigator.of(ctx).pop(); + event.add(DeliverInterventionSearchEvent( + taskSearch: TaskSearchModel( + projectBeneficiaryClientReferenceId: + bloc.state.householdMemberWrapper + .projectBeneficiaries + ?.map( + (e) => e.clientReferenceId) + .toList(), + ), + )); + context.router.popUntilRouteWithName( + SearchBeneficiaryRoute.name, + ); + bloc.add(HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + Navigator.of(ctx).pop(); - router.push( - BeneficiaryDetailsRoute(), - ); - }, - type: ButtonType.primary, - size: ButtonSize.medium + router.push( + BeneficiaryDetailsRoute(), + ); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.medium), + ], ), - ], - ), - ); - }, - ),] - ), + ); + }, + ), + ]), children: [ - DigitCard( - children: [Padding( + DigitCard(children: [ + Padding( padding: const EdgeInsets.symmetric( horizontal: spacer2, vertical: spacer2, @@ -247,7 +258,7 @@ class RecordPastDeliveryDetailsPageState localizations.translate( i18.deliverIntervention.recordPastDeliveryDeatils, ), - style: theme.textTheme.displayMedium, + style: DigitTheme.instance.mobileTheme.textTheme.displayMedium, ), ), ...(futureTaskList?.asMap().entries.map((entry) { @@ -268,10 +279,10 @@ class RecordPastDeliveryDetailsPageState children: [ ReactiveWrapperField( formControlName: - "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", - builder: (field)=> LabeledField( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}", + builder: (field) => LabeledField( label: - "${localizations.translate(i18.deliverIntervention.wasDosePastDeliveryDetails)} $doseNumber ${localizations.translate(i18.deliverIntervention.wasDosePastRecordDeliveryDetails)} ${localizations.translate(i18.beneficiaryDetails.beneficiaryDose)} ${doseNumber - 1} ?", + "${localizations.translate(i18.deliverIntervention.wasDosePastDeliveryDetails)} $doseNumber ${localizations.translate(i18.deliverIntervention.wasDosePastRecordDeliveryDetails)} ${localizations.translate(i18.beneficiaryDetails.beneficiaryDose)} ${doseNumber - 1} ?", isRequired: true, labelStyle: DigitTheme .instance @@ -282,22 +293,37 @@ class RecordPastDeliveryDetailsPageState top: spacer2, ), child: RadioList( - radioButtons: Constants.yesNo - .map((e) => RadioButtonModel( - code: e.key.toString(), - name: localizations.translate(e.label), - )).toList(), - groupValue: form.control("$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") - .value.toString()??'', + radioDigitButtons: Constants.yesNo + .map((e) => RadioButtonModel( + code: e.key.toString(), + name: localizations + .translate(e.label), + )) + .toList(), + groupValue: form + .control( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") + .value + .toString() ?? + '', onChanged: (val) { - form.control("$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") - .value=val.code=='true'?true:false; + form + .control( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") + .value = val.code == + 'true' + ? true + : false; }, - errorMessage: form.control("$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") - .hasErrors? localizations.translate( - i18.common.corecommonRequired, - ):null, - + errorMessage: form + .control( + "$_recordDoseAdministeredKey.${futureTaskList.indexOf(entry.value)}") + .hasErrors + ? localizations.translate( + i18.common + .corecommonRequired, + ) + : null, ), ), ), @@ -314,8 +340,8 @@ class RecordPastDeliveryDetailsPageState []), ], ), - ),] - ), + ), + ]), ], ), ); @@ -325,8 +351,6 @@ class RecordPastDeliveryDetailsPageState } FormGroup buildForm(BuildContext context) { - final bloc = context.read().state; - final futureTaskList = widget.tasks ?.where((task) => task.status == Status.delivered.toValue()) .toList(); diff --git a/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart b/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart index beb6657cb..f101d5e74 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/refer_beneficiary.dart @@ -1,6 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; @@ -96,305 +97,303 @@ class ReferBeneficiaryPageState extends LocalizedState { body: ReactiveFormBuilder( form: buildForm, builder: (context, form, child) => ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), - children: [ - ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return Button( - label: localizations.translate(i18.common.coreCommonSubmit), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - isDisabled: isClicked?true:false, - onPressed: () { - if (form.control(_referralReason).value == null) { - clickedStatus.value = false; - } - form.markAllAsTouched(); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + isDisabled: isClicked ? true : false, + onPressed: () { + if (form.control(_referralReason).value == null) { + clickedStatus.value = false; + } + form.markAllAsTouched(); - if (!form.valid) { - return; - } else { - clickedStatus.value = true; - final reason = form - .control(_referralReason) - .value as String; - final recipientType = - selectedProjectFacilityId == - 'Community Health Worker' - ? 'STAFF' - : 'FACILITY'; - final recipientId = selectedProjectFacilityId == - 'Community Health Worker' - ? RegistrationDeliverySingleton() - .loggedInUserUuid - : selectedProjectFacilityId; - final referralComment = - form.control(_referralComments).value; + if (!form.valid) { + return; + } else { + clickedStatus.value = true; + final reason = + form.control(_referralReason).value as String; + final recipientType = selectedProjectFacilityId == + 'Community Health Worker' + ? 'STAFF' + : 'FACILITY'; + final recipientId = selectedProjectFacilityId == + 'Community Health Worker' + ? RegistrationDeliverySingleton() + .loggedInUserUuid + : selectedProjectFacilityId; + final referralComment = + form.control(_referralComments).value; - final event = context.read(); - event.add(ReferralSubmitEvent( - ReferralModel( - clientReferenceId: IdGen.i.identifier, - projectId: RegistrationDeliverySingleton() - .projectId, - projectBeneficiaryClientReferenceId: - widget.projectBeneficiaryClientRefId, - referrerId: RegistrationDeliverySingleton() - .loggedInUserUuid, - recipientId: recipientId, - recipientType: recipientType, - reasons: [reason], - tenantId: RegistrationDeliverySingleton() - .tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: + final event = context.read(); + event.add(ReferralSubmitEvent( + ReferralModel( + clientReferenceId: IdGen.i.identifier, + projectId: + RegistrationDeliverySingleton().projectId, + projectBeneficiaryClientReferenceId: + widget.projectBeneficiaryClientRefId, + referrerId: RegistrationDeliverySingleton() + .loggedInUserUuid, + recipientId: recipientId, + recipientType: recipientType, + reasons: [reason], + tenantId: + RegistrationDeliverySingleton().tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + additionalFields: ReferralAdditionalFields( + version: 1, + fields: [ + AdditionalField( + "boundaryCode", RegistrationDeliverySingleton() - .loggedInUserUuid!, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - additionalFields: ReferralAdditionalFields( - version: 1, - fields: [ - if (referralComment != null && - referralComment - .toString() - .trim() - .isNotEmpty) - AdditionalField( - AdditionalFieldsType - .referralComments - .toValue(), - referralComment, - ), - ], - ), + .boundary + ?.code), + if (referralComment != null && + referralComment + .toString() + .trim() + .isNotEmpty) + AdditionalField( + AdditionalFieldsType.referralComments + .toValue(), + referralComment, + ), + ], ), - false, - )); + ), + false, + )); - final reloadState = - context.read(); + final reloadState = + context.read(); - Future.delayed( - const Duration(milliseconds: 500), - () { - reloadState - .add(HouseholdOverviewReloadEvent( - projectId: RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - )); - }, - ).then((value) => context.router.popAndPush( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); - } - }, - ); - }, - ), - ] - ), + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState.add(HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton() + .projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + )); + }, + ).then((value) => context.router.popAndPush( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } + }, + ); + }, + ), + ]), slivers: [ SliverToBoxAdapter( - child: DigitCard( - children: [ - Text( - localizations.translate( - i18.referBeneficiary.referralDetails, - ), - style: textTheme.headingXl, + child: DigitCard(children: [ + Text( + localizations.translate( + i18.referBeneficiary.referralDetails, ), - ReactiveWrapperField( - formControlName: _dateOfReferralKey, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.referBeneficiary.dateOfReferralLabel, - ), - child: DigitDateFormInput( - readOnly: true, - isRequired: false, - initialValue: DateFormat('dd MMM yyyy') - .format(form.control(_dateOfReferralKey).value).toString(), - initialDate: DateTime.now(), - cancelText: localizations - .translate(i18.common.coreCommonCancel), - confirmText: localizations - .translate(i18.common.coreCommonOk), - ), + style: textTheme.headingXl, + ), + ReactiveWrapperField( + formControlName: _dateOfReferralKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.dateOfReferralLabel, ), - ), - ReactiveWrapperField( - formControlName: _administrativeUnitKey, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.referBeneficiary.administrationUnitFormLabel, - ), - isRequired: true, - child: DigitTextFormInput( - readOnly: true, - initialValue: form.control(_administrativeUnitKey).value, - ), + child: DigitDateFormInput( + readOnly: true, + isRequired: false, + initialValue: DateFormat('dd MMM yyyy') + .format(form.control(_dateOfReferralKey).value) + .toString(), + initialDate: DateTime.now(), + cancelText: localizations + .translate(i18.common.coreCommonCancel), + confirmText: + localizations.translate(i18.common.coreCommonOk), ), ), - ReactiveWrapperField( - formControlName: _referredByKey, - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.corecommonRequired, - ), - }, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.referBeneficiary.referredByLabel, - ), - isRequired: true, - child: DigitTextFormInput( - errorMessage: field.errorText, - onChange: (value){ - form.control(_referredByKey).value=value; - }, - initialValue: form.control(_referredByKey).value, - ), + ), + ReactiveWrapperField( + formControlName: _administrativeUnitKey, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.administrationUnitFormLabel, + ), + isRequired: true, + child: DigitTextFormInput( + readOnly: true, + initialValue: + form.control(_administrativeUnitKey).value, ), ), - InkWell( - onTap: () async { - final parent = - context.router.parent() as StackRouter; - final facility = await parent.push( - FacilitySelectionRoute( - facilities: facilities, - ), - ) as FacilityModel?; - - if (facility == null) return; - form.control(_referredToKey).value = - localizations.translate('FAC_${facility.id}'); - setState(() { - selectedProjectFacilityId = facility.id; - }); - }, - child: IgnorePointer( - child: ReactiveWrapperField( - formControlName: _referredToKey, - validationMessages: { - 'required': (_) => localizations.translate( - i18.referBeneficiary - .facilityValidationMessage, - ), - }, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.referBeneficiary.referredToLabel, - ), - isRequired: true, - child: DigitSearchFormInput( - // hideKeyboard: true, - // readOnly: true,r - errorMessage: field.errorText, - initialValue: form.control(_referredToKey).value, - onSuffixTap: (value) async { - final parent = - context.router.parent() as StackRouter; - final facility = await parent.push( - FacilitySelectionRoute( - facilities: facilities, - ), - ) as FacilityModel?; - - if (facility == null) return; - form.control(_referredToKey).value = - localizations - .translate('FAC_${facility.id}'); - - setState(() { - selectedProjectFacilityId = facility.id; - }); - }, - ), + ), + ReactiveWrapperField( + formControlName: _referredByKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.corecommonRequired, ), - ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.referredByLabel, + ), + isRequired: true, + child: DigitTextFormInput( + errorMessage: field.errorText, + onChange: (value) { + form.control(_referredByKey).value = value; + }, + initialValue: form.control(_referredByKey).value, ), ), - ReactiveWrapperField( - formControlName: _referralReason, - validationMessages: { - 'required': (_) => localizations.translate( - i18.common.corecommonRequired, + ), + InkWell( + onTap: () async { + final parent = context.router.parent() as StackRouter; + final facility = await parent.push( + FacilitySelectionRoute( + facilities: facilities, ), - }, + ) as FacilityModel?; - builder: (field)=> LabeledField( - label: localizations.translate( - i18.referBeneficiary.reasonForReferral, - ), - isRequired: true, - child: Align( - alignment: Alignment.topLeft, - child: RadioList( - radioButtons: reasons - .map((e)=> - RadioButtonModel( - code: e.key.toString(), - name: localizations.translate(e.label) - ) - ).toList(), + if (facility == null) return; + form.control(_referredToKey).value = + localizations.translate('FAC_${facility.id}'); + setState(() { + selectedProjectFacilityId = facility.id; + }); + }, + child: IgnorePointer( + child: ReactiveWrapperField( + formControlName: _referredToKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.referBeneficiary + .facilityValidationMessage, + ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.referredToLabel, + ), + isRequired: true, + child: DigitSearchFormInput( + // hideKeyboard: true, + // readOnly: true,r errorMessage: field.errorText, - groupValue: form.control(_referralReason).value??'', - onChanged: (val) { - form.control(_referralReason).value = val.code; + initialValue: form.control(_referredToKey).value, + onSuffixTap: (value) async { + final parent = + context.router.parent() as StackRouter; + final facility = await parent.push( + FacilitySelectionRoute( + facilities: facilities, + ), + ) as FacilityModel?; + + if (facility == null) return; + form.control(_referredToKey).value = + localizations + .translate('FAC_${facility.id}'); + + setState(() { + selectedProjectFacilityId = facility.id; + }); }, ), ), ), ), - ReactiveWrapperField( - formControlName: _referralComments, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.referBeneficiary.referralComments, - ), - child: DigitTextAreaFormInput( - maxLine: 3, - initialValue: form.control(_referralComments).value, - onChange: (value){ - form.control(_referralComments).value=value; + ), + ReactiveWrapperField( + formControlName: _referralReason, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.corecommonRequired, + ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.reasonForReferral, + ), + isRequired: true, + child: Align( + alignment: Alignment.topLeft, + child: RadioList( + radioDigitButtons: reasons + .map((e) => RadioButtonModel( + code: e.key.toString(), + name: localizations.translate(e.label))) + .toList(), + errorMessage: field.errorText, + groupValue: + form.control(_referralReason).value ?? '', + onChanged: (val) { + form.control(_referralReason).value = val.code; }, ), ), ), - ] - ), + ), + ReactiveWrapperField( + formControlName: _referralComments, + builder: (field) => LabeledField( + label: localizations.translate( + i18.referBeneficiary.referralComments, + ), + child: DigitTextAreaFormInput( + maxLine: 3, + initialValue: form.control(_referralComments).value, + onChange: (value) { + form.control(_referralComments).value = value; + }, + ), + ), + ), + ]), ), ], ), @@ -416,8 +415,8 @@ class ReferBeneficiaryPageState extends LocalizedState { ), _referredToKey: FormControl(validators: [Validators.required]), _referralReason: FormControl( - value: null, - validators: [Validators.required], + value: null, + validators: [Validators.required], ), _referralComments: FormControl(value: null), }); diff --git a/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart b/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart index c6f74d7d0..fb29c698c 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/refused_delivery.dart @@ -38,8 +38,6 @@ class RefusedDeliveryPageState extends LocalizedState { @override void initState() { - final registrationState = context.read().state; - super.initState(); } @@ -57,7 +55,7 @@ class RefusedDeliveryPageState extends LocalizedState { BlocBuilder( builder: (context, registrationState) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -67,197 +65,194 @@ class RefusedDeliveryPageState extends LocalizedState { ], ), footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: - const EdgeInsets.all(spacer2), - children: [ - Button( - label: localizations.translate( - i18.householdLocation.actionLabel, - ), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () { - form.markAllAsTouched(); + margin: const EdgeInsets.only(top: spacer2), + padding: const EdgeInsets.all(spacer2), + children: [ + DigitButton( + label: localizations.translate( + i18.householdLocation.actionLabel, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + form.markAllAsTouched(); - if (form.control(_reasonOfRefusal).value == null) { - setState(() { - form - .control(_reasonOfRefusal) - .setErrors({'': true}); - }); - } + if (form.control(_reasonOfRefusal).value == + null) { + setState(() { + form + .control(_reasonOfRefusal) + .setErrors({'': true}); + }); + } - if (!form.valid) return; + if (!form.valid) return; - final reasonOfRefusal = - form.control(_reasonOfRefusal).value; + final reasonOfRefusal = + form.control(_reasonOfRefusal).value; - final refusalComment = - form.control(_deliveryCommentKey).value; + final refusalComment = + form.control(_deliveryCommentKey).value; - final projectBeneficiary = - RegistrationDeliverySingleton().beneficiaryType != - BeneficiaryType.individual - ? [ - registrationState.householdMemberWrapper - .projectBeneficiaries?.first - ] - : registrationState.householdMemberWrapper - .projectBeneficiaries - ?.where( - (element) => - element - .beneficiaryClientReferenceId == - registrationState.selectedIndividual - ?.clientReferenceId, - ) - .toList(); + final projectBeneficiary = + RegistrationDeliverySingleton() + .beneficiaryType != + BeneficiaryType.individual + ? [ + registrationState + .householdMemberWrapper + .projectBeneficiaries + ?.first + ] + : registrationState.householdMemberWrapper + .projectBeneficiaries + ?.where( + (element) => + element + .beneficiaryClientReferenceId == + registrationState + .selectedIndividual + ?.clientReferenceId, + ) + .toList(); - // Determine the status based on the reason of refusal - String status; - if (reasonOfRefusal == - Status.beneficiaryRefused.toValue()) { - status = Status.beneficiaryRefused.toValue(); - } else { - status = Status.administeredFailed.toValue(); - } - final oldTask = - RegistrationDeliverySingleton().beneficiaryType != + // Determine the status based on the reason of refusal + String status; + if (reasonOfRefusal == + Status.beneficiaryRefused.toValue()) { + status = Status.beneficiaryRefused.toValue(); + } else { + status = Status.administeredFailed.toValue(); + } + final oldTask = RegistrationDeliverySingleton() + .beneficiaryType != BeneficiaryType.individual ? registrationState .householdMemberWrapper.tasks?.last : null; - context.read().add( - DeliverInterventionSubmitEvent( - navigateToSummary: true, - householdMemberWrapper: - registrationState.householdMemberWrapper, - task: _getTaskModel( - oldTask, - projectBeneficiary - ?.first?.clientReferenceId, - status, - reasonOfRefusal, - refusalComment, - registrationState.householdMemberWrapper - .members?.first.address?.first), - isEditing: false, - boundaryModel: - RegistrationDeliverySingleton().boundary!, - ), - ); - context.router.push(DeliverySummaryRoute()); - }, - ), - ] - ), + context.read().add( + DeliverInterventionSubmitEvent( + navigateToSummary: true, + householdMemberWrapper: registrationState + .householdMemberWrapper, + task: _getTaskModel( + oldTask, + projectBeneficiary + ?.first?.clientReferenceId, + status, + reasonOfRefusal, + refusalComment, + registrationState + .householdMemberWrapper + .members + ?.first + .address + ?.first), + isEditing: false, + boundaryModel: + RegistrationDeliverySingleton() + .boundary!, + ), + ); + context.router.push(DeliverySummaryRoute()); + }, + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - children: [ - Padding( - padding: const EdgeInsets.all(spacer2), - child: Text( - localizations.translate( + margin: const EdgeInsets.all(spacer2), + children: [ + Text( + localizations.translate( + i18.deliverIntervention.refusedDeliveryLabel, + ), + style: textTheme.headingXl, + ), + refusedDeliveryShowcaseData.dateOfVisit.buildWith( + child: ReactiveWrapperField( + formControlName: _dataOfRefusalKey, + builder: (field) => LabeledField( + label: localizations.translate( i18.deliverIntervention - .refusedDeliveryLabel, + .refusedDeliveryVisitDateLabel, ), - style: textTheme.headingXl, - ), - ), - refusedDeliveryShowcaseData.dateOfVisit - .buildWith( - child: ReactiveWrapperField( - formControlName: _dataOfRefusalKey, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.deliverIntervention - .refusedDeliveryVisitDateLabel, + child: DigitDateFormInput( + readOnly: true, + confirmText: localizations.translate( + i18.common.coreCommonOk, ), - child: DigitDateFormInput( - readOnly: true, - confirmText: localizations.translate( - i18.common.coreCommonOk, - ), - cancelText: localizations.translate( - i18.common.coreCommonCancel, - ), - initialValue: DateFormat('dd MMM yyyy') - .format(form.control(_dataOfRefusalKey).value), + cancelText: localizations.translate( + i18.common.coreCommonCancel, ), + initialValue: DateFormat('dd MMM yyyy') + .format(form + .control(_dataOfRefusalKey) + .value), ), ), ), - refusedDeliveryShowcaseData.reasonOfRefusal - .buildWith( - child: SelectionCard( - title: localizations.translate( - i18.deliverIntervention - .reasonForRefusalLabel, - ), - isRequired: true, - width: MediaQuery.of(context).size.width * - .36, - allowMultipleSelection: false, - options: RegistrationDeliverySingleton() - .refusalReasons ?? - [], - onSelectionChanged: (value) { - form - .control(_reasonOfRefusal) - .markAsTouched(); - setState(() { - if (value.isNotEmpty) { + ), + refusedDeliveryShowcaseData.reasonOfRefusal.buildWith( + child: SelectionCard( + title: localizations.translate( + i18.deliverIntervention.reasonForRefusalLabel, + ), + showParentContainer: true, + isRequired: true, + width: MediaQuery.of(context).size.width * .34, + allowMultipleSelection: false, + options: RegistrationDeliverySingleton() + .refusalReasons ?? + [], + onSelectionChanged: (value) { + form.control(_reasonOfRefusal).markAsTouched(); + setState(() { + if (value.isNotEmpty) { + form.control(_reasonOfRefusal).value = + value.first; + } else { + form.control(_reasonOfRefusal).value = null; + setState(() { form .control(_reasonOfRefusal) - .value = value.first; - } else { - form + .setErrors({'': true}); + }); + } + }); + }, + valueMapper: (value) { + return localizations + .translate('REASON_${value.toString()}'); + }, + errorMessage: form .control(_reasonOfRefusal) - .value = null; - setState(() { - form - .control(_reasonOfRefusal) - .setErrors({'': true}); - }); - } - }); - }, - valueMapper: (value) { - return localizations.translate( - 'REASON_${value.toString()}'); - }, - errorMessage: form - .control(_reasonOfRefusal) - .hasErrors && - form - .control(_reasonOfRefusal) - .touched - ? localizations.translate( - i18.common.corecommonRequired) - : null, - ), + .hasErrors && + form.control(_reasonOfRefusal).touched + ? localizations + .translate(i18.common.corecommonRequired) + : null, ), - refusedDeliveryShowcaseData.comments.buildWith( - child: ReactiveWrapperField( - formControlName: _deliveryCommentKey, - builder: (field)=> LabeledField( - label: localizations.translate(i18 - .deliverIntervention - .reasonForRefusalCommentLabel), - child: DigitTextFormInput( - onChange: (value){ - form.control(_deliveryCommentKey).value=value; - }, - ), + ), + refusedDeliveryShowcaseData.comments.buildWith( + child: ReactiveWrapperField( + formControlName: _deliveryCommentKey, + builder: (field) => LabeledField( + label: localizations.translate(i18 + .deliverIntervention + .reasonForRefusalCommentLabel), + child: DigitTextFormInput( + onChange: (value) { + form.control(_deliveryCommentKey).value = + value; + }, ), ), ), - ] - ), + ), + ]), ), ], ); diff --git a/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart b/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart index 20cd59839..28820929d 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/side_effects.dart @@ -19,8 +19,8 @@ import '../../utils/constants.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../../utils/utils.dart'; import '../../widgets/back_navigation_help_header.dart'; -import '../../widgets/localized.dart'; import '../../widgets/component_wrapper/product_variant_bloc_wrapper.dart'; +import '../../widgets/localized.dart'; @RoutePage() class SideEffectsPage extends LocalizedStatefulWidget { @@ -85,12 +85,12 @@ class SideEffectsPageState extends LocalizedState { margin: const EdgeInsets.only(top: spacer2), padding: const EdgeInsets.all(spacer2), children: [ - Button( + DigitButton( label: localizations.translate( i18.common.coreCommonNext, ), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () async { if (symptomsValues.any((e) => e)) { @@ -112,7 +112,7 @@ class SideEffectsPageState extends LocalizedState { .dialogContent, ), actions: [ - Button( + DigitButton( label: localizations .translate( i18.common @@ -144,11 +144,27 @@ class SideEffectsPageState extends LocalizedState { SideEffectsSubmitEvent( SideEffectModel( id: null, + additionalFields: + SideEffectAdditionalFields( + version: 1, + fields: [ + AdditionalField( + "boundaryCode", + RegistrationDeliverySingleton() + .boundary + ?.code), + ], + ), taskClientReferenceId: widget .tasks .last .clientReferenceId, + projectBeneficiaryClientReferenceId: + widget + .tasks + .last + .projectBeneficiaryClientReferenceId, projectId: RegistrationDeliverySingleton() .projectId, @@ -199,9 +215,11 @@ class SideEffectsPageState extends LocalizedState { rootNavigator: true, ).pop(true); }, - type: ButtonType.primary, - size: ButtonSize.large), - Button( + type: DigitButtonType + .primary, + size: DigitButtonSize + .large), + DigitButton( label: localizations .translate( i18.common @@ -212,38 +230,16 @@ class SideEffectsPageState extends LocalizedState { context, rootNavigator: true, ).pop(false), - type: - ButtonType.secondary, - size: ButtonSize.large) + type: DigitButtonType + .secondary, + size: + DigitButtonSize.large) ], ), ); if (shouldSubmit ?? false) { - final reloadState = context.read< - HouseholdOverviewBloc>(); - - Future.delayed( - const Duration( - milliseconds: 500), - () { - reloadState.add( - HouseholdOverviewReloadEvent( - projectId: - RegistrationDeliverySingleton() - .projectId!, - projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - ), - ); - }, - ).then((value) => - context.router.push( - HouseholdAcknowledgementRoute( - enableViewHousehold: true, - ), - )); + submitSideEffects(); } } else { setState(() { @@ -278,28 +274,33 @@ class SideEffectsPageState extends LocalizedState { Column( children: symptomTypesOptions .mapIndexed( - (i, e) => DigitCheckbox( - label: localizations - .translate( - e.key, + (i, e) => Padding( + padding: + const EdgeInsets + .all(spacer2), + child: DigitCheckbox( + label: localizations + .translate( + e.key, + ), + value: + symptomsValues[i], + onChanged: (value) { + stateSetter( + () { + symptomsValues[ + i] = + !symptomsValues[ + i]; + symptomsSelected = + symptomsValues + .any( + (e) => e, + ); + }, + ); + }, ), - value: - symptomsValues[i], - onChanged: (value) { - stateSetter( - () { - symptomsValues[ - i] = - !symptomsValues[ - i]; - symptomsSelected = - symptomsValues - .any( - (e) => e, - ); - }, - ); - }, ), ) .toList(), @@ -345,4 +346,25 @@ class SideEffectsPageState extends LocalizedState { ), ); } + + void submitSideEffects() async { + final reloadState = context.read(); + + Future.delayed( + const Duration(milliseconds: 500), + () { + reloadState.add( + HouseholdOverviewReloadEvent( + projectId: RegistrationDeliverySingleton().projectId!, + projectBeneficiaryType: + RegistrationDeliverySingleton().beneficiaryType!, + ), + ); + }, + ).then((value) => context.router.push( + HouseholdAcknowledgementRoute( + enableViewHousehold: true, + ), + )); + } } diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart index f886c21b0..726883908 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/household_acknowledgement.dart @@ -42,7 +42,7 @@ class HouseholdAcknowledgementPageState i18.acknowledgementSuccess.acknowledgementLabelText, ), actions: [ - Button( + DigitButton( label: localizations.translate( i18.householdDetails.viewHouseHoldDetailsAction, ), @@ -57,9 +57,9 @@ class HouseholdAcknowledgementPageState BeneficiaryWrapperRoute(wrapper: wrapper), ); }, - type: ButtonType.primary, - size: ButtonSize.large), - Button( + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( label: localizations .translate(i18.acknowledgementSuccess.actionLabelText), onPressed: () { @@ -70,8 +70,8 @@ class HouseholdAcknowledgementPageState // Pop twice to navigate back to the previous screen parent.popUntilRoot(); }, - type: ButtonType.secondary, - size: ButtonSize.large), + type: DigitButtonType.secondary, + size: DigitButtonSize.large), ], ); }, diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart index e91f7a386..a4bd2a8a4 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/past_delivery.dart @@ -14,19 +14,19 @@ import '../../../widgets/table_card/table_card.dart'; // This function builds a table with the given data and headers Widget buildTableContent( - DeliverInterventionState deliverInterventionState, - BuildContext context, - List? variant, - IndividualModel? individualModel, - HouseholdModel? householdModel, - ) { + DeliverInterventionState deliverInterventionState, + BuildContext context, + List? variant, + IndividualModel? individualModel, + HouseholdModel? householdModel, +) { // Calculate the current cycle. If deliverInterventionState.cycle is negative, set it to 0. final currentCycle = - deliverInterventionState.cycle >= 0 ? deliverInterventionState.cycle : 0; + deliverInterventionState.cycle >= 0 ? deliverInterventionState.cycle : 0; // Calculate the current dose. If deliverInterventionState.dose is negative, set it to 0. final currentDose = - deliverInterventionState.dose >= 0 ? deliverInterventionState.dose : 0; + deliverInterventionState.dose >= 0 ? deliverInterventionState.dose : 0; final localizations = RegistrationDeliveryLocalization.of(context); // Defining a list of table headers for resource popup @@ -36,7 +36,8 @@ Widget buildTableContent( cellValue: 'dose', ), DigitTableColumn( - header: localizations.translate(i18.beneficiaryDetails.beneficiaryResources), + header: + localizations.translate(i18.beneficiaryDetails.beneficiaryResources), cellValue: 'resources', ), ]; @@ -44,11 +45,12 @@ Widget buildTableContent( // Calculate the height of the container based on the number of items in the table final ProjectTypeModel projectType = - RegistrationDeliverySingleton().projectType!; + RegistrationDeliverySingleton().projectType!; final item = - projectType.cycles?[currentCycle - 1].deliveries?[currentDose - 1]; + projectType.cycles?[currentCycle - 1].deliveries?[currentDose - 1]; final productVariants = - fetchProductVariant(item, individualModel, householdModel)?.productVariants; + fetchProductVariant(item, individualModel, householdModel) + ?.productVariants; final numRows = productVariants?.length ?? 0; const rowHeight = 84; const paddingHeight = (spacer2 * 2); @@ -67,67 +69,76 @@ Widget buildTableContent( width: MediaQuery.of(context).size.width / 1.25, child: Column( crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, + // mainAxisSize: MainAxisSize.min, children: [ Padding( padding: const EdgeInsets.only(bottom: spacer1), child: DigitTableCard( + topPadding: const EdgeInsets.only(top: 0.0), + fraction: 2.5, element: { localizations.translate( i18.beneficiaryDetails.beneficiaryAge, - ): fetchProductVariant(item, individualModel, householdModel)?.condition != null - ? localizations.translate( - fetchProductVariant(item, individualModel, householdModel)!.condition!) + ): fetchProductVariant(item, individualModel, householdModel) + ?.condition != + null + ? localizations.translate(fetchProductVariant( + item, individualModel, householdModel)! + .condition!) : null, }, ), ), const DigitDivider(), // Build the DigitTable with the data - fetchProductVariant(item, individualModel, householdModel)?.productVariants != null - ? DigitTable( - enableBorder: true, - showSelectedState: false, - showPagination: false, - columns: columnListResource, - rows: [ - ...fetchProductVariant(item, individualModel, householdModel )! - .productVariants! - .map( - (e) { - // Retrieve the SKU value for the product variant. - final value = variant - ?.firstWhereOrNull( - (element) => element.id == e.productVariantId, - ) - ?.sku; - final quantity = e.quantity; + if (fetchProductVariant(item, individualModel, householdModel) + ?.productVariants != + null) + DigitTable( + enableBorder: true, + withRowDividers: true, + withColumnDividers: true, + showSelectedState: false, + showPagination: false, + columns: columnListResource, + rows: [ + ...fetchProductVariant(item, individualModel, householdModel)! + .productVariants! + .map( + (e) { + // Retrieve the SKU value for the product variant. + final value = variant + ?.firstWhereOrNull( + (element) => element.id == e.productVariantId, + ) + ?.sku; + final quantity = e.quantity; - return DigitTableRow( - tableRow: [ - // Display the dose information in the first column if it's the first row, - // otherwise, display an empty cell. + return DigitTableRow(tableRow: [ + // Display the dose information in the first column if it's the first row, + // otherwise, display an empty cell. - fetchProductVariant(item, individualModel, householdModel) - ?.productVariants - ?.indexOf(e) == - 0 - ? DigitTableData( - '${localizations.translate(i18.deliverIntervention.dose)} ${deliverInterventionState.dose}', - cellKey: 'dose', - ) - : DigitTableData('',cellKey: ''), - // Display the SKU value in the second column. - DigitTableData( - '$quantity - ${localizations.translate(value.toString())}', - cellKey: 'resources', - ), - ]); - }, - ), - ], - ) - : Text(localizations.translate(i18.common.noProjectSelected)) + fetchProductVariant(item, individualModel, householdModel) + ?.productVariants + ?.indexOf(e) == + 0 + ? DigitTableData( + '${localizations.translate(i18.deliverIntervention.dose)} ${deliverInterventionState.dose}', + cellKey: 'dose', + ) + : DigitTableData('', cellKey: ''), + // Display the SKU value in the second column. + DigitTableData( + '$quantity - ${localizations.translate(value.toString())}', + cellKey: 'resources', + ), + ]); + }, + ), + ], + ) + else + Text(localizations.translate(i18.common.noProjectSelected)) ], ), ); diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart index 1bb3edf52..e5c842a80 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/record_delivery_cycle.dart @@ -43,15 +43,18 @@ class RecordDeliveryCycleState extends LocalizedState { final headerList = [ DigitTableColumn( - header: localizations.translate(i18.beneficiaryDetails.beneficiaryDoseNo), + header: + localizations.translate(i18.beneficiaryDetails.beneficiaryDoseNo), cellValue: 'dose', ), DigitTableColumn( - header: localizations.translate(i18.beneficiaryDetails.beneficiaryStatus), + header: + localizations.translate(i18.beneficiaryDetails.beneficiaryStatus), cellValue: 'status', ), DigitTableColumn( - header: localizations.translate(i18.beneficiaryDetails.beneficiaryCompletedOn), + header: localizations + .translate(i18.beneficiaryDetails.beneficiaryCompletedOn), cellValue: 'completedOn', ), ]; // List of table headers for displaying cycle and dose information @@ -74,15 +77,15 @@ class RecordDeliveryCycleState extends LocalizedState { return Column(children: [ deliverState.hasCycleArrived ? buildCycleAndDoseTable( - widget.projectCycles - .where( - (e) => e.id == deliverState.cycle, - ) - .toList(), - headerList, - deliverState.dose - 1, - true, - ) + widget.projectCycles + .where( + (e) => e.id == deliverState.cycle, + ) + .toList(), + headerList, + deliverState.dose - 1, + true, + ) : const SizedBox.shrink(), if ((pastCycles ?? []).isNotEmpty) Column( @@ -93,11 +96,11 @@ class RecordDeliveryCycleState extends LocalizedState { return Column(children: [ isExpanded ? buildCycleAndDoseTable( - pastCycles ?? [], - headerList, - null, - false, - ) + pastCycles ?? [], + headerList, + null, + false, + ) : const Offstage(), SizedBox( width: MediaQuery.of(context).size.width, @@ -111,12 +114,12 @@ class RecordDeliveryCycleState extends LocalizedState { }, child: Row( mainAxisAlignment: - MainAxisAlignment.center, + MainAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: [ Padding( padding: - const EdgeInsets.symmetric( + const EdgeInsets.symmetric( horizontal: spacer2 / 2, ), child: TextButton( @@ -131,35 +134,38 @@ class RecordDeliveryCycleState extends LocalizedState { fontSize: spacer2 * 2, color: Theme.of(context) .colorTheme - .primary.primary1, + .primary + .primary1, ), isExpanded ? localizations.translate( - i18.deliverIntervention - .hidePastCycles, - ) + i18.deliverIntervention + .hidePastCycles, + ) : localizations.translate( - i18.deliverIntervention - .viewPastCycles, - ), + i18.deliverIntervention + .viewPastCycles, + ), ), ), ), !isExpanded ? Icon( - color: Theme.of(context) - .colorTheme - .primary.primary1, - Icons.keyboard_arrow_down, - size: 24, - ) + color: Theme.of(context) + .colorTheme + .primary + .primary1, + Icons.keyboard_arrow_down, + size: 24, + ) : Icon( - color: Theme.of(context) - .colorTheme - .primary.primary1, - Icons.keyboard_arrow_up, - size: 24, - ), + color: Theme.of(context) + .colorTheme + .primary + .primary1, + Icons.keyboard_arrow_up, + size: 24, + ), ], ), ), @@ -182,11 +188,11 @@ class RecordDeliveryCycleState extends LocalizedState { } Widget buildCycleAndDoseTable( - List cycles, - List headerList, - int? selectedIndex, - bool isCurrentCycle, - ) { + List cycles, + List headerList, + int? selectedIndex, + bool isCurrentCycle, + ) { final theme = DigitTheme.instance.mobileTheme; final widgetList = []; @@ -201,102 +207,99 @@ class RecordDeliveryCycleState extends LocalizedState { Padding( padding: isCurrentCycle ? const EdgeInsets.all(spacer2) - : const EdgeInsets.all( - spacer2 - ), + : const EdgeInsets.all(spacer2), child: Align( alignment: Alignment.centerLeft, child: Text( isCurrentCycle ? localizations - .translate(i18.beneficiaryDetails.currentCycleLabel) + .translate(i18.beneficiaryDetails.currentCycleLabel) : '${localizations.translate(i18.beneficiaryDetails.beneficiaryCycle)} ${e.id}', style: theme.textTheme.headlineLarge, textAlign: TextAlign.left, ), ), ), - DigitTable( - tableHeight: ((e.deliveries?.length ?? 0) + 1) * 57.5, - tableWidth: MediaQuery.of(context).size.width, - enableBorder: true, - showSelectedState: false, - showPagination: false, - highlightedRows: (selectedIndex!=null)?[selectedIndex]:[], - columns: headerList, - rows: e.deliveries!.mapIndexed( - (index, item) { - final tasks = widget.taskData - ?.where((element) => - element.additionalFields?.fields - .firstWhereOrNull( - (f) => - f.key == - AdditionalFieldsType.doseIndex - .toValue(), - ) - ?.value == - '0${item.id}' && - element.additionalFields?.fields - .firstWhereOrNull( - (c) => - c.key == - AdditionalFieldsType.cycleIndex - .toValue(), - ) - ?.value == - '0${e.id}') - .lastOrNull; + SizedBox( + width: MediaQuery.of(context).size.width, + height: ((e.deliveries?.length ?? 0) + 1) * 57.5, + child: DigitTable( + enableBorder: true, + withRowDividers: true, + withColumnDividers: true, + showSelectedState: false, + showPagination: false, + highlightedRows: (selectedIndex != null) ? [selectedIndex] : [], + columns: headerList, + rows: e.deliveries!.mapIndexed( + (index, item) { + final tasks = widget.taskData + ?.where((element) => + element.additionalFields?.fields + .firstWhereOrNull( + (f) => + f.key == + AdditionalFieldsType.doseIndex + .toValue(), + ) + ?.value == + '0${item.id}' && + element.additionalFields?.fields + .firstWhereOrNull( + (c) => + c.key == + AdditionalFieldsType.cycleIndex + .toValue(), + ) + ?.value == + '0${e.id}') + .lastOrNull; - return DigitTableRow(tableRow: [ - DigitTableData( - '${localizations.translate(i18.deliverIntervention.dose)} ${e.deliveries!.indexOf(item) + 1}', - cellKey: 'dose', - ), - DigitTableData( - localizations.translate( - index == selectedIndex - ? Status.toAdminister.toValue() - : tasks?.status ?? Status.inComplete.toValue(), + return DigitTableRow(tableRow: [ + DigitTableData( + '${localizations.translate(i18.deliverIntervention.dose)} ${e.deliveries!.indexOf(item) + 1}', + cellKey: 'dose', ), - cellKey: 'status', - style: TextStyle( - color: index == selectedIndex - ? null - : tasks?.status == - Status.administeredSuccess.toValue() - ? DigitTheme - .instance.colorScheme.onSurfaceVariant - : DigitTheme.instance.colorScheme.error, - fontWeight: - index == selectedIndex ? FontWeight.w700 : null, + DigitTableData( + localizations.translate( + index == selectedIndex + ? Status.toAdminister.toValue() + : tasks?.status ?? Status.inComplete.toValue(), + ), + cellKey: 'status', + style: TextStyle( + color: index == selectedIndex + ? null + : tasks?.status == + Status.administeredSuccess.toValue() + ? DigitTheme + .instance.colorScheme.onSurfaceVariant + : DigitTheme.instance.colorScheme.error, + fontWeight: + index == selectedIndex ? FontWeight.w700 : null, + ), ), - ), - DigitTableData( - tasks?.status == Status.administeredFailed.toValue() || - (tasks?.additionalFields?.fields - .where((e) => - e.key == - AdditionalFieldsType.deliveryStrategy - .toValue()) - .firstOrNull - ?.value == - DeliverStrategyType.indirect.toValue()) - ? ' -- ' - : tasks?.clientAuditDetails?.createdTime.toDateTime - .getFormattedDate() ?? - ' -- ', - cellKey: 'completedOn', - ), - ]); - }, - ).toList(), - ), - const SizedBox( - height: 16, - ), - const Divider( - thickness: 1.0, + DigitTableData( + tasks?.status == Status.administeredFailed.toValue() || + (tasks?.additionalFields?.fields + .where((e) => + e.key == + AdditionalFieldsType + .deliveryStrategy + .toValue()) + .firstOrNull + ?.value == + DeliverStrategyType.indirect.toValue()) + ? ' -- ' + : tasks?.clientAuditDetails?.createdTime.toDateTime + .getFormattedDate() ?? + ' -- ', + cellKey: 'completedOn', + ), + ]); + }, + ).toList(), + ), ), ], ), @@ -304,6 +307,7 @@ class RecordDeliveryCycleState extends LocalizedState { } return Column( + mainAxisSize: MainAxisSize.min, children: widgetList, ); } diff --git a/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart b/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart index 2b04ce656..71a8a21c0 100644 --- a/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart +++ b/packages/registration_delivery/lib/pages/beneficiary/widgets/splash_acknowledgement.dart @@ -7,8 +7,8 @@ import 'package:digit_ui_components/widgets/molecules/panel_cards.dart'; import 'package:flutter/material.dart'; import '../../../router/registration_delivery_router.gm.dart'; -import '../../../widgets/localized.dart'; import '../../../utils/i18_key_constants.dart' as i18; +import '../../../widgets/localized.dart'; @RoutePage() class SplashAcknowledgementPage extends LocalizedStatefulWidget { @@ -48,11 +48,12 @@ class SplashAcknowledgementPageState body: PanelCard( type: PanelType.success, actions: [ - Button( - label: localizations.translate(i18.acknowledgementSuccess.actionLabelText), - type: ButtonType.primary, - size: ButtonSize.large, - onPressed: (){ + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + onPressed: () { context.router.maybePop(); }, ), diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart index 47f067cf4..8914963de 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/beneficiary_acknowledgement.dart @@ -8,7 +8,6 @@ import '../../../utils/i18_key_constants.dart' as i18; import '../../../widgets/localized.dart'; import '../../blocs/search_households/search_bloc_common_wrapper.dart'; import '../../router/registration_delivery_router.gm.dart'; -import '../../utils/utils.dart'; @RoutePage() class BeneficiaryAcknowledgementPage extends LocalizedStatefulWidget { @@ -27,7 +26,6 @@ class BeneficiaryAcknowledgementPage extends LocalizedStatefulWidget { class BeneficiaryAcknowledgementPageState extends LocalizedState { - @override Widget build(BuildContext context) { return Scaffold( @@ -36,11 +34,11 @@ class BeneficiaryAcknowledgementPageState title: localizations .translate(i18.acknowledgementSuccess.acknowledgementLabelText), actions: [ - Button( + DigitButton( label: localizations.translate( i18.householdDetails.viewHouseHoldDetailsAction, ), - onPressed: (){ + onPressed: () { final bloc = context.read(); context.router.popAndPush( @@ -49,15 +47,14 @@ class BeneficiaryAcknowledgementPageState ), ); }, - type: ButtonType.primary, - size: ButtonSize.large - ), - Button( - label: localizations.translate(i18.acknowledgementSuccess.actionLabelText), - onPressed: ()=>context.router.maybePop(), - type: ButtonType.secondary, - size: ButtonSize.large - ), + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations + .translate(i18.acknowledgementSuccess.actionLabelText), + onPressed: () => context.router.maybePop(), + type: DigitButtonType.secondary, + size: DigitButtonSize.large), ], description: localizations.translate( i18.acknowledgementSuccess.acknowledgementDescriptionText, diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart index e27689640..34ab06d1e 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/house_details.dart @@ -36,8 +36,6 @@ class HouseDetailsPageState extends LocalizedState { @override void initState() { - final registrationState = context.read().state; - super.initState(); } @@ -55,7 +53,7 @@ class HouseDetailsPageState extends LocalizedState { BeneficiaryRegistrationState>( builder: (context, registrationState) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -65,69 +63,118 @@ class HouseDetailsPageState extends LocalizedState { ], ), footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: - const EdgeInsets.all(spacer2), - children: [Button( - onPressed: () { - form.markAllAsTouched(); - if (form.control(_householdStructureKey).value == - null) { - setState(() { - form - .control(_householdStructureKey) - .setErrors({'': true}); - }); - } + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + onPressed: () { + form.markAllAsTouched(); + if (form.control(_householdStructureKey).value == + null) { + setState(() { + form + .control(_householdStructureKey) + .setErrors({'': true}); + }); + } - if (!form.valid) return; - selectedHouseStructureTypes = - form.control(_householdStructureKey).value; + if (!form.valid) return; + selectedHouseStructureTypes = + form.control(_householdStructureKey).value; - final noOfRooms = - form.control(_noOfRoomsKey).value as int; - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - address, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) { - var houseModel = HouseholdModel( - clientReferenceId: IdGen.i.identifier, - tenantId: - RegistrationDeliverySingleton().tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - ), - memberCount: householdModel?.memberCount, - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: - context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - additionalFields: HouseholdAdditionalFields( - version: 1, - fields: [ + final noOfRooms = + form.control(_noOfRoomsKey).value as int; + registrationState.maybeWhen( + orElse: () { + return; + }, + create: ( + address, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) { + var houseModel = HouseholdModel( + clientReferenceId: IdGen.i.identifier, + tenantId: RegistrationDeliverySingleton() + .tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + ), + memberCount: householdModel?.memberCount, + clientAuditDetails: ClientAuditDetails( + createdBy: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + additionalFields: + HouseholdAdditionalFields( + version: 1, + fields: [ + ...?householdModel + ?.additionalFields?.fields + .where((e) => + e.key != + AdditionalFieldsType + .houseStructureTypes + .toValue() && + e.key != + AdditionalFieldsType + .noOfRooms + .toValue()), + AdditionalField( + AdditionalFieldsType + .houseStructureTypes + .toValue(), + selectedHouseStructureTypes + ?.join("|") + .toString(), + ), + AdditionalField( + AdditionalFieldsType.noOfRooms + .toValue(), + noOfRooms, + ) + ])); + + bloc.add( + BeneficiaryRegistrationSaveHouseDetailsEvent( + model: houseModel, + ), + ); + router.push(HouseHoldDetailsRoute()); + }, + editHousehold: ( + address, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + headOfHousehold, + ) { + var houseModel = householdModel.copyWith( + additionalFields: + HouseholdAdditionalFields( + version: 1, + fields: [ ...?householdModel - ?.additionalFields?.fields + .additionalFields?.fields .where((e) => e.key != AdditionalFieldsType @@ -151,73 +198,32 @@ class HouseDetailsPageState extends LocalizedState { noOfRooms, ) ])); + // TODO [Linking of Voucher for Household based project need to be handled] - bloc.add( - BeneficiaryRegistrationSaveHouseDetailsEvent( - model: houseModel, - ), - ); - router.push(HouseHoldDetailsRoute()); - }, - editHousehold: ( - address, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - headOfHousehold, - ) { - var houseModel = householdModel.copyWith( - additionalFields: HouseholdAdditionalFields( - version: 1, - fields: [ - ...?householdModel.additionalFields?.fields - .where((e) => - e.key != - AdditionalFieldsType - .houseStructureTypes - .toValue() && - e.key != - AdditionalFieldsType.noOfRooms - .toValue()), - AdditionalField( - AdditionalFieldsType.houseStructureTypes - .toValue(), - selectedHouseStructureTypes - ?.join("|") - .toString(), + bloc.add( + BeneficiaryRegistrationSaveHouseDetailsEvent( + model: houseModel, ), - AdditionalField( - AdditionalFieldsType.noOfRooms.toValue(), - noOfRooms, - ) - ])); - // TODO [Linking of Voucher for Household based project need to be handled] - - bloc.add( - BeneficiaryRegistrationSaveHouseDetailsEvent( - model: houseModel, - ), + ); + router.push(HouseHoldDetailsRoute()); + }, ); - router.push(HouseHoldDetailsRoute()); }, - ); - }, - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - label: localizations.translate( - i18.householdLocation.actionLabel, - ), - ),] - ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + label: localizations.translate( + i18.householdLocation.actionLabel, + ), + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - children: [ - Padding( - padding: const EdgeInsets.all(spacer2), + margin: const EdgeInsets.all(spacer2), + children: [ + Padding( + padding: const EdgeInsets.all(0), child: Text( localizations.translate( i18.householdDetails.houseDetailsLabel, @@ -227,6 +233,7 @@ class HouseDetailsPageState extends LocalizedState { ), houseShowcaseData.typeOfStructure.buildWith( child: SelectionCard( + showParentContainer: true, isRequired: true, title: localizations.translate( i18.householdDetails.typeOfStructure), @@ -235,15 +242,22 @@ class HouseDetailsPageState extends LocalizedState { options: RegistrationDeliverySingleton() .houseStructureTypes ?? [], - initialSelection: form.control(_householdStructureKey).value!= null ? [...form.control(_householdStructureKey).value ] : [], + initialSelection: + form.control(_householdStructureKey).value != + null + ? [ + ...form + .control(_householdStructureKey) + .value + ] + : [], onSelectionChanged: (values) { form .control(_householdStructureKey) .markAsTouched(); if (values.isEmpty) { - form - .control(_householdStructureKey) - .value = null; + form.control(_householdStructureKey).value = + null; setState(() { form .control(_householdStructureKey) @@ -251,9 +265,8 @@ class HouseDetailsPageState extends LocalizedState { }); } else { setState(() { - form - .control(_householdStructureKey) - .value = values; + form.control(_householdStructureKey).value = + values; }); } }, @@ -267,8 +280,7 @@ class HouseDetailsPageState extends LocalizedState { form .control(_householdStructureKey) .touched - ? localizations.translate(i18 - .householdDetails + ? localizations.translate(i18.householdDetails .selectStructureTypeError) : null, ), @@ -276,23 +288,27 @@ class HouseDetailsPageState extends LocalizedState { houseShowcaseData.noOfRooms.buildWith( child: ReactiveWrapperField( formControlName: _noOfRoomsKey, - builder:(field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdDetails.noOfRoomsLabel, ), child: DigitNumericFormInput( minValue: 1, maxValue: 20, - initialValue: form.control(_noOfRoomsKey).value.toString(), + initialValue: form + .control(_noOfRoomsKey) + .value + .toString(), step: 1, - onChange: (value){ - form.control(_noOfRoomsKey).value=int.parse(value); + onChange: (value) { + form.control(_noOfRoomsKey).value = + int.parse(value); }, ), ), ), - ),] - ), + ), + ]), ), ], ); diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart index c4946bafe..0889fccdc 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/household_details.dart @@ -54,32 +54,27 @@ class HouseHoldDetailsPageState extends LocalizedState { builder: (context, form, child) { int pregnantWomen = form.control(_pregnantWomenCountKey).value; int children = form.control(_childrenCountKey).value; - int memberCount = form.control(_memberCountKey).value; return BlocConsumer( listener: (context, state) { - if (state is BeneficiaryRegistrationPersistedState && state.isEdit) { - final overviewBloc = - context.read(); + if (state is BeneficiaryRegistrationPersistedState && + state.isEdit) { + final overviewBloc = context.read(); overviewBloc.add( HouseholdOverviewReloadEvent( - projectId: RegistrationDeliverySingleton() - .projectId - .toString(), + projectId: + RegistrationDeliverySingleton().projectId.toString(), projectBeneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType ?? - BeneficiaryType.household, + RegistrationDeliverySingleton().beneficiaryType ?? + BeneficiaryType.household, ), ); HouseholdMemberWrapper memberWrapper = overviewBloc.state.householdMemberWrapper; final route = router.parent() as StackRouter; - route.popUntilRouteWithName( - SearchBeneficiaryRoute.name); - route.push(BeneficiaryWrapperRoute( - wrapper: memberWrapper)); + route.popUntilRouteWithName(SearchBeneficiaryRoute.name); + route.push(BeneficiaryWrapperRoute(wrapper: memberWrapper)); } }, builder: (context, registrationState) { @@ -90,284 +85,297 @@ class HouseHoldDetailsPageState extends LocalizedState { showcaseButton: ShowcaseButton(), ), ]), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), - children: [Button( - label: registrationState.mapOrNull( - editHousehold: (value) => localizations - .translate(i18.common.coreCommonSave), - ) ?? - localizations - .translate(i18.householdDetails.actionLabel), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () { - form.markAllAsTouched(); - if (!form.valid) return; + margin: const EdgeInsets.only(top: spacer2), + children: [ + DigitButton( + label: registrationState.mapOrNull( + editHousehold: (value) => localizations + .translate(i18.common.coreCommonSave), + ) ?? + localizations + .translate(i18.householdDetails.actionLabel), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + 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; - //[TODO: Use pregnant women form value based on project config - final pregnantWomen = - form.control(_pregnantWomenCountKey).value as int; - final children = - form.control(_childrenCountKey).value as int; + final dateOfRegistration = form + .control(_dateOfRegistrationKey) + .value as DateTime; + //[TODO: Use pregnant women form value based on project config + final pregnantWomen = + form.control(_pregnantWomenCountKey).value as int; + final children = + form.control(_childrenCountKey).value as int; - if (memberCount < (pregnantWomen + children)) { - Toast.showToast( - context, - message: localizations.translate( + if (memberCount < (pregnantWomen + children)) { + Toast.showToast(context, + message: localizations.translate( i18.householdDetails.memberCountError), - type: ToastType.error - ); - } else { - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - addressModel, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - searchQuery, - loading, - isHeadOfHousehold, - ) { - var household = householdModel; - household ??= HouseholdModel( - tenantId: - RegistrationDeliverySingleton().tenantId, - clientReferenceId: - householdModel?.clientReferenceId ?? - IdGen.i.identifier, - rowVersion: 1, - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - ); + type: ToastType.error); + } else { + registrationState.maybeWhen( + orElse: () { + return; + }, + create: ( + addressModel, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + searchQuery, + loading, + isHeadOfHousehold, + ) { + var household = householdModel; + household ??= HouseholdModel( + tenantId: + RegistrationDeliverySingleton().tenantId, + clientReferenceId: + householdModel?.clientReferenceId ?? + IdGen.i.identifier, + rowVersion: 1, + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + ); - household = household.copyWith( - rowVersion: 1, - tenantId: - RegistrationDeliverySingleton().tenantId, - clientReferenceId: - householdModel?.clientReferenceId ?? - IdGen.i.identifier, - memberCount: memberCount, - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid - .toString(), - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() + household = household.copyWith( + rowVersion: 1, + tenantId: RegistrationDeliverySingleton() + .tenantId, + clientReferenceId: + householdModel?.clientReferenceId ?? + IdGen.i.identifier, + memberCount: memberCount, + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() .loggedInUserUuid .toString(), - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid - .toString(), - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: - RegistrationDeliverySingleton() + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid + .toString(), + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() .loggedInUserUuid .toString(), - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - address: addressModel, - additionalFields: HouseholdAdditionalFields( - version: 1, - fields: [ - //[TODO: Use pregnant women form value based on project config - ...?householdModel - ?.additionalFields?.fields - .where((e) => - e.key != - AdditionalFieldsType - .pregnantWomen - .toValue() && - e.key != - AdditionalFieldsType.children - .toValue()), - AdditionalField( - AdditionalFieldsType.pregnantWomen - .toValue(), - pregnantWomen, - ), - AdditionalField( - AdditionalFieldsType.children.toValue(), - children, - ) - ])); + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid + .toString(), + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + address: addressModel, + additionalFields: HouseholdAdditionalFields( + version: 1, + fields: [ + //[TODO: Use pregnant women form value based on project config + ...?householdModel + ?.additionalFields?.fields + .where((e) => + e.key != + AdditionalFieldsType + .pregnantWomen + .toValue() && + e.key != + AdditionalFieldsType + .children + .toValue()), + AdditionalField( + AdditionalFieldsType.pregnantWomen + .toValue(), + pregnantWomen, + ), + AdditionalField( + AdditionalFieldsType.children + .toValue(), + children, + ) + ])); - bloc.add( - BeneficiaryRegistrationSaveHouseholdDetailsEvent( - household: household, - registrationDate: dateOfRegistration, - ), - ); - context.router.push( - IndividualDetailsRoute(isHeadOfHousehold: true), - ); - }, - editHousehold: ( - addressModel, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - isHeadOfHousehold, - ) { - 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: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: DateTime.now() - .millisecondsSinceEpoch, - ) - : null, - rowVersion: householdModel.rowVersion, - additionalFields: HouseholdAdditionalFields( - version: householdModel - .additionalFields?.version ?? - 1, - fields: [ - //[TODO: Use pregnant women form value based on project config - ...?householdModel - .additionalFields?.fields - .where((e) => - e.key != - AdditionalFieldsType - .pregnantWomen - .toValue() && - e.key != - AdditionalFieldsType.children - .toValue()), - AdditionalField( - AdditionalFieldsType.pregnantWomen - .toValue(), - pregnantWomen, - ), - AdditionalField( - AdditionalFieldsType.children.toValue(), - children, - ) - ])); + bloc.add( + BeneficiaryRegistrationSaveHouseholdDetailsEvent( + household: household, + registrationDate: dateOfRegistration, + ), + ); + context.router.push( + IndividualDetailsRoute( + isHeadOfHousehold: true), + ); + }, + editHousehold: ( + addressModel, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + isHeadOfHousehold, + ) { + 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: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: DateTime.now() + .millisecondsSinceEpoch, + ) + : null, + rowVersion: householdModel.rowVersion, + additionalFields: HouseholdAdditionalFields( + version: householdModel + .additionalFields?.version ?? + 1, + fields: [ + //[TODO: Use pregnant women form value based on project config + ...?householdModel + .additionalFields?.fields + .where((e) => + e.key != + AdditionalFieldsType + .pregnantWomen + .toValue() && + e.key != + AdditionalFieldsType + .children + .toValue()), + AdditionalField( + AdditionalFieldsType.pregnantWomen + .toValue(), + pregnantWomen, + ), + AdditionalField( + AdditionalFieldsType.children + .toValue(), + children, + ) + ])); - 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: - RegistrationDeliverySingleton() - .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: - RegistrationDeliverySingleton() - .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: + RegistrationDeliverySingleton() + .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: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ) + : null, + ), + ), + ); + }, ); - - }, - ); - } - }, - ),] - ), + } + }, + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - children: [ - DigitTextBlock( - padding: const EdgeInsets.all(spacer2), - heading: localizations.translate( - i18.householdDetails.householdDetailsLabel, - ), - description: localizations.translate( - i18.householdDetails.householdDetailsDescription, + margin: const EdgeInsets.all(spacer2), + children: [ + DigitTextBlock( + padding: const EdgeInsets.all(0), + heading: localizations.translate( + i18.householdDetails.householdDetailsLabel, + ), + description: localizations.translate( + i18.householdDetails.householdDetailsDescription, ), ), - householdDetailsShowcaseData.dateOfRegistration - .buildWith( + householdDetailsShowcaseData.dateOfRegistration.buildWith( child: ReactiveWrapperField( formControlName: _dateOfRegistrationKey, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdDetails.dateOfRegistrationLabel, ), @@ -379,8 +387,12 @@ class HouseHoldDetailsPageState extends LocalizedState { cancelText: localizations.translate( i18.common.coreCommonCancel, ), - initialValue: DateFormat(Constants().dateMonthYearFormat) - .format(form.control(_dateOfRegistrationKey).value).toString(), + initialValue: + DateFormat(Constants().dateMonthYearFormat) + .format(form + .control(_dateOfRegistrationKey) + .value) + .toString(), ), ), ), @@ -391,21 +403,23 @@ class HouseHoldDetailsPageState extends LocalizedState { .buildWith( child: ReactiveWrapperField( formControlName: _pregnantWomenCountKey, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( - i18.householdDetails - .noOfPregnantWomenCountLabel, + i18.householdDetails.noOfPregnantWomenCountLabel, ), child: DigitNumericFormInput( minValue: 0, maxValue: 10, step: 1, - initialValue: form.control(_pregnantWomenCountKey).value.toString(), + initialValue: form + .control(_pregnantWomenCountKey) + .value + .toString(), onChange: (value) { - form.control(_pregnantWomenCountKey).value=int.parse(value); - int pregnantWomen = form - .control(_pregnantWomenCountKey) - .value; + form.control(_pregnantWomenCountKey).value = + int.parse(value); + int pregnantWomen = + form.control(_pregnantWomenCountKey).value; int children = form.control(_childrenCountKey).value; int memberCount = @@ -424,21 +438,23 @@ class HouseHoldDetailsPageState extends LocalizedState { .buildWith( child: ReactiveWrapperField( formControlName: _childrenCountKey, - builder: (field)=>LabeledField( + builder: (field) => LabeledField( label: localizations.translate( - i18.householdDetails - .noOfChildrenBelow5YearsLabel, + i18.householdDetails.noOfChildrenBelow5YearsLabel, ), child: DigitNumericFormInput( minValue: 0, maxValue: 20, step: 1, - initialValue: form.control(_childrenCountKey).value.toString(), + initialValue: form + .control(_childrenCountKey) + .value + .toString(), onChange: (value) { - form.control(_childrenCountKey).value=int.parse(value); - int pregnantWomen = form - .control(_pregnantWomenCountKey) - .value; + form.control(_childrenCountKey).value = + int.parse(value); + int pregnantWomen = + form.control(_pregnantWomenCountKey).value; int children = form.control(_childrenCountKey).value; int memberCount = @@ -457,7 +473,7 @@ class HouseHoldDetailsPageState extends LocalizedState { .buildWith( child: ReactiveWrapperField( formControlName: _memberCountKey, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdDetails.noOfMembersCountLabel, ), @@ -467,12 +483,15 @@ class HouseHoldDetailsPageState extends LocalizedState { : 1, maxValue: 30, step: 1, - initialValue: form.control(_memberCountKey).value.toString(), + initialValue: form + .control(_memberCountKey) + .value + .toString(), onChange: (value) { - form.control(_memberCountKey).value=int.parse(value); - int pregnantWomen = form - .control(_pregnantWomenCountKey) - .value; + form.control(_memberCountKey).value = + int.parse(value); + int pregnantWomen = + form.control(_pregnantWomenCountKey).value; int children = form.control(_childrenCountKey).value; int memberCount = @@ -486,8 +505,8 @@ class HouseHoldDetailsPageState extends LocalizedState { ), ), ), - const SizedBox(height: 16),] - ), + const SizedBox(height: 16), + ]), ), ], ); diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart index ab80f99dc..a8b251f03 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/household_location.dart @@ -1,8 +1,9 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_data_model/models/entities/address_type.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/component_utils.dart'; import 'package:digit_ui_components/widgets/atoms/text_block.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; @@ -107,7 +108,7 @@ class HouseholdLocationPageState extends LocalizedState { : true; }, child: ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column( children: [ BackNavigationHelpHeaderWidget( @@ -117,155 +118,159 @@ class HouseholdLocationPageState extends LocalizedState { ], ), footer: DigitCard( - margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), - children: [BlocBuilder( - builder: (context, locationState) { - return Button( - label: localizations.translate( - i18.householdLocation.actionLabel, - ), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () { - form.markAllAsTouched(); - if (!form.valid) return; + margin: const EdgeInsets.only(top: spacer2), + children: [ + BlocBuilder( + builder: (context, locationState) { + return DigitButton( + label: localizations.translate( + i18.householdLocation.actionLabel, + ), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + 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?; - registrationState.maybeWhen( - orElse: () { - return; - }, - create: ( - address, - householdModel, - individualModel, - projectBeneficiaryModel, - 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 + 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, + projectBeneficiaryModel, + 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: RegistrationDeliverySingleton() - .boundary! - .code!, - name: RegistrationDeliverySingleton() - .boundary! - .name, - ), - tenantId: - RegistrationDeliverySingleton().tenantId, - rowVersion: 1, - auditDetails: AuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - ), - clientAuditDetails: ClientAuditDetails( - createdBy: RegistrationDeliverySingleton() - .loggedInUserUuid!, - createdTime: context.millisecondsSinceEpoch(), - lastModifiedBy: RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: - context.millisecondsSinceEpoch(), - ), - ); + 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: RegistrationDeliverySingleton() + .boundary! + .code!, + name: RegistrationDeliverySingleton() + .boundary! + .name, + ), + tenantId: + RegistrationDeliverySingleton().tenantId, + rowVersion: 1, + auditDetails: AuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + ), + clientAuditDetails: ClientAuditDetails( + createdBy: RegistrationDeliverySingleton() + .loggedInUserUuid!, + createdTime: + context.millisecondsSinceEpoch(), + lastModifiedBy: + RegistrationDeliverySingleton() + .loggedInUserUuid, + lastModifiedTime: + context.millisecondsSinceEpoch(), + ), + ); - bloc.add( - BeneficiaryRegistrationSaveAddressEvent( - addressModel, - ), - ); - router.push(HouseDetailsRoute()); - }, - editHousehold: ( - address, - householdModel, - individuals, - registrationDate, - projectBeneficiaryModel, - loading, - headOfHousehold, - ) { - 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 + bloc.add( + BeneficiaryRegistrationSaveAddressEvent( + addressModel, + ), + ); + router.push(HouseDetailsRoute()); + }, + editHousehold: ( + address, + householdModel, + individuals, + registrationDate, + projectBeneficiaryModel, + loading, + headOfHousehold, + ) { + 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] + 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, - ), + bloc.add( + BeneficiaryRegistrationSaveAddressEvent( + addressModel, + ), + ); + router.push(HouseDetailsRoute()); + }, ); - router.push(HouseDetailsRoute()); }, ); }, - ); - }, - ),] - ), + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( - children: [ - DigitTextBlock( + margin: const EdgeInsets.all(spacer2), + children: [ + DigitTextBlock( padding: const EdgeInsets.only(top: spacer2), heading: localizations.translate( i18.householdLocation.householdLocationLabelText, @@ -274,27 +279,27 @@ class HouseholdLocationPageState extends LocalizedState { i18.householdLocation .householdLocationDescriptionText, )), - householdLocationShowcaseData.administrativeArea - .buildWith( + householdLocationShowcaseData.administrativeArea.buildWith( child: ReactiveWrapperField( formControlName: _administrationAreaKey, validationMessages: { 'required': (_) => localizations.translate( - i18.householdLocation - .administrationAreaRequiredValidation, - ), + i18.householdLocation + .administrationAreaRequiredValidation, + ), }, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( - i18.householdLocation - .administrationAreaFormLabel, + i18.householdLocation.administrationAreaFormLabel, ), child: DigitTextFormInput( readOnly: true, errorMessage: field.errorText, - initialValue: form.control(_administrationAreaKey).value, - onChange: (value){ - form.control(_administrationAreaKey).value=value; + initialValue: + form.control(_administrationAreaKey).value, + onChange: (value) { + form.control(_administrationAreaKey).value = + value; }, ), ), @@ -305,17 +310,18 @@ class HouseholdLocationPageState extends LocalizedState { formControlName: _accuracyKey, validationMessages: { 'required': (_) => localizations.translate( - i18.common.corecommonRequired, - ), + i18.common.corecommonRequired, + ), }, - builder: (field)=>LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdLocation.gpsAccuracyLabel, ), child: DigitTextFormInput( readOnly: true, errorMessage: field.errorText, - initialValue: form.control(_accuracyKey).value.toString(), + initialValue: + form.control(_accuracyKey).value.toString(), ), ), ), @@ -325,21 +331,21 @@ class HouseholdLocationPageState extends LocalizedState { formControlName: _addressLine1Key, validationMessages: { 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), + i18.common.min2CharsRequired, + ), 'maxLength': (object) => localizations .translate(i18.common.maxCharsRequired) .replaceAll('{}', maxLength.toString()), }, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdLocation .householdAddressLine1LabelText, ), child: DigitTextFormInput( errorMessage: field.errorText, - onChange: (value){ - form.control(_addressLine1Key).value=value; + onChange: (value) { + form.control(_addressLine1Key).value = value; }, initialValue: form.control(_addressLine1Key).value, ), @@ -351,21 +357,21 @@ class HouseholdLocationPageState extends LocalizedState { formControlName: _addressLine2Key, validationMessages: { 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), + i18.common.min2CharsRequired, + ), 'maxLength': (object) => localizations .translate(i18.common.maxCharsRequired) .replaceAll('{}', maxLength.toString()), }, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdLocation .householdAddressLine2LabelText, ), child: DigitTextFormInput( errorMessage: field.errorText, - onChange: (value){ - form.control(_addressLine2Key).value=value; + onChange: (value) { + form.control(_addressLine2Key).value = value; }, initialValue: form.control(_addressLine2Key).value, ), @@ -377,20 +383,20 @@ class HouseholdLocationPageState extends LocalizedState { formControlName: _landmarkKey, validationMessages: { 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), + i18.common.min2CharsRequired, + ), 'maxLength': (object) => localizations .translate(i18.common.maxCharsRequired) .replaceAll('{}', maxLength.toString()), }, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdLocation.landmarkFormLabel, ), child: DigitTextFormInput( errorMessage: field.errorText, - onChange: (value){ - form.control(_landmarkKey).value=value; + onChange: (value) { + form.control(_landmarkKey).value = value; }, initialValue: form.control(_landmarkKey).value, ), @@ -402,13 +408,13 @@ class HouseholdLocationPageState extends LocalizedState { formControlName: _postalCodeKey, validationMessages: { 'required': (_) => localizations.translate( - i18.common.min2CharsRequired, - ), + i18.common.min2CharsRequired, + ), 'maxLength': (object) => localizations .translate(i18.common.maxCharsRequired) .replaceAll('{}', '6'), }, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.householdLocation.postalCodeFormLabel, ), @@ -418,16 +424,16 @@ class HouseholdLocationPageState extends LocalizedState { FilteringTextInputFormatter.digitsOnly, ], errorMessage: field.errorText, - onChange: (value){ - form.control(_postalCodeKey).value=value; + onChange: (value) { + form.control(_postalCodeKey).value = value; }, maxLength: 6, initialValue: form.control(_postalCodeKey).value, ), ), ), - ),] - ), + ), + ]), ), ], ), @@ -444,35 +450,37 @@ class HouseholdLocationPageState extends LocalizedState { return fb.group({ _administrationAreaKey: FormControl( - value: localizations.translate( - RegistrationDeliverySingleton().boundary!.code ?? ''), + value: localizations + .translate(RegistrationDeliverySingleton().boundary!.code ?? ''), validators: [Validators.required], ), _addressLine1Key: FormControl(value: addressModel?.addressLine1, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(64), ]), _addressLine2Key: FormControl( value: addressModel?.addressLine2, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(64), ], ), _landmarkKey: FormControl(value: addressModel?.landmark, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(64), ]), _postalCodeKey: FormControl(value: addressModel?.pincode, validators: [ - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(6), ]), - _latKey: FormControl(value: addressModel?.latitude, validators: [ - CustomValidator.requiredMin, - ]), + _latKey: FormControl(value: addressModel?.latitude), _lngKey: FormControl( value: addressModel?.longitude, ), diff --git a/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart b/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart index a77e1f777..93f41c144 100644 --- a/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart +++ b/packages/registration_delivery/lib/pages/beneficiary_registration/individual_details.dart @@ -5,7 +5,8 @@ import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; -import 'package:digit_ui_components/widgets/atoms/dob_picker.dart'; +import 'package:digit_ui_components/utils/date_utils.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_dob_picker.dart'; import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; @@ -75,15 +76,15 @@ class IndividualDetailsPageState extends LocalizedState { overviewBloc.add( HouseholdOverviewReloadEvent( projectId: - RegistrationDeliverySingleton().projectId.toString(), + RegistrationDeliverySingleton().projectId.toString(), projectBeneficiaryType: - RegistrationDeliverySingleton().beneficiaryType ?? - BeneficiaryType.household, + RegistrationDeliverySingleton().beneficiaryType ?? + BeneficiaryType.household, ), ); await overviewBloc.stream.firstWhere((element) => - element.loading == false && + element.loading == false && element.householdMemberWrapper.household != null); HouseholdMemberWrapper memberWrapper = overviewBloc.state.householdMemberWrapper; @@ -96,7 +97,7 @@ class IndividualDetailsPageState extends LocalizedState { }, builder: (context, state) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: const Column(children: [ BackNavigationHelpHeaderWidget( showHelp: false, @@ -105,45 +106,49 @@ class IndividualDetailsPageState extends LocalizedState { ]), footer: DigitCard( margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), - children: [ValueListenableBuilder( - valueListenable: clickedStatus, - builder: (context, bool isClicked, _) { - return Button( - label: state.mapOrNull( - editIndividual: (value) => localizations - .translate(i18.common.coreCommonSave), - ) ?? - localizations - .translate(i18.common.coreCommonSubmit), - type: ButtonType.primary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () async { - if(form.control(_dobKey).value==null){ - form.control(_dobKey).setErrors({'':true}); - } - if (form.control(_idTypeKey).value == null) { - form.control(_idTypeKey).setErrors({'': true}); - } - if (form.control(_genderKey).value == null) { - setState(() { - form.control(_genderKey).setErrors({'': true}); - }); - } - final userId = - RegistrationDeliverySingleton().loggedInUserUuid; - final projectId = - RegistrationDeliverySingleton().projectId; - form.markAllAsTouched(); - if (!form.valid) return; - FocusManager.instance.primaryFocus?.unfocus(); + children: [ + ValueListenableBuilder( + valueListenable: clickedStatus, + builder: (context, bool isClicked, _) { + return DigitButton( + label: state.mapOrNull( + editIndividual: (value) => localizations + .translate(i18.common.coreCommonSave), + ) ?? + localizations + .translate(i18.common.coreCommonSubmit), + type: DigitButtonType.primary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () async { + final age = DigitDateUtils.calculateAge( + form.control(_dobKey).value as DateTime, + ); + if ((age.years == 0 && age.months == 0) || + age.years >= 150 && age.months > 0) { + form.control(_dobKey).setErrors({'': true}); + } + if (form.control(_idTypeKey).value == null) { + form.control(_idTypeKey).setErrors({'': true}); + } + if (form.control(_genderKey).value == null) { + setState(() { + form.control(_genderKey).setErrors({'': true}); + }); + } + final userId = RegistrationDeliverySingleton() + .loggedInUserUuid; + final projectId = + RegistrationDeliverySingleton().projectId; + form.markAllAsTouched(); + if (!form.valid) return; + FocusManager.instance.primaryFocus?.unfocus(); - state.maybeWhen( - orElse: () { - return; - }, - create: ( + state.maybeWhen( + orElse: () { + return; + }, + create: ( addressModel, householdModel, individualModel, @@ -152,498 +157,531 @@ class IndividualDetailsPageState extends LocalizedState { searchQuery, loading, isHeadOfHousehold, - ) async { - final individual = _getIndividualModel( - context, - form: form, - oldIndividual: null, - ); - - final boundary = - RegistrationDeliverySingleton().boundary; + ) async { + final individual = _getIndividualModel( + context, + form: form, + oldIndividual: null, + ); - bloc.add( - BeneficiaryRegistrationSaveIndividualDetailsEvent( - model: individual, - isHeadOfHousehold: widget.isHeadOfHousehold, - ), - ); - final scannerBloc = - context.read(); + final boundary = + RegistrationDeliverySingleton().boundary; - if (scannerBloc.state.duplicate) { - Toast.showToast( - context, - message: localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - type: ToastType.error - ); - } else { - clickedStatus.value = true; - final scannerBloc = - context.read(); bloc.add( - BeneficiaryRegistrationSummaryEvent( - projectId: projectId!, - userUuid: userId!, - boundary: boundary!, - tag: scannerBloc.state.qrCodes.isNotEmpty - ? scannerBloc.state.qrCodes.first - : null, + BeneficiaryRegistrationSaveIndividualDetailsEvent( + model: individual, + isHeadOfHousehold: widget.isHeadOfHousehold, ), ); - router.push(SummaryRoute()); - } - }, - editIndividual: ( + final scannerBloc = + context.read(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), + ); + + if (scannerBloc.state.duplicate) { + Toast.showToast(context, + message: localizations.translate( + i18.deliverIntervention + .resourceAlreadyScanned, + ), + type: ToastType.error); + } else { + clickedStatus.value = true; + final scannerBloc = + context.read(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), + ); + bloc.add( + BeneficiaryRegistrationSummaryEvent( + projectId: projectId!, + userUuid: userId!, + boundary: boundary!, + tag: scannerBloc.state.qrCodes.isNotEmpty + ? scannerBloc.state.qrCodes.first + : null, + ), + ); + router.push(SummaryRoute()); + } + }, + 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) { - Toast.showToast( - context, - message: localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - type: ToastType.error + ) { + final scannerBloc = + context.read(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), ); - } else { - bloc.add( - BeneficiaryRegistrationUpdateIndividualDetailsEvent( - addressModel: addressModel, - householdModel: householdModel, - model: individual.copyWith( - clientAuditDetails: (individual - .clientAuditDetails - ?.createdBy != - null && - individual.clientAuditDetails - ?.createdTime != - null) - ? ClientAuditDetails( - createdBy: individual - .clientAuditDetails!.createdBy, - createdTime: individual - .clientAuditDetails! - .createdTime, - lastModifiedBy: - RegistrationDeliverySingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ) - : null, - ), - tag: scannerBloc.state.qrCodes.isNotEmpty - ? scannerBloc.state.qrCodes.first - : null, - ), + final individual = _getIndividualModel( + context, + form: form, + oldIndividual: individualModel, ); - } - }, - addMember: ( - addressModel, - householdModel, - loading, - ) { - final individual = _getIndividualModel( - context, - form: form, - ); + final tag = scannerBloc.state.qrCodes.isNotEmpty + ? scannerBloc.state.qrCodes.first + : null; - if (context.mounted) { - final scannerBloc = - context.read(); - - if (scannerBloc.state.duplicate) { - Toast.showToast( - context, - message: localizations.translate( - i18.deliverIntervention - .resourceAlreadyScanned, - ), - type: ToastType.error, - ); + if (tag != null && + tag != projectBeneficiaryModel?.tag && + scannerBloc.state.duplicate) { + Toast.showToast(context, + message: localizations.translate( + i18.deliverIntervention + .resourceAlreadyScanned, + ), + type: ToastType.error); } else { bloc.add( - BeneficiaryRegistrationAddMemberEvent( - beneficiaryType: - RegistrationDeliverySingleton() - .beneficiaryType!, - householdModel: householdModel, - individualModel: individual, + BeneficiaryRegistrationUpdateIndividualDetailsEvent( addressModel: addressModel, - userUuid: RegistrationDeliverySingleton() - .loggedInUserUuid!, - projectId: RegistrationDeliverySingleton() - .projectId!, + householdModel: householdModel, + model: individual.copyWith( + clientAuditDetails: (individual + .clientAuditDetails + ?.createdBy != + null && + individual.clientAuditDetails + ?.createdTime != + null) + ? ClientAuditDetails( + createdBy: individual + .clientAuditDetails! + .createdBy, + createdTime: individual + .clientAuditDetails! + .createdTime, + lastModifiedBy: + RegistrationDeliverySingleton() + .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(); + scannerBloc.add( + const DigitScannerEvent.handleScanner(), + ); + if (scannerBloc.state.duplicate) { + Toast.showToast( + context, + message: localizations.translate( + i18.deliverIntervention + .resourceAlreadyScanned, + ), + type: ToastType.error, + ); + } else { + bloc.add( + BeneficiaryRegistrationAddMemberEvent( + beneficiaryType: + RegistrationDeliverySingleton() + .beneficiaryType!, + householdModel: householdModel, + individualModel: individual, + addressModel: addressModel, + userUuid: + RegistrationDeliverySingleton() + .loggedInUserUuid!, + projectId: + RegistrationDeliverySingleton() + .projectId!, + tag: scannerBloc + .state.qrCodes.isNotEmpty + ? scannerBloc.state.qrCodes.first + : null, + ), + ); + } + } + }, + ); + }, + ); + }, + ), + ]), slivers: [ SliverToBoxAdapter( child: DigitCard( + margin: const EdgeInsets.all(spacer2), children: [ - Padding( - padding: const EdgeInsets.only(bottom: spacer2), - child: Text( + Text( localizations.translate( i18.individualDetails.individualsDetailsLabelText, ), style: textTheme.headingXl, ), - ), - individualDetailsShowcaseData.nameOfIndividual - .buildWith( - child: ReactiveWrapperField( - formControlName: _individualNameKey, - validationMessages: { - 'required': (object) => localizations.translate( - '${i18.individualDetails.nameLabelText}_IS_REQUIRED', + individualDetailsShowcaseData.nameOfIndividual + .buildWith( + child: ReactiveWrapperField( + formControlName: _individualNameKey, + validationMessages: { + 'required': (object) => localizations.translate( + '${i18.individualDetails.nameLabelText}_IS_REQUIRED', + ), + 'maxLength': (object) => localizations + .translate(i18.common.maxCharsRequired) + .replaceAll('{}', maxLength.toString()), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.individualDetails.nameLabelText, + ), + isRequired: true, + child: DigitTextFormInput( + initialValue: + form.control(_individualNameKey).value, + onChange: (value) { + form.control(_individualNameKey).value = + value; + }, + errorMessage: field.errorText, + ), + ), + ), + ), + Offstage( + offstage: !widget.isHeadOfHousehold, + child: DigitCheckbox( + label: localizations.translate( + i18.individualDetails.checkboxLabelText, ), - 'maxLength': (object) => localizations - .translate(i18.common.maxCharsRequired) - .replaceAll('{}', maxLength.toString()), + value: widget.isHeadOfHousehold, + readOnly: widget.isHeadOfHousehold, + onChanged: (_) {}, + ), + ), + ReactiveWrapperField( + formControlName: _idTypeKey, + validationMessages: { + 'required': (_) => localizations.translate( + i18.common.corecommonRequired, + ), }, - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( - i18.individualDetails.nameLabelText, + i18.individualDetails.idTypeLabelText, ), isRequired: true, - child: DigitTextFormInput( - initialValue: form.control(_individualNameKey).value, - onChange: (value){ - form.control(_individualNameKey).value=value; + child: DigitDropdown( + selectedOption: + (form.control(_idTypeKey).value != null) + ? DropdownItem( + name: localizations.translate( + form.control(_idTypeKey).value), + code: form.control(_idTypeKey).value) + : const DropdownItem(name: '', code: ''), + items: RegistrationDeliverySingleton() + .idTypeOptions! + .map( + (e) => DropdownItem( + name: localizations.translate(e), + code: e), + ) + .toList(), + onSelect: (value) { + form.control(_idTypeKey).value = value.code; + setState(() { + if (value.code == 'DEFAULT') { + form.control(_idNumberKey).value = + IdGen.i.identifier.toString(); + } else { + form.control(_idNumberKey).value = null; + } + }); }, - errorMessage: field.errorText, + emptyItemText: localizations + .translate(i18.common.noMatchFound), + errorMessage: form.control(_idTypeKey).hasErrors + ? localizations.translate( + i18.common.corecommonRequired, + ) + : null, ), ), ), - ), - Offstage( - offstage: !widget.isHeadOfHousehold, - child: DigitCheckbox( - label: localizations.translate( - i18.individualDetails.checkboxLabelText, - ), - value: widget.isHeadOfHousehold, - readOnly: widget.isHeadOfHousehold, - onChanged: (_){}, - ), - ), - ReactiveWrapperField( - formControlName: _idTypeKey, - validationMessages: { - 'required': (_)=> localizations.translate( - i18.common.corecommonRequired, + if (form.control(_idTypeKey).value != 'DEFAULT') + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ReactiveFormConsumer( + builder: (context, formGroup, child) { + return ReactiveWrapperField( + formControlName: _idNumberKey, + validationMessages: { + 'required': (object) => + localizations.translate( + '${i18.individualDetails.idNumberLabelText}_IS_REQUIRED', + ), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.individualDetails.idNumberLabelText, + ), + isRequired: form + .control(_idNumberKey) + .validators + .isNotEmpty, + child: DigitTextFormInput( + readOnly: + form.control(_idTypeKey).value == + 'DEFAULT', + initialValue: + form.control(_idNumberKey).value, + onChange: (value) { + form.control(_idNumberKey).value = + value; + }, + errorMessage: field.errorText, + ), + ), + ); + }, + ), + const SizedBox(height: 4), + ], ), - }, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.individualDetails.idTypeLabelText, + if (form.control(_idTypeKey).value == 'DEFAULT') + const SizedBox( + height: spacer2, ), - isRequired: true, - child: DigitDropdown( - selectedOption: (form.control(_idTypeKey).value!=null)? - DropdownItem( - name: localizations.translate(form.control(_idTypeKey).value), - code: form.control(_idTypeKey).value - ):const DropdownItem(name: '', code: ''), - items: RegistrationDeliverySingleton() - .idTypeOptions! - .map( - (e) => DropdownItem( - name: localizations.translate(e), - code: e - ), - ).toList(), - onSelect: (value) { - form.control(_idTypeKey).value=value.code; - setState(() { - if (value.code == 'DEFAULT') { - form.control(_idNumberKey).value = - IdGen.i.identifier.toString(); + 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, + ), + errorMessage: form.control(_dobKey).hasErrors + ? localizations + .translate(i18.common.corecommonRequired) + : null, + initialDate: before150Years, + initialValue: getInitialDateValue(form), + onChangeOfFormControl: (value) { + if (value == null) { + form.control(_dobKey).setErrors({'': true}); + } else { + DigitDOBAgeConvertor age = + DigitDateUtils.calculateAge(value); + if ((age.years == 0 && age.months == 0) || + age.months > 11 || + (age.years >= 150 && age.months >= 0)) { + form.control(_dobKey).setErrors({'': true}); } else { - form.control(_idNumberKey).value = null; + form.control(_dobKey).removeError(''); } - }); + } + // Handle changes to the control's value here + form.control(_dobKey).value = value; }, - emptyItemText: localizations - .translate(i18.common.noMatchFound), - errorMessage: form.control(_idTypeKey).hasErrors - ? localizations.translate( - i18.common.corecommonRequired, - ):null, + cancelText: localizations + .translate(i18.common.coreCommonCancel), + confirmText: localizations + .translate(i18.common.coreCommonOk), ), ), - ), - if (form.control(_idTypeKey).value != 'DEFAULT') - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ReactiveFormConsumer( - builder: (context, formGroup, child) { - return ReactiveWrapperField( - formControlName: _idNumberKey, - validationMessages: { - 'required': (object) => - localizations.translate( - '${i18.individualDetails.idNumberLabelText}_IS_REQUIRED', - ), - }, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.individualDetails.idNumberLabelText, - ), - isRequired: form.control(_idNumberKey).validators.isNotEmpty, - child: DigitTextFormInput( - readOnly: - form.control(_idTypeKey).value == - 'DEFAULT', - initialValue: form.control(_idNumberKey).value, - onChange: (value){ - form.control(_idNumberKey).value=value; - }, - errorMessage: field.errorText, - ), - ), - ); - }, - ), - const SizedBox(height: 4), - ], - ), - if (form.control(_idTypeKey).value == 'DEFAULT') - const SizedBox( - height: spacer2, - ), - 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, + SelectionCard( + isRequired: true, + showParentContainer: true, + title: localizations.translate( + i18.individualDetails.genderLabelText, ), - errorMessage: form.control(_dobKey).hasErrors? - localizations.translate(i18.common.corecommonRequired):null, - initialDate: before150Years, - onChangeOfFormControl: (value) { - if(value!=null){ - setState(() { - form.control(_dobKey).setErrors({'' : false}); - }); - } - // Handle changes to the control's value here - form.control(_dobKey).value=value; + allowMultipleSelection: false, + width: 126, + initialSelection: + form.control(_genderKey).value != null + ? [form.control(_genderKey).value] + : [], + options: RegistrationDeliverySingleton() + .genderOptions! + .map( + (e) => e, + ) + .toList(), + onSelectionChanged: (value) { + setState(() { + if (value.isNotEmpty) { + form.control(_genderKey).value = value.first; + } else { + form.control(_genderKey).value = null; + setState(() { + form + .control(_genderKey) + .setErrors({'': true}); + }); + } + }); }, - cancelText: localizations - .translate(i18.common.coreCommonCancel), - confirmText: localizations - .translate(i18.common.coreCommonOk), - ), - ), - SelectionCard( - isRequired: true, - title: localizations.translate( - i18.individualDetails.genderLabelText, - ), - allowMultipleSelection: false, - width: 126, - initialSelection: - form.control(_genderKey).value != null - ? [form.control(_genderKey).value] - : [], - options: RegistrationDeliverySingleton() - .genderOptions! - .map( - (e) => e, - ) - .toList(), - onSelectionChanged: (value) { - setState(() { - if (value.isNotEmpty) { - form.control(_genderKey).value = value.first; - } else { - form.control(_genderKey).value = null; - setState(() { - form - .control(_genderKey) - .setErrors({'': true}); - }); - } - }); - }, - valueMapper: (value) { - return localizations.translate(value); - }, - errorMessage: form.control(_genderKey).hasErrors - ? localizations - .translate(i18.common.corecommonRequired) - : null, - ), - individualDetailsShowcaseData.mobile.buildWith( - child: ReactiveWrapperField( - formControlName: _mobileNumberKey, - validationMessages: { - 'maxLength': (object) => localizations.translate( - i18.individualDetails - .mobileNumberLengthValidationMessage), - 'minLength': (object) => localizations.translate( - i18.individualDetails - .mobileNumberLengthValidationMessage), + valueMapper: (value) { + return localizations.translate(value); }, - builder: (field)=> LabeledField( - label: localizations.translate( - i18.individualDetails.mobileNumberLabelText, - ), - child: DigitTextFormInput( - keyboardType: TextInputType.number, - maxLength: 10, - inputFormatters: [ - FilteringTextInputFormatter.digitsOnly, - ], - initialValue: form.control(_mobileNumberKey).value, - onChange: (value){ - form.control(_mobileNumberKey).value=value; - }, - ), - ), + errorMessage: form.control(_genderKey).hasErrors + ? localizations + .translate(i18.common.corecommonRequired) + : null, ), - ), - const SizedBox(height: 16), - if ((RegistrationDeliverySingleton().beneficiaryType == - BeneficiaryType.household && - widget.isHeadOfHousehold) || - (RegistrationDeliverySingleton().beneficiaryType == - BeneficiaryType.individual)) - BlocBuilder( - buildWhen: (p, c) { - return true; - }, - 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, - ), + individualDetailsShowcaseData.mobile.buildWith( + child: ReactiveWrapperField( + formControlName: _mobileNumberKey, + validationMessages: { + 'maxLength': (object) => localizations.translate( + i18.individualDetails + .mobileNumberLengthValidationMessage), + 'minLength': (object) => localizations.translate( + i18.individualDetails + .mobileNumberLengthValidationMessage), + }, + builder: (field) => LabeledField( + label: localizations.translate( + i18.individualDetails.mobileNumberLabelText, ), - Flexible( - child: Text( - overflow: TextOverflow.ellipsis, - localizations - .translate(state.qrCodes.last), - ), + child: DigitTextFormInput( + keyboardType: TextInputType.number, + maxLength: 10, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], + initialValue: + form.control(_mobileNumberKey).value, + onChange: (value) { + form.control(_mobileNumberKey).value = value; + }, ), - Padding( - padding: const EdgeInsets.only( - bottom: spacer2 * 2, - ), - child: IconButton( - color: theme.colorScheme.secondary, - icon: const Icon(Icons.edit), - onPressed: () { - Navigator.of(context).push( - //[TODO: Add the route to auto_route] - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 1, - isGS1code: false, - singleValue: true, - isEditEnabled: true, + ), + ), + ), + // const SizedBox(height: spacer4), + if ((RegistrationDeliverySingleton().beneficiaryType == + BeneficiaryType.household && + widget.isHeadOfHousehold) || + (RegistrationDeliverySingleton().beneficiaryType == + BeneficiaryType.individual)) + BlocBuilder( + buildWhen: (p, c) { + return true; + }, + 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: textTheme.headingS, ), - settings: const RouteSettings( - name: '/qr-scanner'), ), - ); - }, - ), - ), - ], + Flexible( + child: Text( + overflow: TextOverflow.ellipsis, + localizations + .translate(state.qrCodes.last), + ), + ), + Padding( + padding: const EdgeInsets.only( + bottom: spacer2 * 2, + ), + child: IconButton( + color: + theme.colorTheme.primary.primary1, + icon: const Icon(Icons.edit), + onPressed: () { + Navigator.of(context).push( + //[TODO: Add the route to auto_route] + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 1, + isGS1code: false, + singleValue: true, + isEditEnabled: true, + ), + settings: const RouteSettings( + name: '/qr-scanner'), + ), + ); + }, + ), + ), + ], - // ignore: no-empty-block - ) - : Button( - type: ButtonType.secondary, - size: ButtonSize.large, - mainAxisSize: MainAxisSize.max, - onPressed: () { - Navigator.of(context).push( - // [TODO: Add the route to auto_route] - MaterialPageRoute( - builder: (context) => - const DigitScannerPage( - quantity: 1, - isGS1code: false, - singleValue: true, + // ignore: no-empty-block + ) + : DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, + mainAxisSize: MainAxisSize.max, + onPressed: () { + Navigator.of(context).push( + // [TODO: Add the route to auto_route] + MaterialPageRoute( + builder: (context) => + const DigitScannerPage( + quantity: 1, + isGS1code: false, + singleValue: true, + ), + settings: const RouteSettings( + name: '/qr-scanner'), + ), + ); + }, + prefixIcon: Icons.qr_code, + label: localizations.translate( + i18.individualDetails + .linkVoucherToIndividual, + ), ), - settings: const RouteSettings( - name: '/qr-scanner'), - ), - ); - }, - prefixIcon: Icons.qr_code, - label: localizations.translate( - i18.individualDetails - .linkVoucherToIndividual, - ), ), - ),] - ), + ]), ), ], ); @@ -654,10 +692,10 @@ class IndividualDetailsPageState extends LocalizedState { } IndividualModel _getIndividualModel( - BuildContext context, { - required FormGroup form, - IndividualModel? oldIndividual, - }) { + BuildContext context, { + required FormGroup form, + IndividualModel? oldIndividual, + }) { final dob = form.control(_dobKey).value as DateTime?; String? dobString; if (dob != null) { @@ -732,7 +770,7 @@ class IndividualDetailsPageState extends LocalizedState { gender: form.control(_genderKey).value == null ? null : Gender.values - .byName(form.control(_genderKey).value.toString().toLowerCase()), + .byName(form.control(_genderKey).value.toString().toLowerCase()), mobileNumber: form.control(_mobileNumberKey).value, dateOfBirth: dobString, identifiers: [ @@ -774,7 +812,8 @@ class IndividualDetailsPageState extends LocalizedState { _individualNameKey: FormControl( validators: [ Validators.required, - CustomValidator.requiredMin, + Validators.delegate( + (validator) => CustomValidator.requiredMin(validator)), Validators.maxLength(200), ], value: individual?.name?.givenName ?? searchQuery?.trim(), @@ -789,15 +828,16 @@ class IndividualDetailsPageState extends LocalizedState { _dobKey: FormControl( value: individual?.dateOfBirth != null ? DateFormat(Constants().dateFormat).parse( - individual!.dateOfBirth!, - ) + individual!.dateOfBirth!, + ) : null, ), _genderKey: FormControl(value: getGenderOptions(individual)), _mobileNumberKey: - FormControl(value: individual?.mobileNumber, validators: [ - CustomValidator.validMobileNumber, - CustomValidator.minPhoneNumValidation, + FormControl(value: individual?.mobileNumber, validators: [ + Validators.pattern(Constants.mobileNumberRegExp, + validationMessage: + localizations.translate(i18.common.coreCommonMobileNumber)), Validators.maxLength(10) ]), }); @@ -808,6 +848,15 @@ class IndividualDetailsPageState extends LocalizedState { return options?.map((e) => e).firstWhereOrNull( (element) => element.toLowerCase() == individual?.gender?.name, - ); + ); + } + + getInitialDateValue(FormGroup form) { + var date = form.control(_dobKey).value != null + ? DateFormat(Constants().dateTimeExtFormat) + .format(form.control(_dobKey).value) + : null; + + return date; } } diff --git a/packages/registration_delivery/lib/pages/reason_for_deletion.dart b/packages/registration_delivery/lib/pages/reason_for_deletion.dart index 8635aafbe..a9b2a330c 100644 --- a/packages/registration_delivery/lib/pages/reason_for_deletion.dart +++ b/packages/registration_delivery/lib/pages/reason_for_deletion.dart @@ -52,11 +52,11 @@ class ReasonForDeletionPageState extends LocalizedState { ); } - return Button( + return DigitButton( label: localizations .translate(i18.householdLocation.actionLabel), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () { if (form.valid) { diff --git a/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart b/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart index 4a424945d..5fa8af34d 100644 --- a/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart +++ b/packages/registration_delivery/lib/pages/registration_delivery_wrapper.dart @@ -1,13 +1,13 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/models/entities/individual.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:location/location.dart'; import 'package:registration_delivery/blocs/search_households/household_global_seach.dart'; import 'package:registration_delivery/blocs/search_households/individual_global_search.dart'; import 'package:registration_delivery/data/repositories/local/individual_global_search.dart'; import 'package:registration_delivery/utils/extensions/extensions.dart'; -import 'package:location/location.dart'; import '../blocs/household_details/household_details.dart'; import '../blocs/search_households/search_bloc_common_wrapper.dart'; @@ -163,7 +163,7 @@ class RegistrationDeliveryWrapperPage extends StatelessWidget { create: (_) => HouseholdDetailsBloc(const HouseholdDetailsState()), ), BlocProvider( - create: (_)=>LocationBloc(location: Location()), + create: (_) => LocationBloc(location: Location()), ), ], child: const AutoRouter(), diff --git a/packages/registration_delivery/lib/pages/search_beneficiary.dart b/packages/registration_delivery/lib/pages/search_beneficiary.dart index cb2a671a7..46f5e156d 100644 --- a/packages/registration_delivery/lib/pages/search_beneficiary.dart +++ b/packages/registration_delivery/lib/pages/search_beneficiary.dart @@ -2,8 +2,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_data_model/data_model.dart'; import 'package:digit_scanner/blocs/scanner.dart'; import 'package:digit_scanner/pages/qr_scanner.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/digit_chip.dart'; import 'package:digit_ui_components/widgets/atoms/digit_search_bar.dart'; @@ -123,11 +123,13 @@ class _SearchBeneficiaryPageState BlocBuilder( builder: (context, locationState) { return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ locationState.latitude != null ? Padding( padding: const EdgeInsets.all(spacer2), - child: CustomSwitch( + child: DigitSwitch( mainAxisAlignment: MainAxisAlignment.start, label: localizations.translate( @@ -186,10 +188,10 @@ class _SearchBeneficiaryPageState alignment: Alignment.topLeft, child: Padding( padding: const EdgeInsets.all(spacer2), - child: Button( + child: DigitButton( label: getFilterIconNLabel()['label'], - size: ButtonSize.medium, - type: ButtonType.tertiary, + size: DigitButtonSize.medium, + type: DigitButtonType.tertiary, suffixIcon: getFilterIconNLabel()['icon'], onPressed: () => showFilterDialog(), @@ -216,6 +218,7 @@ class _SearchBeneficiaryPageState label: '${localizations.translate(getStatus(selectedFilters[index]))}' ' (${searchHouseholdsState.totalResults})', + capitalizedFirstLetter: false, onItemDelete: () { setState(() { selectedFilters.remove( @@ -237,13 +240,17 @@ class _SearchBeneficiaryPageState ), if (searchHouseholdsState.resultsNotFound && !searchHouseholdsState.loading) - InfoCard( - type: InfoType.info, - description: localizations.translate( - i18.searchBeneficiary.beneficiaryInfoDescription, - ), - title: localizations.translate( - i18.searchBeneficiary.beneficiaryInfoTitle, + Padding( + padding: const EdgeInsets.only( + left: spacer2, top: spacer2, right: spacer2), + child: InfoCard( + type: InfoType.info, + description: localizations.translate( + i18.searchBeneficiary.beneficiaryInfoDescription, + ), + title: localizations.translate( + i18.searchBeneficiary.beneficiaryInfoTitle, + ), ), ), ], @@ -358,15 +365,15 @@ class _SearchBeneficiaryPageState ), bottomNavigationBar: DigitCard( margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), + padding: const EdgeInsets.all(spacer4), children: [ - Button( + DigitButton( label: localizations.translate( i18.searchBeneficiary.beneficiaryAddActionLabel, ), mainAxisSize: MainAxisSize.max, - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, isDisabled: searchHouseholdsState.searchQuery != null && searchHouseholdsState.searchQuery!.isNotEmpty ? false @@ -386,9 +393,9 @@ class _SearchBeneficiaryPageState blocWrapper.clearEvent(); }, ), - Button( - type: ButtonType.secondary, - size: ButtonSize.large, + DigitButton( + type: DigitButtonType.secondary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () { blocWrapper.clearEvent(); @@ -540,7 +547,9 @@ class _SearchBeneficiaryPageState .first .key; if (mappedStatus != null) { - return mappedStatus; + return mappedStatus == Status.administeredSuccess.toValue() + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_$mappedStatus' + : mappedStatus; } else { return selectedFilter; } diff --git a/packages/registration_delivery/lib/pages/summary_page.dart b/packages/registration_delivery/lib/pages/summary_page.dart index 0b37f644f..454a00ddf 100644 --- a/packages/registration_delivery/lib/pages/summary_page.dart +++ b/packages/registration_delivery/lib/pages/summary_page.dart @@ -4,9 +4,9 @@ import 'package:digit_ui_components/utils/date_utils.dart'; import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:recase/recase.dart'; import 'package:registration_delivery/models/entities/additional_fields_type.dart'; import 'package:registration_delivery/router/registration_delivery_router.gm.dart'; import 'package:registration_delivery/widgets/back_navigation_help_header.dart'; @@ -78,7 +78,7 @@ class SummaryPageState extends LocalizedState { }, builder: (context, householdState) { return ScrollableContent( - enableFixedButton: true, + enableFixedDigitButton: true, header: Column(children: [ const BackNavigationHelpHeaderWidget( showHelp: false, @@ -101,20 +101,19 @@ class SummaryPageState extends LocalizedState { ]), footer: DigitCard( margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), children: [ ValueListenableBuilder( valueListenable: clickedStatus, builder: (context, bool isClicked, _) { - return Button( + return DigitButton( label: householdState.mapOrNull( editIndividual: (value) => localizations .translate(i18.common.coreCommonSave), ) ?? localizations .translate(i18.common.coreCommonSubmit), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, isDisabled: isClicked ? true : false, onPressed: () async { @@ -149,7 +148,7 @@ class SummaryPageState extends LocalizedState { i18.deliverIntervention.dialogContent, ), actions: [ - Button( + DigitButton( label: localizations.translate( i18.common.coreCommonSubmit, ), @@ -160,9 +159,9 @@ class SummaryPageState extends LocalizedState { rootNavigator: true, ).pop(true); }, - type: ButtonType.primary, - size: ButtonSize.large), - Button( + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( label: localizations.translate( i18.common.coreCommonCancel, ), @@ -170,8 +169,8 @@ class SummaryPageState extends LocalizedState { context, rootNavigator: true, ).pop(false), - type: ButtonType.secondary, - size: ButtonSize.large) + type: DigitButtonType.secondary, + size: DigitButtonSize.large) ], ), ); @@ -202,208 +201,227 @@ class SummaryPageState extends LocalizedState { child: Column( children: [ DigitCard( - margin: const EdgeInsets.all(spacer2), + margin: const EdgeInsets.all(spacer2), children: [ - LabelValueList( - heading: localizations.translate(i18 - .householdLocation.householdLocationLabelText), - - labelFlex: 6, - maxLines: 2, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdLocation.villageLabel), - value: householdState.householdModel?.address - ?.locality?.code ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdLocation.landmarkFormLabel), - value: householdState - .householdModel?.address?.landmark ?? - localizations - .translate(i18.common.coreCommonNA), - isInline: true), - ]), - ]), + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .householdLocation + .householdLocationLabelText), + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdLocation.villageLabel), + value: localizations.translate( + householdState.householdModel?.address + ?.locality?.code ?? + i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdLocation.landmarkFormLabel), + value: householdState.householdModel + ?.address?.landmark ?? + localizations + .translate(i18.common.coreCommonNA), + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - margin: const EdgeInsets.all(spacer2), + margin: const EdgeInsets.all(spacer2), children: [ - LabelValueList( - heading: localizations.translate( - i18.householdDetails.householdDetailsLabel), - labelFlex: 6, - items: [ - LabelValuePair( - label: localizations.translate( - i18.beneficiaryDetails.totalMembers), - value: householdState - .householdModel?.memberCount - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfPregnantWomenCountLabel), - value: householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.pregnantWomen - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate(i18 - .householdDetails - .noOfChildrenBelow5YearsLabel), - value: householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.children - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - ]), - ]), + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.householdDetailsLabel), + items: [ + LabelValueItem( + label: localizations.translate( + i18.beneficiaryDetails.totalMembers), + value: householdState + .householdModel?.memberCount + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfPregnantWomenCountLabel), + value: householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType + .pregnantWomen + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate(i18 + .householdDetails + .noOfChildrenBelow5YearsLabel), + value: householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType.children + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - margin: const EdgeInsets.all(spacer2), + margin: const EdgeInsets.all(spacer2), children: [ - LabelValueList( - heading: localizations.translate( - i18.householdDetails.houseDetailsLabel), - labelFlex: 6, - items: [ - LabelValuePair( - label: localizations.translate( - i18.householdDetails.noOfRoomsLabel), - value: householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType.noOfRooms - .toValue()) - .firstOrNull - ?.value - .toString() ?? - '0', - isInline: true), - LabelValuePair( - label: localizations.translate( - i18.householdDetails.typeOfStructure), - value: (householdState.householdModel - ?.additionalFields?.fields - .where((h) => - h.key == - AdditionalFieldsType - .houseStructureTypes - .toValue()) - .firstOrNull - ?.value ?? - []) - .toString() - .split('|') - .map((item) => getLocalizedMessage(item)) - .toList() - .join(', '), - isInline: true), - ]), - ]), + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate( + i18.householdDetails.houseDetailsLabel), + items: [ + LabelValueItem( + label: localizations.translate( + i18.householdDetails.noOfRoomsLabel), + value: householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType.noOfRooms + .toValue()) + .firstOrNull + ?.value + .toString() ?? + '0', + isInline: true, + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.householdDetails.typeOfStructure), + value: (householdState.householdModel + ?.additionalFields?.fields + .where((h) => + h.key == + AdditionalFieldsType + .houseStructureTypes + .toValue()) + .firstOrNull + ?.value ?? + []) + .toString() + .split('|') + .map( + (item) => getLocalizedMessage(item)) + .toList() + .join(', '), + isInline: true, + labelFlex: 5, + ), + ]), + ]), DigitCard( - margin: const EdgeInsets.all(spacer2), + margin: const EdgeInsets.all(spacer2), children: [ - LabelValueList( - heading: localizations.translate(i18 - .individualDetails.individualsDetailsLabelText), - labelFlex: 6, - items: [ - LabelValuePair( - label: localizations.translate( - i18.individualDetails.nameLabelText), - value: householdState.maybeWhen( - orElse: () => localizations - .translate(i18.common.coreCommonNA), - summary: ( - navigateToRoot, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - addressModel, - loading, - isHeadOfHousehold, - ) => - individualModel?.name?.givenName ?? - localizations.translate( - i18.common.coreCommonNA)), - ), - LabelValuePair( - label: localizations.translate( - i18.individualDetails.dobLabelText), - value: householdState.maybeWhen( - orElse: () => localizations - .translate(i18.common.coreCommonNA), - summary: ( - navigateToRoot, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - addressModel, - loading, - isHeadOfHousehold, - ) => - individualModel?.dateOfBirth != null - ? DigitDateUtils.getFilteredDate( - DigitDateUtils - .getFormattedDateToDateTime( + LabelValueSummary( + padding: EdgeInsets.zero, + heading: localizations.translate(i18 + .individualDetails + .individualsDetailsLabelText), + items: [ + LabelValueItem( + label: localizations.translate( + i18.individualDetails.nameLabelText), + value: householdState.maybeWhen( + orElse: () => localizations + .translate(i18.common.coreCommonNA), + summary: ( + navigateToRoot, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + addressModel, + loading, + isHeadOfHousehold, + ) => + individualModel?.name?.givenName ?? + localizations.translate( + i18.common.coreCommonNA)), + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.individualDetails.dobLabelText), + value: householdState.maybeWhen( + orElse: () => localizations + .translate(i18.common.coreCommonNA), + summary: ( + navigateToRoot, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + addressModel, + loading, + isHeadOfHousehold, + ) => + individualModel?.dateOfBirth != null + ? DigitDateUtils.getFilteredDate( + DigitDateUtils.getFormattedDateToDateTime( individualModel ?.dateOfBirth ?? '') - .toString(), - dateFormat: Constants() - .dateMonthYearFormat) - .toString() - : localizations.translate( - i18.common.coreCommonNA)), - ), - LabelValuePair( - label: localizations.translate( - i18.individualDetails.genderLabelText), - value: householdState.maybeWhen( - orElse: () => localizations - .translate(i18.common.coreCommonNA), - summary: ( - navigateToRoot, - householdModel, - individualModel, - projectBeneficiaryModel, - registrationDate, - addressModel, - loading, - isHeadOfHousehold, - ) => - individualModel?.gender != null - ? localizations.translate( - individualModel?.gender?.name - .toUpperCase() ?? - '') - : localizations.translate( - i18.common.coreCommonNA)), - ), - ]), - ]), + .toString(), + dateFormat: Constants() + .dateMonthYearFormat) + .toString() + : localizations.translate( + i18.common.coreCommonNA)), + labelFlex: 5, + ), + LabelValueItem( + label: localizations.translate( + i18.individualDetails.genderLabelText), + value: householdState.maybeWhen( + orElse: () => localizations + .translate(i18.common.coreCommonNA), + summary: ( + navigateToRoot, + householdModel, + individualModel, + projectBeneficiaryModel, + registrationDate, + addressModel, + loading, + isHeadOfHousehold, + ) => + individualModel?.gender != null + ? localizations.translate( + individualModel + ?.gender?.name + .toUpperCase() ?? + '') + : localizations.translate( + i18.common.coreCommonNA)), + labelFlex: 5, + ), + ]), + ]), ], ), ) diff --git a/packages/registration_delivery/lib/router/registration_delivery_router.dart b/packages/registration_delivery/lib/router/registration_delivery_router.dart index 14d14e52f..676799919 100644 --- a/packages/registration_delivery/lib/router/registration_delivery_router.dart +++ b/packages/registration_delivery/lib/router/registration_delivery_router.dart @@ -4,10 +4,8 @@ import 'registration_delivery_router.gm.dart'; @AutoRouterConfig.module() class RegistrationDeliveryRoute extends $RegistrationDeliveryRoute { - @override RouteType get defaultRouteType => const RouteType.material(); - @override List get routes => [ AutoRoute( page: RegistrationDeliveryWrapperRoute.page, diff --git a/packages/registration_delivery/lib/utils/constants.dart b/packages/registration_delivery/lib/utils/constants.dart index a3f9de2ad..fb559b041 100644 --- a/packages/registration_delivery/lib/utils/constants.dart +++ b/packages/registration_delivery/lib/utils/constants.dart @@ -4,6 +4,8 @@ class Constants { KeyValue('CORE_COMMON_NO', false), ]; + static RegExp mobileNumberRegExp = + RegExp(r'^(?=.{10}$)[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'); final String dateFormat = 'dd/MM/yyyy'; final String communityHealthWorker = 'Community Health Worker'; final String deliveryTeam = 'Delivery Team'; diff --git a/packages/registration_delivery/lib/utils/extensions/context_utility.dart b/packages/registration_delivery/lib/utils/extensions/context_utility.dart index fa5d9dfa5..f4307ef5c 100644 --- a/packages/registration_delivery/lib/utils/extensions/context_utility.dart +++ b/packages/registration_delivery/lib/utils/extensions/context_utility.dart @@ -5,12 +5,6 @@ extension ContextUtilityExtensions on BuildContext { return (dateTime ?? DateTime.now()).millisecondsSinceEpoch; } - Future get packageInfo async { - final info = await PackageInfo.fromPlatform(); - - return info.version; - } - ProjectCycle? get selectedCycle { final selectedCycle = RegistrationDeliverySingleton() .projectType diff --git a/packages/registration_delivery/lib/utils/extensions/extensions.dart b/packages/registration_delivery/lib/utils/extensions/extensions.dart index dbd3b40e0..37882c7c9 100644 --- a/packages/registration_delivery/lib/utils/extensions/extensions.dart +++ b/packages/registration_delivery/lib/utils/extensions/extensions.dart @@ -3,7 +3,6 @@ import 'package:digit_data_model/data_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:registration_delivery/utils/constants.dart'; import '../utils.dart'; diff --git a/packages/registration_delivery/lib/utils/utils.dart b/packages/registration_delivery/lib/utils/utils.dart index b63156444..e31105bca 100644 --- a/packages/registration_delivery/lib/utils/utils.dart +++ b/packages/registration_delivery/lib/utils/utils.dart @@ -26,32 +26,6 @@ class CustomValidator { ? null : {'required': true}; } - - static Map? validMobileNumber( - AbstractControl control, - ) { - if (control.value == null || control.value.toString().isEmpty) { - return null; - } - - const pattern = r'^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$'; - - if (RegExp(pattern).hasMatch(control.value.toString())) return null; - - if (control.value.toString().length < 10) return {'mobileNumber': true}; - - return {'mobileNumber': true}; - } - - static Map? minPhoneNumValidation( - AbstractControl control, - ) { - if (control.value != null && - control.value.toString().isNotEmpty && - control.value.toString().length < 9) { - return {'minLength': true}; - } - } } bool checkStatus(List? tasks, ProjectCycle? currentCycle) { @@ -89,7 +63,7 @@ bool checkIfBeneficiaryRefused( List? tasks, ) { final isBeneficiaryRefused = (tasks != null && - (tasks ?? []).isNotEmpty && + (tasks).isNotEmpty && tasks.last.status == Status.beneficiaryRefused.toValue()); return isBeneficiaryRefused; @@ -105,13 +79,11 @@ bool checkEligibilityForAgeAndSideEffect( int totalAgeMonths = age.years * 12 + age.months; final currentCycle = projectType?.cycles?.firstWhereOrNull( (e) => - (e.startDate!) < DateTime.now().millisecondsSinceEpoch && - (e.endDate!) > DateTime.now().millisecondsSinceEpoch, + (e.startDate) < DateTime.now().millisecondsSinceEpoch && + (e.endDate) > DateTime.now().millisecondsSinceEpoch, // Return null when no matching cycle is found ); - if (currentCycle != null && - currentCycle.startDate != null && - currentCycle.endDate != null) { + if (currentCycle != null) { bool recordedSideEffect = false; if ((tasks != null) && sideEffects != null && sideEffects.isNotEmpty) { final lastTaskTime = @@ -119,8 +91,8 @@ bool checkEligibilityForAgeAndSideEffect( ? tasks.clientAuditDetails?.createdTime : null; recordedSideEffect = lastTaskTime != null && - (lastTaskTime >= currentCycle.startDate! && - lastTaskTime <= currentCycle.endDate!); + (lastTaskTime >= currentCycle.startDate && + lastTaskTime <= currentCycle.endDate); return projectType?.validMinAge != null && projectType?.validMaxAge != null @@ -132,9 +104,10 @@ bool checkEligibilityForAgeAndSideEffect( : false : false; } else { - if(projectType?.validMaxAge!=null && projectType?.validMinAge!=null){ + if (projectType?.validMaxAge != null && + projectType?.validMinAge != null) { return totalAgeMonths >= projectType!.validMinAge! && - totalAgeMonths <= projectType.validMaxAge! + totalAgeMonths <= projectType.validMaxAge! ? true : false; } @@ -150,9 +123,7 @@ bool recordedSideEffect( TaskModel? task, List? sideEffects, ) { - if (selectedCycle != null && - selectedCycle.startDate != null && - selectedCycle.endDate != null) { + if (selectedCycle != null) { if ((task != null) && (sideEffects ?? []).isNotEmpty) { final lastTaskCreatedTime = task.clientReferenceId == sideEffects?.last.taskClientReferenceId @@ -174,7 +145,7 @@ bool checkIfBeneficiaryReferred( ) { if (currentCycle?.startDate != null && currentCycle?.endDate != null) { final isBeneficiaryReferred = (referrals != null && - (referrals ?? []).isNotEmpty && + (referrals).isNotEmpty && referrals.last.clientAuditDetails!.createdTime >= currentCycle!.startDate && referrals.last.clientAuditDetails!.createdTime <= currentCycle.endDate); @@ -189,9 +160,10 @@ DeliveryDoseCriteria? fetchProductVariant(ProjectCycleDelivery? currentDelivery, IndividualModel? individualModel, HouseholdModel? householdModel) { if (currentDelivery != null) { var individualAgeInMonths = 0; - var gender; - var roomCount; - var memberCount; + int? gender; + int? roomCount; + int? memberCount; + String? structureType; if (individualModel != null) { final individualAge = DigitDateUtils.calculateAge( @@ -212,25 +184,32 @@ DeliveryDoseCriteria? fetchProductVariant(ProjectCycleDelivery? currentDelivery, ?.value .toString() ?? '1')!; + structureType = householdModel.additionalFields?.fields + .where((h) => + h.key == AdditionalFieldsType.houseStructureTypes.toValue()) + .firstOrNull + ?.value + .toString(); } final filteredCriteria = currentDelivery.doseCriteria?.where((criteria) { - final condition = criteria.condition; + final String? condition = criteria.condition; if (condition != null) { final conditions = condition.split('and'); List expressionParser = []; for (var element in conditions) { - final expression = FormulaParser( - element, - { + final expression = CustomFormulaParser.parseCondition(element, { + if (individualModel != null && individualAgeInMonths != 0) 'age': individualAgeInMonths, - if (gender != null) 'gender': gender, - if (memberCount != null) 'memberCount': memberCount, - if (roomCount != null) 'roomCount': roomCount - }, - ); - final error = expression.parse; + if (gender != null) 'gender': gender, + if (memberCount != null) 'memberCount': memberCount, + if (roomCount != null) 'roomCount': roomCount, + if (structureType != null) 'type_of_structure': structureType + }, stringKeys: [ + 'type_of_structure' + ]); + final error = expression; expressionParser.add(error["value"]); } @@ -258,6 +237,54 @@ String maskString(String input) { return maskedString; } +class CustomFormulaParser { + // Modify the function to accept stringKeys as nullable + static Map parseCondition( + String condition, + Map variables, { + List? stringKeys, + } // Accept stringKeys as nullable + ) { + // If stringKeys is null or empty, default to FormulaParser for all conditions + if (stringKeys == null || stringKeys.isEmpty) { + return _parseAsFormula(condition, variables); + } + + // Loop through stringKeys and check for string comparison in the condition + for (var key in stringKeys) { + if (condition.contains('$key==')) { + // Extract the expected value after '==' for string comparison + var value = condition.split('==')[1].trim(); + if (variables.containsKey(key) && variables[key] is String) { + return _compareString(condition, value, variables[key]); + } + } + } + + // If no string-specific comparison, use FormulaParser for numeric evaluation + return _parseAsFormula(condition, variables); + } + + // Handle string comparison + static Map _compareString( + String condition, String expectedValue, String actualValue) { + // Compare string values directly + bool comparisonResult = actualValue == expectedValue; + return {'value': comparisonResult}; + } + + // Handle numeric evaluation using FormulaParser + static Map _parseAsFormula( + String condition, Map variables) { + final expression = FormulaParser( + condition, + variables, + ); + final error = expression.parse; + return error; // Parsing the numeric expression + } +} + class Coordinate { final double? latitude; final double? longitude; @@ -382,27 +409,46 @@ class RegistrationDeliverySingleton { } String? get tenantId => _tenantId; + String? get loggedInUserUuid => _loggedInUserUuid; + double? get maxRadius => _maxRadius; + String? get projectId => _projectId; + BeneficiaryType? get beneficiaryType => _beneficiaryType; + ProjectTypeModel? get projectType => _projectType; + ProjectModel? get selectedProject => _selectedProject; + BoundaryModel? get boundary => _boundaryModel; + PersistenceConfiguration? get persistenceConfiguration => _persistenceConfiguration; + List? get genderOptions => _genderOptions; + List? get idTypeOptions => _idTypeOptions; + List? get householdDeletionReasonOptions => _householdDeletionReasonOptions; + List? get householdMemberDeletionReasonOptions => _householdMemberDeletionReasonOptions; + List? get deliveryCommentOptions => _deliveryCommentOptions; + List? get symptomsTypes => _symptomsTypes; + List? get searchHouseHoldFilter => _searchHouseHoldFilter; + List? get referralReasons => _referralReasons; + List? get houseStructureTypes => _houseStructureTypes; + List? get refusalReasons => _refusalReasons; + UserModel? get loggedInUser => _loggedInUser; } diff --git a/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart b/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart index db4d02cc1..3449b2a47 100644 --- a/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart +++ b/packages/registration_delivery/lib/widgets/back_navigation_help_header.dart @@ -1,5 +1,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; +import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; import 'package:registration_delivery/widgets/showcase/showcase_button.dart'; @@ -29,32 +32,32 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.all(spacer2 / 2), + padding: const EdgeInsets.only(left: spacer2, top: spacer2), child: Row( children: [ Expanded( child: Row( children: [ if (showBackNavigation) - Flexible( - child: TextButton.icon( - style: TextButton.styleFrom( - foregroundColor: theme.colorScheme.onBackground, - padding: EdgeInsets.zero, - ), - onPressed: () { - context.router.maybePop(); - handleBack != null ? handleBack!() : null; - }, - icon: const Icon(Icons.arrow_left_sharp), - label: Text( - RegistrationDeliveryLocalization.of(context).translate( - i18.common.coreCommonBack, - ), - overflow: TextOverflow.ellipsis, + DigitBackButton(label: RegistrationDeliveryLocalization.of(context).translate( + i18.common.coreCommonBack, + ), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size: MediaQuery.of(context).size.width < 500 + ? Theme.of(context).spacerTheme.spacer5 + : Theme.of(context).spacerTheme.spacer6, + color: Theme.of(context).colorTheme.primary.primary2, ), ), - ), + handleBack: () { + context.router.maybePop(); + handleBack != null ? handleBack!() : null; + }, + ) ], ), ), diff --git a/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart b/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart index 18c08f186..98bd88e13 100644 --- a/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart +++ b/packages/registration_delivery/lib/widgets/beneficiary/beneficiary_card.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:registration_delivery/blocs/app_localization.dart'; import '../../models/entities/status.dart'; +import '../../utils/utils.dart'; class BeneficiaryCard extends StatelessWidget { final String title; @@ -35,35 +36,40 @@ class BeneficiaryCard extends StatelessWidget { style: theme.textTheme.headlineSmall, ), ), - Offstage( - offstage: status == null, - child: status == Status.visited.toValue() || - status == Status.registered.toValue() || - status == Status.administeredSuccess.toValue() || - status == Status.delivered.toValue() - ? Button( - prefixIcon: Icons.check_circle, - label: RegistrationDeliveryLocalization.of(context) - .translate(status.toString()), - textColor: theme.colorScheme.onSurfaceVariant, - iconColor: theme.colorScheme.onSurfaceVariant, - isDisabled: true, - onPressed: () {}, - type: ButtonType.tertiary, - size: ButtonSize.medium, - ) - : Button( - prefixIcon: Icons.info_rounded, - label: RegistrationDeliveryLocalization.of(context) - .translate(status.toString()), - textColor: theme.colorScheme.error, - iconColor: theme.colorScheme.error, - type: ButtonType.tertiary, - size: ButtonSize.medium, - isDisabled: true, - onPressed: () {}, - ), - ), + if (status != null) + Offstage( + offstage: status == null, + child: status == Status.visited.toValue() || + status == Status.registered.toValue() || + status == Status.administeredSuccess.toValue() || + status == Status.delivered.toValue() + ? DigitButton( + prefixIcon: Icons.check_circle, + label: RegistrationDeliveryLocalization.of(context) + .translate(status.toString() == + Status.administeredSuccess.toValue() + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_${status.toString()}' + : status.toString()), + capitalizeLetters: false, + textColor: theme.colorScheme.onSurfaceVariant, + iconColor: theme.colorScheme.onSurfaceVariant, + isDisabled: true, + onPressed: () {}, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + ) + : DigitButton( + prefixIcon: Icons.info_rounded, + label: RegistrationDeliveryLocalization.of(context) + .translate(status.toString()), + textColor: theme.colorScheme.error, + iconColor: theme.colorScheme.error, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + isDisabled: true, + onPressed: () {}, + ), + ), if (subtitle != null) Padding( padding: const EdgeInsets.all(4), diff --git a/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart b/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart index 58bfa3070..41c94c625 100644 --- a/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart +++ b/packages/registration_delivery/lib/widgets/beneficiary/resource_beneficiary_card.dart @@ -1,3 +1,4 @@ +import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; @@ -5,7 +6,6 @@ import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:reactive_forms/reactive_forms.dart'; -import 'package:digit_data_model/data_model.dart'; import '../../utils/i18_key_constants.dart' as i18; import '../localized.dart'; @@ -34,42 +34,52 @@ class ResourceBeneficiaryCardState extends LocalizedState { @override Widget build(BuildContext context) { - return DigitCard( - cardType: CardType.secondary, - children: [BlocBuilder( + return DigitCard(cardType: CardType.secondary, children: [ + BlocBuilder( builder: (context, productState) { return productState.maybeWhen( orElse: () => const Offstage(), fetched: (productVariants) { - return - SelectionCard( - equalWidthOptions: true, - options: productVariants, - onSelectionChanged: (selectedOptions) { - if (selectedOptions.isNotEmpty) { - var selectedOption = selectedOptions.first; - widget.form.control('resourceDelivered.${widget.cardIndex}').value = selectedOption; - }else{ - widget.form.control('resourceDelivered.${widget.cardIndex}').value = null; - } - }, - initialSelection: widget.form.control('resourceDelivered.${widget.cardIndex}').value != null ? [ - widget.form.control('resourceDelivered.${widget.cardIndex}').value - ] : [], - valueMapper: (value) { - return localizations.translate( - value.sku ?? value.id, - ); - }, - allowMultipleSelection: false, - ); + return SelectionCard( + equalWidthOptions: true, + showParentContainer: true, + options: productVariants, + onSelectionChanged: (selectedOptions) { + if (selectedOptions.isNotEmpty) { + var selectedOption = selectedOptions.first; + widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value = selectedOption; + } else { + widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value = null; + } + }, + initialSelection: widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value != + null + ? [ + widget.form + .control('resourceDelivered.${widget.cardIndex}') + .value + ] + : [], + valueMapper: (value) { + return localizations.translate( + value.sku ?? value.id, + ); + }, + allowMultipleSelection: false, + ); }, ); }, ), ReactiveWrapperField( formControlName: 'quantityDistributed.${widget.cardIndex}', - builder: (field)=> LabeledField( + builder: (field) => LabeledField( label: localizations.translate( i18.deliverIntervention.quantityDistributedLabel, ), @@ -77,67 +87,67 @@ class ResourceBeneficiaryCardState minValue: 1, step: 1, initialValue: "0", - onChange: (value){ - widget.form.control('quantityDistributed.${widget.cardIndex}').value=int.parse(value); + onChange: (value) { + widget.form + .control('quantityDistributed.${widget.cardIndex}') + .value = int.parse(value); }, ), ), ), Align( alignment: Alignment.centerLeft, - child: (widget.cardIndex == widget.totalItems - 1 && - widget.totalItems > 1) - ? Button( - onPressed: () async { - final submit = await showDialog( - context: context, - builder: (ctx)=> Popup( - title: localizations.translate( - i18.deliverIntervention - .resourceDeleteBeneficiaryDialogTitle, - ), - actions: [ - Button( - label: localizations.translate( - i18.deliverIntervention - .resourceDeleteBeneficiaryPrimaryActionLabel, - ), - onPressed: () { - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - }, - type: ButtonType.primary, - size: ButtonSize.large + child: + (widget.cardIndex == widget.totalItems - 1 && widget.totalItems > 1) + ? DigitButton( + onPressed: () async { + final submit = await showDialog( + context: context, + builder: (ctx) => Popup( + title: localizations.translate( + i18.deliverIntervention + .resourceDeleteBeneficiaryDialogTitle, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.deliverIntervention + .resourceDeleteBeneficiaryPrimaryActionLabel, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.common.coreCommonCancel, + ), + onPressed: () => Navigator.of( + context, + rootNavigator: true, + ).pop(false), + type: DigitButtonType.secondary, + size: DigitButtonSize.large), + ], ), - Button( - label: localizations.translate( - i18.common.coreCommonCancel, - ), - onPressed: () => Navigator.of( - context, - rootNavigator: true, - ).pop(false), - type: ButtonType.secondary, - size: ButtonSize.large - ), - ], + ); + if (submit == true) { + widget.onDelete(widget.cardIndex); + } + }, + label: localizations.translate( + i18.deliverIntervention.resourceDeleteBeneficiary, ), - ); - if (submit == true) { - widget.onDelete(widget.cardIndex); - } - }, - label: localizations.translate( - i18.deliverIntervention.resourceDeleteBeneficiary, - ), - prefixIcon: Icons.delete, - type: ButtonType.tertiary, - size: ButtonSize.medium, - ) - : const Offstage(), - ),] - ); + prefixIcon: Icons.delete, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, + ) + : const Offstage(), + ), + ]); } } diff --git a/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart b/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart index ea60ce2d1..4ac6e2906 100644 --- a/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart +++ b/packages/registration_delivery/lib/widgets/beneficiary/view_beneficiary_card.dart @@ -156,11 +156,6 @@ class ViewBeneficiaryCardState extends LocalizedState { (taskData ?? []).isNotEmpty ? taskData?.last : null, sideEffects, ); - final isSideEffectRecorded = recordedSideEffect( - currentCycle, - (taskData ?? []).isNotEmpty ? taskData?.last : null, - sideEffects, - ); final isBeneficiaryRefused = checkIfBeneficiaryRefused(taskData); final isBeneficiaryReferred = checkIfBeneficiaryReferred( referralData, @@ -286,79 +281,78 @@ class ViewBeneficiaryCardState extends LocalizedState { t.projectBeneficiaryClientReferenceId == projectBeneficiary?.clientReferenceId); - return DigitCard( - margin: const EdgeInsets.only(top: spacer2, bottom: spacer2), + return DigitCard(margin: const EdgeInsets.all(spacer2), children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: MediaQuery.of(context).size.width / 1.8, - child: BeneficiaryCard( - description: [ - householdMember.household?.address?.doorNo, - householdMember.household?.address?.addressLine1, - householdMember.household?.address?.addressLine2, - householdMember.household?.address?.landmark, - householdMember.household?.address?.city, - householdMember.household?.address?.pincode, - ].whereNotNull().take(2).join(' '), - subtitle: widget.distance != null - ? '${householdMember.members?.length ?? 1} ${householdMember.members?.length == 1 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}\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 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}', - status: getStatus( - tasks ?? [], - householdMember.projectBeneficiaries ?? [], - RegistrationDeliverySingleton().beneficiaryType == - BeneficiaryType.individual - ? isNotEligible - : false, - isBeneficiaryRefused), - title: [ - householdMember.headOfHousehold?.name?.givenName ?? - localizations.translate(i18.common.coreCommonNA), - householdMember.headOfHousehold?.name?.familyName, - ].whereNotNull().join(''), - ), - ), - Flexible( - child: Button( - label: - localizations.translate(i18.searchBeneficiary.iconLabel), - onPressed: widget.onOpenPressed, - type: ButtonType.secondary, - size: ButtonSize.medium, - ), - ), - ], + SizedBox( + width: MediaQuery.of(context).size.width / 1.8, + child: BeneficiaryCard( + description: [ + householdMember.household?.address?.doorNo, + householdMember.household?.address?.addressLine1, + householdMember.household?.address?.addressLine2, + householdMember.household?.address?.landmark, + householdMember.household?.address?.city, + householdMember.household?.address?.pincode, + ].whereNotNull().take(2).join(' '), + subtitle: widget.distance != null + ? '${householdMember.members?.length ?? 1} ${householdMember.members?.length == 1 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}\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 ? localizations.translate(i18.beneficiaryDetails.householdMemberSingular) : localizations.translate(i18.beneficiaryDetails.householdMemberPlural)}', + status: getStatus( + tasks ?? [], + householdMember.projectBeneficiaries ?? [], + RegistrationDeliverySingleton().beneficiaryType == + BeneficiaryType.individual + ? isNotEligible + : false, + isBeneficiaryRefused), + title: [ + householdMember.headOfHousehold?.name?.givenName ?? + localizations.translate(i18.common.coreCommonNA), + householdMember.headOfHousehold?.name?.familyName, + ].whereNotNull().join(''), + ), ), - Offstage( - offstage: !isCardExpanded, - child: DigitTable( - enableBorder: true, - showPagination: false, - columns: filteredHeaderList, - rows: tableData ?? [], + Flexible( + child: DigitButton( + label: localizations.translate(i18.searchBeneficiary.iconLabel), + onPressed: widget.onOpenPressed, + type: DigitButtonType.secondary, + size: DigitButtonSize.medium, ), ), - Container( - height: 24, - margin: const EdgeInsets.all(4), - child: Center( - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon( - isCardExpanded - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, - size: 24, - ), - onPressed: () => isCardExpanded = !isCardExpanded, - ), + ], + ), + if (isCardExpanded) + Offstage( + offstage: !isCardExpanded, + child: DigitTable( + enableBorder: true, + showPagination: false, + showSelectedState: false, + columns: filteredHeaderList, + rows: tableData ?? [], + ), + ), + Container( + height: 24, + margin: const EdgeInsets.all(4), + child: Center( + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + isCardExpanded + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, + size: 24, ), + onPressed: () => isCardExpanded = !isCardExpanded, ), - ]); + ), + ), + ]); } String getTableCellText( diff --git a/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart b/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart index bd158dde8..927baa989 100644 --- a/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart +++ b/packages/registration_delivery/lib/widgets/inventory/no_facilities_assigned_dialog.dart @@ -22,11 +22,11 @@ class NoFacilitiesAssignedDialog { description: RegistrationDeliveryLocalization.of(context) .translate(i18.referBeneficiary.noFacilityAssignedDescription), actions: [ - Button( + DigitButton( label: RegistrationDeliveryLocalization.of(context) .translate(i18.common.corecommonclose), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, onPressed: () { Navigator.of(context, rootNavigator: true).pop(); context.router.maybePop(); diff --git a/packages/registration_delivery/lib/widgets/member_card/member_card.dart b/packages/registration_delivery/lib/widgets/member_card/member_card.dart index f3334c9e8..2879644da 100644 --- a/packages/registration_delivery/lib/widgets/member_card/member_card.dart +++ b/packages/registration_delivery/lib/widgets/member_card/member_card.dart @@ -105,53 +105,56 @@ class MemberCard extends StatelessWidget { Positioned( child: Align( alignment: Alignment.topRight, - child: Button( - isDisabled: (projectBeneficiaries ?? []).isEmpty, - onPressed: () => showDialog( - context: context, - builder: (ctx) => ActionCard( - onOutsideTap: () { - Navigator.of(context, rootNavigator: true).pop(); - }, - actions: [ - Button( - prefixIcon: Icons.person, - label: localizations.translate( - i18.memberCard.assignAsHouseholdhead, + child: Padding( + padding: const EdgeInsets.only(top: spacer2), + child: DigitButton( + isDisabled: (projectBeneficiaries ?? []).isEmpty, + onPressed: () => showDialog( + context: context, + builder: (ctx) => DigitActionCard( + onOutsideTap: () { + Navigator.of(context, rootNavigator: true).pop(); + }, + actions: [ + DigitButton( + prefixIcon: Icons.person, + label: localizations.translate( + i18.memberCard.assignAsHouseholdhead, + ), + isDisabled: isHead ? true : false, + onPressed: setAsHeadAction, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, ), - isDisabled: isHead ? true : false, - onPressed: setAsHeadAction, - type: ButtonType.secondary, - size: ButtonSize.large, - ), - Button( - prefixIcon: Icons.edit, - label: localizations.translate( - i18.memberCard.editIndividualDetails, + DigitButton( + prefixIcon: Icons.edit, + label: localizations.translate( + i18.memberCard.editIndividualDetails, + ), + onPressed: editMemberAction, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, ), - onPressed: editMemberAction, - type: ButtonType.secondary, - size: ButtonSize.large, - ), - Button( - prefixIcon: Icons.delete, - label: localizations.translate( - i18.memberCard.deleteIndividualActionText, + DigitButton( + prefixIcon: Icons.delete, + label: localizations.translate( + i18.memberCard.deleteIndividualActionText, + ), + isDisabled: isHead ? true : false, + onPressed: deleteMemberAction, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, ), - isDisabled: isHead ? true : false, - onPressed: deleteMemberAction, - type: ButtonType.secondary, - size: ButtonSize.large, - ), - ], + ], + ), ), + label: localizations.translate( + i18.memberCard.editDetails, + ), + prefixIcon: Icons.edit, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, ), - label: localizations.translate( - i18.memberCard.editDetails, - ), - prefixIcon: Icons.edit, - type: ButtonType.tertiary, - size: ButtonSize.medium, ), ), ), @@ -181,8 +184,7 @@ class MemberCard extends StatelessWidget { ), ), Padding( - padding: - const EdgeInsets.only(left: spacer1, bottom: spacer2), + padding: const EdgeInsets.only(left: spacer1, bottom: spacer2), child: Offstage( offstage: beneficiaryType != BeneficiaryType.individual, child: !isDelivered || @@ -191,7 +193,7 @@ class MemberCard extends StatelessWidget { isBeneficiaryReferred ? Align( alignment: Alignment.centerLeft, - child: Button( + child: DigitButton( prefixIcon: Icons.info_rounded, label: localizations.translate( isNotEligible @@ -207,15 +209,15 @@ class MemberCard extends StatelessWidget { ), textColor: DigitTheme.instance.colorScheme.error, iconColor: DigitTheme.instance.colorScheme.error, - type: ButtonType.tertiary, - size: ButtonSize.medium, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, isDisabled: true, onPressed: () {}, ), ) : Align( alignment: Alignment.centerLeft, - child: Button( + child: DigitButton( prefixIcon: Icons.check_circle, label: localizations.translate( i18.householdOverView @@ -226,8 +228,8 @@ class MemberCard extends StatelessWidget { .instance.colorScheme.onSurfaceVariant, iconColor: DigitTheme .instance.colorScheme.onSurfaceVariant, - type: ButtonType.tertiary, - size: ButtonSize.medium, + type: DigitButtonType.tertiary, + size: DigitButtonSize.medium, onPressed: () {}, ), ), @@ -247,14 +249,14 @@ class MemberCard extends StatelessWidget { isBeneficiaryReferred ? const Offstage() : !isNotEligible - ? Button( + ? DigitButton( mainAxisSize: MainAxisSize.max, isDisabled: (projectBeneficiaries ?? []).isEmpty ? true : false, - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, label: allDosesDelivered( tasks, context.selectedCycle, @@ -324,20 +326,20 @@ class MemberCard extends StatelessWidget { ) && !checkStatus(tasks, context.selectedCycle))) ? const Offstage() - : Button( + : DigitButton( label: localizations.translate( i18.memberCard.unableToDeliverLabel, ), isDisabled: (projectBeneficiaries ?? []).isEmpty ? true : false, - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () async { await showDialog( context: context, - builder: (ctx) => ActionCard( + builder: (ctx) => DigitActionCard( onOutsideTap: () { Navigator.of( context, @@ -345,13 +347,13 @@ class MemberCard extends StatelessWidget { ).pop(); }, actions: [ - Button( + DigitButton( label: localizations.translate( i18.memberCard .beneficiaryRefusedLabel, ), - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, onPressed: () { Navigator.of(context, rootNavigator: true) @@ -441,12 +443,12 @@ class MemberCard extends StatelessWidget { ); }, ), - Button( + DigitButton( label: localizations.translate( i18.memberCard.referBeneficiaryLabel, ), - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, onPressed: () async { Navigator.of( context, @@ -461,7 +463,7 @@ class MemberCard extends StatelessWidget { ); }, ), - Button( + DigitButton( label: localizations.translate( i18.memberCard .recordAdverseEventsLabel, @@ -470,8 +472,8 @@ class MemberCard extends StatelessWidget { (tasks ?? []).isNotEmpty ? false : true, - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () async { Navigator.of( diff --git a/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart b/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart index 870639f6e..3d2ef9bf6 100644 --- a/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart +++ b/packages/registration_delivery/lib/widgets/status_filter/status_filter.dart @@ -3,7 +3,6 @@ import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; import 'package:flutter/material.dart'; import 'package:registration_delivery/registration_delivery.dart'; -import '../../utils/i18_key_constants.dart' as i18; import '../../models/entities/status.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -104,8 +103,10 @@ class StatusFilterState extends LocalizedState { }); }, valueMapper: (value) { - return localizations - .translate(value.toValue().toString()); + return localizations.translate(value == + Status.administeredSuccess + ? '${RegistrationDeliverySingleton().selectedProject!.projectType}_${value.toValue().toString()}' + : value.toValue().toString()); }, ), ), @@ -119,13 +120,13 @@ class StatusFilterState extends LocalizedState { MainAxisAlignment.spaceEvenly, // Adjust button spacing children: [ Expanded( - child: Button( + child: DigitButton( label: localizations.translate( i18.searchBeneficiary.clearFilter, ), isDisabled: selectedButtons.isEmpty, - type: ButtonType.secondary, - size: ButtonSize.medium, + type: DigitButtonType.secondary, + size: DigitButtonSize.medium, onPressed: () { setState(() { selectedButtons.clear(); @@ -136,13 +137,13 @@ class StatusFilterState extends LocalizedState { width: spacer2, ), Expanded( - child: Button( + child: DigitButton( label: localizations.translate( i18.searchBeneficiary.applyFilter, ), isDisabled: selectedButtons.isEmpty, - type: ButtonType.primary, - size: ButtonSize.medium, + type: DigitButtonType.primary, + size: DigitButtonSize.medium, onPressed: () { setState(() { isLoading = true; diff --git a/packages/registration_delivery/lib/widgets/table_card/table_card.dart b/packages/registration_delivery/lib/widgets/table_card/table_card.dart index 55abdf3fa..f0231569a 100644 --- a/packages/registration_delivery/lib/widgets/table_card/table_card.dart +++ b/packages/registration_delivery/lib/widgets/table_card/table_card.dart @@ -1,4 +1,5 @@ import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; class DigitTableCard extends StatelessWidget { @@ -27,16 +28,15 @@ class DigitTableCard extends StatelessWidget { @override Widget build(BuildContext context) { - return LabelValueList( - labelFlex: 6, - maxLines: 2, - items: element.keys - .map((e)=>LabelValuePair( - label: e, - value: element[e].toString(), - - ) - ).toList(), + return LabelValueSummary( + padding: EdgeInsets.all(0), + items: element.keys + .map((e) => LabelValueItem( + label: e, + value: element[e].toString(), + labelFlex: 5, + )) + .toList(), ); } } diff --git a/packages/registration_delivery/pubspec.lock b/packages/registration_delivery/pubspec.lock index f43c0acdf..e027ca226 100644 --- a/packages/registration_delivery/pubspec.lock +++ b/packages/registration_delivery/pubspec.lock @@ -117,18 +117,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" bloc: dependency: transitive description: @@ -186,13 +186,13 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: @@ -221,26 +221,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -333,10 +333,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -373,11 +373,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -402,30 +402,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.1" - digit_components: - dependency: transitive - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: "direct main" description: name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "1.0.5" digit_scanner: dependency: "direct main" description: name: digit_scanner - sha256: "9862c4885465bb1942e36dc9b42596c201648db9b0f5ffb8ad768e2409fc2742" + sha256: c33af61ed9ab3d7740fc3c8948af4b763d946cba5e902f8bfb00948d4d69d60a url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "1.0.4" digit_showcase: dependency: "direct main" description: @@ -438,12 +430,12 @@ packages: dependency: "direct main" description: name: digit_ui_components - sha256: e38f163515aa6a6c5283754e741b21f33fb3a6c0a1fc171a1e4e6620510d46ae + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "0.0.1+7" + version: "0.0.2-dev.4" dio: - dependency: transitive + dependency: "direct main" description: name: dio sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" @@ -470,10 +462,10 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "6acedc562ffeed308049f78fb1906abad3d65714580b6745441ee6d50ec564cd" url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.18.0" drift_db_viewer: dependency: "direct main" description: @@ -486,18 +478,10 @@ packages: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: d9b020736ea85fff1568699ce18b89fabb3f0f042e8a7a05e84a3ec20d39acde url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.18.0" fake_async: dependency: transitive description: @@ -607,14 +591,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.13" - 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: @@ -667,10 +643,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_localizations: dependency: transitive description: flutter @@ -713,14 +689,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -730,10 +698,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" formula_parser: dependency: "direct main" description: @@ -778,10 +746,10 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.3.1" + version: "4.6.1" geolocator_apple: dependency: transitive description: @@ -826,26 +794,26 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_mlkit_barcode_scanning: dependency: transitive description: name: google_mlkit_barcode_scanning - sha256: "965183a8cd5cef8477ceea5dbdf29c34a739cf0cfbf1bdad54cd3f9f1807afe5" + sha256: f1a2a39cf1730b9a5e2784a07efa1ca5bfdfdde6aa00b193b3f8cd1953c638ec url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.12.0" google_mlkit_commons: dependency: transitive description: name: google_mlkit_commons - sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" + sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" graphs: dependency: transitive description: @@ -890,10 +858,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -978,10 +946,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -1030,38 +998,62 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" location: - dependency: transitive + dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: @@ -1074,34 +1066,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -1154,26 +1146,26 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -1266,18 +1258,10 @@ packages: dependency: "direct main" description: name: pluto_grid - sha256: e77c34a33dd9d74abbe20ba1df96474dded150dd042c7f7495be1bc2c26bd37f + sha256: "1d4cd9d2652742b556aa9b3230cc64672a3f63c34a9acc80fef794ab36ad903b" url: "https://pub.dev" source: hosted - version: "7.0.2" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" + version: "8.0.0" pool: dependency: transitive description: @@ -1310,22 +1294,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: "direct main" description: @@ -1334,14 +1310,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" rxdart: dependency: transitive description: @@ -1427,6 +1395,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: @@ -1447,10 +1423,10 @@ packages: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: ade9a67fd70d0369329ed3373208de7ebd8662470e8c396fc8d0d60f9acdfc9f url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.36.0" stack_trace: dependency: transitive description: @@ -1487,10 +1463,10 @@ packages: dependency: "direct main" description: name: survey_form - sha256: "52532fb3fae06883828d22f870045587bf7122f67cb4de236c82ad4d6de1d7d7" + sha256: "5e3a08570fe8c97d7dfd0bc6f28b2ae829e2fe66ce987504920c20d091c47c19" url: "https://pub.dev" source: hosted - version: "0.0.1-dev.2" + version: "1.0.0" synchronized: dependency: transitive description: @@ -1511,26 +1487,26 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: @@ -1623,10 +1599,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: @@ -1639,10 +1615,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: @@ -1687,10 +1663,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1703,10 +1679,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -1756,5 +1732,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <3.9.0" + flutter: ">=3.22.0" diff --git a/packages/registration_delivery/pubspec.yaml b/packages/registration_delivery/pubspec.yaml index 735ffc4a5..e69849bfa 100644 --- a/packages/registration_delivery/pubspec.yaml +++ b/packages/registration_delivery/pubspec.yaml @@ -1,6 +1,6 @@ name: registration_delivery description: This package enables health facility workers to register a household and individual members and deliver the resources. -version: 1.0.4-dev.5 +version: 1.0.5+2 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/registration_delivery repository: https://github.com/egovernments/health-campaign-field-worker-app @@ -11,52 +11,54 @@ environment: dependencies: flutter: sdk: flutter - digit_ui_components: ^0.0.1+7 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 + intl: ^0.19.0 + flutter_svg: ^2.0.10+1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 + collection: ^1.18.0 + dio: ^5.4.3+1 + location: ^6.0.2 + gs1_barcode_parser: ^1.0.5 + uuid: ^4.4.0 + recase: ^4.1.0 + pluto_grid: ^8.0.0 + digit_scanner: ^1.0.4 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 - flutter_svg: ^2.0.8 - dart_mappable: ^4.2.0 - drift: ^2.0.0 sqlite3_flutter_libs: ^0.5.10 path_provider: ^2.0.11 - path: ^1.8.2 + path: ^1.9.0 drift_db_viewer: ^2.0.0 - uuid: ^3.0.6 - recase: ^4.1.0 - pluto_grid: ^7.0.1 - digit_scanner: ^1.0.3+1 - gs1_barcode_parser: ^1.0.5 - auto_route: ^7.8.4 - digit_data_model: ^1.0.5-dev.1 - package_info_plus: ^5.0.1 + package_info_plus: ^8.0.0 digit_showcase: ^1.0.0 - collection: ^1.16.0 - flutter_keyboard_visibility: ^5.4.0 stream_transform: ^2.1.0 async: ^2.11.0 formula_parser: ^2.0.1 - survey_form: ^0.0.1-dev.2 + flutter_keyboard_visibility: ^5.4.1 + survey_form: ^1.0.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 freezed: ^2.1.0+1 json_serializable: ^6.4.0 drift_dev: ^2.14.1 bloc_test: ^9.1.0 mocktail: ^1.0.2 + build_runner: ^2.4.11 dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 flutter: assets: diff --git a/packages/survey_form/CHANGELOG.md b/packages/survey_form/CHANGELOG.md index a4b25e89c..2b8b823e2 100644 --- a/packages/survey_form/CHANGELOG.md +++ b/packages/survey_form/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.0 + +* Upgrade to Flutter 3.22 +* Updated digit_data_model to latest version + ## 0.0.1-dev.2 * Migrated to digit_ui_components diff --git a/packages/survey_form/example/lib/main.dart b/packages/survey_form/example/lib/main.dart index fd1f0977e..e07157450 100644 --- a/packages/survey_form/example/lib/main.dart +++ b/packages/survey_form/example/lib/main.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:digit_components/widgets/digit_elevated_button.dart'; +import 'package:digit_ui_components/digit_components.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:survey_form/blocs/app_localization.dart'; @@ -76,10 +76,11 @@ class _MyHomePageState extends State { title: Text(widget.title), ), body: Center( - child: Container( + child: SizedBox( width: 300, - child: DigitElevatedButton( - child: const Text("Acknowledgement Page"), + child: DigitButton( + label: "Acknowledgement Page", + size: DigitButtonSize.large, onPressed: () { Navigator.of(context).push(MaterialPageRoute( builder: (BuildContext context) => @@ -90,6 +91,7 @@ class _MyHomePageState extends State { languages), ))); }, + type: DigitButtonType.primary, ), ), ), diff --git a/packages/survey_form/example/pubspec.lock b/packages/survey_form/example/pubspec.lock index 096ab7ba9..b71a66a16 100644 --- a/packages/survey_form/example/pubspec.lock +++ b/packages/survey_form/example/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: "8de4a280ce7861ef24a6baa14c2b02b77a8c31b4a4c4f12d7b608678cc657c7f" url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.1.4" bloc: dependency: transitive description: @@ -133,26 +133,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -229,10 +229,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: @@ -273,38 +273,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.6" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - digit_components: - dependency: "direct main" - description: - name: digit_components - sha256: "07b585e5d8010639366da72a4a8b215ce9b8790c75b2162b66af3cea57ca35d9" - url: "https://pub.dev" - source: hosted - version: "1.0.2+1" digit_data_model: dependency: transitive description: name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "1.0.5" digit_ui_components: - dependency: transitive + dependency: "direct main" description: name: digit_ui_components - sha256: e38f163515aa6a6c5283754e741b21f33fb3a6c0a1fc171a1e4e6620510d46ae + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "0.0.1+7" + version: "0.0.2-dev.4" dio: dependency: transitive description: @@ -333,26 +317,10 @@ packages: dependency: transitive description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: transitive - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - easy_stepper: - dependency: transitive - description: - name: easy_stepper - sha256: "77f3ab4ee3c867b5a2236bf712abb08fed2b1c533cf24cf3fcd46c2821072ffd" + sha256: c2d073d35ad441730812f4ea05b5dd031fb81c5f9786a4f5fb77ecd6307b6f74 url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "2.22.1" fake_async: dependency: transitive description: @@ -462,62 +430,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.13" - 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: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" - url: "https://pub.dev" - source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: - dependency: transitive - description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: - dependency: transitive - description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: - dependency: transitive - description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: - dependency: transitive - description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: - dependency: transitive - description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.dev" - source: hosted - version: "1.0.0" flutter_lints: dependency: "direct dev" description: @@ -568,14 +480,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -617,10 +521,10 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.3.1" + version: "4.6.1" geolocator_apple: dependency: transitive description: @@ -665,10 +569,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: @@ -705,10 +609,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -793,10 +697,10 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -837,6 +741,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -849,26 +777,26 @@ packages: dependency: transitive description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" logging: dependency: transitive description: @@ -881,34 +809,34 @@ packages: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -949,30 +877,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" - url: "https://pub.dev" - source: hosted - version: "2.0.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -1061,14 +973,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -1101,22 +1005,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: transitive description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: transitive description: @@ -1125,14 +1021,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" - remove_emoji_input_formatter: - dependency: transitive - description: - name: remove_emoji_input_formatter - sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f" - url: "https://pub.dev" - source: hosted - version: "0.0.1+1" shelf: dependency: transitive description: @@ -1162,14 +1050,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: bb174b3ec2527f9c5f680f73a89af8149dd99782fbb56ea88ad0807c5638f2ed url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.7" sqlite3_flutter_libs: dependency: transitive description: @@ -1216,7 +1112,7 @@ packages: path: ".." relative: true source: path - version: "0.0.1-dev.2" + version: "1.0.0" term_glyph: dependency: transitive description: @@ -1229,10 +1125,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" timing: dependency: transitive description: @@ -1325,10 +1221,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: @@ -1341,10 +1237,10 @@ packages: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: @@ -1385,6 +1281,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" watcher: dependency: transitive description: @@ -1397,10 +1301,10 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -1442,5 +1346,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/survey_form/example/pubspec.yaml b/packages/survey_form/example/pubspec.yaml index 2c953d27a..efb21d3b9 100644 --- a/packages/survey_form/example/pubspec.yaml +++ b/packages/survey_form/example/pubspec.yaml @@ -28,7 +28,7 @@ environment: # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: - digit_components: ^1.0.0+2 + digit_ui_components: ^0.0.2-dev.4 survey_form: path: ../ diff --git a/packages/survey_form/lib/data/repositories/local/service.dart b/packages/survey_form/lib/data/repositories/local/service.dart index 99758d67f..693d1bbac 100644 --- a/packages/survey_form/lib/data/repositories/local/service.dart +++ b/packages/survey_form/lib/data/repositories/local/service.dart @@ -115,16 +115,19 @@ class ServiceLocalRepository final attribute = e.readTableOrNull(sql.serviceAttributes); if (attribute != null) { return ServiceAttributesModel( - clientReferenceId: attribute.clientReferenceId, - attributeCode: attribute.attributeCode, - value: attribute.value, - referenceId: attribute.referenceId, - dataType: attribute.dataType, - additionalDetails: attribute.additionalDetails, - tenantId: attribute.tenantId, - isDeleted: attribute.isDeleted, - rowVersion: attribute.rowVersion, - ); + clientReferenceId: attribute.clientReferenceId, + attributeCode: attribute.attributeCode, + value: attribute.value, + referenceId: attribute.referenceId, + dataType: attribute.dataType, + additionalDetails: attribute.additionalDetails, + tenantId: attribute.tenantId, + isDeleted: attribute.isDeleted, + rowVersion: attribute.rowVersion, + additionalFields: attribute.additionalFields != null + ? ServiceAttributesAdditionalFieldsMapper.fromJson( + attribute.additionalFields!) + : null); } }).toList(); diff --git a/packages/survey_form/lib/data/repositories/remote/service.dart b/packages/survey_form/lib/data/repositories/remote/service.dart index 25eb3d70d..4a2eb2db2 100644 --- a/packages/survey_form/lib/data/repositories/remote/service.dart +++ b/packages/survey_form/lib/data/repositories/remote/service.dart @@ -1,14 +1,16 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; + import '../../../models/entities/service.dart'; -class ServiceRemoteRepository extends RemoteRepository { +class ServiceRemoteRepository + extends RemoteRepository { ServiceRemoteRepository( - super.dio, { - required super.actionMap, - super.entityName = 'Service', - }); + super.dio, { + required super.actionMap, + super.entityName = 'Service', + }); @override DataModelType get type => DataModelType.service; diff --git a/packages/survey_form/lib/data/repositories/remote/service_attributes.dart b/packages/survey_form/lib/data/repositories/remote/service_attributes.dart index 81d346d0c..6df1f26a5 100644 --- a/packages/survey_form/lib/data/repositories/remote/service_attributes.dart +++ b/packages/survey_form/lib/data/repositories/remote/service_attributes.dart @@ -1,14 +1,16 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; + import '../../../models/entities/service_attributes.dart'; -class ServiceAttributesRemoteRepository extends RemoteRepository { +class ServiceAttributesRemoteRepository extends RemoteRepository< + ServiceAttributesModel, ServiceAttributesSearchModel> { ServiceAttributesRemoteRepository( - super.dio, { - required super.actionMap, - super.entityName = 'ServiceAttributes', - }); + super.dio, { + required super.actionMap, + super.entityName = 'ServiceAttributes', + }); @override DataModelType get type => DataModelType.serviceAttributes; diff --git a/packages/survey_form/lib/data/repositories/remote/service_definition.dart b/packages/survey_form/lib/data/repositories/remote/service_definition.dart index 869bcea0d..04aded005 100644 --- a/packages/survey_form/lib/data/repositories/remote/service_definition.dart +++ b/packages/survey_form/lib/data/repositories/remote/service_definition.dart @@ -1,14 +1,16 @@ // Generated using mason. Do not modify by hand import 'package:digit_data_model/data_model.dart'; + import '../../../models/entities/service_definition.dart'; -class ServiceDefinitionRemoteRepository extends RemoteRepository { +class ServiceDefinitionRemoteRepository extends RemoteRepository< + ServiceDefinitionModel, ServiceDefinitionSearchModel> { ServiceDefinitionRemoteRepository( - super.dio, { - required super.actionMap, - super.entityName = 'ServiceDefinition', - }); + super.dio, { + required super.actionMap, + super.entityName = 'ServiceDefinition', + }); @override DataModelType get type => DataModelType.serviceDefinition; diff --git a/packages/survey_form/lib/models/entities/service.mapper.dart b/packages/survey_form/lib/models/entities/service.mapper.dart index 2f6f47d4c..ccb102c08 100644 --- a/packages/survey_form/lib/models/entities/service.mapper.dart +++ b/packages/survey_form/lib/models/entities/service.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'service.dart'; @@ -118,10 +118,8 @@ mixin ServiceSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceSearchModelMapper.ensureInitialized() - .isValueEqual(this as ServiceSearchModel, other)); + return ServiceSearchModelMapper.ensureInitialized() + .equalsValue(this as ServiceSearchModel, other); } @override @@ -342,10 +340,8 @@ mixin ServiceModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceModelMapper.ensureInitialized() - .isValueEqual(this as ServiceModel, other)); + return ServiceModelMapper.ensureInitialized() + .equalsValue(this as ServiceModel, other); } @override @@ -583,10 +579,8 @@ mixin ServiceAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAdditionalFieldsMapper.ensureInitialized() - .isValueEqual(this as ServiceAdditionalFields, other)); + return ServiceAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ServiceAdditionalFields, other); } @override diff --git a/packages/survey_form/lib/models/entities/service_attributes.dart b/packages/survey_form/lib/models/entities/service_attributes.dart index 13775fdb1..38f36cc12 100644 --- a/packages/survey_form/lib/models/entities/service_attributes.dart +++ b/packages/survey_form/lib/models/entities/service_attributes.dart @@ -1,12 +1,13 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; +import 'package:digit_data_model/data_model.dart'; import 'package:drift/drift.dart'; -import 'package:digit_data_model/data_model.dart'; part 'service_attributes.mapper.dart'; @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class ServiceAttributesSearchModel extends EntitySearchModel with ServiceAttributesSearchModelMappable { +class ServiceAttributesSearchModel extends EntitySearchModel + with ServiceAttributesSearchModelMappable { final List? clientReferenceId; final String? tenantId; @@ -15,19 +16,19 @@ class ServiceAttributesSearchModel extends EntitySearchModel with ServiceAttribu this.tenantId, super.boundaryCode, super.isDeleted, - }): super(); + }) : super(); @MappableConstructor() ServiceAttributesSearchModel.ignoreDeleted({ this.clientReferenceId, this.tenantId, super.boundaryCode, - }): super(isDeleted: false); + }) : super(isDeleted: false); } @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class ServiceAttributesModel extends EntityModel with ServiceAttributesModelMappable { - +class ServiceAttributesModel extends EntityModel + with ServiceAttributesModelMappable { static const schemaName = 'ServiceAttributes'; final String? attributeCode; @@ -52,9 +53,10 @@ class ServiceAttributesModel extends EntityModel with ServiceAttributesModelMapp required this.clientReferenceId, this.tenantId, this.rowVersion, - super.auditDetails,super.clientAuditDetails, + super.auditDetails, + super.clientAuditDetails, super.isDeleted = false, - }): super(); + }) : super(); //Helper object to represents the data you want to insert or update in a table ServiceAttributesCompanion get companion { @@ -83,11 +85,11 @@ class ServiceAttributesModel extends EntityModel with ServiceAttributesModelMapp } @MappableClass(ignoreNull: true, discriminatorValue: MappableClass.useAsDefault) -class ServiceAttributesAdditionalFields extends AdditionalFields with ServiceAttributesAdditionalFieldsMappable { +class ServiceAttributesAdditionalFields extends AdditionalFields + with ServiceAttributesAdditionalFieldsMappable { ServiceAttributesAdditionalFields({ super.schema = 'ServiceAttributes', required super.version, super.fields, }); } - diff --git a/packages/survey_form/lib/models/entities/service_attributes.mapper.dart b/packages/survey_form/lib/models/entities/service_attributes.mapper.dart index f06beaea4..43b2d3d24 100644 --- a/packages/survey_form/lib/models/entities/service_attributes.mapper.dart +++ b/packages/survey_form/lib/models/entities/service_attributes.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'service_attributes.dart'; @@ -108,10 +108,8 @@ mixin ServiceAttributesSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAttributesSearchModelMapper.ensureInitialized() - .isValueEqual(this as ServiceAttributesSearchModel, other)); + return ServiceAttributesSearchModelMapper.ensureInitialized() + .equalsValue(this as ServiceAttributesSearchModel, other); } @override @@ -330,10 +328,8 @@ mixin ServiceAttributesModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAttributesModelMapper.ensureInitialized() - .isValueEqual(this as ServiceAttributesModel, other)); + return ServiceAttributesModelMapper.ensureInitialized() + .equalsValue(this as ServiceAttributesModel, other); } @override @@ -552,11 +548,8 @@ mixin ServiceAttributesAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceAttributesAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ServiceAttributesAdditionalFields, other)); + return ServiceAttributesAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ServiceAttributesAdditionalFields, other); } @override diff --git a/packages/survey_form/lib/models/entities/service_definition.dart b/packages/survey_form/lib/models/entities/service_definition.dart index 0d66ce150..67812c616 100644 --- a/packages/survey_form/lib/models/entities/service_definition.dart +++ b/packages/survey_form/lib/models/entities/service_definition.dart @@ -1,7 +1,6 @@ // Generated using mason. Do not modify by hand import 'package:dart_mappable/dart_mappable.dart'; import 'package:drift/drift.dart'; - import 'package:digit_data_model/data_model.dart'; part 'service_definition.mapper.dart'; diff --git a/packages/survey_form/lib/models/entities/service_definition.mapper.dart b/packages/survey_form/lib/models/entities/service_definition.mapper.dart index 29a8d7c7c..100fc5329 100644 --- a/packages/survey_form/lib/models/entities/service_definition.mapper.dart +++ b/packages/survey_form/lib/models/entities/service_definition.mapper.dart @@ -1,7 +1,7 @@ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: unused_element, unnecessary_cast +// ignore_for_file: unused_element, unnecessary_cast, override_on_non_overriding_member // ignore_for_file: strict_raw_type, inference_failure_on_untyped_parameter part of 'service_definition.dart'; @@ -116,10 +116,8 @@ mixin ServiceDefinitionSearchModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceDefinitionSearchModelMapper.ensureInitialized() - .isValueEqual(this as ServiceDefinitionSearchModel, other)); + return ServiceDefinitionSearchModelMapper.ensureInitialized() + .equalsValue(this as ServiceDefinitionSearchModel, other); } @override @@ -331,10 +329,8 @@ mixin ServiceDefinitionModelMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceDefinitionModelMapper.ensureInitialized() - .isValueEqual(this as ServiceDefinitionModel, other)); + return ServiceDefinitionModelMapper.ensureInitialized() + .equalsValue(this as ServiceDefinitionModel, other); } @override @@ -553,11 +549,8 @@ mixin ServiceDefinitionAdditionalFieldsMappable { @override bool operator ==(Object other) { - return identical(this, other) || - (runtimeType == other.runtimeType && - ServiceDefinitionAdditionalFieldsMapper.ensureInitialized() - .isValueEqual( - this as ServiceDefinitionAdditionalFields, other)); + return ServiceDefinitionAdditionalFieldsMapper.ensureInitialized() + .equalsValue(this as ServiceDefinitionAdditionalFields, other); } @override diff --git a/packages/survey_form/lib/pages/acknowledgement.dart b/packages/survey_form/lib/pages/acknowledgement.dart index 6593d4dad..27b053a49 100644 --- a/packages/survey_form/lib/pages/acknowledgement.dart +++ b/packages/survey_form/lib/pages/acknowledgement.dart @@ -23,10 +23,12 @@ class SurveyFormAcknowledgementPage extends LocalizedStatefulWidget { }); @override - State createState() => AcknowledgementPageState(); + State createState() => + AcknowledgementPageState(); } -class AcknowledgementPageState extends LocalizedState { +class AcknowledgementPageState + extends LocalizedState { @override Widget build(BuildContext context) { return Scaffold( @@ -36,15 +38,15 @@ class AcknowledgementPageState extends LocalizedState context.router.popUntilRoot(), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, ) ], ), @@ -54,23 +56,24 @@ class AcknowledgementPageState extends LocalizedState { return Column( children: values .map((e) => Padding( - padding: const EdgeInsets.only( - left: spacer4, - right: spacer4, - top: spacer4 - ), - child: MenuCard( + padding: const EdgeInsets.only( + left: spacer4, right: spacer4, top: spacer4), + child: MenuCard( icon: Icons.article, heading: localizations.translate('${e.code}'), onTap: () { @@ -92,18 +88,18 @@ class SurveyFormPageState extends State { .add(ServiceDefinitionSelectionEvent( serviceDefinition: e, )); - + showDialog( context: context, - builder: (ctx)=>ActionCard( - onOutsideTap: (){ + builder: (ctx) => DigitActionCard( + onOutsideTap: () { Navigator.of( context, rootNavigator: true, ).pop(); }, actions: [ - Button( + DigitButton( label: localizations.translate(i18 .surveyForm .surveyFormCreateActionLabel), @@ -116,11 +112,11 @@ class SurveyFormPageState extends State { rootNavigator: true, ).pop(); }, - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, prefixIcon: Icons.edit_calendar, ), - Button( + DigitButton( label: localizations.translate(i18 .surveyForm .surveyFormViewActionLabel), @@ -141,8 +137,8 @@ class SurveyFormPageState extends State { rootNavigator: true, ).pop(); }, - type: ButtonType.secondary, - size: ButtonSize.large, + type: DigitButtonType.secondary, + size: DigitButtonSize.large, prefixIcon: Icons.visibility, ) ], @@ -150,7 +146,7 @@ class SurveyFormPageState extends State { ); }, ), - )) + )) .toList(), ); }, diff --git a/packages/survey_form/lib/pages/survey_form_boundary_view.dart b/packages/survey_form/lib/pages/survey_form_boundary_view.dart index dc0a3c797..2e6c911ba 100644 --- a/packages/survey_form/lib/pages/survey_form_boundary_view.dart +++ b/packages/survey_form/lib/pages/survey_form_boundary_view.dart @@ -2,14 +2,14 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; -import 'package:survey_form/survey_form.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; +import 'package:survey_form/survey_form.dart'; import '../router/survey_form_router.gm.dart'; +import '../utils/i18_key_constants.dart' as i18; import '../widgets/back_navigation_help_header.dart'; import '../widgets/localized.dart'; -import '../utils/i18_key_constants.dart' as i18; @RoutePage() class SurveyFormBoundaryViewPage extends LocalizedStatefulWidget { @@ -39,20 +39,21 @@ class SurveyFormBoundaryViewPageState footer: DigitCard( cardType: CardType.primary, margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), children: [ - Button( - type: ButtonType.primary, + DigitButton( + type: DigitButtonType.primary, label: localizations.translate( i18.common.coreCommonContinue, ), - size: ButtonSize.large, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () => context.router.push(SurveyFormViewRoute()), ), ]), children: [ - DigitCard(cardType: CardType.primary, children: [ + DigitCard( + margin: const EdgeInsets.all(spacer2), + cardType: CardType.primary, children: [ Text( localizations.translate( i18.surveyForm.surveyFormDetailLabel, diff --git a/packages/survey_form/lib/pages/survey_form_preview.dart b/packages/survey_form/lib/pages/survey_form_preview.dart index 6f1061098..ce67a8fb2 100644 --- a/packages/survey_form/lib/pages/survey_form_preview.dart +++ b/packages/survey_form/lib/pages/survey_form_preview.dart @@ -3,15 +3,16 @@ import 'package:digit_ui_components/digit_components.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/label_value_list.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; +import 'package:digit_ui_components/widgets/molecules/label_value_summary.dart'; import 'package:flutter/material.dart'; -import 'package:survey_form/survey_form.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; +import 'package:survey_form/survey_form.dart'; +import '../utils/constants.dart'; +import '../utils/i18_key_constants.dart' as i18; import '../widgets/back_navigation_help_header.dart'; import '../widgets/localized.dart'; -import '../utils/i18_key_constants.dart' as i18; -import '../utils/constants.dart'; import '../widgets/no_result_card.dart'; @RoutePage() @@ -36,6 +37,7 @@ class SurveyFormPreviewPageState extends LocalizedState { header: const Column(children: [ BackNavigationHelpHeaderWidget(), ]), + enableFixedDigitButton: true, footer: BlocBuilder( builder: (context, state) { return state.maybeWhen( @@ -45,14 +47,13 @@ class SurveyFormPreviewPageState extends LocalizedState { ? DigitCard( cardType: CardType.primary, margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), children: [ - Button( + DigitButton( mainAxisSize: MainAxisSize.max, label: localizations .translate(i18.common.corecommonclose), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, onPressed: () { context.read().add( ServiceResetEvent(serviceList: value1), @@ -77,14 +78,17 @@ class SurveyFormPreviewPageState extends LocalizedState { ...serviceList .map((e) => e.serviceDefId != null ? Padding( - padding: const EdgeInsets.all(spacer2), - child: DigitCard( - cardType: CardType.primary, - children: [ + padding: + const EdgeInsets.all(spacer2), + child: DigitCard( + cardType: CardType.primary, + children: [ Align( - alignment: Alignment.centerLeft, + alignment: + Alignment.centerLeft, child: Text( - DateFormat(Constants.SurveyFormPreviewDateFormat) + DateFormat(Constants + .SurveyFormPreviewDateFormat) .format( DateFormat(Constants .defaultDateFormat) @@ -107,13 +111,16 @@ class SurveyFormPreviewPageState extends LocalizedState { ), ), ), - Button( - label: localizations.translate( + DigitButton( + label: localizations + .translate( i18.searchBeneficiary .iconLabel, ), - type: ButtonType.secondary, - size: ButtonSize.medium, + type: DigitButtonType + .secondary, + size: DigitButtonSize + .medium, onPressed: () { context .read() @@ -127,7 +134,7 @@ class SurveyFormPreviewPageState extends LocalizedState { ], ), ]), - ) + ) : const Offstage()) .toList(), ], @@ -152,64 +159,77 @@ class SurveyFormPreviewPageState extends LocalizedState { item2, ) { return DigitCard( - cardType: CardType.primary, - children: [ - Column( + cardType: CardType.primary, children: [ - Align( - alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(spacer2), - child: Text( - localizations.translate( - item2?.code ?? '', + Column( + children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: + const EdgeInsets.all(spacer2), + child: Text( + localizations.translate( + item2?.code ?? '', + ), + style: textTheme.headingXl, + ), ), - style: textTheme.headingXl, ), - ), - ), - ...(selectedService.attributes ?? []) - .where((a) => - a.value != - i18.surveyForm - .notSelectedKey && - a.value != '') - .map( - (e) => Padding( - padding: const EdgeInsets.all(spacer2), - child: Align( - alignment: AlignmentDirectional.topStart, - child: LabelValueList( - items: [ - LabelValuePair( - label: localizations.translate( - "${item2?.code ?? ''}.${e.attributeCode!}", + ...(selectedService.attributes ?? []) + .where((a) => + a.value != + i18.surveyForm + .notSelectedKey && + a.value != '') + .map( + (e) => Padding( + padding: + const EdgeInsets.all(spacer2), + child: Align( + alignment: AlignmentDirectional + .topStart, + child: + LabelValueSummary(items: [ + LabelValueItem( + label: + localizations.translate( + "${item2?.code ?? ''}.${e.attributeCode!}", + ), + value: e.dataType == + 'SingleValueList' + ? localizations + .translate( + '${item2?.code ?? ''}.${e.value.toString().toUpperCase()}', + ) + : e.value ?? "", + isInline: false, + ), + if (e.additionalDetails != + '' && + e.additionalDetails != + null) ...[ + LabelValueItem( + label: localizations + .translate( + "${item2?.code ?? ''}.${e.attributeCode!}.ADDITIONAL_FIELD", ), - value: e.dataType == - 'SingleValueList' - ? localizations + value: localizations .translate( - 'CORE_COMMON_${e.value.toString().toUpperCase()}', - ) - : e.value??"", - isInline: false, - ), - if(e.additionalDetails!='' && e.additionalDetails!=null)...[ - LabelValuePair( - label: localizations.translate("${item2?.code ?? ''}.${e.attributeCode!}.ADDITIONAL_FIELD",), - value: localizations.translate(e.additionalDetails,), + e.additionalDetails, + ), isInline: false, - labelTextStyle: textTheme.bodyL, + labelTextStyle: + textTheme.bodyL, ) ] - ] + ]), + ), ), - ), - ), - ) - ].toList(), - ),] - ); + ) + ].toList(), + ), + ]); }, orElse: () => const Offstage(), ); diff --git a/packages/survey_form/lib/pages/survey_form_view.dart b/packages/survey_form/lib/pages/survey_form_view.dart index 5139a3868..6e1b87183 100644 --- a/packages/survey_form/lib/pages/survey_form_view.dart +++ b/packages/survey_form/lib/pages/survey_form_view.dart @@ -1,27 +1,27 @@ import 'dart:math'; import 'package:auto_route/auto_route.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; +import 'package:digit_data_model/data_model.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/models/RadioButtonModel.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/utils/date_utils.dart'; import 'package:digit_ui_components/widgets/atoms/pop_up_card.dart'; import 'package:digit_ui_components/widgets/atoms/selection_card.dart'; import 'package:digit_ui_components/widgets/molecules/digit_card.dart'; import 'package:digit_ui_components/widgets/molecules/show_pop_up.dart'; -import 'package:survey_form/survey_form.dart'; -import 'package:survey_form/utils/extensions/context_utility.dart'; -import 'package:digit_data_model/data_model.dart'; - import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:survey_form/utils/extensions/context_utility.dart'; import '../router/survey_form_router.gm.dart'; import '../utils/constants.dart'; +import '../utils/i18_key_constants.dart' as i18; import '../widgets/back_navigation_help_header.dart'; import '../widgets/localized.dart'; -import '../utils/i18_key_constants.dart' as i18; @RoutePage() class SurveyFormViewPage extends LocalizedStatefulWidget { @@ -47,7 +47,7 @@ class SurveyFormViewPageState extends LocalizedState { ServiceDefinitionModel? selectedServiceDefinition; bool isControllersInitialized = false; List visibleSurveyFormIndexes = []; - GlobalKey surveyFormFormKey = GlobalKey(); + GlobalKey surveyFormKey = GlobalKey(); @override void initState() { @@ -101,17 +101,16 @@ class SurveyFormViewPageState extends LocalizedState { widget.referralClientRefId != null)) const BackNavigationHelpHeaderWidget(), ]), - enableFixedButton: true, + enableFixedDigitButton: true, footer: DigitCard( cardType: CardType.primary, margin: const EdgeInsets.only(top: spacer2), - padding: const EdgeInsets.all(spacer2), children: [ - Button( + DigitButton( label: localizations .translate(i18.common.coreCommonSubmit), - type: ButtonType.primary, - size: ButtonSize.large, + type: DigitButtonType.primary, + size: DigitButtonSize.large, mainAxisSize: MainAxisSize.max, onPressed: () async { final router = context.router; @@ -124,7 +123,7 @@ class SurveyFormViewPageState extends LocalizedState { ), ); final isValid = - surveyFormFormKey.currentState?.validate(); + surveyFormKey.currentState?.validate(); if (!isValid!) { return; } @@ -159,204 +158,216 @@ class SurveyFormViewPageState extends LocalizedState { double? latitude = locationState.latitude; double? longitude = locationState.longitude; - showPopup( - context: context, - type: PopUpType.simple, - title: localizations.translate( - i18.surveyForm.surveyFormDialogLabel, - ), - description: localizations.translate( - i18.surveyForm.surveyFormDialogDescription, - ), - actions: [ - Button( - label: localizations.translate( - i18.surveyForm - .surveyFormDialogPrimaryAction, - ), - onPressed: () { - final referenceId = IdGen.i.identifier; - List - attributes = []; - for (int i = 0; - i < controller.length; - i++) { - final attribute = initialAttributes; - attributes.add(ServiceAttributesModel( - auditDetails: AuditDetails( - createdBy: SurveyFormSingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - ), - attributeCode: - '${attribute?[i].code}', - dataType: attribute?[i].dataType, - clientReferenceId: - IdGen.i.identifier, - referenceId: isHealthFacilityWorker && - widget.referralClientRefId != - null - ? widget.referralClientRefId - : referenceId, - value: attribute?[i].dataType != - 'SingleValueList' - ? controller[i] - .text - .toString() - .trim() - .isNotEmpty - ? controller[i] - .text - .toString() - : '' - : visibleSurveyFormIndexes - .contains(i) - ? controller[i] - .text - .toString() - : i18.surveyForm - .notSelectedKey, - rowVersion: 1, - tenantId: attribute?[i].tenantId, - additionalDetails: isHealthFacilityWorker && - widget.referralClientRefId != - null - ? null - : ((attribute?[i] - .values - ?.length == - 2 || - attribute?[i] - .values - ?.length == - 3) && - controller[i].text == - attribute?[i] - .values?[1] - .trim()) - ? additionalController[i] - .text - .toString() - .isEmpty - ? null - : additionalController[ - i] - .text - .toString() - : null, - additionalFields: - ServiceAttributesAdditionalFields( - version: 1, - fields: [ - AdditionalField( - 'latitude', - latitude, - ), - AdditionalField( - 'longitude', - longitude, - ), - ], - ), - )); - } + showCustomPopup( + context: context, + builder: (popUpContext) => Popup( + type: PopUpType.simple, + title: localizations.translate( + i18.surveyForm.surveyFormDialogLabel, + ), + description: localizations.translate( + i18.surveyForm.surveyFormDialogDescription, + ), + actions: [ + DigitButton( + label: localizations.translate( + i18.surveyForm + .surveyFormDialogPrimaryAction, + ), + onPressed: () { + final referenceId = + IdGen.i.identifier; + List + attributes = []; + for (int i = 0; + i < controller.length; + i++) { + final attribute = initialAttributes; + attributes + .add(ServiceAttributesModel( + auditDetails: AuditDetails( + createdBy: SurveyFormSingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + ), + attributeCode: + '${attribute?[i].code}', + dataType: attribute?[i].dataType, + clientReferenceId: + IdGen.i.identifier, + referenceId: isHealthFacilityWorker && + widget.referralClientRefId != + null + ? widget.referralClientRefId + : referenceId, + value: attribute?[i].dataType != + 'SingleValueList' + ? controller[i] + .text + .toString() + .trim() + .isNotEmpty + ? controller[i] + .text + .toString() + : '' + : visibleSurveyFormIndexes + .contains(i) + ? controller[i] + .text + .toString() + : i18.surveyForm + .notSelectedKey, + rowVersion: 1, + tenantId: attribute?[i].tenantId, + additionalDetails: isHealthFacilityWorker && + widget.referralClientRefId != + null + ? null + : ((attribute?[i] + .values + ?.length == + 2 || + attribute?[i] + .values + ?.length == + 3) && + controller[i].text == + attribute?[i] + .values?[1] + .trim()) + ? additionalController[i] + .text + .toString() + .isEmpty + ? null + : additionalController[ + i] + .text + .toString() + : null, + additionalFields: + ServiceAttributesAdditionalFields( + version: 1, + fields: [ + AdditionalField( + 'latitude', + latitude, + ), + AdditionalField( + 'longitude', + longitude, + ), + AdditionalField( + 'boundaryCode', + SurveyFormSingleton() + .boundary + ?.code) + ], + ), + )); + } - context.read().add( - ServiceCreateEvent( - serviceModel: ServiceModel( - createdAt: DigitDateUtils - .getDateFromTimestamp( - DateTime.now() - .toLocal() - .millisecondsSinceEpoch, - dateFormat: Constants - .SurveyFormViewDateFormat, - ), - tenantId: value - .selectedServiceDefinition! - .tenantId, - clientId: isHealthFacilityWorker && - widget.referralClientRefId != - null - ? widget - .referralClientRefId - .toString() - : referenceId, - serviceDefId: value - .selectedServiceDefinition - ?.id, - attributes: attributes, - rowVersion: 1, - accountId: - SurveyFormSingleton() - .projectId, - auditDetails: AuditDetails( - createdBy: - SurveyFormSingleton() - .loggedInUserUuid, - createdTime: DateTime - .now() - .millisecondsSinceEpoch, - ), - clientAuditDetails: - ClientAuditDetails( - createdBy: - SurveyFormSingleton() - .loggedInUserUuid, - createdTime: context - .millisecondsSinceEpoch(), - lastModifiedBy: + context.read().add( + ServiceCreateEvent( + serviceModel: ServiceModel( + createdAt: DigitDateUtils + .getDateFromTimestamp( + DateTime.now() + .toLocal() + .millisecondsSinceEpoch, + dateFormat: Constants + .SurveyFormViewDateFormat, + ), + tenantId: value + .selectedServiceDefinition! + .tenantId, + clientId: isHealthFacilityWorker && + widget.referralClientRefId != + null + ? widget + .referralClientRefId + .toString() + : referenceId, + serviceDefId: value + .selectedServiceDefinition + ?.id, + attributes: attributes, + rowVersion: 1, + accountId: SurveyFormSingleton() - .loggedInUserUuid, - lastModifiedTime: context - .millisecondsSinceEpoch(), - ), - additionalFields: - ServiceAdditionalFields( - version: 1, - fields: [ - AdditionalField( - 'lng', longitude), - AdditionalField( - 'lat', latitude), - AdditionalField( - 'boundaryCode', - SurveyFormSingleton() - .boundary - ?.code) - ])), - ), - ); - Navigator.of( - context, - rootNavigator: true, - ).pop(true); - router.push( - SurveyFormAcknowledgementRoute()); - }, - type: ButtonType.primary, - size: ButtonSize.large), - Button( - label: localizations.translate( - i18.surveyForm - .surveyFormDialogSecondaryAction, - ), - onPressed: () { - Navigator.of( - context, - rootNavigator: true, - ).pop(false); - }, - type: ButtonType.secondary, - size: ButtonSize.large) - ]); + .projectId, + auditDetails: + AuditDetails( + createdBy: + SurveyFormSingleton() + .loggedInUserUuid, + createdTime: DateTime + .now() + .millisecondsSinceEpoch, + ), + clientAuditDetails: + ClientAuditDetails( + createdBy: + SurveyFormSingleton() + .loggedInUserUuid, + createdTime: context + .millisecondsSinceEpoch(), + lastModifiedBy: + SurveyFormSingleton() + .loggedInUserUuid, + lastModifiedTime: context + .millisecondsSinceEpoch(), + ), + additionalFields: + ServiceAdditionalFields( + version: 1, + fields: [ + AdditionalField( + 'lng', + longitude), + AdditionalField( + 'lat', + latitude), + AdditionalField( + 'boundaryCode', + SurveyFormSingleton() + .boundary + ?.code) + ])), + ), + ); + Navigator.of( + context, + rootNavigator: true, + ).pop(true); + router.push( + SurveyFormAcknowledgementRoute()); + }, + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( + label: localizations.translate( + i18.surveyForm + .surveyFormDialogSecondaryAction, + ), + onPressed: () { + Navigator.of( + context, + rootNavigator: true, + ).pop(false); + }, + type: DigitButtonType.secondary, + size: DigitButtonSize.large) + ]), + ); }, ), ]), children: [ Form( - key: surveyFormFormKey, //assigning key to form + key: surveyFormKey, //assigning key to form child: DigitCard(cardType: CardType.primary, children: [ Padding( padding: const EdgeInsets.only(bottom: spacer2), @@ -367,9 +378,15 @@ class SurveyFormViewPageState extends LocalizedState { style: textTheme.headingXl, ), ), - ...initialAttributes!.map(( + ...initialAttributes! + .where((att) => att.isActive == true) + .map(( e, ) { + String? description = e.additionalFields?.fields + .where((a) => a.key == 'helpText') + .firstOrNull + ?.value; int index = (initialAttributes ?? []).indexOf(e); return Column(children: [ if (e.dataType == 'String' && @@ -399,12 +416,17 @@ class SurveyFormViewPageState extends LocalizedState { label: localizations.translate( '${value.selectedServiceDefinition?.code}.${e.code}', ), + description: description != null + ? localizations.translate( + '${value.selectedServiceDefinition?.code}.$description', + ) + : null, isRequired: e.required ?? false, child: DigitTextFormInput( onChange: (value) { field.didChange(value); controller[index].text = value; - surveyFormFormKey.currentState + surveyFormKey.currentState ?.validate(); }, errorMessage: field.errorText, @@ -447,12 +469,17 @@ class SurveyFormViewPageState extends LocalizedState { '${value.selectedServiceDefinition?.code}.${e.code}', ) .trim(), + description: description != null + ? localizations.translate( + '${value.selectedServiceDefinition?.code}.$description', + ) + : null, isRequired: e.required ?? false, child: DigitTextFormInput( onChange: (value) { field.didChange(value); controller[index].text = value; - surveyFormFormKey.currentState + surveyFormKey.currentState ?.validate(); }, errorMessage: field.errorText, @@ -477,14 +504,20 @@ class SurveyFormViewPageState extends LocalizedState { label: localizations.translate( '${value.selectedServiceDefinition?.code}.${e.code}', ), + description: description != null + ? localizations.translate( + '${value.selectedServiceDefinition?.code}.$description', + ) + : null, isRequired: e.required ?? false, child: BlocBuilder( builder: (context, state) { return Column( children: e.values! - .map((e) => DigitCheckbox( - label: e, + .map((item) => DigitCheckbox( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item}'), value: controller[index] .text .split('.') @@ -519,6 +552,12 @@ class SurveyFormViewPageState extends LocalizedState { text: ele, ), ).value; + + // If the field is required and no option is selected, trigger validation + if (e.required == true && + val.isEmpty) { + submitTriggered = true; + } }, )) .toList(), @@ -531,7 +570,7 @@ class SurveyFormViewPageState extends LocalizedState { ] else if (e.dataType == 'SingleValueList') ...[ if (!(e.code ?? '').contains('.')) DigitCard( - cardType: CardType.primary, + cardType: CardType.secondary, children: [ _buildSurveyForm( e, @@ -694,19 +733,18 @@ class SurveyFormViewPageState extends LocalizedState { return Align( alignment: Alignment.topLeft, - child: Padding( - padding: const EdgeInsets.all(spacer4), // Add padding here - child: LabeledField( - label: localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}', - ), - isRequired: item.required ?? false, - child: Column(children: [ - BlocBuilder( - builder: (context, state) { - return Align( - alignment: Alignment.topLeft, - child: FormField( + child: LabeledField( + charCondition: true, + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}', + ), + isRequired: item.required ?? false, + child: Column(children: [ + BlocBuilder( + builder: (context, state) { + return Align( + alignment: Alignment.topLeft, + child: FormField( autovalidateMode: AutovalidateMode.onUserInteraction, validator: (value1) { if (item.required == true && @@ -720,134 +758,132 @@ class SurveyFormViewPageState extends LocalizedState { return null; }, builder: (field) => RadioList( - radioButtons: item.values != null - ? item.values! - .where((e) => - e != i18.surveyForm.notSelectedKey) - .toList() - .map((item) => RadioButtonModel( - code: item, - name: localizations.translate( - 'CORE_COMMON_${item.trim().toUpperCase()}', - ), - )) - .toList() - : [], - errorMessage: field.errorText, - groupValue: controller[index].text.trim(), - onChanged: (value) { - field.didChange(value); - context.read().add( - ServiceSurveyFormEvent( - value: Random().nextInt(100).toString(), - submitTriggered: submitTriggered, - ), - ); - setState(() { - // Clear child controllers and update visibility - for (final matchingChildItem in childItems) { - final childIndex = initialAttributes - ?.indexOf(matchingChildItem); - if (childIndex != null) { - // controller[childIndex].clear(); - visibleSurveyFormIndexes - .removeWhere((v) => v == childIndex); - } - } + radioDigitButtons: item.values != null + ? item.values! + .where((e) => + e != i18.surveyForm.notSelectedKey) + .toList() + .map((item) => RadioButtonModel( + code: item, + name: localizations.translate( + '${selectedServiceDefinition?.code}.${item.trim()}', + ), + )) + .toList() + : [], + errorMessage: field.errorText, + groupValue: controller[index].text.trim(), + onChanged: (value) { + field.didChange(value); + context.read().add( + ServiceSurveyFormEvent( + value: + Random().nextInt(100).toString(), + submitTriggered: submitTriggered, + ), + ); + setState(() { + // Clear child controllers and update visibility + for (final matchingChildItem + in childItems) { + final childIndex = initialAttributes + ?.indexOf(matchingChildItem); + if (childIndex != null) { + // controller[childIndex].clear(); + visibleSurveyFormIndexes.removeWhere( + (v) => v == childIndex); + } + } - // Update the current controller's value - controller[index].value = - TextEditingController.fromValue( - TextEditingValue( - text: value!.code, - ), - ).value; + // Update the current controller's value + controller[index].value = + TextEditingController.fromValue( + TextEditingValue( + text: value!.code, + ), + ).value; - if (excludedIndexes.isNotEmpty) { - for (int i = 0; - i < excludedIndexes.length; - i++) { - // Clear excluded child controllers - if (item.dataType != 'SingleValueList') { - // controller[excludedIndexes[i]].value = - // TextEditingController.fromValue( - // const TextEditingValue( - // text: '', - // ), - // ).value; + if (excludedIndexes.isNotEmpty) { + for (int i = 0; + i < excludedIndexes.length; + i++) { + // Clear excluded child controllers + if (item.dataType != + 'SingleValueList') { + // controller[excludedIndexes[i]].value = + // TextEditingController.fromValue( + // const TextEditingValue( + // text: '', + // ), + // ).value; + } + } } - } - } - // Remove corresponding controllers based on the removed attributes - }); - }, + // Remove corresponding controllers based on the removed attributes + }); + }, + ))); + }, + ), + BlocBuilder( + builder: (context, state) { + return (controller[index].text == item.values?[1].trim() && + !(isHealthFacilityWorker && + widget.referralClientRefId != null) && + item.dataType != 'SingleValueList') + ? Padding( + padding: const EdgeInsets.only( + left: spacer1, + right: spacer1, + bottom: spacer4, ), - ), - ); - }, - ), - BlocBuilder( - builder: (context, state) { - return (controller[index].text == - item.values?[1].trim() && - !(isHealthFacilityWorker && - widget.referralClientRefId != null)) - ? Padding( - padding: const EdgeInsets.only( - left: spacer1, - right: spacer1, - bottom: spacer4, - ), - child: FormField( - autovalidateMode: - AutovalidateMode.onUserInteraction, - validator: (value1) { - if (item.required == true && - (additionalController[index].text == - null || - additionalController[index].text == - '')) { - return localizations.translate( - i18.common.coreCommonReasonRequired, - ); - } + child: FormField( + autovalidateMode: + AutovalidateMode.onUserInteraction, + validator: (value1) { + if (item.required == true && + (additionalController[index].text == null || + additionalController[index].text == '')) { + return localizations.translate( + i18.common.coreCommonReasonRequired, + ); + } - return null; - }, - builder: (field) { - return LabeledField( - label: localizations.translate( - '${selectedServiceDefinition?.code}.${item.code}.ADDITIONAL_FIELD', - ), - isRequired: item.required ?? false, - child: DigitTextFormInput( - onChange: (value) { - field.didChange(value); - additionalController[index].text = - value; - }, - errorMessage: field.errorText, - maxLength: 1000, - charCount: true, - controller: additionalController[index], - )); - }, - ), - ) - : const SizedBox(); - }, - ), - if (childItems.isNotEmpty && - controller[index].text.trim().isNotEmpty) ...[ - _buildNestedSurveyForm( - item.code.toString(), - index, - controller[index].text.trim(), - context, - ), - ], - ]))), + return null; + }, + builder: (field) { + return LabeledField( + label: localizations.translate( + '${selectedServiceDefinition?.code}.${item.code}.ADDITIONAL_FIELD', + ), + isRequired: item.required ?? false, + child: DigitTextFormInput( + onChange: (value) { + field.didChange(value); + additionalController[index].text = value; + }, + errorMessage: field.errorText, + maxLength: 1000, + charCount: true, + controller: additionalController[index], + )); + }, + ), + ) + : const SizedBox(); + }, + ), + if (childItems.isNotEmpty && + controller[index].text.trim().isNotEmpty) ...[ + _buildNestedSurveyForm( + item.code.toString(), + index, + controller[index].text.trim(), + context, + ), + ], + ])), ); } else if (item.dataType == 'String') { return FormField( @@ -947,7 +983,8 @@ class SurveyFormViewPageState extends LocalizedState { return Column( children: item.values! .map((e) => DigitCheckbox( - label: e, + label: localizations.translate( + '${selectedServiceDefinition?.code}.${e}'), value: controller[index].text.split('.').contains(e), onChanged: (value) { @@ -1125,7 +1162,7 @@ class SurveyFormViewPageState extends LocalizedState { i18.surveyForm.surveyFormBackDialogDescription, ), actions: [ - Button( + DigitButton( label: localizations .translate(i18.surveyForm.surveyFormBackDialogPrimaryAction), onPressed: () { @@ -1134,9 +1171,9 @@ class SurveyFormViewPageState extends LocalizedState { rootNavigator: true, ).pop(true); }, - type: ButtonType.primary, - size: ButtonSize.large), - Button( + type: DigitButtonType.primary, + size: DigitButtonSize.large), + DigitButton( label: localizations.translate( i18.surveyForm.surveyFormBackDialogSecondaryAction), onPressed: () { @@ -1145,8 +1182,8 @@ class SurveyFormViewPageState extends LocalizedState { rootNavigator: true, ).pop(false); }, - type: ButtonType.secondary, - size: ButtonSize.large) + type: DigitButtonType.secondary, + size: DigitButtonSize.large) ], ), ); diff --git a/packages/survey_form/lib/pages/survey_form_wrapper.dart b/packages/survey_form/lib/pages/survey_form_wrapper.dart index 53d97087f..a69995919 100644 --- a/packages/survey_form/lib/pages/survey_form_wrapper.dart +++ b/packages/survey_form/lib/pages/survey_form_wrapper.dart @@ -1,10 +1,10 @@ import 'package:auto_route/auto_route.dart'; -import 'package:digit_ui_components/blocs/fetch_location_bloc.dart'; -import 'package:survey_form/utils/extensions/context_utility.dart'; +import 'package:digit_ui_components/services/location_bloc.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:survey_form/survey_form.dart'; import 'package:location/location.dart'; +import 'package:survey_form/survey_form.dart'; +import 'package:survey_form/utils/extensions/context_utility.dart'; @RoutePage() class SurveyFormWrapperPage extends StatelessWidget { @@ -17,10 +17,11 @@ class SurveyFormWrapperPage extends StatelessWidget { @override Widget build(BuildContext context) { - final serviceDefinition = context - .repository(context); + final serviceDefinition = context.repository(context); - final service = context.repository(context); + final service = + context.repository(context); return MultiBlocProvider( providers: [ @@ -37,11 +38,7 @@ class SurveyFormWrapperPage extends StatelessWidget { serviceDataRepository: service, ), ), - BlocProvider( - create: (_)=>LocationBloc( - location: Location() - ) - ) + BlocProvider(create: (_) => LocationBloc(location: Location())) ], child: const AutoRouter(), ); diff --git a/packages/survey_form/lib/widgets/action_card.dart b/packages/survey_form/lib/widgets/action_card.dart deleted file mode 100644 index e231a1761..000000000 --- a/packages/survey_form/lib/widgets/action_card.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:digit_ui_components/enum/app_enums.dart'; -import 'package:digit_ui_components/theme/spacers.dart'; -import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; -import 'package:flutter/material.dart'; - -class ActionCard extends StatelessWidget { - final List items; - - const ActionCard({super.key, required this.items}); - - @override - Widget build(BuildContext context) { - final theme = Theme.of(context); - - return Column( - mainAxisSize: MainAxisSize.min, - children: items - .map( - (e) => Padding( - padding: const EdgeInsets.all(spacer2 / 2), - child: Button( - type: ButtonType.secondary, - size: ButtonSize.large, - prefixIcon: e.icon, - label: e.label, - onPressed: ()=>e.action, - ), - ), - ) - .toList(), - ); - } -} - -class ActionCardModel { - final IconData icon; - final String label; - final VoidCallback? action; - - const ActionCardModel({ - required this.icon, - required this.label, - required this.action, - }); -} diff --git a/packages/survey_form/lib/widgets/back_navigation_help_header.dart b/packages/survey_form/lib/widgets/back_navigation_help_header.dart index 14881117e..6e0a74f12 100644 --- a/packages/survey_form/lib/widgets/back_navigation_help_header.dart +++ b/packages/survey_form/lib/widgets/back_navigation_help_header.dart @@ -1,7 +1,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:digit_ui_components/digit_components.dart'; +import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart'; +import 'package:digit_ui_components/theme/digit_extended_theme.dart'; import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart'; -import 'package:digit_ui_components/widgets/atoms/digit_button.dart'; import 'package:flutter/material.dart'; import '../../utils/i18_key_constants.dart' as i18; @@ -39,10 +40,21 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget { alignment: Alignment.topLeft, child: Padding( padding: const EdgeInsets.all(spacer2), - child: BackNavigationButton( - handleBack: (){ + child: DigitBackButton( + label: SurveyFormLocalization.of(context) + .translate(i18.common.coreCommonBack), + digitBackButtonThemeData: + const DigitBackButtonThemeData().copyWith( + context: context, + backDigitButtonIcon: Icon( + Icons.arrow_left, + size: Theme.of(context).spacerTheme.spacer5, + color: Theme.of(context).colorTheme.primary.primary2, + ), + ), + handleBack: () { context.router.maybePop(); - handleBack!=null?handleBack!():null; + handleBack != null ? handleBack!() : null; }, ), ), diff --git a/packages/survey_form/pubspec.lock b/packages/survey_form/pubspec.lock index ca017de05..076ded7c8 100644 --- a/packages/survey_form/pubspec.lock +++ b/packages/survey_form/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" analyzer_plugin: dependency: transitive description: @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -61,18 +61,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: eb33554581a0a4aa7e6da0f13a44291a55bf71359012f1d9feb41634ff908ff8 + sha256: a9001a90539ca3effc168f7e1029a5885c7326b9032c09ac895e303c1d137704 url: "https://pub.dev" source: hosted - version: "7.9.2" + version: "8.3.0" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22" + sha256: a21d7a936c917488653c972f62d884d8adcf8c5d37acc7cd24da33cf784546c0 url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.1.0" bloc: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -130,21 +130,21 @@ packages: source: hosted version: "2.4.2" build_runner: - dependency: "direct main" + dependency: transitive description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -165,26 +165,26 @@ packages: dependency: transitive description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: b350ac087f111467e705b2b76cc1322f7f5bdc122aa83b4b243b0872f390d229 + name: camera_android_camerax + sha256: "011be2ab0e5b3e3aa8094413fa890f8c5c5afd7cfdaef353a992047d4dab5780" url: "https://pub.dev" source: hosted - version: "0.10.9+2" + version: "0.6.8+2" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "608b56b0880722f703871329c4d7d4c2f379c8e2936940851df7fc041abc6f51" + sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" url: "https://pub.dev" source: hosted - version: "0.9.13+10" + version: "0.9.17+5" camera_platform_interface: dependency: transitive description: @@ -197,10 +197,10 @@ packages: dependency: transitive description: name: camera_web - sha256: b9235ec0a2ce949daec546f1f3d86f05c3921ed31c7d9ab6b7c03214d152fc2d + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" url: "https://pub.dev" source: hosted - version: "0.3.4" + version: "0.3.5" characters: dependency: transitive description: @@ -213,10 +213,10 @@ packages: dependency: transitive description: name: charcode - sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -229,10 +229,10 @@ packages: dependency: transitive description: name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.4.1" + version: "0.4.2" clock: dependency: transitive description: @@ -261,34 +261,34 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" coverage: dependency: transitive description: name: coverage - sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.11.1" cross_file: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" csslib: dependency: transitive description: @@ -309,11 +309,11 @@ packages: dependency: "direct dev" description: path: "packages/dart_mappable_builder" - ref: master - resolved-ref: "8011a4c367094dfb018fce701d700a582ba862bb" + ref: "1.6-final-dev" + resolved-ref: "1e7467577a9701d396f7e23afbf00065e54c5469" url: "https://github.com/egovernments/health-campaign-field-worker-app/" source: git - version: "4.2.0" + version: "4.2.3" dart_style: dependency: transitive description: @@ -322,14 +322,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.6" - db_viewer: - dependency: transitive - description: - name: db_viewer - sha256: "5f7e3cfcde9663321797d8f6f0c876f7c13f0825a2e77ec1ef065656797144d9" - url: "https://pub.dev" - source: hosted - version: "1.1.0" diff_match_patch: dependency: transitive description: @@ -342,18 +334,18 @@ packages: dependency: "direct main" description: name: digit_data_model - sha256: "63c878bfe49e3e8db190dd5cd35d7a7b93b2e3b6663cebaaee25ff0089c1112b" + sha256: c3bc7299a7d927ebb83d8e91c1d7a8a51f6a1d1295dafeacb642012b72b99a2f url: "https://pub.dev" source: hosted - version: "1.0.5-dev.1" + version: "1.0.5" digit_ui_components: dependency: "direct main" description: name: digit_ui_components - sha256: e38f163515aa6a6c5283754e741b21f33fb3a6c0a1fc171a1e4e6620510d46ae + sha256: "57c4da5237be6025783e7357a02b6b492f02e38f711d674bf46f5f8c8a93ad76" url: "https://pub.dev" source: hosted - version: "0.0.1+7" + version: "0.0.2-dev.4" dio: dependency: "direct main" description: @@ -366,10 +358,10 @@ packages: dependency: transitive description: name: dio_web_adapter - sha256: "36c5b2d79eb17cdae41e974b7a8284fec631651d2a6f39a8a2ff22327e90aeac" + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "2.0.0" dotted_border: dependency: transitive description: @@ -382,26 +374,18 @@ packages: dependency: "direct main" description: name: drift - sha256: b50a8342c6ddf05be53bda1d246404cbad101b64dc73e8d6d1ac1090d119b4e2 + sha256: "4e0ffee40d23f0b809e6cff1ad202886f51d629649073ed42d9cd1d194ea943e" url: "https://pub.dev" source: hosted - version: "2.15.0" - drift_db_viewer: - dependency: transitive - description: - name: drift_db_viewer - sha256: "5ea77858c52b55460a1e8f34ab5f88324621d486717d876fd745765fbc227f3f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" + version: "2.19.1+1" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: c037d9431b6f8dc633652b1469e5f53aaec6e4eb405ed29dd232fa888ef10d88 + sha256: ac7647c6cedca99724ca300cff9181f6dd799428f8ed71f94159ed0528eaec26 url: "https://pub.dev" source: hosted - version: "2.15.0" + version: "2.19.1" fake_async: dependency: transitive description: @@ -414,10 +398,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -430,26 +414,26 @@ packages: dependency: transitive description: name: file_picker - sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3" url: "https://pub.dev" source: hosted - version: "8.0.0+1" + version: "8.0.7" file_selector_linux: dependency: transitive description: name: file_selector_linux - sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "0.9.2+1" + version: "0.9.3+2" file_selector_macos: dependency: transitive description: name: file_selector_macos - sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "0.9.4" + version: "0.9.4+2" file_selector_platform_interface: dependency: transitive description: @@ -462,10 +446,10 @@ packages: dependency: transitive description: name: file_selector_windows - sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "0.9.3+2" + version: "0.9.3+3" fixnum: dependency: transitive description: @@ -511,54 +495,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.13" - flutter_keyboard_visibility: - dependency: transitive - description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" - url: "https://pub.dev" - source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: - dependency: transitive - description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: - dependency: transitive - description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: - dependency: transitive - description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: - dependency: transitive - description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: - dependency: transitive - description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.dev" - source: hosted - version: "1.0.0" flutter_lints: dependency: "direct dev" description: @@ -576,10 +512,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.22" flutter_spinkit: dependency: transitive description: @@ -600,23 +536,15 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" + sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123" url: "https://pub.dev" source: hosted - version: "2.0.10+1" + version: "2.0.16" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_typeahead: - dependency: transitive - description: - name: flutter_typeahead - sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 - url: "https://pub.dev" - source: hosted - version: "4.8.0" flutter_web_plugins: dependency: transitive description: flutter @@ -626,10 +554,10 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "81b68579e23fcbcada2db3d50302813d2371664afe6165bc78148050ab94bf66" + sha256: "95f349437aeebe524ef7d6c9bde3e6b4772717cf46a0eb6a3ceaddc740b297cc" url: "https://pub.dev" source: hosted - version: "8.2.5" + version: "8.2.8" freezed: dependency: "direct dev" description: @@ -650,10 +578,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" geolocator: dependency: transitive description: @@ -666,10 +594,10 @@ packages: dependency: transitive description: name: geolocator_android - sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" + sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47" url: "https://pub.dev" source: hosted - version: "4.3.1" + version: "4.6.1" geolocator_apple: dependency: transitive description: @@ -714,18 +642,18 @@ packages: dependency: transitive description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" group_radio_button: dependency: "direct main" description: @@ -754,10 +682,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -778,34 +706,34 @@ packages: dependency: transitive description: name: image_picker - sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.1.2" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56" url: "https://pub.dev" source: hosted - version: "0.8.9+6" + version: "0.8.12+12" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.6" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" url: "https://pub.dev" source: hosted - version: "0.8.9+1" + version: "0.8.12+1" image_picker_linux: dependency: transitive description: @@ -826,10 +754,10 @@ packages: dependency: transitive description: name: image_picker_platform_interface - sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" url: "https://pub.dev" source: hosted - version: "2.9.3" + version: "2.10.0" image_picker_windows: dependency: transitive description: @@ -842,18 +770,18 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" isar: dependency: transitive description: @@ -894,6 +822,30 @@ packages: url: "https://pub.dev" source: hosted version: "6.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -906,66 +858,66 @@ packages: dependency: "direct main" description: name: location - sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "6.0.2" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" + sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" location_web: dependency: transitive description: name: location_web - sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b + sha256: "49dda13d415c4603c5775a33fb22f575e0aa3f0ec2916644ddcd722db31ee884" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.2" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" lottie: dependency: transitive description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.3" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" mime: dependency: transitive description: @@ -1010,18 +962,18 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -1034,34 +986,34 @@ packages: dependency: transitive description: name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" path_provider: dependency: transitive description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -1110,14 +1062,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pointer_interceptor: - dependency: transitive - description: - name: pointer_interceptor - sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22 - url: "https://pub.dev" - source: hosted - version: "0.9.3+7" pool: dependency: transitive description: @@ -1138,10 +1082,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: @@ -1150,22 +1094,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - reactive_flutter_typeahead: - dependency: transitive - description: - name: reactive_flutter_typeahead - sha256: ef91627df8cef70e603e8a6458749d8a99a385b78854332602fd08ad905cdab8 - url: "https://pub.dev" - source: hosted - version: "0.8.1" reactive_forms: dependency: "direct main" description: name: reactive_forms - sha256: "5aa9c48a0626c20d00a005e597cb10efbdebbfeecb9c4227b03a5945fbb91ec4" + sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "17.0.1" recase: dependency: transitive description: @@ -1194,10 +1130,10 @@ packages: dependency: transitive description: name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.3" shelf_web_socket: dependency: transitive description: @@ -1231,18 +1167,18 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: name: source_maps - sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" url: "https://pub.dev" source: hosted - version: "0.10.12" + version: "0.10.13" source_span: dependency: transitive description: @@ -1251,30 +1187,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqlite3: dependency: transitive description: name: sqlite3 - sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" sqlite3_flutter_libs: dependency: transitive description: name: sqlite3_flutter_libs - sha256: "7ae52b23366e5295005022e62fa093f64bfe190810223ea0ebf733a4cd140bce" + sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9" url: "https://pub.dev" source: hosted - version: "0.5.26" + version: "0.5.27" sqlparser: dependency: transitive description: name: sqlparser - sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" + sha256: "3be52b4968fc2f098ba735863404756d2fe3ea0729cf006a5b5612618f74ca04" url: "https://pub.dev" source: hosted - version: "0.34.1" + version: "0.37.1" stack_trace: dependency: transitive description: @@ -1319,34 +1263,34 @@ packages: dependency: transitive description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timing: dependency: transitive description: name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" type_plus: dependency: transitive description: @@ -1383,42 +1327,42 @@ packages: dependency: transitive description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.3.2" + version: "6.3.9" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.2.4" + version: "6.3.2" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.2.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.2" url_launcher_platform_interface: dependency: transitive description: @@ -1431,50 +1375,50 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.15" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.12" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" url: "https://pub.dev" source: hosted - version: "1.1.11+1" + version: "1.1.16" vector_math: dependency: transitive description: @@ -1495,10 +1439,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1511,18 +1455,18 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" webkit_inspection_protocol: dependency: transitive description: @@ -1535,18 +1479,18 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.4" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: @@ -1564,5 +1508,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <=3.9.0" - flutter: ">=3.16.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/survey_form/pubspec.yaml b/packages/survey_form/pubspec.yaml index cd4bc2e25..8b5705529 100644 --- a/packages/survey_form/pubspec.yaml +++ b/packages/survey_form/pubspec.yaml @@ -1,8 +1,8 @@ name: survey_form description: "This package enables supervisors to monitor certain activities and record observations according to defined set of questions." -version: 0.0.1-dev.2 -homepage: "https://github.com/egovernments/health-campaign-field-worker-app/tree/checklist-package/packages/survey_form" -repository: "https://github.com/egovernments/health-campaign-field-worker-app" +version: 1.0.0 +homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/survey_form +repository: https://github.com/egovernments/health-campaign-field-worker-app environment: sdk: '>=3.0.0 <4.0.0' @@ -11,21 +11,20 @@ environment: dependencies: flutter: sdk: flutter - digit_ui_components: ^0.0.1+7 - flutter_bloc: ^8.1.1 - freezed_annotation: ^2.1.0 - build_runner: ^2.2.1 - reactive_forms: ^14.1.0 + digit_ui_components: ^0.0.2-dev.4 + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + reactive_forms: ^17.0.0 fluttertoast: ^8.1.2 overlay_builder: ^1.1.0 - intl: ^0.18.0 + intl: ^0.19.0 flutter_svg: ^2.0.8 dart_mappable: ^4.2.0 drift: ^2.0.0 - auto_route: ^7.8.4 - digit_data_model: ^1.0.5-dev.1 + auto_route: ^8.1.3 + digit_data_model: ^1.0.5 collection: ^1.16.0 - location: ^5.0.0 + location: ^6.0.2 dio: ^5.1.2 group_radio_button: ^1.3.0 @@ -40,10 +39,10 @@ dev_dependencies: dart_mappable_builder: git: url: https://github.com/egovernments/health-campaign-field-worker-app/ - ref: master + ref: 1.6-final-dev path: ./packages/dart_mappable_builder drift_dev: ^2.14.1 - auto_route_generator: ^7.3.2 + auto_route_generator: ^8.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -51,33 +50,33 @@ dev_dependencies: # 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 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 +# 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/survey_form/test/constants/test_constants.dart b/packages/survey_form/test/constants/test_constants.dart index ad95b6b5a..1e51fd3f1 100644 --- a/packages/survey_form/test/constants/test_constants.dart +++ b/packages/survey_form/test/constants/test_constants.dart @@ -46,7 +46,7 @@ class ServiceTestConstants { dataType: testDataType, values: null, required: true, - isActive: 'true', + isActive: true, regex: null, order: 1, ); @@ -57,7 +57,7 @@ class ServiceTestConstants { dataType: testDataType, values: null, required: true, - isActive: 'true', + isActive: true, regex: null, order: 1, ); diff --git a/packages/sync_service/.gitignore b/packages/sync_service/.gitignore new file mode 100644 index 000000000..ac5aa9893 --- /dev/null +++ b/packages/sync_service/.gitignore @@ -0,0 +1,29 @@ +# 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/ +build/ diff --git a/packages/sync_service/.metadata b/packages/sync_service/.metadata new file mode 100644 index 000000000..d36dfbcc1 --- /dev/null +++ b/packages/sync_service/.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: "a14f74ff3a1cbd521163c5f03d68113d50af93d3" + channel: "stable" + +project_type: package diff --git a/packages/sync_service/CHANGELOG.md b/packages/sync_service/CHANGELOG.md new file mode 100644 index 000000000..6fe28a462 --- /dev/null +++ b/packages/sync_service/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1-dev.1 + +* Init release diff --git a/packages/sync_service/LICENSE b/packages/sync_service/LICENSE new file mode 100644 index 000000000..f7d7ac958 --- /dev/null +++ b/packages/sync_service/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 eGovernments Foundation + +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. \ No newline at end of file diff --git a/packages/sync_service/README.md b/packages/sync_service/README.md new file mode 100644 index 000000000..4186a82f4 --- /dev/null +++ b/packages/sync_service/README.md @@ -0,0 +1,53 @@ +# Sync Service Package + +The `sync_service` provides access to sync service related configurations and listeners - +SyncEntityMapperListener, syncDownRetryCount, persistenceConfiguration + +## Features + +SyncBloc: Handles refresh and syncup + +Data: +The `SyncEntityMapperListener` is an abstract class that defines methods for handling sync entity +mapping. This class provides methods for writing to the entity database, getting the sync count, +handling entity responses, and updating entities. +The `SyncService` class provides methods to perform sync operations - performSync, writeToEntityDB, +getPendingSyncRecordsCount, filterEntityByBandwidth, filterOpLogByBandwidth, SyncError class + +Repositories - +RepositoryType - provides methods to get the remote and local repositories for a given data model +type - getRemoteForType, getLocalForType +PerformSyncDown - provides a method to perform a sync down operation. +PerformSyncUp - provides a method to perform a sync up operation. + +Models: Bandwidth Model + +## Getting Started + +To use this package, add the following dependency to your `pubspec.yaml` file: + +```yaml +dependencies: + sync_service: ^latest +``` + +## Usage + +Here are some examples of how to use the DataModel package in your project: + +Extend the `SyncUpOperation` implement the required methods. + +```dart + class CustomSyncRegistry implements SyncUpOperation { + CustomSyncRegistry({ + this.remote + }); +} +``` + +Extend the `SyncEntityMapperListener` class and implement the required methods. + +```dart + class SyncServiceMapper extends SyncEntityMapperListener { +} +``` \ No newline at end of file diff --git a/packages/sync_service/analysis_options.yaml b/packages/sync_service/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/packages/sync_service/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/sync_service/build.yaml b/packages/sync_service/build.yaml new file mode 100644 index 000000000..05310222d --- /dev/null +++ b/packages/sync_service/build.yaml @@ -0,0 +1,5 @@ +targets: + $default: + builders: + dart_mappable_builder: + generate_for: \ No newline at end of file diff --git a/apps/health_campaign_field_worker_app/lib/blocs/sync/sync.dart b/packages/sync_service/lib/blocs/sync/sync.dart similarity index 62% rename from apps/health_campaign_field_worker_app/lib/blocs/sync/sync.dart rename to packages/sync_service/lib/blocs/sync/sync.dart index 8cdff67a4..695b40926 100644 --- a/apps/health_campaign_field_worker_app/lib/blocs/sync/sync.dart +++ b/packages/sync_service/lib/blocs/sync/sync.dart @@ -5,27 +5,37 @@ import 'package:digit_data_model/data_model.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:isar/isar.dart'; +import 'package:sync_service/utils/utils.dart'; -import '../../data/network_manager.dart'; +import '../../data/sync_service.dart'; import '../../models/bandwidth/bandwidth_model.dart'; -import '../../utils/utils.dart'; part 'sync.freezed.dart'; typedef SyncEmitter = Emitter; +// This is the `SyncBloc` class which extends `Bloc`. +// +// It handles the state management for sync operations. class SyncBloc extends Bloc { + // The `Isar` instance used for database operations. final Isar isar; - final NetworkManager networkManager; + // The `SyncService` instance used for sync operations. + final SyncService syncService; + // The constructor for `SyncBloc`. + // It requires an `Isar` instance and a `SyncService` instance. SyncBloc({ required this.isar, - required this.networkManager, + required this.syncService, }) : super(const SyncPendingState()) { + // Registering event handlers. on(_handleRefresh); on(_handleSyncUp); } + // This method handles the `SyncRefreshEvent`. + // It emits a new state based on the result of the refresh operation. FutureOr _handleRefresh( SyncRefreshEvent event, SyncEmitter emit, @@ -38,17 +48,17 @@ class SyncBloc extends Bloc { int? length = event.count; emit(const SyncState.loading()); try { - length ??= getSyncCount(isar.opLogs + length ??= (SyncServiceSingleton().entityMapper!.getSyncCount(isar.opLogs .filter() .createdByEqualTo(event.createdBy) .syncedUpEqualTo(false) .findAllSync()) + - getSyncCount(isar.opLogs + SyncServiceSingleton().entityMapper!.getSyncCount(isar.opLogs .filter() .createdByEqualTo(event.createdBy) .syncedUpEqualTo(true) .syncedDownEqualTo(false) - .findAllSync()); + .findAllSync())); } catch (_) { rethrow; } finally { @@ -56,6 +66,8 @@ class SyncBloc extends Bloc { } } + // This method handles the `SyncSyncUpEvent`. + // It emits a new state based on the result of the sync up operation. FutureOr _handleSyncUp( SyncSyncUpEvent event, SyncEmitter emit, @@ -66,8 +78,7 @@ class SyncBloc extends Bloc { 'batchSize': 5, }); emit(const SyncInProgressState()); - - await networkManager.performSync( + await syncService.performSync( localRepositories: event.localRepositories, remoteRepositories: event.remoteRepositories, bandwidthModel: bandwidthModel, @@ -90,11 +101,14 @@ class SyncBloc extends Bloc { } } +// This is the `SyncEvent` class which is a freezed union of different types of sync events. @freezed class SyncEvent with _$SyncEvent { + // The `SyncRefreshEvent` represents a refresh event. const factory SyncEvent.refresh(String createdBy, [int? count]) = SyncRefreshEvent; + // The `SyncSyncUpEvent` represents a sync up event. const factory SyncEvent.syncUp({ required String userId, required List localRepositories, @@ -102,20 +116,28 @@ class SyncEvent with _$SyncEvent { }) = SyncSyncUpEvent; } +// This is the `SyncState` class which is a freezed union of different types of sync states. @freezed class SyncState with _$SyncState { + // The `SyncLoadingState` represents a loading state. const factory SyncState.loading() = SyncLoadingState; + // The `SyncInProgressState` represents a sync in progress state. const factory SyncState.syncInProgress() = SyncInProgressState; + // The `SyncPendingState` represents a pending sync state. const factory SyncState.pendingSync({@Default(0) int count}) = SyncPendingState; + // The `SyncCompletedState` represents a completed sync state. const factory SyncState.completedSync() = SyncCompletedState; + // The `SyncFailedState` represents a failed sync state. const factory SyncState.failedSync() = SyncFailedState; + // The `DownSyncFailedState` represents a failed down sync state. const factory SyncState.failedDownSync() = DownSyncFailedState; + // The `UpSyncFailedState` represents a failed up sync state. const factory SyncState.failedUpSync() = UpSyncFailedState; } diff --git a/apps/health_campaign_field_worker_app/lib/blocs/sync/sync.freezed.dart b/packages/sync_service/lib/blocs/sync/sync.freezed.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/blocs/sync/sync.freezed.dart rename to packages/sync_service/lib/blocs/sync/sync.freezed.dart diff --git a/packages/sync_service/lib/data/repositories/sync/remote_type.dart b/packages/sync_service/lib/data/repositories/sync/remote_type.dart new file mode 100644 index 000000000..9faf15d7a --- /dev/null +++ b/packages/sync_service/lib/data/repositories/sync/remote_type.dart @@ -0,0 +1,49 @@ +// Importing necessary packages +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; + +/// The `RepositoryType` class provides methods to get the remote and local repositories for a given data model type. +class RepositoryType { + /// Returns the remote repository for the given data model type. + /// + /// This method accepts a `DataModelType` and a list of `RemoteRepository` objects as parameters. + /// It returns the first `RemoteRepository` object in the list that matches the given data model type. + /// If no matching repository is found, it throws an exception. + static RemoteRepository getRemoteForType( + DataModelType type, + List remoteRepositories, + ) { + final repository = remoteRepositories.firstWhereOrNull( + (e) => e.type == type, + ); + if (repository == null) { + throw Exception( + 'Remote repository is not passed to sync service', + ); + } + + return repository; + } + + /// Returns the local repository for the given data model type. + /// + /// This method accepts a `DataModelType` and a list of `LocalRepository` objects as parameters. + /// It returns the first `LocalRepository` object in the list that matches the given data model type. + /// If no matching repository is found, it throws an exception. + static LocalRepository getLocalForType( + DataModelType type, + List localRepositories, + ) { + final repository = localRepositories.firstWhereOrNull( + (e) => e.type == type, + ); + + if (repository == null) { + throw Exception( + 'Local repository is not passed to sync service', + ); + } + + return repository; + } +} diff --git a/packages/sync_service/lib/data/repositories/sync/sync_down.dart b/packages/sync_service/lib/data/repositories/sync/sync_down.dart new file mode 100644 index 000000000..ac36c8525 --- /dev/null +++ b/packages/sync_service/lib/data/repositories/sync/sync_down.dart @@ -0,0 +1,86 @@ +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:sync_service/utils/utils.dart'; + +import '../../../models/bandwidth/bandwidth_model.dart'; +import 'remote_type.dart'; + +/// The `PerformSyncDown` class provides a method to perform a sync down operation. +class PerformSyncDown { + /// Performs a sync down operation. + /// + /// This method accepts a `BandwidthModel`, a list of `LocalRepository` objects, a list of `RemoteRepository` objects, and a `PersistenceConfiguration` as parameters. + /// It throws an exception if the persistence configuration is `onlineOnly`. + /// It gets the items to be synced down from each local repository and groups them by type and operation. + /// It then gets the remote and local repositories for each type and applies the server generated ID to each entity. + /// Finally, it updates each entity in the local repository. + static FutureOr syncDown({ + required BandwidthModel bandwidthModel, + required List localRepositories, + required List remoteRepositories, + required PersistenceConfiguration configuration, + }) async { + if (configuration == PersistenceConfiguration.onlineOnly) { + throw Exception('Sync down is not valid for online only configuration'); + } + final futures = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), + ); + + final pendingSyncEntries = futures.expand((e) => e).toList(); + pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); + + final groupedEntries = pendingSyncEntries + .where((element) => element.type != DataModelType.service) + .toList() + .groupListsBy( + (element) => element.type, + ); + + for (final typeGroupedEntity in groupedEntries.entries) { + final groupedOperations = typeGroupedEntity.value.groupListsBy( + (element) => element.operation, + ); + + final remote = RepositoryType.getRemoteForType( + typeGroupedEntity.key, + remoteRepositories, + ); + + final local = RepositoryType.getLocalForType( + typeGroupedEntity.key, + localRepositories, + ); + + for (final operationGroupedEntity in groupedOperations.entries) { + final entities = operationGroupedEntity.value.map((e) { + final serverGeneratedId = e.serverGeneratedId; + final rowVersion = e.rowVersion; + if (serverGeneratedId != null && !e.nonRecoverableError) { + return local.opLogManager.applyServerGeneratedIdToEntity( + e.entity, + serverGeneratedId, + rowVersion, + ); + } + + return e.entity; + }).toList(); + + List? responseEntities = []; + + responseEntities = await SyncServiceSingleton() + .entityMapper + ?.syncDownEntityResponse(typeGroupedEntity, operationGroupedEntity, + entities, remote, local); + + for (var element in responseEntities!) { + await local.update(element, createOpLog: false); + } + } + } + } +} diff --git a/packages/sync_service/lib/data/repositories/sync/sync_up.dart b/packages/sync_service/lib/data/repositories/sync/sync_up.dart new file mode 100644 index 000000000..3342dcba4 --- /dev/null +++ b/packages/sync_service/lib/data/repositories/sync/sync_up.dart @@ -0,0 +1,302 @@ +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/foundation.dart'; +import 'package:sync_service/utils/utils.dart'; + +import '../../../models/bandwidth/bandwidth_model.dart'; +import 'remote_type.dart'; + +/// The `PerformSyncUp` class provides a method to perform a sync up operation. +class PerformSyncUp { + /// Performs a sync up operation. + /// + /// This method accepts a `BandwidthModel`, a list of `LocalRepository` objects, and a list of `RemoteRepository` objects as parameters. + /// It gets the items to be synced up from each local repository and groups them by type and operation. + /// It then gets the remote and local repositories for each type and applies the server generated ID to each entity. + /// Finally, it updates each entity in the local repository. + static FutureOr syncUp({ + required BandwidthModel bandwidthModel, + required List localRepositories, + required List remoteRepositories, + }) async { + // Helper function to get the entity model from a list of operation log entries + List getEntityModel( + List> opLogList, + LocalRepository local, + ) { + return opLogList + .map((e) { + final oplogEntryEntity = e.entity; + + final serverGeneratedId = e.serverGeneratedId; + final rowVersion = e.rowVersion; + if (serverGeneratedId != null) { + EntityModel? updatedEntity = + local.opLogManager.applyServerGeneratedIdToEntity( + oplogEntryEntity, + serverGeneratedId, + rowVersion, + ); + + updatedEntity = SyncServiceSingleton() + .entityMapper + ?.updatedEntity(updatedEntity, e, serverGeneratedId); + + return updatedEntity; + } + + return oplogEntryEntity; + }) + .whereNotNull() + .toList(); + } + + // Get the items to be synced up from each local repository + final futures = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), + ); + + // Group the items by type and operation + final pendingSyncEntries = futures.expand((e) => e).toList(); + pendingSyncEntries.sort((a, b) => a.createdAt.compareTo(b.createdAt)); + final groupedEntries = pendingSyncEntries.groupListsBy( + (element) => element.type, + ); + + // Sort the entries by DataModelType enum + final entries = groupedEntries.entries.toList(); + entries.sort((a, b) => DataModelType.values + .indexOf(a.key) + .compareTo(DataModelType.values.indexOf(b.key))); + + // For each type and operation, get the remote and local repositories and apply the server generated ID to each entity + for (final typeGroupedEntity in entries) { + final groupedOperations = typeGroupedEntity.value.groupListsBy( + (element) => element.operation, + ); + + final remote = RepositoryType.getRemoteForType( + typeGroupedEntity.key, + remoteRepositories, + ); + + final local = RepositoryType.getLocalForType( + typeGroupedEntity.key, + localRepositories, + ); + + // For each operation, update each entity in the local repository + for (final operationGroupedEntity in groupedOperations.entries) { + // [returns list of oplogs whose nonRecoverableError is false and syncedup is false] + final opLogList = operationGroupedEntity.value + .where( + (element) => !element.nonRecoverableError && !element.syncedUp, + ) + .toList(); + // [returns list of oplogs whose nonRecoverableError is true] + final opLogErrorList = operationGroupedEntity.value + .where((element) => element.nonRecoverableError) + .toList(); + + // [returns list of opLogs whose nonRecoverableError is false and retry count is equal to configured value] + final nonRecoverableErrorList = operationGroupedEntity.value + .where((element) => + !element.nonRecoverableError && + element.syncDownRetryCount >= + SyncServiceSingleton().syncDownRetryCount) + .toList(); + + final List>> listOfBatchedOpLogList = + opLogList.slices(bandwidthModel.batchSize).toList(); + + final List>> listOfBatchedOpLogErrorList = + opLogErrorList.slices(bandwidthModel.batchSize).toList(); + + final List>> + listOfBatchedNonRecoverableErrorList = + nonRecoverableErrorList.slices(bandwidthModel.batchSize).toList(); + + final registry = SyncServiceSingleton() + .registries + ?.getSyncRegistries(typeGroupedEntity.key, remote); + if (registry == null) { + if (kDebugMode) { + print('no custom sync registry found for ${typeGroupedEntity.key}'); + } + } + + // Handle non-recoverable errors + if (listOfBatchedNonRecoverableErrorList.isNotEmpty) { + for (final sublist in listOfBatchedNonRecoverableErrorList) { + final nonRecoverableErrorEntities = getEntityModel(sublist, local); + await remote.dumpError( + nonRecoverableErrorEntities, + operationGroupedEntity.key, + ); + if (registry != null) { + await registry.localMarkSyncUp(sublist, local); + } else { + for (final syncedEntity in sublist) { + await local.markSyncedUp( + entry: syncedEntity, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + id: syncedEntity.id, + ); + } + } + } + } + + // Handle errors + if (listOfBatchedOpLogErrorList.isNotEmpty) { + for (final sublist in listOfBatchedOpLogErrorList) { + final errorEntities = getEntityModel(sublist, local); + await remote.dumpError( + errorEntities, + operationGroupedEntity.key, + ); + for (final syncedEntity in sublist) { + await local.markSyncedUp( + entry: syncedEntity, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + id: syncedEntity.id, + ); + } + } + } + + // Handle successful operations + if (listOfBatchedOpLogList.isNotEmpty) { + final registry = SyncServiceSingleton() + .registries + ?.getSyncRegistries(typeGroupedEntity.key, remote); + if (registry == null) { + if (kDebugMode) { + print( + 'no custom sync registry found for ${typeGroupedEntity.key}'); + } + } + for (final sublist in listOfBatchedOpLogList) { + final entities = getEntityModel(sublist, local); + if (operationGroupedEntity.key == DataOperation.create) { + if (registry != null) { + await registry.create( + entities: entities, + entry: sublist, + local: local, + operationGroupedEntity: operationGroupedEntity, + typeGroupedEntity: typeGroupedEntity); + } else { + remote.bulkCreate(entities); + } + } else if (operationGroupedEntity.key == DataOperation.update) { + await Future.delayed(const Duration(seconds: 1)); + if (registry != null) { + await registry.update(entities, local); + } else { + remote.bulkUpdate(entities); + } + } else if (operationGroupedEntity.key == DataOperation.delete) { + await Future.delayed(const Duration(seconds: 1)); + if (registry != null) { + await registry.delete(entities, local); + } else { + remote.bulkDelete(entities); + } + } + if (operationGroupedEntity.key == DataOperation.singleCreate) { + for (var element in entities) { + if (registry != null) { + await registry.singleCreate(element, local); + } else { + remote.singleCreate(element); + } + } + } + if (registry != null) { + registry.localMarkSyncUp(sublist, local); + } else { + for (final syncedEntity in sublist) { + await local.markSyncedUp( + entry: syncedEntity, + id: syncedEntity.id, + nonRecoverableError: syncedEntity.nonRecoverableError, + clientReferenceId: syncedEntity.clientReferenceId, + ); + } + } + } + } + } + } + } +} + +abstract class SyncUpOperation { + Future create( + {required List> entry, + required List entities, + required LocalRepository local, + required MapEntry>> + operationGroupedEntity, + required MapEntry>> + typeGroupedEntity}); + Future update(List entities, LocalRepository local); + Future delete(List entities, LocalRepository local); + Future singleCreate(EntityModel entity, LocalRepository local); + Future localMarkSyncUp( + List> entity, LocalRepository local); +} + +class SyncServiceRegistry { + // Singleton instance + static final SyncServiceRegistry _instance = SyncServiceRegistry._internal(); + + // Private constructor for singleton pattern + SyncServiceRegistry._internal(); + + // Factory constructor to return the singleton instance + factory SyncServiceRegistry() { + return _instance; + } + + // Private map to store registries + static final Map + _registries = {}; + + /// Registers a sync registry for a given [DataModelType]. + void registerSyncRegistries( + Map registries, + ) { + registries.forEach((type, strategyList) { + _registries[type] = strategyList; // Create a new list + }); + } + + /// Retrieves a sync registry for the given [DataModelType]. + SyncUpOperation? getSyncRegistries( + DataModelType type, RemoteRepository remote) { + final strategyFunction = _registries[type]; + return strategyFunction != null ? strategyFunction(remote) : null; + } + + /// Getter to access the _registries map + Map + get registries { + return _registries; + } + + /// Setter to update the _registries map + set registries( + Map + newStrategies) { + newStrategies.forEach((type, strategyList) { + _registries[type] = strategyList; // Create a new list + }); + } +} diff --git a/packages/sync_service/lib/data/sync_entity_mapper_listener.dart b/packages/sync_service/lib/data/sync_entity_mapper_listener.dart new file mode 100644 index 000000000..63cfb63c5 --- /dev/null +++ b/packages/sync_service/lib/data/sync_entity_mapper_listener.dart @@ -0,0 +1,44 @@ +import 'dart:async'; + +import 'package:digit_data_model/data_model.dart'; + +/// The `SyncEntityMapperListener` is an abstract class that defines methods for handling sync entity mapping. +/// +/// This class provides methods for writing to the entity database, getting the sync count, handling entity responses, and updating entities. +abstract class SyncEntityMapperListener { + /// Writes the given response to the entity database. + /// + /// This method accepts a `Map` response and a list of `LocalRepository` objects as parameters. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + FutureOr writeToEntityDB( + Map response, + List localRepositories, + ); + + /// Returns the sync count for the given list of `OpLog` objects. + /// + /// This method accepts a list of `OpLog` objects as a parameter. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + int getSyncCount(List opLogs); + + /// Handles the entity response. + /// + /// This method accepts a `MapEntry` of `DataModelType` and a list of `OpLogEntry` objects, another `MapEntry` of `DataOperation` and a list of `OpLogEntry` objects, a list of `EntityModel` objects, a `RemoteRepository` object, and a `LocalRepository` object as parameters. + /// It returns a `Future` that resolves to a list of `EntityModel` objects. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + Future> syncDownEntityResponse( + MapEntry>> typeGroupedEntity, + MapEntry>> + operationGroupedEntity, + List entities, + RemoteRepository remote, + LocalRepository local); + + /// Updates the given entity. + /// + /// This method accepts an `EntityModel` object, an `OpLogEntry` object, and a `String` server generated ID as parameters. + /// It returns an updated `EntityModel` object. + /// It is expected to be overridden in a concrete implementation of `SyncEntityMapperListener`. + EntityModel updatedEntity( + EntityModel entity, OpLogEntry entry, String? serverGeneratedId); +} diff --git a/packages/sync_service/lib/data/sync_service.dart b/packages/sync_service/lib/data/sync_service.dart new file mode 100644 index 000000000..43ba120df --- /dev/null +++ b/packages/sync_service/lib/data/sync_service.dart @@ -0,0 +1,180 @@ +import 'dart:async'; + +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter_background_service/flutter_background_service.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:sync_service/data/repositories/sync/sync_down.dart'; +import 'package:sync_service/data/repositories/sync/sync_up.dart'; +import 'package:sync_service/utils/utils.dart'; + +import '../models/bandwidth/bandwidth_model.dart'; + +/// The `SyncService` class provides methods to perform sync operations. +class SyncService { + /// This function reads the params and gets the records which are not synced + /// and pushes to the sync-up and sync-down methods. + /// + /// It accepts a list of `LocalRepository` objects, a list of `RemoteRepository` objects, + /// a `BandwidthModel`, and an optional `ServiceInstance` as parameters. + /// It returns a `Future` that resolves to a `bool` indicating whether the sync operation is completed. + FutureOr performSync({ + required List localRepositories, + required List remoteRepositories, + required BandwidthModel bandwidthModel, + ServiceInstance? service, + }) async { + final configuration = SyncServiceSingleton().persistenceConfiguration; + + if (configuration == PersistenceConfiguration.onlineOnly) { + throw Exception('Sync up is not valid for online only configuration'); + } + bool isSyncCompleted = false; + + final futuresSyncDown = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedDown(bandwidthModel.userId)), + ); + final pendingSyncDownEntries = futuresSyncDown.expand((e) => e).toList(); + + final futuresSyncUp = await Future.wait( + localRepositories + .map((e) => e.getItemsToBeSyncedUp(bandwidthModel.userId)), + ); + final pendingSyncUpEntries = futuresSyncUp.expand((e) => e).toList(); + + SyncError? syncError; + +// Perform the sync Down Operation + + try { + await PerformSyncDown.syncDown( + bandwidthModel: bandwidthModel, + localRepositories: localRepositories.toSet().toList(), + remoteRepositories: remoteRepositories.toSet().toList(), + configuration: configuration!, + ); + } catch (e) { + syncError = SyncDownError(e); + service?.stopSelf(); + } + +// Perform the sync up Operation + + try { + await PerformSyncUp.syncUp( + bandwidthModel: bandwidthModel, + localRepositories: localRepositories.toSet().toList(), + remoteRepositories: remoteRepositories.toSet().toList(), + ); + } catch (e) { + syncError ??= SyncUpError(e); + service?.stopSelf(); + } + + if (syncError != null) throw 'SyncUp Error: ${syncError.error}'; + + // Recursive function which will call the Perform Sync + + if (pendingSyncUpEntries.isNotEmpty || pendingSyncDownEntries.isNotEmpty) { + await Future.delayed(const Duration(seconds: 3)); + isSyncCompleted = await performSync( + bandwidthModel: bandwidthModel, + localRepositories: localRepositories, + remoteRepositories: remoteRepositories, + ); + } else if (pendingSyncUpEntries.isEmpty && pendingSyncDownEntries.isEmpty) { + await const FlutterSecureStorage() + .write(key: 'manualSyncKey', value: false.toString()); + isSyncCompleted = true; + } + + return isSyncCompleted; + } + + /// Writes the given response to the entity database. + /// + /// This method accepts a `Map` response and a list of `LocalRepository` objects as parameters. + /// It is a `FutureOr` function. + FutureOr writeToEntityDB( + Map response, + List localRepositories, + ) async { + SyncServiceSingleton().entityMapper?.writeToEntityDB( + response, + localRepositories, + ); + } + + /// Returns the count of pending sync records for the given user. + /// + /// This method accepts a list of `LocalRepository` objects and a `String` user ID as parameters. + /// It returns a `FutureOr` that resolves to the count of pending sync records. + FutureOr getPendingSyncRecordsCount( + List localRepositories, + String userId, + ) async => + (await Future.wait(localRepositories.map((e) { + return e.getItemsToBeSyncedUp(userId); + }))) + .expand((element) => element) + .length; +} + +/// This function filters the entities by the given bandwidth. +/// +/// It accepts an integer `batchSize` and a list of `EntityModel` objects as parameters. +/// It returns a `FutureOr>` that resolves to a list of filtered `EntityModel` objects. +FutureOr> filterEntityByBandwidth( + int batchSize, + List entities, +) async { + final List items = []; + final int size = batchSize < entities.length ? batchSize : entities.length; + + for (var i = 0; i < size; i++) { + items.add(entities[i]); + } + + return items; +} + +/// This function filters the operation log entries by the given bandwidth. +/// +/// It accepts an integer `batchSize` and a list of `OpLogEntry` objects as parameters. +/// It returns a `Future>>` that resolves to a list of filtered `OpLogEntry` objects. +Future>> filterOpLogByBandwidth( + int batchSize, + List> entities, +) async { + final List> items = []; + final int size = batchSize < entities.length ? batchSize : entities.length; + + for (var i = 0; i < size; i++) { + items.add(entities[i]); + } + + return items; +} + +/// The `SyncError` class is an abstract class that represents a sync error. +/// +/// It extends the `Exception` class and includes a dynamic `error` property. +abstract class SyncError implements Exception { + final dynamic error; + + const SyncError([this.error]); +} + +/// The `SyncUpError` class represents a sync up error. +/// +/// It extends the `SyncError` class. +class SyncUpError extends SyncError { + const SyncUpError([super.error]); +} + +/// The `SyncDownError` class represents a sync down error. +/// +/// It extends the `SyncError` class. +class SyncDownError extends SyncError { + const SyncDownError([super.error]); +} diff --git a/packages/sync_service/lib/models/bandwidth/bandwidth_model.dart b/packages/sync_service/lib/models/bandwidth/bandwidth_model.dart new file mode 100644 index 000000000..7e8d724f3 --- /dev/null +++ b/packages/sync_service/lib/models/bandwidth/bandwidth_model.dart @@ -0,0 +1,22 @@ +// Importing the necessary packages +import 'package:freezed_annotation/freezed_annotation.dart'; + +// Part statements are used in Dart to create libraries that can spread over several files +part 'bandwidth_model.freezed.dart'; +part 'bandwidth_model.g.dart'; + +// The @freezed annotation marks this class as immutable and generates the necessary code +@freezed +// BandwidthModel class with a mixin of _$BandwidthModel +class BandwidthModel with _$BandwidthModel { + // Factory constructor for creating a new BandwidthModel instance + // The required keyword means that the parameter is mandatory + const factory BandwidthModel({ + required String userId, + required int batchSize, + }) = _BandwidthModel; + + // Factory constructor for creating a new BandwidthModel instance from a JSON map + factory BandwidthModel.fromJson(Map json) => + _$BandwidthModelFromJson(json); +} diff --git a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.freezed.dart b/packages/sync_service/lib/models/bandwidth/bandwidth_model.freezed.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.freezed.dart rename to packages/sync_service/lib/models/bandwidth/bandwidth_model.freezed.dart diff --git a/apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.g.dart b/packages/sync_service/lib/models/bandwidth/bandwidth_model.g.dart similarity index 100% rename from apps/health_campaign_field_worker_app/lib/models/bandwidth/bandwidth_model.g.dart rename to packages/sync_service/lib/models/bandwidth/bandwidth_model.g.dart diff --git a/packages/sync_service/lib/sync_service_lib.dart b/packages/sync_service/lib/sync_service_lib.dart new file mode 100644 index 000000000..5d94e9324 --- /dev/null +++ b/packages/sync_service/lib/sync_service_lib.dart @@ -0,0 +1,10 @@ +library sync_service; + +export 'blocs/sync/sync.dart'; +export 'data/repositories/sync/remote_type.dart'; +export 'data/repositories/sync/sync_down.dart'; +export 'data/repositories/sync/sync_up.dart'; +export 'data/sync_entity_mapper_listener.dart'; +export 'data/sync_service.dart'; +export 'models/bandwidth/bandwidth_model.dart'; +export 'utils/utils.dart'; diff --git a/packages/sync_service/lib/utils/utils.dart b/packages/sync_service/lib/utils/utils.dart new file mode 100644 index 000000000..b87946c83 --- /dev/null +++ b/packages/sync_service/lib/utils/utils.dart @@ -0,0 +1,84 @@ +import 'package:digit_data_model/data_model.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:provider/provider.dart'; +import 'package:sync_service/sync_service_lib.dart'; + +/// The `SyncServiceSingleton` class is a singleton that provides access to sync service related configurations and listeners. +/// +/// This class provides methods to set and get sync service related data such as `syncDownRetryCount`, `persistenceConfiguration`, and `entityMapper`. +class SyncServiceSingleton { + // Singleton instance + static final SyncServiceSingleton _instance = + SyncServiceSingleton._internal(); + + // Factory constructor that returns the singleton instance + factory SyncServiceSingleton() => _instance; + + // Private named constructor + SyncServiceSingleton._internal(); + + // Getter for the singleton instance + static SyncServiceSingleton get instance => _instance; + + // Listener for sync entity mapper events + SyncEntityMapperListener? _entityListener; + + SyncServiceRegistry? _registries; + + // Number of times to retry sync down operation + late int _syncDownRetryCount = 0; + + // Configuration for persistence of data + PersistenceConfiguration? _persistenceConfiguration = PersistenceConfiguration + .offlineFirst; // Default to offline first persistence configuration + + /// Sets the sync service related data. + /// + /// This method accepts `syncDownRetryCount`, `persistenceConfiguration`, and `entityMapper` as parameters and sets the corresponding properties. + void setData({ + required int syncDownRetryCount, + required PersistenceConfiguration persistenceConfiguration, + required SyncEntityMapperListener entityMapper, + }) { + _syncDownRetryCount = syncDownRetryCount; + _persistenceConfiguration = persistenceConfiguration; + _entityListener = entityMapper; + } + + void setRegistries(SyncServiceRegistry? registries) { + _registries = registries; + } + + // Getter for the sync entity mapper listener + SyncEntityMapperListener? get entityMapper => _entityListener; + + SyncServiceRegistry? get registries => _registries; + + // Getter for the sync down retry count + int get syncDownRetryCount => _syncDownRetryCount; + + // Getter for the persistence configuration + PersistenceConfiguration? get persistenceConfiguration => + _persistenceConfiguration; +} + +class SyncUtils { + // sync refresh + void syncRefresh(BuildContext context, String loggedInUserUuid) { + final syncBloc = context.read(); + syncBloc.add(SyncRefreshEvent(loggedInUserUuid)); + } + +// insert sync count + SyncState? syncCount( + BuildContext context, + ) { + SyncState? state; + final syncBloc = context.read(); + syncBloc.stream.listen((state) { + state = state; + }); + + return state; + } +} diff --git a/packages/sync_service/pubspec.yaml b/packages/sync_service/pubspec.yaml new file mode 100644 index 000000000..418269925 --- /dev/null +++ b/packages/sync_service/pubspec.yaml @@ -0,0 +1,83 @@ +name: sync_service +description: "Sync Service package provides access to sync to offline applications" +version: 0.0.1-dev.1 +homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/sync_service +repository: https://github.com/egovernments/health-campaign-field-worker-app + +environment: + sdk: '>=3.4.1 <4.0.0' + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + flutter_bloc: ^8.1.5 + freezed_annotation: ^2.4.1 + dart_mappable: ^4.2.2 + drift: ^2.18.0 + sqlite3_flutter_libs: ^0.5.11+1 + path_provider: ^2.1.3 + path: ^1.9.0 + uuid: ^4.4.0 + recase: ^4.1.0 + isar: ^3.1.0+1 + isar_flutter_libs: ^3.1.0+1 + dio: ^5.4.3+1 + collection: ^1.18.0 + flutter_background_service: ^5.0.5 + provider: ^6.1.2 + flutter_secure_storage: ^9.2.2 + digit_data_model: ^1.0.5 + +dev_dependencies: + flutter_test: + sdk: flutter + mocktail: ^1.0.3 + flutter_lints: ^4.0.0 + freezed: ^2.1.0+1 + build_runner: ^2.4.11 + json_serializable: ^6.8.0 + drift_dev: ^2.18.0 + bloc_test: ^9.1.0 + dart_mappable_builder: + git: + url: https://github.com/egovernments/health-campaign-field-worker-app/ + ref: 1.6-final-dev + path: ./packages/dart_mappable_builder + +# 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/sync_service/test/sync_service_test.dart b/packages/sync_service/test/sync_service_test.dart new file mode 100644 index 000000000..153f05566 --- /dev/null +++ b/packages/sync_service/test/sync_service_test.dart @@ -0,0 +1,3 @@ +void main() { + +} diff --git a/tools/generate-apk.sh b/tools/generate-apk.sh index 8b3225c82..163380112 100755 --- a/tools/generate-apk.sh +++ b/tools/generate-apk.sh @@ -14,46 +14,48 @@ build_apk() { fi } -# Ask user for environment to build for -echo "Please select an environment to build for (UAT, DEV, QA or ALL):" -read env -env="${env:-ALL}" +# # Ask user for environment to build for +# echo "Please select an environment to build for (UAT, DEV, QA or ALL):" +# read env +# env="${env:-ALL}" # Ask user for build config echo "Please select a build config (release or profile):" read build_config build_config="${build_config:-release}" -# Build APK for specified environment(s) and build config -if [ "$env" == "ALL" ]; then - env_list=("UAT" "DEV" "QA") -else - env_list=("$env") -fi - -./tools/install_bricks.sh - -for env_option in "${env_list[@]}"; do - cd "$APP_DIR" || exit - - case $env_option in - "UAT") - cp ".env.uat" ".env" - ;; - "QA") - cp ".env.qa" ".env" - ;; - "DEV") - cp ".env.dev" ".env" - ;; - esac +cd "$APP_DIR" || exit + +# # Build APK for specified environment(s) and build config +# if [ "$env" == "ALL" ]; then +# env_list=("UAT" "DEV" "QA") +# else +# env_list=("$env") +# fi + +# ./tools/install_bricks.sh + +# for env_option in "${env_list[@]}"; do +# cd "$APP_DIR" || exit + +# case $env_option in +# "UAT") +# cp ".env.uat" ".env" +# ;; +# "QA") +# cp ".env.qa" ".env" +# ;; +# "DEV") +# cp ".env.dev" ".env" +# ;; +# esac build_apk cd ../../ || exit mkdir -p outputs mv "$APP_DIR/build/app/outputs/flutter-apk/app-$build_config.apk" "outputs/app-$env_option-$build_config.apk" -done +# done -open outputs +# open outputs echo "APK generation complete."