geer-builder 1.2.734 → 1.2.736

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/GBinaryWidget.vue CHANGED
@@ -7,7 +7,7 @@
7
7
  <div class="label" v-else>Unplaced Slot</div>
8
8
  <div class="value">{{ unplaced_slot_count }}</div>
9
9
  </div>
10
- <div class="section-holder">
10
+ <div class="section-holder" v-if="binary_type_settings != 'three'">
11
11
  <div class="label" v-if="is_company_success">Sales Matches Today</div>
12
12
  <div class="label" v-if="is_company_ultrapro">Cycle Pair Count</div>
13
13
  <div class="label" v-if="is_company_arkos">Match Sales</div>
@@ -16,11 +16,11 @@
16
16
  </div>
17
17
  <div class="section-holder">
18
18
  <div class="label">Left Points</div>
19
- <div class="value">{{$_formatNumber(binary_type_settings == 'one' ? slot_info.points.binary_points_left : slot_info.points.binary_two_points_left / (public_settings.hasOwnProperty('binary_divide')? public_settings.binary_divide : 1), { decimal: 2 })}}</div>
19
+ <div class="value">{{$_formatNumber(binary_type_settings == 'one' ? slot_info.points.binary_points_left : binary_type_settings == 'three' ? slot_info.points.binary_three_points_left : (slot_info.points.binary_two_points_left / (public_settings.hasOwnProperty('binary_divide') ? public_settings.binary_divide : 1) ), { decimal: 2 })}}</div>
20
20
  </div>
21
21
  <div class="section-holder">
22
22
  <div class="label">Right Points</div>
23
- <div class="value">{{$_formatNumber(binary_type_settings == 'one' ? slot_info.points.binary_points_right : slot_info.points.binary_two_points_right / (public_settings.hasOwnProperty('binary_divide')? public_settings.binary_divide : 1), { decimal: 2 })}}</div>
23
+ <div class="value">{{$_formatNumber(binary_type_settings == 'one' ? slot_info.points.binary_points_right : binary_type_settings == 'three' ? slot_info.points.binary_three_points_right : (slot_info.points.binary_two_points_right / (public_settings.hasOwnProperty('binary_divide') ? public_settings.binary_divide : 1) ), { decimal: 2 })}}</div>
24
24
  </div>
25
25
  </div>
26
26
  <div class="actions" v-bind:style="getClass()">
@@ -38,6 +38,13 @@
38
38
  <div v-else>Pairing History</div>
39
39
  </q-btn>
40
40
  </div>
41
+ <div class="left" v-if="this.history == true && binary_type_settings == 'three'">
42
+ <q-btn @click="openPairingHistory('three')" size="12px" class="full-width q-pa-sm text-primary" flat>
43
+ <q-icon class="q-mr-sm" name="fa fa-history" size="16px"></q-icon>
44
+ <div v-if="is_company_success">Initiate Sales Match History</div>
45
+ <div v-else>Pairing History</div>
46
+ </q-btn>
47
+ </div>
41
48
  <div class="right" v-if="this.genealogy == true">
42
49
  <q-btn @click="is_open_place_slots_dialog = true" size="12px" class="full-width q-pa-sm text-primary" flat>
43
50
  <q-icon class="q-mr-sm" name="fas fa-users" size="16px"></q-icon>
@@ -65,6 +72,13 @@
65
72
  <div v-else>View Binary History</div>
66
73
  </q-btn>
67
74
  </div>
75
+ <div class="right" v-if="this.binary_history == true && binary_type_settings == 'three' ">
76
+ <q-btn @click="open_binary_history('three')" size="12px" class="full-width q-pa-sm text-primary" flat>
77
+ <q-icon class="q-mr-sm" name="fas fa-users" size="16px"></q-icon>
78
+ <div v-if="is_company_success">View Sales Match History</div>
79
+ <div v-else>View Binary History</div>
80
+ </q-btn>
81
+ </div>
68
82
  <div class="right" v-if="this.binary_log == true">
69
83
  <q-btn @click="is_open_point_history_dialog = true" size="12px" class="full-width q-pa-sm text-primary" flat>
70
84
  <q-icon class="q-mr-sm" name="fas fa-users" size="16px"></q-icon>
@@ -215,6 +229,11 @@ export default
215
229
  {
216
230
  this.binary_type_settings = "two";
217
231
  }
232
+ else if(settings.active_complan[19] && settings.active_complan[19].hasOwnProperty("active") && settings.active_complan[19].active)
233
+ {
234
+ this.binary_type_settings = "three";
235
+ }
236
+
218
237
  if(this.binary_type_settings == "one")
219
238
  {
220
239
  let response = {};
@@ -313,6 +332,61 @@ export default
313
332
  // this.pairs_today = this.slot_info.pairs_today;
314
333
  // }
315
334
  }
