diff options
author | eug-vs <eug-vs@keemail.me> | 2020-12-04 01:29:05 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-12-04 01:29:05 +0300 |
commit | 2b0d5d2a6db017f5eaeb88a4ec71a9590854e9c3 (patch) | |
tree | 57591444809e41c4986c9784068623780caf675a | |
parent | 3836f103ff40637e48c04eae9968b008e524294f (diff) | |
download | famcs-kit-2b0d5d2a6db017f5eaeb88a4ec71a9590854e9c3.tar.gz |
feat: add type to event
-rw-r--r-- | src/components/EventCard/EventCard.tsx | 2 | ||||
-rw-r--r-- | src/containers/BsuFantomSection/EventForm.tsx | 3 | ||||
-rw-r--r-- | src/types.ts | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/components/EventCard/EventCard.tsx b/src/components/EventCard/EventCard.tsx index 67a89e7..179a868 100644 --- a/src/components/EventCard/EventCard.tsx +++ b/src/components/EventCard/EventCard.tsx @@ -57,12 +57,12 @@ const EventCard: React.FC<PropTypes> = ({ event, mutate }) => { const classes = useStyles(); const { user } = useAuth(); const { - name, schedule, status, nextRunAt, lastRunAt, context: { + name, participants, conferenceId, attendanceId diff --git a/src/containers/BsuFantomSection/EventForm.tsx b/src/containers/BsuFantomSection/EventForm.tsx index 528636f..64d4165 100644 --- a/src/containers/BsuFantomSection/EventForm.tsx +++ b/src/containers/BsuFantomSection/EventForm.tsx @@ -20,9 +20,10 @@ const EventForm: React.FC<PropTypes> = ({ mutate }) => { const handleSubmit = () => { if (schedule && conferenceId) { const event: Partial<Event> = { - name, + type: 'class', schedule, context: { + name, attendanceId, conferenceId, participants: [] diff --git a/src/types.ts b/src/types.ts index 941bbbb..e41223c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -9,13 +9,14 @@ export interface User extends Base { } export interface EventContext { + name: string; participants: string[]; conferenceId: string; attendanceId: string; } export interface Event extends Base { - name: string; + type: string; schedule: string; status?: 'running' | 'complete' | 'failed' | 'notStarted'; failReason?: string; |