feat(template): stable fieldId per field — custom_fields keyed by UUID, not label slug

This commit is contained in:
Experiments DB Dev
2026-04-15 14:01:14 -04:00
parent 1305e53f96
commit b7374777d3
5 changed files with 84 additions and 38 deletions
+3 -2
View File
@@ -9,10 +9,11 @@ import DailyStatusForm from '../components/DailyStatusForm';
import Alert from '../components/ui/Alert';
import AuditLogSection from '../components/AuditLogSection';
/** Render the value for a template field from a status record */
/** Read the value for a template field from a status record.
* Custom fields are keyed by fieldId, not by the display key. */
function getFieldValue(status, field) {
if (field.builtin) return status[field.key];
return status.custom_fields?.[field.key];
return status.custom_fields?.[field.fieldId];
}
export default function AnimalDetail() {