diff --git a/src/index.css b/src/index.css
index 0c87a3b..94ffc5b 100644
--- a/src/index.css
+++ b/src/index.css
@@ -150,3 +150,13 @@ tbody tr {
direction: rtl;
font-family: "irancell" !important;
}
+
+* {
+ scrollbar-width: none; /* برای فایرفاکس */
+ -ms-overflow-style: none; /* برای اینترنت اکسپلورر و اج */
+}
+
+/* برای Webkit (کروم، سافاری و اپرا) */
+*::-webkit-scrollbar {
+ display: none;
+}
diff --git a/src/pages/customer/List.tsx b/src/pages/customer/List.tsx
index 96518ee..73c3788 100644
--- a/src/pages/customer/List.tsx
+++ b/src/pages/customer/List.tsx
@@ -95,10 +95,14 @@ const CustomerList: FC = () => {
|
|
- {item.invoicesCount} صورت حساب
+
+ {item.invoicesCount} صورت حساب
+
|
- {item.ticketsCount} تیکت
+
+ {item.ticketsCount} تیکت
+
|
diff --git a/src/pages/receipts/List.tsx b/src/pages/receipts/List.tsx
index 6dfe66b..34e3aa9 100644
--- a/src/pages/receipts/List.tsx
+++ b/src/pages/receipts/List.tsx
@@ -1,4 +1,4 @@
-import { FC, useState } from 'react'
+import { FC, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import Tabs from '../../components/Tabs'
import { CloseCircle, FolderOpen, WalletCheck, WalletRemove } from 'iconsax-react'
@@ -12,10 +12,12 @@ import { useGetCustomers } from '../customer/hooks/useCustomerData'
import Input from '../../components/Input'
import { CustomerItemType } from '../customer/types/CustomerTypes'
import DatePickerComponent from '../../components/DatePicker'
+import { useSearchParams } from 'react-router-dom'
const ReceiptsList: FC = () => {
const { t } = useTranslation('global')
+ const [searchParams] = useSearchParams()
const [activeTab, setActiveTab] = useState<"PENDING" | "PAID" | "CANCELED" | "EXPIRED">('PENDING')
const [customerId, setCustomerId] = useState('')
const [search, setSearch] = useState('')
@@ -23,6 +25,14 @@ const ReceiptsList: FC = () => {
const getInvoices = useGetInvoices(activeTab, customerId, search, date)
const getCustomers = useGetCustomers()
+ useEffect(() => {
+ const urlCustomerId = searchParams.get('user')
+ if (urlCustomerId) {
+ setCustomerId(urlCustomerId)
+ }
+ }, [searchParams])
+
+
return (
diff --git a/src/pages/service/components/AddServiceSidebar.tsx b/src/pages/service/components/AddServiceSidebar.tsx
index dae0e64..026b717 100644
--- a/src/pages/service/components/AddServiceSidebar.tsx
+++ b/src/pages/service/components/AddServiceSidebar.tsx
@@ -1,6 +1,5 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
-import SwitchComponent from '../../../components/Switch'
import CheckBoxComponent from '../../../components/CheckBoxComponent'
import Input from '../../../components/Input'
import UploadBoxDraggble from '../../../components/UploadBoxDraggble'
@@ -28,12 +27,12 @@ const AddServiceSidebar: FC = (props: Props) => {
{t('service.service_status')}
-
+ {/*
formik.setFieldValue('isDanakSuggest', e)}
/>
-
+ */}
diff --git a/src/pages/ticket/TicketList.tsx b/src/pages/ticket/TicketList.tsx
index fcba6ff..b5d2965 100644
--- a/src/pages/ticket/TicketList.tsx
+++ b/src/pages/ticket/TicketList.tsx
@@ -1,9 +1,9 @@
-import { FC, useState } from 'react'
+import { FC, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Eye, MessageRemove, MessageTick, MessageTime } from 'iconsax-react'
import Tabs from '../../components/Tabs'
import Td from '../../components/Td'
-import { Link } from 'react-router-dom'
+import { Link, useSearchParams } from 'react-router-dom'
import { Pages } from '../../config/Pages'
import { useGetTickets } from './hooks/useTicketData'
import moment from 'moment-jalaali'
@@ -12,8 +12,18 @@ import { TicketItemType } from './types/TicketTypes'
const TicketList: FC = () => {
const { t } = useTranslation('global')
+ const [searchParams] = useSearchParams()
+ const [customerId, setCustomerId] = useState ('')
const [activeTab, setActiveTab] = useState<'ANSWERED' | 'PENDING' | 'CLOSED'>('PENDING')
- const getTicket = useGetTickets(activeTab)
+ const getTicket = useGetTickets(activeTab, customerId)
+
+ useEffect(() => {
+ const urlCustomerId = searchParams.get('user')
+ if (urlCustomerId) {
+ setCustomerId(urlCustomerId)
+ }
+ }, [searchParams])
+
return (
diff --git a/src/pages/ticket/hooks/useTicketData.ts b/src/pages/ticket/hooks/useTicketData.ts
index d38db0d..72a2f6a 100644
--- a/src/pages/ticket/hooks/useTicketData.ts
+++ b/src/pages/ticket/hooks/useTicketData.ts
@@ -2,10 +2,10 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import * as api from "../service/TicketServiec";
import { AddMessageTicketType, CreateCategoryType } from "../types/TicketTypes";
-export const useGetTickets = (status: string) => {
+export const useGetTickets = (status: string, customerId?: string) => {
return useQuery({
- queryKey: ["tickets", status],
- queryFn: () => api.getTickets(status),
+ queryKey: ["tickets", status, customerId],
+ queryFn: () => api.getTickets(status, customerId),
});
};
diff --git a/src/pages/ticket/service/TicketServiec.ts b/src/pages/ticket/service/TicketServiec.ts
index 09f45b4..2e47569 100644
--- a/src/pages/ticket/service/TicketServiec.ts
+++ b/src/pages/ticket/service/TicketServiec.ts
@@ -1,8 +1,12 @@
import axios from "../../../config/axios";
import { AddMessageTicketType, CreateCategoryType } from "../types/TicketTypes";
-export const getTickets = async (status: string) => {
- const { data } = await axios.get(`/tickets/admin?status=${status}`);
+export const getTickets = async (status: string, customerId?: string) => {
+ let query = `/tickets/admin?status=${status}`;
+ if (customerId) {
+ query += `&userId=${customerId}`;
+ }
+ const { data } = await axios.get(query);
return data;
};
diff --git a/src/pages/transaction/List.tsx b/src/pages/transaction/List.tsx
index 20a98ca..285c54e 100644
--- a/src/pages/transaction/List.tsx
+++ b/src/pages/transaction/List.tsx
@@ -9,6 +9,7 @@ import moment from 'moment-jalaali'
import Pagination from '../../components/Pagination'
import Input from '../../components/Input'
import DatePickerComponent from '../../components/DatePicker'
+import { NumberFormat } from '../../config/func'
const TransactionList: FC = () => {
@@ -74,7 +75,7 @@ const TransactionList: FC = () => {
|
|
- |
+ |
|
| |