CoretimeTypes is an enum, and Reservation type has index 0 (#11567)

This commit is contained in:
Daria 2025-05-20 18:55:02 +12:00 committed by GitHub
parent 076da2efae
commit 7802268e1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,14 +85,12 @@ function WorkInfoRow ({ data }: { data: InfoRow }): React.ReactElement {
/>
<StyledTableCol hide={'mobile'}>
<h5 style={{ opacity: '0.6' }}>type</h5>
{data.type &&
(
<Tag
color={colours[data.type] as FlagColor}
label={Object.values(CoreTimeTypes)[data.type]}
/>
)
}
{typeof data.type === 'number' && data.type in CoreTimeTypes && (
<Tag
color={colours[data.type] as FlagColor}
label={Object.values(CoreTimeTypes)[data.type]}
/>
)}
</StyledTableCol>
{data.owner
? <StyledTableCol hide='mobile'>