From c3afb4c1881a91c709f479f909b36f431b3d3d72 Mon Sep 17 00:00:00 2001 From: Manan Jadhav Date: Tue, 1 Oct 2024 01:09:49 +0530 Subject: [PATCH] fix: order of labels --- src/libs/PolicyUtils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 98d7eb5e53d3..0f7f9302f042 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -845,7 +845,9 @@ function getNetSuiteImportCustomFieldLabel( } const mappingSet = new Set(fieldData.map((item) => item.mapping)); - const importedTypes = Array.from(mappingSet).map((mapping) => translate(`workspace.netsuite.import.importTypes.${mapping}.label`).toLowerCase()); + const importedTypes = Array.from(mappingSet) + .sort((a, b) => b.localeCompare(a)) + .map((mapping) => translate(`workspace.netsuite.import.importTypes.${mapping}.label`).toLowerCase()); return translate(`workspace.netsuite.import.importCustomFields.label`, importedTypes); }