-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added view for Wharton cycles (enforces times on applications)
Implemented ModelForm for Wharton admin
- Loading branch information
1 parent
8c61ff5
commit 4e11b64
Showing
7 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Field } from 'formik' | ||
import React, { ReactElement } from 'react' | ||
|
||
import { DateTimeField, TextField } from '../FormComponents' | ||
import ModelForm from '../ModelForm' | ||
|
||
const fields = ( | ||
<> | ||
<Field name="name" as={TextField} /> | ||
<Field name="start_date" as={DateTimeField} /> | ||
<Field name="end_date" as={DateTimeField} /> | ||
</> | ||
) | ||
|
||
const WhartonApplicationCycles = (): ReactElement => { | ||
return ( | ||
<> | ||
<ModelForm | ||
baseUrl={`/cycles/`} | ||
noun="Cycle" | ||
fields={fields} | ||
tableFields={[ | ||
{ name: 'name' }, | ||
{ name: 'start_date' }, | ||
{ name: 'end_date' }, | ||
]} | ||
/> | ||
</> | ||
) | ||
} | ||
|
||
export default WhartonApplicationCycles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters