import React from 'react'; import { Link } from 'react-router-dom'; import './light.css'; import { Container, Header, Popup, Table } from 'semantic-ui-react'; import moment from 'moment-timezone'; import { getInstructor, useIsMobile } from './utils.js'; export function CertList(props) { const { member } = props; const isMobile = useIsMobile(); const MoreCert = (tools) => (

Allows access to:

{tools}

} trigger={[more]} />); return ( {!isMobile && Name Enabled Course } Common {MoreCert('Any tool larger than a screwdriver.')} {isMobile && 'Enabled: '}{member.vetted_date || member.orientation_date ? 'Yes' : 'No'} New Members: Orientation and Basic Safety SawStop {isMobile && 'Enabled: '}{member.wood_cert_date ? 'Yes, ' + member.wood_cert_date : 'No'} SawStop Update Drum Sander {isMobile && 'Enabled: '}{member.wood2_cert_date ? 'Yes, ' + member.wood2_cert_date : 'No'} Woodworking Tools 2: Jointer, Thickness Planer, Drum Sander {false && Lathe {MoreCert('Manual metal lathe.')} {isMobile && 'Enabled: '}{member.lathe_cert_date ? 'Yes, ' + member.lathe_cert_date : 'No'} Metal: Metal Cutting & Manual Lathe } {false && Mill {MoreCert('Manual metal mill.')} {isMobile && 'Enabled: '}{member.mill_cert_date ? 'Yes, ' + member.mill_cert_date : 'No'} Metal: Manual Mill & Advanced Lathe } Tormach CNC {isMobile && 'Enabled: '}{member.tormach_cnc_cert_date ? 'Yes, ' + member.tormach_cnc_cert_date : 'No'} Tormach: CAM and Tormach Intro Precix CNC {isMobile && 'Enabled: '}{member.precix_cnc_cert_date ? 'Yes, ' + member.precix_cnc_cert_date : 'No'} Basic CNC Wood Router Rabbit Laser {isMobile && 'Enabled: '}{member.rabbit_cert_date ? 'Yes, ' + member.rabbit_cert_date : 'No'} Laser: Cutting and Engraving Trotec Laser {isMobile && 'Enabled: '}{member.trotec_cert_date ? 'Yes, ' + member.trotec_cert_date : 'No'} Laser: Trotec Course
); }; export function TrainingList(props) { const { training } = props; const isMobile = useIsMobile(); return ( {!isMobile && 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')} {isMobile && 'Attendance: '}{x.attendance_status} {isMobile && 'Instructor: '}{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 Machine Access

These control access to the machine lockout devices.

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

); };