You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.7 KiB
React
39 lines
1.7 KiB
React
1 year ago
|
import { formatIDR } from '@/utils'
|
||
1 year ago
|
import { router } from '@inertiajs/react'
|
||
1 year ago
|
import { isEmpty } from 'lodash'
|
||
1 year ago
|
import { HiOutlineCash } from 'react-icons/hi'
|
||
|
|
||
|
export default function BalanceBanner({ user }) {
|
||
|
return (
|
||
|
<div
|
||
|
className="flex flex-row px-5 pb-3 text-base bg-blue-600"
|
||
|
onClick={() => router.get(route('customer.deposit.index'))}
|
||
|
>
|
||
|
<div className="flex flex-row w-full shadow py-2 px-2 rounded bg-white items-center justify-between">
|
||
|
<div className="flex flex-col">
|
||
|
<div className="text-xs flex flex-row items-center space-x-1 text-gray-400">
|
||
|
<HiOutlineCash />
|
||
|
<div>Saldo</div>
|
||
|
</div>
|
||
|
<div className="font-bold">Rp {user.display_deposit}</div>
|
||
|
<div className="text-xs flex flex-row items-center space-x-1 text-gray-400">
|
||
1 year ago
|
<div>poin {user.display_poin}</div>
|
||
1 year ago
|
</div>
|
||
|
</div>
|
||
|
<div className="flex flex-col border-l-2 pl-5 pr-5">
|
||
|
<div className="text-xs flex flex-row items-center space-x-1 text-gray-400">
|
||
|
{/* <HiOutlineAwa /> */}
|
||
|
<div>Rewards</div>
|
||
|
</div>
|
||
1 year ago
|
<div className="font-bold">{user.level.name}</div>
|
||
1 year ago
|
<div className="text-xs flex flex-row items-center space-x-1 text-gray-400">
|
||
1 year ago
|
{user.paylater_limit !== '' && (
|
||
|
<div>Limit : {formatIDR(user.paylater_limit)}</div>
|
||
|
)}
|
||
1 year ago
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
)
|
||
|
}
|