Commit 480f6aa8 authored by janithgamage1.ed's avatar janithgamage1.ed

fix: update

Desc : update project
parent 826cba1c
import { MouseEvent, useMemo, useState } from 'react'; import { MouseEvent, useEffect, useMemo, useState } from 'react';
// material-ui // material-ui
import { import {
...@@ -34,9 +34,15 @@ import { DeleteTwoTone, EditTwoTone, EyeTwoTone, PlusOutlined } from '@ant-desig ...@@ -34,9 +34,15 @@ import { DeleteTwoTone, EditTwoTone, EyeTwoTone, PlusOutlined } from '@ant-desig
//types //types
import { PopupTransition } from 'components/@extended/Transitions'; import { PopupTransition } from 'components/@extended/Transitions';
import status from 'data/status';
import AddEditCurriculum from 'sections/parameters/curriculum-management/AddEditCurriculum'; import AddEditCurriculum from 'sections/parameters/curriculum-management/AddEditCurriculum';
import AlertCurriculumDelete from 'sections/parameters/curriculum-management/AlertCurriculumDelete'; import AlertCurriculumDelete from 'sections/parameters/curriculum-management/AlertCurriculumDelete';
import { ReactTableProps, curriculumProps, dataProps } from './types/types'; import { useDispatch, useSelector } from 'store';
import { fetchCurriculums, toInitialState } from 'store/reducers/curriculum';
import { openSnackbar } from 'store/reducers/snackbar';
import { Curriculums } from 'types/curriculum';
import { ReactTableProps, curriculumProps } from './types/types';
import curriculumLevels from 'data/curriculumLevels';
// ==============================|| REACT TABLE ||============================== // // ==============================|| REACT TABLE ||============================== //
...@@ -122,9 +128,14 @@ function ReactTable({ columns, data, handleAddEdit }: ReactTableProps) { ...@@ -122,9 +128,14 @@ function ReactTable({ columns, data, handleAddEdit }: ReactTableProps) {
// ==============================|| List ||============================== // // ==============================|| List ||============================== //
const List = () => { const List = () => {
const theme = useTheme(); const theme = useTheme();
const dispatch = useDispatch();
const { curriculums, error, success, isLoading } = useSelector(state => state.curriculum);
// table // table
const data: dataProps[] = [] // const data: dataProps[] = []
// table
const [data, setData] = useState<Curriculums[]>([])
const columns = useMemo( const columns = useMemo(
() => () =>
...@@ -150,23 +161,76 @@ const List = () => { ...@@ -150,23 +161,76 @@ const List = () => {
{ {
Header: 'Curriculum Code', Header: 'Curriculum Code',
accessor: 'curriculumCode' accessor: 'curriculumCode'
}, },
{ {
Header: 'Curriculum LVL', Header: 'Curriculum LVL',
accessor: 'curriculumLevel' accessor: 'curriculumLevel',
}, Cell: ({ row }: { row: Row }) => {
if (row.values.curriculumLevel === undefined || row.values.curriculumLevel === null || row.values.curriculumLevel === '') {
return <>-</>
}
if (typeof row.values.curriculumLevel === 'string') {
return <>{row.values.curriculumLevel}</>;
}
if (typeof row.values.curriculumLevel === 'number') {
return <>{curriculumLevels.find(curriculumLevel => curriculumLevel.id === row.values.curriculumLevel)?.description || "-"}</>;
}
// Handle any other data types if necessary
return <>-</>;
}
},
{ {
Header: 'Curriculum Name', Header: 'Curriculum Name',
accessor: 'curriculumTitle' accessor: 'curriculumTitle',
}, Cell: ({ row }: { row: Row }) => {
if (row.values.curriculumTitle === undefined || row.values.curriculumTitle === null || row.values.curriculumTitle === '') {
return <>-</>
}
if (typeof row.values.curriculumTitle === 'string') {
return <>{row.values.curriculumTitle}</>;
}
if (typeof row.values.curriculumTitle === 'number') {
return <>{row.values.curriculumTitle || "-"}</>;
}
// Handle any other data types if necessary
return <>-</>;
}
},
{ {
Header: 'Status', Header: 'Status',
accessor: 'status' accessor: 'status',
}, className: 'cell-center',
Cell: ({ row }: { row: Row }) => {
if (row.values.status === undefined || row.values.status === null || row.values.status === '') {
return <>-</>
}
if (typeof row.values.status === 'string') {
return <>{row.values.status}</>;
}
if (typeof row.values.status === 'number') {
return <>{status.find(status => status.id === row.values.status)?.description || "-"}</>;
}
// Handle any other data types if necessary
return <>-</>;
}
},
{ {
Header: 'Created By', Header: 'Created By',
accessor: 'createdBy' accessor: 'createdBy',
}, Cell: ({ row }: { row: Row }) => {
if (row.values.createdBy === undefined || row.values.createdBy === null || row.values.createdBy === '') {
return <>-</>
}
if (typeof row.values.createdBy === 'string') {
return <>{row.values.createdBy}</>;
}
if (typeof row.values.createdBy === 'number') {
return <>{row.values.createdBy}</>;
}
// Handle any other data types if necessary
return <>-</>;
}
},
{ {
id: "actions", id: "actions",
Header: 'Actions', Header: 'Actions',
...@@ -235,12 +299,65 @@ const List = () => { ...@@ -235,12 +299,65 @@ const List = () => {
//alert model //alert model
const [openAlert, setOpenAlert] = useState(false); const [openAlert, setOpenAlert] = useState(false);
const [curriculumId, setCurriculumId] = useState<number | string | undefined>(undefined) const [curriculumId, setCurriculumId] = useState<number | string | undefined>(undefined)
const handleAlertClose = () => { const handleAlertClose = () => {
setOpenAlert(!openAlert); setOpenAlert(!openAlert);
}; };
/**
* API Config
* Tutorial API
*/
useEffect(() => {
dispatch(fetchCurriculums());
}, [dispatch]);
useEffect(() => {
setData(curriculums);
}, [curriculums])
// handel error
useEffect(() => {
if (error != null) {
dispatch(
openSnackbar({
open: true,
//@ts-ignore
message: error ? error.Message : "Something went wrong ...",
variant: 'alert',
alert: {
color: 'error'
},
close: true
})
);
dispatch(toInitialState())
}
}, [error])
// handel success
useEffect(() => {
if (success != null) {
dispatch(
openSnackbar({
open: true,
message: success,
variant: 'alert',
alert: {
color: 'success'
},
close: true
})
);
dispatch(toInitialState())
}
}, [success])
if (isLoading) {
return <div>Loading...</div>;
}
return ( return (
<> <>
<MainCard content={false}> <MainCard content={false}>
......
import { Column } from 'react-table'; import { Column } from 'react-table';
import { Curriculums } from 'types/curriculum';
export interface dataProps { export interface dataProps {
_id: number | string | undefined; _id: number | string | undefined;
...@@ -17,7 +18,7 @@ export interface dataProps { ...@@ -17,7 +18,7 @@ export interface dataProps {
export interface ReactTableProps { export interface ReactTableProps {
columns: Column[] columns: Column[]
data: dataProps[] data: Curriculums[]
handleAddEdit: () => void handleAddEdit: () => void
} }
......
import { MouseEvent, useMemo, useState } from 'react'; import { MouseEvent, useEffect, useMemo, useState } from 'react';
// material-ui // material-ui
import { import {
...@@ -34,9 +34,14 @@ import { ...@@ -34,9 +34,14 @@ import {
import { DeleteTwoTone, EditTwoTone, EyeTwoTone, PlusOutlined } from '@ant-design/icons'; import { DeleteTwoTone, EditTwoTone, EyeTwoTone, PlusOutlined } from '@ant-design/icons';
//types //types
import status from 'data/status';
import AddEditTutorial from 'sections/parameters/tutorial-management/AddEditTutorial'; import AddEditTutorial from 'sections/parameters/tutorial-management/AddEditTutorial';
import AlertTutorialDelete from 'sections/parameters/tutorial-management/AlertTutorialDelete'; import AlertTutorialDelete from 'sections/parameters/tutorial-management/AlertTutorialDelete';
import { ReactTableProps, dataProps, tutorialProps } from './types/types'; import { useDispatch, useSelector } from 'store';
import { openSnackbar } from 'store/reducers/snackbar';
import { fetchTutorials, toInitialState } from 'store/reducers/tutorial';
import { Tutorials } from 'types/tutorial';
import { ReactTableProps, tutorialProps } from './types/types';
// ==============================|| REACT TABLE ||============================== // // ==============================|| REACT TABLE ||============================== //
...@@ -122,145 +127,151 @@ function ReactTable({ columns, data, handleAddEdit }: ReactTableProps) { ...@@ -122,145 +127,151 @@ function ReactTable({ columns, data, handleAddEdit }: ReactTableProps) {
// ==============================|| List ||============================== // // ==============================|| List ||============================== //
const List = () => { const List = () => {
const theme = useTheme(); const theme = useTheme();
const dispatch = useDispatch();
const { tutorials, error, success, isLoading } = useSelector(state => state.tutorial);
// table // table
const data: dataProps[] = [ // const data: dataProps[] = [
{ // {
"_id": "", // "_id": "",
"tutorialCode": "01", // "tutorialCode": "01",
"tutorialTitle": "Numbers and Counting in Sign Language", // "tutorialTitle": "Numbers and Counting in Sign Language",
"tutorialDescription": "In this tutorial, you'll discover how to express numbers visually using simple hand gestures. Each number has a unique sign that involves specific finger placements and hand movements. We'll break down each number step by step, providing you with clear instructions, images, and videos to help you learn effectively.", // "tutorialDescription": "In this tutorial, you'll discover how to express numbers visually using simple hand gestures. Each number has a unique sign that involves specific finger placements and hand movements. We'll break down each number step by step, providing you with clear instructions, images, and videos to help you learn effectively.",
"tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc", // "tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc",
"taskItems": [ // "taskItems": [
{ // {
"_id": "", // "_id": "",
"title": "Learn Number One", // "title": "Learn Number One",
"description": "Learn how to sign the number one in sign language.", // "description": "Learn how to sign the number one in sign language.",
"howToDo": "- Extend your index finger straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your index finger straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_one.jpg", // "referenceImage": "https://example.com/number_one.jpg",
"referenceVideo": "https://example.com/number_one_video.mp4", // "referenceVideo": "https://example.com/number_one_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Two", // "title": "Learn Number Two",
"description": "Learn how to sign the number two in sign language.", // "description": "Learn how to sign the number two in sign language.",
"howToDo": "- Extend your index and middle fingers straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your index and middle fingers straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_two.jpg", // "referenceImage": "https://example.com/number_two.jpg",
"referenceVideo": "https://example.com/number_two_video.mp4", // "referenceVideo": "https://example.com/number_two_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Three", // "title": "Learn Number Three",
"description": "Learn how to sign the number three in sign language.", // "description": "Learn how to sign the number three in sign language.",
"howToDo": "- Extend your index, middle, and ring fingers straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your index, middle, and ring fingers straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_three.jpg", // "referenceImage": "https://example.com/number_three.jpg",
"referenceVideo": "https://example.com/number_three_video.mp4", // "referenceVideo": "https://example.com/number_three_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Four", // "title": "Learn Number Four",
"description": "Learn how to sign the number four in sign language.", // "description": "Learn how to sign the number four in sign language.",
"howToDo": "- Extend your thumb, index, middle, and ring fingers straight up.\n- Keep your pinky finger folded.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your thumb, index, middle, and ring fingers straight up.\n- Keep your pinky finger folded.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_four.jpg", // "referenceImage": "https://example.com/number_four.jpg",
"referenceVideo": "https://example.com/number_four_video.mp4", // "referenceVideo": "https://example.com/number_four_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Five", // "title": "Learn Number Five",
"description": "Learn how to sign the number five in sign language.", // "description": "Learn how to sign the number five in sign language.",
"howToDo": "- Extend all your fingers straight up.\n- Keep your thumb resting on the side of your palm.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend all your fingers straight up.\n- Keep your thumb resting on the side of your palm.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_five.jpg", // "referenceImage": "https://example.com/number_five.jpg",
"referenceVideo": "https://example.com/number_five_video.mp4", // "referenceVideo": "https://example.com/number_five_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Six", // "title": "Learn Number Six",
"description": "Learn how to sign the number six in sign language.", // "description": "Learn how to sign the number six in sign language.",
"howToDo": "- Extend your thumb and pinky finger straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your thumb and pinky finger straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_six.jpg", // "referenceImage": "https://example.com/number_six.jpg",
"referenceVideo": "https://example.com/number_six_video.mp4", // "referenceVideo": "https://example.com/number_six_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Seven", // "title": "Learn Number Seven",
"description": "Learn how to sign the number seven in sign language.", // "description": "Learn how to sign the number seven in sign language.",
"howToDo": "- Extend your index, middle, and ring fingers straight up.\n- Keep your thumb, pinky, and pinky finger folded.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your index, middle, and ring fingers straight up.\n- Keep your thumb, pinky, and pinky finger folded.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_seven.jpg", // "referenceImage": "https://example.com/number_seven.jpg",
"referenceVideo": "https://example.com/number_seven_video.mp4", // "referenceVideo": "https://example.com/number_seven_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Eight", // "title": "Learn Number Eight",
"description": "Learn how to sign the number eight in sign language.", // "description": "Learn how to sign the number eight in sign language.",
"howToDo": "- Extend all your fingers straight up.\n- Cross your index and middle fingers over your ring and pinky fingers.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend all your fingers straight up.\n- Cross your index and middle fingers over your ring and pinky fingers.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_eight.jpg", // "referenceImage": "https://example.com/number_eight.jpg",
"referenceVideo": "https://example.com/number_eight_video.mp4", // "referenceVideo": "https://example.com/number_eight_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Nine", // "title": "Learn Number Nine",
"description": "Learn how to sign the number nine in sign language.", // "description": "Learn how to sign the number nine in sign language.",
"howToDo": "- Extend your thumb and all your fingers straight up.\n- Keep your pinky finger folded.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your thumb and all your fingers straight up.\n- Keep your pinky finger folded.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_nine.jpg", // "referenceImage": "https://example.com/number_nine.jpg",
"referenceVideo": "https://example.com/number_nine_video.mp4", // "referenceVideo": "https://example.com/number_nine_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
}, // },
{ // {
"_id": "", // "_id": "",
"title": "Learn Number Ten", // "title": "Learn Number Ten",
"description": "Learn how to sign the number ten in sign language.", // "description": "Learn how to sign the number ten in sign language.",
"howToDo": "- Extend your thumb, index, and middle fingers straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.", // "howToDo": "- Extend your thumb, index, and middle fingers straight up.\n- Keep the rest of your fingers closed.\n- Hold your hand in front of your chest.",
"referenceImage": "https://example.com/number_ten.jpg", // "referenceImage": "https://example.com/number_ten.jpg",
"referenceVideo": "https://example.com/number_ten_video.mp4", // "referenceVideo": "https://example.com/number_ten_video.mp4",
"taskItemMark": 10 // "taskItemMark": 10
} // }
], // ],
"status": 1, // "status": 1,
"createdAt": new Date("2023-08-30T12:00:00Z"), // "createdAt": new Date("2023-08-30T12:00:00Z"),
"createdBy": "Nuwan Gamage" // "createdBy": "Nuwan Gamage"
}, // },
{ // {
"_id": "", // "_id": "",
"tutorialCode": "02", // "tutorialCode": "02",
"tutorialTitle": "Everyday Vocabulary in Sign Language", // "tutorialTitle": "Everyday Vocabulary in Sign Language",
"tutorialDescription": "Teach signs for everyday objects and activities, such as eat, drink, sleep, book, pen, etc.\nIntroduce signs for common words used in daily life.\nProvide visual demonstrations and interactive exercises for learners to practice using these signs.", // "tutorialDescription": "Teach signs for everyday objects and activities, such as eat, drink, sleep, book, pen, etc.\nIntroduce signs for common words used in daily life.\nProvide visual demonstrations and interactive exercises for learners to practice using these signs.",
"tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc", // "tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc",
"taskItems": [], // "taskItems": [],
"status": 1, // "status": 1,
"createdAt": new Date("2023-08-30T12:00:00Z"), // "createdAt": new Date("2023-08-30T12:00:00Z"),
"createdBy": "Nuwan Gamage" // "createdBy": "Nuwan Gamage"
}, // },
{ // {
"_id": "", // "_id": "",
"tutorialCode": "03", // "tutorialCode": "03",
"tutorialTitle": "Family Signs in Sign Language", // "tutorialTitle": "Family Signs in Sign Language",
"tutorialDescription": "Teach signs for family members, such as mother, father, sister, brother, etc.\nIntroduce signs for common family-related words, such as family, love, and home.\nProvide visual demonstrations and practice exercises for learners to practice these family signs.", // "tutorialDescription": "Teach signs for family members, such as mother, father, sister, brother, etc.\nIntroduce signs for common family-related words, such as family, love, and home.\nProvide visual demonstrations and practice exercises for learners to practice these family signs.",
"tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc", // "tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc",
"taskItems": [], // "taskItems": [],
"status": 1, // "status": 1,
"createdAt": new Date("2023-08-30T12:00:00Z"), // "createdAt": new Date("2023-08-30T12:00:00Z"),
"createdBy": "Nuwan Gamage" // "createdBy": "Nuwan Gamage"
}, // },
{ // {
"_id": "", // "_id": "",
"tutorialCode": "04", // "tutorialCode": "04",
"tutorialTitle": "Basic Conversational Phrases in Sign Language", // "tutorialTitle": "Basic Conversational Phrases in Sign Language",
"tutorialDescription": "Teach simple conversational phrases, such as \"What is your name?\" or \"How are you?\"\nIntroduce signs for common question words and phrases.\nProvide visual demonstrations and practice exercises for learners to practice these conversational phrases.", // "tutorialDescription": "Teach simple conversational phrases, such as \"What is your name?\" or \"How are you?\"\nIntroduce signs for common question words and phrases.\nProvide visual demonstrations and practice exercises for learners to practice these conversational phrases.",
"tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc", // "tutorialImage": "https://drive.google.com/uc?export=view&id=1YACBlu7X-O7-DKv5DoW3AM9kgfT7Yhdc",
"taskItems": [], // "taskItems": [],
"status": 1, // "status": 1,
"createdAt": new Date("2023-08-30T12:00:00Z"), // "createdAt": new Date("2023-08-30T12:00:00Z"),
"createdBy": "Nuwan Gamage" // "createdBy": "Nuwan Gamage"
} // }
] // ]
// table
const [data, setData] = useState<Tutorials[]>([])
const columns = useMemo( const columns = useMemo(
() => () =>
...@@ -293,11 +304,38 @@ const List = () => { ...@@ -293,11 +304,38 @@ const List = () => {
}, },
{ {
Header: 'Status', Header: 'Status',
accessor: 'status' accessor: 'status',
className: 'cell-center',
Cell: ({ row }: { row: Row }) => {
if (row.values.status === undefined || row.values.status === null || row.values.status === '') {
return <>-</>
}
if (typeof row.values.status === 'string') {
return <>{row.values.status}</>;
}
if (typeof row.values.status === 'number') {
return <>{status.find(status => status.id === row.values.status)?.description || "-"}</>;
}
// Handle any other data types if necessary
return <>-</>;
}
}, },
{ {
Header: 'Created By', Header: 'Created By',
accessor: 'createdBy' accessor: 'createdBy',
Cell: ({ row }: { row: Row }) => {
if (row.values.createdBy === undefined || row.values.createdBy === null || row.values.createdBy === '') {
return <>-</>
}
if (typeof row.values.createdBy === 'string') {
return <>{row.values.createdBy}</>;
}
if (typeof row.values.createdBy === 'number') {
return <>{row.values.createdBy}</>;
}
// Handle any other data types if necessary
return <>-</>;
}
}, },
{ {
id: "actions", id: "actions",
...@@ -373,6 +411,59 @@ const List = () => { ...@@ -373,6 +411,59 @@ const List = () => {
setOpenAlert(!openAlert); setOpenAlert(!openAlert);
}; };
/**
* API Config
* Tutorial API
*/
useEffect(() => {
dispatch(fetchTutorials());
}, [dispatch]);
useEffect(() => {
setData(tutorials);
}, [tutorials])
// handel error
useEffect(() => {
if (error != null) {
dispatch(
openSnackbar({
open: true,
//@ts-ignore
message: error ? error.Message : "Something went wrong ...",
variant: 'alert',
alert: {
color: 'error'
},
close: true
})
);
dispatch(toInitialState())
}
}, [error])
// handel success
useEffect(() => {
if (success != null) {
dispatch(
openSnackbar({
open: true,
message: success,
variant: 'alert',
alert: {
color: 'success'
},
close: true
})
);
dispatch(toInitialState())
}
}, [success])
if (isLoading) {
return <div>Loading...</div>;
}
return ( return (
<> <>
<MainCard content={false}> <MainCard content={false}>
......
import { Column } from 'react-table'; import { Column } from 'react-table';
import { Tutorials } from 'types/tutorial';
export interface dataProps { export interface dataProps {
_id: number | string | undefined; _id: number | string | undefined;
...@@ -16,7 +17,7 @@ export interface dataProps { ...@@ -16,7 +17,7 @@ export interface dataProps {
export interface ReactTableProps { export interface ReactTableProps {
columns: Column[] columns: Column[]
data: dataProps[] data: Tutorials[]
handleAddEdit: () => void handleAddEdit: () => void
} }
......
...@@ -7,6 +7,7 @@ import storage from 'redux-persist/lib/storage'; ...@@ -7,6 +7,7 @@ import storage from 'redux-persist/lib/storage';
import calendar from './calendar'; import calendar from './calendar';
import cartReducer from './cart'; import cartReducer from './cart';
import chat from './chat'; import chat from './chat';
import curriculum from './curriculum';
import ingredient from './ingredient'; import ingredient from './ingredient';
import invoice from './invoice'; import invoice from './invoice';
import kanban from './kanban'; import kanban from './kanban';
...@@ -16,6 +17,8 @@ import nutrition from './nutrition'; ...@@ -16,6 +17,8 @@ import nutrition from './nutrition';
import productReducer from './product'; import productReducer from './product';
import snackbar from './snackbar'; import snackbar from './snackbar';
import subscription from './subscription'; import subscription from './subscription';
import tutorial from './tutorial';
// ==============================|| COMBINE REDUCERS ||============================== // // ==============================|| COMBINE REDUCERS ||============================== //
...@@ -39,7 +42,9 @@ const reducers = combineReducers({ ...@@ -39,7 +42,9 @@ const reducers = combineReducers({
nutrition, nutrition,
ingredient, ingredient,
subscription, subscription,
marksCalculator marksCalculator,
tutorial,
curriculum
}); });
export default reducers; export default reducers;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment