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
3feec0c2
Commit
3feec0c2
authored
Aug 30, 2023
by
janithgamage1.ed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
Desc : update project
parent
e8822483
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
2 deletions
+74
-2
Project/Frontend/SignConnectPlus/src/pages/parameter/tutorial-management/list/types/types.tsx
.../pages/parameter/tutorial-management/list/types/types.tsx
+2
-0
Project/Frontend/SignConnectPlus/src/sections/parameters/tutorial-management/AddEditTutorial.tsx
...ctions/parameters/tutorial-management/AddEditTutorial.tsx
+72
-2
No files found.
Project/Frontend/SignConnectPlus/src/pages/parameter/tutorial-management/list/types/types.tsx
View file @
3feec0c2
...
@@ -4,6 +4,7 @@ export interface dataProps {
...
@@ -4,6 +4,7 @@ export interface dataProps {
_id
:
number
|
string
|
undefined
;
_id
:
number
|
string
|
undefined
;
tutorialCode
:
String
;
tutorialCode
:
String
;
tutorialTitle
:
String
;
tutorialTitle
:
String
;
tutorialDescription
:
String
;
tutorialImage
:
String
;
tutorialImage
:
String
;
status
:
Number
;
status
:
Number
;
createdBy
:
String
;
createdBy
:
String
;
...
@@ -23,6 +24,7 @@ export interface tutorialProps {
...
@@ -23,6 +24,7 @@ export interface tutorialProps {
_id
:
number
|
string
|
undefined
;
_id
:
number
|
string
|
undefined
;
tutorialCode
:
String
;
tutorialCode
:
String
;
tutorialTitle
:
String
;
tutorialTitle
:
String
;
tutorialDescription
:
String
;
tutorialImage
:
String
;
tutorialImage
:
String
;
status
:
Number
;
status
:
Number
;
createdBy
:
String
;
createdBy
:
String
;
...
...
Project/Frontend/SignConnectPlus/src/sections/parameters/tutorial-management/AddEditTutorial.tsx
View file @
3feec0c2
...
@@ -26,6 +26,7 @@ import IconButton from 'components/@extended/IconButton';
...
@@ -26,6 +26,7 @@ import IconButton from 'components/@extended/IconButton';
// assets
// assets
import
{
DeleteFilled
}
from
'
@ant-design/icons
'
;
import
{
DeleteFilled
}
from
'
@ant-design/icons
'
;
import
{
InputLabel
,
TextField
}
from
'
@mui/material
'
;
import
AlertTutorialDelete
from
'
./AlertTutorialDelete
'
;
import
AlertTutorialDelete
from
'
./AlertTutorialDelete
'
;
// types
// types
...
@@ -35,6 +36,20 @@ const getInitialValues = (tutorial: FormikValues | null) => {
...
@@ -35,6 +36,20 @@ const getInitialValues = (tutorial: FormikValues | null) => {
const
newTutorial
=
{
const
newTutorial
=
{
_id
:
undefined
,
_id
:
undefined
,
tutorialCode
:
""
,
tutorialTitle
:
""
,
tutorialImage
:
""
,
tutorialDescription
:
""
,
taskItems
:
[
{
_id
:
undefined
,
title
:
""
,
description
:
""
,
howToDo
:
""
,
referenceImage
:
""
,
referenceVideo
:
""
,
}
]
}
}
if
(
tutorial
)
{
if
(
tutorial
)
{
...
@@ -51,6 +66,7 @@ export interface Props {
...
@@ -51,6 +66,7 @@ export interface Props {
_id
:
number
|
string
|
undefined
_id
:
number
|
string
|
undefined
tutorialCode
:
String
;
tutorialCode
:
String
;
tutorialTitle
:
String
;
tutorialTitle
:
String
;
tutorialDescription
:
String
;
tutorialImage
:
String
;
tutorialImage
:
String
;
status
:
Number
;
status
:
Number
;
createdBy
:
String
;
createdBy
:
String
;
...
@@ -105,8 +121,8 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -105,8 +121,8 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
}
}
});
});
//
const { errors, touched, handleSubmit, isSubmitting, getFieldProps } = formik;
const
{
errors
,
touched
,
handleSubmit
,
isSubmitting
,
getFieldProps
}
=
formik
;
const
{
handleSubmit
,
isSubmitting
}
=
formik
;
// const { handleSubmit, isSubmitting
} = formik;
return
(
return
(
<>
<>
...
@@ -119,6 +135,60 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
...
@@ -119,6 +135,60 @@ const AddEditTutorial = ({ tutorial, onCancel }: Props) => {
<
Grid
container
spacing=
{
3
}
>
<
Grid
container
spacing=
{
3
}
>
<
Grid
item
xs=
{
12
}
md=
{
12
}
>
<
Grid
item
xs=
{
12
}
md=
{
12
}
>
<
Grid
container
spacing=
{
3
}
>
<
Grid
container
spacing=
{
3
}
>
<
Grid
item
xs=
{
6
}
>
<
Stack
spacing=
{
1.25
}
>
<
InputLabel
htmlFor=
"tutorialCode"
>
Tutorial Code
</
InputLabel
>
<
TextField
fullWidth
id=
"tutorialCode"
placeholder=
"Enter Tutorial Code"
{
...
getFieldProps
('
tutorialCode
')}
error=
{
Boolean
(
touched
.
tutorialCode
&&
errors
.
tutorialCode
)
}
helperText=
{
touched
.
tutorialCode
&&
errors
.
tutorialCode
}
/>
</
Stack
>
</
Grid
>
<
Grid
item
xs=
{
6
}
>
<
Stack
spacing=
{
1.25
}
>
<
InputLabel
htmlFor=
"tutorialTitle"
>
Tutorial Title
</
InputLabel
>
<
TextField
fullWidth
id=
"tutorialTitle"
placeholder=
"Enter Tutorial Title"
{
...
getFieldProps
('
tutorialTitle
')}
error=
{
Boolean
(
touched
.
tutorialTitle
&&
errors
.
tutorialTitle
)
}
helperText=
{
touched
.
tutorialTitle
&&
errors
.
tutorialTitle
}
/>
</
Stack
>
</
Grid
>
<
Grid
item
xs=
{
12
}
>
<
Stack
spacing=
{
1.25
}
>
<
InputLabel
htmlFor=
"tutorialImage"
>
Tutorial Image
</
InputLabel
>
<
TextField
fullWidth
id=
"tutorialImage"
placeholder=
"Enter Tutorial Image"
{
...
getFieldProps
('
tutorialImage
')}
error=
{
Boolean
(
touched
.
tutorialImage
&&
errors
.
tutorialImage
)
}
helperText=
{
touched
.
tutorialImage
&&
errors
.
tutorialImage
}
/>
</
Stack
>
</
Grid
>
<
Grid
item
xs=
{
12
}
>
<
Stack
spacing=
{
1.25
}
>
<
InputLabel
htmlFor=
"tutorialDescription"
>
Tutorial Description
</
InputLabel
>
<
TextField
multiline
rows=
{
2
}
fullWidth
id=
"tutorialDescription"
placeholder=
"Enter Tutorial Description"
{
...
getFieldProps
('
tutorialDescription
')}
error=
{
Boolean
(
touched
.
tutorialDescription
&&
errors
.
tutorialDescription
)
}
helperText=
{
touched
.
tutorialDescription
&&
errors
.
tutorialDescription
}
/>
</
Stack
>
</
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