Skip to content
Snippets Groups Projects
Commit 3aca3bf2 authored by Bhabesh Bhabani Mukhopadhyay's avatar Bhabesh Bhabani Mukhopadhyay
Browse files

#VOAPP-64 : Empty observation list not iterated

parent 37367d36
No related branches found
No related tags found
No related merge requests found
......@@ -49,29 +49,33 @@ export default {
getObservationsFromStore()
{
this.isInitialized = true;
let strObservations = localStorage.getItem(CommonUtil.CONST_STORAGE_OBSERVATION_LIST);
let lstObservations = JSON.parse(strObservations);
lstObservations.forEach(function(observation){
if(observation.uploaded==false)
{
if(observation.deleted)
{
observation.isDeleted = true;
}
else{
if(observation.observationId < 0)
if(localStorage.getItem(CommonUtil.CONST_STORAGE_OBSERVATION_LIST))
{
let strObservations = localStorage.getItem(CommonUtil.CONST_STORAGE_OBSERVATION_LIST);
let lstObservations = JSON.parse(strObservations);
lstObservations.forEach(function(observation){
if(observation.uploaded==false)
{
if(observation.deleted)
{
observation.isNew = true;
observation.isDeleted = true;
}
else{
observation.toUpload = true;
if(observation.observationId < 0)
{
observation.isNew = true;
}
else{
observation.toUpload = true;
}
}
}
}
}
});
this.observations = lstObservations;
}
});
this.observations = lstObservations;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment