geer-builder 1.2.955 → 1.2.957

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.
@@ -40,13 +40,19 @@
40
40
  <q-img :src="qr_image"></q-img>
41
41
  </q-avatar>
42
42
  <div>Payment: <b>{{this.order_info.payment_method.manual_pay_choice.bank_label}}</b></div>
43
- <div>Account Name: <b>{{this.order_info.payment_method.manual_pay_choice.account_name}}</b></div>
44
- <div>Account Number: <b>{{this.order_info.payment_method.manual_pay_choice.account_number}}</b></div>
45
43
  <template v-if="resolved_additional_accounts.length > 0">
46
- <div v-for="(extra, idx) in resolved_additional_accounts" :key="idx" style="margin-top:5px;">
47
- <div>Account Name: <b>{{extra.account_name}}</b></div>
48
- <div>Account Number: <b>{{extra.account_number}}</b></div>
49
- </div>
44
+ <div class="q-mt-sm" style="font-weight:600;">Select an account to pay:</div>
45
+ <q-option-group
46
+ v-model="selected_account_number"
47
+ :options="all_account_options"
48
+ type="radio"
49
+ dense
50
+ class="q-mt-xs"
51
+ ></q-option-group>
52
+ </template>
53
+ <template v-else>
54
+ <div>Account Name: <b>{{this.order_info.payment_method.manual_pay_choice.account_name}}</b></div>
55
+ <div>Account Number: <b>{{this.order_info.payment_method.manual_pay_choice.account_number}}</b></div>
50
56
  </template>
51
57
  <div>Order Total: <b>{{ public_settings.main_currency }} {{$_formatNumber(this.order_info.orders.order_total, { decimal: 2})}} {{ public_settings.hasOwnProperty('adspro_cashin_conversion_rate') ? `(PHP ${this.order_info.orders.order_total * public_settings.adspro_cashin_conversion_rate})` : '' }}</b></div>
52
58
  </div>
@@ -77,6 +83,7 @@ export default {
77
83
  order_info: {},
78
84
  payment_account_list: [],
79
85
  slot_code: "",
86
+ selected_account_number: "",
80
87
  is_qr_enable: false,
81
88
  qr_image_settings: "",
82
89
  qr_image: "",
@@ -152,6 +159,43 @@ export default {
152
159
  seen[acc.account_number] = true;
153
160
  return true;
154
161
  });
162
+ },
163
+ all_account_options()
164
+ {
165
+ var choice = this.order_info && this.order_info.payment_method
166
+ ? this.order_info.payment_method.manual_pay_choice
167
+ : null;
168
+ if (!choice) return [];
169
+
170
+ var options = [
171
+ { label: choice.account_name + ' - ' + choice.account_number, value: choice.account_number, account: choice }
172
+ ];
173
+ var self = this;
174
+ self.resolved_additional_accounts.forEach(function(acc) {
175
+ options.push({ label: acc.account_name + ' - ' + acc.account_number, value: acc.account_number, account: acc });
176
+ });
177
+ return options;
178
+ },
179
+ selected_account_detail()
180
+ {
181
+ if (!this.selected_account_number) return null;
182
+ var found = this.all_account_options.find(function(opt) {
183
+ return opt.value === this.selected_account_number;
184
+ }.bind(this));
185
+ return found ? found.account : null;
186
+ }
187
+ },
188
+ watch:
189
+ {
190
+ 'order_info.payment_method': {
191
+ handler(val)
192
+ {
193
+ if (val && val.manual_pay_choice && !this.selected_account_number)
194
+ {
195
+ this.selected_account_number = val.manual_pay_choice.account_number;
196
+ }
197
+ },
198
+ immediate: true
155
199
  }
156
200
  },
157
201
  methods:
@@ -182,15 +226,29 @@ export default {
182
226
  this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Please enter a reference number." });
183
227
  return;
184
228
  }
229
+ if(this.resolved_additional_accounts.length > 0 && !this.selected_account_number)
230
+ {
231
+ this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Please select an account to pay." });
232
+ return;
233
+ }
185
234
  if(this.proof_of_payment.length>0)
186
235
  {
187
236
  try
188
237
  {
189
238
  let order_det = Object.assign({}, this.order_info);
239
+ if(this.selected_account_detail)
240
+ {
241
+ order_det.payment_method = Object.assign({}, order_det.payment_method);
242
+ order_det.payment_method.manual_pay_choice = Object.assign({}, order_det.payment_method.manual_pay_choice, {
243
+ account_name: this.selected_account_detail.account_name,
244
+ account_number: this.selected_account_detail.account_number
245
+ });
246
+ }
190
247
  order_det.proof_of_payment = {};
191
248
  order_det.proof_of_payment.pictures = this.proof_of_payment;
192
249
  order_det.proof_of_payment.reference_number = this.reference_number.trim();
193
250
  this.$q.loading.show();
251
+
194
252
  await this.$_fbCall('memberUploadProofOfPayment', order_det);
195
253
  sessionStorage.removeItem("order_id");
196
254
  this.order_id = "";
package/GProductPage.vue CHANGED
@@ -225,7 +225,8 @@
225
225
 
226
226
  </div>
227
227
  </div>
228
- <div v-if="!show_only">
228
+ <slot name="before-tabs"></slot>
229
+ <div v-if="!show_only">
229
230
  <div style="width:300px">
230
231
  <q-tabs v-if="is_done" v-model="tab" dense class="text-grey" active-color="primary" indicator-color="primary" align="justify" narrow-indicator >
231
232
  <q-tab no-caps name="description" label="Description" />
@@ -374,6 +375,7 @@
374
375
  </q-tab-panel>
375
376
  </q-tab-panels>
376
377
  </div>
378
+ <slot name="after-tabs"></slot>
377
379
  <q-dialog v-model="is_select_branch_dialog">
378
380
  <choose-branch-dialog :product_id="variant_product_details ? variant_product_details.product_id : product_details.product_id" @chooseBranch="selectBranch" @outOfStock="outOfStock"></choose-branch-dialog>
379
381
  </q-dialog>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.955",
3
+ "version": "1.2.957",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {