diff --git a/__mocks__/levels/agents/chart/LAST_30_DAYS.json b/__mocks__/levels/agents/chart/LAST_30_DAYS.json index 0a65a94d..65dd9eaa 100644 --- a/__mocks__/levels/agents/chart/LAST_30_DAYS.json +++ b/__mocks__/levels/agents/chart/LAST_30_DAYS.json @@ -4,213 +4,213 @@ "data": [ { "xaxis": "2023-03-23", - "cashCollectedInLast30Days": "1012475.76", - "level": "L5", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1247503.27" + "cashCollectedInLast30Days": "123620.27", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "985851.25", + "lowerLevelCashCollectedInLast30Days": "883308.28" }, { "xaxis": "2023-03-24", - "cashCollectedInLast30Days": "1009866.33", - "level": "L5", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1241432.92" + "cashCollectedInLast30Days": "101819.03", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "985883.41", + "lowerLevelCashCollectedInLast30Days": "891356.07" }, { "xaxis": "2023-03-25", - "cashCollectedInLast30Days": "1027504.69", - "level": "L5", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1209899.47" + "cashCollectedInLast30Days": "98718.95", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "981623.46", + "lowerLevelCashCollectedInLast30Days": "882617.79" }, { "xaxis": "2023-03-26", - "cashCollectedInLast30Days": "1014751.2", - "level": "L5", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1188489.84" + "cashCollectedInLast30Days": "87813.32", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "960919.54", + "lowerLevelCashCollectedInLast30Days": "853613.68" }, { "xaxis": "2023-03-27", - "cashCollectedInLast30Days": "990451.06", - "level": "L5", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1191034.33" + "cashCollectedInLast30Days": "80354.44", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "956440.84", + "lowerLevelCashCollectedInLast30Days": "865756.13" }, { "xaxis": "2023-03-28", - "cashCollectedInLast30Days": "1005788.45", - "level": "L5", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1209263.55" + "cashCollectedInLast30Days": "71316.4", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "989778.75", + "lowerLevelCashCollectedInLast30Days": "882379.77" }, { "xaxis": "2023-03-29", - "cashCollectedInLast30Days": "1211468.83", - "level": "L6", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1215114.7" + "cashCollectedInLast30Days": "57881.16", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "992439.48", + "lowerLevelCashCollectedInLast30Days": "886390.03" }, { "xaxis": "2023-03-30", - "cashCollectedInLast30Days": "1223278.62", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1208218.09" + "cashCollectedInLast30Days": "9834.04", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "961203.07", + "lowerLevelCashCollectedInLast30Days": "875369.34" }, { "xaxis": "2023-03-31", - "cashCollectedInLast30Days": "1338495.19", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1202495.31" + "cashCollectedInLast30Days": "9834.04", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "940802.81", + "lowerLevelCashCollectedInLast30Days": "862449.53" }, { "xaxis": "2023-04-01", - "cashCollectedInLast30Days": "1328472.95", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1162373.96" + "cashCollectedInLast30Days": "3675.0", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "942112.34", + "lowerLevelCashCollectedInLast30Days": "861923.17" }, { "xaxis": "2023-04-02", - "cashCollectedInLast30Days": "1308382.23", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1164292.5" + "cashCollectedInLast30Days": "38969.0", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "934765.9", + "lowerLevelCashCollectedInLast30Days": "856968.95" }, { "xaxis": "2023-04-03", - "cashCollectedInLast30Days": "1348306.78", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1182718.55" + "cashCollectedInLast30Days": "89945.16", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "943412.83", + "lowerLevelCashCollectedInLast30Days": "858613.64" }, { "xaxis": "2023-04-04", - "cashCollectedInLast30Days": "1399926.03", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1212524.99" + "cashCollectedInLast30Days": "218170.42", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "966327.26", + "lowerLevelCashCollectedInLast30Days": "864114.91" }, { "xaxis": "2023-04-05", - "cashCollectedInLast30Days": "1424995.52", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1216199.32" + "cashCollectedInLast30Days": "270617.42", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "973412.75", + "lowerLevelCashCollectedInLast30Days": "868370.5" }, { "xaxis": "2023-04-06", - "cashCollectedInLast30Days": "1512967.58", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1222987.97" + "cashCollectedInLast30Days": "431596.36", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "985551.02", + "lowerLevelCashCollectedInLast30Days": "875334.87" }, { "xaxis": "2023-04-07", - "cashCollectedInLast30Days": "1568943.68", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1240081.31" + "cashCollectedInLast30Days": "534989.34", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "981524.72", + "lowerLevelCashCollectedInLast30Days": "891057.85" }, { "xaxis": "2023-04-08", - "cashCollectedInLast30Days": "1537666.81", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1211216.44" + "cashCollectedInLast30Days": "617963.34", + "level": "L1", + "upperLevelCashCollectedInLast30Days": "977746.87", + "lowerLevelCashCollectedInLast30Days": "889637.99" }, { "xaxis": "2023-04-09", - "cashCollectedInLast30Days": "1439701.67", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1173985.26" + "cashCollectedInLast30Days": "646485.85", + "level": "L2", + "upperLevelCashCollectedInLast30Days": "961850.48", + "lowerLevelCashCollectedInLast30Days": "875963.83" }, { "xaxis": "2023-04-10", - "cashCollectedInLast30Days": "1882932.27", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1167079.14" + "cashCollectedInLast30Days": "698125.65", + "level": "L2", + "upperLevelCashCollectedInLast30Days": "967411.25", + "lowerLevelCashCollectedInLast30Days": "889496.46" }, { "xaxis": "2023-04-11", - "cashCollectedInLast30Days": "1944062.01", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1200013.5" + "cashCollectedInLast30Days": "759710.0", + "level": "L2", + "upperLevelCashCollectedInLast30Days": "992329.24", + "lowerLevelCashCollectedInLast30Days": "909335.71" }, { "xaxis": "2023-04-12", - "cashCollectedInLast30Days": "1936137.13", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1210408.52" + "cashCollectedInLast30Days": "778856.0", + "level": "L2", + "upperLevelCashCollectedInLast30Days": "1013526.67", + "lowerLevelCashCollectedInLast30Days": "931562.83" }, { "xaxis": "2023-04-13", - "cashCollectedInLast30Days": "1903525.35", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1214125.49" + "cashCollectedInLast30Days": "803488.68", + "level": "L2", + "upperLevelCashCollectedInLast30Days": "998501.13", + "lowerLevelCashCollectedInLast30Days": "920676.49" }, { "xaxis": "2023-04-14", - "cashCollectedInLast30Days": "1882037.28", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1206540.66" + "cashCollectedInLast30Days": "857282.67", + "level": "L3", + "upperLevelCashCollectedInLast30Days": "995087.24", + "lowerLevelCashCollectedInLast30Days": "933386.49" }, { "xaxis": "2023-04-15", - "cashCollectedInLast30Days": "1885096.65", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1234671.52" + "cashCollectedInLast30Days": "882720.39", + "level": "L3", + "upperLevelCashCollectedInLast30Days": "1012053.37", + "lowerLevelCashCollectedInLast30Days": "944810.09" }, { "xaxis": "2023-04-16", - "cashCollectedInLast30Days": "1885684.68", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1202778.29" + "cashCollectedInLast30Days": "890530.39", + "level": "L3", + "upperLevelCashCollectedInLast30Days": "994614.39", + "lowerLevelCashCollectedInLast30Days": "933364.81" }, { "xaxis": "2023-04-17", - "cashCollectedInLast30Days": "1880230.74", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1205769.74" + "cashCollectedInLast30Days": "898969.39", + "level": "L3", + "upperLevelCashCollectedInLast30Days": "1005355.12", + "lowerLevelCashCollectedInLast30Days": "923738.52" }, { "xaxis": "2023-04-18", - "cashCollectedInLast30Days": "1894007.74", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1257805.34" + "cashCollectedInLast30Days": "917033.36", + "level": "L3", + "upperLevelCashCollectedInLast30Days": "1028651.16", + "lowerLevelCashCollectedInLast30Days": "962001.96" }, { "xaxis": "2023-04-19", - "cashCollectedInLast30Days": "1895017.35", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1261057.76" + "cashCollectedInLast30Days": "921033.36", + "level": "L3", + "upperLevelCashCollectedInLast30Days": "1034278.46", + "lowerLevelCashCollectedInLast30Days": "951883.68" }, { "xaxis": "2023-04-20", - "cashCollectedInLast30Days": "1885353.35", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1259049.2" + "cashCollectedInLast30Days": "942373.98", + "level": "L3", + "upperLevelCashCollectedInLast30Days": "1030660.79", + "lowerLevelCashCollectedInLast30Days": "955525.74" }, { "xaxis": "2023-04-21", - "cashCollectedInLast30Days": "1881713.35", - "level": "L7", - "upperLevelCashCollectedInLast30Days": null, - "lowerLevelCashCollectedInLast30Days": "1259315.91" + "cashCollectedInLast30Days": "962607.98", + "level": "L4", + "upperLevelCashCollectedInLast30Days": "1044862.28", + "lowerLevelCashCollectedInLast30Days": "957488.3" } ], "xaxisDomainValues": [ diff --git a/src/utils/commonUtils.ts b/src/utils/commonUtils.ts index 51433a8a..b12aa5f9 100644 --- a/src/utils/commonUtils.ts +++ b/src/utils/commonUtils.ts @@ -27,8 +27,8 @@ export const shortNumberNotation = (value: any = 0, decimals = 2, separator = '' return (parsedValue / 1e7).toFixed(decimals) + `${separator}Cr`; } else if (parsedValue >= 1e5) { return (parsedValue / 1e5).toFixed(decimals) + `${separator}L`; - } else if (parsedValue >= 1e4) { - return (parsedValue / 1e4).toFixed(decimals) + `${separator}K`; + } else if (parsedValue >= 1e3) { + return (parsedValue / 1e3).toFixed(decimals) + `${separator}K`; } return parsedValue; };