(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9e675918"],{"3e98":function(t,e,a){"use strict";a("e64c")},4734:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-content"},[e("breadcumb",{attrs:{page:"Result File",folder:"Transaction"}}),e("b-card",{ref:"formContainer",staticClass:"wrapper"},[100!==t.percentage?e("div",{staticClass:"spinner spinner-primary mr-3"}):t._e(),e("b-form-group",[e("span",{staticClass:"text-muted"},[t._v("Status : ")]),e("b-badge",{attrs:{pill:"",variant:"Menunggu"!==t.status?"success":"warning"}},[t._v(t._s(t.status)+" "+t._s(t.percentage)+"%")])],1),e("b-form-group",[e("span",{staticClass:"text-muted"},[t._v("Total Jobs : "+t._s(t.total_jobs))])]),e("b-form-group",[e("span",{staticClass:"text-muted"},[t._v("Failed Jobs : "+t._s(t.failed_job))])]),e("b-form-group",[e("span",{staticClass:"text-muted"},[t._v("Pending Jobs : "+t._s(t.pending_jobs))])]),e("b-form-group",[t._v(" Silahkan "),e("a",{attrs:{href:t.sourceFile,download:"",target:"_blank"}},[t._v("klik disini")]),t._v(" untuk mengunduh file ")])],1)],1)},s=[],o=(a("99af"),{data:function(){return{pollInterval:0,status:"Menunggu",percentage:0,failed_job:0,total_jobs:0,pending_jobs:0,sourceFile:null}},created:function(){this.handleCheckFile()},methods:{handleCheckFile:function(){var t=this;this.pollInterval=setInterval((function(){t.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","transactions/bulk-create/").concat(t.$route.params.jobid),{headers:{Authorization:"Bearer ".concat(t.$store.getters["accessToken"])}}).then((function(e){t.percentage=e.data.percentage,t.failed_job=e.data.failed_jobs,t.total_jobs=e.data.total_jobs,t.pending_jobs=e.data.pending_jobs,100===t.percentage&&(clearInterval(t.pollInterval),t.status="Berhasil",t.handleLinkDownload(e.data.id))})).catch((function(e){t.$store.dispatch("error",e)}))}),1e3)},handleLinkDownload:function(t){var e=this;this.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","transactions/processed-file/").concat(t),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(t){e.sourceFile=t.data})).catch((function(t){e.$store.dispatch("error",t)}))}},beforeDestroy:function(){clearInterval(this.pollInterval)}}),r=o,i=(a("3e98"),a("2877")),c=Object(i["a"])(r,n,s,!1,null,"615a41f0",null);e["default"]=c.exports},e64c:function(t,e,a){}}]);