geer-builder 1.2.643 → 1.2.644
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,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="collector-page">
|
|
3
|
+
<div class="gcash-wallet">
|
|
4
|
+
<div class="section-title">Gcash & Wallet Request</div>
|
|
5
|
+
<gcash-wallet-request/>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="bills-payment">
|
|
8
|
+
<div class="section-title">Bills Payment Request</div>
|
|
9
|
+
<bills-payment-request/>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import GcashWalletRequest from "./components/CollectorPages/GcashWalletRequest";
|
|
16
|
+
import BillsPaymentRequest from "./components/CollectorPages/BillsPaymentRequest.vue";
|
|
17
|
+
export default
|
|
18
|
+
{
|
|
19
|
+
components: { GcashWalletRequest, BillsPaymentRequest },
|
|
20
|
+
filters: { },
|
|
21
|
+
data:() =>(
|
|
22
|
+
{
|
|
23
|
+
}),
|
|
24
|
+
mounted() { },
|
|
25
|
+
methods: { },
|
|
26
|
+
computed: { }
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
<style lang="scss">
|
|
30
|
+
.collector-page
|
|
31
|
+
{
|
|
32
|
+
.gcash-wallet
|
|
33
|
+
{
|
|
34
|
+
background: rgb(243, 243, 243);
|
|
35
|
+
padding: 10px;
|
|
36
|
+
border-radius: 5px;
|
|
37
|
+
margin-bottom: 20px;
|
|
38
|
+
.section-title
|
|
39
|
+
{
|
|
40
|
+
color: $primary;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
width: max-width;
|
|
43
|
+
font-size: 17px;
|
|
44
|
+
display: grid;
|
|
45
|
+
justify-items: flex-start;
|
|
46
|
+
margin-bottom: 10px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.bills-payment
|
|
50
|
+
{
|
|
51
|
+
background: rgb(243, 243, 243);
|
|
52
|
+
padding: 10px;
|
|
53
|
+
border-radius: 5px;
|
|
54
|
+
.section-title
|
|
55
|
+
{
|
|
56
|
+
color: $primary;
|
|
57
|
+
font-weight: bold;
|
|
58
|
+
width: max-width;
|
|
59
|
+
font-size: 17px;
|
|
60
|
+
display: grid;
|
|
61
|
+
justify-items: flex-start;
|
|
62
|
+
margin-bottom: 10px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="g-gcash-request">
|
|
3
|
+
<div class="message-output q-mb-lg" v-if="!(this.user_info.hasOwnProperty('verified') && this.user_info.verified === true)">
|
|
4
|
+
<div class="verification-required">
|
|
5
|
+
<div class="title">Verification Required</div>
|
|
6
|
+
<div class="desc">You need to <b>GET VERIFIED</b> to transact with this module. Please click the <b>"GET VERIFIED"</b> button.</div>
|
|
7
|
+
</div>
|
|
8
|
+
<q-btn class="q-mt-lg" @click="is_g_user_verification_dialog_open = true" label="Get Verified"/>
|
|
9
|
+
</div>
|
|
10
|
+
<q-form @submit.prevent="onSubmit">
|
|
11
|
+
<div class="input-wrapper">
|
|
12
|
+
<div class="section-label text-bold" align="left"><span class="text-uppercase">Primary Info </span><span class="text-red">( Required )</span></div>
|
|
13
|
+
<div class="primary-details">
|
|
14
|
+
<q-input filled required v-model="form.first_name" placeholder="Enter your First Name" label="First Name" />
|
|
15
|
+
<q-input filled required v-model="form.middle_name" placeholder="Enter your Middle Name" label="Middle Name (Put 'N/A', if not applicable)" />
|
|
16
|
+
<q-input filled required v-model="form.last_name" placeholder="Enter your Last Name" label="Last Name" />
|
|
17
|
+
<q-select filled v-model="request" :options="['Gcash Request', 'Wallet Request']" label="Select Request" />
|
|
18
|
+
<q-input filled required type="number" v-model="form.contact_number" placeholder="Enter your Number" label="Mobile Number ( Must be 11 digits )" />
|
|
19
|
+
<q-input filled required type="number" v-model="form.requested_amount" :placeholder="amount_placeholder" label="Amount Request" />
|
|
20
|
+
<q-select filled v-model="selected_hub" option-label="full_name" option-value="active_slot" :options="hub_options" label="Select Hub" />
|
|
21
|
+
</div>
|
|
22
|
+
<div class="section-label text-bold q-mt-md" align="left"> <span class="text-uppercase">*Address </span><span class="text-grey">( Changes are not allowed in this section. )</span></div>
|
|
23
|
+
<div class="address-details">
|
|
24
|
+
<q-input disable filled v-model="form.address.street" label="Street" />
|
|
25
|
+
<q-input disable filled v-model="form.address.barangay" label="Barangay" />
|
|
26
|
+
<q-input disable filled v-model="form.address.city" label="City" />
|
|
27
|
+
<q-input disable filled v-model="form.address.province" label="Province" />
|
|
28
|
+
<q-input disable filled v-model="form.address.region" label="Region" />
|
|
29
|
+
<q-input disable filled v-model="form.address.postal_code" label="Postal Code" />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div align="right" v-if="this.user_info && this.user_info.hasOwnProperty('verified') && this.user_info.verified === true">
|
|
33
|
+
<q-btn class="q-mt-lg" type="submit" label="submit"/>
|
|
34
|
+
</div>
|
|
35
|
+
</q-form>
|
|
36
|
+
|
|
37
|
+
<div align="right" class="q-mb-md filters">
|
|
38
|
+
<q-input style="width: 300px;" label="Search Here" outlined="" v-model="filterr"></q-input>
|
|
39
|
+
<q-select outlined style="min-width: 200px; width: fit-content" v-model="filter_request" :options="['All', 'Wallet Request', 'Gcash Request']" label="Request" />
|
|
40
|
+
<q-select outlined style="min-width: 200px; width: fit-content" v-model="filter" :options="['All', 'Pending', 'Rejected', 'For Collection', 'For Processing', 'Processed']" label="Filter" />
|
|
41
|
+
</div>
|
|
42
|
+
<q-table
|
|
43
|
+
:title="table_title"
|
|
44
|
+
:loading="table_loading"
|
|
45
|
+
@row-click= "viewRequest"
|
|
46
|
+
separator="cell"
|
|
47
|
+
bordered
|
|
48
|
+
flat
|
|
49
|
+
:data="!table_loading ? gcash_data : []"
|
|
50
|
+
:columns="table_column"
|
|
51
|
+
:pagination.sync="pagination"
|
|
52
|
+
:filter="filterr" >
|
|
53
|
+
</q-table>
|
|
54
|
+
<q-dialog persistent v-model="is_g_user_verification_dialog_open" :maximized="true" transition-show="slide-up" transition-hide="slide-down">
|
|
55
|
+
<div class="user-verification-dialog-holder">
|
|
56
|
+
<g-user-verification class="full-width"/>
|
|
57
|
+
</div>
|
|
58
|
+
</q-dialog>
|
|
59
|
+
<q-dialog v-model="is_view_request">
|
|
60
|
+
<q-card class="member-card-wrapper">
|
|
61
|
+
<q-card-section>
|
|
62
|
+
<div class="card-title text-bold text-primary text-h6"> Request Data</div>
|
|
63
|
+
</q-card-section>
|
|
64
|
+
<q-card-section class="member-request-wrapper">
|
|
65
|
+
<table>
|
|
66
|
+
<tbody>
|
|
67
|
+
<tr>
|
|
68
|
+
<td class="label">Amount</td>
|
|
69
|
+
<td>:</td>
|
|
70
|
+
<td class="value">{{newNUmber(request_details.requested_amount)}}</td>
|
|
71
|
+
</tr>
|
|
72
|
+
<tr>
|
|
73
|
+
<td class="label">Fullname</td>
|
|
74
|
+
<td>:</td>
|
|
75
|
+
<td class="value">{{request_details.full_name}}</td>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td class="label">Address</td>
|
|
79
|
+
<td>:</td>
|
|
80
|
+
<td class="value">{{request_details._address_combined}}</td>
|
|
81
|
+
</tr>
|
|
82
|
+
<tr>
|
|
83
|
+
<td class="label">Contact Number</td>
|
|
84
|
+
<td>:</td>
|
|
85
|
+
<td class="value" v-if="edit_request"><q-input dense outlined v-model="request_details.contact_number"/></td>
|
|
86
|
+
<td class="value" v-else>{{request_details.contact_number}}</td>
|
|
87
|
+
</tr>
|
|
88
|
+
<tr>
|
|
89
|
+
<td class="label">Time & Date</td>
|
|
90
|
+
<td>:</td>
|
|
91
|
+
<td class="value">{{date(request_details.created_date)}}</td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td class="label">Request</td>
|
|
95
|
+
<td>:</td>
|
|
96
|
+
<td class="value">{{request_details.request}}</td>
|
|
97
|
+
</tr>
|
|
98
|
+
<tr>
|
|
99
|
+
<td class="label">Status</td>
|
|
100
|
+
<td>:</td>
|
|
101
|
+
<td class="value">{{request_details.status}}</td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr v-if="request_details.response_message && request_details.response_message.length > 0">
|
|
104
|
+
<td class="label">Response Message</td>
|
|
105
|
+
<td>:</td>
|
|
106
|
+
<td class="value">{{request_details.response_message}}</td>
|
|
107
|
+
</tr>
|
|
108
|
+
</tbody>
|
|
109
|
+
</table>
|
|
110
|
+
</q-card-section>
|
|
111
|
+
<q-card-section align="right" v-show="request_details.admin_rejected == true">
|
|
112
|
+
<q-btn :disabled="false" @click="cancelEdit()" flat label="Cancel"/>
|
|
113
|
+
<q-btn :disabled="false" v-if="!edit_request" @click="edit_request = true" color="primary" label="Edit Number"/>
|
|
114
|
+
<q-btn :disabled="false" v-else @click="submitEditedRequest(request_details)" color="primary" label="Save and Submit"/>
|
|
115
|
+
</q-card-section>
|
|
116
|
+
</q-card>
|
|
117
|
+
</q-dialog>
|
|
118
|
+
</div>
|
|
119
|
+
</template>
|
|
120
|
+
<script>
|
|
121
|
+
import GlobalMixins from './mixins/global_mixins.js';
|
|
122
|
+
import DB_USER_SHIPPING_ADDRESS from './models/DB_USER_SHIPPING_ADDRESS';
|
|
123
|
+
import DB_USER from './models/DB_USER';
|
|
124
|
+
import GUserVerification from './GUserVerification';
|
|
125
|
+
import DB_GCASH_REQUEST from './models/DB_GCASH_REQUEST';
|
|
126
|
+
import {formatNumber} from './utilities/NumberUtils';
|
|
127
|
+
import {formatDate} from './utilities/DateUtils';
|
|
128
|
+
export default {
|
|
129
|
+
|
|
130
|
+
props:
|
|
131
|
+
{
|
|
132
|
+
},
|
|
133
|
+
components: { GUserVerification },
|
|
134
|
+
data: () =>
|
|
135
|
+
({
|
|
136
|
+
user_default_address: null,
|
|
137
|
+
is_open_request_form: false,
|
|
138
|
+
edit_request: false,
|
|
139
|
+
is_view_request: false,
|
|
140
|
+
filter: 'Pending',
|
|
141
|
+
request: '',
|
|
142
|
+
filter_request: 'All',
|
|
143
|
+
table_title: 'All Request',
|
|
144
|
+
gcash_data: [],
|
|
145
|
+
table_data: [],
|
|
146
|
+
pagination: { rowsPerPage: 5},
|
|
147
|
+
table_loading: false,
|
|
148
|
+
is_g_user_verification_dialog_open: false,
|
|
149
|
+
selected_hub: null,
|
|
150
|
+
filterr: '',
|
|
151
|
+
request_details: {},
|
|
152
|
+
amount_placeholder: '',
|
|
153
|
+
table_column:
|
|
154
|
+
[
|
|
155
|
+
{
|
|
156
|
+
name : 'status',
|
|
157
|
+
label : 'STATUS',
|
|
158
|
+
field : "status",
|
|
159
|
+
align : 'left',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name : 'full_name',
|
|
163
|
+
label : 'FULL NAME',
|
|
164
|
+
field : "full_name",
|
|
165
|
+
align : 'left',
|
|
166
|
+
sortable: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name : 'address',
|
|
170
|
+
label : 'ADDRESS',
|
|
171
|
+
field : "_address_combined",
|
|
172
|
+
align : 'center',
|
|
173
|
+
sortable: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name : 'contact_number',
|
|
177
|
+
label : 'CONTACT NUMBER',
|
|
178
|
+
field : "contact_number",
|
|
179
|
+
align : 'left',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name : 'requested_amount',
|
|
183
|
+
label : 'AMOUNT REQUEST',
|
|
184
|
+
field : row => `Php${formatNumber(row.requested_amount, { decimal: 2 })}`,
|
|
185
|
+
format: val => `${val}`,
|
|
186
|
+
align : 'left',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name : 'request',
|
|
190
|
+
label : 'REQUEST',
|
|
191
|
+
field : "request",
|
|
192
|
+
align : 'left',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name : 'gcash_ref_number',
|
|
196
|
+
label : 'Reference Number',
|
|
197
|
+
field : 'gcash_ref_number',
|
|
198
|
+
align : 'left',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name : 'created_date',
|
|
202
|
+
label : 'Time & Date',
|
|
203
|
+
field : row => formatDate(row.created_date, 'MM/DD/YY (hh:mm A)'),
|
|
204
|
+
format: val => `${val}`,
|
|
205
|
+
align : 'left',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name : 'hubs_response_message',
|
|
209
|
+
label : 'Response Message',
|
|
210
|
+
field : row => row.response_message,
|
|
211
|
+
format : val => `${val ? val:'-----'}`,
|
|
212
|
+
align : 'left',
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
min_request_amount: null,
|
|
216
|
+
max_request_amount: null,
|
|
217
|
+
form: {
|
|
218
|
+
selected_hub: null,
|
|
219
|
+
first_name: null,
|
|
220
|
+
middle_name: null,
|
|
221
|
+
last_name: null,
|
|
222
|
+
contact_number: null,
|
|
223
|
+
requested_amount: null,
|
|
224
|
+
address: {
|
|
225
|
+
street: null,
|
|
226
|
+
barangay: null,
|
|
227
|
+
city: null,
|
|
228
|
+
province: null,
|
|
229
|
+
region: null,
|
|
230
|
+
postal_code: null,
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
hub_options: []
|
|
234
|
+
}),
|
|
235
|
+
async mounted()
|
|
236
|
+
{
|
|
237
|
+
await this.$_getSlotInfo(); // GET THE CURRENTLY USED SLOT VARIABLE SAVED ON = this.current_slot_info;
|
|
238
|
+
await this.getAddress();
|
|
239
|
+
await this.getAssignAddress();
|
|
240
|
+
let public_settings = await this.$_getData('public_settings');
|
|
241
|
+
if (public_settings.hasOwnProperty('gcash_wallet_min')) {
|
|
242
|
+
this.min_request_amount = public_settings.gcash_wallet_min;
|
|
243
|
+
this.max_request_amount = public_settings.gcash_wallet_max;
|
|
244
|
+
this.amount_placeholder = `minimum: ${formatNumber(this.min_request_amount, {decimal: 2})} & maximum: ${formatNumber(this.max_request_amount, {decimal: 2})}`
|
|
245
|
+
}
|
|
246
|
+
this.getAllRequest();
|
|
247
|
+
this.getHubOptions();
|
|
248
|
+
},
|
|
249
|
+
watch:
|
|
250
|
+
{
|
|
251
|
+
filter()
|
|
252
|
+
{
|
|
253
|
+
this.getAllRequest()
|
|
254
|
+
},
|
|
255
|
+
filter_request()
|
|
256
|
+
{
|
|
257
|
+
this.getAllRequest()
|
|
258
|
+
},
|
|
259
|
+
selected_hub()
|
|
260
|
+
{
|
|
261
|
+
this.form.selected_hub = this.selected_hub.active_slot;
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
methods:
|
|
265
|
+
{
|
|
266
|
+
async getCollectorsLocations()
|
|
267
|
+
{
|
|
268
|
+
let collector = await new DB_USER().collection().where('hubs_slot', '==', this.form.selected_hub).where('collector', '==', true).get().then(res => res.docs.map(doc => Object.assign({}, doc.data(), { id: doc.id })));
|
|
269
|
+
let collector_location = null;
|
|
270
|
+
if (!(collector && collector.hasOwnProperty('length') && collector.length > 0)) return {response: false};
|
|
271
|
+
else
|
|
272
|
+
{
|
|
273
|
+
for (let i = 0; i < collector.length; i++) {
|
|
274
|
+
const element = collector[i];
|
|
275
|
+
let tag_location = element.tag_location;
|
|
276
|
+
if(tag_location.hasOwnProperty('length') && tag_location.length > 0)
|
|
277
|
+
{
|
|
278
|
+
for (let i = 0; i < tag_location.length; i++) {
|
|
279
|
+
const ins_element = tag_location[i];
|
|
280
|
+
if (ins_element.brgy_code === this.user_default_address.barangay.brgy_code) collector_location = {location_code: ins_element.brgy_code, has_collector: true};
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return collector_location;
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
date(date)
|
|
288
|
+
{
|
|
289
|
+
let new_date = formatDate(date, 'MM/DD/YY (hh:mm A)');
|
|
290
|
+
return new_date;
|
|
291
|
+
},
|
|
292
|
+
newNUmber(amount)
|
|
293
|
+
{
|
|
294
|
+
let new_amount= formatNumber(amount, { decimal: 2 });
|
|
295
|
+
return new_amount;
|
|
296
|
+
},
|
|
297
|
+
async getAssignAddress()
|
|
298
|
+
{
|
|
299
|
+
if (this.user_info)
|
|
300
|
+
{
|
|
301
|
+
this.form.contact_number = this.user_info.contact_number
|
|
302
|
+
if (this.user_default_address) {
|
|
303
|
+
this.form.first_name = this.user_default_address.first_name;
|
|
304
|
+
if (this.user_default_address.hasOwnProperty('middle_name')) this.form.middle_name = this.user_default_address.middle_name;
|
|
305
|
+
this.form.last_name = this.user_default_address.last_name
|
|
306
|
+
this.form.address.street= this.user_default_address.street;
|
|
307
|
+
this.form.address.barangay= this.user_default_address.barangay.name;
|
|
308
|
+
this.form.address.city= this.user_default_address.city.name;
|
|
309
|
+
this.form.address.province= this.user_default_address.province.name;
|
|
310
|
+
this.form.address.region= this.user_default_address.region.name;
|
|
311
|
+
this.form.address.postal_code= this.user_default_address.postal_code;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
async getAddress()
|
|
316
|
+
{
|
|
317
|
+
if (this.user_info && this.user_info.hasOwnProperty('verified') && this.user_info.verified === true) {
|
|
318
|
+
let address = await new DB_USER_SHIPPING_ADDRESS(this.user_info.uid).collection().where('default', '==', true).get();
|
|
319
|
+
this.user_default_address = address.docs[0].data();
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
async onSubmit()
|
|
323
|
+
{
|
|
324
|
+
this.$q.loading.show();
|
|
325
|
+
let collector = await this.getCollectorsLocations();
|
|
326
|
+
if (this.min_request_amount && this.max_request_amount) {
|
|
327
|
+
if(!(this.form.requested_amount >= this.min_request_amount && this.form.requested_amount <= this.max_request_amount))
|
|
328
|
+
{
|
|
329
|
+
this.$q.dialog({
|
|
330
|
+
title:'Invalid Amount',
|
|
331
|
+
message: `You have entered an amount which is beyond the bracket of
|
|
332
|
+
minimum Php${formatNumber(this.min_request_amount, {decimal: 2})} to
|
|
333
|
+
maximum Php${formatNumber(this.max_request_amount, {decimal: 2})}.`
|
|
334
|
+
});
|
|
335
|
+
return this.$q.loading.hide();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
if (!(collector && collector.hasOwnProperty('has_collector') && collector.has_collector === true))
|
|
339
|
+
{
|
|
340
|
+
this.$q.dialog({message: 'No collectors found in your location. Sorry for inconvenience.'});
|
|
341
|
+
return this.$q.loading.hide();
|
|
342
|
+
}
|
|
343
|
+
if (this.user_info)
|
|
344
|
+
{
|
|
345
|
+
this.form.uid = this.user_info.uid
|
|
346
|
+
this.form.requested_amount = Number(this.form.requested_amount);
|
|
347
|
+
this.form.request = this.request;
|
|
348
|
+
this.form.status = 'pending';
|
|
349
|
+
this.form.location_code = collector.location_code;
|
|
350
|
+
this.form._address_combined = `${this.form.address.street} ${this.form.address.barangay} ${this.form.address.city} ${this.form.address.province} ${this.form.address.region}`
|
|
351
|
+
this.form.full_name = `${this.form.first_name} ${this.form.middle_name} ${this.form.last_name}`
|
|
352
|
+
if (this.form.request && this.form.contact_number && this.form.contact_number.length === 11 && this.form.first_name && this.form.middle_name && this.form.last_name)
|
|
353
|
+
{
|
|
354
|
+
if(this.current_slot_info)
|
|
355
|
+
{
|
|
356
|
+
try
|
|
357
|
+
{
|
|
358
|
+
this.form.slot_code = this.current_slot_info.slot_code;
|
|
359
|
+
let res = await this.$_fbCall('memberGcashRequest', this.form);
|
|
360
|
+
this.$q.dialog({ title: `Success`, message: `${this.form.request} has been succesfully submitted.`, html: true });
|
|
361
|
+
}
|
|
362
|
+
catch (error)
|
|
363
|
+
{
|
|
364
|
+
this.$q.dialog({ title: `Something's not quite right`, message: error.message });
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
else
|
|
368
|
+
{
|
|
369
|
+
this.$q.dialog({ title: `Something's not quite right`, message: "No slot available" });
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
else
|
|
373
|
+
{
|
|
374
|
+
this.$q.dialog({title:'Something Went Wrong', message: 'You must filled up all the fields properly.'})
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
await this.getAllRequest();
|
|
378
|
+
this.is_open_request_form = false;
|
|
379
|
+
this.$q.loading.hide();
|
|
380
|
+
},
|
|
381
|
+
async getAllRequest()
|
|
382
|
+
{
|
|
383
|
+
this.table_title = `${this.filter} Request`;
|
|
384
|
+
let filter;
|
|
385
|
+
if(this.filter == 'For Collection') filter = 'for_collection';
|
|
386
|
+
else if(this.filter == 'For Processing') filter = 'for_processing';
|
|
387
|
+
else filter = this.filter.toLowerCase();
|
|
388
|
+
|
|
389
|
+
if (filter === 'all' && this.filter_request === 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
390
|
+
.where('members_uid', '==', `${this.user_info.uid}`).orderBy('created_date', 'desc'));
|
|
391
|
+
else if (filter === 'all' && this.filter_request != 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
392
|
+
.where('members_uid', '==', `${this.user_info.uid}`).where('request', '==', `${this.filter_request}`).orderBy('created_date', 'desc'));
|
|
393
|
+
else if (filter != 'all' && this.filter_request === 'All') await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
394
|
+
.where('members_uid', '==', `${this.user_info.uid}`).where('status', '==', `${filter}`).orderBy('created_date', 'desc'));
|
|
395
|
+
else await this.$bind('gcash_data', new DB_GCASH_REQUEST().collection()
|
|
396
|
+
.where('members_uid', '==', `${this.user_info.uid}`).where('status', '==', `${filter}`).where('request', '==', `${this.filter_request}`).orderBy('created_date', 'desc'));
|
|
397
|
+
this.table_loading= false;
|
|
398
|
+
},
|
|
399
|
+
viewRequest(evt, row)
|
|
400
|
+
{
|
|
401
|
+
this.request_details = row;
|
|
402
|
+
this.is_view_request = true;
|
|
403
|
+
},
|
|
404
|
+
async getAllHubs()
|
|
405
|
+
{
|
|
406
|
+
await this.$bind('table_data', new DB_USER().collection().where('hub', '==', true));
|
|
407
|
+
let new_table_data = [];
|
|
408
|
+
if (this.table_data && this.table_data.hasOwnProperty('length') && this.table_data.length > 0)
|
|
409
|
+
{
|
|
410
|
+
for (let i = 0; i < this.table_data.length; i++) {
|
|
411
|
+
const element = this.table_data[i];
|
|
412
|
+
if(this.user_default_address.city.mun_code === element.address.city.mun_code) new_table_data.push(element);
|
|
413
|
+
}
|
|
414
|
+
return new_table_data;
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
async getHubOptions()
|
|
418
|
+
{
|
|
419
|
+
this.hub_options = await this.getAllHubs();
|
|
420
|
+
},
|
|
421
|
+
cancelEdit()
|
|
422
|
+
{
|
|
423
|
+
this.getAllRequest();
|
|
424
|
+
this.edit_request = false;
|
|
425
|
+
this.is_view_request = false;
|
|
426
|
+
},
|
|
427
|
+
async submitEditedRequest(request_details)
|
|
428
|
+
{
|
|
429
|
+
request_details.req_id = request_details.id;
|
|
430
|
+
this.$q.loading.show()
|
|
431
|
+
try
|
|
432
|
+
{
|
|
433
|
+
let res = await this.$_fbCall('memberSubmitEditedRequest', request_details);
|
|
434
|
+
this.edit_request = false;
|
|
435
|
+
this.is_view_request = false;
|
|
436
|
+
this.getAllRequest();
|
|
437
|
+
this.$q.loading.hide();
|
|
438
|
+
return this.$q.dialog({ title: `Success`, message: `${request_details.request} has been succesfully resubmitted.`, html: true });
|
|
439
|
+
}
|
|
440
|
+
catch(e)
|
|
441
|
+
{
|
|
442
|
+
this.getAllRequest();
|
|
443
|
+
this.$q.loading.hide();
|
|
444
|
+
return this.$q.dialog({title:'Something Went Wrong', message: 'You must filled up all the fields properly.'})
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
}
|
|
449
|
+
</script>
|
|
450
|
+
|
|
451
|
+
<style lang="scss">
|
|
452
|
+
.g-gcash-request
|
|
453
|
+
{
|
|
454
|
+
.button-holder
|
|
455
|
+
{
|
|
456
|
+
display: flex;
|
|
457
|
+
justify-content: space-between;
|
|
458
|
+
.q-btn
|
|
459
|
+
{
|
|
460
|
+
background-color: #3887d1;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
.message-output
|
|
464
|
+
{
|
|
465
|
+
display: flex;
|
|
466
|
+
justify-content: space-between;
|
|
467
|
+
align-items: center;
|
|
468
|
+
padding: 10px 20px;
|
|
469
|
+
background-color: white;
|
|
470
|
+
border-left: 3px solid red;
|
|
471
|
+
.verification-required
|
|
472
|
+
{
|
|
473
|
+
text-align: start;
|
|
474
|
+
.title
|
|
475
|
+
{
|
|
476
|
+
font-size: 20px;
|
|
477
|
+
font-weight: bold;
|
|
478
|
+
}
|
|
479
|
+
.desc
|
|
480
|
+
{
|
|
481
|
+
color: gray;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
.primary-details
|
|
486
|
+
{
|
|
487
|
+
display: grid;
|
|
488
|
+
grid-template-columns: repeat(3, 1fr);
|
|
489
|
+
grid-gap: 15px;
|
|
490
|
+
}
|
|
491
|
+
.address-details
|
|
492
|
+
{
|
|
493
|
+
display: grid;
|
|
494
|
+
grid-template-columns: repeat(3, 1fr);
|
|
495
|
+
grid-gap: 15px;
|
|
496
|
+
}
|
|
497
|
+
.input-wrapper
|
|
498
|
+
{
|
|
499
|
+
// display: flex;
|
|
500
|
+
justify-content: space-between;
|
|
501
|
+
.q-btn
|
|
502
|
+
{
|
|
503
|
+
background-color: #3887d1;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
.filters
|
|
507
|
+
{
|
|
508
|
+
display: flex;
|
|
509
|
+
margin-top: 20px;
|
|
510
|
+
grid-gap: 10px;
|
|
511
|
+
justify-content: flex-end;
|
|
512
|
+
}
|
|
513
|
+
.section-label
|
|
514
|
+
{
|
|
515
|
+
margin-top: 20px;
|
|
516
|
+
margin-bottom: 10px;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
.q-dialog
|
|
520
|
+
{
|
|
521
|
+
.user-verification-dialog-holder
|
|
522
|
+
{
|
|
523
|
+
display: grid;
|
|
524
|
+
place-items: center;
|
|
525
|
+
justify-content: center;
|
|
526
|
+
.full-width
|
|
527
|
+
{
|
|
528
|
+
max-width: 95vw;
|
|
529
|
+
width: 100% ;
|
|
530
|
+
// overflow: scroll;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
.member-card-wrapper
|
|
534
|
+
{
|
|
535
|
+
max-width: 500px;
|
|
536
|
+
.member-request-wrapper
|
|
537
|
+
{
|
|
538
|
+
.label
|
|
539
|
+
{
|
|
540
|
+
min-width: 150px;
|
|
541
|
+
font-weight: bold;
|
|
542
|
+
}
|
|
543
|
+
tr
|
|
544
|
+
{
|
|
545
|
+
display: flex;
|
|
546
|
+
align-items: flex-start;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
</style>
|
package/GHubPage.vue
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="g-main-hub-page" v-if="user_info.hasOwnProperty('hub') && user_info.hub === true">
|
|
3
|
+
<q-card class="hub-tab-wrapper">
|
|
4
|
+
<q-tabs
|
|
5
|
+
v-model="tab"
|
|
6
|
+
dense
|
|
7
|
+
class="text-grey"
|
|
8
|
+
active-color="primary"
|
|
9
|
+
indicator-color="primary"
|
|
10
|
+
align="justify"
|
|
11
|
+
narrow-indicator
|
|
12
|
+
>
|
|
13
|
+
<q-tab name="member_request" label="Request" />
|
|
14
|
+
<q-tab name="manage_collectors" label="Collectors" />
|
|
15
|
+
<q-tab name="manage_wallet" label="wallet" />
|
|
16
|
+
</q-tabs>
|
|
17
|
+
|
|
18
|
+
<q-separator />
|
|
19
|
+
|
|
20
|
+
<q-tab-panels v-model="tab" animated>
|
|
21
|
+
<q-tab-panel name="member_request">
|
|
22
|
+
<!-- <manage-hub-account /> -->
|
|
23
|
+
<member-request></member-request>
|
|
24
|
+
</q-tab-panel>
|
|
25
|
+
<q-tab-panel name="manage_collectors">
|
|
26
|
+
<manage-collectors />
|
|
27
|
+
</q-tab-panel>
|
|
28
|
+
<q-tab-panel name="manage_wallet">
|
|
29
|
+
<manage-wallet />
|
|
30
|
+
</q-tab-panel>
|
|
31
|
+
</q-tab-panels>
|
|
32
|
+
</q-card>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
<script>
|
|
36
|
+
import MemberRequest from "./components/HubPage/MemberRequest";
|
|
37
|
+
import ManageCollectors from "./components/HubPage/ManageCollectors";
|
|
38
|
+
import ManageWallet from "./components/HubPage/ManageWallet";
|
|
39
|
+
export default {
|
|
40
|
+
components: { MemberRequest, ManageCollectors, ManageWallet },
|
|
41
|
+
props:{},
|
|
42
|
+
data: () =>
|
|
43
|
+
({
|
|
44
|
+
tab: 'member_request',
|
|
45
|
+
}),
|
|
46
|
+
watch:{},
|
|
47
|
+
async mounted()
|
|
48
|
+
{
|
|
49
|
+
},
|
|
50
|
+
methods:
|
|
51
|
+
{
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</script>
|