From 5e9e11a05e191de7c80858d615c70eec6d64ca59 Mon Sep 17 00:00:00 2001 From: The Nguyen <6950941+treoden@users.noreply.github.com> Date: Sat, 7 Oct 2023 20:56:38 +0700 Subject: [PATCH 1/2] Change toastify success background --- .../src/modules/cms/pages/admin/all/Notification.scss | 5 +++-- .../src/modules/cms/pages/frontStore/all/Notification.scss | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/evershop/src/modules/cms/pages/admin/all/Notification.scss b/packages/evershop/src/modules/cms/pages/admin/all/Notification.scss index 35da7faa7..53b422db5 100644 --- a/packages/evershop/src/modules/cms/pages/admin/all/Notification.scss +++ b/packages/evershop/src/modules/cms/pages/admin/all/Notification.scss @@ -62,7 +62,7 @@ box-sizing: border-box; margin-bottom: 1rem; padding: 8px; - border-radius: 1px; + border-radius: 5px; display: -ms-flexbox; display: flex; -ms-flex-pack: justify; @@ -85,7 +85,8 @@ background: #3498db; } .Toastify__toast--success { - background: #07bc0c; + background: var(--success); + color: #fff } .Toastify__toast--warning { background: #f1c40f; diff --git a/packages/evershop/src/modules/cms/pages/frontStore/all/Notification.scss b/packages/evershop/src/modules/cms/pages/frontStore/all/Notification.scss index 864e055ba..4c23225f7 100644 --- a/packages/evershop/src/modules/cms/pages/frontStore/all/Notification.scss +++ b/packages/evershop/src/modules/cms/pages/frontStore/all/Notification.scss @@ -63,7 +63,7 @@ box-sizing: border-box; margin-bottom: 1rem; padding: 8px; - border-radius: 1px; + border-radius: 5px; display: -ms-flexbox; display: flex; -ms-flex-pack: justify; @@ -86,7 +86,8 @@ background: #3498db; } .Toastify__toast--success { - background: #07bc0c; + background: var(--success); + color: #fff } .Toastify__toast--warning { background: #f1c40f; From c4b766a885e5a18c529b2e7b49e86cb3e724901d Mon Sep 17 00:00:00 2001 From: The Nguyen <6950941+treoden@users.noreply.github.com> Date: Sat, 7 Oct 2023 20:58:19 +0700 Subject: [PATCH 2/2] Address is displayed incorrectly in orders view in admin panel #347 --- .../customer/address/AddressSummary.jsx | 2 +- .../checkoutSuccess/CustomerInfo.jsx | 30 +++++++++----- .../oms/pages/admin/orderEdit/Customer.jsx | 41 ++++--------------- 3 files changed, 29 insertions(+), 44 deletions(-) rename packages/evershop/src/components/{frontStore => common}/customer/address/AddressSummary.jsx (98%) diff --git a/packages/evershop/src/components/frontStore/customer/address/AddressSummary.jsx b/packages/evershop/src/components/common/customer/address/AddressSummary.jsx similarity index 98% rename from packages/evershop/src/components/frontStore/customer/address/AddressSummary.jsx rename to packages/evershop/src/components/common/customer/address/AddressSummary.jsx index 739ceea23..012ce311d 100644 --- a/packages/evershop/src/components/frontStore/customer/address/AddressSummary.jsx +++ b/packages/evershop/src/components/common/customer/address/AddressSummary.jsx @@ -8,7 +8,7 @@ export function AddressSummary({ address }) { return ( -

+

-
- {_('Customer information')} -
-
+
-
{_('Contact information')}
+
+

{_('Contact information')}

+
+
+ {customerFullName || billingAddress?.fullName} +
{customerEmail}
-
{_('Shipping Address')}
+
+

{_('Shipping Address')}

+
-
+
-
{_('Payment Method')}
+
+

{_('Payment Method')}

+
{paymentMethodName}
-
{_('Billing Address')}
+
+

{_('Billing Address')}

+
diff --git a/packages/evershop/src/modules/oms/pages/admin/orderEdit/Customer.jsx b/packages/evershop/src/modules/oms/pages/admin/orderEdit/Customer.jsx index 286749983..f0fc12b57 100644 --- a/packages/evershop/src/modules/oms/pages/admin/orderEdit/Customer.jsx +++ b/packages/evershop/src/modules/oms/pages/admin/orderEdit/Customer.jsx @@ -1,8 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import { Card } from '@components/admin/cms/Card'; +import { AddressSummary } from '@components/common/customer/address/AddressSummary'; -export default function OrderInfo({ +export default function Customer({ order: { shippingAddress, billingAddress, @@ -35,44 +36,16 @@ export default function OrderInfo({
-
- {shippingAddress.fullName} -
-
- {shippingAddress.address1} -
-
- {`${shippingAddress.postcode}, ${shippingAddress.city}`} -
-
- {`${shippingAddress.province.name}, ${shippingAddress.country.name}`} -
-
- {shippingAddress.telephone} -
+
-
- {billingAddress.fullName} -
-
- {billingAddress.address1} -
-
- {`${billingAddress.postcode}, ${billingAddress.city}`} -
-
- {`${billingAddress.province.name}, ${billingAddress.country.name}`} -
-
- {billingAddress.telephone} -
+
); } -OrderInfo.propTypes = { +Customer.propTypes = { order: PropTypes.shape({ customerFullName: PropTypes.string.isRequired, customerEmail: PropTypes.string.isRequired, @@ -124,6 +97,8 @@ export const query = ` shippingAddress { fullName city + address1 + address2 postcode telephone province { @@ -138,6 +113,8 @@ export const query = ` billingAddress { fullName city + address1 + address2 postcode telephone province {