geer-builder 1.2.718 → 1.2.720

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
@@ -326,15 +326,50 @@ export default
326
326
  // let today_pair_daily = moment().set({'hour' : setting_reset_schedule, 'minute' : 0, 'second' : 0, 'millisecond': 0}).utc(default_utc_timezone);
327
327
 
328
328
  let for_update_date = moment().set({'hour' : setting_reset_schedule, 'minute' : 0, 'second' : 0, 'millisecond': 0});
329
+
330
+ let pairing_cycle = 1;
331
+ let current_cycle = 1;
332
+ let slot_current_cycle = this.slot_info.slot_current_cycle ? this.slot_info.slot_current_cycle : 1;
333
+
334
+ // if (typeof (this.slot_info.date_pair_daily) === 'undefined')
335
+ // {
336
+ // reset = 1
337
+ // }
338
+ // else if(today.diff( moment(this.slot_info.date_pair_daily.toDate()).tz("Asia/Singapore") ,"hours") >= 24)
339
+ // {
340
+ // reset = 1;
341
+ // }
342
+
343
+ if(binary_settings.hasOwnProperty('pairing_cycle'))
344
+ {
345
+ if(binary_settings.pairing_cycle == 2)
346
+ {
347
+ pairing_cycle = 2;
348
+
349
+ if(today.diff( for_update_date ,"hours") >= 12)
350
+ {
351
+ current_cycle = 2;
352
+ }
353
+ }
354
+ }
355
+
329
356
  if (typeof (this.slot_info.date_pair_daily) === 'undefined')
330
357
  {
331
- reset = 1
358
+ reset = 1;
359
+ }
360
+ else if(pairing_cycle == 2 && slot_current_cycle == 1 && today.diff( moment(this.slot_info.date_pair_daily.toDate()).tz("Asia/Singapore") ,"hours") >= 12)
361
+ {
362
+ reset = 1;
332
363
  }
333
364
  else if(today.diff( moment(this.slot_info.date_pair_daily.toDate()).tz("Asia/Singapore") ,"hours") >= 24)
334
365
  {
335
366
  reset = 1;
336
367
  }
337
368
 
369
+
370
+
371
+
372
+
338
373
  if(reset == 1)
339
374
  {
340
375
  this.pairs_today = 0;
package/GProductList.vue CHANGED
@@ -24,10 +24,10 @@
24
24
 
25
25
  </div>
26
26
  </template>
27
- <template v-if="show_reseller_commission && field.referral_commission > 0 ">
27
+ <template v-if="show_reseller_commission && (field.referral_commission > 0 || (is_rc_fixed == true ? (field.fix_referral_recommission ? field.fix_referral_recommission : 1) : field.referral_commission ) > 0 ) ">
28
28
  <div class="commission-badge">
29
29
  <div class="commission-label">rc: </div>
30
- <div class="commission-value">{{$_formatNumber((field.referral_commission), { decimal: 2})}} </div>
30
+ <div class="commission-value">{{$_formatNumber((is_rc_fixed == true ? (field.fix_referral_recommission ? field.fix_referral_recommission : 1) : field.referral_commission), { decimal: 2})}} </div>
31
31
  </div>
32
32
  </template>
33
33
  <template v-if="show_reseller_commission && field.referral_commission == 0">
@@ -150,6 +150,7 @@ export default {
150
150
  membership_list:'',
151
151
  stockist_list:'',
152
152
  show_reseller_commission:false,
153
+ is_rc_fixed:false
153
154
  }),
154
155
  async mounted()
155
156
  {
@@ -167,7 +168,14 @@ export default {
167
168
  if(this.public_settings.hasOwnProperty('referral_commission_earning') && this.reseller_commission)
168
169
  {
169
170
  if(this.public_settings.referral_commission_earning) this.show_reseller_commission = true;
171
+ if(this.public_settings.referral_commission_earning.hasOwnProperty("is_rc_fixed"))
172
+ {
173
+ if(this.public_settings.referral_commission_earning.is_rc_fixed == true) this.is_rc_fixed = true;
174
+ }
170
175
  }
176
+
177
+
178
+
171
179
  await this.newGetProduct(Number(this.prod_per_page));
172
180
  this.first_load_done=true;
173
181
  },
package/GSlotChange.vue CHANGED
@@ -51,6 +51,7 @@ export default
51
51
  is_accessible: true,
52
52
  page_config: {},
53
53
  _slot_list: [],
54
+ _slot_list_placement: [],
54
55
  main_currency: "",
55
56
  }),
56
57
  async mounted()
@@ -58,6 +59,7 @@ export default
58
59
  if(this.user_info)
59
60
  {
60
61
  this._slot_list = [];
62
+ this._slot_list_placement = [];
61
63
  this.main_currency = await new DB_SETTINGS().doc('public_settings').get();
62
64
  this.slot_display_counter = this.main_currency.data().value.hasOwnProperty("slot_display_counter") ? this.main_currency.data().value.slot_display_counter : false;
63
65
  this.loadSlotOwned();
@@ -100,13 +102,41 @@ export default
100
102
  if(this._slot_list)
101
103
  {
102
104
  await this.$bind('_slot_list', this.db_slot.collection().where('owner', '==', this.user_info.uid).orderBy('created_date', 'desc'));
105
+
106
+ this._slot_list.sort(function(a,b)
107
+ {
108
+
109
+ // Turn your strings into dates, and then subtract them
110
+ // to get a value that is either negative, positive, or zero.
111
+ if(a.placement_date && b.placement_date)
112
+ {
113
+ return new Date(a.placement_date.seconds * 1000) - new Date(b.placement_date.seconds * 1000);
114
+ }
115
+ else if(a.placement_date)
116
+ {
117
+ return new Date(a.placement_date.seconds * 1000) - new Date("2050");
118
+ }
119
+ else if(b.placement_date)
120
+ {
121
+ return new Date("2050-01-02") - new Date(b.placement_date.seconds * 1000);
122
+ }
123
+ else
124
+ {
125
+ return new Date("2050-01-02") - new Date("2050-01-01");
126
+ }
127
+ });
128
+
129
+
103
130
  if(this._slot_list.length >= 1)
104
131
  {
105
132
  let ctr = 1;
106
133
  this._slot_list.forEach((d, i) =>
107
134
  {
108
- this._slot_list[i].temp_ctr = ctr;
109
- ctr++;
135
+ if(d.placement_date)
136
+ {
137
+ this._slot_list[i].temp_ctr = ctr;
138
+ ctr++;
139
+ }
110
140
  });
111
141
  }
112
142
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.718",
3
+ "version": "1.2.720",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {