Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend-MECRED
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
MECRED
Frontend-MECRED
Commits
93d32af5
Commit
93d32af5
authored
7 months ago
by
Richard Fernando Heise Ferreira
Browse files
Options
Downloads
Patches
Plain Diff
HOTFIX: resource metadata aligment
parent
5ddc7620
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#40264
passed
7 months ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/recurso/[id]/components/metrics.js
+1
-1
1 addition, 1 deletion
src/app/recurso/[id]/components/metrics.js
src/app/recurso/[id]/components/specifications.js
+12
-17
12 additions, 17 deletions
src/app/recurso/[id]/components/specifications.js
with
13 additions
and
18 deletions
src/app/recurso/[id]/components/metrics.js
+
1
−
1
View file @
93d32af5
...
@@ -33,7 +33,7 @@ export default function Specifications({ learningObject }) {
...
@@ -33,7 +33,7 @@ export default function Specifications({ learningObject }) {
return
(
return
(
<
div
className
=
"
flex flex-col p-1 text-main-text
"
>
<
div
className
=
"
flex flex-col p-1 text-main-text
"
>
<
div
className
=
"
font-bold text-lg
"
>
Métricas
deste
Recurso
<
/div
>
<
div
className
=
"
font-bold text-lg
"
>
Métricas
deste
Recurso
<
/div
>
<
div
className
=
"
text-
lg
grid grid-cols-1 sm:grid-cols-2
"
>
<
div
className
=
"
text-
sm
grid grid-cols-1 sm:grid-cols-2
"
>
{
metricInfo
.
map
(
genMetric
)}
{
metricInfo
.
map
(
genMetric
)}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
src/app/recurso/[id]/components/specifications.js
+
12
−
17
View file @
93d32af5
...
@@ -7,19 +7,14 @@ import IconTheme from "@/app/MECRED_recursos_tematica.svg";
...
@@ -7,19 +7,14 @@ import IconTheme from "@/app/MECRED_recursos_tematica.svg";
const
genSpecification
=
({
icon
,
name
,
data
})
=>
{
const
genSpecification
=
({
icon
,
name
,
data
})
=>
{
return
(
return
(
<
div
key
=
{
name
}
className
=
"
p-0 flex items-center
"
>
<
div
key
=
{
name
}
className
=
"
flex items-start
"
>
<
div
className
=
"
p-2 text-main-text
"
>
<
div
className
=
"
pt-2 text-main-text
"
>
{
icon
}
<
/div
>
{
icon
}
<
div
className
=
"
p-2 text-main-text font-bold whitespace-nowrap
"
>
{
name
}:
<
/div
>
<
/div
>
<
div
className
=
"
p-2 text-main-text
"
>
{
data
}
<
/div
>
<
div
className
=
"
text-main-text font-bold
"
>
{
name
}:
<
/div
>
<
div
className
=
"
m-1 text-main-text
"
>
{
data
}
<
/div
>
<
/div
>
<
/div
>
);
);
}
};
function
formatSize
(
size
)
{
function
formatSize
(
size
)
{
if
(
size
<
1000
)
if
(
size
<
1000
)
...
@@ -34,16 +29,16 @@ function formatSize(size) {
...
@@ -34,16 +29,16 @@ function formatSize(size) {
export
default
function
Specifications
({
learningObject
})
{
export
default
function
Specifications
({
learningObject
})
{
const
specInfo
=
[
const
specInfo
=
[
{
icon
:
<
IconLocation
/>
,
enabled
:
true
,
name
:
"
Idioma
"
,
data
:
learningObject
.
language
.
map
((
lang
)
=>
lang
.
name
).
join
(
"
,
"
)
??
"
Não Informado
"
},
{
icon
:
<
IconLocation
className
=
'
mr-2
'
/>
,
enabled
:
true
,
name
:
"
Idioma
"
,
data
:
learningObject
.
language
.
map
((
lang
)
=>
lang
.
name
).
join
(
"
,
"
)
??
"
Não Informado
"
},
{
icon
:
<
IconLevel
/>
,
enabled
:
true
,
name
:
"
Nível de Ensino
"
,
data
:
learningObject
.
educational_stages
.
map
((
stage
)
=>
stage
.
name
).
join
(
"
,
"
)
},
{
icon
:
<
IconLevel
className
=
'
mr-2
'
/>
,
enabled
:
true
,
name
:
"
Nível de Ensino
"
,
data
:
learningObject
.
educational_stages
.
map
((
stage
)
=>
stage
.
name
).
join
(
"
,
"
)
},
{
icon
:
<
IconMedia
/>
,
enabled
:
true
,
name
:
"
Tipo de Mídia
"
,
data
:
learningObject
.
object_type
},
{
icon
:
<
IconMedia
style
=
{{
transform
:
"
scale(0.85)
"
}}
/>, enabled: true, name: "Tipo de Mídia", data: learningObject.object_type }
,
{
icon
:
<
IconTheme
/>
,
enabled
:
true
,
name
:
"
Temática
"
,
data
:
learningObject
.
subjects
.
map
((
subject
)
=>
subject
.
name
).
join
(
"
,
"
)
},
{
icon
:
<
IconTheme
className
=
'
mr-1
'
/>
,
enabled
:
true
,
name
:
"
Temática
"
,
data
:
learningObject
.
subjects
.
map
((
subject
)
=>
subject
.
name
).
join
(
"
,
"
)
},
{
icon
:
<
IconSize
/>
,
enabled
:
!
learningObject
.
link
,
name
:
"
Tamanho
"
,
data
:
formatSize
(
learningObject
?.
attachments
[
0
]?.
size
)
},
{
icon
:
<
IconSize
className
=
'
mr-2
'
style
=
{{
transform
:
"
scale(1.15)
"
}}
/>, enabled: !learningObject.link, name: "Tamanho", data: formatSize
(
learningObject
?
.attachments
[
0
]?
.size
)
}
,
];
];
return
(
return
(
<
div
className
=
"
flex flex-col p-1 text-main-text
"
>
<
div
className
=
"
flex flex-col p-1 text-main-text
"
>
<
div
className
=
"
font-bold text-lg
"
>
Especificações
deste
Recurso
<
/div
>
<
div
className
=
"
font-bold text-lg
"
>
Especificações
deste
Recurso
<
/div
>
<
div
className
=
"
text-
lg
grid grid-cols-1 sm:grid-cols-2
"
>
<
div
className
=
"
text-
sm
grid grid-cols-1 sm:grid-cols-2
"
>
{
specInfo
.
filter
(
s
=>
s
.
enabled
).
map
(
genSpecification
)}
{
specInfo
.
filter
(
s
=>
s
.
enabled
).
map
(
genSpecification
)}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
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