geer-builder 1.2.874 → 1.2.877
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/GSlotChange.vue +29 -20
- package/dialogs/ChooseSlotDialog.vue +5 -10
- package/package.json +1 -1
package/GSlotChange.vue
CHANGED
|
@@ -47,6 +47,7 @@ export default
|
|
|
47
47
|
link: 'admin_dashboard',
|
|
48
48
|
left: false,
|
|
49
49
|
slot_display_counter: false,
|
|
50
|
+
enable_sponsor_counter: false,
|
|
50
51
|
navigation_options: [],
|
|
51
52
|
is_accessible: true,
|
|
52
53
|
page_config: {},
|
|
@@ -62,6 +63,7 @@ export default
|
|
|
62
63
|
this._slot_list_placement = [];
|
|
63
64
|
this.main_currency = await new DB_SETTINGS().doc('public_settings').get();
|
|
64
65
|
this.slot_display_counter = this.main_currency.data().value.hasOwnProperty("slot_display_counter") ? this.main_currency.data().value.slot_display_counter : false;
|
|
66
|
+
this.enable_sponsor_counter = this.main_currency.data().value.hasOwnProperty("enable_slot_sponsor_counter") ? this.main_currency.data().value.enable_slot_sponsor_counter : false;
|
|
65
67
|
this.loadSlotOwned();
|
|
66
68
|
this.main_currency = this.main_currency.data().value.main_currency;
|
|
67
69
|
|
|
@@ -115,28 +117,35 @@ export default
|
|
|
115
117
|
{
|
|
116
118
|
await this.$bind('_slot_list', this.db_slot.collection().where('owner', '==', this.user_info.uid).orderBy('created_date', 'desc'));
|
|
117
119
|
|
|
118
|
-
this.
|
|
120
|
+
if(this.enable_sponsor_counter)
|
|
119
121
|
{
|
|
120
122
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return new Date(a.placement_date.seconds * 1000) - new Date(b.placement_date.seconds * 1000);
|
|
126
|
-
}
|
|
127
|
-
else if(a.placement_date)
|
|
128
|
-
{
|
|
129
|
-
return new Date(a.placement_date.seconds * 1000) - new Date("2050");
|
|
130
|
-
}
|
|
131
|
-
else if(b.placement_date)
|
|
132
|
-
{
|
|
133
|
-
return new Date("2050-01-02") - new Date(b.placement_date.seconds * 1000);
|
|
134
|
-
}
|
|
135
|
-
else
|
|
123
|
+
}
|
|
124
|
+
else
|
|
125
|
+
{
|
|
126
|
+
this._slot_list.sort(function(a,b)
|
|
136
127
|
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
128
|
+
|
|
129
|
+
// Turn your strings into dates, and then subtract them
|
|
130
|
+
// to get a value that is either negative, positive, or zero.
|
|
131
|
+
if(a.placement_date && b.placement_date)
|
|
132
|
+
{
|
|
133
|
+
return new Date(a.placement_date.seconds * 1000) - new Date(b.placement_date.seconds * 1000);
|
|
134
|
+
}
|
|
135
|
+
else if(a.placement_date)
|
|
136
|
+
{
|
|
137
|
+
return new Date(a.placement_date.seconds * 1000) - new Date("2050");
|
|
138
|
+
}
|
|
139
|
+
else if(b.placement_date)
|
|
140
|
+
{
|
|
141
|
+
return new Date("2050-01-02") - new Date(b.placement_date.seconds * 1000);
|
|
142
|
+
}
|
|
143
|
+
else
|
|
144
|
+
{
|
|
145
|
+
return new Date("2050-01-02") - new Date("2050-01-01");
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
140
149
|
|
|
141
150
|
|
|
142
151
|
if(this._slot_list.length >= 1)
|
|
@@ -144,7 +153,7 @@ export default
|
|
|
144
153
|
let ctr = 1;
|
|
145
154
|
this._slot_list.forEach((d, i) =>
|
|
146
155
|
{
|
|
147
|
-
if(d.placement_date)
|
|
156
|
+
if(d.placement_date || this.enable_sponsor_counter)
|
|
148
157
|
{
|
|
149
158
|
this._slot_list[i].temp_ctr = ctr;
|
|
150
159
|
ctr++;
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
<div v-if="!is_load">
|
|
13
13
|
<div class="flex-slot" v-if="user_data">
|
|
14
14
|
<div id="choose-slot" tabindex="0" v-for="(field, i) in user_data.slot_list" :key="i" class="slot-holder" @click="chooseSlot(i)">
|
|
15
|
-
<div class="flex-item">{{field.ctr}}</div>
|
|
16
15
|
<div class="flex-item">{{field.slot_code}}</div>
|
|
17
16
|
<div class="flex-item" v-if="field.membership">{{field.membership.membership_name}}</div>
|
|
18
17
|
<div class="flex-item" v-if="field.rank">{{field.rank.rank_name}}</div>
|
|
@@ -101,24 +100,20 @@ export default {
|
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
this.user_data = data[0];
|
|
104
|
-
let ctr = 1;
|
|
105
103
|
if(this.user_data)
|
|
106
104
|
{
|
|
107
105
|
if(this.user_data.hasOwnProperty('slot_owned') && this.user_data.slot_owned > 0)
|
|
108
106
|
{
|
|
109
|
-
let get_slot_lists = await new this.db_slot.collection().where('owner', '==', this.user_data.id).orderBy('created_date', 'desc')
|
|
110
107
|
let arr = []
|
|
111
|
-
for (let slot of
|
|
108
|
+
for (let slot of this.user_data.slot_list)
|
|
112
109
|
{
|
|
113
|
-
let data_get = slot.data();
|
|
114
110
|
let temp = {};
|
|
115
111
|
let qwe= {};
|
|
116
|
-
|
|
117
|
-
qwe.
|
|
118
|
-
qwe.
|
|
119
|
-
qwe.
|
|
112
|
+
temp = await this.db_slot.doc(slot).get();
|
|
113
|
+
qwe.slot_code = slot;
|
|
114
|
+
qwe.membership = temp.data().membership;
|
|
115
|
+
qwe.rank = temp.data().rank;
|
|
120
116
|
arr.push(qwe);
|
|
121
|
-
ctr++;
|
|
122
117
|
}
|
|
123
118
|
|
|
124
119
|
this.user_data.slot_list = arr;
|