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 (
|
||||
<div className={classes.root}>
|
||||
<Avatar
|
||||
className={classes.avatar}
|
||||
style={{ background: palette[CRC.str(user.email) % palette.length] }}
|
||||
>
|
||||
<PersonIcon />
|
||||
</Avatar>
|
||||
{user && (
|
||||
<Avatar
|
||||
className={classes.avatar}
|
||||
style={{ background: palette[CRC.str(user.email) % palette.length] }}
|
||||
>
|
||||
<PersonIcon />
|
||||
</Avatar>
|
||||
)}
|
||||
<div className={classes.title}>
|
||||
<Typography>{user.email}</Typography>
|
||||
<Typography>{user?.email}</Typography>
|
||||
<Typography>
|
||||
<DateTime date={date} />
|
||||
</Typography>
|
||||
|
|
|
@ -825,6 +825,30 @@ export const order = (placeholder: string): OrderDetails_order => ({
|
|||
email: "admin@example.com",
|
||||
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: [
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue