This commit is contained in:
pradeepkumar
2026-04-08 04:15:39 +05:30
parent 6beaeea425
commit 50ef4d9a08

View File

@@ -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,
};
});