fix toggle discount

This commit is contained in:
hamid zarghami
2025-05-03 15:23:51 +03:30
parent 2dc60d9a61
commit ef43ea82bc
2 changed files with 1 additions and 4 deletions
@@ -12,7 +12,7 @@ export const getDiscounts = async (search: string) => {
};
export const toggleStatusDiscount = async (id: string) => {
const { data } = await axios.patch(`/discounts/${id}/toggle`);
const { data } = await axios.post(`/discounts/${id}/toggle-status`);
return data;
};
-3
View File
@@ -17,7 +17,6 @@ import { ErrorType } from '../../helpers/types'
import { clx } from '../../helpers/utils'
import { Pages } from '../../config/Pages'
import { useMultiUpload } from '../service/hooks/useServiceData'
import { useGetProfile } from '../profile/hooks/useProfileData'
import ReferTicket from './components/ReferTicket'
const TicketDetail: FC = () => {
@@ -31,7 +30,6 @@ const TicketDetail: FC = () => {
const multiUpload = useMultiUpload()
const [isResetFiles, setIsResetFiles] = useState<boolean>(false)
const closeTicket = useCloseTicket()
const getProfile = useGetProfile()
const formik = useFormik<AddMessageTicketType>({
initialValues: {
@@ -307,7 +305,6 @@ const TicketDetail: FC = () => {
</div>
{
getProfile.data?.data?.user?.roles[0]?.name === 'super_admin' &&
<ReferTicket refetch={getMessages.refetch} />
}
</div>