-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
152 additions
and
21 deletions.
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,71 @@ | ||
import { | ||
Create, | ||
DateTimeInput, | ||
SimpleForm, | ||
TextInput, | ||
required, | ||
BooleanField, | ||
Datagrid, | ||
DateField, | ||
List, | ||
TextField, | ||
CheckboxGroupInput, | ||
ArrayField, | ||
SingleFieldList, | ||
ChipField, | ||
Edit, | ||
BooleanInput, | ||
} from "react-admin"; | ||
|
||
export const EventCreate = () => { | ||
return ( | ||
<Create> | ||
<SimpleForm> | ||
<TextInput source="name" validate={[required()]} /> | ||
<DateTimeInput source="startsAt" validate={[required()]} /> | ||
<DateTimeInput source="endsAt" validate={[required()]} /> | ||
<CheckboxGroupInput | ||
source="marathonTypes" | ||
choices={[ | ||
{ id: "ONSITE", name: "Onsite" }, | ||
{ id: "ONLINE", name: "Online" }, | ||
]} | ||
/> | ||
</SimpleForm> | ||
</Create> | ||
); | ||
}; | ||
|
||
export const EventList = () => ( | ||
<List> | ||
<Datagrid rowClick="edit"> | ||
<TextField source="name" /> | ||
<DateField showTime source="startsAt" /> | ||
<DateField showTime source="endsAt" /> | ||
<ArrayField source="marathonTypes"> | ||
<SingleFieldList linkType={false}> | ||
<ChipField source="name" /> | ||
</SingleFieldList> | ||
</ArrayField> | ||
<BooleanField source="published" /> | ||
</Datagrid> | ||
</List> | ||
); | ||
|
||
export const EventEdit = () => ( | ||
<Edit> | ||
<SimpleForm> | ||
<TextInput source="name" validate={[required()]} /> | ||
<DateTimeInput source="startsAt" validate={[required()]} /> | ||
<DateTimeInput source="endsAt" validate={[required()]} /> | ||
<CheckboxGroupInput | ||
source="marathonTypes" | ||
choices={[ | ||
{ id: "ONSITE", name: "Onsite" }, | ||
{ id: "ONLINE", name: "Online" }, | ||
]} | ||
/> | ||
<BooleanInput source="published" /> | ||
</SimpleForm> | ||
</Edit> | ||
); |
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
projects/server/prisma/migrations/20240110142600_/migration.sql
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,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "User" ALTER COLUMN "username" DROP NOT NULL; |
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