mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Vue Polling - Sync code from Shipping Portal, Refactor code to use vuex
This commit is contained in:
@@ -147,9 +147,9 @@
|
||||
fetchJobResult(jobId, isLastAttempt = false) {
|
||||
this.$store.dispatch('updatePollingJobResultByJobId', {'jobId': this.getJob.jobId, 'isFetchingResult': true });
|
||||
try {
|
||||
let anotherEndpoint = route('api.job.fetch', jobId);
|
||||
let anotherEndpoint = route('api.job.fetch', this.getJob.jobId);
|
||||
if(isLastAttempt){
|
||||
anotherEndpoint = route('api.job.fetch.last.attempt', jobId, isLastAttempt);
|
||||
anotherEndpoint = route('api.job.fetch.last.attempt', this.getJob.jobId, isLastAttempt);
|
||||
}
|
||||
this.poll(anotherEndpoint, 'get', this.section, false, false); //cief todo: Uncaught (in promise) null
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user