geer-builder 1.2.721 → 1.2.722

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.
@@ -1,18 +1,18 @@
1
1
  <template>
2
2
  <div v-if="this.user_info">
3
3
  <q-tabs v-model="tab" dense class="text-grey" active-color="primary" no-caps indicator-color="primary" align="justify" >
4
- <q-tab name="to_pay" icon="fas fa-coins" label="To Pay" > <q-badge color="red" v-if="to_pay_count>0" floating>{{to_pay_count}}</q-badge> </q-tab>
5
- <q-tab name="approval" icon="fas fa-tasks" label="Approval"> <q-badge color="red" v-if="approval_count>0" floating>{{approval_count}}</q-badge> </q-tab>
4
+ <q-tab name="to_pay" icon="fas fa-coins" label="To Pay" > <q-badge color="red" v-if="to_pay_count>0" floating>{{to_pay_count}}{{last_to_pay_doc ? "+": "" }}</q-badge> </q-tab>
5
+ <q-tab name="approval" icon="fas fa-tasks" label="Approval"> <q-badge color="red" v-if="approval_count>0" floating>{{approval_count}}{{last_approval_doc ? "+": "" }}</q-badge> </q-tab>
6
6
  <q-tab v-if="payment_method_list.some( payment => payment.payment_method_id=='cod_manual')" name="cod_manual" icon="fas fa-truck-pickup" label="Cod Manual"> <q-badge color="red" v-if="cod_manual_count>0" floating>{{cod_manual_count}}</q-badge> </q-tab>
7
- <q-tab name="to_ship" icon="fas fa-box-open" label="To Ship" ><q-badge color="red" v-if="to_ship_count>0" floating>{{to_ship_count}}</q-badge></q-tab>
8
- <q-tab name="shipping" icon="fas fa-truck" label="Shipping" > <q-badge color="red" v-if="shipping_count>0" floating>{{shipping_count}}</q-badge> </q-tab>
9
- <q-tab name="to_picked" icon="fas fa-store" label="For Pickup" > <q-badge color="red" v-if="to_picked_count>0" floating>{{to_picked_count}}</q-badge> </q-tab>
10
- <q-tab name="completed" icon="fas fa-clipboard-check" label="Completed"> <q-badge color="red" v-if="completed_count>0" floating>{{completed_count}}</q-badge> </q-tab>
11
- <q-tab name="cancelled" icon="fas fa-times-circle" label="Cancelled"> <q-badge color="red" v-if="cancelled_count>0" floating>{{cancelled_count}}</q-badge> </q-tab>
7
+ <q-tab name="to_ship" icon="fas fa-box-open" label="To Ship" ><q-badge color="red" v-if="to_ship_count>0" floating>{{to_ship_count}}{{last_to_ship_doc ? "+": "" }}</q-badge></q-tab>
8
+ <q-tab name="shipping" icon="fas fa-truck" label="Shipping" > <q-badge color="red" v-if="shipping_count>0" floating>{{shipping_count}}{{last_shipping_doc ? "+": "" }}</q-badge> </q-tab>
9
+ <q-tab name="to_picked" icon="fas fa-store" label="For Pickup" > <q-badge color="red" v-if="to_picked_count>0" floating>{{to_picked_count}}{{last_for_pickup_doc ? "+": "" }}</q-badge> </q-tab>
10
+ <q-tab name="completed" icon="fas fa-clipboard-check" label="Completed"> <q-badge color="red" v-if="completed_count>0" floating>{{completed_count}}{{last_completed_doc ? "+": "" }}</q-badge> </q-tab>
11
+ <q-tab name="cancelled" icon="fas fa-times-circle" label="Cancelled"> <q-badge color="red" v-if="cancelled_count>0" floating>{{cancelled_count}}{{last_cancelled_doc ? "+": "" }}</q-badge> </q-tab>
12
12
  </q-tabs>
13
13
  <q-tab-panels v-model="tab">
14
14
  <q-tab-panel class="tab-panel bg-grey-2" name="approval">
15
- <approval-tab v-if="approval_count>0" :order_list="order_list"> </approval-tab>
15
+ <approval-tab v-if="approval_count>0" :order_list="approval_list" :load_more_data="load_more_data" :last_data="last_approval_doc" @reloadProductList="reloadProductList()" @loadMoreData="loadMoreData('approval')"> </approval-tab>
16
16
  <div v-else>
17
17
  <div class="purchase-title" style="font-size: 20px; margin-top:50px; height:200px; text-align:center">
18
18
  <div>There are no Transaction yet</div>
@@ -29,22 +29,22 @@
29
29
  </div>
30
30
  </q-tab-panel>
31
31
  <q-tab-panel class="tab-panel" name="to_pay">
32
- <to-pay-tab :order_list="order_list"></to-pay-tab>
32
+ <to-pay-tab :order_list="to_pay_list" :load_more_data="load_more_data" :last_data="last_to_pay_doc" @reloadProductList="reloadProductList()" @loadMoreData="loadMoreData('to_pay')"></to-pay-tab>
33
33
  </q-tab-panel>
34
34
  <q-tab-panel class="tab-panel bg-grey-2" name="to_ship" >
35
- <to-ship-tab :order_list="order_list"> </to-ship-tab>
35
+ <to-ship-tab :order_list="to_ship_list" :load_more_data="load_more_data" :last_data="last_to_ship_doc" @reloadProductList="reloadProductList()" @loadMoreData="loadMoreData('to_ship')"> </to-ship-tab>
36
36
  </q-tab-panel>
37
37
  <q-tab-panel class="tab-panel bg-grey-2" name="shipping">
