geer-builder 1.2.798 → 1.2.799

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.
@@ -3,7 +3,8 @@
3
3
  <q-tabs v-model="tab" dense class="text-grey" active-color="primary" no-caps indicator-color="primary" align="justify" >
4
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
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
- <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>
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="cod_manual" icon="fas fa-box-open" label="COD Manual" ><q-badge color="red" v-if="cod_manual_count>0" floating>{{cod_manual_count}}{{last_codm_doc ? "+": "" }}</q-badge></q-tab>
7
8
  <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
9
  <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
10
  <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>
@@ -21,7 +22,7 @@
21
22
  </div>
22
23
  </q-tab-panel>
23
24
  <q-tab-panel class="tab-panel" name="cod_manual">
24
- <cod-manual v-if="cod_manual_count>0" :order_list="order_list"></cod-manual>
25
+ <cod-manual v-if="cod_manual_count>0" :order_list="codm_list"></cod-manual>
25
26
  <div v-else>
26
27
  <div class="purchase-title" style="font-size: 20px; margin-top:50px; height:200px; text-align:center">
27
28
  <div>There are no Transaction</div>
@@ -81,6 +82,7 @@ export default {
81
82
  for_pickup_list: [],
82
83
  completed_list: [],
83
84
  cancelled_list: [],
85
+ codm_list: [],
84
86
 
85
87
  to_pay_list_limit: 10,
86
88
  approval_list_limit: 10,
@@ -89,6 +91,7 @@ export default {
89
91
  for_pickup_list_limit: 10,
90
92
  completed_list_limit: 10,
91
93
  cancelled_list_limit: 10,
94
+ codm_list_limit: 10,
92
95
 
93
96
  last_to_pay_doc: null,
94
97
  last_approval_doc: null,
@@ -97,6 +100,7 @@ export default {
97
100
  last_for_pickup_doc: null,
98
101
  last_completed_doc: null,
99
102
  last_cancelled_doc: null,
103
+ last_codm_doc: null,
100
104
 
101
105
  approval_count: 0,
102
106
  to_pay_count: 0,
@@ -137,6 +141,7 @@ export default {
137
141
  this.for_pickup_list = [];
138
142
  this.completed_list = [];
139
143
  this.cancelled_list = [];
144
+ this.codm_list = [];
140
145
 
141
146
  this.approval_count = 0;
142
147
  this.to_pay_count = 0;
@@ -394,6 +399,41 @@ export default {
394
399
  }
395
400
 
396
401
 
402
+ //CODM
403
+ let codm_list = await new DB_MERCHANT_ORDERS().collection()
404
+ .orderBy("created_date","desc")
405
+ .where("status", "in", ["cod_manual"])
406
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
407
+ .limit(this.codm_list_limit)
408
+ .get();
409
+
410
+ codm_list.docs.forEach(element =>
411
+ {
412
+ this.codm_list.push(element.data());
413
+ });
414
+
415
+ if(codm_list.docs.length != 0)
416
+ {
417
+ this.last_codm_doc = codm_list.docs[codm_list.docs.length-1];
418
+ let get_last = await new DB_MERCHANT_ORDERS().collection()
419
+ .orderBy("created_date","desc")
420
+ .startAfter(this.last_codm_doc)
421
+ .where("status", "in", ["cod_manual"])
422
+ .where("orders.merchant_slot_code", "==", this.user_info["active_slot"] ? this.user_info["active_slot"] :this.user_info["branch_slot"])
423
+ .limit(1)
424
+ .get();
425
+
426
+ if(get_last.docs.length == 0)
427
+ {
428
+ this.last_codm_doc = null;
429
+ }
430
+ }
431
+ else
432
+ {
433
+ this.last_codm_doc = null;
434
+ }
435
+
436
+
397
437
  this.badgesValues();
398
438
  },
399
439
  async loadMoreData(status)
@@ -766,6 +806,16 @@ export default {
766
806
  }
767
807
  });
768
808
 
809
+ this.codm_list.forEach(async order_list =>
810
+ {
811
+ this.cod_manual_count++;
812
+
813
+ if(order_list['invoice_number'] && order_list.status != 'completed' && order_list.status != 'delivered' && order_list.status != 'cancelled')
814
+ {
815
+ await this.$_fbCall('memberCheckOrderStatus', order_list);
816
+ }
817
+ });
818
+
769
819
  // this.order_list.forEach(async order_list => {
770
820
  // if (order_list.status == "processing" || order_list.status == "pending")
771
821
  // {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.798",
3
+ "version": "1.2.799",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {