Testimony.jsx 4.96 KB
Newer Older
Nitin Jadhav's avatar
Nitin Jadhav committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
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) {
    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("Software Development")) {
    // Grade 4, 5
    if (jobGrade === 4 || jobGrade === 5) {
      return (
        <TestimonyComponent
          image={
            "https://acxngcvroo.cloudimg.io/v7/https://www.embl.org/files/wp-content/uploads/THORMAN_Anja_EMBL-EBI_2016.jpeg.jpg"
          }
          quote="Since my first day at EMBL-EBI, I have cherished how friendly,
                helpful and talented everyone is. I particularly like the lively
                exchange of knowledge on campus."
          author="Anja Thormann, Software Developer, Variation team"
        />
      );
    } else if (jobGrade === 6 || jobGrade === 7) {
      return (
        <TestimonyComponent
          image={
            "https://acxngcvroo.cloudimg.io/v7/https://www.ebi.ac.uk/sites/ebi.ac.uk/files/groups/external_relations/images/Jobs/HAWKINS_Ken_EMBL-EBI_2016.jpg"
          }
          quote="Theres a lot of opportunity to design for the need of content
                and users, and to use web tools to understand how users engage
                with content."
          author="Ken Hawkins, Web Designer"
        />
      );
    }
  }
  if (jobType.includes("IT and Infrastructure")) {
    return (
      <TestimonyComponent
        image={
          "https://acxngcvroo.cloudimg.io/v7/https://www.ebi.ac.uk/sites/ebi.ac.uk/files/groups/communications/Tim%20Dyce%20copy%20770x289.jpg"
        }
        quote="What EMBL-EBI does is extremely positive and I wanted to be a
              part of that. Throughout my career, Ive always tried to take on
              roles where I can go home in the evenings feeling I have done
              something to support an organisation that seeks to be altruistic."
        author="Tim Dyce, Head of Infrastructure Services"
      />
    );
  }
  if (
    jobType.includes("Bioinformatics") &&
    (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"
      />
    );
  }
  if (
    jobType.includes("Postdoctoral Fellowship") ||
    jobType.includes("Predoctoral Fellowship")
  ) {
    return (
      <TestimonyComponent
        image={
          "https://www.ebi.ac.uk/sites/ebi.ac.uk/files/resize/groups/external_relations/images/People/Sara_Saheb_Kashaf_PhD1-770x289.jpg"
        }
        quote="Environment matters a lot more than you think. I picked my
              supervisors primarily based on the research coming out of their
              groups. I didnt expect that they would also turn out to be
              amazing mentors."
        author="Sara Saheb Kashaf, PhD student"
      />
    );
  }
  if (jobType.includes("Administration")) {
    return (
      <TestimonyComponent
        image={
          "https://www.ebi.ac.uk/sites/ebi.ac.uk/files/groups/external_relations/images/People/Gemma_Wood_770x400.jpeg"
        }
        quote="People get satisfaction out of seeing their work make a difference, so I encourage my team to look at outcomes and impact."
        author="Gemma Wood, Head of Communications"
      />
    );
  }
  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>
  );
};