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-timezone'; import { requester, getInstructor } 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, chop saw, router.')} {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 Tormach CNC {member.tormach_cnc_cert_date ? 'Yes, ' + member.tormach_cnc_cert_date : 'No'} Tormach: CAM and Tormach Intro Precix CNC {member.precix_cnc_cert_date ? 'Yes, ' + member.precix_cnc_cert_date : 'No'} Basic CNC Wood Router Rabbit Laser {member.rabbit_cert_date ? 'Yes, ' + member.rabbit_cert_date : 'No'} Laser: Cutting and Engraving Trotec Laser {member.trotec_cert_date ? 'Yes, ' + member.trotec_cert_date : 'No'} Laser: Trotec Course
); }; 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_data.name} {moment(x.session.datetime).tz('America/Edmonton').format('ll')} {x.attendance_status} {getInstructor(x.session)} )}
); }; export function Training(props) { const { user } = props; return (
Your Training
{user.training.length ? :

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

}
Your Certifications

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

); };