335
+ else if(this.binary_type_settings == "three")
336
+ {
337
+ let response = {};
338
+ let reset = 0;
339
+ let setting_reset_schedule = 0;
340
+
341
+ let default_utc_timezone = settings.hasOwnProperty('default_utc_timezone') ? settings.default_utc_timezone : 8;
342
+ let binary_settings = settings.active_complan[19];
343
+ let today = moment().tz("Asia/Singapore");
344
+ setting_reset_schedule = binary_settings.hasOwnProperty('cycle_reset_time') ? binary_settings.cycle_reset_time : 0;
345
+
346
+ let for_update_date = moment().set({'hour' : setting_reset_schedule, 'minute' : 0, 'second' : 0, 'millisecond': 0});
347
+
348
+ let pairing_cycle = 1;
349
+ let current_cycle = 1;
350
+ let slot_current_cycle = this.slot_info.slot_current_cycle ? this.slot_info.slot_current_cycle : 1;
351
+
352
+ if(binary_settings.hasOwnProperty('pairing_cycle'))
353
+ {
354
+ if(binary_settings.pairing_cycle == 2)
355
+ {
356
+ pairing_cycle = 2;
357
+
358
+ if(today.diff( for_update_date ,"hours") >= 12)
359
+ {
360
+ current_cycle = 2;
361
+ }
362
+ }
363
+ }
364
+
365
+ if (typeof (this.slot_info.date_pair_daily) === 'undefined')
366
+ {
367
+ reset = 1;
368
+ }
369
+ else if(pairing_cycle == 2 && slot_current_cycle == 1 && today.diff( moment(this.slot_info.date_pair_daily.toDate()).tz("Asia/Singapore") ,"hours") >= 12)
370
+ {
371
+ reset = 1;
372
+ }
373
+ else if(today.diff( moment(this.slot_info.date_pair_daily.toDate()).tz("Asia/Singapore") ,"hours") >= 24)
374
+ {
375
+ reset = 1;
376
+ }
377
+
378
+
379
+ if(reset == 1)
380
+ {
381
+ this.pairs_today = 0;
382
+ // response.income_today = 0;
383
+ }
384
+ else
385
+ {
386
+ this.pairs_today = this.slot_info.pairs_two_today;
387
+ // response.income_today = slot_info.income_today;
388
+ }
389
+ }
316
390
  else
