geer-builder 1.2.930 → 1.2.931
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/GCheckout.vue +100 -61
- package/GProcessSale.vue +1 -1
- package/package.json +1 -1
package/GCheckout.vue
CHANGED
|
@@ -2437,73 +2437,47 @@ export default {
|
|
|
2437
2437
|
{
|
|
2438
2438
|
this.checkout_info.reseller_slot_code = sessionStorage.reseller_slot_code;
|
|
2439
2439
|
}
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
}
|
|
2445
|
-
else if(this.checkout_info.payment_method.payment_method_id == "gc_points")
|
|
2446
|
-
{
|
|
2447
|
-
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2448
|
-
this.is_dialog_confirm_open = true;
|
|
2449
|
-
}
|
|
2450
|
-
else if (this.checkout_info.payment_method.payment_method_id == "manual_pay")
|
|
2451
|
-
{
|
|
2452
|
-
if(!this.manual_pay_choice)
|
|
2453
|
-
{
|
|
2454
|
-
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Invalid Payment Method" });
|
|
2455
|
-
}
|
|
2456
|
-
else
|
|
2457
|
-
{
|
|
2458
|
-
this.checkout_info.payment_method.manual_pay_choice = this.manual_pay_choice;
|
|
2459
|
-
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2460
|
-
this.is_dialog_confirm_open = true;
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
}
|
|
2464
|
-
else if (this.checkout_info.payment_method.payment_method_id == "online_payment")
|
|
2465
|
-
{
|
|
2466
|
-
if(!this.online_payment_choice)
|
|
2467
|
-
{
|
|
2468
|
-
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Invalid Payment Method" });
|
|
2469
|
-
}
|
|
2470
|
-
else
|
|
2471
|
-
{
|
|
2472
|
-
this.checkout_info.payment_method.online_payment_choice = this.online_payment_choice;
|
|
2473
|
-
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2474
|
-
this.is_dialog_confirm_open = true;
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
else if (this.checkout_info.payment_method.payment_method_id == "cod")
|
|
2478
|
-
{
|
|
2479
|
-
// this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2480
|
-
// console.log(this.sale_id.data);
|
|
2481
|
-
// alert("Invoice Number : "+this.sale_id.data.invoice_no)
|
|
2482
|
-
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2483
|
-
this.is_dialog_confirm_open = true;
|
|
2484
|
-
}
|
|
2485
|
-
else if (this.checkout_info.payment_method.payment_method_id == "dragon_pay")
|
|
2440
|
+
|
|
2441
|
+
// Check for renewal products only if slot_expiration is enabled (0 extra reads)
|
|
2442
|
+
let slot_expiration_enabled = this.public_settings.slot_expiration && this.public_settings.slot_expiration.enable;
|
|
2443
|
+
if (slot_expiration_enabled)
|
|
2486
2444
|
{
|
|
2487
|
-
|
|
2445
|
+
let renewal_names = [];
|
|
2446
|
+
for (let p of this.product_list)
|
|
2488
2447
|
{
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Invalid Dragon payment Method" });
|
|
2448
|
+
if (p.product && p.product.membership_kit
|
|
2449
|
+
&& (p.product.membership_kit.use_for_renew === true || p.product.membership_kit.use_for_renew === 'Yes'))
|
|
2450
|
+
{
|
|
2451
|
+
renewal_names.push(p.product.product_name);
|
|
2452
|
+
}
|
|
2495
2453
|
}
|
|
2496
|
-
|
|
2454
|
+
|
|
2455
|
+
if (renewal_names.length > 0 && (this.user_info.slot_owned > 0 || this.user_info.active_slot))
|
|
2497
2456
|
{
|
|
2498
|
-
|
|
2499
|
-
this.
|
|
2457
|
+
let is_expired = false;
|
|
2458
|
+
if (this.current_slot_info)
|
|
2459
|
+
{
|
|
2460
|
+
let exp_result = this.$_checkSlotExpirationLocal(this.current_slot_info, this.public_settings);
|
|
2461
|
+
is_expired = exp_result.expiration_enabled && exp_result.is_expired;
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
let action = is_expired ? 'reactivate' : 'extend';
|
|
2465
|
+
this.$q.loading.hide();
|
|
2466
|
+
this.$q.dialog({
|
|
2467
|
+
title: 'Renewal Product Detected',
|
|
2468
|
+
message: `${renewal_names.join(', ')} is a renewal product. This product will ${action} your privilege card once the order is processed.`,
|
|
2469
|
+
cancel: true,
|
|
2470
|
+
persistent: true
|
|
2471
|
+
}).onOk(async () => {
|
|
2472
|
+
this.$q.loading.show();
|
|
2473
|
+
await this.executeProceedCheckout();
|
|
2474
|
+
this.$q.loading.hide();
|
|
2475
|
+
});
|
|
2476
|
+
return;
|
|
2500
2477
|
}
|
|
2501
2478
|
}
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2505
|
-
this.is_dialog_confirm_open = true;
|
|
2506
|
-
}
|
|
2479
|
+
|
|
2480
|
+
await this.executeProceedCheckout();
|
|
2507
2481
|
}
|
|
2508
2482
|
// console.log(this.checkout_details);
|
|
2509
2483
|
this.$q.loading.hide();
|
|
@@ -2535,6 +2509,71 @@ export default {
|
|
|
2535
2509
|
this.$q.dialog({ html: true, title: `Something's not quite right`, message: error.message });
|
|
2536
2510
|
}
|
|
2537
2511
|
},
|
|
2512
|
+
async executeProceedCheckout()
|
|
2513
|
+
{
|
|
2514
|
+
if(this.checkout_info.payment_method.payment_method_id == "wallet")
|
|
2515
|
+
{
|
|
2516
|
+
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2517
|
+
this.is_dialog_confirm_open = true;
|
|
2518
|
+
}
|
|
2519
|
+
else if(this.checkout_info.payment_method.payment_method_id == "gc_points")
|
|
2520
|
+
{
|
|
2521
|
+
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2522
|
+
this.is_dialog_confirm_open = true;
|
|
2523
|
+
}
|
|
2524
|
+
else if (this.checkout_info.payment_method.payment_method_id == "manual_pay")
|
|
2525
|
+
{
|
|
2526
|
+
if(!this.manual_pay_choice)
|
|
2527
|
+
{
|
|
2528
|
+
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Invalid Payment Method" });
|
|
2529
|
+
}
|
|
2530
|
+
else
|
|
2531
|
+
{
|
|
2532
|
+
this.checkout_info.payment_method.manual_pay_choice = this.manual_pay_choice;
|
|
2533
|
+
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2534
|
+
this.is_dialog_confirm_open = true;
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
else if (this.checkout_info.payment_method.payment_method_id == "online_payment")
|
|
2538
|
+
{
|
|
2539
|
+
if(!this.online_payment_choice)
|
|
2540
|
+
{
|
|
2541
|
+
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Invalid Payment Method" });
|
|
2542
|
+
}
|
|
2543
|
+
else
|
|
2544
|
+
{
|
|
2545
|
+
this.checkout_info.payment_method.online_payment_choice = this.online_payment_choice;
|
|
2546
|
+
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2547
|
+
this.is_dialog_confirm_open = true;
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
else if (this.checkout_info.payment_method.payment_method_id == "cod")
|
|
2551
|
+
{
|
|
2552
|
+
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2553
|
+
this.is_dialog_confirm_open = true;
|
|
2554
|
+
}
|
|
2555
|
+
else if (this.checkout_info.payment_method.payment_method_id == "dragon_pay")
|
|
2556
|
+
{
|
|
2557
|
+
if(this.public_settings.hasOwnProperty('dragonpay_details') && !this.public_settings.dragonpay_details.show_active_payment)
|
|
2558
|
+
{
|
|
2559
|
+
this.dragon_pay_choice = this.public_settings.dragonpay_details ? this.public_settings.dragonpay_details.mode : 1;
|
|
2560
|
+
}
|
|
2561
|
+
if(!this.dragon_pay_choice)
|
|
2562
|
+
{
|
|
2563
|
+
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Invalid Dragon payment Method" });
|
|
2564
|
+
}
|
|
2565
|
+
else
|
|
2566
|
+
{
|
|
2567
|
+
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2568
|
+
this.is_dialog_confirm_open = true;
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
else if (this.checkout_info.payment_method.payment_method_id == "cod_manual")
|
|
2572
|
+
{
|
|
2573
|
+
this.sale_id = await this.$_fbCall('memberProceedCheckout', this.checkout_info)
|
|
2574
|
+
this.is_dialog_confirm_open = true;
|
|
2575
|
+
}
|
|
2576
|
+
},
|
|
2538
2577
|
showActivePayment()
|
|
2539
2578
|
{
|
|
2540
2579
|
if(this.product_list.length>0)
|
package/GProcessSale.vue
CHANGED
|
@@ -801,7 +801,7 @@ export default
|
|
|
801
801
|
{
|
|
802
802
|
this.$q.dialog({
|
|
803
803
|
title: 'Renewal Product Detected',
|
|
804
|
-
message: `${renewal_names.join(', ')} is a renewal product. No membership code will be generated — this product will renew the customer's privilege card
|
|
804
|
+
message: `${renewal_names.join(', ')} is a renewal product. No membership code will be generated — this product will renew the customer's privilege card once the order is processed.`,
|
|
805
805
|
persistent: true
|
|
806
806
|
}).onDismiss(() => {
|
|
807
807
|
this.is_dialog_confirm_open = true;
|