From ebc09c5062cc7996b0f2aaf879062fc950c2e1c2 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 25 Jan 2023 11:17:37 +0700 Subject: Transaction detail and variant card component --- src/components/transactions/TransactionDetail.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/components/transactions/TransactionDetail.js (limited to 'src/components/transactions/TransactionDetail.js') diff --git a/src/components/transactions/TransactionDetail.js b/src/components/transactions/TransactionDetail.js new file mode 100644 index 00000000..6d304d31 --- /dev/null +++ b/src/components/transactions/TransactionDetail.js @@ -0,0 +1,21 @@ +import DescriptionRow from "../elements/DescriptionRow"; + +const CustomerSection = ({ address }) => { + const fullAddress = []; + if (address?.street) fullAddress.push(address.street); + if (address?.sub_district?.name) fullAddress.push(address.sub_district.name); + if (address?.district?.name) fullAddress.push(address.district.name); + if (address?.city?.name) fullAddress.push(address.city.name); + return ( +
+ { address?.name } + { address?.email || '-' } + { address?.mobile || '-' } + { fullAddress.join(', ') } +
+ ); +}; + +export { + CustomerSection +}; \ No newline at end of file -- cgit v1.2.3