Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mapfor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
Mapfor
Commits
9f466b0c
Commit
9f466b0c
authored
Dec 8, 2021
by
Guiusepe
Browse files
Options
Downloads
Patches
Plain Diff
added the tutorial modal, still working on changes
parent
f4c8c7bf
No related branches found
No related tags found
2 merge requests
!54
Homologa
,
!43
Tutorial add tmp
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/FaixaComponent.js
+14
-4
14 additions, 4 deletions
src/components/FaixaComponent.js
src/components/TutorialModalComponent.js
+70
-0
70 additions, 0 deletions
src/components/TutorialModalComponent.js
with
84 additions
and
4 deletions
src/components/FaixaComponent.js
+
14
−
4
View file @
9f466b0c
...
...
@@ -26,6 +26,7 @@ import { useSelector, useDispatch } from 'react-redux';
import
TrainingModalComponent
from
'
./TrainingModalComponent.js
'
;
import
OfferModalComponent
from
'
./OfferModalComponent.js
'
;
import
DemandModalComponent
from
'
./DemandModalComponent.js
'
;
import
TutorialModalComponent
from
'
./TutorialModalComponent.js
'
;
import
Dropdown
from
'
./DropdownHeaderComponent.js
'
;
import
{
routes
}
from
'
../data/routes
'
;
import
'
../css/FaixaComponent.scss
'
;
...
...
@@ -48,9 +49,11 @@ function FaixaComponent() {
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
dropdown
,
setDropdown
]
=
useState
(
false
);
const
[
isOpen0
,
setIsOpen0
]
=
React
.
useState
(
false
);
const
[
isOpen1
,
setIsOpen1
]
=
React
.
useState
(
false
);
const
[
isOpen2
,
setIsOpen2
]
=
React
.
useState
(
false
);
const
[
isOpen3
,
setIsOpen3
]
=
React
.
useState
(
false
);
const
[
proxModal
,
setProxModal
]
=
React
.
useState
(
1
);
const
storeState
=
useSelector
(
state
=>
state
);
const
dispatch
=
useDispatch
();
...
...
@@ -60,15 +63,16 @@ function FaixaComponent() {
}
function
dropdownOpenModal
(
modalNum
)
{
setIsOpen0
(
true
);
switch
(
modalNum
)
{
case
1
:
set
IsOpen1
(
true
);
set
ProxModal
(
1
);
break
;
case
2
:
set
IsOpen2
(
true
);
set
ProxModal
(
2
);
break
;
case
3
:
set
IsOpen3
(
true
);
set
ProxModal
(
3
);
break
;
default
:
break
;
...
...
@@ -88,7 +92,13 @@ function FaixaComponent() {
return
(
<
Grid
container
className
=
{
`faixa-container
${
contrastSet
?
"
high-contrast-header
"
:
""
}
`
}
>
<
TutorialModalComponent
open
=
{
isOpen0
}
openFunction
=
{
setIsOpen0
}
closeModal
=
{
closeModal
}
contrast
=
{
contrastSet
}
next
=
{
proxModal
}
/
>
<
TrainingModalComponent
open
=
{
isOpen1
}
openFunction
=
{
setIsOpen1
}
...
...
This diff is collapsed.
Click to expand it.
src/components/TutorialModalComponent.js
0 → 100644
+
70
−
0
View file @
9f466b0c
import
React
from
'
react
'
;
import
Modal
from
'
react-modal
'
;
import
{
Grid
}
from
'
@material-ui/core
'
;
import
TrainingModalComponent
from
'
./TrainingModalComponent.js
'
;
import
OfferModalComponent
from
'
./OfferModalComponent.js
'
;
import
icon
from
'
../img/icon-formation.svg
'
;
import
iconClose
from
'
../img/close.svg
'
;
import
routes
from
'
../data/routes
'
;
import
'
../css/ModalComponents.scss
'
;
function
TutorialModalComponent
(
props
)
{
function
closeModal
(
openFunction
){
openFunction
(
false
);
}
const
[
isOpen1
,
setIsOpen1
]
=
React
.
useState
(
false
);
const
[
isOpen2
,
setIsOpen2
]
=
React
.
useState
(
false
);
function
prox
(
mod
)
{
console
.
log
(
mod
);
if
(
mod
===
1
){
setIsOpen1
(
true
);
}
else
if
(
mod
===
2
){
setIsOpen2
(
true
);
}
}
Modal
.
setAppElement
(
'
#root
'
);
const
contrastSet
=
props
.
contrast
;
return
(
<
Modal
className
=
{
`modal
${
contrastSet
?
"
high-contrast
"
:
""
}
`
}
overlayClassName
=
'
modal-overlay
'
isOpen
=
{
props
.
open
}
onRequestClose
=
{()
=>
props
.
closeModal
(
props
.
openFunction
)}
>
<
div
className
=
"
modal-header-container
"
>
<
button
onClick
=
{()
=>
{
props
.
closeModal
(
props
.
openFunction
);
prox
(
props
.
next
);
}}
>
<
img
alt
=
"
Fechar
"
src
=
{
iconClose
}
/
>
<
/button
>
<
img
className
=
"
icon
"
alt
=
"
Formação
"
src
=
{
icon
}
/
>
<
/div
>
<
h1
className
=
'
title
'
>
Tutorial
MapFOR
<
/h1
>
<
h2
className
=
'
subtitle
'
>
tutorial
do
site
<
/h2
>
<
h2
className
=
'
subtitle
'
>
{
props
.
next
}
<
/h2
>
<
TrainingModalComponent
open
=
{
isOpen1
}
openFunction
=
{
setIsOpen1
}
closeModal
=
{
closeModal
}
contrast
=
{
contrastSet
}
/
>
<
OfferModalComponent
open
=
{
isOpen2
}
openFunction
=
{
setIsOpen2
}
closeModal
=
{
closeModal
}
contrast
=
{
contrastSet
}
/
>
<
/Modal
>
)
}
export
default
TutorialModalComponent
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment