import React from 'react' import { Head, router } from '@inertiajs/react' import { HiChevronLeft } from 'react-icons/hi2' import CustomerLayout from '@/Layouts/CustomerLayout' import { PayButton } from './DetailPartials/PayButton' import { FormUploadManual } from './DetailPartials/FormUploadManual' import { FormUploadCashDeposit } from './DetailPartials/FormUploadCashDeposit' import { PAYMENT_CASH_DEPOSIT, PAYMENT_MANUAL, PAYMENT_MIDTRANS, STATUS_REJECT, STATUS_EXPIRED, } from '@/constant' const ActionSection = ({ deposit }) => { if (deposit.is_valid === STATUS_EXPIRED) { return (
Expired
) } if (deposit.is_valid === STATUS_REJECT) { return (
{deposit.note}
) } return (
{deposit.payment_channel === PAYMENT_MIDTRANS && } {deposit.payment_channel === PAYMENT_MANUAL && } {deposit.payment_channel === PAYMENT_CASH_DEPOSIT && ( )}
) } export default function Detail({ deposit }) { return (
{ router.get(route('transactions.deposit.index')) }} >
{/* detail */}
{deposit.description}
{deposit.amount}
{deposit.format_created_at}
{deposit.status.text}
{/* action */} {deposit.is_valid !== 0 && }
) }