fix filter

dev
Aji Kamaludin 1 year ago
parent 9520f6e021
commit 981ca734c0
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -1,6 +1,6 @@
import React from 'react'
import { Head, router } from '@inertiajs/react'
import { HiChevronLeft } from 'react-icons/hi2'
import { HiChevronLeft, HiClipboardDocumentList } from 'react-icons/hi2'
import CustomerLayout from '@/Layouts/CustomerLayout'
import { PayButton } from './DetailPartials/PayButton'
@ -13,6 +13,7 @@ import {
STATUS_REJECT,
STATUS_EXPIRED,
} from '@/constant'
import { handleCopyToClipboard } from '../utils'
const ActionSection = ({ deposit }) => {
if (deposit.is_valid === STATUS_EXPIRED) {
@ -67,8 +68,16 @@ export default function Detail({ deposit }) {
{/* detail */}
<div className="flex flex-row items-center pb-5 border-b px-5">
<div className="w-full">
<div className="font-semibold text-xl text-gray-400">
{deposit.description}
<div
className="font-semibold text-xl text-gray-400 flex flex-row items-center w-full"
onClick={() =>
handleCopyToClipboard(deposit.description)
}
>
<div>{deposit.description}</div>
<div className="pl-3 text-gray-400">
<HiClipboardDocumentList />
</div>
</div>
<div className="font-bold text-3xl">
{deposit.amount}

@ -47,7 +47,7 @@ export const FormUploadCashDeposit = () => {
onSuccess: () =>
setTimeout(
() => router.get(route(route().current(), deposit)),
3000
500
),
})
}

@ -47,7 +47,7 @@ export const FormUploadManual = () => {
onSuccess: () =>
setTimeout(
() => router.get(route(route().current(), deposit)),
3000
500
),
})
}

@ -1,13 +1,14 @@
import React from 'react'
import { Head, router } from '@inertiajs/react'
import { HiChevronLeft } from 'react-icons/hi2'
import { HiChevronLeft, HiClipboardDocumentList } from 'react-icons/hi2'
import CustomerLayout from '@/Layouts/CustomerLayout'
import { handleCopyToClipboard } from '@/Customer/utils'
export default function Detail({ poin }) {
return (
<CustomerLayout>
<Head title="poin" />
<Head title="Poin" />
<div className="flex flex-col min-h-[calc(95dvh)]">
<div
className="w-full px-5 py-5"
@ -19,16 +20,20 @@ export default function Detail({ poin }) {
</div>
{/* detail */}
<div className="flex flex-row justify-between items-center pb-5 border-b px-5">
<div>
<div className="font-semibold text-xl text-gray-400">
{poin.description}
</div>
<div className="font-bold text-3xl">{poin.amount}</div>
<div className="text-gray-400">
{poin.format_created_at}
<div className="w-full flex flex-col justify-between pb-5 border-b px-5">
<div
className="font-semibold text-xl text-gray-400 flex flex-row items-center w-full"
onClick={() => handleCopyToClipboard(poin.description)}
>
<div>{poin.description}</div>
<div className="pl-3">
<HiClipboardDocumentList />
</div>
</div>
<div className="font-bold text-3xl">{poin.amount} poin</div>
<div className="text-gray-400">
{poin.format_created_at}
</div>
</div>
<div className="w-full px-5">
<div className="my-5">

@ -5,6 +5,7 @@ import { usePrevious } from 'react-use'
import { formatIDDate } from '@/utils'
import CustomerLayout from '@/Layouts/CustomerLayout'
import HeaderTrx from '../Components/HeaderTrx'
import { isEmpty } from 'lodash'
const EmptyHere = () => {
return (
@ -104,7 +105,7 @@ export default function Index(props) {
</div>
<div className="flex flex-col items-end">
<div className="font-bold text-lg">
{poin.amount}
{poin.amount} poin
</div>
</div>
</div>

@ -2,8 +2,8 @@ import React from 'react'
import { Head, router } from '@inertiajs/react'
import CustomerLayout from '@/Layouts/CustomerLayout'
import VoucherCard from './VoucherCard'
import { HiChevronLeft } from 'react-icons/hi2'
import { convertPayedWith } from '../utils'
import { HiChevronLeft, HiClipboardDocumentList } from 'react-icons/hi2'
import { convertPayedWith, handleCopyToClipboard } from '../utils'
export default function Detail({ sale }) {
return (
@ -18,8 +18,18 @@ export default function Detail({ sale }) {
>
<HiChevronLeft className="font-bold h-5 w-5" />
</div>
<div className="text-2xl px-5 font-bold">{sale.code}</div>
<div className="px-5">{sale.format_created_at}</div>
<div
className=" text-2xl px-5 font-bold flex flex-row items-center w-full"
onClick={() => handleCopyToClipboard(sale.code)}
>
<div>{sale.code}</div>
<div className="pl-3 text-gray-400">
<HiClipboardDocumentList />
</div>
</div>
<div className="px-5 text-gray-400">
{sale.format_created_at}
</div>
<div className="px-5 pb-4 w-full">
<div className="text-xl font-bold text-right flex flex-row justify-between">
<div className="flex flex-col items-start">

@ -5,6 +5,7 @@ import { Head, router } from '@inertiajs/react'
import { formatIDDate } from '@/utils'
import CustomerLayout from '@/Layouts/CustomerLayout'
import HeaderTrx from '../Components/HeaderTrx'
import { isEmpty } from 'lodash'
const EmptyHere = () => {
return (

@ -17,6 +17,11 @@ export const toastError = (message) => {
})
}
export const handleCopyToClipboard = (text) => {
toastSuccess('copied to clipboard')
navigator.clipboard.writeText(text)
}
export const convertPayedWith = (payed_with) => {
const payedWith = [
{

Loading…
Cancel
Save