import React, { useState, useEffect } from 'react'; import { BrowserRouter as Router, Switch, Route, Link, useParams } from 'react-router-dom'; import './light.css'; import { Container, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Popup, Segment, Table } from 'semantic-ui-react'; import moment from 'moment'; import { requester } from './utils.js'; import { NotFound, PleaseLogin } from './Misc.js'; export function CertList(props) { const { member } = props; const MoreCert = (tools) => (

Allows access to:

{tools}

} trigger={[more]} />); return ( Name Certification Course Common {MoreCert('Anything larger than a screwdriver.')} {member.vetted_date || member.orientation_date ? 'Yes' : 'No'} New Members: Orientation and Basic Safety Wood 1 {MoreCert('Table saw, band saw.')} {member.wood_cert_date ? 'Yes, ' + member.wood_cert_date : 'No'} Woodworking Tools 1: Intro to Saws Wood 2 {MoreCert('Jointer, thickness planer, drum sander.')} {member.wood2_cert_date ? 'Yes, ' + member.wood2_cert_date : 'No'} Woodworking Tools 2: Jointer, Thickness Planer, Drum Sander Lathe {MoreCert('Manual metal lathe.')} {member.lathe_cert_date ? 'Yes, ' + member.lathe_cert_date : 'No'} Metal: Metal Cutting & Manual Lathe Mill {MoreCert('Manual metal mill.')} {member.mill_cert_date ? 'Yes, ' + member.mill_cert_date : 'No'} Metal: Manual Mill & Advanced Lathe CNC {MoreCert('Tormach metal CNC, CNC wood router.')} {member.cnc_cert_date ? 'Yes, ' + member.cnc_cert_date : 'No'} Tormach: CAM and Tormach Intro
); }; export function TrainingList(props) { const { training } = props; return ( Course / Event Name Class Date Status Instructor {training.slice().sort((a, b) => a.session.datetime < b.session.datetime ? 1 : -1).map(x => {x.session.course_name} {moment(x.session.datetime).format('MMMM Do YYYY')} {x.attendance_status} {x.session.instructor_name} )}
); }; export function Training(props) { const { user } = props; return (
Certifications

Certifications are based on the courses you've taken. If there's any errors, please email directors@protospace.ca.

Training
{user.training.length ? :

No training yet! Sign up for a course to take a class.

}
); };