Commit 65e1e9f3 by Yvon Kerdoncuff

to avoid unwanted deletion of local storage (by false detection of changed local…

to avoid unwanted deletion of local storage (by false detection of changed local storage) in shelf inventory app, make sure dates have same format before comparing them
parent 70ac02d7
Pipeline #4149 failed with stage
...@@ -319,7 +319,8 @@ $(document).ready(function() { ...@@ -319,7 +319,8 @@ $(document).ready(function() {
if ( if (
stored_shelf !== null stored_shelf !== null
&& stored_shelf.ongoing_inv_start_datetime !== undefined && stored_shelf.ongoing_inv_start_datetime !== undefined
&& shelf.ongoing_inv_start_datetime !== stored_shelf.ongoing_inv_start_datetime && shelf.ongoing_inv_start_datetime //stored_sheld.ongoing_inv_start_datetime MUST be cleaned for comparison
!== stored_shelf.ongoing_inv_start_datetime.replace("T", " ").split(".")[0]
) { ) {
localStorage.removeItem('shelf_' + shelf.id); localStorage.removeItem('shelf_' + shelf.id);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment