Dashboard updated
This commit is contained in:
@@ -94,8 +94,8 @@ const Details = () => {
|
||||
<Image source={IMAGES.backIcon} style={{ height: 20, width: 20, tintColor: '#fff' }} />
|
||||
</TouchableOpacity>
|
||||
<Text style={{ color: '#fff', fontSize: 20, fontWeight: 'bold' }}>Details</Text>
|
||||
<View style={{ width: 25 }} />
|
||||
|
||||
<View style={{ width: 25 }} />
|
||||
|
||||
</View>
|
||||
|
||||
<ScrollView style={{ padding: 20 }}>
|
||||
@@ -254,7 +254,8 @@ const Details = () => {
|
||||
|
||||
return (
|
||||
<View key={index} style={{ marginBottom: 30 }}>
|
||||
<Text style={{ color: '#000', fontSize: 16, fontWeight: '600', marginBottom: 10 }}>
|
||||
|
||||
<Text style={{ marginTop: 10, color: '#000', fontSize: 16, fontWeight: '600', marginBottom: 10 }}>
|
||||
{detail.GraphTitle}
|
||||
|
||||
</Text>
|
||||
@@ -289,6 +290,7 @@ const Details = () => {
|
||||
borderColor: '#eee',
|
||||
}}>
|
||||
<Text style={{ color: '#000', width: '80%' }}>{row[displayKey] || '--'}</Text>
|
||||
|
||||
<TouchableOpacity disabled={isOSATab ? false : true}
|
||||
onPress={() => {
|
||||
if (row[presentKey] == 100 || row[presentKey] == '100') {
|
||||
@@ -340,8 +342,20 @@ const Details = () => {
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
<View style={{ borderTopLeftRadius: 10, borderTopRightRadius: 10, marginTop: 15, marginHorizontal: 15, backgroundColor: '#eee', padding: 10, borderWidth: 1, borderColor: 'gray' }}>
|
||||
<Text style={{ color: '#000', fontSize: 16, fontWeight: '500' }}>{'Out of Stock SKUs:'}</Text>
|
||||
</View>
|
||||
|
||||
{/* SKU List */}
|
||||
<ScrollView contentContainerStyle={{ padding: 15 }}>
|
||||
<ScrollView contentContainerStyle={{
|
||||
marginHorizontal: 15,
|
||||
borderBottomWidth: 0.5,
|
||||
borderLeftWidth: 0.5,
|
||||
borderRightWidth: 0.5,
|
||||
borderColor: 'gray',
|
||||
borderBottomEndRadius: 10,
|
||||
borderBottomLeftRadius: 10,
|
||||
}}>
|
||||
{/* <Text style={{ color: '#000', fontSize: 16, fontWeight: 'bold', marginBottom: 5 }}>OOS SKU details</Text> */}
|
||||
{selectedCategoryData.map((item, idx) => (
|
||||
<View
|
||||
@@ -353,11 +367,15 @@ const Details = () => {
|
||||
paddingVertical: 8,
|
||||
borderBottomWidth: idx === selectedCategoryData.length - 1 ? 0 : 1,
|
||||
borderColor: '#eee',
|
||||
|
||||
}}
|
||||
>
|
||||
<Text style={{ color: '#000', width: '80%' }}>
|
||||
{item.Product_MasterProduct_Name}
|
||||
</Text>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<Text style={{ color: '#000', marginLeft: 10 }}>{idx + 1}. </Text>
|
||||
<Text style={{ color: '#000', }}>
|
||||
{item.Product_MasterProduct_Name}
|
||||
</Text>
|
||||
</View>
|
||||
{/* <Text style={{ color: '#000', width: '20%', textAlign: 'center' }}>
|
||||
{item['#_of_OOS_SKU_for_all_visits']}
|
||||
</Text> */}
|
||||
|
||||
@@ -563,6 +563,10 @@ const Dashboard = (props) => {
|
||||
|
||||
const barData = values.map((v, idx) => {
|
||||
const value = parseFloat(Object.values(v).find(val => typeof val === 'number').toFixed(1));
|
||||
|
||||
// console.log('valuevaluevalue--->', value);
|
||||
|
||||
|
||||
return {
|
||||
value,
|
||||
label: v.CalendarYear_Month,
|
||||
@@ -571,6 +575,7 @@ const Dashboard = (props) => {
|
||||
<Text style={{ color: '#000', fontSize: 12, fontWeight: '500', marginBottom: 5 }}>{value}%</Text>
|
||||
)
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
const visibleBars = barData.length;
|
||||
@@ -708,7 +713,7 @@ const Dashboard = (props) => {
|
||||
});
|
||||
|
||||
// console.log('mainTabIndex----->',mainTabIndex);
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1, backgroundColor: GlobalTheme.colors.primary }}>
|
||||
@@ -769,16 +774,19 @@ const Dashboard = (props) => {
|
||||
disabled={store?.UPLOAD_STATUS == 'U' ? true : false}
|
||||
onPress={() => onSelectStore(store)}
|
||||
key={store.StoreId} style={styles.storeCard}>
|
||||
<View style={[styles.row, { margin: 0 }]}>
|
||||
<Text style={styles.cardTextBold}>{store.StoreName}</Text>
|
||||
<View style={[styles.row, { margin: 0, width: "100%" }]}>
|
||||
<View style={{ width: "70%" }}>
|
||||
<Text style={styles.cardTextBold}>{store.StoreName}</Text>
|
||||
</View>
|
||||
{store?.UPLOAD_STATUS === 'U' ?
|
||||
<Image source={IMAGES.greenTick} style={{ height: 20, width: 20 }} />
|
||||
:
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View style={{ backgroundColor: '#FFF8CD', padding: 5, paddingHorizontal: 7, borderRadius: 15 }}>
|
||||
<Text style={{ color: 'orange', fontSize: 13, fontWeight: '500' }}>Pending</Text>
|
||||
<View style={{ width: "30%", flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View style={{ flexDirection: 'row', backgroundColor: '#ffefd5', padding: 5, paddingHorizontal: 10, borderRadius: 15 }}>
|
||||
<Text style={{ color: 'orange', fontSize: 12, fontWeight: '500' }}>Feedback Pending</Text>
|
||||
{/* <Image source={IMAGES.pending} style={{ marginLeft: 5, height: 18, width: 18, tintColor: 'orange' }} /> */}
|
||||
</View>
|
||||
<Image source={IMAGES.rightArrowIcon} style={{ marginLeft: 10, height: 20, width: 20, resizeMode: 'contain', tintColor: '#97ADD6' }} />
|
||||
<Image source={IMAGES.rightArrowIcon} style={{ marginLeft: -2, height: 20, width: 20, resizeMode: 'contain', tintColor: '#97ADD6' }} />
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user