Added an initial cut at a student segement of the site, with a list of workshops and the ability to sign up for them.

This commit is contained in:
2022-10-26 08:45:21 -07:00
parent d7319e340c
commit 77b420ea6f
12 changed files with 538 additions and 32 deletions

View File

@@ -19,6 +19,7 @@ import {Assets, conditions} from "/imports/api/assets";
import {AssetTypes} from "/imports/api/asset-types";
import {Students} from "/imports/api/students";
import {Staff} from "/imports/api/staff";
import {Link} from "react-router-dom";
const cssTwoColumnContainer = {
display: 'grid',
@@ -235,7 +236,8 @@ const AssignmentsByPerson = () => {
<div style={cssAssetTile}>
<div style={{marginBottom: '1rem'}}><TextField id='assetIdInput' inputRef={input=>setAssetIdInput(input)} style={cssEditorField} variant="standard" label="Asset ID" value={assetId} onChange={(e) => {setAssetId(e.target.value.toUpperCase())}}/></div>
<div>{foundAsset && foundAsset.assetType.name}</div>
<div>{foundAsset && foundAsset.serial}</div>
<div>{foundAsset && <Link to={"/search?assetId=" + encodeURIComponent(foundAsset.assetId)}>{foundAsset.assetId}</Link>}</div>
<div>{foundAsset && <Link to={"/search?serial=" + encodeURIComponent(foundAsset.serial)}>{foundAsset.serial}</Link>}</div>
{foundAsset && foundAsset.assignee && (
<div>Assigned To: {foundAsset.assignee.firstName} {foundAsset.assignee.lastName}</div>
)}
@@ -246,8 +248,8 @@ const AssignmentsByPerson = () => {
return (
<div key={next._id} style={{...getAssetTileStyles(i), ...cssAssetTile}}>
<div>{next.assetType.name}</div>
<div>{next.assetId}</div>
<div>{next.serial}</div>
<div><Link to={"/search?assetId=" + encodeURIComponent(next.assetId)}>{next.assetId}</Link></div>
<div><Link to={"/search?serial=" + encodeURIComponent(next.serial)}>{next.serial}</Link></div>
<Button variant="contained" color='secondary' className="button" onClick={()=>unassign(next)}>Unassign</Button>
</div>
)