удаление безтипового вопроса
This commit is contained in:
parent
ce5fea6a7e
commit
3f95f32ec9
@ -282,6 +282,10 @@ export default function ButtonsOptions({
|
||||
<IconButton
|
||||
sx={{ borderRadius: "6px", padding: "2px" }}
|
||||
onClick={() => {
|
||||
if (question.type === null) {
|
||||
console.log("удаление безтипового")
|
||||
deleteQuestion(question.id);
|
||||
}
|
||||
if (question.content.rule.parentId.length !== 0) {
|
||||
setOpenDelete(true)
|
||||
} else {
|
||||
|
@ -315,6 +315,10 @@ export default function ButtonsOptionsAndPict({
|
||||
<IconButton
|
||||
sx={{ borderRadius: "6px", padding: "2px" }}
|
||||
onClick={() => {
|
||||
if (question.type === null) {
|
||||
console.log("удаление безтипового")
|
||||
deleteQuestion(question.id);
|
||||
}
|
||||
if(question.content.rule.parentId.length !== 0) {
|
||||
setOpenDelete(true)
|
||||
} else {
|
||||
|
@ -277,6 +277,10 @@ const maxLengthTextField = 225;
|
||||
margin: "0 5px 0 10px",
|
||||
}}
|
||||
onClick={() => {
|
||||
if (question.type === null) {
|
||||
console.log("удаление безтипового")
|
||||
deleteQuestion(question.id);
|
||||
}
|
||||
if (question.content.rule.parentId.length !== 0) {
|
||||
setOpenDelete(true);
|
||||
} else {
|
||||
|
@ -60,8 +60,6 @@ export const DeleteFunction = async (questions: any, question: any, quiz: any) =
|
||||
const result = questions.find(q => q.type === "result" && q.content.rule.parentId === question.content.id)
|
||||
if (result) await deleteQuestion(result.id);
|
||||
|
||||
} else {
|
||||
await deleteQuestion(question.id);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user