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
2ae4f7cc
Commit
2ae4f7cc
authored
Aug 30, 2023
by
janithgamage1.ed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
desc : update project
parent
1d1620d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
2 deletions
+60
-2
Project/Frontend/SignConnectPlus/src/sections/parameters/curriculum-management/AddEditCurriculum.tsx
...ns/parameters/curriculum-management/AddEditCurriculum.tsx
+60
-2
No files found.
Project/Frontend/SignConnectPlus/src/sections/parameters/curriculum-management/AddEditCurriculum.tsx
View file @
2ae4f7cc
...
@@ -2,6 +2,7 @@ import { useState } from 'react';
...
@@ -2,6 +2,7 @@ import { useState } from 'react';
// material-ui
// material-ui
import
{
import
{
Box
,
Button
,
Button
,
DialogActions
,
DialogActions
,
DialogContent
,
DialogContent
,
...
@@ -19,7 +20,7 @@ import { LocalizationProvider } from '@mui/x-date-pickers';
...
@@ -19,7 +20,7 @@ import { LocalizationProvider } from '@mui/x-date-pickers';
import
{
AdapterDateFns
}
from
'
@mui/x-date-pickers/AdapterDateFns
'
;
import
{
AdapterDateFns
}
from
'
@mui/x-date-pickers/AdapterDateFns
'
;
// third-party
// third-party
import
{
Form
,
FormikProvider
,
FormikValues
,
useFormik
}
from
'
formik
'
;
import
{
F
ieldArray
,
F
orm
,
FormikProvider
,
FormikValues
,
useFormik
}
from
'
formik
'
;
import
_
from
'
lodash
'
;
import
_
from
'
lodash
'
;
import
*
as
Yup
from
'
yup
'
;
import
*
as
Yup
from
'
yup
'
;
...
@@ -28,6 +29,7 @@ import IconButton from 'components/@extended/IconButton';
...
@@ -28,6 +29,7 @@ import IconButton from 'components/@extended/IconButton';
// assets
// assets
import
{
DeleteFilled
}
from
'
@ant-design/icons
'
;
import
{
DeleteFilled
}
from
'
@ant-design/icons
'
;
import
MainCard
from
'
components/MainCard
'
;
import
AlertCurriculumDelete
from
'
./AlertCurriculumDelete
'
;
import
AlertCurriculumDelete
from
'
./AlertCurriculumDelete
'
;
// types
// types
...
@@ -106,7 +108,7 @@ const AddEditCurriculum = ({ curriculum, onCancel }: Props) => {
...
@@ -106,7 +108,7 @@ const AddEditCurriculum = ({ curriculum, onCancel }: Props) => {
}
}
});
});
const
{
errors
,
touched
,
handleSubmit
,
isSubmitting
,
getFieldProps
}
=
formik
;
const
{
errors
,
touched
,
handleSubmit
,
isSubmitting
,
getFieldProps
,
values
}
=
formik
;
// const { handleSubmit, isSubmitting } = formik;
// const { handleSubmit, isSubmitting } = formik;
return
(
return
(
...
@@ -187,6 +189,62 @@ const AddEditCurriculum = ({ curriculum, onCancel }: Props) => {
...
@@ -187,6 +189,62 @@ const AddEditCurriculum = ({ curriculum, onCancel }: Props) => {
/>
/>
</
Stack
>
</
Stack
>
</
Grid
>
</
Grid
>
<
Grid
item
xs=
{
12
}
>
<
FieldArray
name=
"tutorials"
>
{
({
insert
,
remove
,
push
,
})
=>
{
return
(
<>
<
MainCard
content=
{
false
}
title=
"Tutorials"
sx=
{
{
'
& .MuiInputLabel-root
'
:
{
fontSize
:
'
0.875rem
'
}
}
}
secondary=
{
<
Button
style=
{
{
float
:
"
right
"
}
}
onClick=
{
()
=>
push
(
""
)
}
variant=
"contained"
>
Add Tutorial
</
Button
>
}
>
<
Box
sx=
{
{
p
:
2.5
}
}
>
<
Grid
container
spacing=
{
3
}
>
{
values
.
tutorials
.
length
>
0
&&
values
.
tutorials
.
map
((
item
,
index
)
=>
{
return
(
<>
<
Grid
item
xs=
{
11
}
>
<
Stack
spacing=
{
1.25
}
>
<
InputLabel
htmlFor=
{
`tutorials.${index}`
}
>
Tutorial
</
InputLabel
>
<
TextField
fullWidth
id=
{
`tutorials.${index}`
}
placeholder=
"Enter Tutorial"
{
...
getFieldProps
(`
tutorials
.
$
{
index
}`)}
// error=
{
Boolean
(
touched
.
ingredientNutritions
![
index
]
.
nutritionCategory
&&
errors
.
ingredientNutritions
![
index
]
.
nutritionCategory
)}
// helperText=
{
touched
.
ingredientNutritions
![
index
]
.
nutritionCategory
&&
errors
.
ingredientNutritions
![
index
]
.
nutritionCategory
}
/>
</
Stack
>
</
Grid
>
<
Grid
item
xs=
{
1
}
style=
{
{
marginTop
:
"
4%
"
}
}
>
<
Tooltip
title=
"Delete Nutrition"
placement=
"right-start"
>
<
IconButton
onClick=
{
()
=>
{
remove
(
index
)
}
}
size=
"large"
color=
"error"
>
<
DeleteFilled
/>
</
IconButton
>
</
Tooltip
>
</
Grid
>
</>
)
})
}
</
Grid
>
</
Box
>
</
MainCard
>
</>
)
}
}
</
FieldArray
>
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
...
...
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