diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-25 11:17:37 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-25 11:17:37 +0700 |
| commit | ebc09c5062cc7996b0f2aaf879062fc950c2e1c2 (patch) | |
| tree | 3b031b68afa9aaaca156986382670490c32f0e18 /src/components/transactions | |
| parent | ee4297280c1305c7e03bedd4df63ccf136c28c6c (diff) | |
Transaction detail and variant card component
Diffstat (limited to 'src/components/transactions')
| -rw-r--r-- | src/components/transactions/TransactionDetail.js | 21 |
1 files changed, 21 insertions, 0 deletions
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 ( + <div className="px-4 pb-4 flex flex-col gap-y-4"> + <DescriptionRow label="Nama">{ address?.name }</DescriptionRow> + <DescriptionRow label="Email">{ address?.email || '-' }</DescriptionRow> + <DescriptionRow label="No Telepon">{ address?.mobile || '-' }</DescriptionRow> + <DescriptionRow label="Alamat">{ fullAddress.join(', ') }</DescriptionRow> + </div> + ); +}; + +export { + CustomerSection +};
\ No newline at end of file |
