geer-builder 1.2.950 → 1.2.952
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/GManualPaymentPage.vue +35 -0
- package/GReferralLink.vue +55 -3
- package/package.json +2 -1
package/GManualPaymentPage.vue
CHANGED
|
@@ -42,6 +42,12 @@
|
|
|
42
42
|
<div>Payment: <b>{{this.order_info.payment_method.manual_pay_choice.bank_label}}</b></div>
|
|
43
43
|
<div>Account Name: <b>{{this.order_info.payment_method.manual_pay_choice.account_name}}</b></div>
|
|
44
44
|
<div>Account Number: <b>{{this.order_info.payment_method.manual_pay_choice.account_number}}</b></div>
|
|
45
|
+
<template v-if="resolved_additional_accounts.length > 0">
|
|
46
|
+
<div v-for="(extra, idx) in resolved_additional_accounts" :key="idx" style="margin-top:5px;">
|
|
47
|
+
<div>Account Name: <b>{{extra.account_name}}</b></div>
|
|
48
|
+
<div>Account Number: <b>{{extra.account_number}}</b></div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
45
51
|
<div>Order Total: <b>{{ public_settings.main_currency }} {{$_formatNumber(this.order_info.orders.order_total, { decimal: 2})}} {{ public_settings.hasOwnProperty('adspro_cashin_conversion_rate') ? `(PHP ${this.order_info.orders.order_total * public_settings.adspro_cashin_conversion_rate})` : '' }}</b></div>
|
|
46
52
|
</div>
|
|
47
53
|
</div>
|
|
@@ -110,6 +116,35 @@ export default {
|
|
|
110
116
|
|
|
111
117
|
// this.getaAccountList();
|
|
112
118
|
},
|
|
119
|
+
computed:
|
|
120
|
+
{
|
|
121
|
+
resolved_additional_accounts()
|
|
122
|
+
{
|
|
123
|
+
var choice = this.order_info && this.order_info.payment_method
|
|
124
|
+
? this.order_info.payment_method.manual_pay_choice
|
|
125
|
+
: null;
|
|
126
|
+
if (!choice) return [];
|
|
127
|
+
|
|
128
|
+
// Source 1: additional_account saved on the order
|
|
129
|
+
if (choice.additional_account && choice.additional_account.length > 0)
|
|
130
|
+
{
|
|
131
|
+
return choice.additional_account;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Source 2: fallback to public_settings.manual_payment_additional_account filtered by bank_id
|
|
135
|
+
if (this.public_settings
|
|
136
|
+
&& this.public_settings.manual_payment_additional_account
|
|
137
|
+
&& this.public_settings.manual_payment_additional_account.length > 0)
|
|
138
|
+
{
|
|
139
|
+
var bank_id = choice.bank_id;
|
|
140
|
+
return this.public_settings.manual_payment_additional_account.filter(function(acc) {
|
|
141
|
+
return acc.bank_id === bank_id;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
},
|
|
113
148
|
methods:
|
|
114
149
|
{
|
|
115
150
|
getPictures(val)
|
package/GReferralLink.vue
CHANGED
|
@@ -7,18 +7,33 @@
|
|
|
7
7
|
<div v-else-if="change_label_1">{{change_label_1}}</div>
|
|
8
8
|
<div v-else>Copy Referral Link</div>
|
|
9
9
|
</q-btn>
|
|
10
|
+
<!-- QR Code Section -->
|
|
11
|
+
<div v-if="show_qr && qr_data_url" class="q-mt-md" style="text-align: center;">
|
|
12
|
+
<img :src="qr_data_url" alt="QR Code" style="max-width: 250px;" />
|
|
13
|
+
<div class="q-mt-sm">
|
|
14
|
+
<q-btn @click="downloadQR()" color="primary" outline size="sm" class="q-mr-sm">
|
|
15
|
+
<q-icon name="fas fa-download" size="14px" class="q-mr-xs"></q-icon>
|
|
16
|
+
Download QR
|
|
17
|
+
</q-btn>
|
|
18
|
+
<q-btn @click="shareQR()" color="primary" outline size="sm">
|
|
19
|
+
<q-icon name="fas fa-share-alt" size="14px" class="q-mr-xs"></q-icon>
|
|
20
|
+
Share
|
|
21
|
+
</q-btn>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
10
24
|
<input style="opacity: 0" v-model="replicated_link" id="referral_link" type="text">
|
|
11
25
|
</div>
|
|
12
26
|
</template>
|
|
13
27
|
<script>
|
|
14
28
|
import GlobalMixins from './mixins/global_mixins';
|
|
29
|
+
import QRCode from 'qrcode';
|
|
15
30
|
|
|
16
31
|
export default
|
|
17
32
|
{
|
|
18
33
|
name: "GReferralLinkComponent",
|
|
19
34
|
components: {},
|
|
20
35
|
mixins: [GlobalMixins],
|
|
21
|
-
props: ['ref_link', 'is_company_ultrapro','change_label_1'],
|
|
36
|
+
props: ['ref_link', 'is_company_ultrapro', 'change_label_1', 'show_qr'],
|
|
22
37
|
filters: {},
|
|
23
38
|
data: () => (
|
|
24
39
|
{
|
|
@@ -27,6 +42,7 @@ export default
|
|
|
27
42
|
public_settings: {},
|
|
28
43
|
link: '',
|
|
29
44
|
settings_link: false,
|
|
45
|
+
qr_data_url: '',
|
|
30
46
|
}),
|
|
31
47
|
async mounted() {
|
|
32
48
|
await this.$_getSlotInfo();
|
|
@@ -43,6 +59,13 @@ export default
|
|
|
43
59
|
this.replicated_link = `https://${window.location.host}/#/invite/${replace_space}`;
|
|
44
60
|
}
|
|
45
61
|
this.loading = false;
|
|
62
|
+
|
|
63
|
+
// Generate QR code if show_qr prop is enabled
|
|
64
|
+
if (this.show_qr) {
|
|
65
|
+
QRCode.toDataURL(this.replicated_link, { width: 250, margin: 2 })
|
|
66
|
+
.then(function(url) { this.qr_data_url = url; }.bind(this))
|
|
67
|
+
.catch(function(err) { console.error('QR generation failed:', err); });
|
|
68
|
+
}
|
|
46
69
|
},
|
|
47
70
|
methods:
|
|
48
71
|
{
|
|
@@ -77,10 +100,39 @@ export default
|
|
|
77
100
|
color: 'black'
|
|
78
101
|
});
|
|
79
102
|
}
|
|
103
|
+
},
|
|
104
|
+
downloadQR() {
|
|
105
|
+
var link = document.createElement('a');
|
|
106
|
+
link.download = 'referral-qr-code.png';
|
|
107
|
+
link.href = this.qr_data_url;
|
|
108
|
+
link.click();
|
|
109
|
+
},
|
|
110
|
+
shareQR() {
|
|
111
|
+
var self = this;
|
|
112
|
+
if (navigator.share) {
|
|
113
|
+
fetch(this.qr_data_url)
|
|
114
|
+
.then(function(response) { return response.blob(); })
|
|
115
|
+
.then(function(blob) {
|
|
116
|
+
var file = new File([blob], 'referral-qr-code.png', { type: 'image/png' });
|
|
117
|
+
return navigator.share({
|
|
118
|
+
title: 'My Referral Link',
|
|
119
|
+
text: self.replicated_link,
|
|
120
|
+
files: [file]
|
|
121
|
+
});
|
|
122
|
+
})
|
|
123
|
+
.catch(function() {
|
|
124
|
+
// Fallback: just share the link text
|
|
125
|
+
if (navigator.share) {
|
|
126
|
+
navigator.share({ title: 'My Referral Link', text: self.replicated_link });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
} else {
|
|
130
|
+
// Desktop fallback: copy link
|
|
131
|
+
this.copyLink();
|
|
132
|
+
}
|
|
80
133
|
}
|
|
81
|
-
|
|
82
134
|
},
|
|
83
135
|
computed: {}
|
|
84
136
|
}
|
|
85
137
|
</script>
|
|
86
|
-
<style lang="scss" scoped></style>
|
|
138
|
+
<style lang="scss" scoped></style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geer-builder",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.952",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"lodash": "^4.17.21",
|
|
20
20
|
"moment-timezone": "^0.5.33",
|
|
21
21
|
"philippine-location-json-for-geer": "^1.1.11",
|
|
22
|
+
"qrcode": "^1.5.3",
|
|
22
23
|
"soap": "^0.43.0",
|
|
23
24
|
"sweetalert": "^2.1.2",
|
|
24
25
|
"validator": "^13.5.2",
|