Fix order note when no user was given
This commit is contained in:
parent
214dcae487
commit
8173624fca
3 changed files with 1013 additions and 7 deletions
|
@ -79,14 +79,16 @@ export const TimelineNote: React.FC<TimelineNoteProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<Avatar
|
{user && (
|
||||||
className={classes.avatar}
|
<Avatar
|
||||||
style={{ background: palette[CRC.str(user.email) % palette.length] }}
|
className={classes.avatar}
|
||||||
>
|
style={{ background: palette[CRC.str(user.email) % palette.length] }}
|
||||||
<PersonIcon />
|
>
|
||||||
</Avatar>
|
<PersonIcon />
|
||||||
|
</Avatar>
|
||||||
|
)}
|
||||||
<div className={classes.title}>
|
<div className={classes.title}>
|
||||||
<Typography>{user.email}</Typography>
|
<Typography>{user?.email}</Typography>
|
||||||
<Typography>
|
<Typography>
|
||||||
<DateTime date={date} />
|
<DateTime date={date} />
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
|
@ -825,6 +825,30 @@ export const order = (placeholder: string): OrderDetails_order => ({
|
||||||
email: "admin@example.com",
|
email: "admin@example.com",
|
||||||
id: "QWRkcmVzczoxNQ=="
|
id: "QWRkcmVzczoxNQ=="
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
__typename: "OrderEvent",
|
||||||
|
amount: null,
|
||||||
|
date: "2019-09-17T13:22:24.376193+00:00",
|
||||||
|
email: null,
|
||||||
|
emailType: null,
|
||||||
|
id: "T3JkZXJFdmVudDo0",
|
||||||
|
message: "This is note",
|
||||||
|
quantity: null,
|
||||||
|
type: OrderEventsEnum.NOTE_ADDED,
|
||||||
|
user: null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
__typename: "OrderEvent",
|
||||||
|
amount: null,
|
||||||
|
date: "2019-09-17T13:22:24.376193+00:00",
|
||||||
|
email: null,
|
||||||
|
emailType: null,
|
||||||
|
id: "T3JkZXJFdmVudDo1",
|
||||||
|
message: "This is note",
|
||||||
|
quantity: null,
|
||||||
|
type: OrderEventsEnum.NOTE_ADDED,
|
||||||
|
user: null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
fulfillments: [
|
fulfillments: [
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue