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
@@ -11,6 +11,7 @@ interface HarvestBody {
|
||||
id: string;
|
||||
apiaryId: string;
|
||||
colonies: { colonyId: string }[];
|
||||
warnings: unknown[];
|
||||
}
|
||||
|
||||
describe('Harvests (e2e)', () => {
|
||||
@@ -133,6 +134,8 @@ describe('Harvests (e2e)', () => {
|
||||
const harvest = response.body as HarvestBody;
|
||||
harvestId = harvest.id;
|
||||
expect(harvest.colonies).toHaveLength(2);
|
||||
// No treatment with a withdrawal period: the list is there, and empty.
|
||||
expect(harvest.warnings).toEqual([]);
|
||||
});
|
||||
|
||||
it('wrote the audit entry and HarvestRecorded with the colony ids together with the harvest', async () => {
|
||||
@@ -202,11 +205,12 @@ describe('Harvests (e2e)', () => {
|
||||
});
|
||||
|
||||
it('records HarvestCorrected with the new colony set on an edit', async () => {
|
||||
await request(app.getHttpServer())
|
||||
const edited = await request(app.getHttpServer())
|
||||
.patch(`/api/v1/harvests/${harvestId}`)
|
||||
.set('Authorization', `Bearer ${staffToken}`)
|
||||
.send({ colonyIds: [colonyOneId] })
|
||||
.expect(200);
|
||||
expect((edited.body as HarvestBody).warnings).toEqual([]);
|
||||
|
||||
const corrections = await prisma.domainEvent.findMany({
|
||||
where: {
|
||||
|
||||
Reference in new issue
Block a user