2023-09-20 12:56:00 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { useBlockProps } from '@wordpress/block-editor';
|
|
|
|
import { Disabled } from '@wordpress/components';
|
|
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
import { formatPrice } from '@woocommerce/price-format';
|
|
|
|
import { date } from '@wordpress/date';
|
|
|
|
import { getSetting } from '@woocommerce/settings';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import './style.scss';
|
|
|
|
|
|
|
|
const Edit = (): JSX.Element => {
|
|
|
|
const blockProps = useBlockProps( {
|
|
|
|
className: 'wc-block-order-confirmation-summary',
|
|
|
|
} );
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div { ...blockProps }>
|
|
|
|
<Disabled>
|
|
|
|
<ul className="wc-block-order-confirmation-summary-list">
|
|
|
|
<li className="wc-block-order-confirmation-summary-list-item">
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__key">
|
2023-12-12 23:05:20 +00:00
|
|
|
{ __( 'Order number:', 'woocommerce' ) }
|
2023-09-20 12:56:00 +00:00
|
|
|
</span>{ ' ' }
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__value">
|
|
|
|
123
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li className="wc-block-order-confirmation-summary-list-item">
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__key">
|
2023-12-12 22:12:36 +00:00
|
|
|
{ __( 'Date:', 'woocommerce' ) }
|
2023-09-20 12:56:00 +00:00
|
|
|
</span>{ ' ' }
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__value">
|
|
|
|
{ date(
|
|
|
|
getSetting( 'dateFormat' ),
|
|
|
|
new Date(),
|
|
|
|
undefined
|
|
|
|
) }
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li className="wc-block-order-confirmation-summary-list-item">
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__key">
|
2023-12-12 22:12:36 +00:00
|
|
|
{ __( 'Total:', 'woocommerce' ) }
|
2023-09-20 12:56:00 +00:00
|
|
|
</span>{ ' ' }
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__value">
|
|
|
|
{ formatPrice( 4000 ) }
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li className="wc-block-order-confirmation-summary-list-item">
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__key">
|
2023-12-12 22:12:36 +00:00
|
|
|
{ __( 'Email:', 'woocommerce' ) }
|
2023-09-20 12:56:00 +00:00
|
|
|
</span>{ ' ' }
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__value">
|
|
|
|
test@test.com
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<li className="wc-block-order-confirmation-summary-list-item">
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__key">
|
2023-12-12 23:05:20 +00:00
|
|
|
{ __( 'Payment method:', 'woocommerce' ) }
|
2023-09-20 12:56:00 +00:00
|
|
|
</span>{ ' ' }
|
|
|
|
<span className="wc-block-order-confirmation-summary-list-item__value">
|
2023-12-12 23:05:20 +00:00
|
|
|
{ __( 'Credit Card', 'woocommerce' ) }
|
2023-09-20 12:56:00 +00:00
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</Disabled>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Edit;
|