fix: T6 browser-check findings (compliance, treatments, labels)
Backend Image / build-and-push (push) Successful in 6m39s
Frontend Image / build-and-push (push) Successful in 14m30s

- api-client accepts 2xx answers without body (revoke showed an error)
- authority notices: sentOn in the future is rejected (Berlin day) on
  create, mark-sent and PATCH; dialog defaults to the Berlin day
- service worker never caches /api/v1/site-settings
- treatments/new no longer overflows at 390 px (min-w-0 on form
  wrappers); dose with more than 3 decimals is an error, never rounded
- medicines: expired lots flagged, disposal over the rest warns
- label designer: side panel at lg, sample values instead of
  placeholders, compliance panel reopens on lg, labelled zoom buttons
- skip link to #main-content, headings on no-access pages

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Nick SzaunigandClaude Opus 5.5 committed 2026-10-15 18:34:52 +02:00
1 parent 6c390efe7b
commit e712c5d4d1
64 files changed
+1497 -323

No files matched your search

@@ -228,6 +228,42 @@ describe('Authority notices (e2e)', () => {
expect(body.totalColonies).toBeLessThanOrEqual(Math.max(before, after));
});
it('rejects a sent day in the future on create, mark-sent and patch', async () => {
const message = 'Das Sendedatum darf nicht in der Zukunft liegen.';
const future = '2999-01-01';
const create = await request(server())
.post('/api/v1/authority-notices')
.set(as(beekeeperToken))
.send({ kind: 'REGISTRATION', sentOn: future })
.expect(400);
expect((create.body as { message: string }).message).toBe(message);
const draft = await request(server())
.post('/api/v1/authority-notices')
.set(as(beekeeperToken))
.send({ kind: 'TSK_REPORT', year: 2031 })
.expect(201);
const url = `/api/v1/authority-notices/${(draft.body as NoticeBody).id}`;
const markSent = await request(server())
.post(`${url}/mark-sent`)
.set(as(beekeeperToken))
.send({ sentOn: future })
.expect(400);
expect((markSent.body as { message: string }).message).toBe(message);
const patch = await request(server())
.patch(url)
.set(as(beekeeperToken))
.send({ sentOn: future })
.expect(400);
expect((patch.body as { message: string }).message).toBe(message);
const unchanged = await request(server())
.get(url)
.set(as(beekeeperToken))
.expect(200);
expect(unchanged.body).toMatchObject({ status: 'DRAFT', sentOn: null });
});
it('walks a draft through mark-sent, reopen and cancel', async () => {
const created = await request(server())
.post('/api/v1/authority-notices')
@@ -240,7 +276,7 @@ describe('Authority notices (e2e)', () => {
await request(server())
.post(`${url}/mark-sent`)
.set(as(beekeeperToken))
.send({ sentOn: '2027-02-01', sentVia: 'E-Mail' })
.send({ sentOn: '2026-02-01', sentVia: 'E-Mail' })
.expect(201);
await request(server())
.post(`${url}/recount`)
@@ -291,7 +327,7 @@ describe('Authority notices (e2e)', () => {
const sent = await request(server())
.post('/api/v1/authority-notices')
.set(as(beekeeperToken))
.send({ kind: 'TSK_REPORT', year: 2027, sentOn: '2027-02-01' })
.send({ kind: 'TSK_REPORT', year: 2027, sentOn: '2026-02-01' })
.expect(201);
const draft = await request(server())
.post('/api/v1/authority-notices')
@@ -319,7 +355,7 @@ describe('Authority notices (e2e)', () => {
await request(server())
.post('/api/v1/authority-notices')
.set(as(beekeeperToken))
.send({ kind: 'TSK_REPORT', year: 2027, sentOn: '2027-02-01' })
.send({ kind: 'TSK_REPORT', year: 2027, sentOn: '2026-02-01' })
.expect(201);
});