diff --git a/ipi-survey-platform/src/services/masters/masterService.js b/ipi-survey-platform/src/services/masters/masterService.js index 467d3c5..c1c9362 100644 --- a/ipi-survey-platform/src/services/masters/masterService.js +++ b/ipi-survey-platform/src/services/masters/masterService.js @@ -114,7 +114,7 @@ const toIsicOption = (item) => { return value ? { label: value, value } : null; } if (typeof item === 'object') { - const id = toStringOrNull(item.id ?? item.value ?? item.code); + const id = toStringOrNull(item.code ?? item.id ?? item.value); const code = toStringOrNull(item.code); const description = toStringOrNull(item.description ?? item.name ?? item.label); const label = code && description ? `${code} - ${description}` : description ?? code ?? item.label; @@ -125,6 +125,7 @@ const toIsicOption = (item) => { return null; }; + export const getVariationReasons = async (config = {}) => { const response = await getRequest(endpoints.variationReasons, config); return response.data;