diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/index.js index 3a8dacfb849..5e3da8184e4 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/index.js @@ -36,9 +36,11 @@ export const formatter = (value, symbol, unit, commaSeparated = true, t, isDecim const Nformatter = new Intl.NumberFormat("en-IN"); return Nformatter.format(Math.round(value)); - case "percentage": - const Pformatter = new Intl.NumberFormat("en-IN", { maximumSignificantDigits: 3 }); - return `${Pformatter.format(value.toFixed(2))} %`; + case "percentage": + const Pformatter = new Intl.NumberFormat("en-IN", { maximumSignificantDigits: 3 }); + const formattedValue = Pformatter.format(Math.max(0, value).toFixed(2)); // Ensures value is non-negative + return `${formattedValue} %`; + default: return ""; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json b/frontend/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json index f081aed777d..0e89aafc0ff 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json @@ -1,6 +1,6 @@ { "name": "@upyog/digit-ui-module-dss", - "version": "1.8.10", + "version": "1.8.11", "license": "MIT", "description": "Digit Dashboard Module", "main": "dist/index.js", diff --git a/frontend/micro-ui/web/package.json b/frontend/micro-ui/web/package.json index 1c31b624aed..7bdc7a905be 100644 --- a/frontend/micro-ui/web/package.json +++ b/frontend/micro-ui/web/package.json @@ -17,7 +17,7 @@ "@upyog/digit-ui-module-common": "1.8.12", "@upyog/digit-ui-module-core": "1.8.2", "@upyog/digit-ui-module-engagement": "1.8.0", - "@upyog/digit-ui-module-dss": "1.8.10", + "@upyog/digit-ui-module-dss": "1.8.11", "@upyog/digit-ui-module-fsm": "1.8.17", "@upyog/digit-ui-module-hrms": "1.8.0", "@upyog/digit-ui-module-mcollect": "1.8.8",