Skip to content

Commit

Permalink
Use check mark icon for timed out valves
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Sep 19, 2024
1 parent c9927ff commit 2a6a685
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/fills/[[...pk]]/tables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
*/

import React from 'react';
import { IconCheck } from '@tabler/icons-react';
import { Box, Stack, Table, Title } from '@mantine/core';
import { ValveTimesType } from './types';

Expand Down Expand Up @@ -70,7 +72,7 @@ export function OpenTimesTable(props: { valve_times: ValveTimesType | null }) {
open_time: string | null;
close_time: string | null;
elapsed: string | null;
timeout: string | null;
timeout: React.ReactElement | null;
}[] = [];

for (const cam of ['purge', 'b1', 'r1', 'z1', 'b2', 'r2', 'z2', 'b3', 'r3', 'z3']) {
Expand All @@ -86,7 +88,9 @@ export function OpenTimesTable(props: { valve_times: ValveTimesType | null }) {
open_time: toTime(open_time),
close_time: toTime(close_time),
elapsed: elapsed.toFixed(1),
timeout: props.valve_times[cam].timed_out ? 'Y' : '',
timeout: props.valve_times[cam].timed_out ? (
<IconCheck style={{ verticalAlign: 'middle' }} />
) : null,
});
}
}
Expand Down

0 comments on commit 2a6a685

Please sign in to comment.