CFE-16 delete description validation
This commit is contained in:
@@ -9,7 +9,7 @@ import {useState} from "react";
|
|||||||
import {Stack} from "@mui/material";
|
import {Stack} from "@mui/material";
|
||||||
|
|
||||||
function CallActions({tab}) {
|
function CallActions({tab}) {
|
||||||
const [description, setDescription] = useState('')
|
const [description, setDescription] = useState()
|
||||||
const requestServer = useRequest({auth: true});
|
const requestServer = useRequest({auth: true});
|
||||||
const {closeAnswerTab} = useAnswers();
|
const {closeAnswerTab} = useAnswers();
|
||||||
|
|
||||||
@@ -20,9 +20,6 @@ function CallActions({tab}) {
|
|||||||
subcategory_id,
|
subcategory_id,
|
||||||
description
|
description
|
||||||
},
|
},
|
||||||
success: {
|
|
||||||
notification: {show: true},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
closeAnswerTab(tab.id);
|
closeAnswerTab(tab.id);
|
||||||
|
|||||||
@@ -49,7 +49,13 @@ export const AnswersProvider = ({children}) => {
|
|||||||
categoryLists: [],
|
categoryLists: [],
|
||||||
subCategoryLists: [],
|
subCategoryLists: [],
|
||||||
});
|
});
|
||||||
const [state, dispatch] = useReducer(reducer, []);
|
const [state, dispatch] = useReducer(reducer, [{
|
||||||
|
id: 1,
|
||||||
|
phone_number: '09134849737',
|
||||||
|
date: new Date(),
|
||||||
|
active: true,
|
||||||
|
active_category_id: 1,
|
||||||
|
}]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
requestServer(GET_CATEGORY, "get")
|
requestServer(GET_CATEGORY, "get")
|
||||||
|
|||||||
Reference in New Issue
Block a user