feat: weather conditions check from stroy-bot-main
Ports the weather check added to stroy-bot-main on 2026-10-16: daily station weather, report positions with weather per shift and the AI assessment of working conditions. Opens as ?page=weather&start=&end= instead of the #weathercheck hash, and hub dates survive the way back. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import * as React from 'react';
|
||||
import { Badge } from '@tnsu/ui-kit';
|
||||
import { IWeatherPosition } from './weatherTypes';
|
||||
import { EmptyValue } from './EmptyValue';
|
||||
import { WEATHER_TEXTS } from './texts';
|
||||
import styles from './WeatherPage.module.scss';
|
||||
|
||||
const TEXTS = WEATHER_TEXTS.positions;
|
||||
|
||||
interface Props {
|
||||
position: IWeatherPosition;
|
||||
}
|
||||
|
||||
/** «Акт простоя»: рекомендован (с причиной) / не требуется / нет оценки. */
|
||||
export const DowntimeActCell: React.FC<Props> = ({ position }) => {
|
||||
if (position.downtime_act_recommended === false) {
|
||||
return <Badge variant="success">{TEXTS.downtimeNotRequired}</Badge>;
|
||||
}
|
||||
if (position.downtime_act_recommended !== true) return <EmptyValue />;
|
||||
return (
|
||||
<>
|
||||
<Badge variant="danger">{TEXTS.downtimeRecommended}</Badge>
|
||||
{position.downtime_act_reason && <div className={styles.reason}>{position.downtime_act_reason}</div>}
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user