geer-builder 1.2.731 → 1.2.732

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 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 '}}&raquo;</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 '}}&raquo;</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 '}}&raquo;</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');
@@ -5,7 +5,7 @@ export default class ProductClass
5
5
  }
6
6
  getProductDiscount( membership_list, rank_list, slot_details, stockist_list, product_details)
7
7
  {
8
- let sum_discount = false;
8
+ let sum_discount = true;
9
9
  let stockist_info={};
10
10
 
11
11
  if(slot_details.stockist)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.731",
3
+ "version": "1.2.732",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {