geer-builder 1.2.583 → 1.2.586
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/GCompanyToken.vue
CHANGED
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
</q-btn>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
|
+
<div class="q-pt-sm grid-item" style="cursor:pointer;" @click="is_open_token_history=true" >
|
|
19
|
+
<div class="label">
|
|
20
|
+
<q-btn size="12px" class="full-width q-pa-sm text-primary" flat>
|
|
21
|
+
<q-icon class="q-mr-sm" name="fas fa-money-check" size="16px"></q-icon>
|
|
22
|
+
<div>View Token History</div>
|
|
23
|
+
</q-btn>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
18
26
|
</g-card>
|
|
19
27
|
</div>
|
|
20
28
|
<div class="q-mt-md">
|
|
@@ -53,6 +61,10 @@
|
|
|
53
61
|
<company-token-claim-slot :plan_id="plan_id" @closeDialog="is_open_token_claim_slot = false"></company-token-claim-slot>
|
|
54
62
|
</q-dialog>
|
|
55
63
|
|
|
64
|
+
<q-dialog full-width :maximized="$q.platform.is.mobile" transition-show="slide-up" transition-hide="slide-down" v-model="is_open_token_history">
|
|
65
|
+
<company-token-history :plan_id="plan_id" @closeDialog="is_open_token_history = false"></company-token-history>
|
|
66
|
+
</q-dialog>
|
|
67
|
+
|
|
56
68
|
</div>
|
|
57
69
|
<div v-else>
|
|
58
70
|
<span>You need to login to view this component.</span>
|
|
@@ -69,17 +81,19 @@ import DB_COMPANY_TOKEN_PLAN from './models/DB_COMPANY_TOKEN_PLAN';
|
|
|
69
81
|
import GlobalMixins from './mixins/global_mixins';
|
|
70
82
|
import CompanyTokenClaim from './dialogs/CompanyTokenClaim';
|
|
71
83
|
import CompanyTokenClaimSlot from './dialogs/CompanyTokenClaimSlot';
|
|
84
|
+
import CompanyTokenHistory from './dialogs/CompanyTokenHistory';
|
|
72
85
|
|
|
73
86
|
|
|
74
87
|
export default
|
|
75
88
|
{
|
|
76
|
-
components: { GHeader, GCard, CompanyTokenClaim, CompanyTokenClaimSlot },
|
|
89
|
+
components: { GHeader, GCard, CompanyTokenClaim, CompanyTokenClaimSlot, CompanyTokenHistory },
|
|
77
90
|
mixins: [GlobalMixins],
|
|
78
91
|
data: () =>
|
|
79
92
|
({
|
|
80
93
|
unused_token: 0,
|
|
81
94
|
is_open_token_claim: false,
|
|
82
95
|
is_open_token_claim_slot: false,
|
|
96
|
+
is_open_token_history: false,
|
|
83
97
|
db_user: new DB_USER(),
|
|
84
98
|
db_slot: new DB_SLOT(),
|
|
85
99
|
plan_list: [],
|
package/GProductList.vue
CHANGED
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
<template v-if="cashback">
|
|
16
16
|
<div class="cashback-badge" v-if="field.item_pv>0"><div class="cashback-label">Cashback: </div> <div class="cashback-value">{{$_formatNumber((field.item_pv/12), { decimal: 2})}} </div></div>
|
|
17
17
|
</template>
|
|
18
|
+
<div class="product-ratings"v-if="show_ratings" :style="field.ratings <=0 ? 'width:45%' : ''">
|
|
19
|
+
<div class="ratings-total" :style="field.ratings <=0 ? 'color: gray;' : ''"><div style="margin-right:3px;">{{field.ratings >0 ? field.ratings : 'No Ratings yet' }}</div><q-rating v-if="field.total_reviews" v-model="field.ratings" size="15px" color="primary" readonly/> </div>
|
|
20
|
+
<div class="ratings-count" v-if="field.total_reviews"><div style="margin-right:3px;color:black">{{field.total_reviews? nFormatter(Number(field.total_reviews), 1) : '' }}</div><div>{{field.total_reviews ? 'Ratings' : '' }}</div></div>
|
|
21
|
+
<div class="product-sold">
|
|
22
|
+
<div style="margin-right:3px;color:black">{{field.sold_count? nFormatter(Number(field.sold_count), 1) : 0 }}</div>
|
|
23
|
+
<div>{{'Sold'}}</div>
|
|
24
|
+
</div>
|
|
25
|
+
<!-- <div class="product-sold"></div> -->
|
|
26
|
+
</div>
|
|
18
27
|
<template v-if="show_reseller_commission && field.referral_commission > 0 ">
|
|
19
28
|
<div class="commission-badge">
|
|
20
29
|
<div class="commission-label">rc: </div>
|
|
@@ -34,7 +43,7 @@
|
|
|
34
43
|
<div v-if="field.gc_price>0" class="gc_price gc">GC {{$_formatNumber(field.gc_price, { decimal: 2})}}</div>
|
|
35
44
|
<div v-else class="gc_price gc">Not Purchasable by GC</div>
|
|
36
45
|
</template>
|
|
37
|
-
<div class="add-cart">View Product</div>
|
|
46
|
+
<div class="add-cart" v-if="show_button">View Product</div>
|
|
38
47
|
</div>
|
|
39
48
|
<div v-else class="prod_price price">GC {{$_formatNumber(field.gc_price, { decimal: 2})}}</div>
|
|
40
49
|
</div>
|
|
@@ -60,7 +69,6 @@ import DB_PRODUCTS from './models/DB_PRODUCT';
|
|
|
60
69
|
import GlobalMixins from './mixins/global_mixins';
|
|
61
70
|
import GLoader from './components/GlobalLoader';
|
|
62
71
|
import ProductClass from './classes/ProductClass';
|
|
63
|
-
import { log } from 'console';
|
|
64
72
|
|
|
65
73
|
|
|
66
74
|
export default {
|
|
@@ -87,6 +95,9 @@ export default {
|
|
|
87
95
|
show_discount_badge: Boolean,
|
|
88
96
|
show_original_price:Boolean,
|
|
89
97
|
show_merchant_discount:Boolean,
|
|
98
|
+
show_ratings:Boolean,
|
|
99
|
+
show_button:Boolean,
|
|
100
|
+
is_membership_only:Boolean
|
|
90
101
|
},
|
|
91
102
|
data: () =>
|
|
92
103
|
({
|
|
@@ -196,9 +207,32 @@ export default {
|
|
|
196
207
|
},
|
|
197
208
|
methods:{
|
|
198
209
|
|
|
210
|
+
nFormatter(num, digits) {
|
|
211
|
+
var si = [
|
|
212
|
+
{ value: 1, symbol: "" },
|
|
213
|
+
{ value: 1E3, symbol: "k" },
|
|
214
|
+
{ value: 1E6, symbol: "M" },
|
|
215
|
+
{ value: 1E9, symbol: "G" },
|
|
216
|
+
{ value: 1E12, symbol: "T" },
|
|
217
|
+
{ value: 1E15, symbol: "P" },
|
|
218
|
+
{ value: 1E18, symbol: "E" }
|
|
219
|
+
];
|
|
220
|
+
var rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
|
|
221
|
+
var i;
|
|
222
|
+
for (i = si.length - 1; i > 0; i--) {
|
|
223
|
+
if (num >= si[i].value) {
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return (num / si[i].value).toFixed(digits).replace(rx, "$1") + si[i].symbol;
|
|
228
|
+
},
|
|
199
229
|
async newGetProduct(limit,loadmore=false)
|
|
200
230
|
{
|
|
201
231
|
let querry = new DB_PRODUCTS().collection().where("type", "in", ["Product", "Membership Kit", "Exclusive"]).where("ecommerce", "==", true).where("country_code", "==", this.country_code ? this.country_code : 'PH');
|
|
232
|
+
if(this.is_membership_only)
|
|
233
|
+
{
|
|
234
|
+
querry = querry.where("type", "==", "Membership Kit")
|
|
235
|
+
}
|
|
202
236
|
if (this.category)
|
|
203
237
|
{
|
|
204
238
|
if(this.category != 'All')
|
|
@@ -326,6 +360,7 @@ export default {
|
|
|
326
360
|
let filtered = filt.filter(Boolean);
|
|
327
361
|
this.new_product_list = filtered;
|
|
328
362
|
this.first_load_done=true;
|
|
363
|
+
console.log(this.new_product_list);
|
|
329
364
|
}
|
|
330
365
|
},
|
|
331
366
|
openproduct(product){
|
|
@@ -133,7 +133,7 @@ import DB_SLOT from '../../models/DB_SLOT';
|
|
|
133
133
|
catch (error)
|
|
134
134
|
{
|
|
135
135
|
this.$q.loading.hide();
|
|
136
|
-
this.$q.dialog({ title: '
|
|
136
|
+
this.$q.dialog({ title: 'An Error Has Occured', message: error.message });
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
},
|
|
@@ -199,7 +199,8 @@ export default
|
|
|
199
199
|
methods:
|
|
200
200
|
{
|
|
201
201
|
useDefaultSponsor(){
|
|
202
|
-
if(this.public_settings.hasOwnProperty('no_sponsor'))
|
|
202
|
+
if(this.public_settings.hasOwnProperty('no_sponsor'))
|
|
203
|
+
{
|
|
203
204
|
if(this.public_settings.no_sponsor.active){
|
|
204
205
|
this.field.sponsor = this.public_settings.no_sponsor.default_sponsor_slot ? this.public_settings.no_sponsor.default_sponsor_slot: 'no set default' ;
|
|
205
206
|
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-card >
|
|
3
|
+
<q-bar class='bg-primary text-white q-pa-lg'>
|
|
4
|
+
<b>History</b>
|
|
5
|
+
<q-space />
|
|
6
|
+
<q-btn dense flat icon='close' v-close-popup><q-tooltip content-class='bg-white text-primary'>Close</q-tooltip></q-btn>
|
|
7
|
+
</q-bar>
|
|
8
|
+
<q-card-section class='content'>
|
|
9
|
+
<div class="row">
|
|
10
|
+
<!-- TABLE -->
|
|
11
|
+
<div class="col-12 text-right q-mb-md">
|
|
12
|
+
<div class="q-mt-sm text-left">
|
|
13
|
+
<q-table :pagination.sync="pagination" :loading="table_loading" separator="cell" bordered flat :data="!table_loading ? table_data : []" :columns="table_column" row-key="email">
|
|
14
|
+
<template v-slot:body-cell-message="cellProperties">
|
|
15
|
+
<q-td :props="cellProperties">
|
|
16
|
+
<span v-html="cellProperties.value"></span>
|
|
17
|
+
</q-td>
|
|
18
|
+
</template>
|
|
19
|
+
</q-table>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</q-card-section>
|
|
24
|
+
</q-card>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import DB_POINTS_LOG from '../models/DB_POINTS_LOG';
|
|
29
|
+
import GlobalMixins from '../mixins/global_mixins.js';
|
|
30
|
+
import moment from 'moment';
|
|
31
|
+
import {formatDate} from '../utilities/DateUtils';
|
|
32
|
+
import { formatNumber } from '../utilities/NumberUtils';
|
|
33
|
+
export default
|
|
34
|
+
{
|
|
35
|
+
mixins: [GlobalMixins],
|
|
36
|
+
components:{
|
|
37
|
+
},
|
|
38
|
+
data: () =>
|
|
39
|
+
({
|
|
40
|
+
pagination: { rowsPerPage: 8 },
|
|
41
|
+
table_loading: true,
|
|
42
|
+
table_data: [],
|
|
43
|
+
public_settings:[],
|
|
44
|
+
date_now:null,
|
|
45
|
+
table_column:
|
|
46
|
+
[
|
|
47
|
+
{
|
|
48
|
+
name : 'created_date',
|
|
49
|
+
label : 'Log Date',
|
|
50
|
+
field : row => formatDate(row.created_date, 'MM/DD/YY (hh:mm A)'),
|
|
51
|
+
align : 'left',
|
|
52
|
+
required: true,
|
|
53
|
+
format: val => `${val}`,
|
|
54
|
+
sortable: true,
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name : 'message',
|
|
59
|
+
label : 'Message',
|
|
60
|
+
field : row => row.message,
|
|
61
|
+
align : 'left',
|
|
62
|
+
required: true,
|
|
63
|
+
format: val => `${val}`,
|
|
64
|
+
sortable: true,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name : 'amount',
|
|
68
|
+
label : 'Amount',
|
|
69
|
+
field : row => row.amount,
|
|
70
|
+
align : 'left',
|
|
71
|
+
required: true,
|
|
72
|
+
format : val => formatNumber(val, { decimal: 2 }),
|
|
73
|
+
sortable: true,
|
|
74
|
+
align : "right",
|
|
75
|
+
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name : 'plan_taken',
|
|
79
|
+
label : 'Claimed Plan',
|
|
80
|
+
field : row => row.plan_token ? row.plan_token.name : "--",
|
|
81
|
+
align : 'left',
|
|
82
|
+
required: true,
|
|
83
|
+
format : val => val,
|
|
84
|
+
sortable: true,
|
|
85
|
+
align : "right",
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}),
|
|
90
|
+
props:
|
|
91
|
+
{
|
|
92
|
+
plan_id : String,
|
|
93
|
+
},
|
|
94
|
+
async mounted()
|
|
95
|
+
{
|
|
96
|
+
this.date_now = moment();
|
|
97
|
+
|
|
98
|
+
await this.$_getSlotInfo();
|
|
99
|
+
await this.getTableData();
|
|
100
|
+
},
|
|
101
|
+
methods:
|
|
102
|
+
{
|
|
103
|
+
async getTableData()
|
|
104
|
+
{
|
|
105
|
+
await this.$bind("table_data", new DB_POINTS_LOG().collection().where("recipient_id","==",this.current_slot_info.slot_code).where("type","==","company_token").orderBy('created_date', 'desc'));
|
|
106
|
+
console.log(this.table_data);
|
|
107
|
+
|
|
108
|
+
this.table_loading = false;
|
|
109
|
+
},
|
|
110
|
+
getHumanDate : function (date)
|
|
111
|
+
{
|
|
112
|
+
return moment(date);
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
created()
|
|
116
|
+
{
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</script>
|