diff --git a/src/app/[name]/(Dialogs)/pager/page.tsx b/src/app/[name]/(Dialogs)/pager/page.tsx
deleted file mode 100644
index 204400a..0000000
--- a/src/app/[name]/(Dialogs)/pager/page.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-export default function PagerPage() {
- // This page is just a route trigger, the actual modal is handled in DialogsLayout
- // We return an empty div so the route exists for pathname detection
- return
;
-}
diff --git a/src/components/icons/PagerIcon.tsx b/src/components/icons/PagerIcon.tsx
deleted file mode 100644
index 7e9f701..0000000
--- a/src/components/icons/PagerIcon.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import React from "react";
-
-type Props = React.SVGProps;
-
-const PagerIcon = (props: Props) => (
-
-
-
-
-
-
-);
-
-export default PagerIcon;
diff --git a/src/components/navigation/BottomNavBar.tsx b/src/components/navigation/BottomNavBar.tsx
index 5123d04..98b175c 100644
--- a/src/components/navigation/BottomNavBar.tsx
+++ b/src/components/navigation/BottomNavBar.tsx
@@ -4,7 +4,7 @@ import React from 'react'
import Link from 'next/link'
import BottomNavLink from './BottomNavLink'
import BottomNavHighlightLink from './BottomNavLinkBig'
-import PagerIcon from '../icons/PagerIcon'
+import ReceiptIcon from '../icons/ReceiptIcon'
import BagIcon from '../icons/BagIcon'
import HeartIcon from '../icons/HeartIcon'
import { useParams, usePathname, useRouter } from 'next/navigation'
@@ -16,11 +16,7 @@ import clsx from 'clsx';
import { useGetProfile } from '@/app/[name]/(Profile)/profile/hooks/userProfileData';
import { toast } from '../Toast';
-type BottomNavBarProps = {
- onPagerClick?: () => void;
-};
-
-function BottomNavBar({ onPagerClick }: BottomNavBarProps) {
+function BottomNavBar() {
const params = useParams();
const { name } = params;
@@ -81,19 +77,7 @@ function BottomNavBar({ onPagerClick }: BottomNavBarProps) {
icon={ }
value={t('Cart')}
/>
- {onPagerClick ? (
-
-
-
- {t('Pager')}
-
-
- ) : (
- } value={t('Pager')} />
- )}
+ } value={t('Orders')} />
void;
-};
-
-export default function PagerModal({ visible, onClose }: PagerModalProps) {
- const [tableNumber, setTableNumber] = useState(1);
- const { mutate: mutatePager, isPending } = usePager();
- const [message, setMessage] = useState('');
- const handleIncrement = () => {
- setTableNumber((prev) => prev + 1);
- };
-
- const handleDecrement = () => {
- setTableNumber((prev) => Math.max(1, prev - 1));
- };
-
- const handlePage = () => {
- mutatePager({ tableNumber: tableNumber.toString(), message: message }, {
- onSuccess: () => {
- handleClose();
- toast('درخواست شما با موفقیت ثبت شد', 'success');
- },
- onError: (error) => {
- toast(extractErrorMessage(error), 'error');
- }
- });
- };
-
- const handleClose = () => {
- setTableNumber(1);
- onClose();
- };
-
- useEffect(() => {
- if (!visible) {
- setTableNumber(1);
- }
- }, [visible]);
-
- return (
-
-
-
-
-
-
شماره میز خود را وارد کنید
-
-
-
-
-
-
-
{tableNumber}
-
-
-
-
-
-
-
-
-
-
-
-
-
- پیج کنید
-
-
- انصراف
-
-
-
-
-
- );
-}
diff --git a/src/components/pager/hooks/usePagerData.ts b/src/components/pager/hooks/usePagerData.ts
deleted file mode 100644
index e82d551..0000000
--- a/src/components/pager/hooks/usePagerData.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { useMutation } from "@tanstack/react-query";
-import * as api from "../service/PagerService";
-
-export const usePager = () => {
- return useMutation({
- mutationFn: api.pager,
- });
-};
diff --git a/src/components/pager/service/PagerService.ts b/src/components/pager/service/PagerService.ts
deleted file mode 100644
index 96c64c4..0000000
--- a/src/components/pager/service/PagerService.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { api } from "@/config/axios";
-import { CreatePagerType } from "../types/Types";
-
-export const pager = async (params: CreatePagerType) => {
- const { data } = await api.post("/public/pager", params);
- return data;
-};
diff --git a/src/components/pager/types/Types.ts b/src/components/pager/types/Types.ts
deleted file mode 100644
index d727e89..0000000
--- a/src/components/pager/types/Types.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export type CreatePagerType = {
- tableNumber: string;
- message: string;
-};
diff --git a/src/components/wrapper/ClientMenuRouteWrapper.tsx b/src/components/wrapper/ClientMenuRouteWrapper.tsx
index cdfc51e..2f1242f 100644
--- a/src/components/wrapper/ClientMenuRouteWrapper.tsx
+++ b/src/components/wrapper/ClientMenuRouteWrapper.tsx
@@ -7,7 +7,6 @@ import BottomNavBar from '../navigation/BottomNavBar'
import useToggle from '@/hooks/helpers/useToggle';
import { usePathname, useRouter } from 'next/navigation';
import usePreference from '@/hooks/helpers/usePreference';
-import PagerModal from '../pager/PagerModal';
type Props = {} & React.AllHTMLAttributes
@@ -16,7 +15,6 @@ function ClientMenuRouteWrapper({ children }: Props) {
const { state: menuState, toggle: _toggleMenuState, set: setMenuState } = useToggle(false);
const { state: searchModal, toggle: _toggleSearchModal } = useToggle(false);
const { state: nightMode, toggle: _toggleNightMode } = usePreference('night-mode', false);
- const { state: pagerOpen, toggle: togglePager, set: setPagerOpen } = useToggle(false);
const router = useRouter();
const pathname = usePathname();
@@ -36,10 +34,6 @@ function ClientMenuRouteWrapper({ children }: Props) {
_toggleSearchModal();
}
- const handleClosePager = () => {
- setPagerOpen(false);
- };
-
const location = usePathname();
useEffect(() => {
@@ -67,7 +61,7 @@ function ClientMenuRouteWrapper({ children }: Props) {
-
+
@@ -84,8 +78,6 @@ function ClientMenuRouteWrapper({ children }: Props) {
>
{children}
-
-
)
diff --git a/src/locales/fa/common.json b/src/locales/fa/common.json
index fe21ce0..4f5887a 100644
--- a/src/locales/fa/common.json
+++ b/src/locales/fa/common.json
@@ -2,7 +2,7 @@
"BottomNavbar": {
"Menu": "منو",
"Cart": "سبد خرید",
- "Pager": "پیجر",
+ "Orders": "سفارشات",
"Notifications": "اعلان ها",
"Favorites": "پسند ها",
"about": "درباره",
diff --git a/src/locales/fa/parallels.json b/src/locales/fa/parallels.json
index 5008d63..b3bd43a 100644
--- a/src/locales/fa/parallels.json
+++ b/src/locales/fa/parallels.json
@@ -112,11 +112,5 @@
},
"ButtonSubmit": "پرداخت",
"PayableAmountLabel": "مبلغ قابل پرداخت"
- },
- "Pager": {
- "Title": "پیجر گارسون",
- "TableNumberLabel": "شماره میز خود را وارد کنید",
- "ButtonPage": "پیج کنید",
- "ButtonCancel": "انصراف"
}
}