Commit 93fc9979 authored by janithgamage1.ed's avatar janithgamage1.ed

fix: update

Desc : update project
parent a6b843b5
import { tutorialType } from "types/tutorial";
import { Tutorial, tutorialType } from "types/tutorial";
export const tutorials: tutorialType[] = [
{
......@@ -181,3 +181,22 @@ export const tutorials: tutorialType[] = [
"tutorialMark": 0,
}
]
export const tutorialReqOb: Tutorial = {
"tutorialCode": "Tutorial Code -12312",
"tutorialTitle": "Tutorial Title",
"tutorialImage": "Tutorial Image",
"tutorialDescription": "Tutorial Description",
"taskItems": [
{
"title": "Task Title -213123",
"description": "Task Reference Image",
//@ts-ignore
"howToDo": "Task How To Do",
"referenceImage": "Task Reference Image",
"referenceVideo": "Task Reference Image",
"taskItemMark": 10
}
],
"createdBy": "Nuwan Gamage"
}
\ No newline at end of file
......@@ -40,8 +40,8 @@ import AlertTutorialDelete from 'sections/parameters/tutorial-management/AlertTu
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';
import { Tutorial, Tutorials } from 'types/tutorial';
import { ReactTableProps } from './types/types';
// ==============================|| REACT TABLE ||============================== //
......@@ -396,7 +396,7 @@ const List = () => {
//dialog model
const [addEdit, setAddEdit] = useState<boolean>(false);
const [tutorial, setTutorial] = useState<tutorialProps>();
const [tutorial, setTutorial] = useState<Tutorial>();
const handleAddEdit = () => {
setAddEdit(!addEdit);
......@@ -481,7 +481,7 @@ const List = () => {
sx={{ '& .MuiDialog-paper': { p: 0 }, transition: 'transform 225ms' }}
aria-describedby="alert-dialog-slide-description"
>
<AddEditTutorial tutorial={tutorial} onCancel={handleAddEdit} />
<AddEditTutorial tutorial={tutorial!} onCancel={handleAddEdit} />
</Dialog>
{/* alert model */}
{!tutorial && <AlertTutorialDelete title={""} open={openAlert} handleClose={handleAlertClose} deleteId={tutorialId} />}
......
......@@ -21,11 +21,11 @@ export type Tutorial = {
tutorialTitle?: string
tutorialDescription?: string
tutorialImage?: string
tutorialMark: number
tutorialMark?: number
taskItems: taskItemType[]
status: number
status?: number
createdBy: string
createdAt: Date
createdAt?: Date
updatedBy?: string
updatedAt?: Date
};
......
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