// const getTabData = async (tabData) => { // try { // const params = { // parameters: { // projectid: 41654, // year: 2025, // monthno: 6, // storeid: storeData?.StoreId // } // }; // const graphDetails = tabData?.graphDetails || []; // const uniqueUrls = [...new Set(graphDetails.map(graph => graph.GraphUrl))]; // // console.log('🔄 Unique URLs:', uniqueUrls); // const apiCalls = uniqueUrls.map(url => post(url, params)); // const results = await Promise.all(apiCalls); // const dataMap = {}; // uniqueUrls.forEach((url, idx) => { // dataMap[url] = results[idx]; // }); // setGraphApiData(dataMap); // } catch (err) { // console.log("❌ Error fetching tab data:", err); // } // }; // Handle scroll event to show/hide button // const getTabData = async () => { // try { // const params = { // parameters: { // projectid: 41654, // year: 2025, // monthno: 6, // storeid: 2702 // } // }; // // Extract all unique GraphUrls // const uniqueUrls = [...new Set(graphDetails.map(graph => graph.GraphUrl))]; // console.log('uniqueUrls---->', uniqueUrls); // // Call all APIs in parallel // const apiCalls = uniqueUrls.map(url => post(url, params)); // const results = await Promise.all(apiCalls); // // Optional: Map result to url if needed // const dataMap = {}; // uniqueUrls.forEach((url, idx) => { // dataMap[url] = results[idx]; // }); // setGraphApiData(dataMap); // console.log("✅ All API responses:", JSON.stringify(dataMap)); // // You can now store `dataMap` into a state if needed // // setGraphApiData(dataMap); // } catch (err) { // console.log("❌ Error fetching tab data:", err); // } // }; // const getTabData = () => { // let params = { // "parameters": { // "projectid": 41654, // "year": 2025, // "monthno": 6, // "storeid": 2702 // } // } // post(ApiURL.pssscoreApi, params) // .then(res => { // console.log('psscoreApi res==>', res); // }) // } // const renderItem = ({ item }) => { // switch (item.GraphType) { // case "ScoreCard": // return ( // // {item.GraphTitle} // {"45%"} // // ); // case "BarGraph": // const barData = { // labels: ["Jan", "Feb", "Mar", "Apr"], // datasets: [{ data: [35, 45, 20, 55] }] // }; // return ( // // // SOS Compliance Trend // // // // ); // case "Table": // return ( // // // // // {'Asset'} // // // {'Asset Details'} // // // {assetData && assetData.map((table, index) => ( // // {table.section} // // // Display // Present // // { // table && table.data.map((item) => ( // // {item.display} // {item?.present} // // ))} // // // ))} // // // // ) // case "LineChart": // return ( // // Bezier Line Chart // `rgba(255, 255, 255, ${opacity})`, // labelColor: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`, // style: { // borderRadius: 16 // }, // propsForDots: { // r: "6", // strokeWidth: "2", // stroke: "#ffa726" // } // }} // bezier // style={{ // marginVertical: 8, // borderRadius: 16 // }} // /> // // ) // case "PieChart": // return ( // // // // ) // default: // return ( // // // Unsupported Graph Type: {item.GraphType} // // // ); // } // }; // const getFilterStateCity = () => { // let data = JSON.stringify({ // "UserId": "RH5" // }); // let config = { // method: 'post', // maxBodyLength: Infinity, // url: 'https://api1.parinaam.in/api/dabur/StoreDNAfilter', // headers: { // 'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a', // 'Content-Type': 'application/json' // }, // data: data // }; // axios.request(config) // .then((response) => { // console.log("filter", JSON.stringify(response.data)); // }) // .catch((error) => { // console.log(error); // }); // }