Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-029
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-029
2023-029
Commits
9fe76f9e
Commit
9fe76f9e
authored
Sep 04, 2023
by
janithgamage1.ed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
Desc : update project
parent
6d4db559
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
19 deletions
+74
-19
Project/Frontend/SignConnectPlus/src/pages/learning-management/learning-curriculums/list/list.tsx
...es/learning-management/learning-curriculums/list/list.tsx
+59
-4
Project/Frontend/SignConnectPlus/src/pages/parameter/curriculum-management/list/list.tsx
...s/src/pages/parameter/curriculum-management/list/list.tsx
+3
-3
Project/Frontend/SignConnectPlus/src/sections/parameters/tutorial-management/AddEditTutorial.tsx
...ctions/parameters/tutorial-management/AddEditTutorial.tsx
+12
-12
No files found.
Project/Frontend/SignConnectPlus/src/pages/learning-management/learning-curriculums/list/list.tsx
View file @
9fe76f9e
...
@@ -21,13 +21,15 @@ import {
...
@@ -21,13 +21,15 @@ import {
import
usePagination
from
'
hooks/usePagination
'
;
import
usePagination
from
'
hooks/usePagination
'
;
import
CurriculumCard
from
'
sections/learning-management/learning-curriculums/CurriculumCard
'
;
import
CurriculumCard
from
'
sections/learning-management/learning-curriculums/CurriculumCard
'
;
import
EmptyCurriculumCard
from
'
sections/learning-management/learning-curriculums/skeleton/EmptyCurriculumCard
'
;
import
EmptyCurriculumCard
from
'
sections/learning-management/learning-curriculums/skeleton/EmptyCurriculumCard
'
;
import
{
useDispatch
,
useSelector
}
from
'
store
'
;
import
{
fetchCurriculums
,
toInitialState
}
from
'
store/reducers/curriculum
'
;
import
{
openSnackbar
}
from
'
store/reducers/snackbar
'
;
import
{
curriculumType
}
from
'
types/curriculum
'
;
import
{
curriculumType
}
from
'
types/curriculum
'
;
import
{
GlobalFilter
}
from
'
utils/react-table
'
;
import
{
GlobalFilter
}
from
'
utils/react-table
'
;
// types
// types
// assets
// assets
import
{
curriculums
}
from
'
data/curriculums
'
;
// ==============================|| List ||============================== //
// ==============================|| List ||============================== //
...
@@ -43,6 +45,9 @@ const allColumns = [
...
@@ -43,6 +45,9 @@ const allColumns = [
];
];
const
List
=
()
=>
{
const
List
=
()
=>
{
const
dispatch
=
useDispatch
();
const
{
curriculums
,
error
,
success
,
isLoading
}
=
useSelector
(
state
=>
state
.
curriculum
);
const
[
data
,
setData
]
=
useState
<
curriculumType
[]
>
([])
const
[
data
,
setData
]
=
useState
<
curriculumType
[]
>
([])
const
matchDownSM
=
useMediaQuery
((
theme
:
Theme
)
=>
theme
.
breakpoints
.
down
(
'
sm
'
));
const
matchDownSM
=
useMediaQuery
((
theme
:
Theme
)
=>
theme
.
breakpoints
.
down
(
'
sm
'
));
...
@@ -79,9 +84,59 @@ const List = () => {
...
@@ -79,9 +84,59 @@ const List = () => {
_DATA
.
jump
(
p
);
_DATA
.
jump
(
p
);
};
};
/**
* API Config
* Curriculum 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
(()
=>
{
useEffect
(()
=>
{
setData
(
curriculums
)
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
(
<>
<>
...
...
Project/Frontend/SignConnectPlus/src/pages/parameter/curriculum-management/list/list.tsx
View file @
9fe76f9e
...
@@ -300,8 +300,8 @@ const List = () => {
...
@@ -300,8 +300,8 @@ const List = () => {
//alert model
//alert model
const
[
openAlert
,
setOpenAlert
]
=
useState
(
false
);
const
[
openAlert
,
setOpenAlert
]
=
useState
(
false
);
const
[
curriculumId
,
setCurriculumId
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
[
curriculumId
,
setCurriculumId
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
[
curriculumTitle
,
setCurriculumTitle
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
[
curriculumTitle
,
setCurriculumTitle
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
handleAlertClose
=
()
=>
{
const
handleAlertClose
=
()
=>
{
setOpenAlert
(
!
openAlert
);
setOpenAlert
(
!
openAlert
);
...
@@ -309,7 +309,7 @@ const List = () => {
...
@@ -309,7 +309,7 @@ const List = () => {
/**
/**
* API Config
* API Config
*
Tutorial
API
*
Curriculum
API
*/
*/
useEffect
(()
=>
{
useEffect
(()
=>
{
dispatch
(
fetchCurriculums
());
dispatch
(
fetchCurriculums
());
...
...
Project/Frontend/SignConnectPlus/src/sections/parameters/tutorial-management/AddEditTutorial.tsx
View file @
9fe76f9e
...
@@ -296,12 +296,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -296,12 +296,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
placeholder=
"Enter Task Title"
placeholder=
"Enter Task Title"
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
title
`)}
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
title
`)}
error=
{
Boolean
(
error=
{
Boolean
(
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
title
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
title
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
title
)
}
)
}
helperText=
{
helperText=
{
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
title
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
title
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
title
}
}
...
@@ -317,12 +317,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -317,12 +317,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
placeholder=
"Enter Task Mark"
placeholder=
"Enter Task Mark"
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
taskItemMark
`)}
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
taskItemMark
`)}
error=
{
Boolean
(
error=
{
Boolean
(
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
taskItemMark
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
taskItemMark
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
taskItemMark
)
}
)
}
helperText=
{
helperText=
{
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
taskItemMark
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
taskItemMark
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
taskItemMark
}
}
...
@@ -338,12 +338,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -338,12 +338,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
placeholder=
"Enter Task Reference Image"
placeholder=
"Enter Task Reference Image"
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
referenceImage
`)}
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
referenceImage
`)}
error=
{
Boolean
(
error=
{
Boolean
(
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
referenceImage
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceImage
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceImage
)
}
)
}
helperText=
{
helperText=
{
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
referenceImage
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceImage
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceImage
}
}
...
@@ -359,12 +359,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -359,12 +359,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
placeholder=
"Enter Task Reference Video"
placeholder=
"Enter Task Reference Video"
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
referenceVideo
`)}
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
referenceVideo
`)}
error=
{
Boolean
(
error=
{
Boolean
(
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
referenceVideo
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceVideo
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceVideo
)
}
)
}
helperText=
{
helperText=
{
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
referenceVideo
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceVideo
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
referenceVideo
}
}
...
@@ -380,12 +380,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -380,12 +380,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
placeholder=
"Enter Task Description"
placeholder=
"Enter Task Description"
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
description
`)}
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
description
`)}
error=
{
Boolean
(
error=
{
Boolean
(
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
description
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
description
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
description
)
}
)
}
helperText=
{
helperText=
{
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
description
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
description
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
description
}
}
...
@@ -401,12 +401,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -401,12 +401,12 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
placeholder=
"Enter Task How To Do"
placeholder=
"Enter Task How To Do"
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
howToDo
`)}
{
...
getFieldProps
(`
taskItems
.
$
{
index
}
.
howToDo
`)}
error=
{
Boolean
(
error=
{
Boolean
(
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
howToDo
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
howToDo
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
howToDo
)
}
)
}
helperText=
{
helperText=
{
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
.
howToDo
&&
touched
.
taskItems
&&
touched
.
taskItems
[
index
]
&&
//@ts-ignore
//@ts-ignore
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
howToDo
errors
.
taskItems
&&
errors
.
taskItems
[
index
]
&&
errors
.
taskItems
[
index
].
howToDo
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment