Store Info Updated

This commit is contained in:
CPM
2025-08-07 13:38:34 +05:30
parent 5a910f62e2
commit 2280bd6d19
16 changed files with 1642 additions and 1689 deletions
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.
+1
View File
@@ -33,6 +33,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
org.gradle.java.home=/opt/homebrew/opt/openjdk@17
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
@@ -263,7 +263,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = JGDHGNH9XY;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
@@ -272,7 +272,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3;
MARKETING_VERSION = 1.4;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -292,7 +292,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = JGDHGNH9XY;
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
@@ -300,7 +300,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3;
MARKETING_VERSION = 1.4;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -382,7 +382,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -451,7 +454,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
+36 -36
View File
@@ -1771,7 +1771,7 @@ PODS:
- SocketRocket
- WCPhotoManipulator (~> 2.6.0)
- Yoga
- react-native-safe-area-context (5.5.1):
- react-native-safe-area-context (5.5.2):
- boost
- DoubleConversion
- fast_float
@@ -1790,8 +1790,8 @@ PODS:
- React-hermes
- React-ImageManager
- React-jsi
- react-native-safe-area-context/common (= 5.5.1)
- react-native-safe-area-context/fabric (= 5.5.1)
- react-native-safe-area-context/common (= 5.5.2)
- react-native-safe-area-context/fabric (= 5.5.2)
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
@@ -1802,7 +1802,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- react-native-safe-area-context/common (5.5.1):
- react-native-safe-area-context/common (5.5.2):
- boost
- DoubleConversion
- fast_float
@@ -1831,7 +1831,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- react-native-safe-area-context/fabric (5.5.1):
- react-native-safe-area-context/fabric (5.5.2):
- boost
- DoubleConversion
- fast_float
@@ -2368,7 +2368,7 @@ PODS:
- Yoga
- RNFS (2.20.0):
- React-Core
- RNGestureHandler (2.27.1):
- RNGestureHandler (2.27.2):
- boost
- DoubleConversion
- fast_float
@@ -2397,7 +2397,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- RNPermissions (5.4.1):
- RNPermissions (5.4.2):
- boost
- DoubleConversion
- fast_float
@@ -2426,7 +2426,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- RNReanimated (3.18.0):
- RNReanimated (3.19.0):
- boost
- DoubleConversion
- fast_float
@@ -2453,11 +2453,11 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNReanimated/reanimated (= 3.18.0)
- RNReanimated/worklets (= 3.18.0)
- RNReanimated/reanimated (= 3.19.0)
- RNReanimated/worklets (= 3.19.0)
- SocketRocket
- Yoga
- RNReanimated/reanimated (3.18.0):
- RNReanimated/reanimated (3.19.0):
- boost
- DoubleConversion
- fast_float
@@ -2484,10 +2484,10 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNReanimated/reanimated/apple (= 3.18.0)
- RNReanimated/reanimated/apple (= 3.19.0)
- SocketRocket
- Yoga
- RNReanimated/reanimated/apple (3.18.0):
- RNReanimated/reanimated/apple (3.19.0):
- boost
- DoubleConversion
- fast_float
@@ -2516,7 +2516,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- RNReanimated/worklets (3.18.0):
- RNReanimated/worklets (3.19.0):
- boost
- DoubleConversion
- fast_float
@@ -2543,10 +2543,10 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNReanimated/worklets/apple (= 3.18.0)
- RNReanimated/worklets/apple (= 3.19.0)
- SocketRocket
- Yoga
- RNReanimated/worklets/apple (3.18.0):
- RNReanimated/worklets/apple (3.19.0):
- boost
- DoubleConversion
- fast_float
@@ -2575,7 +2575,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- RNScreens (4.11.1):
- RNScreens (4.13.1):
- boost
- DoubleConversion
- fast_float
@@ -2603,10 +2603,10 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNScreens/common (= 4.11.1)
- RNScreens/common (= 4.13.1)
- SocketRocket
- Yoga
- RNScreens/common (4.11.1):
- RNScreens/common (4.13.1):
- boost
- DoubleConversion
- fast_float
@@ -2636,7 +2636,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- RNSVG (15.12.0):
- RNSVG (15.12.1):
- boost
- DoubleConversion
- fast_float
@@ -2663,10 +2663,10 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNSVG/common (= 15.12.0)
- RNSVG/common (= 15.12.1)
- SocketRocket
- Yoga
- RNSVG/common (15.12.0):
- RNSVG/common (15.12.1):
- boost
- DoubleConversion
- fast_float
@@ -2695,7 +2695,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- RNVectorIcons (10.2.0):
- RNVectorIcons (10.3.0):
- boost
- DoubleConversion
- fast_float
@@ -2725,11 +2725,11 @@ PODS:
- SocketRocket
- Yoga
- SocketRocket (0.7.1)
- VisionCamera (4.7.0):
- VisionCamera/Core (= 4.7.0)
- VisionCamera/React (= 4.7.0)
- VisionCamera/Core (4.7.0)
- VisionCamera/React (4.7.0):
- VisionCamera (4.7.1):
- VisionCamera/Core (= 4.7.1)
- VisionCamera/React (= 4.7.1)
- VisionCamera/Core (4.7.1)
- VisionCamera/React (4.7.1):
- React-Core
- WCPhotoManipulator (2.6.0)
- Yoga (0.0.0)
@@ -3060,7 +3060,7 @@ SPEC CHECKSUMS:
react-native-geolocation: f01ad4718ad1d015d0c0dd12a6f707354022530e
react-native-image-resizer: 8537d9fdbd14b9d5f301a2d319c469bf56f6e9a0
react-native-photo-manipulator: 5ac803352e07b7f61f5905e78952006f0c4efd54
react-native-safe-area-context: d3738f0c3b1fcefaed874a45891b0d44306c47c1
react-native-safe-area-context: 68d1363b8354472a961aa6861ba8451beaf9a810
react-native-sqlite-storage: 0c84826214baaa498796c7e46a5ccc9a82e114ed
React-NativeModulesApple: e16d5c133019987285f001fbf1461a861e40426f
React-oscompat: 7c0a341cc31e350da71ddf2e46de0a845d1d1626
@@ -3095,14 +3095,14 @@ SPEC CHECKSUMS:
ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147
RNCAsyncStorage: 1f04c8d56558e533277beda29187f571cf7eecb2
RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
RNGestureHandler: 5e1a1605659c22098719fc2e8aee453fe728f52e
RNPermissions: ebf576a01cc2cb73db0006e0b3c9b4760e0aa569
RNReanimated: bc1ddb7a5352648bcf0d592256069833bf935a46
RNScreens: ee2abe7e0c548eed14e92742e81ed991165c56aa
RNSVG: 341f555dbcd83a34d1f058e88df387de7bbc3347
RNVectorIcons: ef9b4b0b786053ebdd63ee2972f48de9633ba166
RNGestureHandler: a0c83d8e4422f2ac04d1acb1741866a5184c7b73
RNPermissions: b15c9d7ba7aacff916439d445f385abbb2a36a4f
RNReanimated: 5ee070eb08e681be2a9ee7e797019d97d4706131
RNScreens: c63849403489bd068ea160f276fbc8416f19f2f7
RNSVG: d407e5f2ede12bbcd92e4d23a405ad5a5f7294a3
RNVectorIcons: be4d047a76ad307ffe54732208fb0498fcb8477f
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
VisionCamera: c5c07db74721d37f4c9f8331ad1f8da7b2539995
VisionCamera: 9a8f98ae344fe5d148f84bb45829f9e4caab9d2f
WCPhotoManipulator: 804988e16a6fe941cddff942b2acf887110de5d6
Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb
+1 -1
View File
@@ -51,7 +51,7 @@
"react-native-svg": "^15.12.0",
"react-native-toast-message": "^2.3.1",
"react-native-vector-icons": "^10.2.0",
"react-native-vision-camera": "^4.7.0",
"react-native-vision-camera": "^4.7.1",
"react-redux": "^9.2.0"
},
"devDependencies": {
BIN
View File
Binary file not shown.
+7 -3
View File
@@ -9,6 +9,9 @@ const SplashScreen = ({ navigation }) => {
const dispatch = useDispatch();
useEffect(() => {
checkLoginStatus();
}, []);
const checkLoginStatus = async () => {
try {
const isuserlogin = await AsyncStorage.getItem('@Dabur_DNA_User');
@@ -16,24 +19,25 @@ const SplashScreen = ({ navigation }) => {
const parsedUser = JSON.parse(isuserlogin);
if (isuserlogin) {
dispatch(setUser(parsedUser));
setTimeout(() => {
navigation.reset({
index: 0,
routes: [{ name: 'Welcome' }],
});
}, 1000);
} else {
setTimeout(() => {
navigation.reset({
index: 0,
routes: [{ name: 'Login' }],
});
}, 1000);
}
} catch (error) {
console.error('Error checking login status:', error);
}
};
checkLoginStatus();
}, []);
return (
<View style={styles.container}>
+19 -127
View File
@@ -231,12 +231,6 @@ const Dashboard = (props) => {
setTabCache({}); // reset cache when filters change
}, [month, year]);
// useEffect(() => {
// if (mainDisplayJson && storeData?.StoreId) {
// getTabData(mainDisplayJson);
// }
// }, [mainTabIndex, storeData]);
useEffect(() => {
if (mainDisplayJson && storeData?.StoreId) {
setTimeout(() => getTabData(mainDisplayJson), 0);
@@ -257,14 +251,9 @@ const Dashboard = (props) => {
return;
}
const escape = str => (str || '').toString().replace(/'/g, "''");
db.transaction(tx => {
data_arr.forEach(item => {
const { StoreId, StoreName, ChainName, Address, Pincode, StateName, StoreType, CityName } = item;
// First, check if the StoreId exists
tx.executeSql(
`SELECT * FROM StoreInfoDNALocal WHERE StoreId = ?`,
[StoreId],
@@ -275,8 +264,6 @@ const Dashboard = (props) => {
INSERT INTO StoreInfoDNALocal
(VISIT_DATE, StoreId, StoreName, ChainName, Address, Pincode, CityName, StateName, StoreType, UPLOAD_STATUS)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
tx.executeSql(sql, [
d2,
StoreId,
@@ -335,47 +322,6 @@ const Dashboard = (props) => {
});
};
// const getTabData = async (tabData) => {
// setLoading(true)
// try {
// const params = {
// parameters: {
// projectid: 41654,
// year: year,
// monthno: month,
// storeid: storeData?.StoreId
// }
// };
// const graphDetails = tabData?.graphDetails || [];
// const uniqueUrls = [...new Set(graphDetails.map(graph => graph.GraphUrl))];
// const apiCalls = uniqueUrls.map(url => {
// const config = {
// method: 'post',
// url: url, // each URL from the list
// headers: {
// 'X-API-Key': 'f7fa9b09-ced8-4862-8cb7-5e7599d90fa2',
// 'Content-Type': 'application/json'
// },
// data: params
// };
// return axios.request(config);
// });
// const results = await Promise.all(apiCalls);
// const dataMap = {};
// uniqueUrls.forEach((url, idx) => {
// dataMap[url] = results[idx].data; // collect raw API response
// });
// setGraphApiData(dataMap);
// setLoading(false)
// } catch (err) {
// console.log("❌ Error fetching tab data:", err);
// }
// };
// 🔧 Optimized getTabData with caching logic added
const getTabData = async (tabData) => {
if (!storeData?.StoreId) return;
@@ -400,23 +346,8 @@ const Dashboard = (props) => {
console.log("🔁 API Params:", params);
const graphDetails = tabData?.graphDetails || [];
const uniqueUrls = [...new Set(graphDetails.map(graph => graph.GraphUrl))];
// const apiCalls = uniqueUrls.map(url => {
// const config = {
// method: 'post',
// url: url,
// headers: {
// 'X-API-Key': 'f7fa9b09-ced8-4862-8cb7-5e7599d90fa2',
// 'Content-Type': 'application/json'
// },
// data: params
// };
// return axios.request(config);
// });
const apiCalls = uniqueUrls.map(async url => {
const config = {
method: 'post',
@@ -430,15 +361,10 @@ const Dashboard = (props) => {
return await fetchWithRetry(config);
});
const results = await Promise.all(apiCalls);
console.log("📊 API Results:", results.map(r => r?.data));
const dataMap = {};
// uniqueUrls.forEach((url, idx) => {
// dataMap[url] = results[idx].data;
// });
uniqueUrls.forEach((url, idx) => {
const responseData = results[idx]?.data;
if (!responseData || !responseData.data || responseData.data.length === 0) {
@@ -447,8 +373,6 @@ const Dashboard = (props) => {
}
dataMap[url] = responseData;
});
console.log('uniqueUrls-dataMap---------->', dataMap);
setGraphApiData(dataMap);
setTabCache(prev => ({ ...prev, [tabKey]: dataMap }));
@@ -459,7 +383,6 @@ const Dashboard = (props) => {
}
};
const fetchWithRetry = async (config, retries = 2, delay = 1000) => {
for (let i = 0; i <= retries; i++) {
try {
@@ -477,8 +400,6 @@ const Dashboard = (props) => {
return null; // all attempts failed
};
const fetchDetailGraphs = async (detailPages) => {
try {
const resultMap = {};
@@ -501,7 +422,6 @@ const Dashboard = (props) => {
}
};
const handleScroll = (event) => {
const offsetY = event.nativeEvent.contentOffset.y;
setShowButton(offsetY > 0); // Show button only if not at the top
@@ -567,7 +487,7 @@ const Dashboard = (props) => {
console.log('state--', state, city);
console.log('searchText--', searchText);
setSearchResult(!searchResult)
// setSearchResult(!searchResult)
setLoading(true)
try {
const params = JSON.stringify({
@@ -577,6 +497,9 @@ const Dashboard = (props) => {
"StoreSearchText": searchText ? searchText : "",
"UserId": userId || 0,
});
console.log('params---->', params);
const config = {
method: 'post',
@@ -604,18 +527,11 @@ const Dashboard = (props) => {
const renderItem = ({ item }) => {
const apiData = graphApiData[item.GraphUrl];
// const values = apiData?.data || [];
const values = apiData?.data?.length ? apiData.data : [];
const scoreValue = values.length > 0 ? Object.values(values[0])[0] : null;
// <Text>{scoreValue !== undefined ? `${scoreValue.toFixed(1)}%` : "No Data"}</Text>
console.log('apiData --->', apiData);
if (apiData?.status === 'error') {
return (
<View style={styles.percentBox}>
@@ -625,15 +541,6 @@ const Dashboard = (props) => {
);
}
// if (!apiData) {
// return (
// <View style={[styles.percentBox, { justifyContent: 'center', alignItems: 'center' }]}>
// <ActivityIndicator size="small" color="#113F8C" />
// </View>
// );
// }
switch (item.GraphType) {
case "ScoreCard":
const firstDataObj = values[0] || {};
@@ -650,7 +557,7 @@ const Dashboard = (props) => {
//GIFTED CHART LIBRARY -----
case "BarGraph":
const chartWidth = screenWidth * 0.75;
const chartWidth = screenWidth * 0.80;
const barWidth = 40;
const barColors = ['#1BF2E0', '#1B7BF2', '#1BC0F2'];
@@ -675,7 +582,7 @@ const Dashboard = (props) => {
}
return (
<View style={{ alignItems: 'center', justifyContent: 'center', padding: 10, borderWidth: 0.5, borderRadius: 10, }}>
<View style={{ width: '100%', alignItems: 'center', justifyContent: 'center', padding: 10, borderWidth: 0.5, borderRadius: 25, }}>
{/* <View style={{ alignSelf: 'center', borderWidth: 0.5,borderRadius:20, paddingBottom: 10 }}> */}
<Text style={{ fontSize: 16, fontWeight: '600', marginBottom: 10 }}>
@@ -800,7 +707,6 @@ const Dashboard = (props) => {
}, 300), []);
const feedbackCount = visitedStoreData1?.filter(item => item?.UPLOAD_STATUS == 'U')?.length;
const filteredStores = storeList.filter((store) => {
const query = searchQuery.toLowerCase();
return (
@@ -904,14 +810,13 @@ const Dashboard = (props) => {
onRightPress={() => setFeedBackModal(true)}
/>
{/* Store Name Card */}
<View style={styles.row}>
<View style={styles.selectedStoreText}>
{/* <Text style={[styles.storeNameText, { width: '90%' }]}> {`${storeData?.StoreName} \n(Store Id :${storeData?.StoreId})`}</Text> */}
<View style={{ width: '90%' }}>
<View style={{ width: '88%' }}>
<Text style={[styles.storeNameText, {}]}>{storeData?.StoreName}</Text>
<Text style={{ color: GlobalTheme.colors.gray, fontSize: 13 }}>Store Id : {storeData?.StoreId}</Text>
</View>
<Text style={{}}></Text>
<TouchableOpacity onPress={() => openBottomSheet()} style={styles.filterIcon}>
<Image source={IMAGES.filterIcon} style={{ height: 18, width: 18 }} />
</TouchableOpacity>
@@ -960,7 +865,6 @@ const Dashboard = (props) => {
<View style={styles.seperator} />
{/* Main Tab */}
<View style={{ flexDirection: 'row' }}>
{mainTabs.map((tab, index) => {
const isSelected = index === mainTabIndex;
@@ -1014,8 +918,7 @@ const Dashboard = (props) => {
{/* Score Card */}
<View style={{ margin: 5 }}>
<View style={{ marginHorizontal: 5 }}>
<View style={{ marginHorizontal: 5, marginTop: 5 }}>
{firstItem && (
<TouchableOpacity
activeOpacity={0.8}
@@ -1027,16 +930,7 @@ const Dashboard = (props) => {
}
}}
>
<View
style={[
styles.percentBox,
{
backgroundColor: "#C3D7FF",
width: '100%',
elevation: 0,
},
]}
>
<View style={{ width: '48%', height: 100, minHeight: 100, borderRadius: 20, justifyContent: 'center', alignItems: 'center', backgroundColor: "#C3D7FF", width: '100%', elevation: 0, }} >
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<View style={{ width: '80%', alignItems: 'center' }}>
<Text style={styles.boxText}>{firstItem.GraphTitle}</Text>
@@ -1286,7 +1180,7 @@ const Dashboard = (props) => {
<View style={[styles.row, {}]}>
<Text style={styles.dropHeaderText}>State</Text>
<Text style={styles.dropHeaderText}> City</Text>
<Text style={styles.dropHeaderText}> ASM Area</Text>
{/* <Text style={styles.dropHeaderText}> ASM Area</Text> */}
</View>
{/* Dropdown */}
@@ -1340,9 +1234,9 @@ const Dashboard = (props) => {
const uniqueAsms = Array.from(new Map(asms.map(a => [a.value, a])).values());
setCityOptions(uniqueCities);
setAsmOptions(uniqueAsms);
// setAsmOptions(uniqueAsms);
setCity(null); // reset
setAsmArea(null); // reset
// setAsmArea(null); // reset
}}
containerStyle={{ flex: 1 }}
/>
@@ -1356,12 +1250,12 @@ const Dashboard = (props) => {
/>
{/* ASM Area Dropdown */}
<CustomDropdown
{/* <CustomDropdown
data={asmOptions}
value={asmArea}
onChange={(item) => setAsmArea(item.value)}
containerStyle={{ flex: 1 }}
/>
/> */}
</View>
@@ -1382,7 +1276,7 @@ const Dashboard = (props) => {
textstyle={{ color: GlobalTheme.colors.white, fontSize: GlobalTheme.typography.fontSize.medium }}
/>
</View>
{searchResult ?
<View style={{ marginBottom: 70 }}>
<View style={{ marginTop: 20 }}>
{/* <Text style={{ color: '#000', fontSize: 14 }}>{storeList ? storeList.length : 0} Store</Text> */}
@@ -1407,13 +1301,13 @@ const Dashboard = (props) => {
<Text style={styles.cardText}>{store.Address}</Text>
<Text style={styles.cardText}>{'Store Id:'} {store.StoreId}</Text>
</TouchableOpacity>
)) : null
))
: null
}
</View>
: null
}
</View>
@@ -1436,5 +1330,3 @@ const Dashboard = (props) => {
}
export default Dashboard
@@ -17,12 +17,12 @@
"TabRow": 1,
"TabCol": 2
},
{
"TabId": 3,
"TabName": "SOS Compliance",
"TabRow": 1,
"TabCol": 3
},
// {
// "TabId": 3,
// "TabName": "SOS Compliance",
// "TabRow": 1,
// "TabCol": 3
// },
{
"TabId": 4,
"TabName": "OSA",
@@ -61,15 +61,15 @@
"GraphBackground": "#E2C8FE",
"GraphOptions": {}
},
{
"TabId": 1,
"GraphId": 3,
"GraphType": "ScoreCard",
"GraphTitle": "SOS Compliance",
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Compliance_Perc",
"GraphBackground": "#FFD7C3",
"GraphOptions": {}
},
// {
// "TabId": 1,
// "GraphId": 3,
// "GraphType": "ScoreCard",
// "GraphTitle": "SOS Compliance",
// "GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Compliance_Perc",
// "GraphBackground": "#FFD7C3",
// "GraphOptions": {}
// },
{
"TabId": 1,
"GraphId": 4,
@@ -193,7 +193,7 @@
"TabId": 5,
"GraphId": 5,
"GraphType": "Table",
"GraphTitle": "Asset Availability",
"GraphTitle": "Visibility",
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/asset_availability_mtd",
"GraphBackground": "#ECFFFA",
"GraphOptions": {}
@@ -202,7 +202,7 @@
"TabId": 5,
"GraphId": 5,
"GraphType": "Table",
"GraphTitle": "Asset",
"GraphTitle": "Additional Visibility",
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/additional_visibility_mtd",
"GraphBackground": "#ECFFFA",
"GraphOptions": {}
@@ -232,7 +232,7 @@
"TabId": 3,
"GraphId": 3,
"GraphType": "Table",
"GraphTitle": "SOS Compliance - Category",
"GraphTitle": "OSA - Category",
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/osa_perc_on_category",
"GraphBackground": "#ECFFFA",
"GraphOptions": {}
@@ -298,12 +298,12 @@
"TabRow": 1,
"TabCol": 2
},
{
"TabId": 3,
"TabName": "SOS Compliance",
"TabRow": 1,
"TabCol": 3
},
// {
// "TabId": 3,
// "TabName": "SOS Compliance",
// "TabRow": 1,
// "TabCol": 3
// },
{
"TabId": 4,
"TabName": "OSA",
@@ -342,15 +342,15 @@
"GraphBackground": "#E2C8FE",
"GraphOptions": {}
},
{
"TabId": 1,
"GraphId": 3,
"GraphType": "ScoreCard",
"GraphTitle": "SOS Compliance",
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_compliance_lsv_perc",
"GraphBackground": "#FFD7C3",
"GraphOptions": {}
},
// {
// "TabId": 1,
// "GraphId": 3,
// "GraphType": "ScoreCard",
// "GraphTitle": "SOS Compliance",
// "GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_compliance_lsv_perc",
// "GraphBackground": "#FFD7C3",
// "GraphOptions": {}
// },
{
"TabId": 1,
"GraphId": 4,
+14 -3
View File
@@ -146,7 +146,7 @@ export const styles = StyleSheet.create({
fontWeight: '400'
},
dropHeaderText: {
width: '33%',
width: '50%',
color: '#000',
fontWeight: '400',
fontSize: 14
@@ -202,7 +202,7 @@ export const styles = StyleSheet.create({
},
filterIcon: {
backgroundColor: '#D8E3F1',
padding: 3,
padding: 5,
borderRadius: 5
},
storeInfoText: {
@@ -217,9 +217,20 @@ export const styles = StyleSheet.create({
minHeight: 100,
backgroundColor: '#EAF1FF',
borderRadius: 20,
elevation: 2,
justifyContent: 'center',
alignItems: 'center',
// Cross-platform shadow styles
...Platform.select({
ios: {
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.2,
shadowRadius: 2,
},
android: {
elevation: 2,
},
}),
},
boxText: {
color: '#000',
+45 -4
View File
@@ -147,9 +147,19 @@ const SectionListView = ({ listData }) => {
);
return (
<View style={styles.section}>
<>
{!item.hideSectionTitle && (
<>
<Text style={styles.sectionTitle}>{item.section}</Text>
<View style={[horizonalLine, { marginVertical: 10 }]} />
{/* <View style={[horizonalLine, { marginVertical: 10 }]} /> */}
</>
)}
<View style={styles.section}>
{/* ✅ Only show title if not hidden */}
{/* <Text style={styles.sectionTitle}>{item.section}</Text>
<View style={[horizonalLine, { marginVertical: 10 }]} /> */}
{/* Shared horizontal scroll view for header + rows */}
<ScrollView
@@ -166,6 +176,7 @@ const SectionListView = ({ listData }) => {
</View>
</ScrollView>
</View>
</>
);
}}
/>
@@ -229,9 +240,35 @@ const StoreInfo = ({ navigation, route }) => {
});
// Step 2: Group items by tabId and section
// const groupedData = {};
// tempData.forEach(entry => {
// const key = `${entry.tabId}-${entry.section}`;
// if (!groupedData[key]) {
// groupedData[key] = {
// tabId: entry.tabId,
// section: entry.section,
// items: []
// };
// }
// groupedData[key].items.push(...entry.items);
// });
// 👇 Replace Step 2 with this
const groupedData = {};
let threePEmployeeCount = 0;
tempData.forEach(entry => {
if (entry.section === "3P Employee") {
// increment counter
threePEmployeeCount += 1;
const uniqueKey = `${entry.tabId}-${entry.section}-${Math.random()}`;
groupedData[uniqueKey] = {
tabId: entry.tabId,
section: entry.section,
items: entry.items,
hideSectionTitle: threePEmployeeCount > 1 // 👈 hide title after first card
};
} else {
const key = `${entry.tabId}-${entry.section}`;
if (!groupedData[key]) {
groupedData[key] = {
@@ -241,8 +278,12 @@ const StoreInfo = ({ navigation, route }) => {
};
}
groupedData[key].items.push(...entry.items);
}
});
// let objTemp={}
// groupedData['0-Dabur Employee']?.items
@@ -307,8 +348,8 @@ const StoreInfo = ({ navigation, route }) => {
</ScrollView>
</View>
<ScrollView horizontal={false} style={{ flex: 1 }}>
<Text style={styles.headerText}>{selectedTabTitle} </Text>
<View style={{ width: '100%' }}>{renderTabContent()}</View>
{/* <Text style={styles.headerText}>{selectedTabTitle} </Text> */}
<View style={{ width: '100%', marginTop: 20, }}>{renderTabContent()}</View>
</ScrollView>
</View>
<Loader visible={loading} />
+4 -1
View File
@@ -61,7 +61,9 @@ export const styles = StyleSheet.create({
width: Screen.screenWidth * 0.92,
marginVertical: 5,
borderWidth: 1,
borderColor: GlobalTheme.colors.lightblueborder,
borderColor: '#113F8C',
marginBottom:15,
marginTop:10,
// ...shadow,
},
@@ -69,6 +71,7 @@ export const styles = StyleSheet.create({
color:'#000',
fontWeight: GlobalTheme.typography.fontWeight.bold,
fontSize: GlobalTheme.typography.fontSize.small,
marginHorizontal:10
},
row: {
flexDirection: 'row',
+1 -1
View File
@@ -12,7 +12,7 @@ const Welcome = ({ navigation }) => {
return (
<View style={styles.container}>
<ImageBackground source={IMAGES.WelcomeBackground} style={styles.background} resizeMode='cover'>
<ImageBackground source={IMAGES.WelcomeBackground} style={styles.background} resizeMode='contain'>
<View style={styles.content}>
<Image source={IMAGES.Welcomelogo} style={styles.illustration} />
<Text style={styles.title}>Welcome to {"\n"} Performics Store DNA</Text>
+1116 -1121
View File
File diff suppressed because it is too large Load Diff