create-brainerce-store 1.5.3 → 1.5.4
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/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var require_package = __commonJS({
|
|
|
31
31
|
"package.json"(exports2, module2) {
|
|
32
32
|
module2.exports = {
|
|
33
33
|
name: "create-brainerce-store",
|
|
34
|
-
version: "1.5.
|
|
34
|
+
version: "1.5.4",
|
|
35
35
|
description: "Scaffold a production-ready e-commerce storefront connected to Brainerce",
|
|
36
36
|
bin: {
|
|
37
37
|
"create-brainerce-store": "dist/index.js"
|
package/messages/en.json
CHANGED
package/messages/he.json
CHANGED
package/package.json
CHANGED
|
@@ -573,14 +573,42 @@ function CheckoutContent() {
|
|
|
573
573
|
</span>
|
|
574
574
|
</div>
|
|
575
575
|
|
|
576
|
-
{
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
576
|
+
{(() => {
|
|
577
|
+
const totalDiscount = parseFloat(checkout.discountAmount);
|
|
578
|
+
const ruleAmt = parseFloat(checkout.ruleDiscountAmount || '0');
|
|
579
|
+
const couponAmt = totalDiscount - ruleAmt;
|
|
580
|
+
if (totalDiscount <= 0) return null;
|
|
581
|
+
return (
|
|
582
|
+
<>
|
|
583
|
+
{ruleAmt > 0 && (
|
|
584
|
+
<div className="flex items-center justify-between">
|
|
585
|
+
<span className="text-muted-foreground">{tc('generalDiscount')}</span>
|
|
586
|
+
<span className="text-destructive">
|
|
587
|
+
-{formatPrice(ruleAmt, { currency }) as string}
|
|
588
|
+
</span>
|
|
589
|
+
</div>
|
|
590
|
+
)}
|
|
591
|
+
{checkout.couponCode && couponAmt > 0 && (
|
|
592
|
+
<div className="flex items-center justify-between">
|
|
593
|
+
<span className="text-muted-foreground">
|
|
594
|
+
{tc('couponDiscount')} ({checkout.couponCode})
|
|
595
|
+
</span>
|
|
596
|
+
<span className="text-destructive">
|
|
597
|
+
-{formatPrice(couponAmt, { currency }) as string}
|
|
598
|
+
</span>
|
|
599
|
+
</div>
|
|
600
|
+
)}
|
|
601
|
+
{!checkout.couponCode && ruleAmt <= 0 && (
|
|
602
|
+
<div className="flex items-center justify-between">
|
|
603
|
+
<span className="text-muted-foreground">{tc('discount')}</span>
|
|
604
|
+
<span className="text-destructive">
|
|
605
|
+
-{formatPrice(totalDiscount, { currency }) as string}
|
|
606
|
+
</span>
|
|
607
|
+
</div>
|
|
608
|
+
)}
|
|
609
|
+
</>
|
|
610
|
+
);
|
|
611
|
+
})()}
|
|
584
612
|
|
|
585
613
|
{(parseFloat(checkout.shippingAmount) > 0 ||
|
|
586
614
|
checkout.deliveryType === 'pickup') && (
|