diff --git a/src/agents/agents.service.ts b/src/agents/agents.service.ts index ec1b112..09fa43d 100644 --- a/src/agents/agents.service.ts +++ b/src/agents/agents.service.ts @@ -1100,6 +1100,8 @@ export class AgentsService { }; // Transform to a more usable format + // - value: raw value (backward-compatible — for clients that map values themselves) + // - valueLabel: option label resolved from field options (for clients that need display strings) const transformedValues = fieldValues.map((fv) => { const rawValue = this.extractValue(fv); const labelValue = resolveLabel(rawValue, fv.field.options); @@ -1109,7 +1111,8 @@ export class AgentsService { fieldType: fv.field.fieldType, sectionSlug: fv.field.section.slug, sectionName: fv.field.section.name, - value: labelValue, + value: rawValue, + valueLabel: labelValue, }; });