fix: expose every backend-supported field in all edit forms
Audit requested by the user after finding queens couldn't set hatchYear: many edit dialogs (and some create forms) were missing fields the backend DTOs already accept, so that data could never be entered or corrected anywhere in the UI. Fixes per entity: - Colony: status (WEAK/QUEENLESS/CONSPICUOUS) was never settable anywhere, so the COLONY_ATTENTION dashboard alert could never fire. Added as a dropdown restricted to the non-terminal statuses; DISSOLVED/SOLD/DECEASED/MERGED stay on their dedicated confirm actions, which also set deactivatedAt. - Apiary: description was missing from the edit form. - Inspection: 10 fields (weather, temperature, broodAmount, broodPattern, openBroodPresent, cappedBroodPresent, queenCellsPresent, swarmMood, gentleness, combBehavior, honeySuperStatus) existed in the schema/DTOs but nowhere in the UI - added to both the create and edit forms. - Varroa measurement: durationMinutes was on the create form but missing from edit. - Feeding: batchNumber missing from both create and edit. - Treatment: startDate, endDate, activeIngredient, batchNumber missing from both create and edit. - Task: assignedUserId had no UI anywhere; added to create/edit, degrading gracefully if the current user's role lacks users:read. - Extraction (honey-batch traceability variant): amount was missing, while the other edit dialog for the same entity already had it. - Bottling: productId missing from edit. - Harvest: grossWeight missing from edit; grossWeight and honeySuperCount missing from create. - Queen: breeder, matingType, matingStatus, inseminationData, motherLine, fatherLine added to the edit form (hatchYear/ markingColor/markingNumber were already fixed in a prior commit). Left alone deliberately: fields the backend DTO itself excludes via PickType (e.g. HoneyBatch's jarSize/jarCount/totalAmount, Bottling's quantities) since mutating those post-hoc would desync inventory deduction, and Colony's terminal statuses/code which have dedicated lifecycle actions. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
792806b967
commit
1dddc387ba
20 files changed
+682
-4
No files matched your search
@@ -31,10 +31,18 @@ export interface CreateInspectionInput {
|
||||
weather?: string;
|
||||
temperature?: number;
|
||||
colonyStrength?: number;
|
||||
broodAmount?: string;
|
||||
broodPattern?: number;
|
||||
openBroodPresent?: boolean;
|
||||
cappedBroodPresent?: boolean;
|
||||
queenSeen?: boolean;
|
||||
eggsPresent?: boolean;
|
||||
queenCellsPresent?: boolean;
|
||||
swarmMood?: number;
|
||||
gentleness?: number;
|
||||
combBehavior?: number;
|
||||
feedStatus?: string;
|
||||
honeySuperStatus?: string;
|
||||
healthIssues?: string;
|
||||
varroaIssues?: string;
|
||||
measures?: string;
|
||||
@@ -46,10 +54,18 @@ export interface UpdateInspectionInput {
|
||||
weather?: string;
|
||||
temperature?: number;
|
||||
colonyStrength?: number;
|
||||
broodAmount?: string;
|
||||
broodPattern?: number;
|
||||
openBroodPresent?: boolean;
|
||||
cappedBroodPresent?: boolean;
|
||||
queenSeen?: boolean;
|
||||
eggsPresent?: boolean;
|
||||
queenCellsPresent?: boolean;
|
||||
swarmMood?: number;
|
||||
gentleness?: number;
|
||||
combBehavior?: number;
|
||||
feedStatus?: string;
|
||||
honeySuperStatus?: string;
|
||||
healthIssues?: string;
|
||||
varroaIssues?: string;
|
||||
measures?: string;
|
||||
|
||||
Reference in new issue
Block a user