import { formatIDR } from '@/utils' import { router } from '@inertiajs/react' import { HiMinusCircle, HiPlusCircle, HiTrash } from 'react-icons/hi2' export default function VoucherCard({ item: { location_profile, quantity } }) { const handleDelete = () => { router.post( route('cart.store', { profile: location_profile, param: 'delete' }) ) } const handleAdd = () => { router.post( route('cart.store', { profile: location_profile, param: 'add' }) ) } const handleSub = () => { router.post( route('cart.store', { profile: location_profile, param: 'sub' }) ) } return (
{location_profile.location.name}
{location_profile.display_note}
Rp {formatIDR(location_profile.validate_price)}
{+location_profile.discount !== 0 && (
{location_profile.discount}%
{formatIDR( location_profile.validate_display_price )}
)}
{location_profile.quota}
{location_profile.display_expired}
{quantity}
) }