geer-builder 1.2.643 → 1.2.645
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/GGcashCollectorPage.vue +66 -0
- package/GGcashRequest.vue +551 -0
- package/GHubPage.vue +54 -0
- package/GPayBills.vue +756 -0
- package/GRegistration.vue +1 -1
- package/GSlotWallet.vue +25 -4
- package/GTransaction.vue +10 -0
- package/GUserVerification.vue +27 -11
- package/components/CollectorPages/BillsPaymentRequest.vue +281 -0
- package/components/CollectorPages/GcashWalletRequest.vue +289 -0
- package/components/HubPage/AddCollectorForm.vue +282 -0
- package/components/HubPage/BillsPayment.vue +345 -0
- package/components/HubPage/GcashAndWallet.vue +357 -0
- package/components/HubPage/ManageCollectors.vue +131 -0
- package/components/HubPage/ManageWallet.vue +266 -0
- package/components/HubPage/MemberRequest.vue +64 -0
- package/components/Points/RCLogs.vue +1 -1
- package/components/SaleInvoice.vue +2 -1
- package/components/SalesInvoicePrintable.vue +3 -1
- package/dialogs/BillDetailsDialog.vue +62 -0
- package/models/DB_BILLS_PAYMENT.js +9 -0
- package/models/DB_GCASH_REQUEST.js +9 -0
- package/models/DB_HUB_REQUEST.js +9 -0
- package/models/DB_RESELLER_LOGS.js +2 -1
- package/models/DB_USER.js +1 -0
- package/models/DB_USER_SHIPPING_ADDRESS.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="gcash-and-wallet-page">
|
|
3
|
+
<div align="right" class="q-mb-md filters">
|
|
4
|
+
<q-input style="width: 300px;" label="Search Here" outlined="" v-model="filterr"></q-input>
|
|
5
|
+
<q-select outlined style="min-width: 200px; width: fit-content" v-model="filter_request" :options="['All', 'Wallet Request', 'Gcash Request']" label="Request" />
|
|
6
|
+
<q-select outlined style="min-width: 200px; width: fit-content" v-model="filter" :options="['All', 'Pending', 'Rejected', 'For Collection', 'Collected', 'For Processing', 'Processed']" label="Filter" />
|
|
7
|
+
</div>
|
|
8
|
+
<q-table
|
|
9
|
+
:title="table_title"
|
|
10
|
+
:loading="table_loading"
|
|
11
|
+
@row-click= "viewRequest"
|
|
12
|
+
separator="cell"
|
|
13
|
+
bordered
|
|
14
|
+
flat
|
|
15
|
+
:data="!table_loading ? gcash_data : []"
|
|
16
|
+
:columns="table_column"
|
|
17
|
+
:pagination.sync="pagination"
|
|
18
|
+
:filter="filterr" >
|
|
19
|
+
</q-table>
|
|
20
|
+
<q-dialog v-model="dialog_gcash_request_data">
|
|
21
|
+
<q-card style="max-width: 350px: width: 100%;">
|
|
22
|
+
<q-card-section>
|
|
23
|
+
<q-card-section>
|
|
24
|
+
<div class="text-h6 text-bold text-primary">Request Information</div>
|
|
25
|
+
</q-card-section>
|
|
26
|
+
<q-card-section class="row-details">
|
|
27
|
+
<table>
|
|
28
|
+
<tbody>
|
|
29
|
+
<tr>
|
|
30
|
+
<td class="label text-bold">Load Amount</td>
|
|
31
|
+
<td> : </td>
|
|
32
|
+
<td>{{gcash_request_data.requested_amount}}</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr>
|
|
35
|
+
<td class="label text-bold">Full Name</td>
|
|
36
|
+
<td> : </td>
|
|
37
|
+
<td>{{gcash_request_data.full_name}}</td>
|
|
38
|
+
</tr>
|
|
39
|
+
<tr>
|
|
40
|
+
<td class="label text-bold">Address</td>
|
|
41
|
+
<td> : </td>
|
|
42
|
+
<td>{{gcash_request_data._address_combined}}</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td class="label text-bold">Contact Number</td>
|
|
46
|
+
<td> : </td>
|
|
47
|
+
<td>{{gcash_request_data.contact_number}}</td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr>
|
|
50
|
+
<td class="label text-bold">Status</td>
|
|
51
|
+
<td> : </td>
|
|
52
|
+
<td>{{gcash_request_data.status}}</td>
|
|
53
|
+
</tr>
|
|
54
|
+
</tbody>
|
|
55
|
+
</table>
|
|
56
|
+
</q-card-section>
|
|
57
|
+
<q-card-actions align="right" class="bg-white" v-if="!(gcash_request_data && gcash_request_data.hasOwnProperty('status') && (gcash_request_data.status === 'rejected' || gcash_request_data.status === 'for_collection' || gcash_request_data.status === 'for_processing' || gcash_request_data.status === 'collected' || gcash_request_data.status === 'processed'))">
|
|
58
|
+
<q-btn flat class="text-grey" label="Decline" @click="declineREquest(gcash_request_data)" />
|
|
59
|
+
<q-btn color="primary" label="Accept" @click="acceptREquest(gcash_request_data)" v-close-popup />
|
|
60
|
+
</q-card-actions>
|
|
61
|
+
</q-card-section>
|
|
62
|
+
</q-card>
|
|
63
|
+
</q-dialog>
|
|
64
|
+
<q-dialog v-model="decline_message_dialog">
|
|
65
|
+
<q-card class="reject-message-dialog">
|
|
66
|
+
<q-card-section>
|
|
67
|
+
<div class="text-bold text-h6">Reason for Rejection</div>
|
|
68
|
+
</q-card-section>
|
|
69
|
+
<q-card-section>
|
|
70
|
+
<q-input type="textarea" outline v-model="reject_message" placeholder="Input your reason here" />
|
|
71
|
+
</q-card-section>
|
|
72
|
+
<q-card-section>
|
|
73
|
+
<div align="right">
|
|
74
|
+
<q-btn flat label="close" color="primary" v-close-popup />
|
|
75
|
+
<q-btn label="submit" color="primary" @click="declineREquest(to_be_reject)" />
|
|
76
|
+
</div>
|
|
77
|
+
</q-card-section>
|
|
78
|
+
</q-card>
|
|
79
|
+
</q-dialog>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
<script>
|
|
83
|
+
import GlobalMixins from '../../mixins/global_mixins.js';
|
|
84
|
+
import DB_GCASH_REQUEST from '../../models/DB_GCASH_REQUEST';
|
|
85
|
+
import DB_USER from '../../models/DB_USER';
|
|
86
|
+
import {formatDate} from '../../utilities/DateUtils';
|
|
87
|
+
import {formatNumber} from '../../utilities/NumberUtils';
|
|
88
|
+
|
|
89
|
+
export default {
|
|
90
|
+
|
|
91
|
+
props:
|
|
92
|
+
{
|
|
93
|
+
},
|
|
94
|
+
components: { },
|
|
95
|
+
data: () =>
|
|
96
|
+
({
|
|
97
|
+
pending_request: [],
|
|
98
|
+
accepted_request: [],
|
|
99
|
+
collected_request: [],
|
|
100
|
+
filter_request: "All",
|
|
101
|
+
gcash_data: [],
|
|
102
|
+
filterr: '',
|
|
103
|
+
filter: "Pending",
|
|
104
|
+
table_title: 'All Request',
|
|
105
|
+
pagination : { rowsPerPage: 5},
|
|
106
|
+
table_loading: false,
|
|
107
|
+
dialog_gcash_request_data: false,
|
|
108
|
+
gcash_request_data: {},
|
|
109
|
+
table_column:
|
|
110
|
+
[
|
|
111
|
+
{
|
|
112
|
+
name : 'status',
|
|
113
|
+
label : 'STATUS',
|
|
114
|
+
field : "status",
|
|
115
|
+
align : 'left',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name : 'full_name',
|
|
119
|
+
label : 'FULL NAME',
|
|
120
|
+
field : "full_name",
|
|
121
|
+
align : 'left',
|
|
122
|
+
sortable: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name : 'address',
|
|
126
|
+
label : 'ADDRESS',
|
|
127
|
+
field : "_address_combined",
|
|
128
|
+
align : 'center',
|
|
129
|
+
sortable: true,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name : 'contact_number',
|
|
133
|
+
label : 'CONTACT NUMBER',
|
|
134
|
+
field : "contact_number",
|
|
135
|
+
align : 'left',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name : 'requested_amount',
|
|
139
|
+
label : 'AMOUNT REQUEST',
|
|
140
|
+
field : row => `Php${formatNumber(row.requested_amount, { decimal: 2 })}`,
|
|
141
|
+
format: val => `${val}`,
|
|
142
|
+
align : 'left',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name : 'request',
|
|
146
|
+
label : 'REQUEST',
|
|
147
|
+
field : "request",
|
|
148
|
+
align : 'left',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name : 'created_date',
|
|
152
|
+
label : 'Time & Date',
|
|
153
|
+
field : row => formatDate(row.created_date, 'MM/DD/YY (hh:mm A)'),
|
|
154
|
+
format: val => `${val}`,
|
|
155
|
+
align : 'left',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name : 'hubs_response_message',
|
|
159
|
+
label : 'Response Memo',
|
|
160
|
+
field : row => row.hubs_response_message,
|
|
161
|
+
format : val => `${val ? val:'-----'}`,
|
|
162
|
+
align : 'left',
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
],
|
|
166
|
+
decline_message_dialog: false,
|
|
167
|
+
reject_message: '',
|
|
168
|
+
to_be_reject: null,
|
|
169
|
+
}),
|
|
170
|
+
watch:
|
|
171
|
+
{
|
|
172
|
+
filter()
|
|
173
|
+
{
|
|
174
|
+
this.getAllGcashRequest();
|
|
175
|
+
},
|
|
176
|
+
filter_request()
|
|
177
|
+
{
|
|
178
|
+
this.getAllGcashRequest();
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
async mounted()
|
|
182
|
+
{
|
|
183
|
+
await this.getAllGcashRequest();
|
|
184
|
+
await this.$_getSlotInfo();
|
|
185
|
+
},
|
|
186
|
+
methods:
|
|
187
|
+
{
|
|
188
|
+
async getAllGcashRequest()
|
|
189
|
+
{
|
|
190
|
+
this.$q.loading.show();
|
|
191
|
+
this.table_loading = true;
|
|
192
|
+
this.table_title = `${this.filter} Request`;
|
|
193
|
+
|
|
194
|
+
let filter;
|
|
195
|
+
if(this.filter == 'For Collection') filter = 'for_collection';
|
|
196
|
+
else if(this.filter == 'For Processing') filter = 'for_processing';
|
|
197
|
+
else filter = this.filter.toLowerCase();
|
|
198
|
+
|
|
199
|
+
if (filter === 'all' && this.filter_request === 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
200
|
+
.where('selected_hub', '==', `${this.user_info.active_slot}`).orderBy('created_date', 'desc'));
|
|
201
|
+
else if (filter === 'all' && this.filter_request != 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
202
|
+
.where('selected_hub', '==', `${this.user_info.active_slot}`).where('request', '==', `${this.filter_request}`).orderBy('created_date', 'desc'));
|
|
203
|
+
else if (filter != 'all' && filter != "collected" && this.filter_request === 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
204
|
+
.where('selected_hub', '==', `${this.user_info.active_slot}`).where('status', '==', `${filter}`).orderBy('created_date', 'desc'));
|
|
205
|
+
else if (filter == "collected" && this.filter_request === 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
206
|
+
.where('selected_hub', '==', `${this.user_info.active_slot}`).where('collected', '==', true).orderBy('created_date', 'desc'));
|
|
207
|
+
else if (filter == "collected" && this.filter_request != 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
208
|
+
.where('selected_hub', '==', `${this.user_info.active_slot}`).where('request', '==', `${this.filter_request}`).where('collected', '==', true).orderBy('created_date', 'desc'));
|
|
209
|
+
else await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
210
|
+
.where('selected_hub', '==', `${this.user_info.active_slot}`).where('status', '==', `${filter}`).where('request', '==', `${this.filter_request}`).orderBy('created_date', 'desc'));
|
|
211
|
+
|
|
212
|
+
if(filter == 'collected')
|
|
213
|
+
{
|
|
214
|
+
let new_data = [];
|
|
215
|
+
this.gcash_data.forEach(element => {
|
|
216
|
+
if (element.collected === true)
|
|
217
|
+
{
|
|
218
|
+
element.status = 'collected';
|
|
219
|
+
}
|
|
220
|
+
new_data.push(element)
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
this.gcash_data = new_data;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
this.table_loading = false;
|
|
227
|
+
this.$q.loading.hide();
|
|
228
|
+
},
|
|
229
|
+
viewRequest(evt, row)
|
|
230
|
+
{
|
|
231
|
+
if (row && row.hasOwnProperty('hubs_status'))
|
|
232
|
+
{
|
|
233
|
+
this.$q.dialog({title: `You've already responded!`})
|
|
234
|
+
}
|
|
235
|
+
else
|
|
236
|
+
{
|
|
237
|
+
this.dialog_gcash_request_data = true;
|
|
238
|
+
this.gcash_request_data = row;
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
async declineREquest(request_data)
|
|
243
|
+
{
|
|
244
|
+
this.to_be_reject = request_data;
|
|
245
|
+
if (this.reject_message === '') return this.decline_message_dialog = true;
|
|
246
|
+
else
|
|
247
|
+
{
|
|
248
|
+
this.$q.loading.show()
|
|
249
|
+
if (this.user_info)
|
|
250
|
+
{
|
|
251
|
+
let hub_response = {};
|
|
252
|
+
hub_response.hubs_response = 'rejected';
|
|
253
|
+
hub_response.req_id = request_data.id;
|
|
254
|
+
hub_response.request_data = request_data;
|
|
255
|
+
hub_response.message = this.reject_message;
|
|
256
|
+
hub_response.slot_code = this.current_slot_info.slot_code;
|
|
257
|
+
try
|
|
258
|
+
{
|
|
259
|
+
let res = await this.$_fbCall('memberhubRequestResponse', hub_response);
|
|
260
|
+
this.$q.dialog({ title: `Success`, message: `You've rejected the request.`, html: true });
|
|
261
|
+
this.reject_message = '';
|
|
262
|
+
this.decline_message_dialog = false;
|
|
263
|
+
}
|
|
264
|
+
catch (error)
|
|
265
|
+
{
|
|
266
|
+
this.$q.dialog({ title: `Something's not quite right`, message: error.message });
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
await this.getAllGcashRequest();
|
|
270
|
+
this.$q.loading.hide()
|
|
271
|
+
this.dialog_gcash_request_data = false;
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
async acceptREquest(request_data)
|
|
275
|
+
{
|
|
276
|
+
this.$q.loading.show();
|
|
277
|
+
if (this.user_info)
|
|
278
|
+
{
|
|
279
|
+
let hub_response = {};
|
|
280
|
+
hub_response.hubs_response = 'for_collection';
|
|
281
|
+
hub_response.req_id = request_data.id;
|
|
282
|
+
hub_response.request_data = request_data;
|
|
283
|
+
hub_response.slot_code = this.current_slot_info.slot_code;
|
|
284
|
+
if(this.current_slot_info.wallet < request_data.requested_amount)
|
|
285
|
+
{
|
|
286
|
+
this.$q.dialog({title: 'Insufficient Balance', message: `The requested amount doesn't match your current wallet.`})
|
|
287
|
+
return this.$q.loading.hide();
|
|
288
|
+
}
|
|
289
|
+
try
|
|
290
|
+
{
|
|
291
|
+
let res = await this.$_fbCall('memberhubRequestResponse', hub_response);
|
|
292
|
+
this.$q.dialog({ title: `Success`, message: `You've accepted the request.`, html: true });
|
|
293
|
+
}
|
|
294
|
+
catch (error)
|
|
295
|
+
{
|
|
296
|
+
this.$q.dialog({ title: `Something's not quite right`, message: error.message });
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
await this.getAllGcashRequest();
|
|
300
|
+
this.dialog_gcash_request_data = false;
|
|
301
|
+
this.$q.loading.hide();
|
|
302
|
+
},
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
</script>
|
|
306
|
+
|
|
307
|
+
<style lang="scss">
|
|
308
|
+
.gcash-and-wallet-page
|
|
309
|
+
{
|
|
310
|
+
.filters
|
|
311
|
+
{
|
|
312
|
+
display: flex;
|
|
313
|
+
grid-gap: 10px;
|
|
314
|
+
width: 100%;
|
|
315
|
+
justify-content: flex-end;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
.q-dialog
|
|
319
|
+
{
|
|
320
|
+
.reject-message-dialog
|
|
321
|
+
{
|
|
322
|
+
max-width: 400px;
|
|
323
|
+
width: 100%;
|
|
324
|
+
}
|
|
325
|
+
.user-verification-dialog-holder
|
|
326
|
+
{
|
|
327
|
+
display: grid;
|
|
328
|
+
place-items: center;
|
|
329
|
+
justify-content: center;
|
|
330
|
+
.full-width
|
|
331
|
+
{
|
|
332
|
+
max-width: 95vw;
|
|
333
|
+
width: 100% ;
|
|
334
|
+
// overflow: scroll;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
.row-details
|
|
338
|
+
{
|
|
339
|
+
.label
|
|
340
|
+
{
|
|
341
|
+
min-width: 150px;
|
|
342
|
+
}
|
|
343
|
+
table
|
|
344
|
+
{
|
|
345
|
+
max-width: 400px;
|
|
346
|
+
tbody
|
|
347
|
+
{
|
|
348
|
+
tr
|
|
349
|
+
{
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: flex-start;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
</style>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="manage-collector">
|
|
3
|
+
<div align="right" class="q-mb-md">
|
|
4
|
+
<q-btn-dropdown color="primary" label="Actions">
|
|
5
|
+
<q-list>
|
|
6
|
+
<q-item clickable v-close-popup @click="onItemClick">
|
|
7
|
+
<q-item-section>
|
|
8
|
+
<q-item-label>Add Collector's Account</q-item-label>
|
|
9
|
+
</q-item-section>
|
|
10
|
+
</q-item>
|
|
11
|
+
</q-list>
|
|
12
|
+
</q-btn-dropdown>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="collectors-table">
|
|
15
|
+
<q-table
|
|
16
|
+
:loading="table_loading"
|
|
17
|
+
@row-click= "viewCollector"
|
|
18
|
+
separator="cell"
|
|
19
|
+
bordered
|
|
20
|
+
flat
|
|
21
|
+
:data="!table_loading ? table_data : []"
|
|
22
|
+
:columns="table_column"
|
|
23
|
+
:pagination.sync="pagination" >
|
|
24
|
+
</q-table>
|
|
25
|
+
</div>
|
|
26
|
+
<q-dialog persistent v-model="add_collectors_dialog_open">
|
|
27
|
+
<add-collector-form @done="createdSuccessfully"/>
|
|
28
|
+
</q-dialog>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import DB_USER from '../../models/DB_USER';
|
|
34
|
+
import AddCollectorForm from './AddCollectorForm';
|
|
35
|
+
export default
|
|
36
|
+
{
|
|
37
|
+
filters: { },
|
|
38
|
+
components: { AddCollectorForm },
|
|
39
|
+
data:() =>(
|
|
40
|
+
{
|
|
41
|
+
add_collectors_dialog_open: false,
|
|
42
|
+
table_data: [],
|
|
43
|
+
table_loading: false,
|
|
44
|
+
pagination: { rowsPerPage: 5},
|
|
45
|
+
table_column:
|
|
46
|
+
[
|
|
47
|
+
{
|
|
48
|
+
name : 'full_name',
|
|
49
|
+
label : 'FULL NAME',
|
|
50
|
+
field : "full_name",
|
|
51
|
+
align : 'left',
|
|
52
|
+
sortable: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name : 'contact_number',
|
|
56
|
+
label : 'Contact Number',
|
|
57
|
+
field : "contact_number",
|
|
58
|
+
align : 'left',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name : 'location_tag',
|
|
62
|
+
label : 'Location Tag',
|
|
63
|
+
field : "location_tag",
|
|
64
|
+
align : 'left',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name : 'assigned_location',
|
|
68
|
+
label : 'Location',
|
|
69
|
+
field : "assigned_location",
|
|
70
|
+
align : 'left',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name : 'email',
|
|
74
|
+
label : 'Email',
|
|
75
|
+
field : "email",
|
|
76
|
+
align : 'left',
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
],
|
|
80
|
+
}),
|
|
81
|
+
async mounted()
|
|
82
|
+
{
|
|
83
|
+
await this.$_getSlotInfo();
|
|
84
|
+
await this.getAllCollectors();
|
|
85
|
+
},
|
|
86
|
+
methods:
|
|
87
|
+
{
|
|
88
|
+
onItemClick()
|
|
89
|
+
{
|
|
90
|
+
this.add_collectors_dialog_open = true;
|
|
91
|
+
},
|
|
92
|
+
async createdSuccessfully()
|
|
93
|
+
{
|
|
94
|
+
await this.getAllCollectors();
|
|
95
|
+
this.add_collectors_dialog_open = false;
|
|
96
|
+
},
|
|
97
|
+
async getAllCollectors()
|
|
98
|
+
{
|
|
99
|
+
this.table_loading = true;
|
|
100
|
+
await this.$bind('table_data', new DB_USER().collection().where('hubs_slot', '==', `${this.user_info.active_slot}`).where('collector', '==', true).orderBy('created_date', 'desc'));
|
|
101
|
+
let new_table_data = [];
|
|
102
|
+
if (this.table_data && this.table_data.hasOwnProperty('length') && this.table_data.length > 0)
|
|
103
|
+
{
|
|
104
|
+
for (let i = 0; i < this.table_data.length; i++)
|
|
105
|
+
{
|
|
106
|
+
const element = this.table_data[i];
|
|
107
|
+
if (element && element.hasOwnProperty('tag_location'))
|
|
108
|
+
{
|
|
109
|
+
let tags = element.tag_location;
|
|
110
|
+
let tag_loc = [];
|
|
111
|
+
if(tags.hasOwnProperty('length') && tags.length > 0)
|
|
112
|
+
{
|
|
113
|
+
tags.forEach(sec_element => { tag_loc.push(`${sec_element.name}, `) });
|
|
114
|
+
element.assigned_location = `${element.address.street} ${element.address.barangay.name} ${element.address.city.name} ${element.address.province.name} ${element.address.region.name}`
|
|
115
|
+
element.location_tag = tag_loc;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if(element.hasOwnProperty('hubs_slot') && element.hubs_slot === this.current_slot_info.slot_code) new_table_data.push(element);
|
|
119
|
+
}
|
|
120
|
+
this.table_data = new_table_data;
|
|
121
|
+
}
|
|
122
|
+
this.table_loading = false;
|
|
123
|
+
},
|
|
124
|
+
viewCollector(event, row)
|
|
125
|
+
{
|
|
126
|
+
console.log(row, 'hkjsahjdfhja');
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
computed: { }
|
|
130
|
+
}
|
|
131
|
+
</script>
|