geer-builder 1.2.889 → 1.2.891
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/GCheckout.vue +8 -1
- package/GProcessSale.vue +2 -2
- package/GProcessSaleGc.vue +2 -2
- package/dialogs/AddPaymentDialog.vue +33 -5
- package/package.json +1 -1
package/GCheckout.vue
CHANGED
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
<div class="g-cash-lable" v-if="show_gcash_fee">GCash Fee: PHP {{$_formatNumber(gcash_fee, { decimal: 2})}}</div>
|
|
60
60
|
<div class="text-bold">Order Total ({{merch.total_quantity}} Item): {{payment_method.payment_method_id =='gc_points' ? 'GC' : main_currency}} {{show_gcash_fee ? $_formatNumber(merch.order_total + gcash_fee, { decimal: 2}) : $_formatNumber(merch.order_total, { decimal: 2}) }}</div>
|
|
61
61
|
</div>
|
|
62
|
+
<div></div>
|
|
63
|
+
<div></div>
|
|
64
|
+
<div class="field col-12 q-px-lg q-mb-md" v-if="public_settings.enable_auto_activate_on_purchase">
|
|
65
|
+
<q-checkbox v-model="auto_activate" label="Auto-activate if membership code generated" />
|
|
66
|
+
</div>
|
|
62
67
|
</div>
|
|
63
68
|
</div>
|
|
64
69
|
</div>
|
|
@@ -506,7 +511,8 @@ export default {
|
|
|
506
511
|
],
|
|
507
512
|
payment_channel_tab: 'otc',
|
|
508
513
|
checkout_fix: false,
|
|
509
|
-
is_elms_popup: false
|
|
514
|
+
is_elms_popup: false,
|
|
515
|
+
auto_activate: false
|
|
510
516
|
}),
|
|
511
517
|
async mounted()
|
|
512
518
|
{
|
|
@@ -2347,6 +2353,7 @@ export default {
|
|
|
2347
2353
|
}
|
|
2348
2354
|
|
|
2349
2355
|
this.checkout_info.payment_method = this.payment_method;
|
|
2356
|
+
this.checkout_info.auto_activate = this.auto_activate;
|
|
2350
2357
|
try
|
|
2351
2358
|
{
|
|
2352
2359
|
this.$q.loading.show();
|
package/GProcessSale.vue
CHANGED
|
@@ -187,8 +187,8 @@
|
|
|
187
187
|
</div>
|
|
188
188
|
|
|
189
189
|
<div class="buttons text-right">
|
|
190
|
-
<div class="field col-12 q-px-lg q-mb-md" style="">
|
|
191
|
-
<q-checkbox v-model="auto_activate" label="
|
|
190
|
+
<div class="field col-12 q-px-lg q-mb-md" style="" v-if="public_settings.enable_auto_activate_on_purchase">
|
|
191
|
+
<q-checkbox v-model="auto_activate" label="Auto-activate if code generated" />
|
|
192
192
|
</div>
|
|
193
193
|
|
|
194
194
|
<q-btn v-if="up_coin_button" color="primary" @click="upcoinPay()" unelevated style="margin-right:5px">
|
package/GProcessSaleGc.vue
CHANGED
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
</div>
|
|
170
170
|
</div>
|
|
171
171
|
|
|
172
|
-
<div class="field col-12 q-px-lg q-mb-md" v-if="is_already_choose_slot">
|
|
173
|
-
<q-checkbox v-model="auto_activate" label="
|
|
172
|
+
<div class="field col-12 q-px-lg q-mb-md" v-if="is_already_choose_slot && public_settings.enable_auto_activate_on_purchase">
|
|
173
|
+
<q-checkbox v-model="auto_activate" label="Auto-activate if code generated" />
|
|
174
174
|
</div>
|
|
175
175
|
|
|
176
176
|
<div class="buttons text-right">
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
{{selected_slot_info.hasOwnProperty('points') ? selected_slot_info.points.up_coin : 0}}
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
|
+
<div class="gc-two-holder" v-if="show_gc_two">
|
|
34
|
+
<div v-if="selected_slot" class="field col-6 text-center text-bold">
|
|
35
|
+
Current GC Two:
|
|
36
|
+
</div>
|
|
37
|
+
<div v-if="selected_slot" class="field col-6 text-center">
|
|
38
|
+
{{selected_slot_info.hasOwnProperty('points') && selected_slot_info.points.hasOwnProperty('gc_two') ? selected_slot_info.points.gc_two : 0}}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
33
41
|
</div>
|
|
34
42
|
<div class="field col-12 q-mt-sm" style="margin-right:20px">
|
|
35
43
|
<q-select :option-label="(method) => method.hasOwnProperty('method_name') ? method.method_name : `Payment Type` " label="Payment Type" option-value="method_key" :options="payment_options" v-model="field.payment_type" stack-label></q-select>
|
|
@@ -68,7 +76,8 @@ export default
|
|
|
68
76
|
payment_options : [],
|
|
69
77
|
selected_slot_info : {wallet:0,points:{gc:0}},
|
|
70
78
|
public_setting:null,
|
|
71
|
-
hide_up_coin:true
|
|
79
|
+
hide_up_coin:true,
|
|
80
|
+
show_gc_two:false
|
|
72
81
|
}),
|
|
73
82
|
props: ['selected_slot', 'gc', 'auto_activate'],
|
|
74
83
|
async mounted()
|
|
@@ -78,6 +87,10 @@ export default
|
|
|
78
87
|
{
|
|
79
88
|
this.hide_up_coin = false;
|
|
80
89
|
}
|
|
90
|
+
if(this.public_settings.hasOwnProperty('enable_auto_activate_on_purchase') && this.public_settings.enable_auto_activate_on_purchase == true)
|
|
91
|
+
{
|
|
92
|
+
this.show_gc_two = true;
|
|
93
|
+
}
|
|
81
94
|
console.log(this.public_settings.up_coin);
|
|
82
95
|
console.log(this.hide_up_coin);
|
|
83
96
|
this.getPaymentMethods()
|
|
@@ -86,20 +99,24 @@ export default
|
|
|
86
99
|
{
|
|
87
100
|
async receivePayment()
|
|
88
101
|
{
|
|
89
|
-
if(this.gc == true || this.field.payment_type.method_key == 'wallet')
|
|
102
|
+
if(this.gc == true || this.field.payment_type.method_key == 'wallet' || this.field.payment_type.method_key == 'gc' || this.field.payment_type.method_key == 'gc_two')
|
|
90
103
|
{
|
|
91
104
|
if(this.field.payment_amount < 0)
|
|
92
105
|
{
|
|
93
|
-
this.$q.dialog({ title: "Something's not quite right", message: 'Please enter valid
|
|
106
|
+
this.$q.dialog({ title: "Something's not quite right", message: 'Please enter valid amount' });
|
|
94
107
|
}
|
|
95
|
-
else if(this.field.payment_amount > this.selected_slot_info.points.gc)
|
|
108
|
+
else if(this.field.payment_type.method_key == 'gc' && this.field.payment_amount > this.selected_slot_info.points.gc)
|
|
96
109
|
{
|
|
97
110
|
this.$q.dialog({ title: "Something's not quite right", message: 'Your GC is not enough to continue this transaction' });
|
|
98
111
|
}
|
|
99
|
-
else if(this.field.payment_amount > this.selected_slot_info.
|
|
112
|
+
else if(this.field.payment_type.method_key == 'wallet' && this.field.payment_amount > this.selected_slot_info.wallet)
|
|
100
113
|
{
|
|
101
114
|
this.$q.dialog({ title: "Something's not quite right", message: 'Your wallet is not enough to continue this transaction' });
|
|
102
115
|
}
|
|
116
|
+
else if(this.field.payment_type.method_key == 'gc_two' && (!this.selected_slot_info.points.hasOwnProperty('gc_two') || this.field.payment_amount > this.selected_slot_info.points.gc_two))
|
|
117
|
+
{
|
|
118
|
+
this.$q.dialog({ title: "Something's not quite right", message: 'Your GC Two is not enough to continue this transaction' });
|
|
119
|
+
}
|
|
103
120
|
else
|
|
104
121
|
{
|
|
105
122
|
this.$emit('receivePayment', this.field);
|
|
@@ -132,6 +149,17 @@ export default
|
|
|
132
149
|
}
|
|
133
150
|
|
|
134
151
|
})
|
|
152
|
+
|
|
153
|
+
// Add GC Two payment option if enabled
|
|
154
|
+
if(this.show_gc_two && this.selected_slot)
|
|
155
|
+
{
|
|
156
|
+
value_holder.push({
|
|
157
|
+
method_key: "gc_two",
|
|
158
|
+
method_name: "GC Two",
|
|
159
|
+
payment_method_id: "gc_two"
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
|
|
135
163
|
this.payment_options = value_holder;
|
|
136
164
|
|
|
137
165
|
if(this.gc == true)
|