Commit bea46076 authored by Nitin Jadhav's avatar Nitin Jadhav
Browse files

implemented testimony updates

parent f8002de6
Pipeline #167545 passed with stages
in 6 minutes and 15 seconds
import BioInformaticsMateus from "images/patricio-mateus.jpg";
import { parseGrade } from "../../helpers/helpers";
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"
}
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, title } = 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 (title?.toLowerCase()?.includes("team leader") && jobGrade >= 9) {
return (
<TestimonyComponent
image={
"https://www.ebi.ac.uk/sites/ebi.ac.uk/files/groups/external_relations/images/Jobs/YATES_Andy_DiNA_EMBL-EBI_2016.jpg"
}
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"
/>
);
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,20 +93,21 @@ export default function Testimony({ job = {} }) {
/>
);
}
if (
jobType.includes("Bioinformatics") &&
(jobGrade === 5 || jobGrade === 6)
) {
return (
<TestimonyComponent
image={BioInformaticsMateus}
quote="I often find myself involved with completely new tasks that
if (jobType.includes("Bioinformatics")) {
if (jobGrade === 5 || jobGrade === 6) {
return (
<TestimonyComponent
image={BioInformaticsMateus}
quote="I often find myself involved with completely new tasks that
require me to be dynamic and learn a whole new set of skills. You
arrive here with a set of skills and knowledge, but you will
probably leave having learned a lot more."
author="Mateus Patricio, Bioinformatician"
/>
);
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>
);
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment