Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PortalMEC-React
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
6f23caa6
Commit
6f23caa6
authored
4 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
its not static informations anymore
parent
ee5f5f18
No related branches found
Branches containing commit
No related tags found
Tags containing commit
6 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
,
!39
Update admin system
,
!32
Homologa
,
!31
Fix console error
,
!27
Training materials
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Components/AreasSubPages.js
+54
-14
54 additions, 14 deletions
src/Components/AreasSubPages.js
with
54 additions
and
14 deletions
src/Components/AreasSubPages.js
+
54
−
14
View file @
6f23caa6
...
@@ -16,7 +16,7 @@ GNU Affero General Public License for more details.
...
@@ -16,7 +16,7 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
import
React
,
{
Component
}
from
"
react
"
;
import
React
,
{
Component
,
useState
}
from
"
react
"
;
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
{
apiUrl
}
from
"
../env
"
;
import
{
apiUrl
}
from
"
../env
"
;
import
"
./carousel.css
"
;
import
"
./carousel.css
"
;
...
@@ -30,6 +30,10 @@ import colecoes from "../img/ilustra_colecoes.png";
...
@@ -30,6 +30,10 @@ import colecoes from "../img/ilustra_colecoes.png";
import
Grid
from
"
@material-ui/core/Grid
"
;
import
Grid
from
"
@material-ui/core/Grid
"
;
import
ResourceCardFunction
from
"
./ResourceCardFunction.js
"
;
import
ResourceCardFunction
from
"
./ResourceCardFunction.js
"
;
import
CollectionCardFunction
from
"
./CollectionCardFunction.js
"
;
import
CollectionCardFunction
from
"
./CollectionCardFunction.js
"
;
import
colecoes_obj
from
'
./FormationMaterialsResources/formationMaterials
'
;
import
ExpandedMaterial
from
'
./ExpandedMaterials
'
;
const
materials
=
colecoes_obj
();
const
areaStyle
=
{
const
areaStyle
=
{
paddingTop
:
"
5px
"
,
paddingTop
:
"
5px
"
,
...
@@ -60,6 +64,7 @@ class ReqResources extends Component {
...
@@ -60,6 +64,7 @@ class ReqResources extends Component {
var
row1
=
this
.
state
.
resources
.
slice
(
0
,
4
);
var
row1
=
this
.
state
.
resources
.
slice
(
0
,
4
);
var
row2
=
this
.
state
.
resources
.
slice
(
4
,
8
);
var
row2
=
this
.
state
.
resources
.
slice
(
4
,
8
);
var
row3
=
this
.
state
.
resources
.
slice
(
8
,
13
);
var
row3
=
this
.
state
.
resources
.
slice
(
8
,
13
);
return
(
return
(
<
Carousel
showThumbs
=
{
false
}
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
Carousel
showThumbs
=
{
false
}
infiniteLoop
=
{
true
}
showStatus
=
{
false
}
>
<
Row
style
=
{{
paddingBottom
:
"
5px
"
}}
>
<
Row
style
=
{{
paddingBottom
:
"
5px
"
}}
>
...
@@ -206,6 +211,16 @@ class ReqCollections extends Component {
...
@@ -206,6 +211,16 @@ class ReqCollections extends Component {
}
}
class
SubPages
extends
Component
{
class
SubPages
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
currMaterial
:
{
open
:
false
,
material
:
{}
},
};
}
areaRender
()
{
areaRender
()
{
switch
(
this
.
props
.
banner
)
{
switch
(
this
.
props
.
banner
)
{
case
"
Recursos
"
:
case
"
Recursos
"
:
...
@@ -254,6 +269,19 @@ class SubPages extends Component {
...
@@ -254,6 +269,19 @@ class SubPages extends Component {
<
/React.Fragment
>
<
/React.Fragment
>
);
);
case
"
Materiais
"
:
case
"
Materiais
"
:
const
HandleExpandMaterial
=
(
id
)
=>
{
console
.
log
(
id
);
this
.
setState
({
currMaterial
:
{
open
:
!
this
.
state
.
currMaterial
.
open
,
material
:
{
...
materials
[
id
]
}
}
})
console
.
log
(
this
.
state
.
currMaterial
)
}
return
(
return
(
<
React
.
Fragment
>
<
React
.
Fragment
>
<
div
style
=
{{
backgroundColor
:
"
#e81f4f
"
}}
>
<
div
style
=
{{
backgroundColor
:
"
#e81f4f
"
}}
>
...
@@ -297,22 +325,32 @@ class SubPages extends Component {
...
@@ -297,22 +325,32 @@ class SubPages extends Component {
showStatus
=
{
false
}
showStatus
=
{
false
}
>
>
<
Row
>
<
Row
>
<
Col
md
=
{
3
}
>
{
<
MaterialCard
name
=
"
oioi
"
/>
materials
.
map
((
material
,
index
)
=>
{
<
/Col
>
return
(
<
Col
md
=
{
3
}
>
<
Col
md
=
{
3
}
key
=
{
index
}
>
<
MaterialCard
name
=
"
oioi
"
/>
<
MaterialCard
<
/Col
>
name
=
{
material
.
name
}
<
Col
md
=
{
3
}
>
thumb
=
{
material
.
img
}
<
MaterialCard
name
=
"
oioi
"
/>
score
=
{
material
.
score
}
<
/Col
>
modules
=
{
material
.
topics
}
<
Col
md
=
{
3
}
>
handleExpand
=
{
HandleExpandMaterial
}
<
MaterialCard
name
=
"
oioi
"
/>
id
=
{
index
}
<
/Col
>
/
>
<
/Col
>
)
})
}
<
/Row
>
<
/Row
>
<
/Carousel
>
<
/Carousel
>
{
this
.
state
.
currMaterial
.
open
?
<
ExpandedMaterial
material
=
{
this
.
state
.
currMaterial
.
material
}
/
>
:
null
}
<
/Container
>
<
/Container
>
<
/React.Fragment
>
<
/React.Fragment
>
);
);
case
"
Colecoes
"
:
case
"
Colecoes
"
:
return
(
return
(
...
@@ -362,4 +400,6 @@ class SubPages extends Component {
...
@@ -362,4 +400,6 @@ class SubPages extends Component {
return
<
div
>
{
this
.
areaRender
()}
<
/div>
;
return
<
div
>
{
this
.
areaRender
()}
<
/div>
;
}
}
}
}
export
default
SubPages
;
export
default
SubPages
;
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