Updated meteor; Modified the assignments byPerson page considerably to improve the workflow; Added an external id to sites; Added an import for students; Improved the students page.
This commit is contained in:
@@ -28,14 +28,15 @@ const cssButtonContainer = {
|
||||
|
||||
const SiteEditor = ({value, close}) => {
|
||||
const [name, setName] = useState(value.name || "")
|
||||
const [externalId, setExternalId] = useState(value.externalId || "")
|
||||
|
||||
const applyChanges = () => {
|
||||
close()
|
||||
//TODO Should invert this and only close if there was success on the server.
|
||||
if(value._id)
|
||||
Meteor.call("sites.update", value._id, name);
|
||||
Meteor.call("sites.update", value._id, name, externalId);
|
||||
else
|
||||
Meteor.call("sites.add", name);
|
||||
Meteor.call("sites.add", name, externalId);
|
||||
}
|
||||
const rejectChanges = () => {
|
||||
close()
|
||||
@@ -45,6 +46,7 @@ const SiteEditor = ({value, close}) => {
|
||||
<div style={cssFieldContainer}>
|
||||
<h1>Site Editor</h1>
|
||||
<TextField style={cssEditorField} variant="standard" label="Name" value={name} onChange={(e) => {setName(e.target.value)}}/>
|
||||
<TextField style={cssEditorField} variant="standard" label="External ID" value={externalId} onChange={(e) => {setExternalId(e.target.value)}}/>
|
||||
<div style={cssButtonContainer}>
|
||||
<Button variant="contained" className="button accept-button" onClick={applyChanges}>Accept</Button>
|
||||
<Button variant="outlined" className="button reject-button" onClick={rejectChanges}>Reject</Button>
|
||||
@@ -68,6 +70,10 @@ export default () => {
|
||||
name: "Name",
|
||||
value: (row) => row.name,
|
||||
},
|
||||
{
|
||||
name: "External ID",
|
||||
value: (row) => row.externalId,
|
||||
},
|
||||
]
|
||||
|
||||
const options = {
|
||||
|
||||
Reference in New Issue
Block a user