38
- <shipping-tab :order_list="order_list"></shipping-tab>
38
+ <shipping-tab :order_list="shipping_list" :load_more_data="load_more_data" :last_data="last_shipping_doc" @reloadProductList="reloadProductList()" @loadMoreData="loadMoreData('shipping')"></shipping-tab>
39
39
  </q-tab-panel>
40
40
  <q-tab-panel class="tab-panel bg-grey-2" name="to_picked">
41
- <to-picked-tab :order_list="order_list" ></to-picked-tab>
41
+ <to-picked-tab :order_list="for_pickup_list" :load_more_data="load_more_data" :last_data="last_for_pickup_doc" @reloadProductList="reloadProductList()" @loadMoreData="loadMoreData('to_picked')"></to-picked-tab>
42
42
  </q-tab-panel>
43
43
  <q-tab-panel class="tab-panel bg-grey-2" name="completed">
44
- <completed-tab :order_list="order_list" ></completed-tab>
44
+ <completed-tab :order_list="completed_list" :load_more_data="load_more_data" :last_data="last_completed_doc" @reloadProductList="reloadProductList()" @loadMoreData="loadMoreData('completed')"></completed-tab>
45
45
  </q-tab-panel>
46
46
  <q-tab-panel class="tab-panel bg-grey-2" name="cancelled">
47
- <cancelled :order_list="order_list" ></cancelled>
47
+ <cancelled :order_list="cancelled_list" :load_more_data="load_more_data" :last_data="last_cancelled_doc" @reloadProductList="reloadProductList()" @loadMoreData="loadMoreData('cancelled')"></cancelled>
48
48
  </q-tab-panel>
49
49
  </q-tab-panels>
50
50
  </div>