317
391
  {
318
392
  let response = {};
@@ -7,7 +7,7 @@
7
7
  <div :style="`background-image: url(${field.primary_picture ? field.primary_picture : public_settings.default_product_picture ? public_settings.default_product_picture : 'https://bvusolution.com/images/product-no-image.jpg'});height:200px;width:230px;background-size:80%`" class="image product-list-image" :id="i">
8
8
  </div>
9
9
  <div class="prod_name product-list-name" :style="'max-width:'+width+';'">{{field.product_name}}</div>
10
- <div class="prod_description">{{field.description}}</div>
10
+ <!-- <div class="prod_description">{{field.description}}</div> -->
11
11
  <div class="prod_price price">{{main_currency}} {{$_formatNumber(field.selling_price, { decimal: 2})}}</div>
12
12
  <div><q-btn class="full-width" label="Buy Now" color="primary" @click="showMore(field)"></q-btn></div>
13
13
  <!-- <div style="text-decoration:underline;color:blue;cursor:pointer;" @click="showMore(field)">Show More</div> -->
@@ -67,54 +67,54 @@ export default {
67
67
  // await this.$bind('variant_product_list', new DB_PRODUCTS().collection().where("type", "in", ["Membership Kit"]).where("show_on_dashboard", "==", true).where("ecommerce", "==", true).where("country_code", "==", this.country_code ? this.country_code : 'PH'));
68
68
  // console.log(this.variant_product_list);
69
69
  },
70
- buyNow(product)
71
- {
72
- this.product_details= product;
73
- if(this.user_info)
74
- {
75
- this.is_select_branch_dialog=true;
76
- }
77
- else
78
- {
79
- this.$emit('NoUserLoggedIn');
80
- }
81
- },
82
- outOfStock()
83
- {
84
- this.is_select_branch_dialog = false;
85
- swal({
86
- title: "Failed",
87
- text: "Product don't have enough stock",
88
- icon: "warning",
89
- dangerMode: true,
90
- })
91
- },
92
- async selectBranch(val)
93
- {
94
- this.is_select_branch_dialog = false;
70
+ // buyNow(product)
71
+ // {
72
+ // this.product_details= product;
73
+ // if(this.user_info)
74
+ // {
75
+ // this.is_select_branch_dialog=true;
76
+ // }
77
+ // else
78
+ // {
79
+ // this.$emit('NoUserLoggedIn');
80
+ // }
81
+ // },
82
+ // outOfStock()
83
+ // {
84
+ // this.is_select_branch_dialog = false;
85
+ // swal({
86
+ // title: "Failed",
87
+ // text: "Product don't have enough stock",
88
+ // icon: "warning",
89
+ // dangerMode: true,
90
+ // })
91
+ // },
92
+ // async selectBranch(val)
93
+ // {
94
+ // this.is_select_branch_dialog = false;
95
95
 
96
- this.branch = val.stockist_info.branch_name;
97
- // selected_branch.slot_code = val.slot_code;
98
- this.branch_details.stockist_info = val.stockist_info;
99
- this.branch_details.uid = val.owner;
100
- // console.log(this.branch_details)
101
- if(val.inventory>=this.quantity)
102
- {
103
- let array_container = [];
104
- let details = {sku: this.product_details.sku ,product_id: this.product_details.product_id, quantity: this.quantity, selected_branch: this.branch_details}
105
- array_container.push(details);
106
- this.$emit('buyNow',array_container);
107
- }
108
- else
109
- {
110
- swal({
111
- title: "Failed",
112
- text: `Product don't have enough stock (${val.inventory} available).`,
113
- icon: "warning",
114
- dangerMode: true,
115
- })
116
- }
117
- },
96
+ // this.branch = val.stockist_info.branch_name;
97
+ // // selected_branch.slot_code = val.slot_code;
98
+ // this.branch_details.stockist_info = val.stockist_info;
99
+ // this.branch_details.uid = val.owner;
100
+ // // console.log(this.branch_details)
101
+ // if(val.inventory>=this.quantity)
102
+ // {
103
+ // let array_container = [];
104
+ // let details = {sku: this.product_details.sku ,product_id: this.product_details.product_id, quantity: this.quantity, selected_branch: this.branch_details}
105
+ // array_container.push(details);
106
+ // this.$emit('buyNow',array_container);
107
+ // }
108
+ // else
109
+ // {
110
+ // swal({
111
+ // title: "Failed",
112
+ // text: `Product don't have enough stock (${val.inventory} available).`,
113
+ // icon: "warning",
114
+ // dangerMode: true,
115
+ // })
116
+ // }
117
+ // },
118
118
  showMore(product)
119
119
  {
120
120
  this.$emit('show_product',product);
package/GProductList.vue CHANGED
@@ -48,8 +48,8 @@
48
48
  <div class="product-list-row">
49
49
  <!-- <div class="prod_price price" :class="field.user_discount>0 ? 'has-discount' : ''">{{main_currency}} {{$_formatNumber(field.original_price, { decimal: 2})}}{{field.user}}</div> -->
50
50
  <!-- <div class="prod_price price has-discount" v-if="!show_original_price">{{main_currency}} {{$_formatNumber(field.original_price, { decimal: 2})}}{{field.user}}</div> -->
51
- <div class="prod_price price has-discount" v-if="!show_original_price && field.type !='Product'">{{main_currency}} {{field.original_price ? field.original_price + '.00' : 0}}</div>
52
- <div class="prod_price price has-discount" v-else-if="!show_original_price && field.type =='Product'">{{main_currency}} {{field.selling_price ? field.selling_price + '.00' : 0}}</div>
51
+ <div class="prod_price price has-discount" :style="show_discount_price ? 'text-decoration-line: line-through;font-weight:400;font-size:15px;color:gray;margin-right:3px;font-size: 15px;' : ''" v-if="!show_original_price && field.type !='Product'">{{main_currency}} {{field.original_price ? field.original_price + '.00' : 0}}</div>
52
+ <div class="prod_price price has-discount" :style="show_discount_price ? 'text-decoration-line: line-through;font-weight:400;font-size:15px;color:gray;margin-right:3px;font-size: 15px;' : ''" v-else-if="show_original_price && field.type =='Product'">{{main_currency}} {{field.selling_price ? field.selling_price + '.00' : 0}}</div>
53
53
  <div class="prod_price discount" v-if="show_discount_price && field.user_discount>0">{{main_currency}} {{ $_formatNumber(field.selling_price - (field.selling_price * (field.user_discount / 100)), { decimal: 2 }) }}</div>
54
54
  <div class="prod_price discount" v-else>{{main_currency}} {{ $_formatNumber(field.selling_price, { decimal: 2 }) }}</div>
55
55
  </div>
@@ -140,7 +140,9 @@ export default {
140
140
  show_button:Boolean,
141
141
  is_membership_only:Boolean,
142
142
  reseller_commission:Boolean,
143
- show_merchant_details:Boolean
143
+ show_merchant_details:Boolean,
144
+ view_maintenance_product:Boolean
145
+
144
146
  },
145
147
  data: () =>
146
148
  ({
@@ -328,18 +330,24 @@ export default {
328
330
  querry = querry.orderBy("created_date", "asc")
329
331
  }
330
332
  }
333
+
334
+ if(this.view_maintenance_product)
335
+ {
336
+ querry = querry.where("show_in_maintenance_tab", "==", true)
337
+ }
338
+
331
339
  let remove_prod_count=0;
332
340
  if(!loadmore)
333
341
  {
334
342
  await this.$bind('new_product_list', querry);
335
343
  let filt = this.new_product_list.map(prod => {
336
344
 
337
- if(prod.activated_only && this.user_info && !this.user_info.hasOwnProperty('active_slot') || prod.activated_only && !this.user_info)
345
+ if(prod.activated_only && this.user_info && (!this.user_info.hasOwnProperty('active_slot') || this.user_info.activated_only == null )|| prod.activated_only && !this.user_info)
338
346
  {
339
347
  remove_prod_count++;
340
348
  return false;
341
349
  }
342
- if(prod.not_activated_only && this.user_info && this.user_info.hasOwnProperty('active_slot') || prod.not_activated_only && !this.user_info)
350
+ if(prod.not_activated_only && this.user_info && ( this.user_info.hasOwnProperty('active_slot') && this.user_info.active_slot != null ) || prod.not_activated_only && !this.user_info)
343
351
  {
344
352
  remove_prod_count++;
345
353
  return false;
@@ -361,12 +369,12 @@ export default {
361
369
  let loaded_new_product_remove_count = 0;
362
370
  let filt1 = this.loaded_new_product.map(prod => {
363
371
 
364
- if(prod.activated_only && this.user_info && !this.user_info.hasOwnProperty('active_slot') || prod.activated_only && !this.user_info)
372
+ if(prod.activated_only && this.user_info && (!this.user_info.hasOwnProperty('active_slot') || this.user_info.activated_only == null ) || prod.activated_only && !this.user_info)
365
373
  {
366
374
  loaded_new_product_remove_count++;
367
375
  return false;
368
376
  }
369
- if(prod.not_activated_only && this.user_info && this.user_info.hasOwnProperty('active_slot') || prod.not_activated_only && !this.user_info)
377
+ if(prod.not_activated_only && this.user_info && ( this.user_info.hasOwnProperty('active_slot') && this.user_info.active_slot != null ) || prod.not_activated_only && !this.user_info)
370
378
  {
371
379
  loaded_new_product_remove_count++;
372
380
  return false;
@@ -378,11 +386,11 @@ export default {
378
386
  await this.$bind('loaded_new_product', querry);
379
387
  let filt = this.loaded_new_product.map(prod => {
380
388
 
381
- if(prod.activated_only && this.user_info && !this.user_info.hasOwnProperty('active_slot') || prod.activated_only && !this.user_info)
389
+ if(prod.activated_only && this.user_info && (!this.user_info.hasOwnProperty('active_slot') || this.user_info.activated_only == null ) || prod.activated_only && !this.user_info)
382
390
  {
383
391
  return false;
384
392
  }
385
- if(prod.not_activated_only && this.user_info && this.user_info.hasOwnProperty('active_slot') || prod.not_activated_only && !this.user_info)
393
+ if(prod.not_activated_only && this.user_info && ( this.user_info.hasOwnProperty('active_slot') && this.user_info.active_slot != null ) || prod.not_activated_only && !this.user_info)
386
394
  {
387
395
  return false;
388
396
  }
@@ -398,11 +406,11 @@ export default {
398
406
  await this.$bind('new_product_list', querry);
399
407
  let filt = this.new_product_list.map(prod =>
400
408
  {
401
- if(prod.activated_only && this.user_info && !this.user_info.hasOwnProperty('active_slot') || prod.activated_only && !this.user_info)
409
+ if(prod.activated_only && this.user_info && (!this.user_info.hasOwnProperty('active_slot') || this.user_info.activated_only == null ) || prod.activated_only && !this.user_info)
402
410
  {
403
411
  return false;
404
412
  }
405
- if(prod.not_activated_only && this.user_info && this.user_info.hasOwnProperty('active_slot') || prod.not_activated_only && !this.user_info)
413
+ if(prod.not_activated_only && this.user_info && ( this.user_info.hasOwnProperty('active_slot') && this.user_info.active_slot != null ) || prod.not_activated_only && !this.user_info)
406
414
  {
407
415
  return false;
408
416
  }
package/GProductPage.vue CHANGED
@@ -713,11 +713,11 @@ export default {
713
713
  await this.$bind('merchant_stock', await new DB_MERCHANT_INVENTORY().collection().where('product_id', '==', this.product_details.product_id));
714
714
  this.is_done = true;
715
715
  this.getProductReviews();
716
- if(this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && !this.user_info || this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && this.user_info && !this.user_info.hasOwnProperty('active_slot') )
716
+ if(this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && !this.user_info || this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && this.user_info && (!this.user_info.hasOwnProperty('active_slot') || this.user_info.activated_only == null ) )
717
717
  {
718
718
  this.product_details = {};
719
719
  }
720
- if(this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && !this.user_info || this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && this.user_info && this.user_info.hasOwnProperty('active_slot') )
720
+ if(this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && !this.user_info || this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && this.user_info && ( this.user_info.hasOwnProperty('active_slot') && this.user_info.active_slot != null ) )
721
721
  {
722
722
  this.product_details = {};
723
723
  }
@@ -1012,11 +1012,11 @@ export default {
1012
1012
  }
1013
1013
  this.bigpic=this.product_details.product_pictures[0];
1014
1014
  this.is_done = true;
1015
- if(this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && !this.user_info || this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && this.user_info && !this.user_info.hasOwnProperty('active_slot') )
1015
+ if(this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && !this.user_info || this.product_id.hasOwnProperty('activated_only') && this.product_id.activated_only && this.user_info && (!this.user_info.hasOwnProperty('active_slot') || this.user_info.activated_only == null ) )
1016
1016
  {
1017
1017
  this.product_details = {};
1018
1018
  }
1019
- if(this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && !this.user_info || this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && this.user_info && this.user_info.hasOwnProperty('active_slot') )
1019
+ if(this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && !this.user_info || this.product_id.hasOwnProperty('not_activated_only') && this.product_id.not_activated_only && this.user_info && ( this.user_info.hasOwnProperty('active_slot') && this.user_info.active_slot != null ) )
1020
1020
  {
1021
1021
  this.product_details = {};
1022
1022
  }
package/GSideNav.vue CHANGED
@@ -49,7 +49,7 @@
49
49
  import { log } from 'util';
50
50
  import GlobalMixins from './mixins/global_mixins';
51
51
  import DB_SLOT_CHECKER from './models/DB_SLOT';
52
-
52
+ import moment from 'moment';
53
53
  export default
54
54
  {
55
55
  mixins:[GlobalMixins],
@@ -57,7 +57,9 @@ export default
57
57
  data:() =>(
58
58
  {
59
59
  slot_checker_list:null,
60
+ enable_daily_maintenance_pv:false,
60
61
  slot_current_ctr:null,
62
+ maintenance_pv_deactivate_route:null,
61
63
  cart:"",
62
64
  cartCount:0,
63
65
  show_chat: true,
@@ -83,9 +85,11 @@ export default
83
85
  ]
84
86
  }),
85
87
  async mounted() {
88
+ let profile = await this.$_getData('public_settings');
89
+ this.enable_daily_maintenance_pv = profile.hasOwnProperty("enable_daily_maintenance_pv") ? profile.enable_daily_maintenance_pv : false;
90
+ this.maintenance_pv_deactivate_route = profile.hasOwnProperty("maintenance_pv_deactivate_route") ? profile.maintenance_pv_deactivate_route : null;
86
91
  this.link = this.$route.name;
87
92
  this.checkLoggedIn();
88
- let profile = await this.$_getData('public_settings');
89
93
  this.slot_display_counter = profile.hasOwnProperty("slot_display_counter") ? profile.slot_display_counter : false;
90
94
  this.default_profile_picture = profile.default_profile_picture;
91
95
  this.loadSlotOwned();
@@ -121,13 +125,52 @@ export default
121
125
  }
122
126
  }
123
127
  },
124
- checkLoggedIn()
128
+ async checkLoggedIn()
125
129
  {
126
130
  if(!this.user_info)
127
131
  {
128
132
  this.$router.push({ name: 'front_login' });
129
133
  }
134
+ else
135
+ {
136
+
137
+ let moment_pv_date = moment().startOf('day').toString();
138
+ let daily_check_pv_date = localStorage.getItem("daily_check_pv_date");
130
139
 
140
+ if(this.enable_daily_maintenance_pv && this.user_info.active_slot)
141
+ {
142
+ await this.$_getSlotInfo();
143
+ if(this.current_slot_info.is_monthly_pv_deactivated == true)
144
+ {
145
+ if(this.$route.name !== this.maintenance_pv_deactivate_route)
146
+ {
147
+ this.$q.dialog({
148
+ title: 'Ann Error Has Occured',
149
+ message: "This slot is deactivated."
150
+ });
151
+ this.$router.push({name: this.maintenance_pv_deactivate_route});
152
+ }
153
+ }
154
+
155
+ if(daily_check_pv_date != moment_pv_date)
156
+ {
157
+ let response = await this.$_fbCall('memberCheckDailyMaintenancePV', { slot_code: this.user_info.active_slot });
158
+ if(response.data == 1)
159
+ {
160
+ if(this.$route.name !== this.maintenance_pv_deactivate_route)
161
+ {
162
+ this.$q.dialog({
163
+ title: 'Ann Error Has Occured',
164
+ message: "This slot is deactivated."
165
+ });
166
+ this.$router.push({name: this.maintenance_pv_deactivate_route});
167
+ }
168
+ }
169
+
170
+ localStorage.setItem("daily_check_pv_date",moment_pv_date);
171
+ }
172
+ }
173
+ }
131
174
  },
132
175
  openPage(key)
133
176
  {
package/GSlotChange.vue CHANGED
@@ -70,23 +70,31 @@ export default
70
70
  {
71
71
  async chooseSlot(slot)
72
72
  {
73
- this.$q.loading.show();
74
-
75
- try
73
+ if(slot.is_monthly_pv_deactivated != true)
76
74
  {
77
- let callbackCreateAccount = await this.$_fbCall('memberUseSlot', { slot_code: slot.slot_code });
78
-
79
- setTimeout(() =>
75
+ this.$q.loading.show();
76
+ try
77
+ {
78
+ let callbackCreateAccount = await this.$_fbCall('memberUseSlot', { slot_code: slot.slot_code });
79
+
80
+ localStorage.setItem("daily_check_pv_date",null);
81
+ setTimeout(() =>
82
+ {
83
+ this.$q.loading.hide();
84
+ this.$router.push({ name: 'member_dashboard' });
85
+ }, 1000)
86
+
87
+ }
88
+ catch (error)
80
89
  {
81
90
  this.$q.loading.hide();
82
- this.$router.push({ name: 'member_dashboard' });
83
- }, 1000)
84
-
91
+ this.$q.dialog({ title: 'Ann Error Has Occured', message: error.message });
92
+ }
85
93
  }
86
- catch (error)
94
+ else
87
95
  {
88
96
  this.$q.loading.hide();
89
- this.$q.dialog({ title: 'Ann Error Has Occured', message: error.message });
97
+ this.$q.dialog({ title: 'An Error Has Occured', message: "This slot is deactivated" });
90
98
  }
91
99
  },
92
100
  formatNumber(number, options)
@@ -89,6 +89,10 @@
89
89
  {
90
90
  this.binary_type = "binary_one";
91
91
  }
92
+ else if(public_settings.hasOwnProperty('active_complan') && public_settings.active_complan[19].active && public_settings.active_complan[19].key == 'binary_three')
93
+ {
94
+ this.binary_type = "binary_three";
95
+ }
92
96
  else
93
97
  {
94
98
  this.binary_type = "binary_two";
@@ -19,7 +19,7 @@
19
19
  {{0 > slot_info.wallet? "-" : ""}}{{ formatNumber(slot_info.wallet) }}
20
20
  </div>
21
21
  <div class="wallet">
22
- {{type == 'binary_one' ? formatNumber(slot_info.points.binary_points_left) : formatNumber(slot_info.points.binary_two_points_left)}} - {{ type == 'binary_one' ? formatNumber(slot_info.points.binary_points_right) : formatNumber(slot_info.points.binary_two_points_right) }}
22
+ {{type == 'binary_one' ? formatNumber(slot_info.points.binary_points_left) : (type == 'binary_three' ? formatNumber(slot_info.points.binary_three_points_left) : formatNumber(slot_info.points.binary_two_points_left)) }} - {{ type == 'binary_one' ? formatNumber(slot_info.points.binary_points_right) : (type == 'binary_three' ? formatNumber(slot_info.points.binary_three_points_right) : formatNumber(slot_info.points.binary_two_points_right)) }}
23
23
  </div>
24
24
  </div>
25
25
  <div class="action"><q-btn size="10px" @click="loadDownline()" class="full-width" dense flat><q-icon :name="this.load_downline == false ? 'fa fa-caret-down' : 'fa fa-window-minimize'"></q-icon></q-btn></div>
@@ -35,7 +35,7 @@
35
35
  {{0 > slot_info.wallet? "-" : ""}}{{ formatNumber(slot_info.wallet) }}
36
36
  </div>
37
37
  <div class="wallet">
38
- {{type == 'binary_one' ? formatNumber(slot_info.points.binary_points_left) : formatNumber(slot_info.points.binary_two_points_left)}} - {{ type == 'binary_one' ? formatNumber(slot_info.points.binary_points_right) : formatNumber(slot_info.points.binary_two_points_right) }}
38
+ {{type == 'binary_one' ? formatNumber(slot_info.points.binary_points_left) : (type == 'binary_three' ? formatNumber(slot_info.points.binary_three_points_left) : formatNumber(slot_info.points.binary_two_points_left)) }} - {{ type == 'binary_one' ? formatNumber(slot_info.points.binary_points_right) : (type == 'binary_three' ? formatNumber(slot_info.points.binary_three_points_right) : formatNumber(slot_info.points.binary_two_points_right)) }}
39
39
  </div>
40
40
  </div>
41
41
  <div class="action"><q-btn size="10px" @click="loadDownline()" class="full-width" dense flat><q-icon :name="this.load_downline == false ? 'fa fa-caret-down' : 'fa fa-window-minimize'"></q-icon></q-btn></div>
@@ -79,6 +79,15 @@
79
79
  </template>
80
80
  </q-table>
81
81
  </div>
82
+ <div class="q-mt-sm text-right" v-if="binary_type == 'three'">
83
+ <q-table :pagination.sync="pagination" :filter="search" :loading="table_loading" separator="cell" bordered flat :data="!table_loading ? table_data2 : []" :columns="table_column2" row-key="email">
84
+ <template v-slot:body-cell-message="cellProperties">
85
+ <q-td :props="cellProperties">
86
+ <span v-html="cellProperties.value"></span>
87
+ </q-td>
88
+ </template>
89
+ </q-table>
90
+ </div>
82
91
  <div class="q-mt-sm text-right" v-else>
83
92
  <q-table :pagination.sync="pagination" :filter="search" :loading="table_loading" separator="cell" bordered flat :data="!table_loading ? table_data1 : []" :columns="table_column1" row-key="email">
84
93
  <template v-slot:body-cell-message="cellProperties">
@@ -95,6 +104,7 @@
95
104
  </template>
96
105
 
97
106
  <script>
107
+ import DB_BINARY_THREE_POINTS_HISTORY from '../models/DB_BINARY_THREE_POINTS_HISTORY';
98
108
  import DB_BINARY_TWO_POINTS_HISTORY from '../models/DB_BINARY_TWO_POINTS_HISTORY';
99
109
  import DB_REACTIVATE_SLOTS from '../models/DB_REACTIVATE_SLOTS';
100
110
  import DB_BINARY_POINTS_HISTORY from '../models/DB_BINARY_POINTS_HISTORY';
@@ -113,6 +123,7 @@
113
123
  table_loading: true,
114
124
  table_data: [],
115
125
  table_data1: [],
126
+ table_data2: [],
116
127
  test: "asda",
117
128
  search: '',
118
129
  settings: '',
@@ -367,6 +378,115 @@
367
378
  align : "right",
368
379
  }
369
380
  ],
381
+ table_column2:
382
+ [
383
+ {
384
+ name : 'date_created',
385
+ label : 'Log Date',
386
+ field : row => formatDate(row.date_created, 'MM/DD/YY (hh:mm A)'),
387
+ align : 'left',
388
+ required: true,
389
+ format: val => `${val}`,
390
+ sortable: true,
391
+
392
+ },
393
+ {
394
+ name : 'left_points_before',
395
+ label : 'Before (Left)',
396
+ field : row => row.left_points_before,
397
+ align : 'left',
398
+ required: true,
399
+ format: val => `${val}`,
400
+ sortable: true,
401
+ },
402
+ {
403
+ name : 'right_points_before',
404
+ label : 'Before (Right)',
405
+ field : row => row.right_points_before,
406
+ align : 'right',
407
+ required: true,
408
+ format: val => `${val}`,
409
+ sortable: true,
410
+ },
411
+ {
412
+ name : 'left_points_add',
413
+ label : 'Add (Left)',
414
+ field : row => row.left_points_add,
415
+ align : 'right',
416
+ required: true,
417
+ format: val => `${val}`,
418
+ sortable: true,
419
+ },
420
+ {
421
+ name : 'Right Add',
422
+ label : 'Add (Right)',
423
+ field : row => row.right_points_add,
424
+ align : 'right',
425
+ required: true,
426
+ format: val => `${val}`,
427
+ sortable: true,
428
+ },
429
+ {
430
+ name : 'left_points_after',
431
+ label : 'After (Left)',
432
+ field : row => row.left_points_after,
433
+ align : 'right',
434
+ required: true,
435
+ format: val => `${val}`,
436
+ sortable: true,
437
+ },
438
+ {
439
+ name : 'right_points_after',
440
+ label : 'After (Right)',
441
+ field : row => row.right_points_after,
442
+ align : 'right',
443
+ required: true,
444
+ format: val => `${val}`,
445
+ sortable: true,
446
+ },
447
+ {
448
+ name : 'binary_income',
449
+ label : 'Binary Income',
450
+ field : row => row.binary_income,
451
+ align : 'left',
452
+ required: true,
453
+ format : val => formatNumber(val, { decimal: 2 }),
454
+ sortable: true,
455
+ align : "left",
456
+
457
+ },
458
+ {
459
+ name : 'mentors_income',
460
+ label : 'Mentors Income',
461
+ field : row => row.mentors_income,
462
+ align : 'left',
463
+ required: true,
464
+ format : val => formatNumber(val ? val : 0, { decimal: 2 }),
465
+ sortable: true,
466
+ align : "left",
467
+
468
+ },
469
+ {
470
+ name : 'cause_slot_no',
471
+ label : 'Slot',
472
+ field : row => row.cause_info ? row.cause_info.slot_code : '----',
473
+ align : 'left',
474
+ required: true,
475
+ format : val => `${val}`,
476
+ sortable: true,
477
+ align : "right",
478
+ },
479
+ {
480
+ name : 'cause_slot',
481
+ label : 'Owner',
482
+ field : row => row.cause_info ? row.cause_info.slot_owner.full_name : '----',
483
+ align : 'left',
484
+ required: true,
485
+ format : val => `${val}`,
486
+ sortable: true,
487
+ align : "right",
488
+ }
489
+ ],
370
490
  show_currency:false,
371
491
  public_settings:[],
372
492
  }),
@@ -391,7 +511,17 @@
391
511
  {
392
512
  async getSettings()
393
513
  {
394
- if(this.binary_type == "two")
514
+ if(this.binary_type == "three")
515
+ {
516
+ this.table_column1[11].classes = "hidden";
517
+ this.table_column1[11].headerClasses = "hidden";
518
+ this.table_column1[10].classes = "hidden";
519
+ this.table_column1[10].headerClasses = "hidden";
520
+ this.table_column1[9].classes = "hidden";
521
+ this.table_column1[9].headerClasses = "hidden";
522
+ this.getTableData1();
523
+ }
524
+ else if(this.binary_type == "two")
395
525
  {
396
526
  this.table_column[11].classes = this.flushout_hide ? "hidden" : "";
397
527
  this.table_column[11].headerClasses = this.flushout_hide ? "hidden" : "";
@@ -432,12 +562,22 @@
432
562
  },
433
563
  async getTableData1()
434
564
  {
435
-
436
- await this.$bind("table_data1", new DB_BINARY_POINTS_HISTORY().collection().where("slot_code", "==", this.slot_info.slot_code).orderBy('date_created', 'desc'));
437
- this.table_data1.forEach(element => {
438
- element.binary_income = this.show_currency ? this.public_settings.main_currency+element.binary_income : element.binary_income;
439
- console.log(this.show_currency);
440
- });
565
+ if(this.binary_type == "three")
566
+ {
567
+ await this.$bind("table_data2", new DB_BINARY_THREE_POINTS_HISTORY().collection().where("slot_code", "==", this.slot_info.slot_code).orderBy('date_created', 'desc'));
568
+ this.table_data1.forEach(element => {
569
+ element.binary_income = this.show_currency ? this.public_settings.main_currency+element.binary_income : element.binary_income;
570
+ console.log(this.show_currency);
571
+ });
572
+ }
573
+ else
574
+ {
575
+ await this.$bind("table_data1", new DB_BINARY_POINTS_HISTORY().collection().where("slot_code", "==", this.slot_info.slot_code).orderBy('date_created', 'desc'));
576
+ this.table_data1.forEach(element => {
577
+ element.binary_income = this.show_currency ? this.public_settings.main_currency+element.binary_income : element.binary_income;
578
+ console.log(this.show_currency);
579
+ });
580
+ }
441
581
 
442
582
  this.table_loading = false;
443
583
  },
@@ -41,7 +41,7 @@ export default
41
41
  name : 'cause_id',
42
42
  label : 'Cause ID',
43
43
  field : row => row.cause_id,
44
- format : (val, row) => val + '('+row.cause_info.current_membership.membership_id+')',
44
+ format : (val, row) => val + row.cause_info ? '('+row.cause_info.current_membership.membership_id+')': 'Pairing Distribution',
45
45
  align : 'left',
46
46
  required: true,
47
47
  sortable: true,
@@ -73,8 +73,10 @@ export default
73
73
  {
74
74
  if(this.binary_type == 'one'){
75
75
  await this.$bind('pairing_history', new DB_SLOT_LOG().collection().where('recipient_id','==',this.user_info.active_slot).where('type','==','binary').orderBy('created_date','desc'));
76
+ }else if(this.binary_type == 'three'){
77
+ await this.$bind('pairing_history', new DB_SLOT_LOG().collection().where('recipient_id','==',this.user_info.active_slot).where('type','==','binary_three').orderBy('created_date','desc'));
76
78
  }else{
77
- await this.$bind('pairing_history', new DB_SLOT_LOG().collection().where('recipient_id','==',this.user_info.active_slot).where('type','==','binary_two').orderBy('created_date','desc'));
79
+ await this.$bind('pairing_history', new DB_SLOT_LOG().collection().where('recipient_id','==',this.user_info.active_slot).where('type','==','binary_two').orderBy('created_date','desc'));
78
80
  }
79
81
  this.loading_table = false;
80
82
  },
@@ -0,0 +1,9 @@
1
+ import MODEL from './MODEL';
2
+
3
+ export default class DB_BINARY_THREE_POINTS_HISTORY extends MODEL
4
+ {
5
+ constructor()
6
+ {
7
+ super('binary_three_points_history');
8
+ }
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.734",
3
+ "version": "1.2.736",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {