Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #355

Merged
merged 2 commits into from
Oct 7, 2023
Merged

Dev #355

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function AddressSummary({ address }) {
return (
<Area
id="addressSummary"
className="address-summary"
className="address__summary"
coreComponents={[
{
component: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import Button from '@components/common/form/Button';
import { AddressSummary } from '@components/frontStore/customer/address/AddressSummary';
import { AddressSummary } from '@components/common/customer/address/AddressSummary';
import { _ } from '@evershop/evershop/src/lib/locale/translate';

export default function CustomerInfo({
Expand All @@ -16,7 +16,7 @@ export default function CustomerInfo({
}) {
return (
<div className="checkout-success-customer-info">
<h3 className="thank-you flex justify-start space-x-1">
<h3 className="thank-you flex justify-start space-x-2">
<div className="check flex justify-center self-center text-interactive">
<svg
style={{ width: '3rem', height: '3rem' }}
Expand Down Expand Up @@ -47,29 +47,37 @@ export default function CustomerInfo({
</h3>

<div className="customer-info mt-3 mb-2">
<div className="heading font-bold mb-2">
{_('Customer information')}
</div>
<div className="grid grid-cols-2 gap-3">
<div>
<div className="grid grid-cols-1 gap-3">
<div className="mb-2">
<div className="mb-075">{_('Contact information')}</div>
<div className="mb-075">
<h3>{_('Contact information')}</h3>
</div>
<div className="text-textSubdued">
{customerFullName || billingAddress?.fullName}
</div>
<div className="text-textSubdued">{customerEmail}</div>
</div>
<div>
<div className="mb-075">{_('Shipping Address')}</div>
<div className="mb-075">
<h3>{_('Shipping Address')}</h3>
</div>
<div className="text-textSubdued">
<AddressSummary address={shippingAddress} />
</div>
</div>
</div>
<div>
<div className="grid grid-cols-1 gap-3">
<div className="mb-2">
<div className="mb-075">{_('Payment Method')}</div>
<div className="mb-075">
<h3>{_('Payment Method')}</h3>
</div>
<div className="text-textSubdued">{paymentMethodName}</div>
</div>
<div>
<div className="mb-075">{_('Billing Address')}</div>
<div className="mb-075">
<h3>{_('Billing Address')}</h3>
</div>
<div className="text-textSubdued">
<AddressSummary address={billingAddress} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -85,7 +85,8 @@
background: #3498db;
}
.Toastify__toast--success {
background: #07bc0c;
background: var(--success);
color: #fff
}
.Toastify__toast--warning {
background: #f1c40f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -86,7 +86,8 @@
background: #3498db;
}
.Toastify__toast--success {
background: #07bc0c;
background: var(--success);
color: #fff
}
.Toastify__toast--warning {
background: #f1c40f;
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -35,44 +36,16 @@ export default function OrderInfo({
</div>
</Card.Session>
<Card.Session title="Shipping Address">
<div>
<span>{shippingAddress.fullName}</span>
</div>
<div>
<span>{shippingAddress.address1}</span>
</div>
<div>
<span>{`${shippingAddress.postcode}, ${shippingAddress.city}`}</span>
</div>
<div>
<span>{`${shippingAddress.province.name}, ${shippingAddress.country.name}`}</span>
</div>
<div>
<span>{shippingAddress.telephone}</span>
</div>
<AddressSummary address={shippingAddress} />
</Card.Session>
<Card.Session title="Billing address">
<div>
<span>{billingAddress.fullName}</span>
</div>
<div>
<span>{billingAddress.address1}</span>
</div>
<div>
<span>{`${billingAddress.postcode}, ${billingAddress.city}`}</span>
</div>
<div>
<span>{`${billingAddress.province.name}, ${billingAddress.country.name}`}</span>
</div>
<div>
<span>{billingAddress.telephone}</span>
</div>
<AddressSummary address={billingAddress} />
</Card.Session>
</Card>
);
}

OrderInfo.propTypes = {
Customer.propTypes = {
order: PropTypes.shape({
customerFullName: PropTypes.string.isRequired,
customerEmail: PropTypes.string.isRequired,
Expand Down Expand Up @@ -124,6 +97,8 @@ export const query = `
shippingAddress {
fullName
city
address1
address2
postcode
telephone
province {
Expand All @@ -138,6 +113,8 @@ export const query = `
billingAddress {
fullName
city
address1
address2
postcode
telephone
province {
Expand Down
Loading