year filter updated

This commit is contained in:
CPM
2026-03-17 18:39:33 +05:30
parent 4ad584785d
commit 77ab412c66
3 changed files with 151 additions and 127 deletions
@@ -195,10 +195,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks.sh\"\n";
@@ -234,10 +238,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources.sh\"\n";
@@ -263,7 +271,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = JGDHGNH9XY;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
@@ -272,7 +280,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.8;
MARKETING_VERSION = 1.9;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -292,7 +300,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = JGDHGNH9XY;
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
@@ -300,7 +308,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.8;
MARKETING_VERSION = 1.9;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
+1 -1
View File
@@ -29,7 +29,7 @@ const SplashScreen = ({ navigation }) => {
setTimeout(() => {
navigation.reset({
index: 0,
routes: [{ name: 'Project' }],
routes: [{ name: 'Login' }],
});
}, 1000);
}
+138 -122
View File
@@ -1,5 +1,5 @@
import { View, Text, Image, TouchableOpacity, Dimensions, TextInput, ScrollView, FlatList, Alert, Modal, ActivityIndicator, Platform } from 'react-native'
import React, { useCallback, useEffect, useRef, useState } from 'react'
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import RBSheet from 'react-native-raw-bottom-sheet';
import { styles } from './style';
import LinearGradient from 'react-native-linear-gradient';
@@ -22,127 +22,114 @@ import moment from 'moment';
import _ from 'lodash';
import AsyncStorage from '@react-native-async-storage/async-storage';
// Latest code pushed by Ajeet
const visitedStoreData = [
{
id: 1,
name: "Chawla Store",
address: "G-8, Mahakavi Goswami Tulsidas Marg, Paraag Vihar, Press Colony, Hari Nagar, New Delhi, 110027",
status: "pending"
},
{
id: 2,
name: "Mohan Mahalaxmi store",
address: "G-8, Mahakavi Goswami Tulsidas Marg, Paraag Vihar, Press Colony, Hari Nagar, New Delhi, 110027",
status: "completed"
},
{
id: 3,
name: "Bansal General store",
address: "G-8, Mahakavi Goswami Tulsidas Marg, Paraag Vihar, Press Colony, Hari Nagar, New Delhi, 110027",
status: "completed"
}
// Latest code pushed
// const visitedStoreData = [
// {
// id: 1,
// name: "Chawla Store",
// address: "G-8, Mahakavi Goswami Tulsidas Marg, Paraag Vihar, Press Colony, Hari Nagar, New Delhi, 110027",
// status: "pending"
// },
// {
// id: 2,
// name: "Mohan Mahalaxmi store",
// address: "G-8, Mahakavi Goswami Tulsidas Marg, Paraag Vihar, Press Colony, Hari Nagar, New Delhi, 110027",
// status: "completed"
// },
// {
// id: 3,
// name: "Bansal General store",
// address: "G-8, Mahakavi Goswami Tulsidas Marg, Paraag Vihar, Press Colony, Hari Nagar, New Delhi, 110027",
// status: "completed"
// }
];
const monthData = [
{ label: 'January', value: '1' },
{ label: 'February', value: '2' },
{ label: 'March', value: '3' },
{ label: 'April', value: '4' },
{ label: 'May', value: '5' },
{ label: 'June', value: '6' },
{ label: 'July', value: '7' },
{ label: 'August', value: '8' },
{ label: 'September', value: '9' },
{ label: 'October', value: '10' },
{ label: 'November', value: '11' },
{ label: 'December', value: '12' },
];
const yearData = [
{ label: '2025', value: '2025' },
{ label: '2024', value: '2024' },
{ label: '2023', value: '2023' },
{ label: '2022', value: '2022' },
{ label: '2021', value: '2021' },
{ label: '2020', value: '2020' },
{ label: '2019', value: '2019' },
{ label: '2018', value: '2018' },
{ label: '2017', value: '2017' },
{ label: '2016', value: '2016' },
{ label: '2015', value: '2015' },
];
const assetData = [
{
"section": "Asset%",
"data": [
{ "display": "Real Endcap", "present": "No" },
{ "display": "Honey Parasite", "present": "Yes" },
{ "display": "Odonil Floor Stack", "present": "YHes" }
]
},
{
"section": "Additional Visibility",
"data": [
{ "display": "Active 1 Ltr Endcap", "present": "Yes" },
{ "display": "Chyawanprash Stack", "present": "Yes" }
]
},
{
"section": "Promotion",
"data": [
{ "display": "Activ 100% Juice", "present": "Yes" },
{ "display": "Airfresher", "present": "No" },
{ "display": "BABY CARE", "present": "No" },
{ "display": "Chyawanprash", "present": "No" },
{ "display": "Hair Oil", "present": "No" },
]
}
]
const PieData = [
{
name: "Seoul",
population: 21500000,
color: "rgba(131, 167, 234, 1)",
legendFontColor: "#7F7F7F",
legendFontSize: 15
},
{
name: "Toronto",
population: 2800000,
color: "#F00",
legendFontColor: "#7F7F7F",
legendFontSize: 15
},
{
name: "Beijing",
population: 527612,
color: "red",
legendFontColor: "#7F7F7F",
legendFontSize: 15
},
{
name: "New York",
population: 8538000,
color: "#ffffff",
legendFontColor: "#7F7F7F",
legendFontSize: 15
},
{
name: "Moscow",
population: 11920000,
color: "rgb(0, 0, 255)",
legendFontColor: "#7F7F7F",
legendFontSize: 15
}
];
const barData = {
labels: ["Jan", "Feb", "March", "April",],
datasets: [
{
data: [20, 45, 28, 80]
}
]
};
// ];
// const yearData = [
// { label: '2025', value: '2025' },
// { label: '2024', value: '2024' },
// { label: '2023', value: '2023' },
// { label: '2022', value: '2022' },
// { label: '2021', value: '2021' },
// { label: '2020', value: '2020' },
// { label: '2019', value: '2019' },
// { label: '2018', value: '2018' },
// { label: '2017', value: '2017' },
// { label: '2016', value: '2016' },
// { label: '2015', value: '2015' },
// ];
// const assetData = [
// {
// "section": "Asset%",
// "data": [
// { "display": "Real Endcap", "present": "No" },
// { "display": "Honey Parasite", "present": "Yes" },
// { "display": "Odonil Floor Stack", "present": "YHes" }
// ]
// },
// {
// "section": "Additional Visibility",
// "data": [
// { "display": "Active 1 Ltr Endcap", "present": "Yes" },
// { "display": "Chyawanprash Stack", "present": "Yes" }
// ]
// },
// {
// "section": "Promotion",
// "data": [
// { "display": "Activ 100% Juice", "present": "Yes" },
// { "display": "Airfresher", "present": "No" },
// { "display": "BABY CARE", "present": "No" },
// { "display": "Chyawanprash", "present": "No" },
// { "display": "Hair Oil", "present": "No" },
// ]
// }
// ]
// const PieData = [
// {
// name: "Seoul",
// population: 21500000,
// color: "rgba(131, 167, 234, 1)",
// legendFontColor: "#7F7F7F",
// legendFontSize: 15
// },
// {
// name: "Toronto",
// population: 2800000,
// color: "#F00",
// legendFontColor: "#7F7F7F",
// legendFontSize: 15
// },
// {
// name: "Beijing",
// population: 527612,
// color: "red",
// legendFontColor: "#7F7F7F",
// legendFontSize: 15
// },
// {
// name: "New York",
// population: 8538000,
// color: "#ffffff",
// legendFontColor: "#7F7F7F",
// legendFontSize: 15
// },
// {
// name: "Moscow",
// population: 11920000,
// color: "rgb(0, 0, 255)",
// legendFontColor: "#7F7F7F",
// legendFontSize: 15
// }
// ];
// const barData = {
// labels: ["Jan", "Feb", "March", "April",],
// datasets: [
// {
// data: [20, 45, 28, 80]
// }
// ]
// };
const Dashboard = (props) => {
@@ -500,6 +487,35 @@ const Dashboard = (props) => {
}
};
const generateYears = (startYear = 2015) => {
const currentYear = new Date().getFullYear();
const totalYears = Math.max(currentYear - startYear + 1, 1);
return Array.from({ length: totalYears }, (_, i) => {
const year = currentYear - i;
return { label: `${year}`, value: `${year}` };
});
};
const monthData = [
{ label: 'January', value: '1' },
{ label: 'February', value: '2' },
{ label: 'March', value: '3' },
{ label: 'April', value: '4' },
{ label: 'May', value: '5' },
{ label: 'June', value: '6' },
{ label: 'July', value: '7' },
{ label: 'August', value: '8' },
{ label: 'September', value: '9' },
{ label: 'October', value: '10' },
{ label: 'November', value: '11' },
{ label: 'December', value: '12' },
];
const yearData = useMemo(() => generateYears(), []);
// console.log('yearData------>', yearData);
const renderItem = ({ item }) => {
// console.log('graphApiData--->', JSON.stringify(graphApiData));
@@ -620,7 +636,7 @@ const Dashboard = (props) => {
const sortedValues = values2.sort((a, b) => a.CalendarMonth_ID - b.Month_Id);
// console.log('sortedValues====>',JSON.stringify(sortedValues));
// ✅ Step 2: Prepare chart data
const barData = values.map((v, idx) => {