Skip to content

Commit

Permalink
Merge pull request #1011 from sriranjan-s/Dev-2.0
Browse files Browse the repository at this point in the history
added OBPAS changes
  • Loading branch information
sriranjan-s authored Mar 20, 2024
2 parents 41a9bed + ccfc6fa commit 6cc0b7b
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,13 @@ const CustomBarChart = ({
filters: value?.filters,
moduleLevel: value?.moduleLevel || moduleCode,
});
console.log("hhhhhhhh",data)
const chartData = useMemo(() => {
if (!response) return null;
console.log("ressssssssss",response?.responseData)
let possibleValues = ["pttopPerformingStatesRevenue","ptbottomPerformingStatesRevenue","tltopPerformingStatesRevenue","tlbottomPerformingStatesRevenue","obpstopPerformingStatesRevenue","obpsbottomPerformingStatesRevenue","noctopPerformingStatesRevenue","nocbottomPerformingStatesRevenue","wstopPerformingStatesRevenue","wsbottomPerformingStatesRevenue","OverviewtopPerformingStates","OverviewbottomPerformingStates"]

setChartDenomination("number");
const dd = response?.responseData?.data?.map((bar) => {
let plotValue = bar?.plots?.[0].value || 0;
console.log("barrrrrrr",plotValue,data)
let type =""
if(possibleValues.includes(data?.id))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const CustomTable = ({ data = {}, onSearch, setChartData, setChartDenomination,
return t(code);
};

const getDrilldownCharts = (value, filterKey, label, filters = []) => {
const getDrilldownCharts = (value, filterKey, label, filters = []) => {
if (response?.responseData?.drillDownChartId && response?.responseData?.drillDownChartId !== "none") {
let currentValue = value;
if (filterKey === "tenantId") {
Expand Down Expand Up @@ -241,9 +241,9 @@ const CustomTable = ({ data = {}, onSearch, setChartData, setChartDenomination,
return (originalRow, rowIndex, columns) => {
const cellValue = originalRow?.[name];
if (plot?.symbol === "amount") {
return typeof cellValue === "object"
? { value: Digit.Utils.dss.formatter(convertDenomination(cellValue?.value), "number", "Lac", true, t, isFinance ? true : false), insight: cellValue?.insight }
: String(Digit.Utils.dss.formatter(convertDenomination(cellValue), "number", "Lac", true, t, isFinance ? true : false));
return typeof cellValue === "object"
? { value: Digit.Utils.dss.formatter(convertDenomination(cellValue?.value), "number", "Lac", true, t, isFinance ? true : true), insight: cellValue?.insight }
: String(Digit.Utils.dss.formatter(convertDenomination(cellValue), "number", "Lac", true, t, isFinance ? true : true));
} else if (plot?.symbol === "number" || plot?.symbol === "percentage") {
return typeof cellValue === "object"
? { value: Digit.Utils.dss.formatter(cellValue?.value, "number", "Lac", true, t), insight: cellValue?.insight }
Expand Down Expand Up @@ -326,6 +326,98 @@ if(chartKey == "xptFyByStatesv3")
}
]
}

}else if (chartKey == "xptFyByUlbv3")
{
columns= {
"headerName": "",
"headerValue": 5,
"headerSymbol": null,
"insight": null,
"plots": [
{
"label": "5",
"name": "S.N.",
"value": null,
"strValue": null,
"symbol": "text"
},
{
"label": "",
"name": "Ulb",
"value": null,
"strValue": null,
"symbol": "text"
},
{
"label": null,
"name": "2021-22",
"value": "",
"strValue": null,
"symbol": "number"
},
{
"label": null,
"name": "2022-23",
"value": "",
"strValue": null,
"symbol": "number"
},
{
"label": null,
"name": "2023-24",
"value": "",
"strValue": null,
"symbol": "number"
}
]
}
}
else if (chartKey == "xptFyByWardv3")
{
columns= {
"headerName": "",
"headerValue": 5,
"headerSymbol": null,
"insight": null,
"plots": [
{
"label": "5",
"name": "S.N.",
"value": null,
"strValue": null,
"symbol": "text"
},
{
"label": "",
"name": "Ward",
"value": null,
"strValue": null,
"symbol": "text"
},
{
"label": null,
"name": "2021-22",
"value": "",
"strValue": null,
"symbol": "number"
},
{
"label": null,
"name": "2022-23",
"value": "",
"strValue": null,
"symbol": "number"
},
{
"label": null,
"name": "2023-24",
"value": "",
"strValue": null,
"symbol": "number"
}
]
}
}
else {
columns = response?.responseData?.data?.find((row) =>!!row);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ const OBPSAcknowledgement = ({ data, onSuccess }) => {
mutation1.mutate(formdata, {
onSuccess,
});
sessionStorage.clear("Malbafees")
sessionStorage.clear("WaterCharges")
sessionStorage.clear("GaushalaFees")
sessionStorage.clear("LabourCess")
sessionStorage.clear("otherCharges")
sessionStorage.clear("lessAdjusment")
sessionStorage.clear("development")
sessionStorage.removeItem("Malbafees")
sessionStorage.removeItem("WaterCharges")
sessionStorage.removeItem("GaushalaFees")
sessionStorage.removeItem("LabourCess")
sessionStorage.removeItem("otherCharges")
sessionStorage.removeItem("lessAdjusment")
sessionStorage.removeItem("development")

} catch (err) {
}
Expand Down

0 comments on commit 6cc0b7b

Please sign in to comment.