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:
Тимур Городецкий
2026-10-20 09:47:02 +05:00
parent b18cf50efd
commit d606f8371c
33 changed files with 1365 additions and 12 deletions
@@ -17,4 +17,20 @@ describe('parseRoute', () => {
it('адрес только с projectId=7', () => {
expect(parseRoute('?projectId=7')).toEqual({ page: 'hub', projectId: '7' });
});
it('сверка погоды с периодом', () => {
expect(parseRoute('?page=weather&projectId=7&start=2026-10-01&end=2026-10-07')).toEqual({
page: 'weather',
projectId: '7',
start: '2026-10-01',
end: '2026-10-07'
});
});
});
describe('buildSearch', () => {
it('параметры прошлого маршрута не переносятся, посторонние параметры страницы остаются', () => {
expect(buildSearch({ page: 'weather', projectId: '7', start: '2026-10-01' }, '?debug=true&reportId=r1')).toEqual(
'?debug=true&page=weather&projectId=7&start=2026-10-01'
);
});
});