mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Initial commit
This commit is contained in:
commit
4d53d83769
73 files changed
+37728
No files matched your search
Executable
+39
@@ -0,0 +1,39 @@
|
||||
import { List, Datagrid, TextField, BooleanField, EditButton, Create, SimpleForm, TextInput, BooleanInput, Edit } from 'react-admin';
|
||||
|
||||
export const PackList = () => (
|
||||
<List>
|
||||
<Datagrid rowClick="edit">
|
||||
<TextField source="name" />
|
||||
<TextField source="description" />
|
||||
<BooleanField source="is_premium" />
|
||||
<BooleanField source="is_public" />
|
||||
<EditButton />
|
||||
</Datagrid>
|
||||
</List>
|
||||
);
|
||||
|
||||
export const PackEdit = () => (
|
||||
<Edit>
|
||||
<SimpleForm>
|
||||
<TextInput source="name" />
|
||||
<TextInput source="description" multiline />
|
||||
<TextInput source="icon" />
|
||||
<BooleanInput source="is_premium" />
|
||||
<BooleanInput source="is_public" />
|
||||
<TextInput source="sort_order" />
|
||||
</SimpleForm>
|
||||
</Edit>
|
||||
);
|
||||
|
||||
export const PackCreate = () => (
|
||||
<Create>
|
||||
<SimpleForm>
|
||||
<TextInput source="name" />
|
||||
<TextInput source="description" multiline />
|
||||
<TextInput source="icon" />
|
||||
<BooleanInput source="is_premium" />
|
||||
<BooleanInput source="is_public" />
|
||||
<TextInput source="sort_order" />
|
||||
</SimpleForm>
|
||||
</Create>
|
||||
);
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
import { List, Datagrid, TextField, ReferenceField, NumberField, EditButton, Create, SimpleForm, TextInput, NumberInput, ReferenceInput, SelectInput, Edit } from 'react-admin';
|
||||
|
||||
export const QuestionList = () => (
|
||||
<List>
|
||||
<Datagrid rowClick="edit">
|
||||
<TextField source="text" />
|
||||
<ReferenceField source="pack_id" reference="question_packs">
|
||||
<TextField source="name" />
|
||||
</ReferenceField>
|
||||
<NumberField source="intensity" />
|
||||
<EditButton />
|
||||
</Datagrid>
|
||||
</List>
|
||||
);
|
||||
|
||||
export const QuestionEdit = () => (
|
||||
<Edit>
|
||||
<SimpleForm>
|
||||
<ReferenceInput source="pack_id" reference="question_packs">
|
||||
<SelectInput optionText="name" />
|
||||
</ReferenceInput>
|
||||
<TextInput source="text" multiline fullWidth />
|
||||
<NumberInput source="intensity" min={1} max={5} />
|
||||
</SimpleForm>
|
||||
</Edit>
|
||||
);
|
||||
|
||||
export const QuestionCreate = () => (
|
||||
<Create>
|
||||
<SimpleForm>
|
||||
<ReferenceInput source="pack_id" reference="question_packs">
|
||||
<SelectInput optionText="name" />
|
||||
</ReferenceInput>
|
||||
<TextInput source="text" multiline fullWidth />
|
||||
<NumberInput source="intensity" min={1} max={5} />
|
||||
</SimpleForm>
|
||||
</Create>
|
||||
);
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
import { List, Datagrid, TextField, BooleanField, DateField, ReferenceField } from 'react-admin';
|
||||
|
||||
export const ProfileList = () => (
|
||||
<List>
|
||||
<Datagrid>
|
||||
<TextField source="name" />
|
||||
<TextField source="email" />
|
||||
<BooleanField source="is_premium" />
|
||||
<ReferenceField source="couple_id" reference="couples">
|
||||
<TextField source="id" />
|
||||
</ReferenceField>
|
||||
<DateField source="created_at" />
|
||||
</Datagrid>
|
||||
</List>
|
||||
);
|
||||
|
||||
export const ResponseList = () => (
|
||||
<List>
|
||||
<Datagrid>
|
||||
<ReferenceField source="user_id" reference="profiles">
|
||||
<TextField source="name" />
|
||||
</ReferenceField>
|
||||
<ReferenceField source="question_id" reference="questions">
|
||||
<TextField source="text" />
|
||||
</ReferenceField>
|
||||
<TextField source="answer" />
|
||||
<DateField source="created_at" />
|
||||
</Datagrid>
|
||||
</List>
|
||||
);
|
||||
Reference in new issue
Block a user