geer-builder 1.2.731 → 1.2.733
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/GCashOut.vue +68 -1
- package/GCheckout.vue +49 -20
- package/GProductPage.vue +2 -2
- package/classes/ProductClass.js +1 -1
- package/package.json +1 -1
package/GCashOut.vue
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
<q-select v-model="cashout_choice" outlined dense :options="payoutmethodlist" option-label="method_label" option-value="method_key"/>
|
|
11
11
|
</div>
|
|
12
12
|
</g-card>
|
|
13
|
+
<g-card :nomargin="true" class="cashout__box cashout__amount" v-if="required_personal_pv_encash === true" >
|
|
14
|
+
<div class="cash__amount-balance" >
|
|
15
|
+
<div class="cashout__content-label cashout_title">Required Monthly Personal PV</div>
|
|
16
|
+
<div class="cash__balance-value text-primary">{{ $_formatNumber(this.required_personal_pv, { decimal: 2 }) }}</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="cash__amount-balance" >
|
|
19
|
+
<div class="cashout__content-label cashout_title">Current Monthly Personal PV</div>
|
|
20
|
+
<div class="cash__balance-value text-primary">{{ personal_pv_generating == true ? "Loading..." : $_formatNumber(this.current_slot_info.personal_monthly_pv_amount, { decimal: 2 }) }}</div>
|
|
21
|
+
</div>
|
|
22
|
+
</g-card>
|
|
13
23
|
<g-card :nomargin="true" class="cashout__box cashout__amount">
|
|
14
24
|
<div class="cash__amount-balance">
|
|
15
25
|
<div class="cashout__content-label cashout_title" v-if="is_company_ultrapro">Current Available Balance</div>
|
|
@@ -91,7 +101,8 @@
|
|
|
91
101
|
</g-card>
|
|
92
102
|
<div class="button-cashout">
|
|
93
103
|
<q-btn @click="viewStatus" color="primary" class="full-width q-pa-sm status_button" outline v-if="!metamask">View Cash Out Status</q-btn>
|
|
94
|
-
<q-btn type="submit" :disable="dontsubmit" color="primary" class="full-width q-pa-sm q-mt-sm cashout_button">{{metamask? 'CONFIRM ':'Proceed on Cash out '}}»</q-btn>
|
|
104
|
+
<q-btn type="submit" :disable="dontsubmit || required_personal_pv_encash === true ? required_personal_pv > this.current_slot_info.personal_monthly_pv_amount : false" color="primary" class="full-width q-pa-sm q-mt-sm cashout_button">{{metamask? 'CONFIRM ':'Proceed on Cash out '}}»</q-btn>
|
|
105
|
+
<!-- <q-btn type="submit" :disable="false" color="primary" class="full-width q-pa-sm q-mt-sm cashout_button">{{metamask? 'CONFIRM ':'Proceed on Cash out '}}»</q-btn> -->
|
|
95
106
|
</div>
|
|
96
107
|
</div>
|
|
97
108
|
</div>
|
|
@@ -120,11 +131,13 @@ import DB_USER from './models/DB_USER';
|
|
|
120
131
|
import CashoutStatusDialog from './dialogs/CashoutStatusDialog'
|
|
121
132
|
import TinRegistrationDialog from './dialogs/TinRegistrationDialog'
|
|
122
133
|
import {QSpinnerFacebook } from 'quasar'
|
|
134
|
+
import moment from 'moment';
|
|
123
135
|
|
|
124
136
|
export default {
|
|
125
137
|
data: () =>
|
|
126
138
|
({
|
|
127
139
|
total_charge: 0,
|
|
140
|
+
required_ppv: 0,
|
|
128
141
|
convert_currency:'',
|
|
129
142
|
convert_rate:0,
|
|
130
143
|
convert_cashout:false,
|
|
@@ -149,6 +162,11 @@ export default {
|
|
|
149
162
|
member_field:[],
|
|
150
163
|
cashout_details_tin:false,
|
|
151
164
|
settings:{},
|
|
165
|
+
membership_option:[],
|
|
166
|
+
required_personal_pv: 0,
|
|
167
|
+
required_personal_pv_encash: false,
|
|
168
|
+
personal_pv_generating: false
|
|
169
|
+
|
|
152
170
|
}),
|
|
153
171
|
mixins:[GlobalMixins],
|
|
154
172
|
components: { GCard , CashoutStatusDialog, TinRegistrationDialog},
|
|
@@ -171,6 +189,7 @@ export default {
|
|
|
171
189
|
this.is_initializing = false;
|
|
172
190
|
this.getMainCurrency();
|
|
173
191
|
this.getConvertionRate();
|
|
192
|
+
this.checkPersonalPV();
|
|
174
193
|
},
|
|
175
194
|
watch:
|
|
176
195
|
{
|
|
@@ -193,6 +212,54 @@ export default {
|
|
|
193
212
|
},
|
|
194
213
|
methods:
|
|
195
214
|
{
|
|
215
|
+
async checkPersonalPV()
|
|
216
|
+
{
|
|
217
|
+
if(this.settings.hasOwnProperty('enable_encashment_pv_maintenance') && this.settings.enable_encashment_pv_maintenance === true)
|
|
218
|
+
{
|
|
219
|
+
this.required_personal_pv_encash = true;
|
|
220
|
+
|
|
221
|
+
let membership_list = await this.$_getData('membership_list');
|
|
222
|
+
let cursor_slot_membership = this._getMembershipByID(this.current_slot_info.membership.membership_id,membership_list);
|
|
223
|
+
|
|
224
|
+
if(cursor_slot_membership)
|
|
225
|
+
{
|
|
226
|
+
this.required_personal_pv = cursor_slot_membership.computation.unilevel.required_personal_pv;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
let default_utc_timezone = this.settings.hasOwnProperty('default_utc_timezone') ? this.settings.default_utc_timezone : 8;
|
|
230
|
+
let startOfMonth = moment().utc(default_utc_timezone).format("YYYY-MM-01");
|
|
231
|
+
|
|
232
|
+
if(!this.current_slot_info.is_personal_monthly_check || startOfMonth != this.current_slot_info.personal_monthly_pv_date)
|
|
233
|
+
{
|
|
234
|
+
try
|
|
235
|
+
{
|
|
236
|
+
this.personal_pv_generating = true;
|
|
237
|
+
await this.$_fbCall('memberCheckCashoutPV', {slot_code:this.current_slot_info.slot_code});
|
|
238
|
+
await this.$_getSlotInfo();
|
|
239
|
+
this.personal_pv_generating = false;
|
|
240
|
+
}
|
|
241
|
+
catch (error)
|
|
242
|
+
{
|
|
243
|
+
// this.$q.dialog({ html: true, title: `Something's not quite right`, message: error.message });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
},
|
|
249
|
+
_getMembershipByID(membership_id, mem_list)
|
|
250
|
+
{
|
|
251
|
+
let membership = null;
|
|
252
|
+
|
|
253
|
+
mem_list.forEach(val =>
|
|
254
|
+
{
|
|
255
|
+
if(val.membership_id === membership_id)
|
|
256
|
+
{
|
|
257
|
+
membership = val;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
return membership;
|
|
262
|
+
},
|
|
196
263
|
async getCashoutMethod()
|
|
197
264
|
{
|
|
198
265
|
this.public_settings = await this.$_getData('public_settings');
|
package/GCheckout.vue
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<div id="myDIV" class="payment_method">
|
|
66
66
|
<div class="payment_method__header">Choose a Payment Method</div>
|
|
67
67
|
<div class="payment-grid">
|
|
68
|
-
<div class="btns" v-for="(method, i) in payment_method_list" :key="i" :class="i == active_index ? 'activee' : ''" v-on:click="changePaymentMethod($event,i)">
|
|
68
|
+
<div class="btns" v-for="(method, i) in payment_method_list" :key="i" :class="i == active_index ? 'activee' : ''" v-on:click="changePaymentMethod($event,i)" :style=" (is_branch_pickup == false || (is_branch_pickup == true && method.payment_method_label != 'Cash on Delivery') ) ? '' : 'display:none'">
|
|
69
69
|
<!-- <q-btn class="" @click="changePaymentMethod(i)" :label="method.payment_method_label" flat></q-btn> -->
|
|
70
70
|
<div class="image" :style="`background-image: url('`+method.icon+`')`"></div>
|
|
71
71
|
<div>{{method.payment_method_label == "Wallet" ? method.payment_method_label+" ("+ $_formatNumber(user_info.active_slot ? current_slot_info.wallet : 0, { decimal: 2}) +")" : method.payment_method_label == "GC Points" ? 'GC('+$_formatNumber(user_info.active_slot ? current_slot_info.points.gc : 0, { decimal: 2})+')' : method.payment_method_label}}</div>
|
|
@@ -420,6 +420,7 @@ export default {
|
|
|
420
420
|
props:{ checkout_list: Array, show_discount_badge: Boolean },
|
|
421
421
|
data: () =>
|
|
422
422
|
({
|
|
423
|
+
is_branch_pickup:false,
|
|
423
424
|
is_merchant_free_shipping_conflict:false,
|
|
424
425
|
is_ecom_disable:false,
|
|
425
426
|
is_select_voucher_open:false,
|
|
@@ -975,34 +976,41 @@ export default {
|
|
|
975
976
|
{
|
|
976
977
|
element.courier_chosen="No courier Available";
|
|
977
978
|
}
|
|
978
|
-
});
|
|
979
|
-
|
|
980
979
|
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
{
|
|
985
|
-
if(this.payment_method.payment_method_id)
|
|
980
|
+
if(courier_list_cod.length>0)
|
|
981
|
+
{
|
|
982
|
+
if(this.payment_method)
|
|
986
983
|
{
|
|
987
|
-
|
|
988
|
-
let find_by_local_storage = localStorage.getItem(localStorageString);
|
|
989
|
-
let mapped = courier_list_cod.map(ele => ele.courier_label);
|
|
990
|
-
let found = mapped.includes(find_by_local_storage);
|
|
991
|
-
|
|
992
|
-
if(found === true)
|
|
984
|
+
if(this.payment_method.payment_method_id)
|
|
993
985
|
{
|
|
994
|
-
|
|
986
|
+
let localStorageString = this.payment_method.payment_method_id+"_chosen";
|
|
987
|
+
let find_by_local_storage = localStorage.getItem(localStorageString);
|
|
988
|
+
let mapped = courier_list_cod.map(ele => ele.courier_label);
|
|
989
|
+
let found = mapped.includes(find_by_local_storage);
|
|
990
|
+
|
|
991
|
+
if(found === true)
|
|
995
992
|
{
|
|
996
|
-
|
|
993
|
+
courier_list_cod.forEach(elecourier =>
|
|
997
994
|
{
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
995
|
+
if(elecourier.courier_label == find_by_local_storage)
|
|
996
|
+
{
|
|
997
|
+
element.courier_chosen = elecourier.courier_label;
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
}
|
|
1005
1004
|
|
|
1005
|
+
if(element.courier_chosen == "Branch Pickup")
|
|
1006
|
+
{
|
|
1007
|
+
this.is_branch_pickup = true;
|
|
1008
|
+
}
|
|
1009
|
+
else
|
|
1010
|
+
{
|
|
1011
|
+
this.is_branch_pickup = false;
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1006
1014
|
}
|
|
1007
1015
|
else
|
|
1008
1016
|
{
|
|
@@ -1055,6 +1063,16 @@ export default {
|
|
|
1055
1063
|
}
|
|
1056
1064
|
}
|
|
1057
1065
|
}
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
if(element.courier_chosen == "Branch Pickup")
|
|
1069
|
+
{
|
|
1070
|
+
this.is_branch_pickup = true;
|
|
1071
|
+
}
|
|
1072
|
+
else
|
|
1073
|
+
{
|
|
1074
|
+
this.is_branch_pickup = false;
|
|
1075
|
+
}
|
|
1058
1076
|
});
|
|
1059
1077
|
|
|
1060
1078
|
|
|
@@ -1067,6 +1085,17 @@ export default {
|
|
|
1067
1085
|
this.is_courier_list_open = false;
|
|
1068
1086
|
let merchant_index = this.groupedProducts.map(function(e) { return e.merchant_slot_code; }).indexOf(val.order.merchant_slot_code);
|
|
1069
1087
|
this.groupedProducts[merchant_index].courier_chosen = val.courier;
|
|
1088
|
+
|
|
1089
|
+
if(this.groupedProducts[merchant_index].courier_chosen == "Branch Pickup")
|
|
1090
|
+
{
|
|
1091
|
+
this.is_branch_pickup = true;
|
|
1092
|
+
}
|
|
1093
|
+
else
|
|
1094
|
+
{
|
|
1095
|
+
this.is_branch_pickup = false;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
|
|
1070
1099
|
// this.groupedProducts[merchant_index].shipping_fee = 100;
|
|
1071
1100
|
// console.log(val.courier)
|
|
1072
1101
|
this.computations();
|
package/GProductPage.vue
CHANGED
|
@@ -729,7 +729,7 @@ export default {
|
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
if(this.user_info && this.user_info['active_slot'])
|
|
732
|
-
this.url = window.location.href.split('?')[0]+"?product_id="+this.product_id.product_id+"&sponsor="+this.user_info['active_slot'];
|
|
732
|
+
this.url = window.location.href.split('?')[0]+"?product_id="+this.product_id.product_id+"&sponsor="+encodeURIComponent(this.user_info['active_slot']);
|
|
733
733
|
else
|
|
734
734
|
this.url = window.location.href.split('?')[0]+"?product_id="+this.product_id.product_id;
|
|
735
735
|
if(this.public_settings.dynamic_link_prefix)
|
|
@@ -832,7 +832,7 @@ export default {
|
|
|
832
832
|
window.history.replaceState({},document.title, window.location.href.split('?')[0]);
|
|
833
833
|
}
|
|
834
834
|
if(this.user_info && this.user_info['active_slot'])
|
|
835
|
-
this.url = window.location.href.split('?')[0]+"?product_id="+this.product_id.product_id+"&sponsor="+this.user_info['active_slot'];
|
|
835
|
+
this.url = window.location.href.split('?')[0]+"?product_id="+this.product_id.product_id+"&sponsor="+encodeURIComponent(this.user_info['active_slot']);
|
|
836
836
|
else
|
|
837
837
|
this.url = window.location.href.split('?')[0]+"?product_id="+this.product_id.product_id;
|
|
838
838
|
this.public_settings = await this.$_getData('public_settings');
|
package/classes/ProductClass.js
CHANGED