Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
embl.org
html-sites
embl-jobs-pages
Commits
bea46076
Commit
bea46076
authored
Jun 18, 2021
by
Nitin Jadhav
Browse files
implemented testimony updates
parent
f8002de6
Pipeline
#167545
passed with stages
in 6 minutes and 15 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
49 deletions
+54
-49
src/components/job-details/Testimony.jsx
src/components/job-details/Testimony.jsx
+54
-49
No files found.
src/components/job-details/Testimony.jsx
View file @
bea46076
import
BioInformaticsMateus
from
"
images/patricio-mateus.jpg
"
;
import
{
parseGrade
}
from
"
../../helpers/helpers
"
;
export
default
function
Testimony
({
job
=
{}
})
{
const
{
field_jobs_type
:
jobType
,
title
}
=
job
;
// format of job grade string is "5 - 6 (monthly salary starting at $1234)". This converts it into a number
const
jobGrade
=
parseGrade
(
job
.
field_jobs_advertise_grade
);
// only if its a leader and grade is >= 9
if
(
title
?.
toLowerCase
()?.
includes
(
"
team leader
"
)
&&
jobGrade
>=
9
)
{
const
TestimonyComponent
=
({
image
,
quote
,
author
})
=>
{
return
(
<
section
className
=
"embl-grid embl-grid--has-sidebar"
data
-
vf
-
google
-
analytics
-
region
=
"description-staff-image"
itemProp
=
"description"
>
<
div
>
{
/* empty */
}
</
div
>
<
div
className
=
"vf-content"
>
<
figure
className
=
"vf-figure"
>
<
img
className
=
"vf-figure__image"
src
=
{
image
}
alt
=
"Image of EMBL-EBI staff member at her desk"
loading
=
"lazy"
/>
<
figcaption
className
=
"vf-figure__caption vf-blockquote"
>
"
{
quote
}
"
<
br
/>
{
author
}
</
figcaption
>
</
figure
>
</
div
>
</
section
>
);
};
const
AndyYatesTestimony
=
(
<
TestimonyComponent
image
=
{
"
https://www.ebi.ac.uk/sites/ebi.ac.uk/files/groups/external_relations/images/Jobs/YATES_Andy_DiNA_EMBL-EBI_2016.jpg
"
...
...
@@ -17,7 +36,17 @@ export default function Testimony({ job = {} }) {
quote
=
"We have a lot of smart people here. I really enjoy making sure they have the right environment to maximise their potential."
author
=
"Andy Yates, Team Leader"
/>
);
);
export
default
function
Testimony
({
job
=
{}
})
{
const
{
field_jobs_type
:
jobType
}
=
job
;
// format of job grade string is "5 - 6 (monthly salary starting at $1234)". This converts it into a number
const
jobGrade
=
parseGrade
(
job
.
field_jobs_advertise_grade
);
// only if its a leader and grade is >= 9
if
(
jobType
.
includes
(
"
Science Faculty
"
)
&&
jobGrade
>=
9
)
{
return
AndyYatesTestimony
;
}
if
(
jobType
.
includes
(
"
Software Development
"
))
{
...
...
@@ -46,6 +75,8 @@ export default function Testimony({ job = {} }) {
author
=
"Ken Hawkins, Web Designer"
/>
);
}
else
if
(
jobGrade
===
8
)
{
return
AndyYatesTestimony
;
}
}
if
(
jobType
.
includes
(
"
IT and Infrastructure
"
))
{
...
...
@@ -62,10 +93,8 @@ export default function Testimony({ job = {} }) {
/>
);
}
if
(
jobType
.
includes
(
"
Bioinformatics
"
)
&&
(
jobGrade
===
5
||
jobGrade
===
6
)
)
{
if
(
jobType
.
includes
(
"
Bioinformatics
"
))
{
if
(
jobGrade
===
5
||
jobGrade
===
6
)
{
return
(
<
TestimonyComponent
image
=
{
BioInformaticsMateus
}
...
...
@@ -76,6 +105,9 @@ export default function Testimony({ job = {} }) {
author
=
"Mateus Patricio, Bioinformatician"
/>
);
}
else
if
(
jobGrade
===
7
||
jobGrade
===
8
)
{
return
AndyYatesTestimony
;
}
}
if
(
jobType
.
includes
(
"
Postdoctoral Fellowship
"
)
||
...
...
@@ -107,30 +139,3 @@ export default function Testimony({ job = {} }) {
}
return
null
;
}
const
TestimonyComponent
=
({
image
,
quote
,
author
})
=>
{
return
(
<
section
className
=
"embl-grid embl-grid--has-sidebar"
data
-
vf
-
google
-
analytics
-
region
=
"description-staff-image"
itemProp
=
"description"
>
<
div
>
{
/* empty */
}
</
div
>
<
div
className
=
"vf-content"
>
<
figure
className
=
"vf-figure"
>
<
img
className
=
"vf-figure__image"
src
=
{
image
}
alt
=
"Image of EMBL-EBI staff member at her desk"
loading
=
"lazy"
/>
<
figcaption
className
=
"vf-figure__caption vf-blockquote"
>
"
{
quote
}
"
<
br
/>
{
author
}
</
figcaption
>
</
figure
>
</
div
>
</
section
>
);
};
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