geer-builder 1.2.708 → 1.2.709
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/GSideNav.vue +37 -2
- package/GSlotChange.vue +18 -2
- package/package.json +1 -1
package/GSideNav.vue
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
<div class="detail">
|
|
11
11
|
<div @dblclick="promoteToAdmin()" class="detail-name text-primary promote-to-something">{{ user_info.full_name }}</div>
|
|
12
|
-
<div v-if="user_info.active_slot" class="detail-membership text-bold">({{ user_info.active_slot }})</div>
|
|
12
|
+
<div v-if="user_info.active_slot" class="detail-membership text-bold">{{this.slot_current_ctr != 0 ? this.slot_current_ctr+". " : ''}}({{ user_info.active_slot }})</div>
|
|
13
13
|
<div class="detail-membership">{{ user_info.email }}</div>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<script>
|
|
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
|
|
|
53
53
|
export default
|
|
54
54
|
{
|
|
@@ -56,11 +56,14 @@ export default
|
|
|
56
56
|
filters: { },
|
|
57
57
|
data:() =>(
|
|
58
58
|
{
|
|
59
|
+
slot_checker_list:null,
|
|
60
|
+
slot_current_ctr:null,
|
|
59
61
|
cart:"",
|
|
60
62
|
cartCount:0,
|
|
61
63
|
show_chat: true,
|
|
62
64
|
link: '',
|
|
63
65
|
leftDrawerOpen: true,
|
|
66
|
+
slot_display_counter: false,
|
|
64
67
|
is_accessible: true,
|
|
65
68
|
left: true,
|
|
66
69
|
is_profile_dialog_open: false,
|
|
@@ -83,9 +86,41 @@ export default
|
|
|
83
86
|
this.link = this.$route.name;
|
|
84
87
|
this.checkLoggedIn();
|
|
85
88
|
let profile = await this.$_getData('public_settings');
|
|
89
|
+
this.slot_display_counter = profile.hasOwnProperty("slot_display_counter") ? profile.slot_display_counter : false;
|
|
86
90
|
this.default_profile_picture = profile.default_profile_picture;
|
|
91
|
+
this.loadSlotOwned();
|
|
87
92
|
},
|
|
88
93
|
methods: {
|
|
94
|
+
async loadSlotOwned()
|
|
95
|
+
{
|
|
96
|
+
if(this.slot_display_counter)
|
|
97
|
+
{
|
|
98
|
+
if(this.user_info)
|
|
99
|
+
{
|
|
100
|
+
let get_local_slot = localStorage.getItem('current_slot_no');
|
|
101
|
+
let get_local_slot_ctr = localStorage.getItem('current_slot_no_ctr');
|
|
102
|
+
|
|
103
|
+
if(get_local_slot != this.user_info.active_slot)
|
|
104
|
+
{
|
|
105
|
+
await this.$bind('slot_checker_list', new DB_SLOT_CHECKER().collection().where('owner', '==', this.user_info.uid).orderBy('created_date', 'desc'));
|
|
106
|
+
let ctr = 1;
|
|
107
|
+
this.slot_checker_list.forEach((d, i) =>
|
|
108
|
+
{
|
|
109
|
+
if(d.slot_code === this.user_info.active_slot)
|
|
110
|
+
{
|
|
111
|
+
localStorage.setItem('current_slot_no',this.user_info.active_slot);
|
|
112
|
+
localStorage.setItem('current_slot_no_ctr',ctr);
|
|
113
|
+
get_local_slot_ctr = ctr;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
ctr++;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
this.slot_current_ctr = get_local_slot_ctr;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
89
124
|
checkLoggedIn()
|
|
90
125
|
{
|
|
91
126
|
if(!this.user_info)
|
package/GSlotChange.vue
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<div class="slot-list" v-if="!loading_slot">
|
|
5
5
|
<div class="slot-list__card" v-for="slot in _slot_list" @click="chooseSlot(slot)" :key="slot.code">
|
|
6
6
|
<g-card class="card">
|
|
7
|
+
<div class="code" v-if="slot.hasOwnProperty('temp_ctr')">{{ slot.temp_ctr }}</div>
|
|
7
8
|
<div class="code">{{ slot.slot_code }}</div>
|
|
8
9
|
<div class="membership">{{ slot.membership.membership_name }}</div>
|
|
9
10
|
<div class="rank">{{ slot.rank.rank_name }}</div>
|
|
@@ -45,6 +46,7 @@ export default
|
|
|
45
46
|
loading_slot: true,
|
|
46
47
|
link: 'admin_dashboard',
|
|
47
48
|
left: false,
|
|
49
|
+
slot_display_counter: false,
|
|
48
50
|
navigation_options: [],
|
|
49
51
|
is_accessible: true,
|
|
50
52
|
page_config: {},
|
|
@@ -55,8 +57,9 @@ export default
|
|
|
55
57
|
{
|
|
56
58
|
if(this.user_info)
|
|
57
59
|
{
|
|
58
|
-
this.loadSlotOwned();
|
|
59
60
|
this.main_currency = await new DB_SETTINGS().doc('public_settings').get();
|
|
61
|
+
this.slot_display_counter = this.main_currency.data().value.hasOwnProperty("slot_display_counter") ? this.main_currency.data().value.slot_display_counter : false;
|
|
62
|
+
this.loadSlotOwned();
|
|
60
63
|
this.main_currency = this.main_currency.data().value.main_currency;
|
|
61
64
|
}
|
|
62
65
|
},
|
|
@@ -91,7 +94,20 @@ export default
|
|
|
91
94
|
{
|
|
92
95
|
if(this.user_info)
|
|
93
96
|
{
|
|
94
|
-
|
|
97
|
+
if(this.slot_display_counter)
|
|
98
|
+
{
|
|
99
|
+
await this.$bind('_slot_list', this.db_slot.collection().where('owner', '==', this.user_info.uid).orderBy('created_date', 'desc'));
|
|
100
|
+
let ctr = 1;
|
|
101
|
+
this._slot_list.forEach((d, i) =>
|
|
102
|
+
{
|
|
103
|
+
this._slot_list[i].temp_ctr = ctr;
|
|
104
|
+
ctr++;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else
|
|
108
|
+
{
|
|
109
|
+
await this.$bind('_slot_list', this.db_slot.collection().where('owner', '==', this.user_info.uid).orderBy('wallet', 'desc'));
|
|
110
|
+
}
|
|
95
111
|
}
|
|
96
112
|
if(this._slot_list.length == 1 && !this.user_info.active_slot)
|
|
97
113
|
{
|