feat(template): stable fieldId per field — custom_fields keyed by UUID, not label slug
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user