geer-builder 1.2.486 → 1.2.490
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/GApplyMerchantNew.vue +67 -0
- package/GRequestProduct.vue +63 -14
- package/components/ApplyMerchant/ApplyMerchantDialog.vue +10 -1
- package/components/UnplacedSlot/ManualPlaceDialog.vue +24 -0
- package/dialogs/AddSlotDialog.vue +15 -8
- package/dialogs/SlotPlaceDialog.vue +27 -3
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="g-apply-product" >
|
|
3
|
+
<div v-if="user_info.hasOwnProperty('merchant') && !user_info.merchant">
|
|
4
|
+
|
|
5
|
+
<h3 class="text-primary" style="margin-top:10px;">Thank you!</h3>
|
|
6
|
+
<div style="color:gray;font-size:17px;text-align:center">
|
|
7
|
+
<p>Thanks for taking the time to apply as one of our merchant and for submitting the required documents.</p>
|
|
8
|
+
|
|
9
|
+
<p>We're currently in the process of reviewing / approving documents for our Merchant Section.</p>
|
|
10
|
+
|
|
11
|
+
<p>For updates, please always check this area for the approval of your application!</p>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div v-if="user_info.hasOwnProperty('merchant') && user_info.merchant">
|
|
15
|
+
<h3 class="text-primary" style="margin-top:10px;">Thank you!</h3>
|
|
16
|
+
<div style="color:gray;font-size:17px;text-align:center">
|
|
17
|
+
<p>Congratulations! your merchant request has been accepted,</p>
|
|
18
|
+
<p>You are now a merchant!</p>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-if="!user_info.hasOwnProperty('merchant')">
|
|
22
|
+
<div class="q-mb-md message">We have detected that you are not a <b>Merchant</b> yet.</div>
|
|
23
|
+
<div class="q-mb-md message"><b>Apply</b> to be one now!</div>
|
|
24
|
+
<q-btn color="primary" @click="is_apply_product_dialog_open=true" label="Apply as a Merchant"/>
|
|
25
|
+
</div>
|
|
26
|
+
<q-dialog v-model="is_apply_product_dialog_open">
|
|
27
|
+
<apply-merchant-dialog :no_slot_merchant="true" @closeDialog="is_apply_product_dialog_open=false"></apply-merchant-dialog>
|
|
28
|
+
</q-dialog>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
<script>
|
|
32
|
+
import ApplyMerchantDialog from "./components/ApplyMerchant/ApplyMerchantDialog";
|
|
33
|
+
import GlobalMixins from './mixins/global_mixins.js';
|
|
34
|
+
export default
|
|
35
|
+
{
|
|
36
|
+
mixins: [GlobalMixins],
|
|
37
|
+
components:{ ApplyMerchantDialog },
|
|
38
|
+
data:() =>({
|
|
39
|
+
is_apply_product_dialog_open: false,
|
|
40
|
+
public_settings: [],
|
|
41
|
+
}),
|
|
42
|
+
async mounted()
|
|
43
|
+
{
|
|
44
|
+
await this.$_getSlotInfo();
|
|
45
|
+
},
|
|
46
|
+
methods: { },
|
|
47
|
+
computed:
|
|
48
|
+
{
|
|
49
|
+
user_slot_info()
|
|
50
|
+
{
|
|
51
|
+
if(this.current_slot_info)
|
|
52
|
+
{
|
|
53
|
+
return this.current_slot_info;
|
|
54
|
+
}
|
|
55
|
+
else
|
|
56
|
+
{
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
styl <style lang="scss">
|
|
64
|
+
.g-apply-product{
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
</style>
|
package/GRequestProduct.vue
CHANGED
|
@@ -90,7 +90,15 @@
|
|
|
90
90
|
</tr>
|
|
91
91
|
<tr>
|
|
92
92
|
<td>COMMISSION FEE</td>
|
|
93
|
-
<td>{{this.product_details.commission_margin ? this.product_details.commission_margin+"%" : "0%"}}</td>
|
|
93
|
+
<td>{{ main_currency }} {{sale_price ? $_formatNumber(computedCommision, { decimal: 2 }) : "0" }}({{this.product_details.commission_margin ? this.product_details.commission_margin+"%" : "0%"}})</td>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr v-if="product_deductions">
|
|
96
|
+
<td>VAT</td>
|
|
97
|
+
<td>{{ main_currency }} {{sale_price ? $_formatNumber(computedVat, { decimal: 2 }) : "0" }}</td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr v-if="product_deductions">
|
|
100
|
+
<td>TRANSACTION FEE</td>
|
|
101
|
+
<td>{{ main_currency }} {{sale_price ? $_formatNumber(computedTransaction, { decimal: 2 }) : "0" }}</td>
|
|
94
102
|
</tr>
|
|
95
103
|
<tr>
|
|
96
104
|
<td>MERCHANT GROSS</td>
|
|
@@ -235,13 +243,22 @@
|
|
|
235
243
|
<td>{{ main_currency }} {{this.product_details.selling_price ? $_formatNumber(this.product_details.selling_price, { decimal: 2 }) : "0" }}</td>
|
|
236
244
|
</tr>
|
|
237
245
|
<tr>
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
</
|
|
246
|
+
<tr>
|
|
247
|
+
<td>COMMISSION FEE</td>
|
|
248
|
+
<td>{{ main_currency }} {{sale_price ? $_formatNumber(computedCommision, { decimal: 2 }) : "0" }}({{this.product_details.commission_margin ? this.product_details.commission_margin+"%" : "0%"}})</td>
|
|
249
|
+
</tr>
|
|
250
|
+
<tr v-if="product_deductions">
|
|
251
|
+
<td>VAT</td>
|
|
252
|
+
<td>{{ main_currency }} {{sale_price ? $_formatNumber(computedVat, { decimal: 2 }) : "0" }}</td>
|
|
253
|
+
</tr>
|
|
254
|
+
<tr v-if="product_deductions">
|
|
255
|
+
<td>TRANSACTION FEE</td>
|
|
256
|
+
<td>{{ main_currency }} {{sale_price ? $_formatNumber(computedTransaction, { decimal: 2 }) : "0" }}</td>
|
|
257
|
+
</tr>
|
|
258
|
+
<tr>
|
|
259
|
+
<td>MERCHANT GROSS</td>
|
|
260
|
+
<td>{{ main_currency }} {{sale_price ? $_formatNumber(sale_price, { decimal: 2 }) : "0" }}</td>
|
|
261
|
+
</tr>
|
|
245
262
|
</tbody>
|
|
246
263
|
</table>
|
|
247
264
|
</div>
|
|
@@ -332,6 +349,8 @@
|
|
|
332
349
|
selling_price : 0,
|
|
333
350
|
original_price : 0,
|
|
334
351
|
commission_margin : 0,
|
|
352
|
+
vat : 0,
|
|
353
|
+
transaction_fee : 0,
|
|
335
354
|
category : "",
|
|
336
355
|
product_pictures : "",
|
|
337
356
|
description : "",
|
|
@@ -349,16 +368,34 @@
|
|
|
349
368
|
page : 1,
|
|
350
369
|
categories_list : [],
|
|
351
370
|
product_keywords: [],
|
|
352
|
-
|
|
371
|
+
computed_vat:0,
|
|
372
|
+
computed_transaction_fee:0,
|
|
373
|
+
computed_commission:0,
|
|
374
|
+
settings:{},
|
|
375
|
+
vat:0,
|
|
376
|
+
transaction_fee:0,
|
|
377
|
+
product_deductions:false,
|
|
353
378
|
}),
|
|
354
379
|
computed:
|
|
355
380
|
{
|
|
381
|
+
|
|
382
|
+
computedCommision()
|
|
383
|
+
{
|
|
384
|
+
return this.computed_commission = parseFloat((this.product_details.commission_margin / 100) * this.product_details.selling_price);
|
|
385
|
+
},
|
|
386
|
+
computedTransaction()
|
|
387
|
+
{
|
|
388
|
+
return this.computed_transaction_fee = parseFloat((this.transaction_fee / 100) * this.product_details.selling_price);
|
|
389
|
+
},
|
|
390
|
+
computedVat()
|
|
391
|
+
{
|
|
392
|
+
return this.computed_vat = parseFloat((this.vat / 100) * this.computed_commission);
|
|
393
|
+
},
|
|
356
394
|
sale_price()
|
|
357
395
|
{
|
|
358
|
-
|
|
359
|
-
return Number(this.product_details.selling_price) - Number(
|
|
360
|
-
|
|
361
|
-
}
|
|
396
|
+
let total_deduction = this.computed_commission + this.computed_transaction_fee + this.computed_vat;
|
|
397
|
+
return Number(this.product_details.selling_price) - Number(total_deduction);
|
|
398
|
+
},
|
|
362
399
|
},
|
|
363
400
|
|
|
364
401
|
async mounted()
|
|
@@ -367,9 +404,20 @@
|
|
|
367
404
|
await this.$_getSlotInfo();
|
|
368
405
|
this.getMainCurrency();
|
|
369
406
|
this.getCategoriesList();
|
|
407
|
+
this.getSettings();
|
|
370
408
|
},
|
|
371
409
|
|
|
372
410
|
methods:{
|
|
411
|
+
async getSettings()
|
|
412
|
+
{
|
|
413
|
+
this.settings = await this.$_getData('public_settings');
|
|
414
|
+
if(this.settings && this.settings.hasOwnProperty('product_deductions') && this.settings.product_deductions.active)
|
|
415
|
+
{
|
|
416
|
+
this.transaction_fee = this.settings.product_deductions.transaction_fee;
|
|
417
|
+
this.vat= this.settings.product_deductions.vat;
|
|
418
|
+
this.product_deductions = true;
|
|
419
|
+
}
|
|
420
|
+
},
|
|
373
421
|
async getCategoriesList()
|
|
374
422
|
{
|
|
375
423
|
let getCategories = await new DB_CATEGORIES().collection().get();
|
|
@@ -401,7 +449,8 @@
|
|
|
401
449
|
// console.log(this.product_details)
|
|
402
450
|
try
|
|
403
451
|
{
|
|
404
|
-
|
|
452
|
+
this.product_details.vat = this.vat;
|
|
453
|
+
this.product_details.transaction_fee = this.transaction_fee;
|
|
405
454
|
this.product_details.stockist = this.current_slot_info.slot_code;
|
|
406
455
|
this.product_details.user_info_uid = this.user_info.uid;
|
|
407
456
|
this.product_details.primary_picture=this.product_details.product_pictures[0];
|
|
@@ -75,6 +75,7 @@ import ApplyMerchantUploader from './ApplyMerchantUploader';
|
|
|
75
75
|
import phil from 'philippine-location-json-for-geer';
|
|
76
76
|
export default {
|
|
77
77
|
mixins: [GlobalMixins],
|
|
78
|
+
props:['no_slot_merchant'],
|
|
78
79
|
components:{ ApplyMerchantUploader },
|
|
79
80
|
data: () =>
|
|
80
81
|
({
|
|
@@ -183,7 +184,15 @@ export default {
|
|
|
183
184
|
delete this.merchant_details.additional_details;
|
|
184
185
|
}
|
|
185
186
|
this.merchant_details.uploaded_documents = this.uploaded_picture;
|
|
186
|
-
|
|
187
|
+
|
|
188
|
+
if(this.no_slot_merchant)
|
|
189
|
+
{
|
|
190
|
+
await this.$_fbCall('memberApplyMerchant', {merchant_details:this.merchant_details, user_info:this.user_info, no_slot_merchant:true});
|
|
191
|
+
}
|
|
192
|
+
else
|
|
193
|
+
{
|
|
194
|
+
await this.$_fbCall('memberApplyMerchant', {merchant_details:this.merchant_details, slot_code:this.user_info.active_slot, slot_info:this.current_slot_info});
|
|
195
|
+
}
|
|
187
196
|
this.$emit('closeDialog');
|
|
188
197
|
this.$q.loading.hide();
|
|
189
198
|
}
|
|
@@ -48,11 +48,16 @@ import DB_SLOT from '../../models/DB_SLOT';
|
|
|
48
48
|
unplaced_slots: [],
|
|
49
49
|
disable_submit: false,
|
|
50
50
|
merge_unplaced:[],
|
|
51
|
+
hide_slot:false,
|
|
52
|
+
hide_slot_list:[],
|
|
53
|
+
public_settings:{},
|
|
51
54
|
}),
|
|
52
55
|
async mounted()
|
|
53
56
|
{
|
|
54
57
|
await this.$_getSlotInfo()
|
|
55
58
|
this.loading = true;
|
|
59
|
+
this.public_settings = await this.$_getData('public_settings');
|
|
60
|
+
this.getDisableSlotList();
|
|
56
61
|
this.getListOfUnplacedSlots();
|
|
57
62
|
this.field.placement = this.placement;
|
|
58
63
|
this.field.position = this.position;
|
|
@@ -62,6 +67,17 @@ import DB_SLOT from '../../models/DB_SLOT';
|
|
|
62
67
|
unplaced_slots()
|
|
63
68
|
{
|
|
64
69
|
this.disable_submit = false;
|
|
70
|
+
|
|
71
|
+
if(this.hide_slot)
|
|
72
|
+
{
|
|
73
|
+
for( var i = 0; i < this.unplaced_slots.length; i++)
|
|
74
|
+
{
|
|
75
|
+
if ( this.hide_slot_list.includes(this.unplaced_slots[i].membership_id)) {
|
|
76
|
+
this.unplaced_slots.splice(i, 1);
|
|
77
|
+
i--;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
65
81
|
|
|
66
82
|
if(this.unplaced_slots.length > 0)
|
|
67
83
|
{
|
|
@@ -90,6 +106,14 @@ import DB_SLOT from '../../models/DB_SLOT';
|
|
|
90
106
|
},
|
|
91
107
|
methods:
|
|
92
108
|
{
|
|
109
|
+
async getDisableSlotList()
|
|
110
|
+
{
|
|
111
|
+
if(this.public_settings.hasOwnProperty('disable_slot_placement') && this.public_settings.disable_slot_placement.active)
|
|
112
|
+
{
|
|
113
|
+
this.hide_slot_list = this.public_settings.disable_slot_placement.membership_id ? this.public_settings.disable_slot_placement.membership_id : [];
|
|
114
|
+
this.hide_slot = true;
|
|
115
|
+
}
|
|
116
|
+
},
|
|
93
117
|
async getListOfUnplacedSlots()
|
|
94
118
|
{
|
|
95
119
|
await this.$bind('unplaced_slots', new DB_SLOT().collection().where('sponsor', "==", this.current_slot_info.slot_code).where('placed', "==", false));
|
|
@@ -164,17 +164,27 @@ export default
|
|
|
164
164
|
},
|
|
165
165
|
async mounted()
|
|
166
166
|
{
|
|
167
|
+
this.public_settings = await this.$_getData('public_settings');
|
|
168
|
+
|
|
169
|
+
if(this.user_info.hasOwnProperty('active_slot'))
|
|
170
|
+
{
|
|
171
|
+
this.field.sponsor = this.user_info.active_slot;
|
|
172
|
+
}
|
|
173
|
+
|
|
167
174
|
if(this.code)
|
|
168
175
|
{
|
|
169
176
|
this.field.code = this.code.code;
|
|
170
177
|
this.field.pin = this.code.pin;
|
|
178
|
+
if(this.code.hasOwnProperty('sale_id') && this.code.sale_id =="apply_merchant")
|
|
179
|
+
{
|
|
180
|
+
if(this.public_settings.hasOwnProperty('merchant_default_sponsor'))
|
|
181
|
+
{
|
|
182
|
+
this.field.sponsor = this.public_settings.merchant_default_sponsor;
|
|
183
|
+
this.fixed_sponsor = true;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
171
186
|
}
|
|
172
187
|
|
|
173
|
-
if(this.user_info.hasOwnProperty('active_slot'))
|
|
174
|
-
{
|
|
175
|
-
this.field.sponsor = this.user_info.active_slot;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
188
|
if(this.lead_info)
|
|
179
189
|
{
|
|
180
190
|
this.field.owner_email = this.lead_info.lead.email
|
|
@@ -184,7 +194,6 @@ export default
|
|
|
184
194
|
this.field.owner_email = this.user_info.email;
|
|
185
195
|
|
|
186
196
|
}
|
|
187
|
-
this.public_settings = await this.$_getData('public_settings');
|
|
188
197
|
this.checkFixSponsor();
|
|
189
198
|
},
|
|
190
199
|
methods:
|
|
@@ -219,7 +228,6 @@ export default
|
|
|
219
228
|
async verifyCode()
|
|
220
229
|
{
|
|
221
230
|
this.submit_loading = true;
|
|
222
|
-
|
|
223
231
|
try
|
|
224
232
|
{
|
|
225
233
|
this.code_info = await this.$_fbCall('memberVerifyCode', this.field);
|
|
@@ -256,7 +264,6 @@ export default
|
|
|
256
264
|
async confirmDetails()
|
|
257
265
|
{
|
|
258
266
|
this.submit_loading = true;
|
|
259
|
-
|
|
260
267
|
try
|
|
261
268
|
{
|
|
262
269
|
await this.$_fbCall('memberCreateSlot', this.field);
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
|
-
|
|
32
|
+
import SlotTypeOptions from '../references/refs_slot_type';
|
|
33
33
|
import GlobalMixins from '../mixins/global_mixins.js';
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
import DB_SLOT from '../models/DB_SLOT';
|
|
35
|
+
import { log } from 'console';
|
|
36
36
|
export default
|
|
37
37
|
{
|
|
38
38
|
mixins: [GlobalMixins],
|
|
@@ -48,11 +48,16 @@ import GlobalMixins from '../mixins/global_mixins.js';
|
|
|
48
48
|
},
|
|
49
49
|
unplaced_slots: [],
|
|
50
50
|
disable_submit: false,
|
|
51
|
+
hide_slot:false,
|
|
52
|
+
hide_slot_list:[],
|
|
53
|
+
public_settings:{},
|
|
51
54
|
}),
|
|
52
55
|
async mounted()
|
|
53
56
|
{
|
|
54
57
|
await this.$_getSlotInfo()
|
|
58
|
+
this.public_settings = await this.$_getData('public_settings');
|
|
55
59
|
this.loading = true;
|
|
60
|
+
this.getDisableSlotList();
|
|
56
61
|
this.getListOfUnplacedSlots();
|
|
57
62
|
this.field.placement = this.placement;
|
|
58
63
|
this.field.position = this.position;
|
|
@@ -61,6 +66,17 @@ import GlobalMixins from '../mixins/global_mixins.js';
|
|
|
61
66
|
{
|
|
62
67
|
unplaced_slots()
|
|
63
68
|
{
|
|
69
|
+
if(this.hide_slot)
|
|
70
|
+
{
|
|
71
|
+
for( var i = 0; i < this.unplaced_slots.length; i++)
|
|
72
|
+
{
|
|
73
|
+
if ( this.hide_slot_list.includes(this.unplaced_slots[i].membership_id)) {
|
|
74
|
+
this.unplaced_slots.splice(i, 1);
|
|
75
|
+
i--;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
64
80
|
this.disable_submit = false;
|
|
65
81
|
|
|
66
82
|
if(this.unplaced_slots.length > 0)
|
|
@@ -84,6 +100,14 @@ import GlobalMixins from '../mixins/global_mixins.js';
|
|
|
84
100
|
},
|
|
85
101
|
methods:
|
|
86
102
|
{
|
|
103
|
+
async getDisableSlotList()
|
|
104
|
+
{
|
|
105
|
+
if(this.public_settings.hasOwnProperty('disable_slot_placement') && this.public_settings.disable_slot_placement.active)
|
|
106
|
+
{
|
|
107
|
+
this.hide_slot_list = this.public_settings.disable_slot_placement.membership_id ? this.public_settings.disable_slot_placement.membership_id : [];
|
|
108
|
+
this.hide_slot = true;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
87
111
|
async getListOfUnplacedSlots()
|
|
88
112
|
{
|
|
89
113
|
this.$bind('unplaced_slots', new DB_SLOT().collection().where('sponsor', "==", this.current_slot_info.slot_code).where('placed', "==", false));
|