geer-builder 1.2.912 → 1.2.913
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 +0 -42
- package/components/GProfile.vue +16 -1
- package/package.json +1 -1
package/GCheckout.vue
CHANGED
|
@@ -2426,14 +2426,6 @@ export default {
|
|
|
2426
2426
|
}
|
|
2427
2427
|
else
|
|
2428
2428
|
{
|
|
2429
|
-
// Check for renewal products before proceeding
|
|
2430
|
-
let proceed = await this.checkRenewalPrompt();
|
|
2431
|
-
if (!proceed)
|
|
2432
|
-
{
|
|
2433
|
-
this.$q.loading.hide();
|
|
2434
|
-
return;
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
2429
|
if(sessionStorage.referral_slot_code && this.payment_method.payment_method_id != "gc_points")
|
|
2438
2430
|
{
|
|
2439
2431
|
this.checkout_info.referral_slot_code = sessionStorage.referral_slot_code;
|
|
@@ -2540,40 +2532,6 @@ export default {
|
|
|
2540
2532
|
this.$q.dialog({ html: true, title: `Something's not quite right`, message: error.message });
|
|
2541
2533
|
}
|
|
2542
2534
|
},
|
|
2543
|
-
async checkRenewalPrompt()
|
|
2544
|
-
{
|
|
2545
|
-
// Check if any product in checkout is a renewal product and user has a slot
|
|
2546
|
-
if (!this.user_info || !this.user_info.active_slot) return true; // no slot, proceed normally
|
|
2547
|
-
|
|
2548
|
-
let renewal_products = [];
|
|
2549
|
-
if (this.checkout_info && this.checkout_info.product_list)
|
|
2550
|
-
{
|
|
2551
|
-
for (let p of this.checkout_info.product_list)
|
|
2552
|
-
{
|
|
2553
|
-
if (p.product && p.product.membership_kit && p.product.membership_kit.use_for_renew === true)
|
|
2554
|
-
{
|
|
2555
|
-
renewal_products.push(p);
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
if (renewal_products.length === 0) return true; // no renewal products, proceed
|
|
2561
|
-
|
|
2562
|
-
let product_names = renewal_products.map(p => `"${p.product.product_name}" (x${p.quantity})`).join(', ');
|
|
2563
|
-
|
|
2564
|
-
return new Promise((resolve) => {
|
|
2565
|
-
this.$q.dialog({
|
|
2566
|
-
title: 'Renewal Confirmation',
|
|
2567
|
-
message: `${product_names} will be used for renewal of your privilege card because you already have an activated slot. Proceed?`,
|
|
2568
|
-
cancel: true,
|
|
2569
|
-
persistent: true
|
|
2570
|
-
}).onOk(() => {
|
|
2571
|
-
resolve(true);
|
|
2572
|
-
}).onCancel(() => {
|
|
2573
|
-
resolve(false);
|
|
2574
|
-
});
|
|
2575
|
-
});
|
|
2576
|
-
},
|
|
2577
2535
|
showActivePayment()
|
|
2578
2536
|
{
|
|
2579
2537
|
if(this.product_list.length>0)
|
package/components/GProfile.vue
CHANGED
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
<div class="lab" v-if="is_company_success">Type of Enrollment</div>
|
|
53
53
|
<div class="lab" v-else>Membership</div>
|
|
54
54
|
</div>
|
|
55
|
+
<div class="group" v-if="expiration_date_display">
|
|
56
|
+
<div class="val">{{ expiration_date_display }}</div>
|
|
57
|
+
<div class="lab">Activated Till</div>
|
|
58
|
+
</div>
|
|
55
59
|
</div>
|
|
56
60
|
|
|
57
61
|
<div class="actions" :style="create_slot ? `grid-template-columns: 1fr 1fr 1fr;` : ``" v-if="prop_user_info.uid !== user_info.uid">
|
|
@@ -161,7 +165,18 @@ export default
|
|
|
161
165
|
this.$q.loading.hide();
|
|
162
166
|
}
|
|
163
167
|
},
|
|
164
|
-
computed: {
|
|
168
|
+
computed: {
|
|
169
|
+
expiration_date_display()
|
|
170
|
+
{
|
|
171
|
+
if (this.slot_info && this.slot_info.length > 0 && this.slot_info[0].expiration_date)
|
|
172
|
+
{
|
|
173
|
+
let ed = this.slot_info[0].expiration_date;
|
|
174
|
+
let date = new Date(ed.seconds ? ed.seconds * 1000 : ed);
|
|
175
|
+
return this.$_formatDate(date);
|
|
176
|
+
}
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
165
180
|
}
|
|
166
181
|
</script>
|
|
167
182
|
|