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
dec84279
Commit
dec84279
authored
Sep 01, 2023
by
janithgamage1.ed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
Desc : update project
parent
5717066a
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
271 deletions
+49
-271
Project/Frontend/SignConnectPlus/src/data/status.ts
Project/Frontend/SignConnectPlus/src/data/status.ts
+17
-0
Project/Frontend/SignConnectPlus/src/pages/learning-management/learning-curriculums/list/list.tsx
...es/learning-management/learning-curriculums/list/list.tsx
+20
-186
Project/Frontend/SignConnectPlus/src/sections/learning-management/learning-curriculums/CurriculumCard.tsx
...arning-management/learning-curriculums/CurriculumCard.tsx
+6
-42
Project/Frontend/SignConnectPlus/src/sections/learning-management/learning-curriculums/CurriculumPreview.tsx
...ing-management/learning-curriculums/CurriculumPreview.tsx
+6
-43
No files found.
Project/Frontend/SignConnectPlus/src/data/status.ts
0 → 100644
View file @
dec84279
export
interface
StatusType
{
id
:
number
code
:
string
description
:
string
}
// ==============================|| DATA - Status ||============================== //
const
status
:
readonly
StatusType
[]
=
[
{
id
:
1
,
code
:
"
Active
"
,
description
:
"
Active
"
},
{
id
:
2
,
code
:
"
New
"
,
description
:
"
New
"
},
{
id
:
3
,
code
:
"
Pending
"
,
description
:
"
Pending
"
},
{
id
:
4
,
code
:
"
Hold
"
,
description
:
"
Hold
"
},
{
id
:
5
,
code
:
"
Rejected
"
,
description
:
"
Rejected
"
},
];
export
default
status
;
Project/Frontend/SignConnectPlus/src/pages/learning-management/learning-curriculums/list/list.tsx
View file @
dec84279
This diff is collapsed.
Click to expand it.
Project/Frontend/SignConnectPlus/src/sections/learning-management/learning-curriculums/CurriculumCard.tsx
View file @
dec84279
...
...
@@ -28,49 +28,13 @@ import { MoreOutlined } from '@ant-design/icons';
import
Avatar
from
'
components/@extended/Avatar
'
;
import
curriculumLevels
from
'
data/curriculumLevels
'
;
import
CurriculumPreview
from
'
./CurriculumPreview
'
;
import
{
curriculumType
}
from
'
types/curriculum
'
;
// types
export
interface
curriculumCardProps
{
_id
:
number
|
string
|
undefined
;
curriculumCode
:
string
;
curriculumLevel
:
number
;
curriculumName
:
string
;
curriculumDescription
:
string
;
curriculumImage
:
string
;
tutorials
?:
tutorialItemProps
[];
status
?:
number
;
createdBy
?:
string
;
updatedBy
?:
string
;
createdAt
?:
Date
;
updatedAt
?:
Date
;
}
export
interface
tutorialItemProps
{
_id
:
number
|
string
|
undefined
;
tutorialCode
:
string
;
tutorialTitle
:
string
;
tutorialDescription
:
string
;
tutorialImage
:
string
;
status
?:
number
;
createdBy
?:
string
;
updatedBy
?:
string
;
createdAt
?:
Date
;
updatedAt
?:
Date
;
taskItems
?:
taskItemProps
[]
}
export
interface
taskItemProps
{
_id
:
number
|
string
|
undefined
;
title
:
string
;
description
:
string
;
howToDo
:
string
;
referenceImage
:
string
;
referenceVideo
:
string
;
}
// ==============================|| CURRICULUM - CARD ||============================== //
const
CurriculumCard
=
({
curriculum
}:
{
curriculum
:
curriculum
CardProps
})
=>
{
const
CurriculumCard
=
({
curriculum
}:
{
curriculum
:
curriculum
Type
})
=>
{
const
[
open
,
setOpen
]
=
useState
(
false
);
const
handleClickOpen
=
()
=>
{
...
...
@@ -105,10 +69,10 @@ const CurriculumCard = ({ curriculum }: { curriculum: curriculumCardProps }) =>
}
>
<
ListItemAvatar
>
<
Avatar
alt=
{
curriculum
.
curriculum
Nam
e
!
}
src=
{
curriculum
.
curriculumImage
!
}
/>
<
Avatar
alt=
{
curriculum
.
curriculum
Titl
e
!
}
src=
{
curriculum
.
curriculumImage
!
}
/>
</
ListItemAvatar
>
<
ListItemText
primary=
{
<
Typography
variant=
"subtitle1"
>
{
curriculum
.
curriculum
Nam
e
}
</
Typography
>
}
primary=
{
<
Typography
variant=
"subtitle1"
>
{
curriculum
.
curriculum
Titl
e
}
</
Typography
>
}
secondary=
{
<
Typography
variant=
"caption"
color=
"secondary"
>
{
curriculumLevels
.
find
(
level
=>
level
.
id
===
curriculum
.
curriculumLevel
)?.
description
||
""
}
...
...
@@ -137,7 +101,7 @@ const CurriculumCard = ({ curriculum }: { curriculum: curriculumCardProps }) =>
>
<
MenuItem
sx=
{
{
a
:
{
textDecoration
:
'
none
'
,
color
:
'
inherit
'
}
}
}
>
<
PDFDownloadLink
document=
{
<></>
}
fileName=
{
`${curriculum.curriculumCode}-${curriculum.curriculum
Nam
e}.pdf`
}
document=
{
<></>
}
fileName=
{
`${curriculum.curriculumCode}-${curriculum.curriculum
Titl
e}.pdf`
}
// document={<ListSmallCard customer={customer} />} fileName={`Customer-${customer.fatherName}.pdf`}
>
Export PDF
...
...
Project/Frontend/SignConnectPlus/src/sections/learning-management/learning-curriculums/CurriculumPreview.tsx
View file @
dec84279
...
...
@@ -33,50 +33,13 @@ import SimpleBar from 'components/third-party/SimpleBar';
// assets
import
{
DownloadOutlined
,
TagOutlined
}
from
'
@ant-design/icons
'
;
import
curriculumLevels
from
'
data/curriculumLevels
'
;
import
{
curriculumType
}
from
'
types/curriculum
'
;
// types
export
interface
curriculumCardProps
{
_id
:
number
|
string
|
undefined
;
curriculumCode
:
string
;
curriculumLevel
:
number
;
curriculumName
:
string
;
curriculumDescription
:
string
;
curriculumImage
:
string
;
tutorials
?:
tutorialItemProps
[];
status
?:
number
;
createdBy
?:
string
;
updatedBy
?:
string
;
createdAt
?:
Date
;
updatedAt
?:
Date
;
}
export
interface
tutorialItemProps
{
_id
:
number
|
string
|
undefined
;
tutorialCode
:
string
;
tutorialTitle
:
string
;
tutorialDescription
:
string
;
tutorialImage
:
string
;
status
?:
number
;
createdBy
?:
string
;
updatedBy
?:
string
;
createdAt
?:
Date
;
updatedAt
?:
Date
;
taskItems
?:
taskItemProps
[]
}
export
interface
taskItemProps
{
_id
:
number
|
string
|
undefined
;
title
:
string
;
description
:
string
;
howToDo
:
string
;
referenceImage
:
string
;
referenceVideo
:
string
;
}
// ==============================|| Curriculum - CARD PREVIEW ||============================== //
export
default
function
CurriculumPreview
({
curriculum
,
open
,
onClose
}:
{
curriculum
:
curriculum
CardProps
;
open
:
boolean
;
onClose
:
()
=>
void
})
{
export
default
function
CurriculumPreview
({
curriculum
,
open
,
onClose
}:
{
curriculum
:
curriculum
Type
;
open
:
boolean
;
onClose
:
()
=>
void
})
{
const
theme
=
useTheme
();
const
[
expanded
,
setExpanded
]
=
useState
<
string
|
false
>
(
'
panel0
'
);
...
...
@@ -104,7 +67,7 @@ export default function CurriculumPreview({ curriculum, open, onClose }: { curri
<
Stack
direction=
"row"
alignItems=
"center"
justifyContent=
"center"
spacing=
{
0
}
>
<
Tooltip
title=
"Export"
>
<
PDFDownloadLink
document=
{
<></>
}
fileName=
{
`${curriculum.curriculumCode}-${curriculum.curriculum
Nam
e}.pdf`
}
document=
{
<></>
}
fileName=
{
`${curriculum.curriculumCode}-${curriculum.curriculum
Titl
e}.pdf`
}
// document=
{<
ListCard
customer=
{
customer
}
/>
} fileName=
{
`Customer-${customer.fatherName}.pdf`
}
>
<
IconButton
color=
"secondary"
>
...
...
@@ -126,10 +89,10 @@ export default function CurriculumPreview({ curriculum, open, onClose }: { curri
}
>
<
ListItemAvatar
sx=
{
{
mr
:
0.75
}
}
>
<
Avatar
alt=
{
curriculum
.
curriculum
Nam
e
}
size=
"lg"
src=
{
curriculum
.
curriculumImage
}
/>
<
Avatar
alt=
{
curriculum
.
curriculum
Titl
e
}
size=
"lg"
src=
{
curriculum
.
curriculumImage
}
/>
</
ListItemAvatar
>
<
ListItemText
primary=
{
<
Typography
variant=
"h5"
>
{
curriculum
.
curriculum
Nam
e
}
</
Typography
>
}
primary=
{
<
Typography
variant=
"h5"
>
{
curriculum
.
curriculum
Titl
e
}
</
Typography
>
}
secondary=
{
<
Typography
color=
"secondary"
>
{
curriculumLevels
.
find
(
level
=>
level
.
id
===
curriculum
.
curriculumLevel
)?.
description
||
""
}
</
Typography
>
}
/>
</
ListItem
>
...
...
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