feat: T4 wave 5 - colony end cleanup, withdrawal chain, next steps, inspection takeover UI
- Colony end releases the queen in the same transaction; open suggestions become obsolete and a CLEANUP suggestion lists open tasks and the queen; apply-cleanup validates evidence and blocks reactivated colonies - Withdrawal chain: plausibility warnings on harvest and bottling, conflict notifications also when a treatment is entered or corrected after the harvest (naming bottled lots), withdrawal spans in the calendar and M365 sync, Berlin-day end events - Next 3 steps per colony and the "Heute" endpoint with ranking and an explicit merge table by intent - Inspection-triggered rule suggestions follow the colony's latest inspection (resolve when the finding is gone, refresh when it stays) - Frontend: colony card takeover in the inspection form, feed status as condition, occupied frames 0-40; legacy offline entries keep syncing - Notifications and preferences are deleted with their user Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
02eb16924e
commit
ef33e5549b
122 files changed
+10707
-504
No files matched your search
@@ -2,6 +2,7 @@ import { INestApplication } from '@nestjs/common';
|
||||
import * as bcrypt from 'bcryptjs';
|
||||
import request from 'supertest';
|
||||
import { App } from 'supertest/types';
|
||||
import { berlinToday } from '../src/common/dates';
|
||||
import { PrismaService } from '../src/prisma/prisma.service';
|
||||
import { createTestApp } from './utils/create-test-app';
|
||||
import { login } from './utils/api';
|
||||
@@ -270,7 +271,14 @@ describe('Colonies (e2e)', () => {
|
||||
const ended = await prisma.domainEvent.findMany({
|
||||
where: { type: 'ColonyEnded', aggregateId: colonyToMergeId },
|
||||
});
|
||||
expect(ended.map((event) => event.payload)).toEqual([{ status: 'MERGED' }]);
|
||||
expect(ended.map((event) => event.payload)).toEqual([
|
||||
{
|
||||
status: 'MERGED',
|
||||
endedOn: berlinToday(),
|
||||
releasedQueenId: null,
|
||||
via: 'MERGE',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it('dissolves the colony without deleting it', async () => {
|
||||
@@ -288,7 +296,12 @@ describe('Colonies (e2e)', () => {
|
||||
'ColonyStatusChanged',
|
||||
'ColonyEnded',
|
||||
]);
|
||||
expect(events[1].payload).toEqual({ status: 'DISSOLVED' });
|
||||
expect(events[1].payload).toEqual({
|
||||
status: 'DISSOLVED',
|
||||
endedOn: berlinToday(),
|
||||
releasedQueenId: null,
|
||||
via: 'DISSOLVE',
|
||||
});
|
||||
|
||||
await request(app.getHttpServer())
|
||||
.get(`/api/v1/colonies/${colonyId}`)
|
||||
|
||||
Reference in new issue
Block a user