Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INV-3576][INV-3488] Use of Recordsets when offline #3714

Merged
merged 19 commits into from
Nov 27, 2024

Conversation

LocalNewsTV
Copy link
Collaborator

@LocalNewsTV LocalNewsTV commented Nov 27, 2024

Overview

This PR includes the following proposed change(s):

Important

If you start the application offline by default you won't be able open a cached recordset because unrelated functions are not resolving. This is not part of this work.

#3488

#3576

  • Store list of ID's belonging to cached records in UserRecordSet's cacheMetadata
  • Implement Method fetchPaginatedCachedRecords() in RecordCacheService to populate tables when offline (Uses the cache)
  • Create Stubbed UserRecord interface to help with future typing instead of the Record<string,any> we've been using in the meantime
  • Add userMobileOffline value/prop to Recordset data to disable filters and recordsets when offline.
  • Implement offline workflow for handle_ACTIVITIES_GEOJSON_GET_REQUEST() that integrates into success handler
  • Modify RecordTableHandlers.tsx to handle subtle differences in displaying online records vs cached records
  • Closes Mobile: app crashes when clicking any of the recordsets while offline #3576

Misc Cleanup Tasks

  • Misc Conversion of Redux's useSelector to ours
  • Misc Removal of ternary rendering where else condition was React.Fragment
  • Misc conversion of Strings where RecordSetType enum is appropriate
  • Add typing to various arrays to remove typescript errors of 'cannot push to type never', etc.
  • Fixed old bug where paginating /Records to 0 would evaluate as false and throw an error

@LocalNewsTV LocalNewsTV changed the title [INV-3576] Limit Cache Records when Offline | [INV-3488] Use Cached Records when Offline [INV-3576][INV-3488] Use of Recordsets when offline Nov 27, 2024
@LocalNewsTV LocalNewsTV force-pushed the 3576-3488-block&use-recordsets-while-offline branch from 8fe0765 to 7dd37f0 Compare November 27, 2024 00:18
@plasticviking plasticviking merged commit 00a289f into dev Nov 27, 2024
3 of 6 checks passed
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants