diff --git a/src/App.tsx b/src/App.tsx index f5aa5fb..3288e17 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,6 +3,7 @@ import { BrowserRouter } from 'react-router-dom' import 'swiper/swiper-bundle.css'; import 'rc-rate/assets/index.css'; import './assets/fonts/roboto/roboto.css' +import 'react-loading-skeleton/dist/skeleton.css' import i18next from 'i18next' import { I18nextProvider } from 'react-i18next' import { QueryCache, QueryClient, QueryClientProvider } from '@tanstack/react-query' diff --git a/src/components/DefaultTableSkeleton.tsx b/src/components/DefaultTableSkeleton.tsx new file mode 100644 index 0000000..c230eb7 --- /dev/null +++ b/src/components/DefaultTableSkeleton.tsx @@ -0,0 +1,30 @@ +import { FC, Fragment } from 'react' +import Td from './Td' +import Skeleton from 'react-loading-skeleton' + +type Props = { + tdCount: number, + trCount?: number, +} + +const DefaultTableSkeleton: FC = ({ tdCount, trCount = 5 }) => { + return ( + + { + Array.from({ length: trCount }).map((_, rowIndex) => ( + + { + Array.from({ length: tdCount }).map((_, colIndex) => ( + + + + )) + } + + )) + } + + ) +} + +export default DefaultTableSkeleton diff --git a/src/components/ServiceItem.tsx b/src/components/ServiceItem.tsx index cb38f66..351be5a 100644 --- a/src/components/ServiceItem.tsx +++ b/src/components/ServiceItem.tsx @@ -9,6 +9,7 @@ import { ItemServiceType } from '../pages/service/types/ServiecTypes' type Props = { item: ItemServiceType, className?: string, + isLinkPanel?: boolean } const ServiceItem: FC = (props: Props) => { diff --git a/src/index.css b/src/index.css index ce2e452..8491c7e 100644 --- a/src/index.css +++ b/src/index.css @@ -199,3 +199,29 @@ tbody tr { .has-number { font-family: Roboto !important; } + +.skeleton-box { + display: inline-block; + height: 1em; + position: relative; + overflow: hidden; + background-color: #dddbdd; +} + +.skeleton-box:after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + transform: translateX(-100%); + background-image: linear-gradient( + 90deg, + rgba(#fff, 0) 0, + rgba(#fff, 0.2) 20%, + rgba(#fff, 0.5) 60%, + rgba(#fff, 0) + ); + animation: shimmer 5s infinite; + content: ""; +} diff --git a/src/langs/fa.json b/src/langs/fa.json index ecc6d23..6b161a1 100644 --- a/src/langs/fa.json +++ b/src/langs/fa.json @@ -244,7 +244,9 @@ "accepted": "تایید شده", "sure_confrim_pay": "آیا مطمئن هستید که مبلغ صورتحساب از کیف پول شما کسر شود؟", "thank_pay_1": "ضمن تشکر از خرید شما", - "thank_pay_2": "مبلغ این صورت حساب پرداخت شده است." + "thank_pay_2": "مبلغ این صورت حساب پرداخت شده است.", + "discount_code": "کد تخفیف", + "apply": "اعمال" }, "confrim": { "subject": "حذف", @@ -372,7 +374,8 @@ "username_not_available": "نام کاربری موجود نیست", "username_save_success": "نام کاربری با موفقیت ذخیره شد", "image_uploaded_successfully": "تصویر با موفقیت آپلود شد", - "confrim_email": "تایید ایمیل" + "confrim_email": "تایید ایمیل", + "confrim": "تایید صورتحساب " }, "email": "ایمیل", "save": "ذخیره", diff --git a/src/pages/receipts/Detail.tsx b/src/pages/receipts/Detail.tsx index 1338a09..d5f599e 100644 --- a/src/pages/receipts/Detail.tsx +++ b/src/pages/receipts/Detail.tsx @@ -14,6 +14,7 @@ import { clx } from '../../helpers/utils' import Button from '../../components/Button' import ApproveInvoice from './components/ApproveInvoice' import PayInvoice from './components/PayInvoice' +import Input from '../../components/Input' const ReceiptsDetail: FC = () => { @@ -24,10 +25,30 @@ const ReceiptsDetail: FC = () => { return (
-
-
{t('receip.detail_account')}
+
+
+
{t('receip.detail_account')}
- + +
+ + { + getInvoce.data?.data?.invoice?.status === 'PENDING' || getInvoce.data?.data?.invoice?.status === 'APPROVED' ? +
+
+ +
+ +
+ : null + }
{ diff --git a/src/pages/receipts/components/ApproveInvoice.tsx b/src/pages/receipts/components/ApproveInvoice.tsx index bbff422..2252b1f 100644 --- a/src/pages/receipts/components/ApproveInvoice.tsx +++ b/src/pages/receipts/components/ApproveInvoice.tsx @@ -58,7 +58,7 @@ const ApproveInvoice: FC = ({ id, refetch, status }) => { return (