Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050117
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[POS2] POSmajorhave not tried2022-08-31 00:102022-09-09 14:12
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version22Q3.1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version22Q3.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0050117: The safeboxes object should be removed from the LocalStorage

DescriptionCurrently, when a POS terminal is configured to use safeboxes, all the safeboxes available for that terminal are loaded during login and stored in the LocalStorage.

This can be a problem because the size of the LocalStorage is very limited and the size of the safeboxes info can get very big (many safeboxes available, each having many payment methods). Because we also use the LocalStorage to persist the state, we should only store there whatever is really needed, and the info about the safeboxes available can be stored elsewhere (i.e. on as an IndexedDB model)
Steps To ReproduceSee the attached image to check how the safeboxes object is the biggest one on a real client, it is even bigger than the uncompressed persisted state.
Proposed SolutionRemove the safeboxes object from the LocalStorage, store it as a IndexedDB model
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0050116 closedAugustoMauch The safeboxes object should be removed from the LocalStorage 

-  Notes
(0140941)
hgbot (developer)
2022-09-09 13:41

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/919 [^]
(0140942)
hgbot (developer)
2022-09-09 13:43

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1188 [^]
(0140945)
hgbot (developer)
2022-09-09 14:12

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/919 [^]
(0140946)
hgbot (developer)
2022-09-09 14:12

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 38a9331c72667e2e277f716485a5c3b8e947af9f
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 09-09-2022 13:40:27
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/38a9331c72667e2e277f716485a5c3b8e947af9f [^]

Fixes ISSUE-50117: Adds a SafeboxModelController

The new SafeboxModelController can be used to store safebox in an IndexedDB store. It will be used to replace the safebox storage,
removing them from the localstorage. The removal from the localstorage for the react POS application will be done in this MR, but
the removal from the Enyo POS will be done later on.

---
A web/org.openbravo.retail.posterminal/app/model/safebox/SafeboxModel.js
A web/org.openbravo.retail.posterminal/app/model/safebox/SafeboxModelController.js
M src/org/openbravo/retail/posterminal/OBPOSComponentProvider.java
---
(0140947)
hgbot (developer)
2022-09-09 14:12

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1188 [^]
(0140948)
hgbot (developer)
2022-09-09 14:12

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 4785959147634821b7e615772ddc952ddd09549b
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 09-09-2022 13:42:49
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/4785959147634821b7e615772ddc952ddd09549b [^]

Fixes ISSUE-50117: Removes safeboxes from LocalStorage, use SafeboxModelController to persist them in IndexedDB

Now in LoadSafeboxes instead of storing the safeboxes in the LocalStorage, we use SafeboxModelController to persist them in IndexedDB. The rest of the changes just
update the code to persist and retrieve the list of available safeboxes

---
M web-jspack/org.openbravo.pos2/src/components/Cashup/CashupSteps/SelectDrawerStep/SelectDrawerStep.jsx
M web-jspack/org.openbravo.pos2/src/components/Cashup/CashupSteps/SelectDrawerStep/__test__/SelectDrawerStep.test.jsx
M web-jspack/org.openbravo.pos2/src/components/Cashup/CashupSteps/SelectDrawerStep/stories/SelectDrawerStep.stories.jsx
M web-jspack/org.openbravo.pos2/src/components/SafeboxHistory/__test__/SafeboxHistory.test.jsx
M web-jspack/org.openbravo.pos2/src/model/user-interface/actions/safeboxHistory/LoadSafeboxes.js
M web-jspack/org.openbravo.pos2/src/ob-init.js
---

- Issue History
Date Modified Username Field Change
2022-08-31 00:11 AugustoMauch Type defect => backport
2022-08-31 00:11 AugustoMauch Target Version => 22Q3.1
2022-09-09 13:41 hgbot Note Added: 0140941
2022-09-09 13:43 hgbot Note Added: 0140942
2022-09-09 14:12 hgbot Resolution open => fixed
2022-09-09 14:12 hgbot Status scheduled => closed
2022-09-09 14:12 hgbot Note Added: 0140945
2022-09-09 14:12 hgbot Fixed in Version => RR22Q3.1
2022-09-09 14:12 hgbot Note Added: 0140946
2022-09-09 14:12 hgbot Note Added: 0140947
2022-09-09 14:12 hgbot Fixed in Version RR22Q3.1 => 22Q3.1
2022-09-09 14:12 hgbot Note Added: 0140948


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker