diff options
Diffstat (limited to 'src/components/transactions/TransactionStatusBadge.js')
| -rw-r--r-- | src/components/transactions/TransactionStatusBadge.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/components/transactions/TransactionStatusBadge.js b/src/components/transactions/TransactionStatusBadge.js new file mode 100644 index 00000000..588542fe --- /dev/null +++ b/src/components/transactions/TransactionStatusBadge.js @@ -0,0 +1,41 @@ +const TransactionStatusBadge = ({ status }) => { + let badgeProps = { + className: ['h-fit'], + text: '' + }; + switch (status) { + case 'cancel': + badgeProps.className.push('badge-red'); + badgeProps.text = 'Batal' + break; + case 'draft': + badgeProps.className.push('badge-gray'); + badgeProps.text = 'Pending Quotation' + break; + case 'waiting': + badgeProps.className.push('badge-yellow'); + badgeProps.text = 'Menunggu Konfirmasi' + break; + case 'sale': + badgeProps.className.push('badge-blue'); + badgeProps.text = 'Pesanan Diproses' + break; + case 'shipping': + badgeProps.className.push('badge-blue'); + badgeProps.text = 'Pesanan Dikirim' + break; + case 'done': + badgeProps.className.push('badge-green'); + badgeProps.text = 'Selesai' + break; + } + badgeProps.className = badgeProps.className.join(' '); + + return ( + <div className={badgeProps.className}> + { badgeProps.text } + </div> + ) +}; + +export default TransactionStatusBadge;
\ No newline at end of file |
