@freteclick/quasar-financial-ui 1.0.104 → 1.0.105

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.104",
3
+ "version": "1.0.105",
4
4
  "author": "FreteClick",
5
5
  "description": "FreteClick financial Quasar UI Component",
6
6
  "license": "MIT",
@@ -119,7 +119,10 @@
119
119
  import { mapActions, mapGetters } from 'vuex';
120
120
  import InvoiceInvoice from './details/InvoiceInvoice';
121
121
  import InvoiceOrders from './details/InvoiceOrders';
122
- import { formatMoney } from '@freteclick/quasar-common-ui/src/utils/formatter';
122
+ import {
123
+ formatMoney,
124
+ formatDateYmdTodmY,
125
+ } from "@freteclick/quasar-common-ui/src/utils/formatter";
123
126
 
124
127
  export default {
125
128
  components: {
@@ -185,15 +188,11 @@ export default {
185
188
  this.invoice = data;
186
189
  this.notFound = false;
187
190
 
188
- // format date
189
-
190
191
  if (this.invoice.dueDate) {
191
- this.invoice.dueDate = this.invoice.dueDate
192
- .replace(/^(\d{4})\-(\d{2})\-(\d{2})T00:00:00\+00:00$/g,"\$3\/\$2\/\$1");
192
+ this.invoice.dueDate = formatDateYmdTodmY(this.invoice.dueDate);
193
193
  }
194
194
 
195
195
  // set order
196
-
197
196
  if (this.invoice.order.length > 0) {
198
197
  this.orderId = this.invoice.order[0].order['@id'].match(/^\/purchasing\/orders\/([a-z0-9-]*)$/)[1];
199
198
  }
@@ -13,22 +13,6 @@
13
13
  </div>
14
14
  </div>
15
15
 
16
- <div class="col-12 q-pt-lg">
17
- <div class="row justify-center items-center gutter-2">
18
- <div class="q-pa-sm">
19
- <q-btn icon="money" size="lg" color="primary"
20
- :label="invoiceBankId === null ? 'Gerar Boleto' : 'Boleto gerado'" :loading="isLoading"
21
- @click="generateSicredBillet()" :disable="isPaid || invoiceBankId !== null" />
22
- </div>
23
- <div class="q-pa-sm">
24
- <q-btn icon="visibility" size="lg" color="primary" label="Ver Boleto" :loading="isLoadingDownload"
25
- @click="clickDownloadBilletSicred()" :disable="invoiceBankId === null" />
26
- </div>
27
-
28
-
29
- </div>
30
- </div>
31
-
32
16
  <!-- BILLET VIEWER SICRED -->
33
17
  <div :class="showBilletSicred ? 'full-width q-pa-lg' : 'hidden'">
34
18
  <div style="height: 1200px">
@@ -55,7 +39,6 @@
55
39
 
56
40
  <script>
57
41
  import { mapActions, mapGetters } from 'vuex';
58
- import axios from 'axios';
59
42
  import { ENTRYPOINT } from '@freteclick/../../src/config/entrypoint';
60
43
 
61
44
  export default {
@@ -91,19 +74,16 @@ export default {
91
74
  this.paymentType = 'boleto';
92
75
  this.showBilletSicred = true;
93
76
  this.invoiceBankId = this.invoice.invoiceBankId;
77
+ this.clickDownloadBilletSicred();
94
78
  }
95
79
 
96
80
  if (this.invoice.paymentType !== null) {
97
81
  this.paymentType = this.invoice.paymentType;
98
82
  }
99
83
 
100
- console.log(this.invoice);
101
- console.log(this.invoice.invoiceBankId);
102
-
103
- console.log('Dados de pagamento: ', this.payment);
104
-
105
- this.clickDownloadBilletSicred();
106
-
84
+ if(!this.isPaid || this.invoice.invoiceBankId === null) {
85
+ this.generateSicredBillet();
86
+ }
107
87
  },
108
88
 
109
89
  data() {