// Copyright 2017-2026 @pezkuwi/app-broker authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { FlagColor } from '@pezkuwi/react-components/types'; import React from 'react'; import { AddressMini, styled, Tag } from '@pezkuwi/react-components'; import { CoreTimeTypes } from '@pezkuwi/react-hooks/constants'; import { type InfoRow } from '../types.js'; const colours: Record = { [CoreTimeTypes.Reservation]: 'orange', [CoreTimeTypes.Lease]: 'blue', [CoreTimeTypes['Bulk Coretime']]: 'pink', [CoreTimeTypes['On Demand']]: 'green' }; const StyledTableCol = styled.td<{ hide?: 'mobile' | 'tablet' | 'both' }>` width: 150px; vertical-align: top; @media (max-width: 768px) { /* Mobile */ ${(props) => props.hide === 'mobile' || props.hide === 'both' ? 'display: none;' : ''} } @media (min-width: 769px) and (max-width: 1024px) { /* Tablet */ ${(props) => props.hide === 'tablet' || props.hide === 'both' ? 'display: none;' : ''} } `; const TableCol = ({ header, hide, value }: { header: string; value: string | number | null | undefined; hide?: 'mobile' | 'tablet' | 'both'; }) => (
{header}

{value || <> }

); function WorkInfoRow ({ data }: { data: InfoRow }): React.ReactElement { if (!data.task) { return ( <> no task ); } return ( <>
type
{typeof data.type === 'number' && data.type in CoreTimeTypes && ( )}
{data.owner ?
{'Owner'}
: } ); } export default React.memo(WorkInfoRow);