change_route
This commit is contained in:
parent
9530ea30e7
commit
d721b8417c
File diff suppressed because one or more lines are too long
|
|
@ -1,24 +1,17 @@
|
|||
import { Space, TableColumnsType, Tooltip } from "antd";
|
||||
import { Question } from "../../types/Item";
|
||||
import { FaPlus } from "react-icons/fa";
|
||||
|
||||
import useModalHandler from "../../utils/useModalHandler";
|
||||
import { ModalEnum } from "../../enums/Model";
|
||||
import { useObjectToEdit } from "../../zustand/ObjectToEditState";
|
||||
import { RiDeleteBin6Fill } from "react-icons/ri";
|
||||
import { MdOutlineEdit } from "react-icons/md";
|
||||
import { findLabelByValue } from "../../utils/findLabelByValue";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { hasAbility } from "../../utils/hasAbility";
|
||||
import { ABILITIES_ENUM, ABILITIES_VALUES_ENUM } from "../../enums/abilities";
|
||||
import { formatNumber } from "../../utils/formatNumber";
|
||||
import { BsEyeFill } from "react-icons/bs";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useModalState } from "../../zustand/Modal";
|
||||
|
||||
export const useColumns = () => {
|
||||
const { handel_open_model } = useModalHandler();
|
||||
|
||||
const { set_object_to_edit } = useObjectToEdit((state) => state);
|
||||
const navigate = useNavigate()
|
||||
const { setIsOpen } = useModalState((state) => state);
|
||||
|
|
@ -71,6 +64,7 @@ export const useColumns = () => {
|
|||
key: "name",
|
||||
align: "center",
|
||||
render: (text, record) => record?.content,
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title: t("columns.isBase"),
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export const CrudRoute: TCrudRoute[] = [
|
|||
path: `/${ABILITIES_ENUM?.SUBJECT}/:${ParamsEnum?.SUBJECT_ID}/${ABILITIES_ENUM?.UNIT}/:${ParamsEnum?.UNIT_ID}/${ABILITIES_ENUM?.LESSON}/:${ParamsEnum?.LESSON_ID}/${ABILITIES_ENUM?.QUESTION}/add`,
|
||||
abilities: ABILITIES_ENUM?.QUESTION,
|
||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
||||
prevPath: 0,
|
||||
prevPath: 2,
|
||||
},
|
||||
{
|
||||
header: "page_header.edit_Question",
|
||||
|
|
@ -108,7 +108,7 @@ export const CrudRoute: TCrudRoute[] = [
|
|||
path: `/${ABILITIES_ENUM?.SUBJECT}/:${ParamsEnum?.SUBJECT_ID}/${ABILITIES_ENUM?.UNIT}/:${ParamsEnum?.UNIT_ID}/${ABILITIES_ENUM?.LESSON}/:${ParamsEnum?.LESSON_ID}/${ABILITIES_ENUM?.QUESTION}/:${ParamsEnum?.QUESTION_ID}`,
|
||||
abilities: ABILITIES_ENUM?.QUESTION,
|
||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
||||
prevPath: 0,
|
||||
prevPath: 2,
|
||||
},
|
||||
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user