- {deposit.description}
+
+ handleCopyToClipboard(deposit.description)
+ }
+ >
+
{deposit.description}
+
+
+
{deposit.amount}
diff --git a/resources/js/Customer/Deposit/DetailPartials/FormUploadCashDeposit.jsx b/resources/js/Customer/Deposit/DetailPartials/FormUploadCashDeposit.jsx
index c9e3246..ec4636e 100644
--- a/resources/js/Customer/Deposit/DetailPartials/FormUploadCashDeposit.jsx
+++ b/resources/js/Customer/Deposit/DetailPartials/FormUploadCashDeposit.jsx
@@ -47,7 +47,7 @@ export const FormUploadCashDeposit = () => {
onSuccess: () =>
setTimeout(
() => router.get(route(route().current(), deposit)),
- 3000
+ 500
),
})
}
diff --git a/resources/js/Customer/Deposit/DetailPartials/FormUploadManual.jsx b/resources/js/Customer/Deposit/DetailPartials/FormUploadManual.jsx
index 6f202f3..0678b1a 100644
--- a/resources/js/Customer/Deposit/DetailPartials/FormUploadManual.jsx
+++ b/resources/js/Customer/Deposit/DetailPartials/FormUploadManual.jsx
@@ -47,7 +47,7 @@ export const FormUploadManual = () => {
onSuccess: () =>
setTimeout(
() => router.get(route(route().current(), deposit)),
- 3000
+ 500
),
})
}
diff --git a/resources/js/Customer/Poin/Detail.jsx b/resources/js/Customer/Poin/Detail.jsx
index 26253e6..6be8cce 100644
--- a/resources/js/Customer/Poin/Detail.jsx
+++ b/resources/js/Customer/Poin/Detail.jsx
@@ -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 (
-
+
{/* detail */}
-
-
-
- {poin.description}
-
-
{poin.amount}
-
- {poin.format_created_at}
+
+
handleCopyToClipboard(poin.description)}
+ >
+
{poin.description}
+
+
+
{poin.amount} poin
+
+ {poin.format_created_at}
+
diff --git a/resources/js/Customer/Poin/Index.jsx b/resources/js/Customer/Poin/Index.jsx
index 669d572..3bb81f9 100644
--- a/resources/js/Customer/Poin/Index.jsx
+++ b/resources/js/Customer/Poin/Index.jsx
@@ -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) {
- {poin.amount}
+ {poin.amount} poin
diff --git a/resources/js/Customer/Trx/Detail.jsx b/resources/js/Customer/Trx/Detail.jsx
index f15939f..1c6cd1e 100644
--- a/resources/js/Customer/Trx/Detail.jsx
+++ b/resources/js/Customer/Trx/Detail.jsx
@@ -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 }) {
>
-
{sale.code}
-
{sale.format_created_at}
+
handleCopyToClipboard(sale.code)}
+ >
+
{sale.code}
+
+
+
+
+
+ {sale.format_created_at}
+
diff --git a/resources/js/Customer/Trx/Index.jsx b/resources/js/Customer/Trx/Index.jsx
index 721b7fd..9064c7b 100644
--- a/resources/js/Customer/Trx/Index.jsx
+++ b/resources/js/Customer/Trx/Index.jsx
@@ -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 (
diff --git a/resources/js/Customer/utils.jsx b/resources/js/Customer/utils.jsx
index 581de67..29e5e1b 100644
--- a/resources/js/Customer/utils.jsx
+++ b/resources/js/Customer/utils.jsx
@@ -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 = [
{