fix toggle discount
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user