From 1532fbc0ad53a257d515f9997301cc123fd1e367 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sat, 22 Feb 2025 12:42:12 +0330 Subject: [PATCH] invoice pay approve , ... --- src/components/ModalConfrim.tsx | 68 +++++++++++++++++ src/langs/fa.json | 19 ++++- src/pages/receipts/Detail.tsx | 29 +++++++- .../receipts/components/ApproveInvoice.tsx | 74 +++++++++++++++++++ src/pages/receipts/components/PayInvoice.tsx | 52 +++++++++++++ src/pages/receipts/hooks/useReceiptData.ts | 14 +++- src/pages/receipts/service/ReceiptService.ts | 10 +++ 7 files changed, 260 insertions(+), 6 deletions(-) create mode 100644 src/components/ModalConfrim.tsx create mode 100644 src/pages/receipts/components/ApproveInvoice.tsx create mode 100644 src/pages/receipts/components/PayInvoice.tsx diff --git a/src/components/ModalConfrim.tsx b/src/components/ModalConfrim.tsx new file mode 100644 index 0000000..78f55ab --- /dev/null +++ b/src/components/ModalConfrim.tsx @@ -0,0 +1,68 @@ +import { FC, useState } from 'react' +import DefaulModal from './DefaulModal' +import { useTranslation } from 'react-i18next' +import Button from './Button' +import Textarea from './Textarea' + +type Props = { + isLoading?: boolean, + close: () => void, + isOpen: boolean, + onConfrim: (text?: string) => void, + label?: string, + isHasDescription?: boolean +} + +const ModalConfrim: FC = (props: Props) => { + + const { t } = useTranslation('global') + const [description, setDescription] = useState('') + + return ( + +
+
+ { + props.label ? + props.label + : + t('confrim.content') + } + + { + props.isHasDescription && +
+