geer-builder 1.2.918 → 1.2.920
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/GDirectDownlineWidget.vue +3 -2
- package/mixins/global_mixins.js +30 -15
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<g-card v-if="this.user_info">
|
|
3
3
|
<template v-if="current_slot_info">
|
|
4
4
|
<div class="label-holder">
|
|
5
|
-
<div class="q-pt-md">
|
|
5
|
+
<div class="q-pt-md" v-if="!hide_active_slot">
|
|
6
6
|
<div class="label">Your Active Slot Code</div>
|
|
7
7
|
<div class="value text-primary">{{ current_slot_info.slot_code }}</div>
|
|
8
8
|
</div>
|
|
@@ -229,7 +229,8 @@ export default
|
|
|
229
229
|
props:{
|
|
230
230
|
is_company_success: Boolean,
|
|
231
231
|
is_company_ultrapro: Boolean,
|
|
232
|
-
hide_unilevel: Boolean
|
|
232
|
+
hide_unilevel: Boolean,
|
|
233
|
+
hide_active_slot: Boolean
|
|
233
234
|
},
|
|
234
235
|
data: () =>
|
|
235
236
|
({
|
package/mixins/global_mixins.js
CHANGED
|
@@ -7,6 +7,9 @@ import DB_SETTINGS from '../models/DB_SETTINGS';
|
|
|
7
7
|
import { formatDate } from '../utilities/DateUtils';
|
|
8
8
|
import FAccountClass from '../classes/FAccountClass';
|
|
9
9
|
|
|
10
|
+
const _settings_store = {};
|
|
11
|
+
const _pending_requests = {};
|
|
12
|
+
|
|
10
13
|
export default
|
|
11
14
|
{
|
|
12
15
|
data: () =>
|
|
@@ -114,28 +117,40 @@ export default
|
|
|
114
117
|
}
|
|
115
118
|
});
|
|
116
119
|
},
|
|
117
|
-
async $_getData(key,country = null)
|
|
120
|
+
async $_getData(key, country = null)
|
|
118
121
|
{
|
|
119
|
-
let
|
|
120
|
-
|
|
122
|
+
let store_key = country ? `${key}_${country}` : key;
|
|
123
|
+
|
|
124
|
+
if (_settings_store.hasOwnProperty(store_key))
|
|
125
|
+
{
|
|
126
|
+
return _settings_store[store_key];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (_pending_requests[store_key])
|
|
121
130
|
{
|
|
122
|
-
|
|
131
|
+
return _pending_requests[store_key];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
_pending_requests[store_key] = (async () =>
|
|
135
|
+
{
|
|
136
|
+
let data;
|
|
137
|
+
if (key == "membership_list" && country != null)
|
|
123
138
|
{
|
|
124
|
-
|
|
139
|
+
let res = await new DB_SETTINGS().get(key);
|
|
140
|
+
data = await this.filterMembershipByCountry(res, country);
|
|
125
141
|
}
|
|
126
142
|
else
|
|
127
143
|
{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
data = await this.filterMembershipByCountry(res,country)
|
|
144
|
+
data = await new DB_SETTINGS().get(key);
|
|
131
145
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
146
|
+
|
|
147
|
+
let value = data.value;
|
|
148
|
+
_settings_store[store_key] = value;
|
|
149
|
+
delete _pending_requests[store_key];
|
|
150
|
+
return value;
|
|
151
|
+
})();
|
|
152
|
+
|
|
153
|
+
return _pending_requests[store_key];
|
|
139
154
|
},
|
|
140
155
|
$_formatNumber(number, options)
|
|
141
156
|
{
|