@@ -71,6 +71,33 @@ export default {
71
71
  ({
72
72
  tab: "approval",
73
73
  order_list: [],
74
+ order_list2: [],
75
+ load_more_data: false,
76
+
77
+ to_pay_list: [],
78
+ approval_list: [],
79
+ to_ship_list: [],
80
+ shipping_list: [],
81
+ for_pickup_list: [],
82
+ completed_list: [],
83
+ cancelled_list: [],
84
+
85
+ to_pay_list_limit: 10,
86
+ approval_list_limit: 10,
87
+ to_ship_list_limit: 10,
88
+ shipping_list_limit: 10,
89
+ for_pickup_list_limit: 10,
90
+ completed_list_limit: 10,
91
+ cancelled_list_limit: 10,
92
+
93
+ last_to_pay_doc: null,
94
+ last_approval_doc: null,
95
+ last_to_ship_doc: null,
96
+ last_shipping_doc: null,
97
+ last_for_pickup_doc: null,
98
+ last_completed_doc: null,
99
+ last_cancelled_doc: null,
100
+
74
101
  approval_count: 0,
75
102
  to_pay_count: 0,
76
103
  to_ship_count: 0,
@@ -90,6 +117,7 @@ export default {
90
117
  },
91
118
  async mounted()
92
119
  {
120
+
93
121
  this.payment_method_list = await this.$_getData('payment_method_list');
94
122
  if(this.user_info)
95
123
  {
@@ -99,9 +127,562 @@ export default {
99
127
  },
100
128
  methods:
101
129
  {
130
+ async reloadProductList()
131
+ {
132
+
133
+ this.to_pay_list = [];
134
+ this.approval_list = [];
135
+ this.to_ship_list = [];
136
+ this.shipping_list = [];
137
+ this.for_pickup_list = [];
138
+ this.completed_list = [];
139
+ this.cancelled_list = [];
140
+
141
+ this.approval_count = 0;
142
+ this.to_pay_count = 0;
143
+ this.to_ship_count = 0;
144
+ this.shipping_count = 0;
145
+ this.completed_count = 0;
146
+ this.cancelled_count = 0;
147
+ this.to_picked_count = 0;
148
+ this.cod_manual_count = 0;
149
+
150
+ this.$q.loading.show();
151
+ await this.getProductList();
152
+ this.$q.loading.hide();
153
+ },
102
154
  async getProductList()
103
155
  {
104
- await this.$bind('order_list', new DB_MERCHANT_ORDERS().collection().where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"]));
156
+
157
+ // await this.$bind('order_list', new DB_MERCHANT_ORDERS().collection().where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"]).limit(10));
158
+
159
+ // APPROVAL
160
+ let approval_list = await new DB_MERCHANT_ORDERS().collection()
161
+ .orderBy("created_date","desc")
162
+ .where("status", "in", ["processing", "pending"])
163
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
164
+ .limit(this.approval_list_limit)
165
+ .get();
166
+ approval_list.docs.forEach(element =>
167
+ {
168
+ this.approval_list.push(element.data());
169
+ });
170
+
171
+ if(approval_list.docs.length != 0)
172
+ {
173
+ this.last_approval_doc = approval_list.docs[approval_list.docs.length-1];
174
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
175
+ .orderBy("created_date","desc")
176
+ .startAfter(this.last_approval_doc)
177
+ .where("status", "in", ["processing", "pending"])
178
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
179
+ .limit(1)
180
+ .get();
181
+
182
+ if(get_last.docs.length == 0)
183
+ {
184
+ this.last_approval_doc = null;
185
+ }
186
+ }
187
+ else
188
+ {
189
+ this.last_approval_doc = null;
190
+ }
191
+
192
+ //TO PAY
193
+ let to_pay_list = await new DB_MERCHANT_ORDERS().collection()
194
+ .orderBy("created_date","desc")
195
+ .where("status", "in", ["to_pay", "payment_to_be_checked", "pre_processing"])
196
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
197
+ .limit(this.to_pay_list_limit)
198
+ .get();
199
+
200
+ to_pay_list.docs.forEach(element =>
201
+ {
202
+ this.to_pay_list.push(element.data());
203
+ });
204
+
205
+ if(to_pay_list.docs.length != 0)
206
+ {
207
+ this.last_to_pay_doc = to_pay_list.docs[to_pay_list.docs.length-1];
208
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
209
+ .orderBy("created_date","desc")
210
+ .startAfter(this.last_to_pay_doc)
211
+ .where("status", "in", ["to_pay", "payment_to_be_checked", "pre_processing"])
212
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
213
+ .limit(1)
214
+ .get();
215
+
216
+ if(get_last.docs.length == 0)
217
+ {
218
+ this.last_to_pay_doc = null;
219
+ }
220
+ }
221
+ else
222
+ {
223
+ this.last_to_pay_doc = null;
224
+ }
225
+
226
+ //TO SHIP
227
+ let to_ship_list = await new DB_MERCHANT_ORDERS().collection()
228
+ .orderBy("created_date","desc")
229
+ .where("status", "in", ["to_ship"])
230
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
231
+ .limit(this.to_ship_list_limit)
232
+ .get();
233
+
234
+ to_ship_list.docs.forEach(element =>
235
+ {
236
+ this.to_ship_list.push(element.data());
237
+ });
238
+
239
+ if(to_ship_list.docs.length != 0)
240
+ {
241
+ this.last_to_ship_doc = to_ship_list.docs[to_ship_list.docs.length-1];
242
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
243
+ .orderBy("created_date","desc")
244
+ .startAfter(this.last_to_ship_doc)
245
+ .where("status", "in", ["to_ship"])
246
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
247
+ .limit(1)
248
+ .get();
249
+
250
+ if(get_last.docs.length == 0)
251
+ {
252
+ this.last_to_ship_doc = null;
253
+ }
254
+ }
255
+ else
256
+ {
257
+ this.last_to_ship_doc = null;
258
+ }
259
+
260
+ //SHIPPING
261
+ let shipping_list = await new DB_MERCHANT_ORDERS().collection()
262
+ .orderBy("created_date","desc")
263
+ .where("status", "in", ["shipping","delivered"])
264
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
265
+ .limit(this.shipping_list_limit)
266
+ .get();
267
+
268
+ shipping_list.docs.forEach(element =>
269
+ {
270
+ this.shipping_list.push(element.data());
271
+ });
272
+
273
+ if(shipping_list.docs.length != 0)
274
+ {
275
+ this.last_shipping_doc = shipping_list.docs[shipping_list.docs.length-1];
276
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
277
+ .orderBy("created_date","desc")
278
+ .startAfter(this.last_shipping_doc)
279
+ .where("status", "in", ["shipping","delivered"])
280
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
281
+ .limit(1)
282
+ .get();
283
+
284
+ if(get_last.docs.length == 0)
285
+ {
286
+ this.last_shipping_doc = null;
287
+ }
288
+ }
289
+ else
290
+ {
291
+ this.last_shipping_doc = null;
292
+ }
293
+
294
+ //FOR PICKED UP
295
+ let for_pickup_list = await new DB_MERCHANT_ORDERS().collection()
296
+ .orderBy("created_date","desc")
297
+ .where("status", "in", ["to_picked"])
298
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
299
+ .limit(this.for_pickup_list_limit)
300
+ .get();
301
+
302
+ for_pickup_list.docs.forEach(element =>
303
+ {
304
+ this.for_pickup_list.push(element.data());
305
+ });
306
+
307
+ if(for_pickup_list.docs.length != 0)
308
+ {
309
+ this.last_for_pickup_doc = for_pickup_list.docs[for_pickup_list.docs.length-1];
310
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
311
+ .orderBy("created_date","desc")
312
+ .startAfter(this.last_for_pickup_doc)
313
+ .where("status", "in", ["to_picked"])
314
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
315
+ .limit(1)
316
+ .get();
317
+
318
+ if(get_last.docs.length == 0)
319
+ {
320
+ this.last_for_pickup_doc = null;
321
+ }
322
+ }
323
+ else
324
+ {
325
+ this.last_for_pickup_doc = null;
326
+ }
327
+
328
+ //COMPLETED
329
+ let completed_list = await new DB_MERCHANT_ORDERS().collection()
330
+ .orderBy("created_date","desc")
331
+ .where("status", "in", ["completed"])
332
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
333
+ .limit(this.completed_list_limit)
334
+ .get();
335
+
336
+ completed_list.docs.forEach(element =>
337
+ {
338
+ this.completed_list.push(element.data());
339
+ });
340
+
341
+ if(completed_list.docs.length != 0)
342
+ {
343
+ this.last_completed_doc = completed_list.docs[completed_list.docs.length-1];
344
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
345
+ .orderBy("created_date","desc")
346
+ .startAfter(this.last_completed_doc)
347
+ .where("status", "in", ["completed"])
348
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
349
+ .limit(1)
350
+ .get();
351
+
352
+ if(get_last.docs.length == 0)
353
+ {
354
+ this.last_completed_doc = null;
355
+ }
356
+ }
357
+ else
358
+ {
359
+ this.last_completed_doc = null;
360
+ }
361
+
362
+ //CANCELLED
363
+ let cancelled_list = await new DB_MERCHANT_ORDERS().collection()
364
+ .orderBy("created_date","desc")
365
+ .where("status", "in", ["cancelled"])
366
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
367
+ .limit(this.cancelled_list_limit)
368
+ .get();
369
+
370
+ cancelled_list.docs.forEach(element =>
371
+ {
372
+ this.cancelled_list.push(element.data());
373
+ });
374
+
375
+ if(cancelled_list.docs.length != 0)
376
+ {
377
+ this.last_cancelled_doc = cancelled_list.docs[cancelled_list.docs.length-1];
378
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
379
+ .orderBy("created_date","desc")
380
+ .startAfter(this.last_cancelled_doc)
381
+ .where("status", "in", ["cancelled"])
382
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
383
+ .limit(1)
384
+ .get();
385
+
386
+ if(get_last.docs.length == 0)
387
+ {
388
+ this.last_cancelled_doc = null;
389
+ }
390
+ }
391
+ else
392
+ {
393
+ this.last_cancelled_doc = null;
394
+ }
395
+
396
+
397
+ this.badgesValues();
398
+ },
399
+ async loadMoreData(status)
400
+ {
401
+ if(status == "approval")
402
+ {
403
+ this.load_more_data = true;
404
+ let get_list = await new DB_MERCHANT_ORDERS().collection().orderBy("created_date","desc").startAfter(this.last_approval_doc).where("status", "in", ["processing", "pending"]).where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"]).limit(10).get();
405
+ get_list.docs.forEach(element =>
406
+ {
407
+ this.approval_list.push(element.data());
408
+ this.approval_count++;
409
+ });
410
+
411
+ if(get_list.docs.length != 0)
412
+ {
413
+ this.last_approval_doc = get_list.docs[get_list.docs.length-1];
414
+ let get_last = await new DB_MERCHANT_ORDERS().collection().orderBy("created_date","desc").startAfter(this.last_approval_doc).where("status", "in", ["processing", "pending"]).where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"]).limit(1).get();
415
+ if(get_last.docs.length == 0)
416
+ {
417
+ this.last_approval_doc = null;
418
+ }
419
+
420
+ this.approval_list_limit = this.approval_list_limit + get_list.docs.length;
421
+ }
422
+ else
423
+ {
424
+ this.last_approval_doc = null;
425
+ }
426
+ this.load_more_data = false;
427
+ }
428
+
429
+ if(status == "to_pay")
430
+ {
431
+ this.load_more_data = true;
432
+ let get_list = await new DB_MERCHANT_ORDERS().collection()
433
+ .orderBy("created_date","desc")
434
+ .startAfter(this.last_to_pay_doc)
435
+ .where("status", "in", ["to_pay", "payment_to_be_checked", "pre_processing"])
436
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
437
+ .limit(10)
438
+ .get();
439
+
440
+ get_list.docs.forEach(element =>
441
+ {
442
+ this.to_pay_list.push(element.data());
443
+ this.to_pay_count++;
444
+ });
445
+
446
+ if(get_list.docs.length != 0)
447
+ {
448
+ this.last_to_pay_doc = get_list.docs[get_list.docs.length-1];
449
+ let get_last = await new DB_MERCHANT_ORDERS()
450
+ .collection()
451
+ .orderBy("created_date","desc")
452
+ .startAfter(this.last_to_pay_doc)
453
+ .where("status", "in", ["to_pay", "payment_to_be_checked", "pre_processing"])
454
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
455
+ .limit(1)
456
+ .get();
457
+
458
+ if(get_last.docs.length == 0)
459
+ {
460
+ this.last_to_pay_doc = null;
461
+ }
462
+
463
+ this.to_pay_list_limit = this.to_pay_list_limit + get_list.docs.length;
464
+ }
465
+ else
466
+ {
467
+ this.last_to_pay_doc = null;
468
+ }
469
+ this.load_more_data = false;
470
+ }
471
+
472
+ if(status == "to_ship")
473
+ {
474
+ this.load_more_data = true;
475
+ let get_list = await new DB_MERCHANT_ORDERS().collection()
476
+ .orderBy("created_date","desc")
477
+ .startAfter(this.last_to_ship_doc)
478
+ .where("status", "in", ["to_ship"])
479
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
480
+ .limit(10)
481
+ .get();
482
+
483
+ get_list.docs.forEach(element =>
484
+ {
485
+ this.to_ship_list.push(element.data());
486
+ this.to_ship_count++;
487
+ });
488
+
489
+ if(get_list.docs.length != 0)
490
+ {
491
+ this.last_to_ship_doc = get_list.docs[get_list.docs.length-1];
492
+ let get_last = await new DB_MERCHANT_ORDERS()
493
+ .collection()
494
+ .orderBy("created_date","desc")
495
+ .startAfter(this.last_to_ship_doc)
496
+ .where("status", "in", ["to_ship"])
497
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
498
+ .limit(1)
499
+ .get();
500
+
501
+ if(get_last.docs.length == 0)
502
+ {
503
+ this.last_to_ship_doc = null;
504
+ }
505
+
506
+ this.to_ship_limit = this.to_ship_limit + get_list.docs.length;
507
+ }
508
+ else
509
+ {
510
+ this.last_to_ship_doc = null;
511
+ }
512
+ this.load_more_data = false;
513
+ }
514
+
515
+ if(status == "shipping")
516
+ {
517
+ this.load_more_data = true;
518
+ let get_list = await new DB_MERCHANT_ORDERS().collection()
519
+ .orderBy("created_date","desc")
520
+ .startAfter(this.last_shipping_doc)
521
+ .where("status", "in", ["shipping","delivered"])
522
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
523
+ .limit(10)
524
+ .get();
525
+
526
+ get_list.docs.forEach(element =>
527
+ {
528
+ this.shipping_list.push(element.data());
529
+ this.shipping_count++;
530
+ });
531
+
532
+ if(get_list.docs.length != 0)
533
+ {
534
+ this.last_shipping_doc = get_list.docs[get_list.docs.length-1];
535
+ let get_last = await new DB_MERCHANT_ORDERS()
536
+ .collection()
537
+ .orderBy("created_date","desc")
538
+ .startAfter(this.last_shipping_doc)
539
+ .where("status", "in", ["shipping","delivered"])
540
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
541
+ .limit(1)
542
+ .get();
543
+
544
+ if(get_last.docs.length == 0)
545
+ {
546
+ this.last_shipping_doc = null;
547
+ }
548
+
549
+ this.shipping_list_limit = this.shipping_list_limit + get_list.docs.length;
550
+ }
551
+ else
552
+ {
553
+ this.last_shipping_doc = null;
554
+ }
555
+ this.load_more_data = false;
556
+ }
557
+
558
+ if(status == "to_picked")
559
+ {
560
+ this.load_more_data = true;
561
+ let get_list = await new DB_MERCHANT_ORDERS().collection()
562
+ .orderBy("created_date","desc")
563
+ .startAfter(this.last_for_pickup_doc)
564
+ .where("status", "in", ["to_picked"])
565
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
566
+ .limit(10)
567
+ .get();
568
+
569
+ get_list.docs.forEach(element =>
570
+ {
571
+ this.for_pickup_list.push(element.data());
572
+ this.to_picked_count++;
573
+ });
574
+
575
+ if(get_list.docs.length != 0)
576
+ {
577
+ this.last_for_pickup_doc = get_list.docs[get_list.docs.length-1];
578
+ let get_last = await new DB_MERCHANT_ORDERS()
579
+ .collection()
580
+ .orderBy("created_date","desc")
581
+ .startAfter(this.last_for_pickup_doc)
582
+ .where("status", "in", ["to_picked"])
583
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
584
+ .limit(1)
585
+ .get();
586
+
587
+ if(get_last.docs.length == 0)
588
+ {
589
+ this.last_for_pickup_doc = null;
590
+ }
591
+
592
+ this.for_pickup_list_limit = this.for_pickup_list_limit + get_list.docs.length;
593
+ }
594
+ else
595
+ {
596
+ this.last_for_pickup_doc = null;
597
+ }
598
+ this.load_more_data = false;
599
+ }
600
+
601
+ if(status == "completed")
602
+ {
603
+ this.load_more_data = true;
604
+ let get_list = await new DB_MERCHANT_ORDERS().collection()
605
+ .orderBy("created_date","desc")
606
+ .startAfter(this.last_completed_doc)
607
+ .where("status", "in", ["completed"])
608
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
609
+ .limit(10)
610
+ .get();
611
+
612
+ get_list.docs.forEach(element =>
613
+ {
614
+ this.completed_list.push(element.data());
615
+ this.to_picked_count++;
616
+ });
617
+
618
+ if(get_list.docs.length != 0)
619
+ {
620
+ this.last_completed_doc = get_list.docs[get_list.docs.length-1];
621
+ let get_last = await new DB_MERCHANT_ORDERS()
622
+ .collection()
623
+ .orderBy("created_date","desc")
624
+ .startAfter(this.last_completed_doc)
625
+ .where("status", "in", ["completed"])
626
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
627
+ .limit(1)
628
+ .get();
629
+
630
+ if(get_last.docs.length == 0)
631
+ {
632
+ this.last_completed_doc = null;
633
+ }
634
+
635
+ this.completed_list_limit = this.completed_list_limit + get_list.docs.length;
636
+ }
637
+ else
638
+ {
639
+ this.last_completed_doc = null;
640
+ }
641
+ this.load_more_data = false;
642
+ }
643
+
644
+ if(status == "cancelled")
645
+ {
646
+ this.load_more_data = true;
647
+ let get_list = await new DB_MERCHANT_ORDERS().collection()
648
+ .orderBy("created_date","desc")
649
+ .startAfter(this.last_cancelled_doc)
650
+ .where("status", "in", ["cancelled"])
651
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
652
+ .limit(10)
653
+ .get();
654
+
655
+ get_list.docs.forEach(element =>
656
+ {
657
+ this.cancelled_list.push(element.data());
658
+ this.cancelled_count++;
659
+ });
660
+
661
+ if(get_list.docs.length != 0)
662
+ {
663
+ this.last_cancelled_doc = get_list.docs[get_list.docs.length-1];
664
+ let get_last = await new DB_MERCHANT_ORDERS()
665
+ .collection()
666
+ .orderBy("created_date","desc")
667
+ .startAfter(this.last_cancelled_doc)
668
+ .where("status", "in", ["cancelled"])
669
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
670
+ .limit(1)
671
+ .get();
672
+
673
+ if(get_last.docs.length == 0)
674
+ {
675
+ this.last_cancelled_doc = null;
676
+ }
677
+
678
+ this.cancelled_list_limit = this.cancelled_list_limit + get_list.docs.length;
679
+ }
680
+ else
681
+ {
682
+ this.last_cancelled_doc = null;
683
+ }
684
+ this.load_more_data = false;
685
+ }
105
686
  },
106
687
  async badgesValues()
107
688
  {
@@ -113,49 +694,120 @@ export default {
113
694
  this.cancelled_count= 0;
114
695
  this.to_picked_count= 0;
115
696
  this.cod_manual_count=0;
116
- this.order_list.forEach(async order_list => {
117
- // for(let order_list of this.order_list){
118
-
119
- if (order_list.status == "processing" || order_list.status == "pending")
120
- {
121
- this.approval_count++;
122
- }
123
- else if (order_list.status == "to_pay" || order_list.status == "payment_to_be_checked" || order_list.status == "pre_processing")
697
+
698
+
699
+ this.approval_list.forEach(async order_list =>
700
+ {
701
+ this.approval_count++;
702
+
703
+ if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
124
704
  {
125
- this.to_pay_count++;
126
- }
127
- else if (order_list.status == "cod_manual")
128
- {
129
- this.cod_manual_count++;
705
+ await this.$_fbCall('memberCheckOrderStatus', order_list);
130
706
  }
131
- else if (order_list.status == "to_ship")
132
- {
133
- this.to_ship_count++;
707
+ });
708
+
709
+ this.to_pay_list.forEach(async order_list =>
710
+ {
711
+ this.to_pay_count++;
712
+
713
+ if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
714
+ {
715
+ await this.$_fbCall('memberCheckOrderStatus', order_list);
134
716
  }
135
- else if (order_list.status == "shipping" || order_list.status == "delivered")
136
- {
137
- this.shipping_count++;
717
+ });
718
+
719
+ this.to_ship_list.forEach(async order_list =>
720
+ {
721
+ this.to_ship_count++;
722
+
723
+ if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
724
+ {
725
+ await this.$_fbCall('memberCheckOrderStatus', order_list);
138
726
  }
139
- else if (order_list.status == "to_picked" )
140
- {
141
- this.to_picked_count++;
727
+ });
728
+
729
+ this.shipping_list.forEach(async order_list =>
730
+ {
731
+ this.shipping_count++;
732
+
733
+ if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
734
+ {
735
+ await this.$_fbCall('memberCheckOrderStatus', order_list);
142
736
  }
143
- else if (order_list.status == "completed")
144
- {
145
- this.completed_count++;
737
+ });
738
+
739
+ this.for_pickup_list.forEach(async order_list =>
740
+ {
741
+ this.to_picked_count++;
742
+
743
+ if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
744
+ {
745
+ await this.$_fbCall('memberCheckOrderStatus', order_list);
146
746
  }
147
- else if (order_list.status == "cancelled")
148
- {
149
- this.cancelled_count++;
747
+ });
748
+
749
+ this.completed_list.forEach(async order_list =>
750
+ {
751
+ this.completed_count++;
752
+
753
+ if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
754
+ {
755
+ await this.$_fbCall('memberCheckOrderStatus', order_list);
150
756
  }
151
- // }
152
757
  });
153
- this.order_list.forEach(async order_list => {
758
+
759
+ this.cancelled_list.forEach(async order_list =>
760
+ {
761
+ this.cancelled_count++;
762
+
154
763
  if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
155
764
  {
156
765
  await this.$_fbCall('memberCheckOrderStatus', order_list);
157
766
  }
158
767
  });
768
+
769
+ // this.order_list.forEach(async order_list => {
770
+ // if (order_list.status == "processing" || order_list.status == "pending")
771
+ // {
772
+ // this.approval_count++;
773
+ // }
774
+ // else if (order_list.status == "to_pay" || order_list.status == "payment_to_be_checked" || order_list.status == "pre_processing")
775
+ // {
776
+ // this.to_pay_count++;
777
+ // }
778
+ // else if (order_list.status == "cod_manual")
779
+ // {
780
+ // this.cod_manual_count++;
781
+ // }
782
+ // else if (order_list.status == "to_ship")
783
+ // {
784
+ // this.to_ship_count++;
785
+ // }
786
+ // else if (order_list.status == "shipping" || order_list.status == "delivered")
787
+ // {
788
+ // this.shipping_count++;
789
+ // }
790
+ // else if (order_list.status == "to_picked" )
791
+ // {
792
+ // this.to_picked_count++;
793
+ // }
794
+ // else if (order_list.status == "completed")
795
+ // {
796
+ // this.completed_count++;
797
+ // }
798
+ // else if (order_list.status == "cancelled")
799
+ // {
800
+ // this.cancelled_count++;
801
+ // }
802
+ // });
803
+
804
+ // this.order_list.forEach(async order_list =>
805
+ // {
806
+ // if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
807
+ // {
808
+ // await this.$_fbCall('memberCheckOrderStatus', order_list);
809
+ // }
810
+ // });
159
811
  }
160
812
 
161
813
  }
package/GSlotWallet.vue CHANGED
@@ -386,14 +386,38 @@ export default
386
386
  {
387
387
  this.total_wallet_label = 'Millionaires Club Member'
388
388
  }
389
+ else if(this.current_slot_info.total_earned >= 900000)
390
+ {
391
+ this.total_wallet_label = '900k Club Member';
392
+ }
393
+ else if(this.current_slot_info.total_earned >= 800000)
394
+ {
395
+ this.total_wallet_label = '800k Club Member';
396
+ }
397
+ else if(this.current_slot_info.total_earned >= 700000)
398
+ {
399
+ this.total_wallet_label = '700k Club Member';
400
+ }
401
+ else if(this.current_slot_info.total_earned >= 600000)
402
+ {
403
+ this.total_wallet_label = '600k Club Member';
404
+ }
389
405
  else if(this.current_slot_info.total_earned >= 500000)
390
406
  {
391
407
  this.total_wallet_label = '500k Club Member';
392
408
  }
409
+ else if(this.current_slot_info.total_earned >= 400000)
410
+ {
411
+ this.total_wallet_label = '400k Club Member';
412
+ }
393
413
  else if(this.current_slot_info.total_earned >= 300000)
394
414
  {
395
415
  this.total_wallet_label = '300k Club Member';
396
416
  }
417
+ else if(this.current_slot_info.total_earned >= 200000)
418
+ {
419
+ this.total_wallet_label = '200k Club Member';
420
+ }
397
421
  else if(this.current_slot_info.total_earned >= 100000)
398
422
  {
399
423
  this.total_wallet_label = '100k Club Member';
@@ -95,6 +95,9 @@
95
95
  <q-dialog v-model="is_dialog_tracking_number_open">
96
96
  <enter-tracking-number-dialog :order_info="pass_data"></enter-tracking-number-dialog>
97
97
  </q-dialog>
98
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
99
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
100
+ </div>
98
101
  </div>
99
102
  <div class="mobile-onlyy" v-if="$q.platform.is.hasOwnProperty('mobile')">
100
103
  <div v-for="(list, i) in my_order_list" :key="i" style="background-color:whitesmoke;margin-bottom:20px;margin-bottom:20px;box-shadow: 0 0 5px #bbb;">
@@ -163,6 +166,9 @@
163
166
  <q-dialog v-model="is_dialog_tracking_number_open">
164
167
  <enter-tracking-number-dialog :order_info="pass_data"></enter-tracking-number-dialog>
165
168
  </q-dialog>
169
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
170
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
171
+ </div>
166
172
  </div>
167
173
 
168
174
 
@@ -178,6 +184,8 @@ export default {
178
184
  props:
179
185
  [
180
186
  'order_list',
187
+ 'last_data',
188
+ 'load_more_data'
181
189
  ],
182
190
  data: () =>
183
191
  ({
@@ -212,10 +220,15 @@ export default {
212
220
  message: error.message
213
221
  });
214
222
  }
223
+ this.$emit('reloadProductList');
215
224
  // this.getOrderList();
216
225
  this.$q.loading.hide();
217
226
 
218
227
  },
228
+ emitLoadMore()
229
+ {
230
+ this.$emit('loadMoreData');
231
+ },
219
232
  async getOrderList()
220
233
  {
221
234
  this.public_settings = await this.$_getData('public_settings');
@@ -87,6 +87,9 @@
87
87
  <!-- <div style="background:white;text-align:right;padding:0px 20px 10px 0px;"><q-btn dense color="primary" @click="shipNow(i)" label="Ship Now"></q-btn></div> -->
88
88
  </div>
89
89
  </div>
90
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
91
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
92
+ </div>
90
93
  </div>
91
94
  <div class="mobile-onlyy" v-if="$q.platform.is.hasOwnProperty('mobile')">
92
95
  <div v-for="(list, i) in my_order_list" :key="i" style="background-color:whitesmoke;margin-bottom:20px;margin-bottom:20px;box-shadow: 0 0 5px #bbb">
@@ -144,6 +147,9 @@
144
147
  <!-- <div style="background:white;text-align:right;padding:0px 20px 10px 0px;"><q-btn dense color="primary" @click="shipNow(i)" label="Ship Now"></q-btn></div> -->
145
148
  </div>
146
149
  </div>
150
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
151
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
152
+ </div>
147
153
  </div>
148
154
  </div>
149
155
  </template>
@@ -157,6 +163,8 @@ export default {
157
163
  props:
158
164
  [
159
165
  'order_list',
166
+ 'last_data',
167
+ 'load_more_data'
160
168
  ],
161
169
  data: () =>
162
170
  ({
@@ -178,7 +186,11 @@ export default {
178
186
  this.getProductList();
179
187
  },
180
188
  methods:
181
- {
189
+ {
190
+ emitLoadMore()
191
+ {
192
+ this.$emit('loadMoreData');
193
+ },
182
194
  async getProductList()
183
195
  {
184
196
  this.public_settings = await this.$_getData('public_settings');
@@ -87,7 +87,9 @@
87
87
  <!-- <div style="background:white;text-align:right;padding:0px 20px 10px 0px;"><q-btn dense color="primary" @click="shipNow(i)" label="Ship Now"></q-btn></div> -->
88
88
  </div>
89
89
  </div>
90
-
90
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
91
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
92
+ </div>
91
93
  </div>
92
94
  <div class="mobile-onlyy" v-if="$q.platform.is.hasOwnProperty('mobile')">
93
95
  <div v-for="(list, i) in my_order_list" :key="i" style="background-color:whitesmoke;margin-bottom:20px;margin-bottom:20px;box-shadow: 0 0 5px #bbb">
@@ -143,7 +145,9 @@
143
145
  <!-- <div style="background:white;text-align:right;padding:0px 20px 10px 0px;"><q-btn dense color="primary" @click="shipNow(i)" label="Ship Now"></q-btn></div> -->
144
146
  </div>
145
147
  </div>
146
-
148
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
149
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
150
+ </div>
147
151
  </div>
148
152
 
149
153
  </div>
@@ -158,6 +162,8 @@ export default {
158
162
  props:
159
163
  [
160
164
  'order_list',
165
+ 'last_data',
166
+ 'load_more_data'
161
167
  ],
162
168
  data: () =>
163
169
  ({
@@ -180,6 +186,10 @@ export default {
180
186
  },
181
187
  methods:
182
188
  {
189
+ emitLoadMore()
190
+ {
191
+ this.$emit('loadMoreData');
192
+ },
183
193
  async getProductList()
184
194
  {
185
195
  this.public_settings = await this.$_getData('public_settings');
@@ -99,6 +99,9 @@
99
99
  <q-dialog v-model="is_trace_dialog_open">
100
100
  <trace-product-dialog :order_info="pass_data" :update="true"></trace-product-dialog>
101
101
  </q-dialog>
102
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
103
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
104
+ </div>
102
105
  </div>
103
106
  <div class="mobile-onlyy" v-if="$q.platform.is.hasOwnProperty('mobile')">
104
107
  <div v-for="(list, i) in my_order_list" :key="i" style="background-color:whitesmoke;margin-bottom:20px;margin-bottom:20px;box-shadow: 0 0 5px #bbb;">
@@ -167,6 +170,9 @@
167
170
  <q-dialog v-model="is_trace_dialog_open">
168
171
  <trace-product-dialog :order_info="pass_data" :update="true"></trace-product-dialog>
169
172
  </q-dialog>
173
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
174
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
175
+ </div>
170
176
  </div>
171
177
 
172
178
  </div>
@@ -183,6 +189,8 @@ export default {
183
189
  props:
184
190
  [
185
191
  'order_list',
192
+ 'last_data',
193
+ 'load_more_data'
186
194
  ],
187
195
  data: () =>
188
196
  ({
@@ -206,6 +214,10 @@ export default {
206
214
  },
207
215
  methods:
208
216
  {
217
+ emitLoadMore()
218
+ {
219
+ this.$emit('loadMoreData');
220
+ },
209
221
  async getProductList()
210
222
  {
211
223
  this.public_settings = await this.$_getData('public_settings');
@@ -76,6 +76,9 @@
76
76
  </div>
77
77
  </div>
78
78
  </div>
79
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
80
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
81
+ </div>
79
82
  </div>
80
83
  <div class="mobile-onlyy" v-if="$q.platform.is.hasOwnProperty('mobile')">
81
84
  <div v-for="(list, i) in my_order_list" :key="i" style="background-color:whitesmoke;margin-bottom:20px;margin-bottom:20px;box-shadow: 0 0 5px #bbb;">
@@ -126,6 +129,9 @@
126
129
 
127
130
  </div>
128
131
  </div>
132
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
133
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
134
+ </div>
129
135
  </div>
130
136
  </div>
131
137
  </template>
@@ -138,6 +144,8 @@ export default {
138
144
  props:
139
145
  [
140
146
  'order_list',
147
+ 'last_data',
148
+ 'load_more_data'
141
149
  ],
142
150
  data: () =>
143
151
  ({
@@ -172,6 +180,10 @@ export default {
172
180
  }
173
181
  });
174
182
  this.my_order_list = myOrder;
183
+ },
184
+ emitLoadMore()
185
+ {
186
+ this.$emit('loadMoreData');
175
187
  },
176
188
  }
177
189
  }
@@ -96,6 +96,9 @@
96
96
  <q-dialog v-model="is_dialog_tracking_number_open">
97
97
  <enter-tracking-number-dialog :order_info="pass_data"></enter-tracking-number-dialog>
98
98
  </q-dialog>
99
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
100
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
101
+ </div>
99
102
  </div>
100
103
  <div class="mobile-onlyy" v-if="$q.platform.is.hasOwnProperty('mobile')">
101
104
  <div v-for="(list, i) in my_order_list" :key="i" style="background-color:whitesmoke;margin-bottom:20px;margin-bottom:20px;box-shadow: 0 0 5px #bbb;">
@@ -164,6 +167,9 @@
164
167
  <q-dialog v-model="is_dialog_tracking_number_open">
165
168
  <enter-tracking-number-dialog :order_info="pass_data"></enter-tracking-number-dialog>
166
169
  </q-dialog>
170
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
171
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
172
+ </div>
167
173
  </div>
168
174
 
169
175
 
@@ -179,6 +185,8 @@ export default {
179
185
  props:
180
186
  [
181
187
  'order_list',
188
+ 'last_data',
189
+ 'load_more_data'
182
190
  ],
183
191
  data: () =>
184
192
  ({
@@ -201,10 +209,15 @@ export default {
201
209
  },
202
210
  methods:
203
211
  {
212
+ emitLoadMore()
213
+ {
214
+ this.$emit('loadMoreData');
215
+ },
204
216
  async orderComplete(index)
205
217
  {
206
218
  this.$q.loading.show();
207
219
  await this.$_fbCall('memberBuyerOrderReceived', this.my_order_list[index]);
220
+ this.$emit('reloadProductList');
208
221
  this.$q.loading.hide();
209
222
  },
210
223
  async getOrderList()
@@ -87,7 +87,10 @@
87
87
  </div>
88
88
  <q-dialog v-model="is_dialog_tracking_number_open">
89
89
  <enter-tracking-number-dialog :order_info="pass_data" @save="doneShipping"></enter-tracking-number-dialog>
90
- </q-dialog>
90
+ </q-dialog>
91
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
92
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
93
+ </div>
91
94
  </div>
92
95
  <div class="mobile-onlyy" v-if="$q.platform.is.hasOwnProperty('mobile')">
93
96
  <div v-for="(list, i) in my_order_list" :key="i" style="background-color:whitesmoke;margin-bottom:20px;margin-bottom:20px;box-shadow: 0 0 5px #bbb;">
@@ -142,6 +145,9 @@
142
145
  <q-dialog v-model="is_dialog_tracking_number_open">
143
146
  <enter-tracking-number-dialog :order_info="pass_data" @save="doneShipping"></enter-tracking-number-dialog>
144
147
  </q-dialog>
148
+ <div v-if="last_data" style="background:white;text-align:center;padding:10px 20px 10px 0px;">
149
+ <q-btn dense :loading="load_more_data" color="primary" @click="emitLoadMore()" no-caps label="Load More"></q-btn>
150
+ </div>
145
151
  </div>
146
152
 
147
153
 
@@ -158,6 +164,8 @@ export default {
158
164
  props:
159
165
  [
160
166
  'order_list',
167
+ 'last_data',
168
+ 'load_more_data'
161
169
  ],
162
170
  data: () =>
163
171
  ({
@@ -180,6 +188,10 @@ export default {
180
188
  },
181
189
  methods:
182
190
  {
191
+ emitLoadMore()
192
+ {
193
+ this.$emit('loadMoreData');
194
+ },
183
195
  async getProductList()
184
196
  {
185
197
  this.public_settings = await this.$_getData('public_settings');
@@ -203,6 +215,7 @@ export default {
203
215
  {
204
216
  this.getProductList();
205
217
  this.is_dialog_tracking_number_open = false;
218
+ this.$emit('reloadProductList');
206
219
  }
207
220
  }
208
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.721",
3
+ "version": "1.2.722",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {