|
@@ -390,6 +390,7 @@
|
|
},
|
|
},
|
|
setCurrentClaim: function(_index) {
|
|
setCurrentClaim: function(_index) {
|
|
let claim = this.claims[_index];
|
|
let claim = this.claims[_index];
|
|
|
|
+ localStorage.currentClaimUid = claim.uid;
|
|
if(this.currentClaim && this.currentClaim.uid === claim.uid) return;
|
|
if(this.currentClaim && this.currentClaim.uid === claim.uid) return;
|
|
this.currentMBClaim = null;
|
|
this.currentMBClaim = null;
|
|
this.currentClaimLines = null;
|
|
this.currentClaimLines = null;
|
|
@@ -425,6 +426,18 @@
|
|
},
|
|
},
|
|
resetCurrentClaim: function() {
|
|
resetCurrentClaim: function() {
|
|
if(this.claims && this.claims.length) {
|
|
if(this.claims && this.claims.length) {
|
|
|
|
+
|
|
|
|
+ let storedClaimUid = localStorage.currentClaimUid;
|
|
|
|
+ if(storedClaimUid) {
|
|
|
|
+ for (let i = 0; i < this.claims.length; i++) {
|
|
|
|
+ if (storedClaimUid === this.claims[i].uid && (!this.claims[i].status || this.claims[i].status === 'NEW' ||
|
|
|
|
+ (this.claims[i].status === 'PICKED_UP' && this.claims[i].status_pro_id === this.proId))) {
|
|
|
|
+ this.setCurrentClaim(i);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
for (let i = 0; i < this.claims.length; i++) {
|
|
for (let i = 0; i < this.claims.length; i++) {
|
|
if (!this.claims[i].status || this.claims[i].status === 'NEW' ||
|
|
if (!this.claims[i].status || this.claims[i].status === 'NEW' ||
|
|
(this.claims[i].status === 'PICKED_UP' && this.claims[i].status_pro_id === this.proId)) {
|
|
(this.claims[i].status === 'PICKED_UP' && this.claims[i].status_pro_id === this.proId)) {
|
|
@@ -512,6 +525,11 @@
|
|
});
|
|
});
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ // auto-reload every minute
|
|
|
|
+ window.setTimeout(() => {
|
|
|
|
+ fastReload();
|
|
|
|
+ }, 60000);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|