@freteclick/quasar-financial-ui 1.0.85 → 1.0.87

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.
Files changed (51) hide show
  1. package/package.json +17 -17
  2. package/src/components/common/Filters.vue +140 -140
  3. package/src/components/expense/FormExpense.vue +309 -309
  4. package/src/components/expense/TableExpenses.vue +305 -305
  5. package/src/components/invoice/client/ClientInvoiceDetails.vue +212 -212
  6. package/src/components/invoice/client/InvoiceSearching.vue +382 -382
  7. package/src/components/invoice/client/details/InvoiceInvoice.vue +248 -248
  8. package/src/components/invoice/client/details/InvoiceOrders.vue +327 -327
  9. package/src/components/invoice/expense/CreateExpense.vue +539 -539
  10. package/src/components/invoice/expense/DetailExpense.vue +393 -393
  11. package/src/components/invoice/pay/InvoiceDetails.vue +210 -210
  12. package/src/components/invoice/pay/InvoiceSearching.vue +388 -388
  13. package/src/components/invoice/pay/details/InvoiceInvoice.vue +47 -47
  14. package/src/components/invoice/pay/details/InvoiceOrders.vue +342 -342
  15. package/src/components/invoice/receive/InvoiceDetails.vue +280 -280
  16. package/src/components/invoice/receive/InvoiceSearching.vue +359 -359
  17. package/src/components/invoice/receive/details/InvoiceInvoice.vue +453 -371
  18. package/src/components/invoice/receive/details/InvoiceInvoiceBkp.vue +259 -259
  19. package/src/components/invoice/receive/details/InvoiceOrders.vue +369 -369
  20. package/src/i18n/en-us/index.js +8 -8
  21. package/src/i18n/index.js +5 -5
  22. package/src/i18n/pt-br/index.js +30 -30
  23. package/src/pages/Invoice/Client/Details.vue +23 -23
  24. package/src/pages/Invoice/Client/Index.vue +26 -26
  25. package/src/pages/Invoice/Pay/Details.vue +23 -23
  26. package/src/pages/Invoice/Pay/Index.vue +53 -53
  27. package/src/pages/Invoice/Receive/Details.vue +23 -23
  28. package/src/pages/Invoice/Receive/Index.vue +26 -26
  29. package/src/router/routes.js +32 -32
  30. package/src/store/modules/invoice/comission/actions.js +66 -66
  31. package/src/store/modules/invoice/comission/getters.js +6 -6
  32. package/src/store/modules/invoice/comission/index.js +19 -19
  33. package/src/store/modules/invoice/comission/mutation_types.js +7 -7
  34. package/src/store/modules/invoice/comission/mutations.js +42 -42
  35. package/src/store/modules/invoice/expense/actions.js +98 -98
  36. package/src/store/modules/invoice/expense/getters.js +1 -1
  37. package/src/store/modules/invoice/expense/index.js +12 -12
  38. package/src/store/modules/invoice/expense/mutations.js +3 -3
  39. package/src/store/modules/invoice/expense/state.js +5 -5
  40. package/src/store/modules/invoice/pay/actions.js +114 -114
  41. package/src/store/modules/invoice/pay/getters.js +6 -6
  42. package/src/store/modules/invoice/pay/index.js +19 -19
  43. package/src/store/modules/invoice/pay/mutation_types.js +7 -7
  44. package/src/store/modules/invoice/pay/mutations.js +42 -42
  45. package/src/store/modules/invoice/receive/actions.js +163 -152
  46. package/src/store/modules/invoice/receive/actionsBkp.js +77 -77
  47. package/src/store/modules/invoice/receive/getters.js +6 -6
  48. package/src/store/modules/invoice/receive/index.js +19 -19
  49. package/src/store/modules/invoice/receive/mutation_types.js +7 -7
  50. package/src/store/modules/invoice/receive/mutations.js +42 -42
  51. package/src/store/store-flag.d.ts +9 -9
