geer-builder 1.2.719 → 1.2.721
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/GProductList.vue +10 -2
- package/GSlotChange.vue +32 -2
- package/package.json +1 -1
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
|
-
|
|
109
|
-
|
|
135
|
+
if(d.placement_date)
|
|
136
|
+
{
|
|
137
|
+
this._slot_list[i].temp_ctr = ctr;
|
|
138
|
+
ctr++;
|
|
139
|
+
}
|
|
110
140
|
});
|
|
111
141
|
}
|
|
112
142
|
}
|