/**************************************************/
/** TRANSFER EQUIV GEN-ED GUIDE FOR SELECTED SCHOOL
/**************************************************/
class Guide extends React.Component {
  constructor(props) {
    super()
    this.state = { loaded: false, data: [], schoolId: props.match.params.schoolId }
  }
  componentDidMount() {
    callDb("/api/build.php?guide=" + this.state.schoolId, this);
  }
  render() {
    window.scrollTo(0,0);
    let date = new Date();
    let formattedDate = date.toLocaleString();
    let title = 'TRANSFER CREDIT GUIDE FOR ' + this.state.data['schoolName'];;
    let schoolName = '';
    let extraCiText = '';

    if (this.state.loaded) {
      if (this.state.data['schoolName'] == 'DELTA COLLEGE') {
        extraCiText = "Delta College Writing Intensive courses may apply. ";
      } else if (this.state.data['schoolName'] == 'KIRTLAND CC') {
        extraCiText = "Kirtland Community College's CI courses are HIS 20400 and HUM 20500. ";
      } else if (this.state.data['schoolName'] == 'MID MICHIGAN COLLEGE') {
        extraCiText = "Mid Michigan College's CI courses are HUM 200, SCI 200, and SSC 200. ";
      }
    } else {
      return (
        <div className="main row">
          <div className="col-lg-3">
            <Sidebar />
          </div>
          <div className="col-lg-9 text-center">
            <h2>Loading...</h2>
          </div>
        </div>
      )
    }
    return (
      <div className="main row">
        <div className="col-lg-3">
          <Sidebar />
        </div>
        <div className="col-lg-9">
          <div className="card">
            <div className="card-header text-center">
              <h2>{title}</h2>
              <p className="mb-0"><em>Report Run Date: {formattedDate}</em></p>
            </div>
            <div className="card-body">
              <p className="card-text">Basic Skills and General Education requirements for degree programs at Saginaw Valley State University.
                This guide is subject to change without notice. The SVSU catalog is the official document governing program and degree requirements and transfer credit policies.
              </p>
            </div>

            <hr />

            <div className="card-header"><h4 className="card-title text-center">Basic Skills</h4></div>
            <div className="card-body">
              <ul className="list-group list-group-flush">
                <li className="list-group-item">
                  Below are ways to satisfy SVSU's various Basic Skills requirements. For additional ACT/SAT placement information, 
                  please see our <a href="https://www.svsu.edu/orientation/transferstudents/">student orientation</a> and <a href="https://www.svsu.edu/testing/examsoffered/placementtesting/">placement testing</a> pages. 
                  Incoming students may also contact <a href="mailto:admissions@svsu.edu">admissions@svsu.edu</a> for related guidance.
                </li>
                <li className="list-group-item">
                  <strong>Composition - 1) </strong>
                  {this.state.data['BSENGL'] !== '' ? (
                    <span>{this.state.data['BSENGL']}</span>
                  ) : (
                    <span>N/A - Incoming students, please contact <a href="mailto:admissions@svsu.edu">admissions@svsu.edu</a> for related guidance.</span>
                  )}
                </li>
                <li className="list-group-item">
                  <strong>Mathematics - 1)</strong> ACT Math sub-score of 21 or higher OR SAT Math Section Test of 520 or higher <strong>or 2) </strong>
                  {this.state.data['BSMATH'] !== '' ? (
                    <span>{this.state.data['BSMATH']}</span>
                  ) : (
                    <span>N/A - Incoming students, please contact <a href="mailto:admissions@svsu.edu">admissions@svsu.edu</a> for related guidance.</span>
                  )}
                </li>
                <li className="list-group-item">
                  <strong>Reading - 1)</strong> Cumulative high school GPA of 3.00 or higher OR ACT Reading sub-score of 24 or higher OR SAT Reading Section Test of 480 or higher
                  <strong> 2)</strong> Students with 25 or more transferable credits and a <strong>cumulative</strong> 2.0 GPA from all of their <strong>college</strong> transcripts 
                    are exempted from Basic Skills Reading with all completed credits posted on official transcripts received for processing at SVSU at least one week before 
                    the student's SVSU orientation-registration appointment date, or <strong> 3)</strong> Test at SVSU.
                </li>
                <li className="list-group-item basic-skill-disclaimer text-center">
                  <strong>Additional Basic Skills courses may be required depending on placement test results and/or transfer credits.</strong>
                </li>
              </ul>
            </div>

            <hr />

            <div className="card-header"><h4 className="card-title text-center">General Education</h4></div>
            <div className="card-body">
              <ul className="list-group list-group-flush">
                <li className="list-group-item">The following are the {schoolName} courses that may be used to satisfy or partially satisfy the 10
                  General Education categories at SVSU. This guide may include courses that are currently inactive at {schoolName},
                  but that may appear on student transcripts. Please contact SVSU for inactive courses or newer courses not included on this guide.</li>
                <li className="list-group-item"><strong>1. Literature</strong> (3 cr.) - {this.state.data['GE1']} </li>
                <li className="list-group-item"><strong>2. Arts</strong> (3 cr.) - {this.state.data['GE2']}</li>
                <li className="list-group-item"><strong>3. Numerical Understanding</strong> (4 cr.) - {this.state.data['GE3']}</li>
                <li className="list-group-item"><strong>4. Natural Sciences</strong> (7 cr. from two SVSU departments, including one lab science course) - {this.state.data['GE4']}</li>
                <li className="list-group-item"><strong>5. History/Philosophy</strong> (3 cr.) - {this.state.data['GE5']}</li>
                <li className="list-group-item"><strong>6. Social Sciences</strong> (3 cr.) - {this.state.data['GE6']}</li>
                <li className="list-group-item"><strong>7. Social Institutions</strong> (3 cr.) - {this.state.data['GE7']}</li>
                <li className="list-group-item"><strong>8. International Systems</strong> (3 cr.) - {this.state.data['GE8']}</li>
                <li className="list-group-item"><strong>9. Oral Communication</strong> (3 cr.) - {this.state.data['GE9']}
                  {this.state.data['notation'] &&
                    <p className="mt-1 mb-0 text-muted">*Contact <a href="mailto:admissions@svsu.edu">admissions@svsu.edu</a> before taking this course for SVSU's General Education since some courses apply to GE for BBA/BPA students only.</p>
                  }
                </li>
                <li className="list-group-item"><strong>10. Written Communication</strong> (3 cr.) - {this.state.data['GE10']}</li>
              </ul>
            </div>

          </div>

          <div className="row mt-3">
            <div className="col-12">
              <div className="card">
                <div className="card-body">
                  <ul className="list-group list-group-flush list-item-bullet ul-spacing">
                    <li className="list-group-item">
                      Consideration of your SVSU major/minor requirements is strongly recommended when selecting general education courses.
                      No courses may be counted in more than one General Education category but may be counted toward majors and minors.
                    </li>
                    <li className="list-group-item">
                      SVSU's General Education requirements also include two Communication Intensive (CI) courses selected from
                      Categories 2 - 8. <strong>{extraCiText}</strong>
                      Additional information may be required for transfer credit evaluation.
                    </li>
                    <li className="list-group-item">
                      <strong>Please note</strong> - Category 4 requires a minimum of two <strong>SVSU</strong> departments.
                    </li>
                    <li className="list-group-item">
                      If your college-level transcript reflects either Michigan's former MACRAO Agreement or the current Michigan Transfer Agreement (MTA), then all 30 of your MACRAO/MTA credits will be applied so that you will have met 30 (the majority) of SVSU's general education requirements.
                      Please note that all students pursuing an SVSU bachelor's degree must complete CIs and that MTA students must complete their CIs at SVSU. If you are planning eventual transfer of credits to SVSU, contact SVSU's Office of Admission to see if either MACRAO or MTA is right for you.
                      For information about whether your existing credits can qualify for either agreement to be designated on your transcript, contact the school where you originally pursued your credits (usually their office of admissions, academic advising, or registrars; the correct office varies by school). For more information about the MACRAO and MTA agreements, please visit www.macrao.org.
                    </li>
                    <li className="list-group-item">
                      For additional academic information, contact SVSU's Office of Admissions, (989) 964-4200 or 1-800-968-9500.
                    </li>
                    <li className="list-group-item">
                      All students, please refer to transfer.svsu.edu for detailed information about transferability of individual courses. Dual Enrollment and Early-Middle College (DE/EMC) students with questions, please contact one of SVSU's high school representatives in the Office of Admission.
                      Transfer students, please contact an SVSU transfer representative in the Office of Admission for assistance.
                      Visits with our Admissions team are available by <a href="https://apply.svsu.edu/register/?id=b6c71bf2-c965-4cf6-994d-314a96be5e32">scheduling an appointment</a>.
                    </li>
                  </ul>
                </div>
              </div>
            </div>
          </div>

        </div>
      </div>
    )
  }
}