@@ -1,260 +1,260 @@
1
- <template>
2
- <div class="row items-center justify-center">
3
- <div class="flex flex-center" v-if="isLoading">
4
- <q-circular-progress :indeterminate="isLoading"
5
- size ="sm"
6
- color="primary"
7
- class="q-ma-md"
8
- />
9
- Carregando...
10
- </div>
11
-
12
- <!-- BILLET VIEWER -->
13
-
14
- <div :class="showBillet ? 'full-width q-pa-lg' : 'hidden'">
15
- <q-form
16
- ref ="myForm"
17
- :action="payment !== null ? payment.invoiceUrl : ''"
18
- method ="post"
19
- class ="q-mt-sm row justify-center items-center"
20
- target ="BILLET"
21
- >
22
- <input type="hidden" name="DC" :value="itauHash" />
23
- </q-form>
24
-
25
- <div style="height: 1200px">
26
- <iframe name="BILLET" width="100%" height="100%" frameBorder="0">
27
- <p>This browser does not support IFrame.</p>
28
- </iframe>
29
- </div>
30
- </div>
31
-
32
- <!-- BILLET GENERATOR TRIGGER -->
33
-
34
- <div class="col-12 q-pt-lg" v-if="paymentIsPending && billetMustBeCreated">
35
- <div
36
- style="min-height: 80vh;"
37
- class="row justify-center items-center"
38
- >
39
- <q-btn
40
- icon ="money"
41
- size ="lg"
42
- color ="primary"
43
- label ="Gerar boleto"
44
- :loading="retrievingHash"
45
- @click ="() => {
46
- this.retrievingHash = true;
47
-
48
- this.getItauHash()
49
- .then(hash => {
50
- if (hash !== null) {
51
- this.loadOnFocus = true;
52
- this.$refs.billetForm.$el
53
- .submit();
54
- }
55
- })
56
- .finally(() => {
57
- this.retrievingHash = false;
58
- });
59
- }"
60
- :disable="isPaid"
61
- />
62
- <q-form
63
- ref ="billetForm"
64
- :action="payment ? payment.invoiceUrl : ''"
65
- method ="post"
66
- target ="_blank"
67
- >
68
- <input type="hidden" name="DC" :value="itauHash" />
69
- </q-form>
70
- </div>
71
- </div>
72
-
73
- <!-- PAID MESSAGE -->
74
-
75
- <div class="col-12" v-if="payment !== null && isPaid">
76
- <div
77
- class="row items-center justify-center"
78
- style="min-height: 90vh;"
79
- >
80
- <q-banner class="text-white bg-positive text-center text-h3" rounded>
81
- <template v-slot:avatar>
82
- <q-icon name="thumb_up" color="white" />
83
- </template>
84
- O boleto foi pago
85
- </q-banner>
86
- </div>
87
- </div>
88
- </div>
89
- </template>
90
-
91
- <script>
92
- import { mapActions, mapGetters } from 'vuex';
93
-
94
- export default {
95
- props: {
96
- invoiceId: {
97
- type : String,
98
- required: true,
99
- },
100
- orderId : {
101
- type : String,
102
- required: true,
103
- },
104
- },
105
-
106
- mounted() {
107
- window.addEventListener ('focus', this.loadItauDataOnFocus);
108
- },
109
-
110
- beforeDestroy() {
111
- window.removeEventListener('focus', this.loadItauDataOnFocus);
112
- },
113
-
114
- created() {
115
- this.getPaymentStatus();
116
- },
117
-
118
- data() {
119
- return {
120
- isLoading : false,
121
- payment : null,
122
- isPaid : false,
123
- itauHash : null,
124
- showBillet : false,
125
- loadOnFocus : false,
126
- retrievingHash: false,
127
- };
128
- },
129
-
130
- computed: {
131
- ...mapGetters({
132
- myCompany: 'people/currentCompany',
133
- }),
134
-
135
- paymentIsPending() {
136
- if (this.payment === null)
137
- return false;
138
-
139
- return this.payment.invoiceRealStatus === 'pending';
140
- },
141
-
142
- billetMustBeCreated() {
143
- if (this.payment === null)
144
- return false;
145
-
146
- return this.payment.paymentType === 'choose_pending' || this.payment.paymentStatus !== 'paid';
147
- },
148
- },
149
-
150
- watch: {
151
- myCompany(company) {
152
- if (company !== null) {
153
- this.getPaymentStatus();
154
- }
155
- },
156
-
157
- payment(data) {
158
- if (!data)
159
- return;
160
-
161
- this.isPaid = data.paymentStatus === 'paid';
162
-
163
- if (data.paymentType == 'billet') {
164
- if (data.paymentStatus == 'created' && this.isPaid === false)
165
- this.getItauHash()
166
- .then(hash => {
167
- if (hash !== null)
168
- this.showBillet = true;
169
- });
170
- else
171
- this.showBillet = false;
172
- }
173
-
174
- this.$emit(
175
- 'billetStatus',
176
- {
177
- hasBillet: data.paymentType === 'billet' && data.paymentStatus === 'created',
178
- isPaid : data.paymentStatus === 'paid'
179
- }
180
- );
181
- },
182
-
183
- showBillet(show) {
184
- if (show == true) {
185
- this.$refs.myForm.$el.submit();
186
- }
187
- },
188
- },
189
-
190
- methods: {
191
- ...mapActions({
192
- getItauData: 'receiveInvoice/bankItau',
193
- }),
194
-
195
- refresh() {
196
- this.getPaymentStatus();
197
- },
198
-
199
- loadItauDataOnFocus() {
200
- if (this.loadOnFocus) {
201
- this.getPaymentStatus()
202
- .then(data => {
203
- this.loadOnFocus = false;
204
- });
205
- }
206
- },
207
-
208
- getItauHash() {
209
- let params = {};
210
-
211
- if (this.myCompany !== null)
212
- params['myCompany'] = this.myCompany.id;
213
-
214
- return this.getItauData({
215
- invoiceId: this.invoiceId,
216
- operation: 'itauhash',
217
- params : params
218
- })
219
- .then(data => {
220
- if (data !== null) {
221
- return this.itauHash = data;
222
- }
223
-
224
- return null;
225
- })
226
- .catch(error => {
227
-
228
- });
229
- },
230
-
231
- getPaymentStatus() {
232
- let params = {};
233
-
234
- this.isLoading = true;
235
-
236
- if (this.myCompany !== null)
237
- params['myCompany'] = this.myCompany.id;
238
-
239
- return this.getItauData({
240
- invoiceId: this.invoiceId,
241
- operation: 'payment',
242
- params : params
243
- })
244
- .then(data => {
245
- if (data !== null) {
246
- return this.payment = data;
247
- }
248
-
249
- return null;
250
- })
251
- .catch(error => {
252
-
253
- })
254
- .finally(() => {
255
- this.isLoading = false;
256
- });
257
- },
258
- },
259
- };
1
+ <template>
2
+ <div class="row items-center justify-center">
3
+ <div class="flex flex-center" v-if="isLoading">
4
+ <q-circular-progress :indeterminate="isLoading"
5
+ size ="sm"
6
+ color="primary"
7
+ class="q-ma-md"
8
+ />
9
+ Carregando...
10
+ </div>
11
+
12
+ <!-- BILLET VIEWER -->
13
+
14
+ <div :class="showBillet ? 'full-width q-pa-lg' : 'hidden'">
15
+ <q-form
16
+ ref ="myForm"
17
+ :action="payment !== null ? payment.invoiceUrl : ''"
18
+ method ="post"
19
+ class ="q-mt-sm row justify-center items-center"
20
+ target ="BILLET"
21
+ >
22
+ <input type="hidden" name="DC" :value="itauHash" />
23
+ </q-form>
24
+
25
+ <div style="height: 1200px">
26
+ <iframe name="BILLET" width="100%" height="100%" frameBorder="0">
27
+ <p>This browser does not support IFrame.</p>
28
+ </iframe>
29
+ </div>
30
+ </div>
31
+
32
+ <!-- BILLET GENERATOR TRIGGER -->
33
+
34
+ <div class="col-12 q-pt-lg" v-if="paymentIsPending && billetMustBeCreated">
35
+ <div
36
+ style="min-height: 80vh;"
37
+ class="row justify-center items-center"
38
+ >
39
+ <q-btn
40
+ icon ="money"
41
+ size ="lg"
42
+ color ="primary"
43
+ label ="Gerar boleto"
44
+ :loading="retrievingHash"
45
+ @click ="() => {
46
+ this.retrievingHash = true;
47
+
48
+ this.getItauHash()
49
+ .then(hash => {
50
+ if (hash !== null) {
51
+ this.loadOnFocus = true;
52
+ this.$refs.billetForm.$el
53
+ .submit();
54
+ }
55
+ })
56
+ .finally(() => {
57
+ this.retrievingHash = false;
58
+ });
59
+ }"
60
+ :disable="isPaid"
61
+ />
62
+ <q-form
63
+ ref ="billetForm"
64
+ :action="payment ? payment.invoiceUrl : ''"
65
+ method ="post"
66
+ target ="_blank"
67
+ >
68
+ <input type="hidden" name="DC" :value="itauHash" />
69
+ </q-form>
70
+ </div>
71
+ </div>
72
+
73
+ <!-- PAID MESSAGE -->
74
+
75
+ <div class="col-12" v-if="payment !== null && isPaid">
76
+ <div
77
+ class="row items-center justify-center"
78
+ style="min-height: 90vh;"
79
+ >
80
+ <q-banner class="text-white bg-positive text-center text-h3" rounded>
81
+ <template v-slot:avatar>
82
+ <q-icon name="thumb_up" color="white" />
83
+ </template>
84
+ O boleto foi pago
85
+ </q-banner>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </template>
90
+
91
+ <script>
92
+ import { mapActions, mapGetters } from 'vuex';
93
+
94
+ export default {
95
+ props: {
96
+ invoiceId: {
97
+ type : String,
98
+ required: true,
99
+ },
100
+ orderId : {
101
+ type : String,
102
+ required: true,
103
+ },
104
+ },
105
+
106
+ mounted() {
107
+ window.addEventListener ('focus', this.loadItauDataOnFocus);
108
+ },
109
+
110
+ beforeDestroy() {
111
+ window.removeEventListener('focus', this.loadItauDataOnFocus);
112
+ },
113
+
114
+ created() {
115
+ this.getPaymentStatus();
116
+ },
117
+
118
+ data() {
119
+ return {
120
+ isLoading : false,
121
+ payment : null,
122
+ isPaid : false,
123
+ itauHash : null,
124
+ showBillet : false,
125
+ loadOnFocus : false,
126
+ retrievingHash: false,
127
+ };
128
+ },
129
+
130
+ computed: {
131
+ ...mapGetters({
132
+ myCompany: 'people/currentCompany',
133
+ }),
134
+
135
+ paymentIsPending() {
136
+ if (this.payment === null)
137
+ return false;
138
+
139
+ return this.payment.invoiceRealStatus === 'pending';
140
+ },
141
+
142
+ billetMustBeCreated() {
143
+ if (this.payment === null)
144
+ return false;
145
+
146
+ return this.payment.paymentType === 'choose_pending' || this.payment.paymentStatus !== 'paid';
147
+ },
148
+ },
149
+
150
+ watch: {
151
+ myCompany(company) {
152
+ if (company !== null) {
153
+ this.getPaymentStatus();
154
+ }
155
+ },
156
+
157
+ payment(data) {
158
+ if (!data)
159
+ return;
160
+
161
+ this.isPaid = data.paymentStatus === 'paid';
162
+
163
+ if (data.paymentType == 'billet') {
164
+ if (data.paymentStatus == 'created' && this.isPaid === false)
165
+ this.getItauHash()
166
+ .then(hash => {
167
+ if (hash !== null)
168
+ this.showBillet = true;
169
+ });
170
+ else
171
+ this.showBillet = false;
172
+ }
173
+
174
+ this.$emit(
175
+ 'billetStatus',
176
+ {
177
+ hasBillet: data.paymentType === 'billet' && data.paymentStatus === 'created',
178
+ isPaid : data.paymentStatus === 'paid'
179
+ }
180
+ );
181
+ },
182
+
183
+ showBillet(show) {
184
+ if (show == true) {
185
+ this.$refs.myForm.$el.submit();
186
+ }
187
+ },
188
+ },
189
+
190
+ methods: {
191
+ ...mapActions({
192
+ getItauData: 'receiveInvoice/bankItau',
193
+ }),
194
+
195
+ refresh() {
196
+ this.getPaymentStatus();
197
+ },
198
+
199
+ loadItauDataOnFocus() {
200
+ if (this.loadOnFocus) {
201
+ this.getPaymentStatus()
202
+ .then(data => {
203
+ this.loadOnFocus = false;
204
+ });
205
+ }
206
+ },
207
+
208
+ getItauHash() {
209
+ let params = {};
210
+
211
+ if (this.myCompany !== null)
212
+ params['myCompany'] = this.myCompany.id;
213
+
214
+ return this.getItauData({
215
+ invoiceId: this.invoiceId,
216
+ operation: 'itauhash',
217
+ params : params
218
+ })
219
+ .then(data => {
220
+ if (data !== null) {
221
+ return this.itauHash = data;
222
+ }
223
+
224
+ return null;
225
+ })
226
+ .catch(error => {
227
+
228
+ });
229
+ },
230
+
231
+ getPaymentStatus() {
232
+ let params = {};
233
+
234
+ this.isLoading = true;
235
+
236
+ if (this.myCompany !== null)
237
+ params['myCompany'] = this.myCompany.id;
238
+
239
+ return this.getItauData({
240
+ invoiceId: this.invoiceId,
241
+ operation: 'payment',
242
+ params : params
243
+ })
244
+ .then(data => {
245
+ if (data !== null) {
246
+ return this.payment = data;
247
+ }
248
+
249
+ return null;
250
+ })
251
+ .catch(error => {
252
+
253
+ })
254
+ .finally(() => {
255
+ this.isLoading = false;
256
+ });
257
+ },
258
+ },
259
+ };
260
260
  </script>