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
Expand all
Hide 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 {
import
usePagination
from
'
hooks/usePagination
'
;
import
CurriculumCard
from
'
sections/learning-management/learning-curriculums/CurriculumCard
'
;
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
{
GlobalFilter
}
from
'
utils/react-table
'
;
// types
// assets
import
{
curriculums
}
from
'
data/curriculums
'
;
// assets
// ==============================|| List ||============================== //
...
...
@@ -43,6 +45,9 @@ const allColumns = [
];
const
List
=
()
=>
{
const
dispatch
=
useDispatch
();
const
{
curriculums
,
error
,
success
,
isLoading
}
=
useSelector
(
state
=>
state
.
curriculum
);
const
[
data
,
setData
]
=
useState
<
curriculumType
[]
>
([])
const
matchDownSM
=
useMediaQuery
((
theme
:
Theme
)
=>
theme
.
breakpoints
.
down
(
'
sm
'
));
...
...
@@ -78,10 +83,60 @@ const List = () => {
setPage
(
p
);
_DATA
.
jump
(
p
);
};
/**
* API Config
* Curriculum API
*/
useEffect
(()
=>
{
dispatch
(
fetchCurriculums
());
},
[
dispatch
]);
useEffect
(()
=>
{
setData
(
curriculums
)
},
[])
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
(
<>
...
...
Project/Frontend/SignConnectPlus/src/pages/parameter/curriculum-management/list/list.tsx
View file @
9fe76f9e
...
...
@@ -300,8 +300,8 @@ const List = () => {
//alert model
const
[
openAlert
,
setOpenAlert
]
=
useState
(
false
);
const
[
curriculumId
,
setCurriculumId
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
[
curriculumTitle
,
setCurriculumTitle
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
[
curriculumId
,
setCurriculumId
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
[
curriculumTitle
,
setCurriculumTitle
]
=
useState
<
string
|
undefined
>
(
undefined
)
const
handleAlertClose
=
()
=>
{
setOpenAlert
(
!
openAlert
);
...
...
@@ -309,7 +309,7 @@ const List = () => {
/**
* API Config
*
Tutorial
API
*
Curriculum
API
*/
useEffect
(()
=>
{
dispatch
(
fetchCurriculums
());
...
...
Project/Frontend/SignConnectPlus/src/sections/parameters/tutorial-management/AddEditTutorial.tsx
View file @
9fe76f9e
This diff is collapsed.
Click to expand it.
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