@freteclick/quasar-financial-ui 1.0.108 → 1.0.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freteclick/quasar-financial-ui",
3
- "version": "1.0.108",
3
+ "version": "1.0.110",
4
4
  "author": "FreteClick",
5
5
  "description": "FreteClick financial Quasar UI Component",
6
6
  "license": "MIT",
@@ -39,8 +39,7 @@
39
39
 
40
40
  <script>
41
41
  import { mapActions, mapGetters } from 'vuex';
42
- import axios from 'axios';
43
- import { ENTRYPOINT } from '@freteclick/../../src/config/entrypoint';
42
+ import { fetch } from '@freteclick/../../src/boot/myapi';
44
43
 
45
44
  export default {
46
45
  props: {
@@ -149,11 +148,11 @@ export default {
149
148
 
150
149
  this.isLoadingDownload = true;
151
150
 
152
- const url = ENTRYPOINT + `finance/${this.invoiceId}/bank/sicred/download?timestamp=${new Date().getTime()}`;
151
+ const endpoint = `finance/${this.invoiceId}/bank/sicred/download?timestamp=${new Date().getTime()}`;
153
152
 
154
- axios.get(url, { responseType: 'blob' })
155
- .then(response => {
156
- const blob = new Blob([response.data], { type: 'application/pdf' });
153
+ fetch(endpoint)
154
+ .then(response => response.blob())
155
+ .then(blob => {
157
156
  const blobUrl = URL.createObjectURL(blob);
158
157
  this.invoiceUrlSicred = blobUrl;
159
158
  this.showBilletSicred = true;
@@ -168,7 +168,12 @@ export default {
168
168
 
169
169
  const url = ENTRYPOINT + `finance/${this.invoiceId}/bank/sicred/download?timestamp=${new Date().getTime()}`;
170
170
 
171
- axios.get(url, { responseType: 'blob' })
171
+ axios.get(url, {
172
+ responseType: 'blob',
173
+ headers: {
174
+ 'API-TOKEN': this.$store.getters['auth/user']?.token || ''
175
+ }
176
+ })
172
177
  .then(response => {
173
178
  const blob = new Blob([response.data], { type: 'application/pdf' });
174
179
  const blobUrl = URL.createObjectURL(blob);