Compare commits
20 Commits
eae7c89551
...
6acfde3d52
| Author | SHA1 | Date | |
|---|---|---|---|
| 6acfde3d52 | |||
| 77ab412c66 | |||
| 4ad584785d | |||
| d65979518f | |||
| 85bb27408e | |||
| cd466a2af1 | |||
| 6900df4fdf | |||
| 55fd811683 | |||
| 2280bd6d19 | |||
| 5a910f62e2 | |||
| 81a82d8124 | |||
| 3096ec0333 | |||
| fb0c62e0dc | |||
| 9eb0c3eb2b | |||
| 9873a3844d | |||
| 2d901a407a | |||
| f0a87b818b | |||
| a4f56a2576 | |||
| addd221003 | |||
| 87af035459 |
|
After Width: | Height: | Size: 168 KiB |
@@ -110,8 +110,11 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
// The version of react-native is set by the React Native Gradle Plugin
|
// The version of react-native is set by the React Native Gradle Plugin
|
||||||
implementation("com.facebook.react:react-android")
|
implementation("com.facebook.react:react-android")
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
implementation project(':react-native-vector-icons')
|
implementation project(':react-native-vector-icons')
|
||||||
implementation project(':react-native-fs')
|
implementation project(':react-native-fs')
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|
||||||
if (hermesEnabled.toBoolean()) {
|
if (hermesEnabled.toBoolean()) {
|
||||||
implementation("com.facebook.react:hermes-android")
|
implementation("com.facebook.react:hermes-android")
|
||||||
@@ -119,6 +122,9 @@ dependencies {
|
|||||||
implementation jscFlavor
|
implementation jscFlavor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
|
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
|
||||||
|
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".MainApplication"
|
android:name=".MainApplication"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,3 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<string name="app_name">PerformicsStoreDNA</string>
|
||||||
|
=======
|
||||||
<string name="app_name">Performics Store DNA</string>
|
<string name="app_name">Performics Store DNA</string>
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -32,7 +32,12 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|||||||
# your application. You should enable this flag either if you want
|
# your application. You should enable this flag either if you want
|
||||||
# to write custom TurboModules/Fabric components OR use libraries that
|
# to write custom TurboModules/Fabric components OR use libraries that
|
||||||
# are providing them.
|
# are providing them.
|
||||||
|
<<<<<<< HEAD
|
||||||
|
newArchEnabled=true
|
||||||
|
=======
|
||||||
newArchEnabled=false
|
newArchEnabled=false
|
||||||
|
org.gradle.java.home=/opt/homebrew/opt/openjdk@17
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|
||||||
# Use this property to enable or disable the Hermes JS engine.
|
# Use this property to enable or disable the Hermes JS engine.
|
||||||
# If set to false, you will be using JSC instead.
|
# If set to false, you will be using JSC instead.
|
||||||
|
|||||||
@@ -1,99 +1,201 @@
|
|||||||
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
|
<<<<<<< HEAD
|
||||||
@REM
|
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
@REM This source code is licensed under the MIT license found in the
|
@REM
|
||||||
@REM LICENSE file in the root directory of this source tree.
|
@REM This source code is licensed under the MIT license found in the
|
||||||
|
@REM LICENSE file in the root directory of this source tree.
|
||||||
@rem
|
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem
|
||||||
@rem
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@rem
|
||||||
@rem you may not use this file except in compliance with the License.
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@rem You may obtain a copy of the License at
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem
|
@rem You may obtain a copy of the License at
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem
|
||||||
@rem
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem limitations under the License.
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem
|
@rem limitations under the License.
|
||||||
@rem SPDX-License-Identifier: Apache-2.0
|
@rem
|
||||||
@rem
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
@if "%DEBUG%"=="" @echo off
|
|
||||||
@rem ##########################################################################
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem
|
@rem ##########################################################################
|
||||||
@rem Gradle startup script for Windows
|
@rem
|
||||||
@rem
|
@rem Gradle startup script for Windows
|
||||||
@rem ##########################################################################
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
@rem Set local scope for the variables with windows NT shell
|
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
set DIRNAME=%~dp0
|
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
set DIRNAME=%~dp0
|
||||||
@rem This is normally unused
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
@rem This is normally unused
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
@rem Find java.exe
|
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
set JAVA_EXE=java.exe
|
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
set JAVA_EXE=java.exe
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
echo. 1>&2
|
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
echo. 1>&2
|
||||||
echo. 1>&2
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo. 1>&2
|
||||||
echo location of your Java installation. 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
goto fail
|
|
||||||
|
goto fail
|
||||||
:findJavaFromJavaHome
|
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
:findJavaFromJavaHome
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
if exist "%JAVA_EXE%" goto execute
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
echo. 1>&2
|
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
echo. 1>&2
|
||||||
echo. 1>&2
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo. 1>&2
|
||||||
echo location of your Java installation. 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
goto fail
|
|
||||||
|
goto fail
|
||||||
:execute
|
|
||||||
@rem Setup the command line
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
set CLASSPATH=
|
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
@rem Execute Gradle
|
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
:end
|
|
||||||
@rem End local scope for the variables with windows NT shell
|
:end
|
||||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
:fail
|
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
:fail
|
||||||
rem the _cmd.exe /c_ return code!
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
set EXIT_CODE=%ERRORLEVEL%
|
rem the _cmd.exe /c_ return code!
|
||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
exit /b %EXIT_CODE%
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
:mainEnd
|
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
:omega
|
|
||||||
|
:omega
|
||||||
|
=======
|
||||||
|
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
@REM
|
||||||
|
@REM This source code is licensed under the MIT license found in the
|
||||||
|
@REM LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
|
echo. 1>&2
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
|
echo. 1>&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo. 1>&2
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
|
echo. 1>&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autoli
|
|||||||
rootProject.name = 'PerformicsStoreDNA'
|
rootProject.name = 'PerformicsStoreDNA'
|
||||||
include ':app'
|
include ':app'
|
||||||
includeBuild('../node_modules/@react-native/gradle-plugin')
|
includeBuild('../node_modules/@react-native/gradle-plugin')
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
include ':react-native-fs'
|
include ':react-native-fs'
|
||||||
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
|
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
|
||||||
|
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ['module:@react-native/babel-preset'],
|
presets: ['module:@react-native/babel-preset'],
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
plugins: [
|
plugins: [
|
||||||
// other plugins here...
|
// other plugins here...
|
||||||
'react-native-reanimated/plugin', // 👈 must be last
|
'react-native-reanimated/plugin', // 👈 must be last
|
||||||
],
|
],
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,11 +11,28 @@
|
|||||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||||
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
|
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
|
||||||
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
||||||
|
<<<<<<< HEAD
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
|
||||||
|
remoteInfo = PerformicsStoreDNA;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
=======
|
||||||
D36C74772E212F7200955E13 /* white.png in Resources */ = {isa = PBXBuildFile; fileRef = D36C74762E212F7200955E13 /* white.png */; };
|
D36C74772E212F7200955E13 /* white.png in Resources */ = {isa = PBXBuildFile; fileRef = D36C74762E212F7200955E13 /* white.png */; };
|
||||||
DB45BE4A6E0F03A0CC859A6F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
|
DB45BE4A6E0F03A0CC859A6F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
13B07F961A680F5B00A75B9A /* PerformicsStoreDNA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PerformicsStoreDNA.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
13B07F961A680F5B00A75B9A /* PerformicsStoreDNA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PerformicsStoreDNA.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = PerformicsStoreDNA/Images.xcassets; sourceTree = "<group>"; };
|
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = PerformicsStoreDNA/Images.xcassets; sourceTree = "<group>"; };
|
||||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = PerformicsStoreDNA/Info.plist; sourceTree = "<group>"; };
|
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = PerformicsStoreDNA/Info.plist; sourceTree = "<group>"; };
|
||||||
@@ -25,7 +42,10 @@
|
|||||||
5DCACB8F33CDC322A6C60F78 /* libPods-PerformicsStoreDNA.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PerformicsStoreDNA.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
5DCACB8F33CDC322A6C60F78 /* libPods-PerformicsStoreDNA.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PerformicsStoreDNA.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = PerformicsStoreDNA/AppDelegate.swift; sourceTree = "<group>"; };
|
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = PerformicsStoreDNA/AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = PerformicsStoreDNA/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = PerformicsStoreDNA/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
D36C74762E212F7200955E13 /* white.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = white.png; sourceTree = "<group>"; };
|
D36C74762E212F7200955E13 /* white.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = white.png; sourceTree = "<group>"; };
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
@@ -41,6 +61,17 @@
|
|||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
|
<<<<<<< HEAD
|
||||||
|
00E356F01AD99517003FC87E /* Supporting Files */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
00E356F11AD99517003FC87E /* Info.plist */,
|
||||||
|
);
|
||||||
|
name = "Supporting Files";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
=======
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
13B07FAE1A68108700A75B9A /* PerformicsStoreDNA */ = {
|
13B07FAE1A68108700A75B9A /* PerformicsStoreDNA */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -72,7 +103,10 @@
|
|||||||
83CBB9F61A601CBA00E9B192 = {
|
83CBB9F61A601CBA00E9B192 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
D36C74762E212F7200955E13 /* white.png */,
|
D36C74762E212F7200955E13 /* white.png */,
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
13B07FAE1A68108700A75B9A /* PerformicsStoreDNA */,
|
13B07FAE1A68108700A75B9A /* PerformicsStoreDNA */,
|
||||||
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
||||||
83CBBA001A601CBA00E9B192 /* Products */,
|
83CBBA001A601CBA00E9B192 /* Products */,
|
||||||
@@ -157,14 +191,28 @@
|
|||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
<<<<<<< HEAD
|
||||||
|
00E356EC1AD99517003FC87E /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
=======
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
13B07F8E1A680F5B00A75B9A /* Resources */ = {
|
13B07F8E1A680F5B00A75B9A /* Resources */ = {
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
|
||||||
|
<<<<<<< HEAD
|
||||||
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||||
|
=======
|
||||||
D36C74772E212F7200955E13 /* white.png in Resources */,
|
D36C74772E212F7200955E13 /* white.png in Resources */,
|
||||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||||
DB45BE4A6E0F03A0CC859A6F /* PrivacyInfo.xcprivacy in Resources */,
|
DB45BE4A6E0F03A0CC859A6F /* PrivacyInfo.xcprivacy in Resources */,
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -195,10 +243,20 @@
|
|||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-frameworks.sh\"\n";
|
||||||
@@ -234,10 +292,20 @@
|
|||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PerformicsStoreDNA/Pods-PerformicsStoreDNA-resources.sh\"\n";
|
||||||
@@ -256,6 +324,17 @@
|
|||||||
};
|
};
|
||||||
/* End PBXSourcesBuildPhase section */
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 13B07F861A680F5B00A75B9A /* PerformicsStoreDNA */;
|
||||||
|
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
@@ -263,8 +342,12 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 3;
|
<<<<<<< HEAD
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
=======
|
||||||
|
CURRENT_PROJECT_VERSION = 9;
|
||||||
DEVELOPMENT_TEAM = JGDHGNH9XY;
|
DEVELOPMENT_TEAM = JGDHGNH9XY;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
|
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
||||||
@@ -272,13 +355,21 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.3;
|
<<<<<<< HEAD
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
=======
|
||||||
|
MARKETING_VERSION = 1.9;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
"-lc++",
|
"-lc++",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
|
=======
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.performicsstoredna;
|
PRODUCT_BUNDLE_IDENTIFIER = com.performicsstoredna;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
PRODUCT_NAME = PerformicsStoreDNA;
|
PRODUCT_NAME = PerformicsStoreDNA;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -292,21 +383,33 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 3;
|
<<<<<<< HEAD
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
=======
|
||||||
|
CURRENT_PROJECT_VERSION = 9;
|
||||||
DEVELOPMENT_TEAM = JGDHGNH9XY;
|
DEVELOPMENT_TEAM = JGDHGNH9XY;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
|
INFOPLIST_FILE = PerformicsStoreDNA/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.3;
|
<<<<<<< HEAD
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
=======
|
||||||
|
MARKETING_VERSION = 1.9;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
"-lc++",
|
"-lc++",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
|
=======
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.performicsstoredna;
|
PRODUCT_BUNDLE_IDENTIFIER = com.performicsstoredna;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
PRODUCT_NAME = PerformicsStoreDNA;
|
PRODUCT_NAME = PerformicsStoreDNA;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
@@ -382,11 +485,15 @@
|
|||||||
"-DFOLLY_CFG_NO_COROUTINES=1",
|
"-DFOLLY_CFG_NO_COROUTINES=1",
|
||||||
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
|
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
=======
|
||||||
OTHER_LDFLAGS = "$(inherited) ";
|
OTHER_LDFLAGS = "$(inherited) ";
|
||||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
|
||||||
USE_HERMES = true;
|
USE_HERMES = true;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -451,10 +558,14 @@
|
|||||||
"-DFOLLY_CFG_NO_COROUTINES=1",
|
"-DFOLLY_CFG_NO_COROUTINES=1",
|
||||||
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
|
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
|
||||||
);
|
);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
=======
|
||||||
OTHER_LDFLAGS = "$(inherited) ";
|
OTHER_LDFLAGS = "$(inherited) ";
|
||||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
USE_HERMES = true;
|
USE_HERMES = true;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|||||||
@@ -1,55 +1,82 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "40.png",
|
"filename" : "40.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "20x20"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "60.png",
|
"filename" : "60.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "20x20"
|
"size" : "20x20"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "58.png",
|
"filename" : "58.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "29x29"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "87.png",
|
"filename" : "87.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "29x29"
|
"size" : "29x29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "80.png",
|
"filename" : "80.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "40x40"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "120.png",
|
"filename" : "120.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "40x40"
|
"size" : "40x40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "120 1.png",
|
"filename" : "120 1.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "60x60"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "180.png",
|
"filename" : "180.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"scale" : "3x",
|
"scale" : "3x",
|
||||||
"size" : "60x60"
|
"size" : "60x60"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
"filename" : "1024.png",
|
"filename" : "1024.png",
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
"idiom" : "ios-marketing",
|
"idiom" : "ios-marketing",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "1024x1024"
|
"size" : "1024x1024"
|
||||||
|
|||||||
@@ -26,12 +26,21 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
|
||||||
|
=======
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSAllowsLocalNetworking</key>
|
<key>NSAllowsLocalNetworking</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<string></string>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
=======
|
||||||
<string>This app uses your location to enhance reporting and store-related services.</string>
|
<string>This app uses your location to enhance reporting and store-related services.</string>
|
||||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
||||||
<string>We need access to your location for [your reason, e.g., providing location-based services].</string>
|
<string>We need access to your location for [your reason, e.g., providing location-based services].</string>
|
||||||
@@ -62,6 +71,7 @@
|
|||||||
<string>Octicons.ttf</string>
|
<string>Octicons.ttf</string>
|
||||||
<string>Zocial.ttf</string>
|
<string>Zocial.ttf</string>
|
||||||
</array>
|
</array>
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
<array>
|
<array>
|
||||||
<string>arm64</string>
|
<string>arm64</string>
|
||||||
|
|||||||
@@ -1771,7 +1771,7 @@ PODS:
|
|||||||
- SocketRocket
|
- SocketRocket
|
||||||
- WCPhotoManipulator (~> 2.6.0)
|
- WCPhotoManipulator (~> 2.6.0)
|
||||||
- Yoga
|
- Yoga
|
||||||
- react-native-safe-area-context (5.5.1):
|
- react-native-safe-area-context (5.5.2):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -1790,8 +1790,8 @@ PODS:
|
|||||||
- React-hermes
|
- React-hermes
|
||||||
- React-ImageManager
|
- React-ImageManager
|
||||||
- React-jsi
|
- React-jsi
|
||||||
- react-native-safe-area-context/common (= 5.5.1)
|
- react-native-safe-area-context/common (= 5.5.2)
|
||||||
- react-native-safe-area-context/fabric (= 5.5.1)
|
- react-native-safe-area-context/fabric (= 5.5.2)
|
||||||
- React-NativeModulesApple
|
- React-NativeModulesApple
|
||||||
- React-RCTFabric
|
- React-RCTFabric
|
||||||
- React-renderercss
|
- React-renderercss
|
||||||
@@ -1802,7 +1802,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- react-native-safe-area-context/common (5.5.1):
|
- react-native-safe-area-context/common (5.5.2):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -1831,7 +1831,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- react-native-safe-area-context/fabric (5.5.1):
|
- react-native-safe-area-context/fabric (5.5.2):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2368,7 +2368,7 @@ PODS:
|
|||||||
- Yoga
|
- Yoga
|
||||||
- RNFS (2.20.0):
|
- RNFS (2.20.0):
|
||||||
- React-Core
|
- React-Core
|
||||||
- RNGestureHandler (2.27.1):
|
- RNGestureHandler (2.27.2):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2397,7 +2397,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNPermissions (5.4.1):
|
- RNPermissions (5.4.2):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2426,7 +2426,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNReanimated (3.18.0):
|
- RNReanimated (3.19.0):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2453,11 +2453,11 @@ PODS:
|
|||||||
- ReactCodegen
|
- ReactCodegen
|
||||||
- ReactCommon/turbomodule/bridging
|
- ReactCommon/turbomodule/bridging
|
||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- RNReanimated/reanimated (= 3.18.0)
|
- RNReanimated/reanimated (= 3.19.0)
|
||||||
- RNReanimated/worklets (= 3.18.0)
|
- RNReanimated/worklets (= 3.19.0)
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNReanimated/reanimated (3.18.0):
|
- RNReanimated/reanimated (3.19.0):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2484,10 +2484,10 @@ PODS:
|
|||||||
- ReactCodegen
|
- ReactCodegen
|
||||||
- ReactCommon/turbomodule/bridging
|
- ReactCommon/turbomodule/bridging
|
||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- RNReanimated/reanimated/apple (= 3.18.0)
|
- RNReanimated/reanimated/apple (= 3.19.0)
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNReanimated/reanimated/apple (3.18.0):
|
- RNReanimated/reanimated/apple (3.19.0):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2516,7 +2516,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNReanimated/worklets (3.18.0):
|
- RNReanimated/worklets (3.19.0):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2543,10 +2543,10 @@ PODS:
|
|||||||
- ReactCodegen
|
- ReactCodegen
|
||||||
- ReactCommon/turbomodule/bridging
|
- ReactCommon/turbomodule/bridging
|
||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- RNReanimated/worklets/apple (= 3.18.0)
|
- RNReanimated/worklets/apple (= 3.19.0)
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNReanimated/worklets/apple (3.18.0):
|
- RNReanimated/worklets/apple (3.19.0):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2575,7 +2575,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNScreens (4.11.1):
|
- RNScreens (4.13.1):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2603,10 +2603,10 @@ PODS:
|
|||||||
- ReactCodegen
|
- ReactCodegen
|
||||||
- ReactCommon/turbomodule/bridging
|
- ReactCommon/turbomodule/bridging
|
||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- RNScreens/common (= 4.11.1)
|
- RNScreens/common (= 4.13.1)
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNScreens/common (4.11.1):
|
- RNScreens/common (4.13.1):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2636,7 +2636,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNSVG (15.12.0):
|
- RNSVG (15.12.1):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2663,10 +2663,10 @@ PODS:
|
|||||||
- ReactCodegen
|
- ReactCodegen
|
||||||
- ReactCommon/turbomodule/bridging
|
- ReactCommon/turbomodule/bridging
|
||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- RNSVG/common (= 15.12.0)
|
- RNSVG/common (= 15.12.1)
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNSVG/common (15.12.0):
|
- RNSVG/common (15.12.1):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2695,7 +2695,7 @@ PODS:
|
|||||||
- ReactCommon/turbomodule/core
|
- ReactCommon/turbomodule/core
|
||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- RNVectorIcons (10.2.0):
|
- RNVectorIcons (10.3.0):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fast_float
|
- fast_float
|
||||||
@@ -2725,11 +2725,11 @@ PODS:
|
|||||||
- SocketRocket
|
- SocketRocket
|
||||||
- Yoga
|
- Yoga
|
||||||
- SocketRocket (0.7.1)
|
- SocketRocket (0.7.1)
|
||||||
- VisionCamera (4.7.0):
|
- VisionCamera (4.7.1):
|
||||||
- VisionCamera/Core (= 4.7.0)
|
- VisionCamera/Core (= 4.7.1)
|
||||||
- VisionCamera/React (= 4.7.0)
|
- VisionCamera/React (= 4.7.1)
|
||||||
- VisionCamera/Core (4.7.0)
|
- VisionCamera/Core (4.7.1)
|
||||||
- VisionCamera/React (4.7.0):
|
- VisionCamera/React (4.7.1):
|
||||||
- React-Core
|
- React-Core
|
||||||
- WCPhotoManipulator (2.6.0)
|
- WCPhotoManipulator (2.6.0)
|
||||||
- Yoga (0.0.0)
|
- Yoga (0.0.0)
|
||||||
@@ -3060,7 +3060,7 @@ SPEC CHECKSUMS:
|
|||||||
react-native-geolocation: f01ad4718ad1d015d0c0dd12a6f707354022530e
|
react-native-geolocation: f01ad4718ad1d015d0c0dd12a6f707354022530e
|
||||||
react-native-image-resizer: 8537d9fdbd14b9d5f301a2d319c469bf56f6e9a0
|
react-native-image-resizer: 8537d9fdbd14b9d5f301a2d319c469bf56f6e9a0
|
||||||
react-native-photo-manipulator: 5ac803352e07b7f61f5905e78952006f0c4efd54
|
react-native-photo-manipulator: 5ac803352e07b7f61f5905e78952006f0c4efd54
|
||||||
react-native-safe-area-context: d3738f0c3b1fcefaed874a45891b0d44306c47c1
|
react-native-safe-area-context: 68d1363b8354472a961aa6861ba8451beaf9a810
|
||||||
react-native-sqlite-storage: 0c84826214baaa498796c7e46a5ccc9a82e114ed
|
react-native-sqlite-storage: 0c84826214baaa498796c7e46a5ccc9a82e114ed
|
||||||
React-NativeModulesApple: e16d5c133019987285f001fbf1461a861e40426f
|
React-NativeModulesApple: e16d5c133019987285f001fbf1461a861e40426f
|
||||||
React-oscompat: 7c0a341cc31e350da71ddf2e46de0a845d1d1626
|
React-oscompat: 7c0a341cc31e350da71ddf2e46de0a845d1d1626
|
||||||
@@ -3095,14 +3095,14 @@ SPEC CHECKSUMS:
|
|||||||
ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147
|
ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147
|
||||||
RNCAsyncStorage: 1f04c8d56558e533277beda29187f571cf7eecb2
|
RNCAsyncStorage: 1f04c8d56558e533277beda29187f571cf7eecb2
|
||||||
RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
|
RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
|
||||||
RNGestureHandler: 5e1a1605659c22098719fc2e8aee453fe728f52e
|
RNGestureHandler: a0c83d8e4422f2ac04d1acb1741866a5184c7b73
|
||||||
RNPermissions: ebf576a01cc2cb73db0006e0b3c9b4760e0aa569
|
RNPermissions: b15c9d7ba7aacff916439d445f385abbb2a36a4f
|
||||||
RNReanimated: bc1ddb7a5352648bcf0d592256069833bf935a46
|
RNReanimated: 5ee070eb08e681be2a9ee7e797019d97d4706131
|
||||||
RNScreens: ee2abe7e0c548eed14e92742e81ed991165c56aa
|
RNScreens: c63849403489bd068ea160f276fbc8416f19f2f7
|
||||||
RNSVG: 341f555dbcd83a34d1f058e88df387de7bbc3347
|
RNSVG: d407e5f2ede12bbcd92e4d23a405ad5a5f7294a3
|
||||||
RNVectorIcons: ef9b4b0b786053ebdd63ee2972f48de9633ba166
|
RNVectorIcons: be4d047a76ad307ffe54732208fb0498fcb8477f
|
||||||
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
|
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
|
||||||
VisionCamera: c5c07db74721d37f4c9f8331ad1f8da7b2539995
|
VisionCamera: 9a8f98ae344fe5d148f84bb45829f9e4caab9d2f
|
||||||
WCPhotoManipulator: 804988e16a6fe941cddff942b2acf887110de5d6
|
WCPhotoManipulator: 804988e16a6fe941cddff942b2acf887110de5d6
|
||||||
Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb
|
Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb
|
||||||
|
|
||||||
|
|||||||
@@ -1,80 +1,141 @@
|
|||||||
{
|
<<<<<<< HEAD
|
||||||
"name": "PerformicsStoreDNA",
|
{
|
||||||
"version": "0.0.1",
|
"name": "PerformicsStoreDNA",
|
||||||
"private": true,
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"private": true,
|
||||||
"android": "react-native run-android",
|
"scripts": {
|
||||||
"ios": "react-native run-ios",
|
"android": "react-native run-android",
|
||||||
"lint": "eslint .",
|
"ios": "react-native run-ios",
|
||||||
"start": "react-native start",
|
"lint": "eslint .",
|
||||||
"test": "jest",
|
"start": "react-native start",
|
||||||
"postinstall": "patch-package"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bam.tech/react-native-image-resizer": "^3.0.11",
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
||||||
"@gluestack-ui/nativewind-utils": "^1.0.26",
|
"@react-native/new-app-screen": "0.80.0",
|
||||||
"@gluestack-ui/overlay": "^0.1.22",
|
"@react-navigation/elements": "^2.5.2",
|
||||||
"@gluestack-ui/toast": "^1.0.9",
|
"@react-navigation/native": "^7.1.14",
|
||||||
"@likashefqet/react-native-image-zoom": "^4.3.0",
|
"@react-navigation/native-stack": "^7.3.21",
|
||||||
"@react-native-async-storage/async-storage": "^2.2.0",
|
"@reduxjs/toolkit": "^2.8.2",
|
||||||
"@react-native-community/geolocation": "^3.4.0",
|
"axios": "^1.10.0",
|
||||||
"@react-native/new-app-screen": "0.80.0",
|
"react": "19.1.0",
|
||||||
"@react-navigation/elements": "^2.5.2",
|
"react-native": "0.80.0",
|
||||||
"@react-navigation/native": "^7.1.14",
|
"react-native-chart-kit": "^6.12.0",
|
||||||
"@react-navigation/native-stack": "^7.3.21",
|
"react-native-element-dropdown": "^2.12.4",
|
||||||
"@reduxjs/toolkit": "^2.8.2",
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
||||||
"axios": "^1.10.0",
|
"react-native-linear-gradient": "^2.8.3",
|
||||||
"deprecated-react-native-prop-types": "^5.0.0",
|
"react-native-otp-entry": "^1.8.5",
|
||||||
"lodash": "^4.17.21",
|
"react-native-safe-area-context": "^5.5.0",
|
||||||
"moment": "^2.30.1",
|
"react-native-screens": "^4.11.1",
|
||||||
"patch-package": "^8.0.0",
|
"react-native-sqlite-storage": "^6.0.1",
|
||||||
"react": "19.1.0",
|
"react-native-svg": "^15.12.0",
|
||||||
"react-native": "0.80.0",
|
"react-native-toast-message": "^2.3.1",
|
||||||
"react-native-chart-kit": "^6.12.0",
|
"react-native-vector-icons": "^10.2.0",
|
||||||
"react-native-element-dropdown": "^2.12.4",
|
"react-redux": "^9.2.0"
|
||||||
"react-native-fs": "^2.20.0",
|
},
|
||||||
"react-native-gesture-handler": "^2.27.1",
|
"devDependencies": {
|
||||||
"react-native-gifted-charts": "^1.4.63",
|
"@babel/core": "^7.25.2",
|
||||||
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
"@babel/preset-env": "^7.25.3",
|
||||||
"react-native-linear-gradient": "^2.8.3",
|
"@babel/runtime": "^7.25.0",
|
||||||
"react-native-loader-kit": "^3.0.0",
|
"@react-native-community/cli": "19.0.0",
|
||||||
"react-native-modal-selector": "^2.1.2",
|
"@react-native-community/cli-platform-android": "19.0.0",
|
||||||
"react-native-multiple-select": "^0.5.12",
|
"@react-native-community/cli-platform-ios": "19.0.0",
|
||||||
"react-native-otp-entry": "^1.8.5",
|
"@react-native/babel-preset": "0.80.0",
|
||||||
"react-native-permissions": "^5.4.1",
|
"@react-native/eslint-config": "0.80.0",
|
||||||
"react-native-photo-manipulator": "^1.9.2",
|
"@react-native/metro-config": "0.80.0",
|
||||||
"react-native-raw-bottom-sheet": "^3.0.0",
|
"@react-native/typescript-config": "0.80.0",
|
||||||
"react-native-reanimated": "^3.18.0",
|
"@types/jest": "^29.5.13",
|
||||||
"react-native-safe-area-context": "^5.5.0",
|
"@types/react": "^19.1.0",
|
||||||
"react-native-screens": "^4.11.1",
|
"@types/react-test-renderer": "^19.1.0",
|
||||||
"react-native-sqlite-storage": "^6.0.1",
|
"eslint": "^8.19.0",
|
||||||
"react-native-svg": "^15.12.0",
|
"jest": "^29.6.3",
|
||||||
"react-native-toast-message": "^2.3.1",
|
"prettier": "2.8.8",
|
||||||
"react-native-vector-icons": "^10.2.0",
|
"react-test-renderer": "19.1.0",
|
||||||
"react-native-vision-camera": "^4.7.0",
|
"typescript": "5.0.4"
|
||||||
"react-redux": "^9.2.0"
|
},
|
||||||
},
|
"engines": {
|
||||||
"devDependencies": {
|
"node": ">=18"
|
||||||
"@babel/core": "^7.25.2",
|
}
|
||||||
"@babel/preset-env": "^7.25.3",
|
}
|
||||||
"@babel/runtime": "^7.25.0",
|
=======
|
||||||
"@react-native-community/cli": "19.0.0",
|
{
|
||||||
"@react-native-community/cli-platform-android": "19.0.0",
|
"name": "PerformicsStoreDNA",
|
||||||
"@react-native-community/cli-platform-ios": "19.0.0",
|
"version": "0.0.1",
|
||||||
"@react-native/babel-preset": "0.80.0",
|
"private": true,
|
||||||
"@react-native/eslint-config": "0.80.0",
|
"scripts": {
|
||||||
"@react-native/metro-config": "0.80.0",
|
"android": "react-native run-android",
|
||||||
"@react-native/typescript-config": "0.80.0",
|
"ios": "react-native run-ios",
|
||||||
"@types/jest": "^29.5.13",
|
"lint": "eslint .",
|
||||||
"@types/react": "^19.1.0",
|
"start": "react-native start",
|
||||||
"@types/react-test-renderer": "^19.1.0",
|
"test": "jest",
|
||||||
"eslint": "^8.19.0",
|
"postinstall": "patch-package"
|
||||||
"jest": "^29.6.3",
|
},
|
||||||
"prettier": "2.8.8",
|
"dependencies": {
|
||||||
"react-test-renderer": "19.1.0",
|
"@bam.tech/react-native-image-resizer": "^3.0.11",
|
||||||
"typescript": "5.0.4"
|
"@gluestack-ui/nativewind-utils": "^1.0.26",
|
||||||
},
|
"@gluestack-ui/overlay": "^0.1.22",
|
||||||
"engines": {
|
"@gluestack-ui/toast": "^1.0.9",
|
||||||
"node": ">=18"
|
"@likashefqet/react-native-image-zoom": "^4.3.0",
|
||||||
}
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
||||||
}
|
"@react-native-community/geolocation": "^3.4.0",
|
||||||
|
"@react-native/new-app-screen": "0.80.0",
|
||||||
|
"@react-navigation/elements": "^2.5.2",
|
||||||
|
"@react-navigation/native": "^7.1.14",
|
||||||
|
"@react-navigation/native-stack": "^7.3.21",
|
||||||
|
"@reduxjs/toolkit": "^2.8.2",
|
||||||
|
"axios": "^1.10.0",
|
||||||
|
"deprecated-react-native-prop-types": "^5.0.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"moment": "^2.30.1",
|
||||||
|
"patch-package": "^8.0.0",
|
||||||
|
"react": "19.1.0",
|
||||||
|
"react-native": "0.80.0",
|
||||||
|
"react-native-chart-kit": "^6.12.0",
|
||||||
|
"react-native-element-dropdown": "^2.12.4",
|
||||||
|
"react-native-fs": "^2.20.0",
|
||||||
|
"react-native-gesture-handler": "^2.27.1",
|
||||||
|
"react-native-gifted-charts": "^1.4.63",
|
||||||
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
||||||
|
"react-native-linear-gradient": "^2.8.3",
|
||||||
|
"react-native-loader-kit": "^3.0.0",
|
||||||
|
"react-native-modal-selector": "^2.1.2",
|
||||||
|
"react-native-multiple-select": "^0.5.12",
|
||||||
|
"react-native-otp-entry": "^1.8.5",
|
||||||
|
"react-native-permissions": "^5.4.1",
|
||||||
|
"react-native-photo-manipulator": "^1.9.2",
|
||||||
|
"react-native-raw-bottom-sheet": "^3.0.0",
|
||||||
|
"react-native-reanimated": "^3.18.0",
|
||||||
|
"react-native-safe-area-context": "^5.5.0",
|
||||||
|
"react-native-screens": "^4.11.1",
|
||||||
|
"react-native-sqlite-storage": "^6.0.1",
|
||||||
|
"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.1",
|
||||||
|
"react-redux": "^9.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.25.2",
|
||||||
|
"@babel/preset-env": "^7.25.3",
|
||||||
|
"@babel/runtime": "^7.25.0",
|
||||||
|
"@react-native-community/cli": "19.0.0",
|
||||||
|
"@react-native-community/cli-platform-android": "19.0.0",
|
||||||
|
"@react-native-community/cli-platform-ios": "19.0.0",
|
||||||
|
"@react-native/babel-preset": "0.80.0",
|
||||||
|
"@react-native/eslint-config": "0.80.0",
|
||||||
|
"@react-native/metro-config": "0.80.0",
|
||||||
|
"@react-native/typescript-config": "0.80.0",
|
||||||
|
"@types/jest": "^29.5.13",
|
||||||
|
"@types/react": "^19.1.0",
|
||||||
|
"@types/react-test-renderer": "^19.1.0",
|
||||||
|
"eslint": "^8.19.0",
|
||||||
|
"jest": "^29.6.3",
|
||||||
|
"prettier": "2.8.8",
|
||||||
|
"react-test-renderer": "19.1.0",
|
||||||
|
"typescript": "5.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,25 +1,43 @@
|
|||||||
import * as React from 'react';
|
<<<<<<< HEAD
|
||||||
import { useEffect } from 'react';
|
// In App.js in a new project
|
||||||
import { Provider } from 'react-redux';
|
import * as React from 'react';
|
||||||
import Routes from './navigation/Routes';
|
import {Provider} from 'react-redux';
|
||||||
import { store } from './redux/store';
|
import Routes from './navigation/Routes';
|
||||||
import { initTables } from './constants/database';
|
import { store } from './redux/store';
|
||||||
import { CreateImageFolders } from './constants/function';
|
|
||||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
function App() {
|
||||||
|
return (
|
||||||
function App() {
|
<Provider store={store}>
|
||||||
useEffect(() => {
|
<Routes />
|
||||||
initTables(); // Ensure DB tables are created
|
</Provider>
|
||||||
CreateImageFolders();
|
);
|
||||||
}, []);
|
}
|
||||||
|
|
||||||
return (
|
export default App;
|
||||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
=======
|
||||||
<Provider store={store}>
|
import * as React from 'react';
|
||||||
<Routes />
|
import { useEffect } from 'react';
|
||||||
</Provider>
|
import { Provider } from 'react-redux';
|
||||||
</GestureHandlerRootView>
|
import Routes from './navigation/Routes';
|
||||||
);
|
import { store } from './redux/store';
|
||||||
}
|
import { initTables } from './constants/database';
|
||||||
|
import { CreateImageFolders } from './constants/function';
|
||||||
export default App;
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||||
|
|
||||||
|
function App() {
|
||||||
|
useEffect(() => {
|
||||||
|
initTables(); // Ensure DB tables are created
|
||||||
|
CreateImageFolders();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||||
|
<Provider store={store}>
|
||||||
|
<Routes />
|
||||||
|
</Provider>
|
||||||
|
</GestureHandlerRootView>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default App;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ export const BASE_URL = 'https://dax.parinaam.in/execute/dabur';
|
|||||||
|
|
||||||
export const ApiURL = {
|
export const ApiURL = {
|
||||||
|
|
||||||
// login: `${BASE_URL}/api/v1/auth/login`,
|
|
||||||
|
|
||||||
pssscoreApi: `${BASE_URL}/mtd/pssscore`,
|
pssscoreApi: `${BASE_URL}/mtd/pssscore`,
|
||||||
getotpApi: `https://api1.parinaam.in/api/dabur/SendOTP`,
|
getotpApi: `https://api1.parinaam.in/api/dabur/SendOTP`,
|
||||||
verifyotpApi: `https://api1.parinaam.in/api/dabur/AuthenticateOTP`,
|
verifyotpApi: `https://api1.parinaam.in/api/dabur/AuthenticateOTP`,
|
||||||
storeDNAfilter:`https://api1.parinaam.in/api/dabur/StoreDNAfilter`,
|
storeDNAfilter:`https://api1.parinaam.in/api/dabur/StoreDNAfilter`,
|
||||||
storeSearch :`https://api1.parinaam.in/api/dabur/StoreDNAstoreSearch`,
|
storeSearch :`https://api1.parinaam.in/api/dabur/StoreDNAstoreSearch`,
|
||||||
|
storeInfo :`https://api1.parinaam.in/api/dabur/StoreDNAstoreInfo`,
|
||||||
};
|
};
|
||||||
|
|||||||
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 112 KiB |
@@ -31,7 +31,7 @@ export function ConfirmSaveAlert({
|
|||||||
onYesCallBack = () => { },
|
onYesCallBack = () => { },
|
||||||
msg = 'Do you really want to save data?',
|
msg = 'Do you really want to save data?',
|
||||||
yesText = 'Yes',
|
yesText = 'Yes',
|
||||||
cancelText = 'NO',
|
cancelText = 'No',
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<CustomModal
|
<CustomModal
|
||||||
|
|||||||
@@ -1,33 +1,66 @@
|
|||||||
// src/components/Background.js
|
<<<<<<< HEAD
|
||||||
|
// src/components/Background.js
|
||||||
import React from 'react';
|
|
||||||
import { StyleSheet, StatusBar, useColorScheme } from 'react-native';
|
import React from 'react';
|
||||||
import LinearGradient from 'react-native-linear-gradient';
|
import { StyleSheet, SafeAreaView, StatusBar, useColorScheme } from 'react-native';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import LinearGradient from 'react-native-linear-gradient';
|
||||||
import { GlobalTheme } from '../theme';
|
|
||||||
|
const Background = ({ children, barcolor = 'light-content'}) => {
|
||||||
const Background = ({ children, barcolor = 'light-content'}) => {
|
const isDarkMode = useColorScheme() === 'dark';
|
||||||
const isDarkMode = useColorScheme() === 'dark';
|
return (
|
||||||
return (
|
<SafeAreaView style={styles.container}>
|
||||||
<SafeAreaView style={styles.container}>
|
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
|
||||||
<StatusBar barStyle={'light-content'} />
|
<LinearGradient colors={['#E3EBF8', '#ffffff']} start={{ x: 0.5, y: 0 }} end={{ x: 0.5, y: 1 }} style={styles.gradient}>
|
||||||
<LinearGradient colors={['#E3EBF8', '#ffffff']} start={{ x: 0.5, y: 0 }} end={{ x: 0.5, y: 1 }} style={styles.gradient}>
|
{children}
|
||||||
{children}
|
</LinearGradient>
|
||||||
</LinearGradient>
|
</SafeAreaView>
|
||||||
</SafeAreaView>
|
);
|
||||||
);
|
};
|
||||||
};
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
const styles = StyleSheet.create({
|
container: {
|
||||||
container: {
|
flex: 1,
|
||||||
flex: 1,
|
|
||||||
backgroundColor: GlobalTheme.colors.primary,
|
},
|
||||||
|
gradient: {
|
||||||
},
|
flex: 1,
|
||||||
gradient: {
|
paddingHorizontal: 20,
|
||||||
flex: 1,
|
},
|
||||||
// paddingHorizontal: 20,
|
});
|
||||||
},
|
|
||||||
});
|
export default Background;
|
||||||
|
=======
|
||||||
export default Background;
|
// src/components/Background.js
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import { StyleSheet, StatusBar, useColorScheme } from 'react-native';
|
||||||
|
import LinearGradient from 'react-native-linear-gradient';
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
|
import { GlobalTheme } from '../theme';
|
||||||
|
|
||||||
|
const Background = ({ children, barcolor = 'light-content'}) => {
|
||||||
|
const isDarkMode = useColorScheme() === 'dark';
|
||||||
|
return (
|
||||||
|
<SafeAreaView style={styles.container}>
|
||||||
|
<StatusBar barStyle={'light-content'} />
|
||||||
|
<LinearGradient colors={['#E3EBF8', '#ffffff']} start={{ x: 0.5, y: 0 }} end={{ x: 0.5, y: 1 }} style={styles.gradient}>
|
||||||
|
{children}
|
||||||
|
</LinearGradient>
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
|
|
||||||
|
},
|
||||||
|
gradient: {
|
||||||
|
flex: 1,
|
||||||
|
// paddingHorizontal: 20,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default Background;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,13 +1,29 @@
|
|||||||
import { View, Text, TouchableOpacity } from 'react-native';
|
<<<<<<< HEAD
|
||||||
|
import { View, Text, TouchableOpacity } from 'react-native';
|
||||||
const CustomButton = ({ title, style, textstyle, onPress , disabled}) => {
|
|
||||||
return (
|
const CustomButton = ({ title, style, textstyle, onPress }) => {
|
||||||
<TouchableOpacity disabled={disabled} onPress={onPress}>
|
return (
|
||||||
<View style={{ marginHorizontal: 0, paddingVertical: 10, ...style }}>
|
<TouchableOpacity onPress={onPress}>
|
||||||
<Text style={{ textAlign: 'center', ...textstyle }}>{title}</Text>
|
<View style={{ marginHorizontal: 0, paddingVertical: 10, ...style }}>
|
||||||
</View>
|
<Text style={{ textAlign: 'center', ...textstyle }}>{title}</Text>
|
||||||
</TouchableOpacity>
|
</View>
|
||||||
);
|
</TouchableOpacity>
|
||||||
};
|
);
|
||||||
|
};
|
||||||
export default CustomButton;
|
|
||||||
|
export default CustomButton;
|
||||||
|
=======
|
||||||
|
import { View, Text, TouchableOpacity } from 'react-native';
|
||||||
|
|
||||||
|
const CustomButton = ({ title, style, textstyle, onPress , disabled}) => {
|
||||||
|
return (
|
||||||
|
<TouchableOpacity disabled={disabled} onPress={onPress}>
|
||||||
|
<View style={{ marginHorizontal: 0, paddingVertical: 10, ...style }}>
|
||||||
|
<Text style={{ textAlign: 'center', ...textstyle }}>{title}</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CustomButton;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View, Text, Modal, StyleSheet, TouchableOpacity, Image} from 'react-native';
|
import { View, Text, Modal, StyleSheet, TouchableOpacity, Image } from 'react-native';
|
||||||
import IMAGES from '../constants/Images';
|
import IMAGES from '../constants/Images';
|
||||||
|
|
||||||
const CustomModal = ({
|
const CustomModal = ({
|
||||||
@@ -18,17 +18,21 @@ const CustomModal = ({
|
|||||||
<Modal visible={showModal} transparent animationType="fade">
|
<Modal visible={showModal} transparent animationType="fade">
|
||||||
<View style={styles.overlay}>
|
<View style={styles.overlay}>
|
||||||
<View style={[styles.modalContainer, style]}>
|
<View style={[styles.modalContainer, style]}>
|
||||||
{onClose && (
|
{/* {onClose && (
|
||||||
<TouchableOpacity onPress={onClose} style={styles.closeButton}>
|
<TouchableOpacity onPress={onClose} style={styles.closeButton}>
|
||||||
<Image source={IMAGES.crossIcon} style={styles.iconStyle} />
|
<Image source={IMAGES.crossIcon} style={styles.iconStyle} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)} */}
|
||||||
|
|
||||||
{title && <Text style={[styles.title, titleStyle]}>{title}</Text>}
|
{/* <TouchableOpacity onPress={onClose} style={styles.closeButton}>
|
||||||
{message && <Text style={[styles.message, messageStyle]}>{message}</Text>}
|
<Image source={IMAGES.alert} style={styles.iconStyle} />
|
||||||
|
</TouchableOpacity> */}
|
||||||
|
<View style={{ marginTop: 10 }}>
|
||||||
|
{title && <Text style={[styles.title, titleStyle]}>{title}</Text>}
|
||||||
|
{message && <Text style={[styles.message, messageStyle]}>{message}</Text>}
|
||||||
|
</View>
|
||||||
|
|
||||||
<View style={{ marginVertical: 10 }}>{children}</View>
|
<View style={{ marginVertical: 10 }}>{children}</View>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -50,12 +54,14 @@ const styles = StyleSheet.create({
|
|||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
padding: 15,
|
padding: 15,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
minHeight:200
|
minHeight: 180,
|
||||||
|
justifyContent: 'center'
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
marginBottom: 6,
|
marginBottom: 6,
|
||||||
|
color: "#000"
|
||||||
},
|
},
|
||||||
message: {
|
message: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@@ -63,17 +69,17 @@ const styles = StyleSheet.create({
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
closeButton: {
|
closeButton: {
|
||||||
alignSelf:'flex-end',
|
alignSelf: 'center',
|
||||||
marginBottom:15
|
marginBottom: 15
|
||||||
},
|
},
|
||||||
closeText: {
|
closeText: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
},
|
},
|
||||||
iconStyle:{
|
iconStyle: {
|
||||||
height:35,
|
height: 50,
|
||||||
width:35,
|
width: 50,
|
||||||
resizeMode:'contain',
|
resizeMode: 'contain',
|
||||||
// tintColor:'red'
|
// tintColor:'red'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,85 +1,173 @@
|
|||||||
import { View, Text, TextInput, StyleSheet, } from 'react-native';
|
<<<<<<< HEAD
|
||||||
import React, { useState } from 'react';
|
import { View, Text, TextInput, StyleSheet, } from 'react-native';
|
||||||
import { GlobalTheme, Screen } from '../theme';
|
import React, { useState } from 'react';
|
||||||
|
import { GlobalTheme, Screen } from '../theme';
|
||||||
const CustomTextInput = ({
|
|
||||||
label,
|
const CustomTextInput = ({
|
||||||
value,
|
label,
|
||||||
onChangeText,
|
value,
|
||||||
keyboardType,
|
onChangeText,
|
||||||
secureTextEntry,
|
keyboardType,
|
||||||
right,
|
secureTextEntry,
|
||||||
textstyle,
|
right,
|
||||||
viewstyle,
|
textstyle,
|
||||||
maxLength
|
viewstyle,
|
||||||
}) => {
|
maxLength
|
||||||
const [isFocused, setFocused] = useState(false);
|
}) => {
|
||||||
const [hidepassword, setHidePassword] = useState(false);
|
const [isFocused, setFocused] = useState(false);
|
||||||
|
const [hidepassword, setHidePassword] = useState(false);
|
||||||
const handleFocus = () => {
|
|
||||||
setFocused(true);
|
const handleFocus = () => {
|
||||||
};
|
setFocused(true);
|
||||||
|
};
|
||||||
const handleBlur = () => {
|
|
||||||
setFocused(false);
|
const handleBlur = () => {
|
||||||
};
|
setFocused(false);
|
||||||
|
};
|
||||||
const inputStyle = {
|
|
||||||
borderColor: isFocused ? '#2680EB' : '#DFDFDF',
|
const inputStyle = {
|
||||||
borderWidth: isFocused ? 2 : 1,
|
borderColor: isFocused ? '#2680EB' : '#DFDFDF',
|
||||||
backgroundColor: isFocused ? '#FFF' : '#Fff',
|
borderWidth: isFocused ? 2 : 1,
|
||||||
borderRadius: GlobalTheme.borderRadius.md,
|
backgroundColor: isFocused ? '#FFF' : '#Fff',
|
||||||
};
|
borderRadius: GlobalTheme.borderRadius.md,
|
||||||
|
};
|
||||||
return (
|
|
||||||
<View style={styles.inputContainer}>
|
return (
|
||||||
<Text
|
<View style={styles.inputContainer}>
|
||||||
style={{
|
<Text
|
||||||
color: GlobalTheme.colors.black,
|
style={{
|
||||||
fontSize: GlobalTheme.typography.fontSize.small,
|
color: GlobalTheme.colors.black,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
fontSize: GlobalTheme.typography.fontSize.medium,
|
||||||
marginTop: 10,
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
marginHorizontal: 0,
|
marginTop: 10,
|
||||||
...textstyle,
|
marginHorizontal: 0,
|
||||||
}}>
|
...textstyle,
|
||||||
{label}
|
}}>
|
||||||
</Text>
|
{label}
|
||||||
<View
|
</Text>
|
||||||
style={{
|
<View
|
||||||
borderRadius: GlobalTheme.borderRadius.lgg,
|
style={{
|
||||||
// borderWidth: 6,
|
borderRadius: GlobalTheme.borderRadius.lgg,
|
||||||
borderColor: isFocused ? '#DFECFF' : 'transparent',
|
// borderWidth: 6,
|
||||||
marginTop: 8,
|
borderColor: isFocused ? '#DFECFF' : 'transparent',
|
||||||
...viewstyle,
|
marginTop: 8,
|
||||||
}}>
|
...viewstyle,
|
||||||
<TextInput
|
}}>
|
||||||
maxLength={maxLength}
|
<TextInput
|
||||||
style={[styles.input, inputStyle]}
|
maxLength={maxLength}
|
||||||
value={value}
|
style={[styles.input, inputStyle]}
|
||||||
onChangeText={onChangeText}
|
value={value}
|
||||||
keyboardType={keyboardType}
|
onChangeText={onChangeText}
|
||||||
autoCapitalize="none"
|
keyboardType={keyboardType}
|
||||||
onFocus={handleFocus}
|
autoCapitalize="none"
|
||||||
onBlur={handleBlur}
|
onFocus={handleFocus}
|
||||||
placeholder={`Enter your ${label.toLowerCase()}`}
|
onBlur={handleBlur}
|
||||||
placeholderTextColor={'#555555'}
|
placeholder={`Enter your ${label.toLowerCase()}`}
|
||||||
/>
|
placeholderTextColor={'#555555'}
|
||||||
|
/>
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
</View>
|
||||||
};
|
);
|
||||||
|
};
|
||||||
export default CustomTextInput;
|
|
||||||
|
export default CustomTextInput;
|
||||||
const styles = StyleSheet.create({
|
|
||||||
input: {
|
const styles = StyleSheet.create({
|
||||||
height: 50,
|
input: {
|
||||||
borderWidth: 1,
|
height: 50,
|
||||||
padding: 10,
|
borderWidth: 1,
|
||||||
color: GlobalTheme.colors.black,
|
padding: 10,
|
||||||
},
|
color: GlobalTheme.colors.black,
|
||||||
inputContainer: {
|
},
|
||||||
marginBottom: 16,
|
inputContainer: {
|
||||||
},
|
marginBottom: 16,
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
=======
|
||||||
|
import { View, Text, TextInput, StyleSheet, } from 'react-native';
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
import { GlobalTheme, Screen } from '../theme';
|
||||||
|
|
||||||
|
const CustomTextInput = ({
|
||||||
|
label,
|
||||||
|
value,
|
||||||
|
onChangeText,
|
||||||
|
keyboardType,
|
||||||
|
secureTextEntry,
|
||||||
|
right,
|
||||||
|
textstyle,
|
||||||
|
viewstyle,
|
||||||
|
maxLength
|
||||||
|
}) => {
|
||||||
|
const [isFocused, setFocused] = useState(false);
|
||||||
|
const [hidepassword, setHidePassword] = useState(false);
|
||||||
|
|
||||||
|
const handleFocus = () => {
|
||||||
|
setFocused(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleBlur = () => {
|
||||||
|
setFocused(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const inputStyle = {
|
||||||
|
borderColor: isFocused ? '#2680EB' : '#DFDFDF',
|
||||||
|
borderWidth: isFocused ? 2 : 1,
|
||||||
|
backgroundColor: isFocused ? '#FFF' : '#Fff',
|
||||||
|
borderRadius: GlobalTheme.borderRadius.md,
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={styles.inputContainer}>
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
color: GlobalTheme.colors.black,
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.small,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
marginTop: 10,
|
||||||
|
marginHorizontal: 0,
|
||||||
|
...textstyle,
|
||||||
|
}}>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
borderRadius: GlobalTheme.borderRadius.lgg,
|
||||||
|
// borderWidth: 6,
|
||||||
|
borderColor: isFocused ? '#DFECFF' : 'transparent',
|
||||||
|
marginTop: 8,
|
||||||
|
...viewstyle,
|
||||||
|
}}>
|
||||||
|
<TextInput
|
||||||
|
maxLength={maxLength}
|
||||||
|
style={[styles.input, inputStyle]}
|
||||||
|
value={value}
|
||||||
|
onChangeText={onChangeText}
|
||||||
|
keyboardType={keyboardType}
|
||||||
|
autoCapitalize="none"
|
||||||
|
onFocus={handleFocus}
|
||||||
|
onBlur={handleBlur}
|
||||||
|
placeholder={`Enter your ${label.toLowerCase()}`}
|
||||||
|
placeholderTextColor={'#555555'}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CustomTextInput;
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
input: {
|
||||||
|
height: 50,
|
||||||
|
borderWidth: 1,
|
||||||
|
padding: 10,
|
||||||
|
color: GlobalTheme.colors.black,
|
||||||
|
},
|
||||||
|
inputContainer: {
|
||||||
|
marginBottom: 16,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,8 +1,19 @@
|
|||||||
// colors.js
|
<<<<<<< HEAD
|
||||||
export const colors = [
|
// colors.js
|
||||||
{ bgColor: '#eddeb8', textColor: '#0c8fa5' },
|
export const colors = [
|
||||||
{ bgColor: '#dcf2ee', textColor: '#f39a19' },
|
{ bgColor: '#eddeb8', textColor: '#0c8fa5' },
|
||||||
{ bgColor: '#eebdc3', textColor: '#ff5f5f' },
|
{ bgColor: '#dcf2ee', textColor: '#f39a19' },
|
||||||
{ bgColor: '#d1c4e9', textColor: '#6A1B9A' },
|
{ bgColor: '#eebdc3', textColor: '#ff5f5f' },
|
||||||
{ bgColor: '#ffe0b2', textColor: '#EF6C00' },
|
{ bgColor: '#d1c4e9', textColor: '#6A1B9A' },
|
||||||
];
|
{ bgColor: '#ffe0b2', textColor: '#EF6C00' },
|
||||||
|
];
|
||||||
|
=======
|
||||||
|
// colors.js
|
||||||
|
export const colors = [
|
||||||
|
{ bgColor: '#eddeb8', textColor: '#0c8fa5' },
|
||||||
|
{ bgColor: '#dcf2ee', textColor: '#f39a19' },
|
||||||
|
{ bgColor: '#eebdc3', textColor: '#ff5f5f' },
|
||||||
|
{ bgColor: '#d1c4e9', textColor: '#6A1B9A' },
|
||||||
|
{ bgColor: '#ffe0b2', textColor: '#EF6C00' },
|
||||||
|
];
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,75 +1,152 @@
|
|||||||
import React from 'react';
|
<<<<<<< HEAD
|
||||||
import AntDesign from 'react-native-vector-icons/AntDesign';
|
import React from 'react';
|
||||||
import Entypo from 'react-native-vector-icons/Entypo';
|
import AntDesign from 'react-native-vector-icons/AntDesign';
|
||||||
import EvilIcons from 'react-native-vector-icons/EvilIcons';
|
import Entypo from 'react-native-vector-icons/Entypo';
|
||||||
import Feather from 'react-native-vector-icons/Feather';
|
import EvilIcons from 'react-native-vector-icons/EvilIcons';
|
||||||
import FontAwesome from 'react-native-vector-icons/FontAwesome';
|
import Feather from 'react-native-vector-icons/Feather';
|
||||||
import Fontisto from 'react-native-vector-icons/Fontisto';
|
import FontAwesome from 'react-native-vector-icons/FontAwesome';
|
||||||
import Foundation from 'react-native-vector-icons/Foundation';
|
import Fontisto from 'react-native-vector-icons/Fontisto';
|
||||||
import Ionicons from 'react-native-vector-icons/Ionicons';
|
import Foundation from 'react-native-vector-icons/Foundation';
|
||||||
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
import Ionicons from 'react-native-vector-icons/Ionicons';
|
||||||
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
||||||
import Octicons from 'react-native-vector-icons/Octicons';
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import Zocial from 'react-native-vector-icons/Zocial';
|
import Octicons from 'react-native-vector-icons/Octicons';
|
||||||
import SimpleLineIcons from 'react-native-vector-icons/SimpleLineIcons';
|
import Zocial from 'react-native-vector-icons/Zocial';
|
||||||
import { GlobalTheme } from '../theme';
|
import SimpleLineIcons from 'react-native-vector-icons/SimpleLineIcons';
|
||||||
|
import { GlobalTheme } from 'src/theme';
|
||||||
|
|
||||||
function CustomIcon({
|
function CustomIcon({
|
||||||
iconLibrary,
|
iconLibrary,
|
||||||
icon,
|
icon,
|
||||||
size = 22,
|
size = 22,
|
||||||
color = GlobalTheme.colors.primary,
|
color = GlobalTheme.colors.primary,
|
||||||
style = {},
|
style = {},
|
||||||
...rest
|
...rest
|
||||||
}) {
|
}) {
|
||||||
let Icon = AntDesign;
|
let Icon = AntDesign;
|
||||||
|
|
||||||
switch (iconLibrary) {
|
switch (iconLibrary) {
|
||||||
case 'AntDesign':
|
case 'AntDesign':
|
||||||
Icon = AntDesign;
|
Icon = AntDesign;
|
||||||
break;
|
break;
|
||||||
case 'Entypo':
|
case 'Entypo':
|
||||||
Icon = Entypo;
|
Icon = Entypo;
|
||||||
break;
|
break;
|
||||||
case 'EvilIcons':
|
case 'EvilIcons':
|
||||||
Icon = EvilIcons;
|
Icon = EvilIcons;
|
||||||
break;
|
break;
|
||||||
case 'Feather':
|
case 'Feather':
|
||||||
Icon = Feather;
|
Icon = Feather;
|
||||||
break;
|
break;
|
||||||
case 'FontAwesome':
|
case 'FontAwesome':
|
||||||
Icon = FontAwesome;
|
Icon = FontAwesome;
|
||||||
break;
|
break;
|
||||||
case 'Fontisto':
|
case 'Fontisto':
|
||||||
Icon = Fontisto;
|
Icon = Fontisto;
|
||||||
break;
|
break;
|
||||||
case 'Foundation':
|
case 'Foundation':
|
||||||
Icon = Foundation;
|
Icon = Foundation;
|
||||||
break;
|
break;
|
||||||
case 'Ionicons':
|
case 'Ionicons':
|
||||||
Icon = Ionicons;
|
Icon = Ionicons;
|
||||||
break;
|
break;
|
||||||
case 'MaterialIcons':
|
case 'MaterialIcons':
|
||||||
Icon = MaterialIcons;
|
Icon = MaterialIcons;
|
||||||
break;
|
break;
|
||||||
case 'MaterialCommunityIcons':
|
case 'MaterialCommunityIcons':
|
||||||
Icon = MaterialCommunityIcons;
|
Icon = MaterialCommunityIcons;
|
||||||
break;
|
break;
|
||||||
case 'Octicons':
|
case 'Octicons':
|
||||||
Icon = Octicons;
|
Icon = Octicons;
|
||||||
break;
|
break;
|
||||||
case 'Zocial':
|
case 'Zocial':
|
||||||
Icon = Zocial;
|
Icon = Zocial;
|
||||||
break;
|
break;
|
||||||
case 'SimpleLineIcons':
|
case 'SimpleLineIcons':
|
||||||
Icon = SimpleLineIcons;
|
Icon = SimpleLineIcons;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Icon = AntDesign;
|
Icon = AntDesign;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Icon name={icon} size={size} style={style} color={color} {...rest} />;
|
return <Icon name={icon} size={size} style={style} color={color} {...rest} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CustomIcon;
|
export default CustomIcon;
|
||||||
|
=======
|
||||||
|
import React from 'react';
|
||||||
|
import AntDesign from 'react-native-vector-icons/AntDesign';
|
||||||
|
import Entypo from 'react-native-vector-icons/Entypo';
|
||||||
|
import EvilIcons from 'react-native-vector-icons/EvilIcons';
|
||||||
|
import Feather from 'react-native-vector-icons/Feather';
|
||||||
|
import FontAwesome from 'react-native-vector-icons/FontAwesome';
|
||||||
|
import Fontisto from 'react-native-vector-icons/Fontisto';
|
||||||
|
import Foundation from 'react-native-vector-icons/Foundation';
|
||||||
|
import Ionicons from 'react-native-vector-icons/Ionicons';
|
||||||
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
||||||
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
|
import Octicons from 'react-native-vector-icons/Octicons';
|
||||||
|
import Zocial from 'react-native-vector-icons/Zocial';
|
||||||
|
import SimpleLineIcons from 'react-native-vector-icons/SimpleLineIcons';
|
||||||
|
import { GlobalTheme } from '../theme';
|
||||||
|
|
||||||
|
|
||||||
|
function CustomIcon({
|
||||||
|
iconLibrary,
|
||||||
|
icon,
|
||||||
|
size = 22,
|
||||||
|
color = GlobalTheme.colors.primary,
|
||||||
|
style = {},
|
||||||
|
...rest
|
||||||
|
}) {
|
||||||
|
let Icon = AntDesign;
|
||||||
|
|
||||||
|
switch (iconLibrary) {
|
||||||
|
case 'AntDesign':
|
||||||
|
Icon = AntDesign;
|
||||||
|
break;
|
||||||
|
case 'Entypo':
|
||||||
|
Icon = Entypo;
|
||||||
|
break;
|
||||||
|
case 'EvilIcons':
|
||||||
|
Icon = EvilIcons;
|
||||||
|
break;
|
||||||
|
case 'Feather':
|
||||||
|
Icon = Feather;
|
||||||
|
break;
|
||||||
|
case 'FontAwesome':
|
||||||
|
Icon = FontAwesome;
|
||||||
|
break;
|
||||||
|
case 'Fontisto':
|
||||||
|
Icon = Fontisto;
|
||||||
|
break;
|
||||||
|
case 'Foundation':
|
||||||
|
Icon = Foundation;
|
||||||
|
break;
|
||||||
|
case 'Ionicons':
|
||||||
|
Icon = Ionicons;
|
||||||
|
break;
|
||||||
|
case 'MaterialIcons':
|
||||||
|
Icon = MaterialIcons;
|
||||||
|
break;
|
||||||
|
case 'MaterialCommunityIcons':
|
||||||
|
Icon = MaterialCommunityIcons;
|
||||||
|
break;
|
||||||
|
case 'Octicons':
|
||||||
|
Icon = Octicons;
|
||||||
|
break;
|
||||||
|
case 'Zocial':
|
||||||
|
Icon = Zocial;
|
||||||
|
break;
|
||||||
|
case 'SimpleLineIcons':
|
||||||
|
Icon = SimpleLineIcons;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Icon = AntDesign;
|
||||||
|
}
|
||||||
|
|
||||||
|
return <Icon name={icon} size={size} style={style} color={color} {...rest} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CustomIcon;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,32 +1,51 @@
|
|||||||
const IMAGES = {
|
<<<<<<< HEAD
|
||||||
// AppLogo: require('../assets/Images/logo.png'),
|
const IMAGES = {
|
||||||
AppLogo: require('../assets/Images/logo.png'),
|
// AppLogo: require('../assets/Images/logo.png'),
|
||||||
filterIcon: require('../assets/Icons/filter.png'),
|
AppLogo: require('../assets/Images/logo.png'),
|
||||||
menuIcon: require('../assets/Icons/menu.png'),
|
filterIcon: require('../assets/Icons/filter.png'),
|
||||||
pluscircleIcon: require('../assets/Icons/pluscircle.png'),
|
menuIcon: require('../assets/Icons/menu.png'),
|
||||||
rightArrowIcon: require('../assets/Icons/rightarrow.png'),
|
pluscircleIcon: require('../assets/Icons/pluscircle.png'),
|
||||||
leftArrowIcon: require('../assets/Icons/leftarrow.png'),
|
rightArrowIcon: require('../assets/Icons/rightarrow.png'),
|
||||||
crossIcon: require('../assets/Icons/cross.png'),
|
crossIcon: require('../assets/Icons/cross.png'),
|
||||||
searchIcon: require('../assets/Icons/search.png'),
|
|
||||||
greenCameraIcon: require('../assets/Icons/green_camera.png'),
|
};
|
||||||
redCameraIcon: require('../assets/Icons/red_camera.png'),
|
|
||||||
normalCameraIcon: require('../assets/Icons/camera.png'),
|
export default IMAGES;
|
||||||
WhiteBGIMG: require('../assets/Images/white.png'),
|
=======
|
||||||
backIcon:require('../assets/Icons/backIcon.png'),
|
const IMAGES = {
|
||||||
greenTick:require('../assets/Icons/greenTick.png'),
|
// AppLogo: require('../assets/Images/logo.png'),
|
||||||
storeIcon:require('../assets/Icons/store.png'),
|
AppLogo: require('../assets/Images/logo.png'),
|
||||||
reportIcon:require('../assets/Icons/report.png'),
|
filterIcon: require('../assets/Icons/filter.png'),
|
||||||
downIcon:require('../assets/Icons/down.png'),
|
menuIcon: require('../assets/Icons/menu.png'),
|
||||||
upArrow:require('../assets/Icons/uparrow.png'),
|
pluscircleIcon: require('../assets/Icons/pluscircle.png'),
|
||||||
footerImage : require('../assets/Images/footerImage.png'),
|
rightArrowIcon: require('../assets/Icons/rightarrow.png'),
|
||||||
Logo: require('../assets/Images/applogo.png'),
|
leftArrowIcon: require('../assets/Icons/leftarrow.png'),
|
||||||
WelcomeBackground: require('../assets/Images/welcomebackground.png'),
|
crossIcon: require('../assets/Icons/cross.png'),
|
||||||
Welcomelogo: require('../assets/Images/welcomelogo.png'),
|
searchIcon: require('../assets/Icons/search.png'),
|
||||||
AuthTopBG: require('../assets/Images/logintopBG.png'),
|
greenCameraIcon: require('../assets/Icons/green_camera.png'),
|
||||||
AuthTopBGNew: require('../assets/Images/appLogoNew.png'),
|
redCameraIcon: require('../assets/Icons/red_camera.png'),
|
||||||
AuthBottomBG: require('../assets/Images/loginbottomBG.png'),
|
normalCameraIcon: require('../assets/Icons/camera.png'),
|
||||||
dotsIcon: require('../assets/Icons/dots.png'),
|
WhiteBGIMG: require('../assets/Images/white.png'),
|
||||||
|
backIcon:require('../assets/Icons/backIcon.png'),
|
||||||
};
|
greenTick:require('../assets/Icons/greenTick.png'),
|
||||||
|
storeIcon:require('../assets/Icons/store.png'),
|
||||||
export default IMAGES;
|
reportIcon:require('../assets/Icons/report.png'),
|
||||||
|
downIcon:require('../assets/Icons/down.png'),
|
||||||
|
upArrow:require('../assets/Icons/uparrow.png'),
|
||||||
|
footerImage : require('../assets/Images/footerImage.png'),
|
||||||
|
Logo: require('../assets/Images/applogo.png'),
|
||||||
|
WelcomeBackground: require('../assets/Images/welcomebackground.png'),
|
||||||
|
Welcomelogo: require('../assets/Images/welcomelogo.png'),
|
||||||
|
AuthTopBG: require('../assets/Images/logintopBG.png'),
|
||||||
|
AuthTopBGNew: require('../assets/Images/appLogoNew.png'),
|
||||||
|
AuthBottomBG: require('../assets/Images/loginbottomBG.png'),
|
||||||
|
projectIdImg: require('../assets/Images/projectId.png'),
|
||||||
|
PerformicsLogo: require('../assets/Images/PerformicsLogo.png'),
|
||||||
|
dotsIcon: require('../assets/Icons/dots.png'),
|
||||||
|
pending: require('../assets/Icons/wall-clock.png'),
|
||||||
|
alert: require('../assets/Icons/question-mark.png'),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
export default IMAGES;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,36 +1,74 @@
|
|||||||
// Toast.js
|
<<<<<<< HEAD
|
||||||
import Toast from 'react-native-toast-message';
|
// Toast.js
|
||||||
const showToast = (type, text1, text2) => {
|
import Toast from 'react-native-toast-message';
|
||||||
Toast.show({
|
const showToast = (type, text1, text2) => {
|
||||||
type: type,
|
Toast.show({
|
||||||
text1: text1,
|
type: type,
|
||||||
text2: text2,
|
text1: text1,
|
||||||
position: 'top',
|
text2: text2,
|
||||||
visibilityTime: 3000,
|
position: 'top',
|
||||||
autoHide: true,
|
visibilityTime: 3000,
|
||||||
topOffset: 30,
|
autoHide: true,
|
||||||
bottomOffset: 40,
|
topOffset: 30,
|
||||||
text1Style: {
|
bottomOffset: 40,
|
||||||
fontSize: 15, // Custom font size for the main text
|
text1Style: {
|
||||||
fontWeight: 'bold',
|
fontSize: 15, // Custom font size for the main text
|
||||||
},
|
fontWeight: 'bold',
|
||||||
text2Style: {
|
},
|
||||||
fontSize: 14, // Custom font size for the secondary text
|
text2Style: {
|
||||||
color:'gray'
|
fontSize: 14, // Custom font size for the secondary text
|
||||||
},
|
color:'gray'
|
||||||
});
|
},
|
||||||
};
|
});
|
||||||
|
};
|
||||||
const ToastComponent = () => {
|
|
||||||
return <Toast innerRef={(ref) => Toast.setRef(ref)} />;
|
const ToastComponent = () => {
|
||||||
};
|
return <Toast innerRef={(ref) => Toast.setRef(ref)} />;
|
||||||
|
};
|
||||||
const toastSuccess = (text1, text2) => {
|
|
||||||
showToast('success', text1, text2);
|
const toastSuccess = (text1, text2) => {
|
||||||
};
|
showToast('success', text1, text2);
|
||||||
|
};
|
||||||
const toastError = (text1, text2) => {
|
|
||||||
showToast('error', text1, text2);
|
const toastError = (text1, text2) => {
|
||||||
};
|
showToast('error', text1, text2);
|
||||||
|
};
|
||||||
|
|
||||||
|
=======
|
||||||
|
// Toast.js
|
||||||
|
import Toast from 'react-native-toast-message';
|
||||||
|
const showToast = (type, text1, text2) => {
|
||||||
|
Toast.show({
|
||||||
|
type: type,
|
||||||
|
text1: text1,
|
||||||
|
text2: text2,
|
||||||
|
position: 'top',
|
||||||
|
visibilityTime: 3000,
|
||||||
|
autoHide: true,
|
||||||
|
topOffset: 30,
|
||||||
|
bottomOffset: 40,
|
||||||
|
text1Style: {
|
||||||
|
fontSize: 15, // Custom font size for the main text
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
|
text2Style: {
|
||||||
|
fontSize: 14, // Custom font size for the secondary text
|
||||||
|
color:'gray'
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const ToastComponent = () => {
|
||||||
|
return <Toast innerRef={(ref) => Toast.setRef(ref)} />;
|
||||||
|
};
|
||||||
|
|
||||||
|
const toastSuccess = (text1, text2) => {
|
||||||
|
showToast('success', text1, text2);
|
||||||
|
};
|
||||||
|
|
||||||
|
const toastError = (text1, text2) => {
|
||||||
|
showToast('error', text1, text2);
|
||||||
|
};
|
||||||
|
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
export { ToastComponent, toastSuccess, toastError };
|
export { ToastComponent, toastSuccess, toastError };
|
||||||
@@ -1,47 +1,84 @@
|
|||||||
import React from 'react';
|
<<<<<<< HEAD
|
||||||
import { NavigationContainer } from '@react-navigation/native';
|
|
||||||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
import React from 'react';
|
||||||
import Splash from '../screens/AuthScreen/Splash';
|
import { NavigationContainer } from '@react-navigation/native';
|
||||||
import Login from '../screens/AuthScreen/Login';
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||||
import VerifyOTP from '../screens/AuthScreen/VerifyOTP';
|
import Splash from '../screens/AuthScreen/Splash';
|
||||||
import { ToastComponent } from '../constants/Toast';
|
import Login from '../screens/AuthScreen/Login';
|
||||||
import StoreInfo from '../screens/MainScreen/StoreInfo';
|
import VerifyOTP from '../screens/AuthScreen/VerifyOTP';
|
||||||
|
import { ToastComponent } from '../constants/Toast';
|
||||||
import Feedback from '../screens/MainScreen/Feedback';
|
import StoreInfo from '../screens/MainScreen/StoreInfo';
|
||||||
import Dashboard from '../screens/MainScreen/Dashboard';
|
|
||||||
import FeedbackCategories from '../screens/MainScreen/Feedback/FeedbackCategories';
|
const Stack = createNativeStackNavigator();
|
||||||
import { Platform, StatusBar, View } from 'react-native';
|
|
||||||
import Welcome from '../screens/MainScreen/WelcomePage';
|
const Routes = () => {
|
||||||
|
return (
|
||||||
const Stack = createNativeStackNavigator();
|
<NavigationContainer>
|
||||||
|
<Stack.Navigator
|
||||||
const Routes = () => {
|
screenOptions={{ headerShown: false }}
|
||||||
const STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 50 : StatusBar.currentHeight;
|
initialRouteName="Splash">
|
||||||
return (
|
<Stack.Screen name="Splash" component={Splash} />
|
||||||
<NavigationContainer>
|
<Stack.Screen name="Login" component={Login} />
|
||||||
{Platform.OS === 'ios' && (
|
<Stack.Screen name="VerifyOTP" component={VerifyOTP} />
|
||||||
<View style={{
|
<Stack.Screen name="StoreInfo" component={StoreInfo} />
|
||||||
height: STATUSBAR_HEIGHT,
|
|
||||||
bbarStyle:'light-content',
|
</Stack.Navigator>
|
||||||
backgroundColor: '#113F8C',
|
<ToastComponent />
|
||||||
}} />
|
</NavigationContainer>
|
||||||
)}
|
);
|
||||||
<StatusBar barStyle={'light-content'} backgroundColor={'#113F8C'} />
|
};
|
||||||
<Stack.Navigator
|
|
||||||
screenOptions={{ headerShown: false }}
|
=======
|
||||||
initialRouteName="Splash">
|
import React from 'react';
|
||||||
<Stack.Screen name="Splash" component={Splash} />
|
import { NavigationContainer } from '@react-navigation/native';
|
||||||
<Stack.Screen name="Login" component={Login} />
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||||
<Stack.Screen name="VerifyOTP" component={VerifyOTP} />
|
import Splash from '../screens/AuthScreen/Splash';
|
||||||
<Stack.Screen name="Welcome" component={Welcome} />
|
import Login from '../screens/AuthScreen/Login/Login';
|
||||||
<Stack.Screen name="StoreInfo" component={StoreInfo} />
|
import VerifyOTP from '../screens/AuthScreen/VerifyOTP';
|
||||||
<Stack.Screen name="Dashboard" component={Dashboard} />
|
import { ToastComponent } from '../constants/Toast';
|
||||||
<Stack.Screen name="Feedback" component={Feedback} />
|
import StoreInfo from '../screens/MainScreen/StoreInfo';
|
||||||
<Stack.Screen name="FeedbackCategories" component={FeedbackCategories} />
|
|
||||||
</Stack.Navigator>
|
import Feedback from '../screens/MainScreen/Feedback';
|
||||||
<ToastComponent />
|
import Dashboard from '../screens/MainScreen/Dashboard';
|
||||||
</NavigationContainer>
|
import FeedbackCategories from '../screens/MainScreen/Feedback/FeedbackCategories';
|
||||||
);
|
import { Platform, StatusBar, View } from 'react-native';
|
||||||
};
|
import Welcome from '../screens/MainScreen/WelcomePage';
|
||||||
|
import Details from '../screens/MainScreen/Dashboard/Details';
|
||||||
|
import Project from '../screens/AuthScreen/Project/Project';
|
||||||
|
|
||||||
|
const Stack = createNativeStackNavigator();
|
||||||
|
|
||||||
|
const Routes = () => {
|
||||||
|
const STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 50 : StatusBar.currentHeight;
|
||||||
|
return (
|
||||||
|
<NavigationContainer>
|
||||||
|
{Platform.OS === 'ios' && (
|
||||||
|
<View style={{
|
||||||
|
height: STATUSBAR_HEIGHT,
|
||||||
|
bbarStyle:'light-content',
|
||||||
|
backgroundColor: '#113F8C',
|
||||||
|
}} />
|
||||||
|
)}
|
||||||
|
<StatusBar barStyle={'light-content'} backgroundColor={'#113F8C'} />
|
||||||
|
<Stack.Navigator
|
||||||
|
screenOptions={{ headerShown: false }}
|
||||||
|
initialRouteName="Splash">
|
||||||
|
<Stack.Screen name="Splash" component={Splash} />
|
||||||
|
<Stack.Screen name="Login" component={Login} />
|
||||||
|
<Stack.Screen name="VerifyOTP" component={VerifyOTP} />
|
||||||
|
<Stack.Screen name="Welcome" component={Welcome} />
|
||||||
|
<Stack.Screen name="StoreInfo" component={StoreInfo} />
|
||||||
|
<Stack.Screen name="Dashboard" component={Dashboard} />
|
||||||
|
<Stack.Screen name="Feedback" component={Feedback} />
|
||||||
|
<Stack.Screen name="FeedbackCategories" component={FeedbackCategories} />
|
||||||
|
<Stack.Screen name="Details" component={Details} />
|
||||||
|
<Stack.Screen name="Project" component={Project} />
|
||||||
|
|
||||||
|
</Stack.Navigator>
|
||||||
|
<ToastComponent />
|
||||||
|
</NavigationContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
export default Routes;
|
export default Routes;
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
import userSlice from '../slices/userSlice';
|
<<<<<<< HEAD
|
||||||
|
import userSlice from '../slices/userSlice';
|
||||||
export default {
|
|
||||||
user: userSlice,
|
export default {
|
||||||
};
|
user: userSlice,
|
||||||
|
};
|
||||||
|
=======
|
||||||
|
import userSlice from '../slices/userSlice';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
user: userSlice,
|
||||||
|
};
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,33 +1,68 @@
|
|||||||
// // src/redux/slices/authSlice.js
|
<<<<<<< HEAD
|
||||||
// import { createSlice } from '@reduxjs/toolkit';
|
// // src/redux/slices/authSlice.js
|
||||||
|
// import { createSlice } from '@reduxjs/toolkit';
|
||||||
// const initialState = {
|
|
||||||
// token: null,
|
// const initialState = {
|
||||||
// loading: false,
|
// token: null,
|
||||||
// error: null,
|
// loading: false,
|
||||||
// };
|
// error: null,
|
||||||
|
// };
|
||||||
// const authSlice = createSlice({
|
|
||||||
// name: 'auth',
|
// const authSlice = createSlice({
|
||||||
// initialState,
|
// name: 'auth',
|
||||||
// reducers: {
|
// initialState,
|
||||||
// loginStart: (state) => {
|
// reducers: {
|
||||||
// state.loading = true;
|
// loginStart: (state) => {
|
||||||
// state.error = null;
|
// state.loading = true;
|
||||||
// },
|
// state.error = null;
|
||||||
// loginSuccess: (state, action) => {
|
// },
|
||||||
// state.loading = false;
|
// loginSuccess: (state, action) => {
|
||||||
// state.token = action.payload;
|
// state.loading = false;
|
||||||
// },
|
// state.token = action.payload;
|
||||||
// loginFailure: (state, action) => {
|
// },
|
||||||
// state.loading = false;
|
// loginFailure: (state, action) => {
|
||||||
// state.error = action.payload;
|
// state.loading = false;
|
||||||
// },
|
// state.error = action.payload;
|
||||||
// logout: (state) => {
|
// },
|
||||||
// state.token = null;
|
// logout: (state) => {
|
||||||
// },
|
// state.token = null;
|
||||||
// },
|
// },
|
||||||
// });
|
// },
|
||||||
|
// });
|
||||||
// export const { loginStart, loginSuccess, loginFailure, logout } = authSlice.actions;
|
|
||||||
|
// export const { loginStart, loginSuccess, loginFailure, logout } = authSlice.actions;
|
||||||
|
=======
|
||||||
|
// // src/redux/slices/authSlice.js
|
||||||
|
// import { createSlice } from '@reduxjs/toolkit';
|
||||||
|
|
||||||
|
// const initialState = {
|
||||||
|
// token: null,
|
||||||
|
// loading: false,
|
||||||
|
// error: null,
|
||||||
|
// };
|
||||||
|
|
||||||
|
// const authSlice = createSlice({
|
||||||
|
// name: 'auth',
|
||||||
|
// initialState,
|
||||||
|
// reducers: {
|
||||||
|
// loginStart: (state) => {
|
||||||
|
// state.loading = true;
|
||||||
|
// state.error = null;
|
||||||
|
// },
|
||||||
|
// loginSuccess: (state, action) => {
|
||||||
|
// state.loading = false;
|
||||||
|
// state.token = action.payload;
|
||||||
|
// },
|
||||||
|
// loginFailure: (state, action) => {
|
||||||
|
// state.loading = false;
|
||||||
|
// state.error = action.payload;
|
||||||
|
// },
|
||||||
|
// logout: (state) => {
|
||||||
|
// state.token = null;
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// export const { loginStart, loginSuccess, loginFailure, logout } = authSlice.actions;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
// export default authSlice.reducer;
|
// export default authSlice.reducer;
|
||||||
@@ -1,25 +1,53 @@
|
|||||||
import {createSlice} from '@reduxjs/toolkit';
|
<<<<<<< HEAD
|
||||||
|
import {createSlice} from '@reduxjs/toolkit';
|
||||||
const initialState = {
|
|
||||||
token: '',
|
const initialState = {
|
||||||
};
|
token: '',
|
||||||
|
};
|
||||||
const userSlice = createSlice({
|
|
||||||
name: 'user',
|
const userSlice = createSlice({
|
||||||
initialState,
|
name: 'user',
|
||||||
reducers: {
|
initialState,
|
||||||
setUser(state, action) {
|
reducers: {
|
||||||
return {
|
setUser(state, action) {
|
||||||
...state,
|
return {
|
||||||
...action.payload,
|
...state,
|
||||||
token: action?.payload?.usertoken,
|
...action.payload,
|
||||||
};
|
token: action?.payload?.usertoken,
|
||||||
},
|
};
|
||||||
resetUserState() {
|
},
|
||||||
return initialState;
|
resetUserState() {
|
||||||
},
|
return initialState;
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
|
});
|
||||||
export const {setUser, resetUserState} = userSlice.actions;
|
|
||||||
export default userSlice.reducer;
|
export const {setUser, resetUserState} = userSlice.actions;
|
||||||
|
export default userSlice.reducer;
|
||||||
|
=======
|
||||||
|
import {createSlice} from '@reduxjs/toolkit';
|
||||||
|
|
||||||
|
const initialState = {
|
||||||
|
token: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
const userSlice = createSlice({
|
||||||
|
name: 'user',
|
||||||
|
initialState,
|
||||||
|
reducers: {
|
||||||
|
setUser(state, action) {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
...action.payload,
|
||||||
|
token: action?.payload?.usertoken,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
resetUserState() {
|
||||||
|
return initialState;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const {setUser, resetUserState} = userSlice.actions;
|
||||||
|
export default userSlice.reducer;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
import { configureStore } from '@reduxjs/toolkit'
|
<<<<<<< HEAD
|
||||||
import reducer from './reducer'
|
import { configureStore } from '@reduxjs/toolkit'
|
||||||
|
import reducer from './reducer'
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
import { configureStore } from '@reduxjs/toolkit'
|
||||||
|
import reducer from './reducer'
|
||||||
|
|
||||||
|
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
export const store = configureStore({ reducer: reducer })
|
export const store = configureStore({ reducer: reducer })
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { View, Text, Image, Platform, ImageBackground } from 'react-native';
|
||||||
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||||
|
import IMAGES from '../../../constants/Images';
|
||||||
|
import { styles } from './style';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import CustomTextInput from '../../../components/CustomTextInput';
|
||||||
|
import CustomButton from '../../../components/CustomButton';
|
||||||
|
import Loader from '../../../constants/Loader';
|
||||||
|
import { ApiURL } from '../../../api/ApiConstant';
|
||||||
|
import { toastError, toastSuccess } from '../../../constants/Toast';
|
||||||
|
import axios from 'axios';
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
|
import { GlobalTheme } from '../../../theme';
|
||||||
|
import Geolocation from '@react-native-community/geolocation';
|
||||||
|
|
||||||
|
|
||||||
|
const Login = ({ navigation }) => {
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [username, setUsername] = useState('');
|
||||||
|
|
||||||
|
|
||||||
|
// geo loc
|
||||||
|
useEffect(() => {
|
||||||
|
Geolocation.getCurrentPosition(info => console.log("Location infoooo====>", JSON.stringify(info)));
|
||||||
|
}, [])
|
||||||
|
// end geo loc
|
||||||
|
|
||||||
|
|
||||||
|
const onSubmit = () => {
|
||||||
|
setLoading(true);
|
||||||
|
getOTP();
|
||||||
|
};
|
||||||
|
|
||||||
|
const getOTP = async () => {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
"UserId": username
|
||||||
|
};
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
method: 'post',
|
||||||
|
url: ApiURL.getotpApi,
|
||||||
|
headers: {
|
||||||
|
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: params
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await axios.request(config);
|
||||||
|
const res = response.data || [];
|
||||||
|
console.log('OTP is ===> ', res?.SendOTP);
|
||||||
|
if (res?.SendOTP[0].OTP === '0' || res?.SendOTP[0].OTP === 0) {
|
||||||
|
setLoading(false);
|
||||||
|
toastError("Alert", "Invalid User");
|
||||||
|
} else {
|
||||||
|
toastSuccess("Alert", res?.SendOTP[0]?.Messages);
|
||||||
|
navigation.navigate('VerifyOTP', { username: username });
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
// console.log('getotpApi res==>', JSON.stringify(res?.SendOTP[0]));
|
||||||
|
} catch (error) {
|
||||||
|
console.log("❌ OTP API error:", error);
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<SafeAreaView style={styles.container}>
|
||||||
|
<KeyboardAwareScrollView keyboardShouldPersistTaps="handled" enableOnAndroid={true} contentContainerStyle={{ justifyContent: 'center', flexGrow: 1, marginTop: 0 }} style={styles.container}>
|
||||||
|
<View style={{ backgroundColor: GlobalTheme.colors.primary, height: 40 }} />
|
||||||
|
<Image style={styles.appLogo} source={IMAGES.AuthTopBGNew} resizeMode='contain' />
|
||||||
|
<View style={styles.card}>
|
||||||
|
<Text style={styles.loginTitle}>Login</Text>
|
||||||
|
<CustomTextInput
|
||||||
|
label="Username"
|
||||||
|
placeholder="Enter username"
|
||||||
|
value={username}
|
||||||
|
onChangeText={setUsername}
|
||||||
|
containerStyle={styles.inputWrapper}
|
||||||
|
/>
|
||||||
|
<CustomButton onPress={() => onSubmit()} title={'Continue'} style={styles.btnbg} textstyle={styles.btntext} />
|
||||||
|
<ImageBackground source={IMAGES.AuthBottomBG} style={styles.AuthBottomBG} >
|
||||||
|
<Text style={{ position: 'absolute', textAlign: 'center', alignContent: 'center', alignSelf: 'center', bottom: 0, color: GlobalTheme.colors.gray }}> Copyright CPM India - 2025</Text>
|
||||||
|
{/* <Image source={IMAGES.Logo} style={styles.footerImage} resizeMode="contain"/> */}
|
||||||
|
</ImageBackground>
|
||||||
|
</View>
|
||||||
|
</KeyboardAwareScrollView>
|
||||||
|
<Loader visible={loading} loadingtext={'Loading ...'} />
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Login;
|
||||||
|
|
||||||
@@ -1,97 +1,38 @@
|
|||||||
|
import React, { useState } from 'react';
|
||||||
import React, { useEffect, useState } from 'react';
|
import { View, Text, Image, Alert } from 'react-native';
|
||||||
import { View, Text, Image, Platform, ImageBackground } from 'react-native';
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||||
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
import IMAGES from '../../../constants/Images';
|
||||||
import IMAGES from '../../../constants/Images';
|
import { styles } from './style';
|
||||||
import { styles } from './style';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import CustomTextInput from '../../../components/CustomTextInput';
|
import CustomTextInput from '../../../components/CustomTextInput';
|
||||||
import CustomButton from '../../../components/CustomButton';
|
import CustomButton from '../../../components/CustomButton';
|
||||||
import Loader from '../../../constants/Loader';
|
import Background from '../../../components/Background';
|
||||||
import { ApiURL } from '../../../api/ApiConstant';
|
|
||||||
import { toastError, toastSuccess } from '../../../constants/Toast';
|
const Login = ({ navigation }) => {
|
||||||
import axios from 'axios';
|
const [loading, setLoading] = useState(false);
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
const dispatch = useDispatch();
|
||||||
import { GlobalTheme } from '../../../theme';
|
const [username, setUsername] = useState('');
|
||||||
import Geolocation from '@react-native-community/geolocation';
|
|
||||||
|
return (
|
||||||
|
<Background barcolor="light-content">
|
||||||
const Login = ({ navigation }) => {
|
<KeyboardAwareScrollView style={styles.container} contentContainerStyle={{ justifyContent: 'center', flex: 1 }}>
|
||||||
const [loading, setLoading] = useState(false);
|
<View style={styles.logoContainer}>
|
||||||
const dispatch = useDispatch();
|
<Image style={styles.appLogo} source={IMAGES.AppLogo} />
|
||||||
const [username, setUsername] = useState('');
|
</View>
|
||||||
|
<View style={styles.titleContainer}>
|
||||||
|
<Text style={styles.titleText}>Log In</Text>
|
||||||
// geo loc
|
</View>
|
||||||
useEffect(() => {
|
<View style={{ marginTop: 50 }}>
|
||||||
Geolocation.getCurrentPosition(info => console.log("Location infoooo====>", JSON.stringify(info)));
|
<CustomTextInput label="Username" value={username} onChangeText={setUsername}
|
||||||
}, [])
|
/>
|
||||||
// end geo loc
|
</View>
|
||||||
|
<View style={{ marginTop: 100 }}>
|
||||||
|
<CustomButton onPress={() => navigation.navigate('VerifyOTP')} title={'Login'} style={styles.btnbg} textstyle={styles.btntext} />
|
||||||
const onSubmit = () => {
|
</View>
|
||||||
setLoading(true);
|
</KeyboardAwareScrollView>
|
||||||
getOTP();
|
</Background>
|
||||||
};
|
);
|
||||||
|
};
|
||||||
const getOTP = async () => {
|
|
||||||
try {
|
export default Login;
|
||||||
const params = {
|
|
||||||
"UserId": username
|
|
||||||
};
|
|
||||||
|
|
||||||
const config = {
|
|
||||||
method: 'post',
|
|
||||||
url: ApiURL.getotpApi,
|
|
||||||
headers: {
|
|
||||||
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
data: params
|
|
||||||
};
|
|
||||||
|
|
||||||
const response = await axios.request(config);
|
|
||||||
const res = response.data || [];
|
|
||||||
console.log('OTP is ===> ', res?.SendOTP);
|
|
||||||
if (res?.SendOTP[0].OTP === '0' || res?.SendOTP[0].OTP === 0) {
|
|
||||||
setLoading(false);
|
|
||||||
toastError("Alert", "Invalid User");
|
|
||||||
} else {
|
|
||||||
toastSuccess("Alert", res?.SendOTP[0]?.Messages);
|
|
||||||
navigation.navigate('VerifyOTP', { username: username });
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
// console.log('getotpApi res==>', JSON.stringify(res?.SendOTP[0]));
|
|
||||||
} catch (error) {
|
|
||||||
console.log("❌ OTP API error:", error);
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<SafeAreaView style={styles.container}>
|
|
||||||
<KeyboardAwareScrollView keyboardShouldPersistTaps="handled" enableOnAndroid={true} contentContainerStyle={{ justifyContent: 'center', flexGrow: 1, marginTop: 0 }} style={styles.container}>
|
|
||||||
<View style={{ backgroundColor: GlobalTheme.colors.primary, height: 40 }} />
|
|
||||||
<Image style={styles.appLogo} source={IMAGES.AuthTopBGNew} resizeMode='contain' />
|
|
||||||
<View style={styles.card}>
|
|
||||||
<Text style={styles.loginTitle}>Login</Text>
|
|
||||||
<CustomTextInput
|
|
||||||
label="Username"
|
|
||||||
placeholder="Enter username"
|
|
||||||
value={username}
|
|
||||||
onChangeText={setUsername}
|
|
||||||
containerStyle={styles.inputWrapper}
|
|
||||||
/>
|
|
||||||
<CustomButton onPress={() => onSubmit()} title={'Continue'} style={styles.btnbg} textstyle={styles.btntext} />
|
|
||||||
<ImageBackground source={IMAGES.AuthBottomBG} style={styles.AuthBottomBG} >
|
|
||||||
<Text style={{ position: 'absolute', textAlign: 'center', alignContent: 'center', alignSelf: 'center', bottom: 0, color: GlobalTheme.colors.gray }}> Copyright CPM India - 2025</Text>
|
|
||||||
{/* <Image source={IMAGES.Logo} style={styles.footerImage} resizeMode="contain"/> */}
|
|
||||||
</ImageBackground>
|
|
||||||
</View>
|
|
||||||
</KeyboardAwareScrollView>
|
|
||||||
<Loader visible={loading} loadingtext={'Loading ...'} />
|
|
||||||
</SafeAreaView>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Login;
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,82 +1,120 @@
|
|||||||
import { StyleSheet, Dimensions } from 'react-native';
|
<<<<<<< HEAD
|
||||||
import { GlobalTheme } from '../../../theme';
|
import { StyleSheet } from 'react-native';
|
||||||
import { normalize } from '../../../utilis/responsive';
|
|
||||||
const { width, height } = Dimensions.get('window');
|
import { GlobalTheme, Screen } from '../../../theme';
|
||||||
|
|
||||||
export const styles = StyleSheet.create({
|
export const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: GlobalTheme.colors.primary,
|
// backgroundColor: GlobalTheme.colors.white,
|
||||||
},
|
},
|
||||||
logoContainer: {
|
logoContainer: {
|
||||||
width: '100%',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
appLogo: {
|
appLogo: {
|
||||||
height: normalize(170),
|
height: 200,
|
||||||
width: '100%',
|
width: 200,
|
||||||
resizeMode: 'contain',
|
resizeMode: 'contain',
|
||||||
},
|
},
|
||||||
titleContainer: {
|
titleContainer: {
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
marginBottom: normalize(10),
|
// marginTop: 15,
|
||||||
},
|
},
|
||||||
titleText: {
|
titleText: {
|
||||||
fontSize: normalize(20),
|
fontSize: 25,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
color: GlobalTheme.colors.black,
|
color: GlobalTheme.colors.black,
|
||||||
},
|
},
|
||||||
card: {
|
btnbg: {
|
||||||
backgroundColor: GlobalTheme.colors.white,
|
backgroundColor: GlobalTheme.colors.secondary, borderRadius: GlobalTheme.borderRadius.md
|
||||||
borderTopLeftRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
},
|
||||||
borderTopRightRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
btntext: {
|
||||||
padding: normalize(20),
|
color: GlobalTheme.colors.white,
|
||||||
width: width,
|
fontSize: GlobalTheme.typography.fontSize.medium
|
||||||
alignSelf: 'center',
|
}
|
||||||
// marginTop: normalize(30),
|
|
||||||
shadowColor: '#000',
|
});
|
||||||
shadowOpacity: 0.05,
|
=======
|
||||||
shadowOffset: { width: 0, height: 4 },
|
import { StyleSheet, Dimensions } from 'react-native';
|
||||||
shadowRadius: 8,
|
import { GlobalTheme } from '../../../theme';
|
||||||
elevation: 4,
|
import { normalize } from '../../../utilis/responsive';
|
||||||
flex: 1,
|
const { width, height } = Dimensions.get('window');
|
||||||
},
|
|
||||||
btnbg: {
|
export const styles = StyleSheet.create({
|
||||||
backgroundColor: GlobalTheme.colors.secondary,
|
container: {
|
||||||
borderRadius: GlobalTheme.borderRadius.md,
|
flex: 1,
|
||||||
marginTop: normalize(30),
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
paddingVertical: normalize(12),
|
},
|
||||||
alignItems: 'center',
|
logoContainer: {
|
||||||
},
|
width: '100%',
|
||||||
btntext: {
|
},
|
||||||
color: GlobalTheme.colors.white,
|
appLogo: {
|
||||||
fontSize: normalize(GlobalTheme.typography.fontSize.small),
|
height: normalize(170),
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
width: '100%',
|
||||||
},
|
resizeMode: 'contain',
|
||||||
footer: {
|
},
|
||||||
marginTop: normalize(60),
|
titleContainer: {
|
||||||
alignItems: 'center',
|
alignSelf: 'center',
|
||||||
},
|
marginBottom: normalize(10),
|
||||||
footerImage: {
|
},
|
||||||
width: '100%',
|
titleText: {
|
||||||
height: normalize(80),
|
fontSize: normalize(20),
|
||||||
resizeMode: 'contain',
|
fontWeight: 'bold',
|
||||||
marginTop : normalize(160),
|
color: GlobalTheme.colors.black,
|
||||||
},
|
},
|
||||||
AuthBottomBG: {
|
card: {
|
||||||
width: '100%',
|
backgroundColor: GlobalTheme.colors.white,
|
||||||
resizeMode: 'contain',
|
borderTopLeftRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
||||||
height: normalize(300),
|
borderTopRightRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
||||||
justifyContent: 'center',
|
padding: normalize(20),
|
||||||
},
|
width: width,
|
||||||
loginTitle: {
|
alignSelf: 'center',
|
||||||
color: GlobalTheme.colors.black,
|
// marginTop: normalize(30),
|
||||||
fontSize: normalize(GlobalTheme.typography.fontSize.large),
|
shadowColor: '#000',
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
shadowOpacity: 0.05,
|
||||||
textAlign: 'center',
|
shadowOffset: { width: 0, height: 4 },
|
||||||
marginBottom: normalize(20),
|
shadowRadius: 8,
|
||||||
},
|
elevation: 4,
|
||||||
mainContainer: {
|
flex: 1,
|
||||||
flex: 1,
|
},
|
||||||
backgroundColor: '#EAF0FF',
|
btnbg: {
|
||||||
},
|
backgroundColor: GlobalTheme.colors.secondary,
|
||||||
});
|
borderRadius: GlobalTheme.borderRadius.md,
|
||||||
|
marginTop: normalize(30),
|
||||||
|
paddingVertical: normalize(12),
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
btntext: {
|
||||||
|
color: GlobalTheme.colors.white,
|
||||||
|
fontSize: normalize(GlobalTheme.typography.fontSize.small),
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
marginTop: normalize(60),
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
footerImage: {
|
||||||
|
width: '100%',
|
||||||
|
height: normalize(80),
|
||||||
|
resizeMode: 'contain',
|
||||||
|
marginTop : normalize(160),
|
||||||
|
},
|
||||||
|
AuthBottomBG: {
|
||||||
|
width: '100%',
|
||||||
|
resizeMode: 'contain',
|
||||||
|
height: normalize(300),
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
loginTitle: {
|
||||||
|
color: GlobalTheme.colors.black,
|
||||||
|
fontSize: normalize(GlobalTheme.typography.fontSize.large),
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
|
textAlign: 'center',
|
||||||
|
marginBottom: normalize(20),
|
||||||
|
},
|
||||||
|
mainContainer: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: '#EAF0FF',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { View, Text, Image, Platform, ImageBackground, TextInput } from 'react-native';
|
||||||
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||||
|
import IMAGES from '../../../constants/Images';
|
||||||
|
import { styles } from './style';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import CustomButton from '../../../components/CustomButton';
|
||||||
|
import Loader from '../../../constants/Loader';
|
||||||
|
import { ApiURL } from '../../../api/ApiConstant';
|
||||||
|
import { toastError, toastSuccess } from '../../../constants/Toast';
|
||||||
|
import axios from 'axios';
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
|
import { GlobalTheme } from '../../../theme';
|
||||||
|
import Geolocation from '@react-native-community/geolocation';
|
||||||
|
|
||||||
|
|
||||||
|
const Project = ({ navigation }) => {
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [username, setUsername] = useState('');
|
||||||
|
|
||||||
|
|
||||||
|
// geo loc
|
||||||
|
useEffect(() => {
|
||||||
|
Geolocation.getCurrentPosition(info => console.log("Location infoooo====>", JSON.stringify(info)));
|
||||||
|
}, [])
|
||||||
|
// end geo loc
|
||||||
|
|
||||||
|
|
||||||
|
const onSubmit = () => {
|
||||||
|
// setLoading(true);
|
||||||
|
// getOTP();
|
||||||
|
navigation.navigate("Login")
|
||||||
|
};
|
||||||
|
|
||||||
|
const getOTP = async () => {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
"UserId": username
|
||||||
|
};
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
method: 'post',
|
||||||
|
url: ApiURL.getotpApi,
|
||||||
|
headers: {
|
||||||
|
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: params
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await axios.request(config);
|
||||||
|
const res = response.data || [];
|
||||||
|
console.log('OTP is ===> ', res?.SendOTP);
|
||||||
|
if (res?.SendOTP[0].OTP === '0' || res?.SendOTP[0].OTP === 0) {
|
||||||
|
setLoading(false);
|
||||||
|
toastError("Alert", "Invalid User");
|
||||||
|
} else {
|
||||||
|
toastSuccess("Alert", res?.SendOTP[0]?.Messages);
|
||||||
|
navigation.navigate('VerifyOTP', { username: username });
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
// console.log('getotpApi res==>', JSON.stringify(res?.SendOTP[0]));
|
||||||
|
} catch (error) {
|
||||||
|
console.log("❌ OTP API error:", error);
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<SafeAreaView style={styles.container}>
|
||||||
|
<KeyboardAwareScrollView keyboardShouldPersistTaps="handled" enableOnAndroid={true} contentContainerStyle={{ justifyContent: 'center', flexGrow: 1, marginTop: 0 }} style={styles.container}>
|
||||||
|
{/* <View style={{ backgroundColor: GlobalTheme.colors.primary, height: 40 }} /> */}
|
||||||
|
<Image style={styles.performicsLogo} source={IMAGES.PerformicsLogo} resizeMode='contain' />
|
||||||
|
<Image style={styles.appLogo} source={IMAGES.projectIdImg} resizeMode='contain' />
|
||||||
|
<View style={styles.card}>
|
||||||
|
<View style={{marginTop:25}}>
|
||||||
|
<Text style={[styles.loginTitle, { fontSize: 15, color: '#555555', marginBottom: 10 }]}>Hey There</Text>
|
||||||
|
<Text style={styles.loginTitle}>Enter Your Project Id</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={{ marginTop: 20, height: 50, backgroundColor: '#eee', borderRadius: 10 }}>
|
||||||
|
<TextInput
|
||||||
|
style={{ height: 50, paddingHorizontal: 15 }}
|
||||||
|
placeholder='Enter Project Id'
|
||||||
|
placeholderTextColor={'gray'}
|
||||||
|
keyboardType='numeric'
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<CustomButton onPress={() => onSubmit()} title={'Next'} style={styles.btnbg} textstyle={styles.btntext} />
|
||||||
|
<ImageBackground source={IMAGES.AuthBottomBG} style={styles.AuthBottomBG} >
|
||||||
|
<Text style={{ position: 'absolute', textAlign: 'center', alignContent: 'center', alignSelf: 'center', bottom: 20, color: GlobalTheme.colors.gray }}> Copyright CPM India - 2025</Text>
|
||||||
|
</ImageBackground>
|
||||||
|
</View>
|
||||||
|
</KeyboardAwareScrollView>
|
||||||
|
<Loader visible={loading} loadingtext={'Loading ...'} />
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Project;
|
||||||
|
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
import { StyleSheet, Dimensions } from 'react-native';
|
||||||
|
import { GlobalTheme } from '../../../theme';
|
||||||
|
import { normalize } from '../../../utilis/responsive';
|
||||||
|
const { width, height } = Dimensions.get('window');
|
||||||
|
|
||||||
|
export const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: "#fff",
|
||||||
|
},
|
||||||
|
logoContainer: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
appLogo: {
|
||||||
|
height: normalize(180),
|
||||||
|
width: '100%',
|
||||||
|
resizeMode: 'contain',
|
||||||
|
marginTop: 30,
|
||||||
|
},
|
||||||
|
performicsLogo: {
|
||||||
|
height: normalize(50),
|
||||||
|
width: '55%',
|
||||||
|
resizeMode: 'contain',
|
||||||
|
alignSelf: 'center',
|
||||||
|
marginTop:10,
|
||||||
|
},
|
||||||
|
titleContainer: {
|
||||||
|
alignSelf: 'center',
|
||||||
|
marginBottom: normalize(10),
|
||||||
|
},
|
||||||
|
titleText: {
|
||||||
|
fontSize: normalize(20),
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: GlobalTheme.colors.black,
|
||||||
|
},
|
||||||
|
card: {
|
||||||
|
padding: normalize(25),
|
||||||
|
width: width,
|
||||||
|
alignSelf: 'center',
|
||||||
|
// marginTop: normalize(30),
|
||||||
|
shadowColor: '#000',
|
||||||
|
shadowOpacity: 0.05,
|
||||||
|
shadowOffset: { width: 0, height: 4 },
|
||||||
|
shadowRadius: 8,
|
||||||
|
// elevation: 4,
|
||||||
|
flex: 1,
|
||||||
|
},
|
||||||
|
btnbg: {
|
||||||
|
backgroundColor: GlobalTheme.colors.secondary,
|
||||||
|
borderRadius: GlobalTheme.borderRadius.md,
|
||||||
|
marginTop: normalize(30),
|
||||||
|
paddingVertical: normalize(12),
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
btntext: {
|
||||||
|
color: GlobalTheme.colors.white,
|
||||||
|
fontSize: normalize(GlobalTheme.typography.fontSize.small),
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
marginTop: normalize(60),
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
footerImage: {
|
||||||
|
width: '100%',
|
||||||
|
height: normalize(80),
|
||||||
|
resizeMode: 'contain',
|
||||||
|
marginTop: normalize(160),
|
||||||
|
},
|
||||||
|
AuthBottomBG: {
|
||||||
|
width: '100%',
|
||||||
|
resizeMode: 'contain',
|
||||||
|
height: normalize(210),
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
loginTitle: {
|
||||||
|
color: GlobalTheme.colors.black,
|
||||||
|
fontSize: normalize(GlobalTheme.typography.fontSize.small),
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
|
textAlign: 'center',
|
||||||
|
marginBottom: normalize(20),
|
||||||
|
},
|
||||||
|
mainContainer: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: '#EAF0FF',
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -1,95 +1,201 @@
|
|||||||
import { View, Text, Image, Dimensions, StyleSheet } from 'react-native';
|
<<<<<<< HEAD
|
||||||
import React, { useEffect } from 'react';
|
import {View, Text, Image, Dimensions, StyleSheet} from 'react-native';
|
||||||
import IMAGES from '../../../constants/Images';
|
import React, {useEffect} from 'react';
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
import IMAGES from '../../../constants/Images';
|
||||||
import { useDispatch } from 'react-redux';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
import { setUser } from '../../../redux/slices/userSlice';
|
import {useDispatch} from 'react-redux';
|
||||||
|
|
||||||
const SplashScreen = ({ navigation }) => {
|
const SplashScreen = ({navigation}) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
useEffect(() => {
|
// const get_token = async () => {
|
||||||
const checkLoginStatus = async () => {
|
// let token = await AsyncStorage.getItem('@Collector_User');
|
||||||
try {
|
// console.log(token);
|
||||||
const isuserlogin = await AsyncStorage.getItem('@Dabur_DNA_User');
|
|
||||||
console.log("isuserlogin", isuserlogin)
|
// token = JSON.parse(token);
|
||||||
const parsedUser = JSON.parse(isuserlogin);
|
|
||||||
if (isuserlogin) {
|
// if (token) {
|
||||||
dispatch(setUser(parsedUser));
|
// dispatch(setUser(token));
|
||||||
navigation.reset({
|
// navigation.reset({
|
||||||
index: 0,
|
// index: 0,
|
||||||
routes: [{ name: 'Welcome' }],
|
// routes: [{name: 'mainStack', params: {screen: 'dashboard'}}],
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
navigation.reset({
|
// setTimeout(() => {
|
||||||
index: 0,
|
// navigation.reset({
|
||||||
routes: [{ name: 'Login' }],
|
// index: 0,
|
||||||
});
|
// routes: [{name: 'Login'}],
|
||||||
}
|
// });
|
||||||
} catch (error) {
|
// }, 2000);
|
||||||
console.error('Error checking login status:', error);
|
// }
|
||||||
}
|
// };
|
||||||
};
|
|
||||||
|
useEffect(() => {
|
||||||
checkLoginStatus();
|
// get_token();
|
||||||
}, []);
|
setTimeout(() => {
|
||||||
|
navigation.reset({
|
||||||
|
index: 0,
|
||||||
return (
|
routes: [{name: 'Login'}],
|
||||||
<View style={styles.container}>
|
});
|
||||||
<View style={styles.backgroundContainer}>
|
}, 4000);
|
||||||
<Image
|
}, []);
|
||||||
source={IMAGES.splashFullImg}
|
|
||||||
resizeMode="stretch"
|
return (
|
||||||
style={styles.backdrop}
|
<View style={styles.container}>
|
||||||
/>
|
<View style={styles.backgroundContainer}>
|
||||||
</View>
|
<Image
|
||||||
<View style={styles.overlay}>
|
source={IMAGES.splashFullImg}
|
||||||
<Image style={styles.logo} source={IMAGES.AppLogo} />
|
resizeMode="stretch"
|
||||||
</View>
|
style={styles.backdrop}
|
||||||
</View>
|
/>
|
||||||
);
|
</View>
|
||||||
};
|
<View style={styles.overlay}>
|
||||||
|
<Image style={styles.logo} source={IMAGES.AppLogo} />
|
||||||
export default SplashScreen;
|
</View>
|
||||||
|
</View>
|
||||||
const styles = StyleSheet.create({
|
);
|
||||||
backgroundContainer: {
|
};
|
||||||
position: 'absolute',
|
|
||||||
top: 0,
|
export default SplashScreen;
|
||||||
bottom: 0,
|
|
||||||
left: 0,
|
const styles = StyleSheet.create({
|
||||||
right: 0,
|
backgroundContainer: {
|
||||||
},
|
position: 'absolute',
|
||||||
container: {
|
top: 0,
|
||||||
flex: 1,
|
bottom: 0,
|
||||||
alignItems: 'center',
|
left: 0,
|
||||||
justifyContent: 'center',
|
right: 0,
|
||||||
},
|
},
|
||||||
overlay: {
|
container: {
|
||||||
opacity: 1,
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
logo: {
|
overlay: {
|
||||||
backgroundColor: 'rgba(0,0,0,0)',
|
opacity: 1,
|
||||||
height: 200,
|
alignItems: 'center',
|
||||||
width: 200,
|
justifyContent: 'center',
|
||||||
overflow: 'hidden',
|
},
|
||||||
resizeMode: 'contain',
|
logo: {
|
||||||
marginTop: 5,
|
backgroundColor: 'rgba(0,0,0,0)',
|
||||||
justifyContent: 'center',
|
height: 200,
|
||||||
},
|
width: 200,
|
||||||
backdrop: {
|
overflow: 'hidden',
|
||||||
flex: 1,
|
resizeMode: 'contain',
|
||||||
width: '100%',
|
marginTop: 5,
|
||||||
height: '100%',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
headline: {
|
backdrop: {
|
||||||
fontSize: 18,
|
flex: 1,
|
||||||
textAlign: 'center',
|
width: '100%',
|
||||||
backgroundColor: 'black',
|
height: '100%',
|
||||||
color: 'white',
|
},
|
||||||
//borderWidth:1
|
headline: {
|
||||||
},
|
fontSize: 18,
|
||||||
});
|
textAlign: 'center',
|
||||||
|
backgroundColor: 'black',
|
||||||
|
color: 'white',
|
||||||
|
//borderWidth:1
|
||||||
|
},
|
||||||
|
});
|
||||||
|
=======
|
||||||
|
import { View, Text, Image, Dimensions, StyleSheet } from 'react-native';
|
||||||
|
import React, { useEffect } from 'react';
|
||||||
|
import IMAGES from '../../../constants/Images';
|
||||||
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import { setUser } from '../../../redux/slices/userSlice';
|
||||||
|
|
||||||
|
const SplashScreen = ({ navigation }) => {
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
checkLoginStatus();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const checkLoginStatus = async () => {
|
||||||
|
try {
|
||||||
|
const isuserlogin = await AsyncStorage.getItem('@Dabur_DNA_User');
|
||||||
|
console.log("isuserlogin", isuserlogin)
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={styles.container}>
|
||||||
|
<View style={styles.backgroundContainer}>
|
||||||
|
<Image
|
||||||
|
source={IMAGES.splashFullImg}
|
||||||
|
resizeMode="stretch"
|
||||||
|
style={styles.backdrop}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.overlay}>
|
||||||
|
<Image style={styles.logo} source={IMAGES.AppLogo} />
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SplashScreen;
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
backgroundContainer: {
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
overlay: {
|
||||||
|
opacity: 1,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
logo: {
|
||||||
|
backgroundColor: 'rgba(0,0,0,0)',
|
||||||
|
height: 200,
|
||||||
|
width: 200,
|
||||||
|
overflow: 'hidden',
|
||||||
|
resizeMode: 'contain',
|
||||||
|
marginTop: 5,
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
backdrop: {
|
||||||
|
flex: 1,
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
},
|
||||||
|
headline: {
|
||||||
|
fontSize: 18,
|
||||||
|
textAlign: 'center',
|
||||||
|
backgroundColor: 'black',
|
||||||
|
color: 'white',
|
||||||
|
//borderWidth:1
|
||||||
|
},
|
||||||
|
});
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,219 +1,346 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
<<<<<<< HEAD
|
||||||
import { View, Text, Image, TouchableOpacity, ImageBackground } from 'react-native';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
import { View, Text, Image, Alert, TouchableOpacity } from 'react-native';
|
||||||
import { useDispatch } from 'react-redux';
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||||
import { OtpInput } from "react-native-otp-entry";
|
import { useDispatch } from 'react-redux';
|
||||||
import CustomButton from '../../../components/CustomButton';
|
import { OtpInput } from "react-native-otp-entry";
|
||||||
import Background from '../../../components/Background';
|
import CustomButton from '../../../components/CustomButton';
|
||||||
import IMAGES from '../../../constants/Images';
|
import Background from '../../../components/Background';
|
||||||
import { GlobalTheme } from '../../../theme';
|
import IMAGES from '../../../constants/Images';
|
||||||
import { styles } from './style';
|
import { GlobalTheme } from '../../../theme';
|
||||||
import { toastError, toastSuccess } from '../../../constants/Toast';
|
import { styles } from './style';
|
||||||
import Loader from '../../../constants/Loader';
|
import { toastError, toastSuccess } from '../../../constants/Toast';
|
||||||
import { ApiURL } from '../../../api/ApiConstant';
|
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
const VerifyOTP = ({ navigation }) => {
|
||||||
import { setUser } from '../../../redux/slices/userSlice';
|
const [loading, setLoading] = useState(false);
|
||||||
import axios from 'axios';
|
const dispatch = useDispatch();
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
const [otp, setOTP] = useState('');
|
||||||
|
const [timer, setTimer] = useState(300); // 5 minutes = 300 seconds
|
||||||
const VerifyOTP = ({ navigation, route }) => {
|
const [showResend, setShowResend] = useState(false);
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const dispatch = useDispatch();
|
// Countdown effect
|
||||||
const [otp, setOTP] = useState('');
|
useEffect(() => {
|
||||||
const [timer, setTimer] = useState(300); // 5 minutes = 300 seconds
|
if (timer === 0) {
|
||||||
const [showResend, setShowResend] = useState(false);
|
setShowResend(true);
|
||||||
|
return;
|
||||||
const username = route.params.username;
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
const interval = setInterval(() => {
|
||||||
if (timer === 0) {
|
setTimer(prev => prev - 1);
|
||||||
setShowResend(true);
|
}, 1000);
|
||||||
return;
|
|
||||||
}
|
return () => clearInterval(interval);
|
||||||
|
}, [timer]);
|
||||||
const interval = setInterval(() => {
|
|
||||||
setTimer(prev => prev - 1);
|
const formatTime = (secs) => {
|
||||||
}, 1000);
|
const minutes = Math.floor(secs / 60);
|
||||||
|
const seconds = secs % 60;
|
||||||
return () => clearInterval(interval);
|
return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
|
||||||
}, [timer]);
|
};
|
||||||
|
|
||||||
const formatTime = (secs) => {
|
const handle_validate = () => {
|
||||||
const minutes = Math.floor(secs / 60);
|
if (otp.length < 6) {
|
||||||
const seconds = secs % 60;
|
toastError('Alert', "Please enter 6 digit PIN");
|
||||||
return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
|
} else {
|
||||||
};
|
navigation.navigate('StoreInfo');
|
||||||
|
}
|
||||||
const handle_validate = () => {
|
}
|
||||||
if (otp.length < 6) {
|
|
||||||
toastError('Alert', "Please enter 6 digit PIN");
|
const resend_OTP = () => {
|
||||||
} else {
|
setTimer(300);
|
||||||
onSubmit();
|
setShowResend(false);
|
||||||
}
|
toastSuccess('Resend OTP Successfully.')
|
||||||
}
|
|
||||||
|
}
|
||||||
const resendOTP = async () => {
|
|
||||||
try {
|
return (
|
||||||
const params = {
|
<Background barcolor="light-content">
|
||||||
"UserId": username
|
<KeyboardAwareScrollView style={styles.container} contentContainerStyle={{ justifyContent: 'center', flex: 1 }}>
|
||||||
}
|
<View style={styles.logoContainer}>
|
||||||
const config = {
|
<Image style={styles.appLogo} source={IMAGES.AppLogo} />
|
||||||
method: 'post',
|
</View>
|
||||||
url: ApiURL.getotpApi,
|
<View style={styles.titleContainer}>
|
||||||
headers: {
|
<Text style={styles.titleText}>Verify OTP</Text>
|
||||||
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
</View>
|
||||||
'Content-Type': 'application/json'
|
<View style={{ marginTop: 50 }}>
|
||||||
},
|
<OtpInput
|
||||||
data: params
|
numberOfDigits={6}
|
||||||
};
|
focusColor={GlobalTheme.colors.primary}
|
||||||
const response = await axios.request(config);
|
autoFocus={false}
|
||||||
const res = response.data || [];
|
hideStick={true}
|
||||||
// console.log('storeSearchApi====>', res);
|
placeholder=""
|
||||||
if (res?.SendOTP[0].OTP === '0' || res?.SendOTP[0].OTP === 0) {
|
blurOnFilled={true}
|
||||||
toastError("Alert", res?.SendOTP[0]?.Messages)
|
disabled={false}
|
||||||
} else {
|
type="numeric"
|
||||||
toastSuccess("Alert", res?.SendOTP[0]?.Messages)
|
secureTextEntry={false}
|
||||||
navigation.navigate('VerifyOTP', { username: username });
|
focusStickBlinkingDuration={500}
|
||||||
}
|
onFocus={() => console.log("Focused")}
|
||||||
// console.log('getotpApi res==>', JSON.stringify(res?.SendOTP[0]));
|
onBlur={() => console.log("Blurred")}
|
||||||
// setLoading(false)
|
onTextChange={(text) => setOTP(text)}
|
||||||
} catch (error) {
|
onFilled={(text) => {
|
||||||
// setLoading(false)
|
setOTP(text);
|
||||||
console.log("❌ Filter API error:", error);
|
console.log(`OTP is ${text}`);
|
||||||
}
|
}}
|
||||||
};
|
textInputProps={{
|
||||||
|
accessibilityLabel: "One-Time Password",
|
||||||
const resend_OTP = () => {
|
}}
|
||||||
setTimer(300);
|
textProps={{
|
||||||
setShowResend(false);
|
accessibilityRole: "text",
|
||||||
toastSuccess('Resend OTP Successfully.')
|
accessibilityLabel: "OTP digit",
|
||||||
resendOTP();
|
allowFontScaling: false,
|
||||||
}
|
}}
|
||||||
|
theme={{
|
||||||
const onSubmit = () => {
|
containerStyle: styles.container,
|
||||||
setLoading(true)
|
pinCodeContainerStyle: styles.pinCodeContainer,
|
||||||
VerifyOTP();
|
pinCodeTextStyle: styles.pinCodeText,
|
||||||
setTimeout(() => {
|
focusStickStyle: styles.focusStick,
|
||||||
setLoading(false)
|
focusedPinCodeContainerStyle: styles.activePinCodeContainer,
|
||||||
}, 100);
|
placeholderTextStyle: styles.placeholderText,
|
||||||
}
|
filledPinCodeContainerStyle: styles.filledPinCodeContainer,
|
||||||
|
disabledPinCodeContainerStyle: styles.disabledPinCodeContainer,
|
||||||
const VerifyOTP = async () => {
|
}}
|
||||||
try {
|
/>
|
||||||
const params = {
|
|
||||||
"UserId": username,
|
</View>
|
||||||
"OTP": otp
|
<View style={{ marginTop: 100 }}>
|
||||||
}
|
<CustomButton onPress={handle_validate} title={'Verify'} style={styles.btnbg} textstyle={styles.btntext} />
|
||||||
|
</View>
|
||||||
const config = {
|
|
||||||
method: 'post',
|
<View style={{ alignItems: 'center', marginTop: 20 }}>
|
||||||
url: ApiURL.verifyotpApi,
|
{!showResend ? (
|
||||||
headers: {
|
<Text style={{ color: GlobalTheme.colors.darkGray }}>Resend OTP in {formatTime(timer)}</Text>
|
||||||
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
) : (
|
||||||
'Content-Type': 'application/json'
|
<TouchableOpacity onPress={resend_OTP}>
|
||||||
},
|
<Text style={styles.resendOTP} >
|
||||||
data: params
|
Resend OTP
|
||||||
};
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
const response = await axios.request(config);
|
)}
|
||||||
const res = response.data || [];
|
</View>
|
||||||
|
</KeyboardAwareScrollView>
|
||||||
if (res?.AuthenticateOTP[0].Message == 'OTP is matched') {
|
</Background>
|
||||||
toastSuccess("Alert", res?.AuthenticateOTP[0]?.Message || "Alert", "Login Successfully.")
|
);
|
||||||
await AsyncStorage.setItem('@Dabur_DNA_User', JSON.stringify(res?.AuthenticateOTP[0]));
|
};
|
||||||
dispatch(setUser(res?.AuthenticateOTP[0]));
|
|
||||||
navigation.reset({ index: 0, routes: [{ name: 'Welcome' }] })
|
export default VerifyOTP;
|
||||||
} else {
|
=======
|
||||||
toastError("Alert", res?.AuthenticateOTP[0]?.Message);
|
import React, { useEffect, useState } from 'react';
|
||||||
}
|
import { View, Text, Image, TouchableOpacity, ImageBackground } from 'react-native';
|
||||||
} catch (error) {
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||||
// setLoading(false)
|
import { useDispatch } from 'react-redux';
|
||||||
console.log("❌ Filter API error:", error);
|
import { OtpInput } from "react-native-otp-entry";
|
||||||
}
|
import CustomButton from '../../../components/CustomButton';
|
||||||
|
import Background from '../../../components/Background';
|
||||||
}
|
import IMAGES from '../../../constants/Images';
|
||||||
|
import { GlobalTheme } from '../../../theme';
|
||||||
return (
|
import { styles } from './style';
|
||||||
<SafeAreaView style={styles.container}>
|
import { toastError, toastSuccess } from '../../../constants/Toast';
|
||||||
<TouchableOpacity onPress={() => navigation.goBack()}>
|
import Loader from '../../../constants/Loader';
|
||||||
<View style={styles.backTextView}>
|
import { ApiURL } from '../../../api/ApiConstant';
|
||||||
<Image source={IMAGES.leftArrowIcon} style={styles.iconStyle} />
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
<Text style={styles.backIconText}>Back</Text>
|
import { setUser } from '../../../redux/slices/userSlice';
|
||||||
</View>
|
import axios from 'axios';
|
||||||
</TouchableOpacity>
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
<KeyboardAwareScrollView keyboardShouldPersistTaps="handled" enableOnAndroid={true} style={styles.container} contentContainerStyle={{ justifyContent: 'center', flex: 1 }}>
|
|
||||||
<View style={{ backgroundColor: GlobalTheme.colors.primary, height: 40 }} />
|
const VerifyOTP = ({ navigation, route }) => {
|
||||||
<Image style={styles.appLogo} source={IMAGES.AuthTopBGNew} resizeMode='contain' />
|
const [loading, setLoading] = useState(false);
|
||||||
<View style={styles.card}>
|
const dispatch = useDispatch();
|
||||||
<View style={styles.titleContainer}>
|
const [otp, setOTP] = useState('');
|
||||||
<Text style={styles.titleText}>Enter the OTP sent to your {"\n"} registered contact</Text>
|
const [timer, setTimer] = useState(300); // 5 minutes = 300 seconds
|
||||||
</View>
|
const [showResend, setShowResend] = useState(false);
|
||||||
<View style={{ marginTop: 50 }}>
|
|
||||||
<OtpInput
|
const username = route.params.username;
|
||||||
numberOfDigits={6}
|
|
||||||
focusColor={GlobalTheme.colors.primary}
|
useEffect(() => {
|
||||||
autoFocus={false}
|
if (timer === 0) {
|
||||||
hideStick={true}
|
setShowResend(true);
|
||||||
placeholder=""
|
return;
|
||||||
blurOnFilled={true}
|
}
|
||||||
disabled={false}
|
|
||||||
type="numeric"
|
const interval = setInterval(() => {
|
||||||
secureTextEntry={false}
|
setTimer(prev => prev - 1);
|
||||||
focusStickBlinkingDuration={500}
|
}, 1000);
|
||||||
// onFocus={() => console.log("Focused")}
|
|
||||||
// onBlur={() => console.log("Blurred")}
|
return () => clearInterval(interval);
|
||||||
onTextChange={(text) => setOTP(text)}
|
}, [timer]);
|
||||||
onFilled={(text) => {
|
|
||||||
setOTP(text);
|
const formatTime = (secs) => {
|
||||||
console.log(`OTP is ${text}`);
|
const minutes = Math.floor(secs / 60);
|
||||||
}}
|
const seconds = secs % 60;
|
||||||
textInputProps={{
|
return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
|
||||||
accessibilityLabel: "One-Time Password",
|
};
|
||||||
}}
|
|
||||||
textProps={{
|
const handle_validate = () => {
|
||||||
accessibilityRole: "text",
|
if (otp.length < 6) {
|
||||||
accessibilityLabel: "OTP digit",
|
toastError('Alert', "Please enter 6 digit PIN");
|
||||||
allowFontScaling: false,
|
} else {
|
||||||
}}
|
onSubmit();
|
||||||
theme={{
|
}
|
||||||
containerStyle: styles.container,
|
}
|
||||||
pinCodeContainerStyle: styles.pinCodeContainer,
|
|
||||||
pinCodeTextStyle: styles.pinCodeText,
|
const resendOTP = async () => {
|
||||||
focusStickStyle: styles.focusStick,
|
try {
|
||||||
focusedPinCodeContainerStyle: styles.activePinCodeContainer,
|
const params = {
|
||||||
placeholderTextStyle: styles.placeholderText,
|
"UserId": username
|
||||||
filledPinCodeContainerStyle: styles.filledPinCodeContainer,
|
}
|
||||||
disabledPinCodeContainerStyle: styles.disabledPinCodeContainer,
|
const config = {
|
||||||
}}
|
method: 'post',
|
||||||
/>
|
url: ApiURL.getotpApi,
|
||||||
|
headers: {
|
||||||
</View>
|
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
||||||
<View style={{ marginTop: 100}}>
|
'Content-Type': 'application/json'
|
||||||
<CustomButton onPress={handle_validate} title={'Verify'} style={styles.btnbg} textstyle={styles.btntext} />
|
},
|
||||||
</View>
|
data: params
|
||||||
|
};
|
||||||
<View style={{ alignItems: 'center', marginTop: 20 }}>
|
const response = await axios.request(config);
|
||||||
{!showResend ? (
|
const res = response.data || [];
|
||||||
<Text style={{ color: GlobalTheme.colors.darkGray }}>Resend OTP in {formatTime(timer)}</Text>
|
// console.log('storeSearchApi====>', res);
|
||||||
) : (
|
if (res?.SendOTP[0].OTP === '0' || res?.SendOTP[0].OTP === 0) {
|
||||||
<TouchableOpacity onPress={resend_OTP}>
|
toastError("Alert", res?.SendOTP[0]?.Messages)
|
||||||
<Text style={styles.resendOTP} >
|
} else {
|
||||||
Resend OTP
|
toastSuccess("Alert", res?.SendOTP[0]?.Messages)
|
||||||
</Text>
|
navigation.navigate('VerifyOTP', { username: username });
|
||||||
</TouchableOpacity>
|
}
|
||||||
)}
|
// console.log('getotpApi res==>', JSON.stringify(res?.SendOTP[0]));
|
||||||
</View>
|
// setLoading(false)
|
||||||
|
} catch (error) {
|
||||||
<ImageBackground source={IMAGES.AuthBottomBG} style={styles.AuthBottomBG} >
|
// setLoading(false)
|
||||||
{/* <Image source={IMAGES.Logo} style={styles.footerImage} resizeMode="contain"/> */}
|
console.log("❌ Filter API error:", error);
|
||||||
<Text style={{ position : 'absolute', textAlign:'center', alignContent:'center',alignSelf:'center', bottom:0 , color : GlobalTheme.colors.gray}}> Copyright CPM India - 2025</Text>
|
}
|
||||||
</ImageBackground>
|
};
|
||||||
</View>
|
|
||||||
|
const resend_OTP = () => {
|
||||||
</KeyboardAwareScrollView>
|
setTimer(300);
|
||||||
<Loader visible={loading} />
|
setShowResend(false);
|
||||||
</SafeAreaView>
|
toastSuccess('Resend OTP Successfully.')
|
||||||
);
|
resendOTP();
|
||||||
};
|
}
|
||||||
|
|
||||||
export default VerifyOTP;
|
const onSubmit = () => {
|
||||||
|
setLoading(true)
|
||||||
|
VerifyOTP();
|
||||||
|
setTimeout(() => {
|
||||||
|
setLoading(false)
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
const VerifyOTP = async () => {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
"UserId": username,
|
||||||
|
"OTP": otp
|
||||||
|
}
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
method: 'post',
|
||||||
|
url: ApiURL.verifyotpApi,
|
||||||
|
headers: {
|
||||||
|
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: params
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await axios.request(config);
|
||||||
|
const res = response.data || [];
|
||||||
|
|
||||||
|
if (res?.AuthenticateOTP[0].Message == 'OTP is matched') {
|
||||||
|
toastSuccess("Alert", res?.AuthenticateOTP[0]?.Message || "Alert", "Login Successfully.")
|
||||||
|
await AsyncStorage.setItem('@Dabur_DNA_User', JSON.stringify(res?.AuthenticateOTP[0]));
|
||||||
|
dispatch(setUser(res?.AuthenticateOTP[0]));
|
||||||
|
navigation.reset({ index: 0, routes: [{ name: 'Welcome' }] })
|
||||||
|
} else {
|
||||||
|
toastError("Alert", res?.AuthenticateOTP[0]?.Message);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// setLoading(false)
|
||||||
|
console.log("❌ Filter API error:", error);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SafeAreaView style={styles.container}>
|
||||||
|
<TouchableOpacity onPress={() => navigation.goBack()}>
|
||||||
|
<View style={styles.backTextView}>
|
||||||
|
<Image source={IMAGES.leftArrowIcon} style={styles.iconStyle} />
|
||||||
|
<Text style={styles.backIconText}>Back</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
<KeyboardAwareScrollView keyboardShouldPersistTaps="handled" enableOnAndroid={true} style={styles.container} contentContainerStyle={{ justifyContent: 'center', flex: 1 }}>
|
||||||
|
<View style={{ backgroundColor: GlobalTheme.colors.primary, height: 40 }} />
|
||||||
|
<Image style={styles.appLogo} source={IMAGES.AuthTopBGNew} resizeMode='contain' />
|
||||||
|
<View style={styles.card}>
|
||||||
|
<View style={styles.titleContainer}>
|
||||||
|
<Text style={styles.titleText}>Enter the OTP sent to your {"\n"} registered contact</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{ marginTop: 50 }}>
|
||||||
|
<OtpInput
|
||||||
|
numberOfDigits={6}
|
||||||
|
focusColor={GlobalTheme.colors.primary}
|
||||||
|
autoFocus={false}
|
||||||
|
hideStick={true}
|
||||||
|
placeholder=""
|
||||||
|
blurOnFilled={true}
|
||||||
|
disabled={false}
|
||||||
|
type="numeric"
|
||||||
|
secureTextEntry={false}
|
||||||
|
focusStickBlinkingDuration={500}
|
||||||
|
// onFocus={() => console.log("Focused")}
|
||||||
|
// onBlur={() => console.log("Blurred")}
|
||||||
|
onTextChange={(text) => setOTP(text)}
|
||||||
|
onFilled={(text) => {
|
||||||
|
setOTP(text);
|
||||||
|
console.log(`OTP is ${text}`);
|
||||||
|
}}
|
||||||
|
textInputProps={{
|
||||||
|
accessibilityLabel: "One-Time Password",
|
||||||
|
}}
|
||||||
|
textProps={{
|
||||||
|
accessibilityRole: "text",
|
||||||
|
accessibilityLabel: "OTP digit",
|
||||||
|
allowFontScaling: false,
|
||||||
|
}}
|
||||||
|
theme={{
|
||||||
|
containerStyle: styles.container,
|
||||||
|
pinCodeContainerStyle: styles.pinCodeContainer,
|
||||||
|
pinCodeTextStyle: styles.pinCodeText,
|
||||||
|
focusStickStyle: styles.focusStick,
|
||||||
|
focusedPinCodeContainerStyle: styles.activePinCodeContainer,
|
||||||
|
placeholderTextStyle: styles.placeholderText,
|
||||||
|
filledPinCodeContainerStyle: styles.filledPinCodeContainer,
|
||||||
|
disabledPinCodeContainerStyle: styles.disabledPinCodeContainer,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
<View style={{ marginTop: 100}}>
|
||||||
|
<CustomButton onPress={handle_validate} title={'Verify'} style={styles.btnbg} textstyle={styles.btntext} />
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={{ alignItems: 'center', marginTop: 20 }}>
|
||||||
|
{!showResend ? (
|
||||||
|
<Text style={{ color: GlobalTheme.colors.darkGray }}>Resend OTP in {formatTime(timer)}</Text>
|
||||||
|
) : (
|
||||||
|
<TouchableOpacity onPress={resend_OTP}>
|
||||||
|
<Text style={styles.resendOTP} >
|
||||||
|
Resend OTP
|
||||||
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<ImageBackground source={IMAGES.AuthBottomBG} style={styles.AuthBottomBG} >
|
||||||
|
{/* <Image source={IMAGES.Logo} style={styles.footerImage} resizeMode="contain"/> */}
|
||||||
|
<Text style={{ position : 'absolute', textAlign:'center', alignContent:'center',alignSelf:'center', bottom:0 , color : GlobalTheme.colors.gray}}> Copyright CPM India - 2025</Text>
|
||||||
|
</ImageBackground>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
</KeyboardAwareScrollView>
|
||||||
|
<Loader visible={loading} />
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default VerifyOTP;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,149 +1,253 @@
|
|||||||
import { Dimensions, StyleSheet } from 'react-native';
|
<<<<<<< HEAD
|
||||||
import { GlobalTheme, Screen } from '../../../theme';
|
import { StyleSheet } from 'react-native';
|
||||||
import { normalize } from '../../../utilis/responsive';
|
|
||||||
|
import { GlobalTheme, Screen } from '../../../theme';
|
||||||
const { width, height } = Dimensions.get('window');
|
|
||||||
|
export const styles = StyleSheet.create({
|
||||||
export const styles = StyleSheet.create({
|
container: {
|
||||||
container: {
|
flex: 1,
|
||||||
// flex: 1,
|
},
|
||||||
// paddingHorizontal: 5
|
logoContainer: {
|
||||||
flex: 1,
|
alignItems: 'center',
|
||||||
backgroundColor: GlobalTheme.colors.primary,
|
},
|
||||||
},
|
appLogo: {
|
||||||
logoContainer: {
|
height: 200,
|
||||||
alignItems: 'center',
|
width: 200,
|
||||||
},
|
resizeMode: 'contain',
|
||||||
appLogo: {
|
},
|
||||||
height: normalize(170),
|
titleContainer: {
|
||||||
width: '100%',
|
alignSelf: 'center',
|
||||||
resizeMode: 'contain',
|
// marginTop: 15,
|
||||||
marginTop: 40
|
},
|
||||||
},
|
titleText: {
|
||||||
titleContainer: {
|
fontSize: 25,
|
||||||
alignSelf: 'center',
|
fontWeight: 'bold',
|
||||||
},
|
color: GlobalTheme.colors.black,
|
||||||
titleText: {
|
},
|
||||||
fontSize: 18,
|
btnbg: {
|
||||||
fontWeight: '500',
|
backgroundColor: GlobalTheme.colors.secondary, borderRadius: GlobalTheme.borderRadius.md
|
||||||
color: GlobalTheme.colors.black,
|
},
|
||||||
textAlign: 'center'
|
btntext: {
|
||||||
},
|
color: GlobalTheme.colors.white,
|
||||||
btnbg: {
|
fontSize: GlobalTheme.typography.fontSize.medium
|
||||||
backgroundColor: GlobalTheme.colors.secondary, borderRadius: GlobalTheme.borderRadius.md
|
},
|
||||||
},
|
otp_inputStyle: {
|
||||||
btntext: {
|
textAlign: 'center',
|
||||||
color: GlobalTheme.colors.white,
|
backgroundColor: 'red',
|
||||||
fontSize: GlobalTheme.typography.fontSize.medium
|
width: 100,
|
||||||
},
|
borderRadius: 4,
|
||||||
otp_inputStyle: {
|
paddingVertical: 10,
|
||||||
textAlign: 'center',
|
paddingHorizontal: 15,
|
||||||
backgroundColor: 'red',
|
height: 50,
|
||||||
width: 100,
|
color: 'red',
|
||||||
borderRadius: 4,
|
marginBottom: 10,
|
||||||
paddingVertical: 10,
|
marginRight: 10,
|
||||||
paddingHorizontal: 15,
|
fontSize: 25,
|
||||||
height: 50,
|
|
||||||
color: 'red',
|
},
|
||||||
marginBottom: 10,
|
// OTP
|
||||||
marginRight: 10,
|
pinCodeContainer: {
|
||||||
fontSize: 25,
|
width: 45,
|
||||||
},
|
height: 55,
|
||||||
// OTP
|
borderWidth: 1,
|
||||||
pinCodeContainer: {
|
borderColor: '#D8E3F1',
|
||||||
width: 45,
|
borderRadius: 8,
|
||||||
height: 55,
|
justifyContent: 'center',
|
||||||
borderWidth: 1,
|
alignItems: 'center',
|
||||||
borderColor: '#D8E3F1',
|
backgroundColor: '#fff',
|
||||||
borderRadius: 8,
|
},
|
||||||
justifyContent: 'center',
|
activePinCodeContainer: {
|
||||||
alignItems: 'center',
|
borderColor: GlobalTheme.colors.primary,
|
||||||
backgroundColor: '#fff',
|
borderWidth: 2,
|
||||||
},
|
},
|
||||||
activePinCodeContainer: {
|
filledPinCodeContainer: {
|
||||||
borderColor: GlobalTheme.colors.primary,
|
backgroundColor: '#D8E3F1',
|
||||||
borderWidth: 2,
|
},
|
||||||
},
|
disabledPinCodeContainer: {
|
||||||
filledPinCodeContainer: {
|
backgroundColor: '#f0f0f0',
|
||||||
backgroundColor: '#D8E3F1',
|
borderColor: '#ddd',
|
||||||
},
|
},
|
||||||
disabledPinCodeContainer: {
|
pinCodeText: {
|
||||||
backgroundColor: '#f0f0f0',
|
fontSize: 20,
|
||||||
borderColor: '#ddd',
|
fontWeight: 'bold',
|
||||||
},
|
color: '#333',
|
||||||
pinCodeText: {
|
},
|
||||||
fontSize: 20,
|
focusStick: {
|
||||||
fontWeight: 'bold',
|
height: 2,
|
||||||
color: '#333',
|
width: 20,
|
||||||
},
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
focusStick: {
|
marginTop: 4,
|
||||||
height: 2,
|
},
|
||||||
width: 20,
|
placeholderText: {
|
||||||
backgroundColor: GlobalTheme.colors.primary,
|
color: '#aaa',
|
||||||
marginTop: 4,
|
fontSize: 18,
|
||||||
},
|
},
|
||||||
placeholderText: {
|
resendText: {
|
||||||
color: '#aaa',
|
color: GlobalTheme.colors.primary,
|
||||||
fontSize: 18,
|
fontWeight: 'bold',
|
||||||
},
|
fontSize: 14,
|
||||||
resendText: {
|
marginTop: 20,
|
||||||
color: GlobalTheme.colors.primary,
|
textAlign: 'center',
|
||||||
fontWeight: 'bold',
|
},
|
||||||
fontSize: 14,
|
timerText: {
|
||||||
marginTop: 20,
|
color: 'gray',
|
||||||
textAlign: 'center',
|
fontSize: 14,
|
||||||
},
|
marginTop: 20,
|
||||||
timerText: {
|
textAlign: 'center',
|
||||||
color: 'gray',
|
},
|
||||||
fontSize: 14,
|
resendOTP:{
|
||||||
marginTop: 20,
|
color: GlobalTheme.colors.secondary, fontWeight: GlobalTheme.typography.fontWeight.medium , fontSize : GlobalTheme.typography.fontSize.small
|
||||||
textAlign: 'center',
|
}
|
||||||
},
|
|
||||||
resendOTP: {
|
});
|
||||||
color: GlobalTheme.colors.secondary, fontWeight: GlobalTheme.typography.fontWeight.medium, fontSize: GlobalTheme.typography.fontSize.small
|
=======
|
||||||
},
|
import { Dimensions, StyleSheet } from 'react-native';
|
||||||
iconStyle: {
|
import { GlobalTheme, Screen } from '../../../theme';
|
||||||
height: 20,
|
import { normalize } from '../../../utilis/responsive';
|
||||||
width: 20,
|
|
||||||
resizeMode: 'contain',
|
const { width, height } = Dimensions.get('window');
|
||||||
tintColor: GlobalTheme.colors.white
|
|
||||||
},
|
export const styles = StyleSheet.create({
|
||||||
backIconText: { fontSize: GlobalTheme.typography.fontSize.small, color: GlobalTheme.colors.white, fontWeight: GlobalTheme.typography.fontWeight.medium, marginLeft: 8 },
|
container: {
|
||||||
backTextView: {
|
// flex: 1,
|
||||||
flexDirection: 'row', alignItems: 'center', paddingTop: 20, paddingHorizontal: 10
|
// paddingHorizontal: 5
|
||||||
},
|
flex: 1,
|
||||||
card: {
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
backgroundColor: GlobalTheme.colors.white,
|
},
|
||||||
borderTopLeftRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
logoContainer: {
|
||||||
borderTopRightRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
alignItems: 'center',
|
||||||
padding: normalize(20),
|
},
|
||||||
width: width,
|
appLogo: {
|
||||||
alignSelf: 'center',
|
height: normalize(170),
|
||||||
// marginTop: normalize(30),
|
width: '100%',
|
||||||
shadowColor: '#000',
|
resizeMode: 'contain',
|
||||||
shadowOpacity: 0.05,
|
marginTop: 40
|
||||||
shadowOffset: { width: 0, height: 4 },
|
},
|
||||||
shadowRadius: 8,
|
titleContainer: {
|
||||||
elevation: 4,
|
alignSelf: 'center',
|
||||||
flex: 1,
|
},
|
||||||
minHeight : height * 0.7
|
titleText: {
|
||||||
},
|
fontSize: 18,
|
||||||
footer: {
|
fontWeight: '500',
|
||||||
marginTop: 60,
|
color: GlobalTheme.colors.black,
|
||||||
alignItems: 'center',
|
textAlign: 'center'
|
||||||
},
|
},
|
||||||
footerImage: {
|
btnbg: {
|
||||||
width: '100%',
|
backgroundColor: GlobalTheme.colors.secondary, borderRadius: GlobalTheme.borderRadius.md
|
||||||
height: normalize(80),
|
},
|
||||||
resizeMode: 'contain',
|
btntext: {
|
||||||
marginTop: normalize(160),
|
color: GlobalTheme.colors.white,
|
||||||
},
|
fontSize: GlobalTheme.typography.fontSize.medium
|
||||||
AuthBottomBG: {
|
},
|
||||||
width: '100%',
|
otp_inputStyle: {
|
||||||
resizeMode: 'contain',
|
textAlign: 'center',
|
||||||
height: normalize(270),
|
backgroundColor: 'red',
|
||||||
justifyContent: 'center',
|
width: 100,
|
||||||
marginTop: normalize(-40),
|
borderRadius: 4,
|
||||||
},
|
paddingVertical: 10,
|
||||||
|
paddingHorizontal: 15,
|
||||||
});
|
height: 50,
|
||||||
|
color: 'red',
|
||||||
|
marginBottom: 10,
|
||||||
|
marginRight: 10,
|
||||||
|
fontSize: 25,
|
||||||
|
},
|
||||||
|
// OTP
|
||||||
|
pinCodeContainer: {
|
||||||
|
width: 45,
|
||||||
|
height: 55,
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: '#D8E3F1',
|
||||||
|
borderRadius: 8,
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
},
|
||||||
|
activePinCodeContainer: {
|
||||||
|
borderColor: GlobalTheme.colors.primary,
|
||||||
|
borderWidth: 2,
|
||||||
|
},
|
||||||
|
filledPinCodeContainer: {
|
||||||
|
backgroundColor: '#D8E3F1',
|
||||||
|
},
|
||||||
|
disabledPinCodeContainer: {
|
||||||
|
backgroundColor: '#f0f0f0',
|
||||||
|
borderColor: '#ddd',
|
||||||
|
},
|
||||||
|
pinCodeText: {
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: '#333',
|
||||||
|
},
|
||||||
|
focusStick: {
|
||||||
|
height: 2,
|
||||||
|
width: 20,
|
||||||
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
|
marginTop: 4,
|
||||||
|
},
|
||||||
|
placeholderText: {
|
||||||
|
color: '#aaa',
|
||||||
|
fontSize: 18,
|
||||||
|
},
|
||||||
|
resendText: {
|
||||||
|
color: GlobalTheme.colors.primary,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: 14,
|
||||||
|
marginTop: 20,
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
|
timerText: {
|
||||||
|
color: 'gray',
|
||||||
|
fontSize: 14,
|
||||||
|
marginTop: 20,
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
|
resendOTP: {
|
||||||
|
color: GlobalTheme.colors.secondary, fontWeight: GlobalTheme.typography.fontWeight.medium, fontSize: GlobalTheme.typography.fontSize.small
|
||||||
|
},
|
||||||
|
iconStyle: {
|
||||||
|
height: 20,
|
||||||
|
width: 20,
|
||||||
|
resizeMode: 'contain',
|
||||||
|
tintColor: GlobalTheme.colors.white
|
||||||
|
},
|
||||||
|
backIconText: { fontSize: GlobalTheme.typography.fontSize.small, color: GlobalTheme.colors.white, fontWeight: GlobalTheme.typography.fontWeight.medium, marginLeft: 8 },
|
||||||
|
backTextView: {
|
||||||
|
flexDirection: 'row', alignItems: 'center', paddingTop: 20, paddingHorizontal: 10
|
||||||
|
},
|
||||||
|
card: {
|
||||||
|
backgroundColor: GlobalTheme.colors.white,
|
||||||
|
borderTopLeftRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
||||||
|
borderTopRightRadius: GlobalTheme.borderRadius.xxlg || normalize(20),
|
||||||
|
padding: normalize(20),
|
||||||
|
width: width,
|
||||||
|
alignSelf: 'center',
|
||||||
|
// marginTop: normalize(30),
|
||||||
|
shadowColor: '#000',
|
||||||
|
shadowOpacity: 0.05,
|
||||||
|
shadowOffset: { width: 0, height: 4 },
|
||||||
|
shadowRadius: 8,
|
||||||
|
elevation: 4,
|
||||||
|
flex: 1,
|
||||||
|
minHeight : height * 0.7
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
marginTop: 60,
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
footerImage: {
|
||||||
|
width: '100%',
|
||||||
|
height: normalize(80),
|
||||||
|
resizeMode: 'contain',
|
||||||
|
marginTop: normalize(160),
|
||||||
|
},
|
||||||
|
AuthBottomBG: {
|
||||||
|
width: '100%',
|
||||||
|
resizeMode: 'contain',
|
||||||
|
height: normalize(270),
|
||||||
|
justifyContent: 'center',
|
||||||
|
marginTop: normalize(-40),
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -0,0 +1,406 @@
|
|||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { View, Text, TouchableOpacity, ScrollView, Image, Modal, Platform, StyleSheet, Alert } from 'react-native';
|
||||||
|
import { useRoute, useNavigation } from '@react-navigation/native';
|
||||||
|
import { post } from '../../../api/ApiService';
|
||||||
|
import IMAGES from '../../../constants/Images';
|
||||||
|
import { GlobalTheme } from '../../../theme';
|
||||||
|
import Loader from '../../../constants/Loader';
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
|
import { toastError } from '../../../constants/Toast';
|
||||||
|
|
||||||
|
const Details = () => {
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const navigation = useNavigation();
|
||||||
|
|
||||||
|
const { selectedDetails = [], storeData, year, month, mainTabIndex } = route.params || {};
|
||||||
|
const [modalGraphData, setModalGraphData] = useState({});
|
||||||
|
const [activePromoTab, setActivePromoTab] = useState('Executed');
|
||||||
|
const [allCatData, setAllCatData] = useState([])
|
||||||
|
const [selectedCategoryData, setSelectedCategoryData] = useState([]);
|
||||||
|
const [categoryModalVisible, setCategoryModalVisible] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (selectedDetails.length > 0) {
|
||||||
|
fetchDetailGraphs(selectedDetails);
|
||||||
|
}
|
||||||
|
}, [selectedDetails]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getAllCatData();
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const getAllCatData = () => {
|
||||||
|
let data = {
|
||||||
|
parameters: {
|
||||||
|
projectid: 41654,
|
||||||
|
year: year,
|
||||||
|
monthno: month,
|
||||||
|
storeid: storeData?.StoreId
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const apiUrl = mainTabIndex === 0
|
||||||
|
? 'https://dax.parinaam.in/execute/dabur/detmtd/oos_sku_list_for_all_visits_mtd'
|
||||||
|
: 'https://dax.parinaam.in/execute/dabur/detlsv/oos_sku_list_on_lsv';
|
||||||
|
|
||||||
|
post(apiUrl, data)
|
||||||
|
.then(res => {
|
||||||
|
setAllCatData(res?.data);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log('Error =>', err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const fetchDetailGraphs = async (detailPages) => {
|
||||||
|
try {
|
||||||
|
const resultMap = {};
|
||||||
|
for (let item of detailPages) {
|
||||||
|
const response = await post(item.GraphUrl, {
|
||||||
|
parameters: {
|
||||||
|
projectid: 41654,
|
||||||
|
year: year,
|
||||||
|
monthno: month,
|
||||||
|
storeid: storeData?.StoreId
|
||||||
|
},
|
||||||
|
});
|
||||||
|
resultMap[item.GraphUrl] = response?.data || [];
|
||||||
|
}
|
||||||
|
setModalGraphData(resultMap);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("❌ Error fetching detail graphs:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const showCategoryDetails = (data) => {
|
||||||
|
setCategoryModalVisible(!categoryModalVisible)
|
||||||
|
// Filter SKUs from allCatData where the category name matches
|
||||||
|
const filteredCategory = allCatData.filter(item =>
|
||||||
|
item.Product_CategoryCategory_Name === data.Product_CategoryCategory_Name
|
||||||
|
);
|
||||||
|
// Save for display
|
||||||
|
setSelectedCategoryData(filteredCategory);
|
||||||
|
}
|
||||||
|
|
||||||
|
const isOSATab = selectedDetails.some(item => item.GraphTitle === "OSA - Category");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SafeAreaView style={{ flex: 1, backgroundColor: '#113F8C' }}>
|
||||||
|
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
||||||
|
{/* Header */}
|
||||||
|
<View style={styled.header}>
|
||||||
|
<TouchableOpacity onPress={() => navigation.goBack()} style={{ padding: 5 }}>
|
||||||
|
<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 }} /> {/* spacer */}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<ScrollView style={{ padding: 20 }}>
|
||||||
|
{selectedDetails.map((detail, index) => {
|
||||||
|
const values = modalGraphData[detail.GraphUrl] || [];
|
||||||
|
|
||||||
|
if (!modalGraphData[detail.GraphUrl]) {
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ flex: 1, marginBottom: 20 }}>
|
||||||
|
<Loader visible={true} />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (detail.GraphType) {
|
||||||
|
case 'Table':
|
||||||
|
// Check if it's the Promotion table
|
||||||
|
const isPromotionTable =
|
||||||
|
values.length > 0 &&
|
||||||
|
values[0].hasOwnProperty('Product_CategoryCategory_Name') &&
|
||||||
|
values[0].hasOwnProperty('Promotion_MasterPromotion_Definition');
|
||||||
|
|
||||||
|
if (isPromotionTable) {
|
||||||
|
// Filter data based on active tab
|
||||||
|
const filteredValues = values.filter(row =>
|
||||||
|
activePromoTab === 'Executed'
|
||||||
|
? row.Executed?.toLowerCase() === 'yes'
|
||||||
|
: row.Executed?.toLowerCase() === 'no'
|
||||||
|
);
|
||||||
|
// Group data by Product_CategoryCategory_Name
|
||||||
|
const groupedData = filteredValues.reduce((acc, curr) => {
|
||||||
|
const category = curr.Product_CategoryCategory_Name || 'Unknown';
|
||||||
|
if (!acc[category]) acc[category] = [];
|
||||||
|
acc[category].push(curr);
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ marginBottom: 10 }}>
|
||||||
|
|
||||||
|
{/* Horizontal Tabs - show once at top */}
|
||||||
|
{index === 0 && ( // ensures only first promotion table renders the toggle
|
||||||
|
<View style={{ flexDirection: 'row', marginBottom: 20 }}>
|
||||||
|
{['Executed', 'Not Executed'].map(tab => {
|
||||||
|
const isSelected = activePromoTab === tab;
|
||||||
|
return (
|
||||||
|
<TouchableOpacity
|
||||||
|
key={tab}
|
||||||
|
onPress={() => setActivePromoTab(tab)}
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
paddingVertical: 10,
|
||||||
|
backgroundColor: isSelected ? '#113F8C' : '#E3EBF8',
|
||||||
|
borderRadius: 8,
|
||||||
|
marginHorizontal: 5,
|
||||||
|
alignItems: 'center',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ color: isSelected ? '#fff' : '#000', fontWeight: '600' }}>
|
||||||
|
{tab}
|
||||||
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* No data message */}
|
||||||
|
<View style={{}}>
|
||||||
|
{filteredValues.length === 0 ? (
|
||||||
|
<View style={{ marginTop: 0, backgroundColor: 'red' }} />
|
||||||
|
) : (
|
||||||
|
Object.keys(groupedData).map((categoryName, catIdx) => (
|
||||||
|
<View key={catIdx} style={{ marginBottom: 20, }}>
|
||||||
|
{/* Category Header */}
|
||||||
|
<View style={{ backgroundColor: '#E8F0FF', padding: 8, borderRadius: 6 }}>
|
||||||
|
<Text style={{ fontSize: 15, fontWeight: '700', color: '#113F8C' }}>
|
||||||
|
{String(categoryName)}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* Table Header */}
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
backgroundColor: '#f5f5f5',
|
||||||
|
paddingVertical: 8,
|
||||||
|
paddingHorizontal: 9,
|
||||||
|
borderTopLeftRadius: 8,
|
||||||
|
borderTopRightRadius: 8,
|
||||||
|
marginTop: 5
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '80%' }}>
|
||||||
|
Definition
|
||||||
|
</Text>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '20%', textAlign: 'center' }}>
|
||||||
|
Executed
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* Table Rows */}
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
paddingHorizontal: 10,
|
||||||
|
borderBottomLeftRadius: 8,
|
||||||
|
borderBottomRightRadius: 8,
|
||||||
|
shadowColor: '#000',
|
||||||
|
shadowOffset: { width: 0, height: 1 },
|
||||||
|
shadowOpacity: 0.1,
|
||||||
|
shadowRadius: 2,
|
||||||
|
elevation: 2
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{groupedData[categoryName].map((row, rowIdx) => (
|
||||||
|
<View
|
||||||
|
key={rowIdx}
|
||||||
|
style={{
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingVertical: 8,
|
||||||
|
borderBottomWidth: rowIdx === groupedData[categoryName].length - 1 ? 0 : 1,
|
||||||
|
borderColor: '#eee'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ color: '#000', width: '80%' }}>
|
||||||
|
{String(row.Promotion_MasterPromotion_Definition) || '-'}
|
||||||
|
</Text>
|
||||||
|
<Text style={{ color: '#000', width: '20%', textAlign: 'center' }}>
|
||||||
|
{row.Executed || '-'}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
))
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let displayKey = null;
|
||||||
|
let presentKey = null;
|
||||||
|
if (values.length > 0) {
|
||||||
|
const presentKeys = Object.keys(values[0]).filter(k =>
|
||||||
|
(typeof values[0][k] === 'string' && ['Yes', 'No'].includes(values[0][k])) ||
|
||||||
|
typeof values[0][k] === 'boolean' ||
|
||||||
|
typeof values[0][k] === 'number'
|
||||||
|
);
|
||||||
|
presentKey = presentKeys.length > 0 ? presentKeys[0] : null;
|
||||||
|
const displayKeys = Object.keys(values[0]).filter(k => k !== presentKey && typeof values[0][k] === 'string');
|
||||||
|
displayKey = displayKeys.length > 0 ? displayKeys[0] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ marginBottom: 30 }}>
|
||||||
|
<Text style={{ color: '#000', fontSize: 16, fontWeight: '600', marginBottom: 10 }}>
|
||||||
|
{detail.GraphTitle}
|
||||||
|
|
||||||
|
</Text>
|
||||||
|
<View style={styled.categoryHeader}>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '80%' }}>
|
||||||
|
{displayKey ? displayKey.replace(/_/g, ' ').replace(/([a-z])([A-Z])/g, '$1 $2') : ''}
|
||||||
|
</Text>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '20%', textAlign: 'center' }}>
|
||||||
|
{presentKey ? presentKey.replace(/_/g, ' ').replace(/([a-z])([A-Z])/g, '$1 $2') : ''}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={styled.itemContainer}>
|
||||||
|
{values.map((row, idx) => {
|
||||||
|
const presentKeys = Object.keys(row).filter(k =>
|
||||||
|
(typeof row[k] === 'string' && ['Yes', 'No'].includes(row[k])) ||
|
||||||
|
typeof row[k] === 'boolean' ||
|
||||||
|
typeof row[k] === 'number'
|
||||||
|
);
|
||||||
|
const presentKey = presentKeys.length > 0 ? presentKeys[0] : null;
|
||||||
|
const displayKeys = Object.keys(row).filter(k => k !== presentKey && typeof row[k] === 'string');
|
||||||
|
const displayKey = displayKeys.length > 0 ? displayKeys[0] : null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View
|
||||||
|
key={idx}
|
||||||
|
style={{
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingVertical: 8,
|
||||||
|
borderBottomWidth: idx === values.length - 1 ? 0 : 1,
|
||||||
|
borderColor: '#eee',
|
||||||
|
}}>
|
||||||
|
<Text style={{ color: '#000', width: '80%' }}>{row[displayKey] || '--'}</Text>
|
||||||
|
<TouchableOpacity disabled={isOSATab ? false : true}
|
||||||
|
onPress={() => {
|
||||||
|
if (row[presentKey] == 100 || row[presentKey] == '100') {
|
||||||
|
toastError('Alert', 'No Data Available')
|
||||||
|
} else {
|
||||||
|
showCategoryDetails(row)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
style={{ width: '20%', }}>
|
||||||
|
<Text style={{ color: '#113F8C', textAlign: 'center', fontWeight: '500' }}>
|
||||||
|
{presentKey ? (
|
||||||
|
typeof row[presentKey] === 'string' && ['Yes', 'No'].includes(row[presentKey]) ? row[presentKey] :
|
||||||
|
typeof row[presentKey] === 'boolean' ? (row[presentKey] ? 'Yes' : 'No') :
|
||||||
|
typeof row[presentKey] === 'number' ? row[presentKey].toFixed(2) : row[presentKey] || '-'
|
||||||
|
) : '-'}
|
||||||
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ marginBottom: 20 }}>
|
||||||
|
<Text>Unsupported GraphType: {detail.GraphType}</Text>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
visible={categoryModalVisible}
|
||||||
|
animationType="slide"
|
||||||
|
onRequestClose={() => setCategoryModalVisible(false)}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1, }}>
|
||||||
|
{/* Header */}
|
||||||
|
<View style={{ height: Platform.OS === 'ios' ? 55 : 0, backgroundColor: '#113F8C' }} />
|
||||||
|
|
||||||
|
<View style={{ width: '100%', backgroundColor: '#113F8C', borderBottomWidth: 1, borderColor: 'gray', padding: 5, paddingHorizontal: 20, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
|
<View style={{ width: '93%', alignItems: 'center' }}>
|
||||||
|
<Text style={{ color: '#fff', fontSize: 20, fontWeight: 'bold', marginBottom: 10, alignSelf: 'center' }}>{selectedCategoryData[0]?.Product_CategoryCategory_Name || 'Category'}</Text>
|
||||||
|
</View>
|
||||||
|
<TouchableOpacity onPress={() => setCategoryModalVisible(false)} style={{ width: '7%', alignItems: 'center' }}>
|
||||||
|
<Image source={IMAGES.crossIcon} style={{ height: 25, width: 25, resizeMode: 'contain' }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* SKU List */}
|
||||||
|
<ScrollView contentContainerStyle={{ padding: 15 }}>
|
||||||
|
{/* <Text style={{ color: '#000', fontSize: 16, fontWeight: 'bold', marginBottom: 5 }}>OOS SKU details</Text> */}
|
||||||
|
{selectedCategoryData.map((item, idx) => (
|
||||||
|
<View
|
||||||
|
key={idx}
|
||||||
|
style={{
|
||||||
|
marginTop: 2,
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingVertical: 8,
|
||||||
|
borderBottomWidth: idx === selectedCategoryData.length - 1 ? 0 : 1,
|
||||||
|
borderColor: '#eee',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ color: '#000', width: '80%' }}>
|
||||||
|
{item.Product_MasterProduct_Name}
|
||||||
|
</Text>
|
||||||
|
{/* <Text style={{ color: '#000', width: '20%', textAlign: 'center' }}>
|
||||||
|
{item['#_of_OOS_SKU_for_all_visits']}
|
||||||
|
</Text> */}
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styled = StyleSheet.create({
|
||||||
|
header: {
|
||||||
|
width: '100%',
|
||||||
|
backgroundColor: '#113F8C',
|
||||||
|
padding: 10,
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center'
|
||||||
|
},
|
||||||
|
categoryHeader: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
backgroundColor: '#EDEDED',
|
||||||
|
paddingVertical: 8,
|
||||||
|
paddingHorizontal: 10,
|
||||||
|
borderTopLeftRadius: 8,
|
||||||
|
borderTopRightRadius: 8,
|
||||||
|
},
|
||||||
|
itemContainer: {
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
paddingHorizontal: 10,
|
||||||
|
borderBottomLeftRadius: 8,
|
||||||
|
borderBottomRightRadius: 8,
|
||||||
|
shadowColor: '#000',
|
||||||
|
shadowOffset: { width: 0, height: 1 },
|
||||||
|
shadowOpacity: 0.1,
|
||||||
|
shadowRadius: 2,
|
||||||
|
elevation: 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export default Details;
|
||||||
@@ -0,0 +1,431 @@
|
|||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { View, Text, TouchableOpacity, ScrollView, Image, Modal, Platform, StyleSheet, Alert } from 'react-native';
|
||||||
|
import { useRoute, useNavigation } from '@react-navigation/native';
|
||||||
|
import { post } from '../../../api/ApiService';
|
||||||
|
import IMAGES from '../../../constants/Images';
|
||||||
|
import { GlobalTheme } from '../../../theme';
|
||||||
|
import Loader from '../../../constants/Loader';
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
|
import { toastError } from '../../../constants/Toast';
|
||||||
|
|
||||||
|
const Details = () => {
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const navigation = useNavigation();
|
||||||
|
|
||||||
|
const { selectedDetails = [], storeData, year, month, mainTabIndex } = route.params || {};
|
||||||
|
const [modalGraphData, setModalGraphData] = useState({});
|
||||||
|
const [activePromoTab, setActivePromoTab] = useState('Executed');
|
||||||
|
const [allCatData, setAllCatData] = useState([])
|
||||||
|
const [selectedCategoryData, setSelectedCategoryData] = useState([]);
|
||||||
|
const [categoryModalVisible, setCategoryModalVisible] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (selectedDetails.length > 0) {
|
||||||
|
fetchDetailGraphs(selectedDetails);
|
||||||
|
}
|
||||||
|
}, [selectedDetails]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getAllCatData();
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const getAllCatData = () => {
|
||||||
|
let data = {
|
||||||
|
parameters: {
|
||||||
|
projectid: 41654,
|
||||||
|
year: year,
|
||||||
|
monthno: month,
|
||||||
|
storeid: storeData?.StoreId
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const apiUrl = mainTabIndex === 0
|
||||||
|
? 'https://dax.parinaam.in/execute/dabur/detmtd/oos_sku_list_for_all_visits_mtd'
|
||||||
|
: 'https://dax.parinaam.in/execute/dabur/detlsv/oos_sku_list_on_lsv';
|
||||||
|
|
||||||
|
post(apiUrl, data)
|
||||||
|
.then(res => {
|
||||||
|
setAllCatData(res?.data);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log('Error =>', err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const fetchDetailGraphs = async (detailPages) => {
|
||||||
|
try {
|
||||||
|
const resultMap = {};
|
||||||
|
for (let item of detailPages) {
|
||||||
|
const response = await post(item.GraphUrl, {
|
||||||
|
parameters: {
|
||||||
|
projectid: 41654,
|
||||||
|
year: year,
|
||||||
|
monthno: month,
|
||||||
|
storeid: storeData?.StoreId
|
||||||
|
},
|
||||||
|
});
|
||||||
|
resultMap[item.GraphUrl] = response?.data || [];
|
||||||
|
}
|
||||||
|
setModalGraphData(resultMap);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("❌ Error fetching detail graphs:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const showCategoryDetails = (data) => {
|
||||||
|
setCategoryModalVisible(!categoryModalVisible)
|
||||||
|
// Filter SKUs from allCatData where the category name matches
|
||||||
|
const filteredCategory = allCatData.filter(item =>
|
||||||
|
item.Product_CategoryCategory_Name === data.Product_CategoryCategory_Name
|
||||||
|
);
|
||||||
|
// Save for display
|
||||||
|
setSelectedCategoryData(filteredCategory);
|
||||||
|
}
|
||||||
|
|
||||||
|
const isOSATab = selectedDetails.some(item => item.GraphTitle === "OSA - Category");
|
||||||
|
console.log('isOSATab----',isOSATab);
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SafeAreaView style={{ flex: 1, backgroundColor: '#113F8C' }}>
|
||||||
|
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
||||||
|
{/* Header */}
|
||||||
|
<View style={styled.header}>
|
||||||
|
<TouchableOpacity onPress={() => navigation.goBack()} style={{ padding: 5 }}>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<ScrollView style={{ padding: 20 }}>
|
||||||
|
{selectedDetails && selectedDetails.length > 0 ? selectedDetails.map((detail, index) => {
|
||||||
|
const values = modalGraphData[detail.GraphUrl] || [];
|
||||||
|
|
||||||
|
if (!modalGraphData[detail.GraphUrl]) {
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ flex: 1, marginBottom: 20 }}>
|
||||||
|
<Loader visible={true} />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (detail.GraphType) {
|
||||||
|
case 'Table':
|
||||||
|
// Check if it's the Promotion table
|
||||||
|
const isPromotionTable =
|
||||||
|
values.length > 0 &&
|
||||||
|
values[0].hasOwnProperty('Product_CategoryCategory_Name') &&
|
||||||
|
values[0].hasOwnProperty('Promotion_MasterPromotion_Definition');
|
||||||
|
|
||||||
|
if (isPromotionTable) {
|
||||||
|
// Filter data based on active tab
|
||||||
|
const filteredValues = values.filter(row =>
|
||||||
|
activePromoTab === 'Executed'
|
||||||
|
? row.Executed?.toLowerCase() === 'yes'
|
||||||
|
: row.Executed?.toLowerCase() === 'no'
|
||||||
|
);
|
||||||
|
// Group data by Product_CategoryCategory_Name
|
||||||
|
const groupedData = filteredValues.reduce((acc, curr) => {
|
||||||
|
const category = curr.Product_CategoryCategory_Name || 'Unknown';
|
||||||
|
if (!acc[category]) acc[category] = [];
|
||||||
|
acc[category].push(curr);
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ marginBottom: 10 }}>
|
||||||
|
{/* Horizontal Tabs - show once at top */}
|
||||||
|
{index === 0 && ( // ensures only first promotion table renders the toggle
|
||||||
|
<View style={{ flexDirection: 'row', marginBottom: 20 }}>
|
||||||
|
{['Executed', 'Not Executed'].map(tab => {
|
||||||
|
const isSelected = activePromoTab === tab;
|
||||||
|
return (
|
||||||
|
<TouchableOpacity
|
||||||
|
key={tab}
|
||||||
|
onPress={() => setActivePromoTab(tab)}
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
paddingVertical: 10,
|
||||||
|
backgroundColor: isSelected ? '#113F8C' : '#E3EBF8',
|
||||||
|
borderRadius: 8,
|
||||||
|
marginHorizontal: 5,
|
||||||
|
alignItems: 'center',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ color: isSelected ? '#fff' : '#000', fontWeight: '600' }}>
|
||||||
|
{tab}
|
||||||
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* No data message */}
|
||||||
|
<View style={{}}>
|
||||||
|
{filteredValues.length === 0 ? (
|
||||||
|
<View style={{ marginTop: 0, backgroundColor: 'red' }} />
|
||||||
|
) : (
|
||||||
|
Object.keys(groupedData).map((categoryName, catIdx) => (
|
||||||
|
<View key={catIdx} style={{ marginBottom: 20 }}>
|
||||||
|
{/* Category Header */}
|
||||||
|
<View style={{ backgroundColor: '#E8F0FF', padding: 8, borderRadius: 6 }}>
|
||||||
|
<Text style={{ fontSize: 15, fontWeight: '700', color: '#113F8C' }}>
|
||||||
|
{String(categoryName)}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* Table Header */}
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
backgroundColor: '#f5f5f5',
|
||||||
|
paddingVertical: 8,
|
||||||
|
paddingHorizontal: 9,
|
||||||
|
borderTopLeftRadius: 8,
|
||||||
|
borderTopRightRadius: 8,
|
||||||
|
marginTop: 5
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '80%' }}>
|
||||||
|
Definition
|
||||||
|
</Text>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '20%', textAlign: 'center' }}>
|
||||||
|
Executed
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* Table Rows */}
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
paddingHorizontal: 10,
|
||||||
|
borderBottomLeftRadius: 8,
|
||||||
|
borderBottomRightRadius: 8,
|
||||||
|
shadowColor: '#000',
|
||||||
|
shadowOffset: { width: 0, height: 1 },
|
||||||
|
shadowOpacity: 0.1,
|
||||||
|
shadowRadius: 2,
|
||||||
|
elevation: 2
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{groupedData[categoryName].map((row, rowIdx) => (
|
||||||
|
<View
|
||||||
|
key={rowIdx}
|
||||||
|
style={{
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingVertical: 8,
|
||||||
|
borderBottomWidth: rowIdx === groupedData[categoryName].length - 1 ? 0 : 1,
|
||||||
|
borderColor: '#eee'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ color: '#000', width: '80%' }}>
|
||||||
|
{String(row.Promotion_MasterPromotion_Definition) || '-'}
|
||||||
|
</Text>
|
||||||
|
<Text style={{ color: '#000', width: '20%', textAlign: 'center' }}>
|
||||||
|
{row.Executed || '-'}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
))
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let displayKey = null;
|
||||||
|
let presentKey = null;
|
||||||
|
if (values.length > 0) {
|
||||||
|
const presentKeys = Object.keys(values[0]).filter(k =>
|
||||||
|
(typeof values[0][k] === 'string' && ['Yes', 'No'].includes(values[0][k])) ||
|
||||||
|
typeof values[0][k] === 'boolean' ||
|
||||||
|
typeof values[0][k] === 'number'
|
||||||
|
);
|
||||||
|
presentKey = presentKeys.length > 0 ? presentKeys[0] : null;
|
||||||
|
const displayKeys = Object.keys(values[0]).filter(k => k !== presentKey && typeof values[0][k] === 'string');
|
||||||
|
displayKey = displayKeys.length > 0 ? displayKeys[0] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ marginBottom: 30 }}>
|
||||||
|
|
||||||
|
<Text style={{ marginTop: 10, color: '#000', fontSize: 16, fontWeight: '600', marginBottom: 10 }}>
|
||||||
|
{detail.GraphTitle}
|
||||||
|
|
||||||
|
</Text>
|
||||||
|
<View style={styled.categoryHeader}>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '80%' }}>
|
||||||
|
{displayKey ? displayKey.replace(/_/g, ' ').replace(/([a-z])([A-Z])/g, '$1 $2') : ''}
|
||||||
|
</Text>
|
||||||
|
<Text style={{ color: '#000', fontWeight: 'bold', width: '20%', textAlign: 'center' }}>
|
||||||
|
{presentKey ? presentKey.replace(/_/g, ' ').replace(/([a-z])([A-Z])/g, '$1 $2') : ''}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={styled.itemContainer}>
|
||||||
|
{values.map((row, idx) => {
|
||||||
|
const presentKeys = Object.keys(row).filter(k =>
|
||||||
|
(typeof row[k] === 'string' && ['Yes', 'No'].includes(row[k])) ||
|
||||||
|
typeof row[k] === 'boolean' ||
|
||||||
|
typeof row[k] === 'number'
|
||||||
|
);
|
||||||
|
const presentKey = presentKeys.length > 0 ? presentKeys[0] : null;
|
||||||
|
const displayKeys = Object.keys(row).filter(k => k !== presentKey && typeof row[k] === 'string');
|
||||||
|
const displayKey = displayKeys.length > 0 ? displayKeys[0] : null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View
|
||||||
|
key={idx}
|
||||||
|
style={{
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingVertical: 8,
|
||||||
|
borderBottomWidth: idx === values.length - 1 ? 0 : 1,
|
||||||
|
borderColor: '#eee',
|
||||||
|
}}>
|
||||||
|
<Text style={{ color: '#000', width: '80%' }}>{row[displayKey] || '--'}</Text>
|
||||||
|
|
||||||
|
<TouchableOpacity disabled={isOSATab ? false : true}
|
||||||
|
onPress={() => {
|
||||||
|
if (row[presentKey] == 100 || row[presentKey] == '100') {
|
||||||
|
toastError('Alert', 'No Data Available')
|
||||||
|
} else {
|
||||||
|
showCategoryDetails(row)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
style={{ width: '20%', }}>
|
||||||
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||||
|
<Text style={{ color: '#113F8C', textAlign: 'center', fontWeight: '500' }}>
|
||||||
|
{presentKey ? (
|
||||||
|
typeof row[presentKey] === 'string' && ['Yes', 'No'].includes(row[presentKey]) ? row[presentKey] :
|
||||||
|
typeof row[presentKey] === 'boolean' ? (row[presentKey] ? 'Yes' : 'No') :
|
||||||
|
typeof row[presentKey] === 'number' ? row[presentKey].toFixed(2) : row[presentKey] || '-'
|
||||||
|
) : '-'}
|
||||||
|
</Text>
|
||||||
|
{ isOSATab && row[presentKey] != 100 || isOSATab && row[presentKey] != '100'? <Image source={IMAGES.rightArrowIcon} style={{marginLeft:6, height: 12, width: 12, resizeMode: 'contain' }} /> :null}
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
return (
|
||||||
|
<View key={index} style={{ marginBottom: 20 }}>
|
||||||
|
<Text>Unsupported GraphType: {detail.GraphType}</Text>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}) :
|
||||||
|
<Loader visible={true} />
|
||||||
|
}
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
visible={categoryModalVisible}
|
||||||
|
animationType="slide"
|
||||||
|
onRequestClose={() => setCategoryModalVisible(false)}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1, }}>
|
||||||
|
{/* Header */}
|
||||||
|
<View style={{ height: Platform.OS === 'ios' ? 55 : 0, backgroundColor: '#113F8C' }} />
|
||||||
|
|
||||||
|
<View style={{ width: '100%', backgroundColor: '#113F8C', borderBottomWidth: 1, borderColor: 'gray', padding: 5, paddingHorizontal: 20, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
|
<View style={{ width: '93%', alignItems: 'center' }}>
|
||||||
|
<Text style={{ color: '#fff', fontSize: 20, fontWeight: 'bold', marginBottom: 10, alignSelf: 'center' }}>{selectedCategoryData[0]?.Product_CategoryCategory_Name || 'Category'}</Text>
|
||||||
|
</View>
|
||||||
|
<TouchableOpacity onPress={() => setCategoryModalVisible(false)} style={{ width: '7%', alignItems: 'center' }}>
|
||||||
|
<Image source={IMAGES.crossIcon} style={{ height: 25, width: 25, resizeMode: 'contain' }} />
|
||||||
|
</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={{
|
||||||
|
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
|
||||||
|
key={idx}
|
||||||
|
style={{
|
||||||
|
marginTop: 2,
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingVertical: 8,
|
||||||
|
borderBottomWidth: idx === selectedCategoryData.length - 1 ? 0 : 1,
|
||||||
|
borderColor: '#eee',
|
||||||
|
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<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> */}
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styled = StyleSheet.create({
|
||||||
|
header: {
|
||||||
|
width: '100%',
|
||||||
|
backgroundColor: '#113F8C',
|
||||||
|
padding: 10,
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center'
|
||||||
|
},
|
||||||
|
categoryHeader: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
backgroundColor: '#EDEDED',
|
||||||
|
paddingVertical: 8,
|
||||||
|
paddingHorizontal: 10,
|
||||||
|
borderTopLeftRadius: 8,
|
||||||
|
borderTopRightRadius: 8,
|
||||||
|
},
|
||||||
|
itemContainer: {
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
paddingHorizontal: 10,
|
||||||
|
borderBottomLeftRadius: 8,
|
||||||
|
borderBottomRightRadius: 8,
|
||||||
|
shadowColor: '#000',
|
||||||
|
shadowOffset: { width: 0, height: 1 },
|
||||||
|
shadowOpacity: 0.1,
|
||||||
|
shadowRadius: 2,
|
||||||
|
elevation: 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export default Details;
|
||||||
@@ -206,4 +206,113 @@
|
|||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "SOS Compliance",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Compliance_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "SOS Compliance - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/sos_sompliance_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 4,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "SOS Compliance Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/sos_compliance_trend_perc_mtd",
|
||||||
|
"GraphBackground": "#fff",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 1,
|
||||||
|
"gridLinesV": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "SOS Compliance",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_compliance_lsv_perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "SOS Actual - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/sos_compliance_lsv_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 4,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "SOS Compliance Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/sos_compliance_trend_lsv_perc",
|
||||||
|
"GraphBackground": "#fff",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 1,
|
||||||
|
"gridLinesV": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { View, Text, StyleSheet, Image, TouchableOpacity, Dimensions, TextInput, ScrollView, FlatList, Button, Alert, Modal, TouchableWithoutFeedback, StatusBar, ActivityIndicator, Platform } from 'react-native'
|
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 RBSheet from 'react-native-raw-bottom-sheet';
|
||||||
import { styles } from './style';
|
import { styles } from './style';
|
||||||
import LinearGradient from 'react-native-linear-gradient';
|
import LinearGradient from 'react-native-linear-gradient';
|
||||||
@@ -10,12 +10,8 @@ import CustomDropdown from '../../../components/CustomDropdown';
|
|||||||
import { GlobalTheme } from '../../../theme';
|
import { GlobalTheme } from '../../../theme';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
import { BarChart } from 'react-native-gifted-charts';
|
import { BarChart } from 'react-native-gifted-charts';
|
||||||
|
import { PieChart } from 'react-native-chart-kit';
|
||||||
import displayData from './display.json'
|
import db from '../../../constants/database';
|
||||||
import { LineChart, PieChart, StackedBarChart } from 'react-native-chart-kit';
|
|
||||||
import { getDownloadJson } from '../../../constants/function';
|
|
||||||
import db, { getAllFromTable } from '../../../constants/database';
|
|
||||||
import { post } from '../../../api/ApiService';
|
|
||||||
import { ApiURL } from '../../../api/ApiConstant';
|
import { ApiURL } from '../../../api/ApiConstant';
|
||||||
import mainDisplayData from './mainDisplay.json'
|
import mainDisplayData from './mainDisplay.json'
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
@@ -26,127 +22,114 @@ import moment from 'moment';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
|
|
||||||
|
// 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 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 yearData = [
|
||||||
const monthData = [
|
// { label: '2025', value: '2025' },
|
||||||
{ label: 'January', value: '1' },
|
// { label: '2024', value: '2024' },
|
||||||
{ label: 'February', value: '2' },
|
// { label: '2023', value: '2023' },
|
||||||
{ label: 'March', value: '3' },
|
// { label: '2022', value: '2022' },
|
||||||
{ label: 'April', value: '4' },
|
// { label: '2021', value: '2021' },
|
||||||
{ label: 'May', value: '5' },
|
// { label: '2020', value: '2020' },
|
||||||
{ label: 'June', value: '6' },
|
// { label: '2019', value: '2019' },
|
||||||
{ label: 'July', value: '7' },
|
// { label: '2018', value: '2018' },
|
||||||
{ label: 'August', value: '8' },
|
// { label: '2017', value: '2017' },
|
||||||
{ label: 'September', value: '9' },
|
// { label: '2016', value: '2016' },
|
||||||
{ label: 'October', value: '10' },
|
// { label: '2015', value: '2015' },
|
||||||
{ label: 'November', value: '11' },
|
// ];
|
||||||
{ label: 'December', value: '12' },
|
// const assetData = [
|
||||||
];
|
// {
|
||||||
const yearData = [
|
// "section": "Asset%",
|
||||||
{ label: '2025', value: '2025' },
|
// "data": [
|
||||||
{ label: '2024', value: '2024' },
|
// { "display": "Real Endcap", "present": "No" },
|
||||||
{ label: '2023', value: '2023' },
|
// { "display": "Honey Parasite", "present": "Yes" },
|
||||||
{ label: '2022', value: '2022' },
|
// { "display": "Odonil Floor Stack", "present": "YHes" }
|
||||||
{ label: '2021', value: '2021' },
|
// ]
|
||||||
{ label: '2020', value: '2020' },
|
// },
|
||||||
{ label: '2019', value: '2019' },
|
// {
|
||||||
{ label: '2018', value: '2018' },
|
// "section": "Additional Visibility",
|
||||||
{ label: '2017', value: '2017' },
|
// "data": [
|
||||||
{ label: '2016', value: '2016' },
|
// { "display": "Active 1 Ltr Endcap", "present": "Yes" },
|
||||||
{ label: '2015', value: '2015' },
|
// { "display": "Chyawanprash Stack", "present": "Yes" }
|
||||||
];
|
// ]
|
||||||
const assetData = [
|
// },
|
||||||
{
|
// {
|
||||||
"section": "Asset%",
|
// "section": "Promotion",
|
||||||
"data": [
|
// "data": [
|
||||||
{ "display": "Real Endcap", "present": "No" },
|
// { "display": "Activ 100% Juice", "present": "Yes" },
|
||||||
{ "display": "Honey Parasite", "present": "Yes" },
|
// { "display": "Airfresher", "present": "No" },
|
||||||
{ "display": "Odonil Floor Stack", "present": "YHes" }
|
// { "display": "BABY CARE", "present": "No" },
|
||||||
]
|
// { "display": "Chyawanprash", "present": "No" },
|
||||||
},
|
// { "display": "Hair Oil", "present": "No" },
|
||||||
{
|
// ]
|
||||||
"section": "Additional Visibility",
|
// }
|
||||||
"data": [
|
// ]
|
||||||
{ "display": "Active 1 Ltr Endcap", "present": "Yes" },
|
// const PieData = [
|
||||||
{ "display": "Chyawanprash Stack", "present": "Yes" }
|
// {
|
||||||
]
|
// name: "Seoul",
|
||||||
},
|
// population: 21500000,
|
||||||
{
|
// color: "rgba(131, 167, 234, 1)",
|
||||||
"section": "Promotion",
|
// legendFontColor: "#7F7F7F",
|
||||||
"data": [
|
// legendFontSize: 15
|
||||||
{ "display": "Activ 100% Juice", "present": "Yes" },
|
// },
|
||||||
{ "display": "Airfresher", "present": "No" },
|
// {
|
||||||
{ "display": "BABY CARE", "present": "No" },
|
// name: "Toronto",
|
||||||
{ "display": "Chyawanprash", "present": "No" },
|
// population: 2800000,
|
||||||
{ "display": "Hair Oil", "present": "No" },
|
// color: "#F00",
|
||||||
]
|
// legendFontColor: "#7F7F7F",
|
||||||
}
|
// legendFontSize: 15
|
||||||
]
|
// },
|
||||||
const PieData = [
|
// {
|
||||||
{
|
// name: "Beijing",
|
||||||
name: "Seoul",
|
// population: 527612,
|
||||||
population: 21500000,
|
// color: "red",
|
||||||
color: "rgba(131, 167, 234, 1)",
|
// legendFontColor: "#7F7F7F",
|
||||||
legendFontColor: "#7F7F7F",
|
// legendFontSize: 15
|
||||||
legendFontSize: 15
|
// },
|
||||||
},
|
// {
|
||||||
{
|
// name: "New York",
|
||||||
name: "Toronto",
|
// population: 8538000,
|
||||||
population: 2800000,
|
// color: "#ffffff",
|
||||||
color: "#F00",
|
// legendFontColor: "#7F7F7F",
|
||||||
legendFontColor: "#7F7F7F",
|
// legendFontSize: 15
|
||||||
legendFontSize: 15
|
// },
|
||||||
},
|
// {
|
||||||
{
|
// name: "Moscow",
|
||||||
name: "Beijing",
|
// population: 11920000,
|
||||||
population: 527612,
|
// color: "rgb(0, 0, 255)",
|
||||||
color: "red",
|
// legendFontColor: "#7F7F7F",
|
||||||
legendFontColor: "#7F7F7F",
|
// legendFontSize: 15
|
||||||
legendFontSize: 15
|
// }
|
||||||
},
|
// ];
|
||||||
{
|
// const barData = {
|
||||||
name: "New York",
|
// labels: ["Jan", "Feb", "March", "April",],
|
||||||
population: 8538000,
|
// datasets: [
|
||||||
color: "#ffffff",
|
// {
|
||||||
legendFontColor: "#7F7F7F",
|
// data: [20, 45, 28, 80]
|
||||||
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) => {
|
const Dashboard = (props) => {
|
||||||
|
|
||||||
@@ -200,6 +183,7 @@ const Dashboard = (props) => {
|
|||||||
let user_exist_data = useSelector(state => state?.user);
|
let user_exist_data = useSelector(state => state?.user);
|
||||||
const userId = user_exist_data.UserId || '';
|
const userId = user_exist_data.UserId || '';
|
||||||
|
|
||||||
|
|
||||||
const onClickLogout = () => {
|
const onClickLogout = () => {
|
||||||
setLogoutModal(false);
|
setLogoutModal(false);
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
@@ -231,12 +215,6 @@ const Dashboard = (props) => {
|
|||||||
setTabCache({}); // reset cache when filters change
|
setTabCache({}); // reset cache when filters change
|
||||||
}, [month, year]);
|
}, [month, year]);
|
||||||
|
|
||||||
// useEffect(() => {
|
|
||||||
// if (mainDisplayJson && storeData?.StoreId) {
|
|
||||||
// getTabData(mainDisplayJson);
|
|
||||||
// }
|
|
||||||
// }, [mainTabIndex, storeData]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (mainDisplayJson && storeData?.StoreId) {
|
if (mainDisplayJson && storeData?.StoreId) {
|
||||||
setTimeout(() => getTabData(mainDisplayJson), 0);
|
setTimeout(() => getTabData(mainDisplayJson), 0);
|
||||||
@@ -257,14 +235,9 @@ const Dashboard = (props) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const escape = str => (str || '').toString().replace(/'/g, "''");
|
const escape = str => (str || '').toString().replace(/'/g, "''");
|
||||||
|
|
||||||
|
|
||||||
db.transaction(tx => {
|
db.transaction(tx => {
|
||||||
data_arr.forEach(item => {
|
data_arr.forEach(item => {
|
||||||
const { StoreId, StoreName, ChainName, Address, Pincode, StateName, StoreType, CityName } = item;
|
const { StoreId, StoreName, ChainName, Address, Pincode, StateName, StoreType, CityName } = item;
|
||||||
|
|
||||||
|
|
||||||
// First, check if the StoreId exists
|
|
||||||
tx.executeSql(
|
tx.executeSql(
|
||||||
`SELECT * FROM StoreInfoDNALocal WHERE StoreId = ?`,
|
`SELECT * FROM StoreInfoDNALocal WHERE StoreId = ?`,
|
||||||
[StoreId],
|
[StoreId],
|
||||||
@@ -275,8 +248,6 @@ const Dashboard = (props) => {
|
|||||||
INSERT INTO StoreInfoDNALocal
|
INSERT INTO StoreInfoDNALocal
|
||||||
(VISIT_DATE, StoreId, StoreName, ChainName, Address, Pincode, CityName, StateName, StoreType, UPLOAD_STATUS)
|
(VISIT_DATE, StoreId, StoreName, ChainName, Address, Pincode, CityName, StateName, StoreType, UPLOAD_STATUS)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
|
||||||
|
|
||||||
|
|
||||||
tx.executeSql(sql, [
|
tx.executeSql(sql, [
|
||||||
d2,
|
d2,
|
||||||
StoreId,
|
StoreId,
|
||||||
@@ -316,7 +287,7 @@ const Dashboard = (props) => {
|
|||||||
[d2],
|
[d2],
|
||||||
(tx, results) => {
|
(tx, results) => {
|
||||||
|
|
||||||
console.log("results===", results);
|
// console.log("results===", results);
|
||||||
const rows = [];
|
const rows = [];
|
||||||
for (let i = 0; i < results.rows.length; i++) {
|
for (let i = 0; i < results.rows.length; i++) {
|
||||||
rows.push(results.rows.item(i));
|
rows.push(results.rows.item(i));
|
||||||
@@ -335,47 +306,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) => {
|
const getTabData = async (tabData) => {
|
||||||
if (!storeData?.StoreId) return;
|
if (!storeData?.StoreId) return;
|
||||||
|
|
||||||
@@ -400,23 +330,8 @@ const Dashboard = (props) => {
|
|||||||
console.log("🔁 API Params:", params);
|
console.log("🔁 API Params:", params);
|
||||||
|
|
||||||
const graphDetails = tabData?.graphDetails || [];
|
const graphDetails = tabData?.graphDetails || [];
|
||||||
|
|
||||||
|
|
||||||
const uniqueUrls = [...new Set(graphDetails.map(graph => graph.GraphUrl))];
|
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 apiCalls = uniqueUrls.map(async url => {
|
||||||
const config = {
|
const config = {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -430,15 +345,10 @@ const Dashboard = (props) => {
|
|||||||
return await fetchWithRetry(config);
|
return await fetchWithRetry(config);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const results = await Promise.all(apiCalls);
|
const results = await Promise.all(apiCalls);
|
||||||
console.log("📊 API Results:", results.map(r => r?.data));
|
console.log("📊 API Results:", results.map(r => r?.data));
|
||||||
|
|
||||||
const dataMap = {};
|
const dataMap = {};
|
||||||
// uniqueUrls.forEach((url, idx) => {
|
|
||||||
// dataMap[url] = results[idx].data;
|
|
||||||
// });
|
|
||||||
|
|
||||||
uniqueUrls.forEach((url, idx) => {
|
uniqueUrls.forEach((url, idx) => {
|
||||||
const responseData = results[idx]?.data;
|
const responseData = results[idx]?.data;
|
||||||
if (!responseData || !responseData.data || responseData.data.length === 0) {
|
if (!responseData || !responseData.data || responseData.data.length === 0) {
|
||||||
@@ -447,7 +357,6 @@ const Dashboard = (props) => {
|
|||||||
}
|
}
|
||||||
dataMap[url] = responseData;
|
dataMap[url] = responseData;
|
||||||
});
|
});
|
||||||
console.log('uniqueUrls-dataMap---------->', dataMap);
|
|
||||||
|
|
||||||
setGraphApiData(dataMap);
|
setGraphApiData(dataMap);
|
||||||
setTabCache(prev => ({ ...prev, [tabKey]: dataMap }));
|
setTabCache(prev => ({ ...prev, [tabKey]: dataMap }));
|
||||||
@@ -459,7 +368,6 @@ const Dashboard = (props) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const fetchWithRetry = async (config, retries = 2, delay = 1000) => {
|
const fetchWithRetry = async (config, retries = 2, delay = 1000) => {
|
||||||
for (let i = 0; i <= retries; i++) {
|
for (let i = 0; i <= retries; i++) {
|
||||||
try {
|
try {
|
||||||
@@ -477,31 +385,6 @@ const Dashboard = (props) => {
|
|||||||
return null; // all attempts failed
|
return null; // all attempts failed
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const fetchDetailGraphs = async (detailPages) => {
|
|
||||||
try {
|
|
||||||
const resultMap = {};
|
|
||||||
|
|
||||||
for (let item of detailPages) {
|
|
||||||
const response = await post(item.GraphUrl, {
|
|
||||||
parameters: {
|
|
||||||
projectid: 41654,
|
|
||||||
year: year,
|
|
||||||
monthno: month,
|
|
||||||
storeid: storeData?.StoreId
|
|
||||||
},
|
|
||||||
});
|
|
||||||
console.log(`Data for ${item.GraphTitle}:`, response?.data); // Add this
|
|
||||||
resultMap[item.GraphUrl] = response?.data || [];
|
|
||||||
}
|
|
||||||
setModalGraphData(resultMap);
|
|
||||||
} catch (error) {
|
|
||||||
console.log("❌ Error fetching detail graphs:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const handleScroll = (event) => {
|
const handleScroll = (event) => {
|
||||||
const offsetY = event.nativeEvent.contentOffset.y;
|
const offsetY = event.nativeEvent.contentOffset.y;
|
||||||
setShowButton(offsetY > 0); // Show button only if not at the top
|
setShowButton(offsetY > 0); // Show button only if not at the top
|
||||||
@@ -509,7 +392,7 @@ const Dashboard = (props) => {
|
|||||||
|
|
||||||
const openBottomSheet = () => {
|
const openBottomSheet = () => {
|
||||||
refRBSheet.current.open()
|
refRBSheet.current.open()
|
||||||
}
|
};
|
||||||
|
|
||||||
const onSelectStore = async (item) => {
|
const onSelectStore = async (item) => {
|
||||||
await insertStoreInfoDNALocal([item]);
|
await insertStoreInfoDNALocal([item]);
|
||||||
@@ -522,11 +405,11 @@ const Dashboard = (props) => {
|
|||||||
|
|
||||||
getTabData(currentTab?.MainTabData);
|
getTabData(currentTab?.MainTabData);
|
||||||
refRBSheet.current.close()
|
refRBSheet.current.close()
|
||||||
}
|
};
|
||||||
|
|
||||||
const onSelectSubTab = (item) => {
|
const onSelectSubTab = (item) => {
|
||||||
setActiveTab(item?.TabId)
|
setActiveTab(item?.TabId)
|
||||||
}
|
};
|
||||||
|
|
||||||
const getFilterStateCity = async () => {
|
const getFilterStateCity = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -567,7 +450,7 @@ const Dashboard = (props) => {
|
|||||||
console.log('state--', state, city);
|
console.log('state--', state, city);
|
||||||
console.log('searchText--', searchText);
|
console.log('searchText--', searchText);
|
||||||
|
|
||||||
setSearchResult(!searchResult)
|
// setSearchResult(!searchResult)
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
try {
|
try {
|
||||||
const params = JSON.stringify({
|
const params = JSON.stringify({
|
||||||
@@ -577,6 +460,9 @@ const Dashboard = (props) => {
|
|||||||
"StoreSearchText": searchText ? searchText : "",
|
"StoreSearchText": searchText ? searchText : "",
|
||||||
"UserId": userId || 0,
|
"UserId": userId || 0,
|
||||||
});
|
});
|
||||||
|
console.log('params---->', params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -593,7 +479,7 @@ const Dashboard = (props) => {
|
|||||||
setStoreList(resData)
|
setStoreList(resData)
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
|
|
||||||
console.log('storeSearchApi====>', JSON.stringify(resData));
|
// console.log('storeSearchApi====>', JSON.stringify(resData));
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
@@ -601,21 +487,47 @@ const Dashboard = (props) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderItem = ({ item }) => {
|
const generateYears = (startYear = 2015) => {
|
||||||
const apiData = graphApiData[item.GraphUrl];
|
const currentYear = new Date().getFullYear();
|
||||||
// const values = apiData?.data || [];
|
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));
|
||||||
|
const apiData = graphApiData[item.GraphUrl];
|
||||||
|
// console.log('apiData--->', JSON.stringify(apiData));
|
||||||
|
|
||||||
const values = apiData?.data?.length ? apiData.data : [];
|
const values = apiData?.data?.length ? apiData.data : [];
|
||||||
|
// console.log('values--->', JSON.stringify(values));
|
||||||
|
|
||||||
const scoreValue = values.length > 0 ? Object.values(values[0])[0] : null;
|
// const scoreValue = values.length > 0 ? Object.values(values[0])[0] : null;
|
||||||
// <Text>{scoreValue !== undefined ? `${scoreValue.toFixed(1)}%` : "No Data"}</Text>
|
// <Text>{scoreValue !== undefined ? `${scoreValue.toFixed(1)}%` : "No Data"}</Text>
|
||||||
|
|
||||||
|
|
||||||
console.log('apiData --->', apiData);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (apiData?.status === 'error') {
|
if (apiData?.status === 'error') {
|
||||||
return (
|
return (
|
||||||
<View style={styles.percentBox}>
|
<View style={styles.percentBox}>
|
||||||
@@ -625,15 +537,6 @@ const Dashboard = (props) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (!apiData) {
|
|
||||||
// return (
|
|
||||||
// <View style={[styles.percentBox, { justifyContent: 'center', alignItems: 'center' }]}>
|
|
||||||
// <ActivityIndicator size="small" color="#113F8C" />
|
|
||||||
// </View>
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
switch (item.GraphType) {
|
switch (item.GraphType) {
|
||||||
case "ScoreCard":
|
case "ScoreCard":
|
||||||
const firstDataObj = values[0] || {};
|
const firstDataObj = values[0] || {};
|
||||||
@@ -649,19 +552,109 @@ const Dashboard = (props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
//GIFTED CHART LIBRARY -----
|
//GIFTED CHART LIBRARY -----
|
||||||
|
|
||||||
|
// case "BarGraph":
|
||||||
|
// const chartWidth = screenWidth * 0.80;
|
||||||
|
// const barWidth = 40;
|
||||||
|
// const barColors = ['#1BF2E0', '#1B7BF2', '#1BC0F2'];
|
||||||
|
// console.log('BarGraph-valuesvalues=> ', values);
|
||||||
|
// const barData = values.map((v, idx) => {
|
||||||
|
// const value = parseFloat(Object.values(v).find(val => typeof val === 'number').toFixed(1));
|
||||||
|
// return {
|
||||||
|
// value,
|
||||||
|
// label: v.CalendarYear_Month,
|
||||||
|
// frontColor: barColors[idx % barColors.length],
|
||||||
|
// topLabelComponent: () => (
|
||||||
|
// <Text style={{ color: '#000', fontSize: 12, fontWeight: '500', marginBottom: 5 }}>{value}%</Text>
|
||||||
|
// )
|
||||||
|
// };
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const visibleBars = barData.length;
|
||||||
|
// const totalSpacing = chartWidth - visibleBars * barWidth;
|
||||||
|
// const spacing = totalSpacing / (visibleBars + 1);
|
||||||
|
|
||||||
|
// if (!values || values == '' || values == undefined || values == null) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return (
|
||||||
|
// <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={{ color: '#000', fontSize: 16, fontWeight: '600', marginBottom: 10 }}>
|
||||||
|
// {item.GraphTitle}
|
||||||
|
// </Text>
|
||||||
|
|
||||||
|
// <BarChart
|
||||||
|
// data={barData}
|
||||||
|
// barWidth={barWidth}
|
||||||
|
// spacing={spacing}
|
||||||
|
// noOfSections={6}
|
||||||
|
// maxValue={105}
|
||||||
|
// roundedTop={false}
|
||||||
|
// disableScroll={true}
|
||||||
|
// yAxisLabelTexts={['0%', '20%', '40%', '60%', '80%', '100%']}
|
||||||
|
// // yAxisLabelTexts={['0%', '👉', '👉', '👉', '👉', '100%']} // 👈 only 0% and 100%
|
||||||
|
// yAxisTextStyle={{ color: '#000', fontSize: 12 }}
|
||||||
|
// xAxisLabelTextStyle={{ color: '#000', fontSize: 12, fontWeight: '500', marginTop: 5 }}
|
||||||
|
// isAnimated
|
||||||
|
// width={chartWidth}
|
||||||
|
// hideYAxisText={true} //to hide y axis text
|
||||||
|
// // hideRules={true}
|
||||||
|
// hideYAxisLine={true}
|
||||||
|
// yAxisThickness={0}
|
||||||
|
// xAxisThickness={0}
|
||||||
|
// rulesLength={chartWidth}
|
||||||
|
// // xAxisLength={chartWidth}
|
||||||
|
// hideAxesAndRules={false}
|
||||||
|
// // xAxisLabelTextStyle={{ color: '#000', fontSize: 10, marginTop: 4 }}
|
||||||
|
// />
|
||||||
|
// {/* </View> */}
|
||||||
|
// <View style={{ height: 10, }} />
|
||||||
|
// </View>
|
||||||
|
// );
|
||||||
|
|
||||||
case "BarGraph":
|
case "BarGraph":
|
||||||
const chartWidth = screenWidth * 0.75;
|
const chartWidth = screenWidth * 0.80;
|
||||||
const barWidth = 40;
|
const barWidth = 40;
|
||||||
const barColors = ['#1BF2E0', '#1B7BF2', '#1BC0F2'];
|
const barColors = ['#1BF2E0', '#1B7BF2', '#1BC0F2'];
|
||||||
|
|
||||||
|
// Sample API response (you’ll replace this with real API data)
|
||||||
|
let values2 = [
|
||||||
|
{ "Month_Id": 91, "CalendarYear_Month": "Jul-25", "Share_of_Shelf_Perc": 40.44959 },
|
||||||
|
{ "Month_Id": 92, "CalendarYear_Month": "Aug-25", "Share_of_Shelf_Perc": 44.60024 },
|
||||||
|
{ "Month_Id": 90, "CalendarYear_Month": "Jun-25", "Share_of_Shelf_Perc": 47.94166 },
|
||||||
|
];
|
||||||
|
// console.log('BarGraph-values2values2=> ', JSON.stringify(values2));
|
||||||
|
console.log('BarGraph-values=> ', JSON.stringify(values));
|
||||||
|
|
||||||
|
if (!values2 || values2 == '' || values2 == undefined || values2 == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ✅ Step 1: Sort by Month_Id
|
||||||
|
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) => {
|
const barData = values.map((v, idx) => {
|
||||||
const value = parseFloat(Object.values(v).find(val => typeof val === 'number').toFixed(1));
|
// Find the first numeric field dynamically (excluding Month_Id)
|
||||||
|
const numericKey = Object.keys(v).find(
|
||||||
|
key => key !== "CalendarMonth_ID" && key !== "CalendarYear_Month" && typeof v[key] === "number"
|
||||||
|
);
|
||||||
|
|
||||||
|
const value = numericKey ? parseFloat(v[numericKey].toFixed(1)) : 0;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
value,
|
value,
|
||||||
label: v.CalendarYear_Month,
|
label: v.CalendarYear_Month,
|
||||||
frontColor: barColors[idx % barColors.length],
|
frontColor: barColors[idx % barColors.length],
|
||||||
topLabelComponent: () => (
|
topLabelComponent: () => (
|
||||||
<Text style={{ color: '#000', fontSize: 12, fontWeight: '500', marginBottom: 5 }}>{value}%</Text>
|
<Text style={{ color: '#000', fontSize: 12, fontWeight: '500', marginBottom: 5 }}>
|
||||||
|
{value}%
|
||||||
|
</Text>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -670,59 +663,38 @@ const Dashboard = (props) => {
|
|||||||
const totalSpacing = chartWidth - visibleBars * barWidth;
|
const totalSpacing = chartWidth - visibleBars * barWidth;
|
||||||
const spacing = totalSpacing / (visibleBars + 1);
|
const spacing = totalSpacing / (visibleBars + 1);
|
||||||
|
|
||||||
if (!values || values == '' || values == undefined || values == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ alignItems: 'center', justifyContent: 'center', padding: 10, borderWidth: 0.5, borderRadius: 10, }}>
|
<View style={styles.barGraphView}>
|
||||||
{/* <View style={{ alignSelf: 'center', borderWidth: 0.5,borderRadius:20, paddingBottom: 10 }}> */}
|
<Text style={styles.trendTitle}>{item.GraphTitle}</Text>
|
||||||
|
|
||||||
<Text style={{ fontSize: 16, fontWeight: '600', marginBottom: 10 }}>
|
|
||||||
{item.GraphTitle}
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
<BarChart
|
<BarChart
|
||||||
data={barData}
|
data={barData}
|
||||||
barWidth={barWidth}
|
barWidth={barWidth}
|
||||||
spacing={spacing}
|
spacing={spacing}
|
||||||
noOfSections={5}
|
noOfSections={6}
|
||||||
maxValue={105}
|
maxValue={105}
|
||||||
roundedTop={false}
|
roundedTop={false}
|
||||||
disableScroll={true}
|
disableScroll={true}
|
||||||
yAxisLabelTexts={['0%', '20%', '40%', '60%', '80%', '100%']}
|
yAxisLabelTexts={['0%', '20%', '40%', '60%', '80%', '100%']}
|
||||||
// yAxisLabelTexts={['0%', '👉', '👉', '👉', '👉', '100%']} // 👈 only 0% and 100%
|
|
||||||
yAxisTextStyle={{ color: '#000', fontSize: 12 }}
|
yAxisTextStyle={{ color: '#000', fontSize: 12 }}
|
||||||
xAxisLabelTextStyle={{ color: '#000', fontSize: 12, fontWeight: '500', marginTop: 5 }}
|
xAxisLabelTextStyle={{ color: '#000', fontSize: 12, fontWeight: '500', }}
|
||||||
isAnimated
|
isAnimated
|
||||||
width={chartWidth}
|
width={chartWidth}
|
||||||
|
hideYAxisText={true}
|
||||||
hideYAxisText={true} //to hide y axis text
|
|
||||||
// hideRules={true}
|
|
||||||
hideYAxisLine={true}
|
hideYAxisLine={true}
|
||||||
yAxisThickness={0}
|
yAxisThickness={0}
|
||||||
xAxisThickness={0}
|
xAxisThickness={0}
|
||||||
rulesLength={chartWidth}
|
rulesLength={chartWidth}
|
||||||
// xAxisLength={chartWidth}
|
|
||||||
hideAxesAndRules={false}
|
hideAxesAndRules={false}
|
||||||
// backgroundColor={'red'}
|
|
||||||
|
|
||||||
// backgroundColor={'yellow'}
|
|
||||||
|
|
||||||
// xAxisLabelTextStyle={{ color: '#000', fontSize: 10, marginTop: 4 }}
|
|
||||||
/>
|
/>
|
||||||
{/* </View> */}
|
|
||||||
<View style={{ height: 10 }} />
|
<View style={{ height: 10 }} />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case "Table":
|
case "Table":
|
||||||
return (
|
return (
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<Text style={{ fontSize: 16, fontWeight: '600', marginBottom: 10 }}>{item.GraphTitle}</Text>
|
<Text style={{ color: '#000', fontSize: 16, fontWeight: '600', marginBottom: 10 }}>{item.GraphTitle}</Text>
|
||||||
{values.map((row, index) => {
|
{values.map((row, index) => {
|
||||||
const keys = Object.keys(row);
|
const keys = Object.keys(row);
|
||||||
return (
|
return (
|
||||||
@@ -743,7 +715,7 @@ const Dashboard = (props) => {
|
|||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
||||||
// case "PieChart":
|
case "PieChart":
|
||||||
const pieChartData = values.map((item, idx) => {
|
const pieChartData = values.map((item, idx) => {
|
||||||
const [labelKey, valueKey] = Object.keys(item);
|
const [labelKey, valueKey] = Object.keys(item);
|
||||||
return {
|
return {
|
||||||
@@ -800,7 +772,6 @@ const Dashboard = (props) => {
|
|||||||
}, 300), []);
|
}, 300), []);
|
||||||
|
|
||||||
const feedbackCount = visitedStoreData1?.filter(item => item?.UPLOAD_STATUS == 'U')?.length;
|
const feedbackCount = visitedStoreData1?.filter(item => item?.UPLOAD_STATUS == 'U')?.length;
|
||||||
|
|
||||||
const filteredStores = storeList.filter((store) => {
|
const filteredStores = storeList.filter((store) => {
|
||||||
const query = searchQuery.toLowerCase();
|
const query = searchQuery.toLowerCase();
|
||||||
return (
|
return (
|
||||||
@@ -868,16 +839,19 @@ const Dashboard = (props) => {
|
|||||||
disabled={store?.UPLOAD_STATUS == 'U' ? true : false}
|
disabled={store?.UPLOAD_STATUS == 'U' ? true : false}
|
||||||
onPress={() => onSelectStore(store)}
|
onPress={() => onSelectStore(store)}
|
||||||
key={store.StoreId} style={styles.storeCard}>
|
key={store.StoreId} style={styles.storeCard}>
|
||||||
<View style={[styles.row, { margin: 0 }]}>
|
<View style={[styles.row, { margin: 0, width: "100%" }]}>
|
||||||
<Text style={styles.cardTextBold}>{store.StoreName}</Text>
|
<View style={{ width: "70%" }}>
|
||||||
|
<Text style={styles.cardTextBold}>{store.StoreName}</Text>
|
||||||
|
</View>
|
||||||
{store?.UPLOAD_STATUS === 'U' ?
|
{store?.UPLOAD_STATUS === 'U' ?
|
||||||
<Image source={IMAGES.greenTick} style={{ height: 20, width: 20 }} />
|
<Image source={IMAGES.greenTick} style={{ height: 20, width: 20 }} />
|
||||||
:
|
:
|
||||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
<View style={{ width: "30%", flexDirection: 'row', alignItems: 'center' }}>
|
||||||
<View style={{ backgroundColor: '#FFF8CD', padding: 5, paddingHorizontal: 7, borderRadius: 15 }}>
|
<View style={{ flexDirection: 'row', backgroundColor: '#ffefd5', padding: 5, paddingHorizontal: 10, borderRadius: 15 }}>
|
||||||
<Text style={{ color: 'orange', fontSize: 13, fontWeight: '500' }}>Pending</Text>
|
<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>
|
</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>
|
||||||
}
|
}
|
||||||
</View>
|
</View>
|
||||||
@@ -904,14 +878,13 @@ const Dashboard = (props) => {
|
|||||||
onRightPress={() => setFeedBackModal(true)}
|
onRightPress={() => setFeedBackModal(true)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
{/* Store Name Card */}
|
||||||
<View style={styles.row}>
|
<View style={styles.row}>
|
||||||
<View style={styles.selectedStoreText}>
|
<View style={styles.selectedStoreText}>
|
||||||
{/* <Text style={[styles.storeNameText, { width: '90%' }]}> {`${storeData?.StoreName} \n(Store Id :${storeData?.StoreId})`}</Text> */}
|
<View style={{ width: '88%' }}>
|
||||||
<View style={{ width: '90%' }}>
|
|
||||||
<Text style={[styles.storeNameText, {}]}>{storeData?.StoreName}</Text>
|
<Text style={[styles.storeNameText, {}]}>{storeData?.StoreName}</Text>
|
||||||
<Text style={{ color: GlobalTheme.colors.gray, fontSize: 13 }}>Store Id : {storeData?.StoreId}</Text>
|
<Text style={{ color: GlobalTheme.colors.gray, fontSize: 13 }}>Store Id : {storeData?.StoreId}</Text>
|
||||||
</View>
|
</View>
|
||||||
<Text style={{}}></Text>
|
|
||||||
<TouchableOpacity onPress={() => openBottomSheet()} style={styles.filterIcon}>
|
<TouchableOpacity onPress={() => openBottomSheet()} style={styles.filterIcon}>
|
||||||
<Image source={IMAGES.filterIcon} style={{ height: 18, width: 18 }} />
|
<Image source={IMAGES.filterIcon} style={{ height: 18, width: 18 }} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@@ -960,7 +933,6 @@ const Dashboard = (props) => {
|
|||||||
<View style={styles.seperator} />
|
<View style={styles.seperator} />
|
||||||
|
|
||||||
{/* Main Tab */}
|
{/* Main Tab */}
|
||||||
|
|
||||||
<View style={{ flexDirection: 'row' }}>
|
<View style={{ flexDirection: 'row' }}>
|
||||||
{mainTabs.map((tab, index) => {
|
{mainTabs.map((tab, index) => {
|
||||||
const isSelected = index === mainTabIndex;
|
const isSelected = index === mainTabIndex;
|
||||||
@@ -1014,29 +986,31 @@ const Dashboard = (props) => {
|
|||||||
|
|
||||||
{/* Score Card */}
|
{/* Score Card */}
|
||||||
<View style={{ margin: 5 }}>
|
<View style={{ margin: 5 }}>
|
||||||
|
<View style={{ marginHorizontal: 5, marginTop: 5 }}>
|
||||||
<View style={{ marginHorizontal: 5 }}>
|
|
||||||
{firstItem && (
|
{firstItem && (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
activeOpacity={0.8}
|
activeOpacity={0.8}
|
||||||
|
// onPress={() => {
|
||||||
|
// if (firstItem.clickable === 1 && firstItem.DetailsPage?.length > 0) {
|
||||||
|
// setSelectedDetails(firstItem.DetailsPage);
|
||||||
|
// setShowDetailsModal(true);
|
||||||
|
// fetchDetailGraphs(firstItem.DetailsPage);
|
||||||
|
// }
|
||||||
|
// }}
|
||||||
|
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
if (firstItem.clickable === 1 && firstItem.DetailsPage?.length > 0) {
|
if (firstItem.clickable === 1 && firstItem.DetailsPage?.length > 0) {
|
||||||
setSelectedDetails(firstItem.DetailsPage);
|
navigation.navigate('Details', {
|
||||||
setShowDetailsModal(true);
|
selectedDetails: firstItem.DetailsPage,
|
||||||
fetchDetailGraphs(firstItem.DetailsPage);
|
storeData,
|
||||||
|
year,
|
||||||
|
month,
|
||||||
|
mainTabIndex
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View
|
<View style={{ width: '48%', height: 100, minHeight: 100, borderRadius: 20, justifyContent: 'center', alignItems: 'center', backgroundColor: "#C3D7FF", width: '100%', elevation: 0, }} >
|
||||||
style={[
|
|
||||||
styles.percentBox,
|
|
||||||
{
|
|
||||||
backgroundColor: "#C3D7FF",
|
|
||||||
width: '100%',
|
|
||||||
elevation: 0,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||||
<View style={{ width: '80%', alignItems: 'center' }}>
|
<View style={{ width: '80%', alignItems: 'center' }}>
|
||||||
<Text style={styles.boxText}>{firstItem.GraphTitle}</Text>
|
<Text style={styles.boxText}>{firstItem.GraphTitle}</Text>
|
||||||
@@ -1286,7 +1260,7 @@ const Dashboard = (props) => {
|
|||||||
<View style={[styles.row, {}]}>
|
<View style={[styles.row, {}]}>
|
||||||
<Text style={styles.dropHeaderText}>State</Text>
|
<Text style={styles.dropHeaderText}>State</Text>
|
||||||
<Text style={styles.dropHeaderText}> City</Text>
|
<Text style={styles.dropHeaderText}> City</Text>
|
||||||
<Text style={styles.dropHeaderText}> ASM Area</Text>
|
{/* <Text style={styles.dropHeaderText}> ASM Area</Text> */}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Dropdown */}
|
{/* Dropdown */}
|
||||||
@@ -1340,9 +1314,9 @@ const Dashboard = (props) => {
|
|||||||
const uniqueAsms = Array.from(new Map(asms.map(a => [a.value, a])).values());
|
const uniqueAsms = Array.from(new Map(asms.map(a => [a.value, a])).values());
|
||||||
|
|
||||||
setCityOptions(uniqueCities);
|
setCityOptions(uniqueCities);
|
||||||
setAsmOptions(uniqueAsms);
|
// setAsmOptions(uniqueAsms);
|
||||||
setCity(null); // reset
|
setCity(null); // reset
|
||||||
setAsmArea(null); // reset
|
// setAsmArea(null); // reset
|
||||||
}}
|
}}
|
||||||
containerStyle={{ flex: 1 }}
|
containerStyle={{ flex: 1 }}
|
||||||
/>
|
/>
|
||||||
@@ -1356,12 +1330,12 @@ const Dashboard = (props) => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* ASM Area Dropdown */}
|
{/* ASM Area Dropdown */}
|
||||||
<CustomDropdown
|
{/* <CustomDropdown
|
||||||
data={asmOptions}
|
data={asmOptions}
|
||||||
value={asmArea}
|
value={asmArea}
|
||||||
onChange={(item) => setAsmArea(item.value)}
|
onChange={(item) => setAsmArea(item.value)}
|
||||||
containerStyle={{ flex: 1 }}
|
containerStyle={{ flex: 1 }}
|
||||||
/>
|
/> */}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
@@ -1382,38 +1356,38 @@ const Dashboard = (props) => {
|
|||||||
textstyle={{ color: GlobalTheme.colors.white, fontSize: GlobalTheme.typography.fontSize.medium }}
|
textstyle={{ color: GlobalTheme.colors.white, fontSize: GlobalTheme.typography.fontSize.medium }}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
{searchResult ?
|
|
||||||
<View style={{ marginBottom: 70 }}>
|
|
||||||
<View style={{ marginTop: 20 }}>
|
|
||||||
{/* <Text style={{ color: '#000', fontSize: 14 }}>{storeList ? storeList.length : 0} Store</Text> */}
|
|
||||||
<Text style={{ color: '#000', fontSize: 14 }}>{filteredStores.length} Store{filteredStores.length !== 1 ? 's' : ''}</Text>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<View style={styles.searchByID}>
|
|
||||||
<Image source={IMAGES.searchIcon} style={{ height: 15, width: 15 }} />
|
|
||||||
<TextInput
|
|
||||||
placeholder="Search by Store Name or Store ID"
|
|
||||||
placeholderTextColor={'gray'}
|
|
||||||
value={searchQuery}
|
|
||||||
onChangeText={setSearchQuery}
|
|
||||||
style={{ color: '#000', marginLeft: 5, height: 38, width: '95%' }}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{filteredStores && filteredStores.length > 0 ? filteredStores.map((store) => (
|
|
||||||
<TouchableOpacity onPress={() => onSelectStore(store)}
|
|
||||||
key={store.StoreId} style={styles.storeCard}>
|
|
||||||
<Text style={styles.cardTextBold}>{store.StoreName}</Text>
|
|
||||||
<Text style={styles.cardText}>{store.Address}</Text>
|
|
||||||
<Text style={styles.cardText}>{'Store Id:'} {store.StoreId}</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
)) : null
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
<View style={{ marginBottom: 70 }}>
|
||||||
|
<View style={{ marginTop: 20 }}>
|
||||||
|
{/* <Text style={{ color: '#000', fontSize: 14 }}>{storeList ? storeList.length : 0} Store</Text> */}
|
||||||
|
<Text style={{ color: '#000', fontSize: 14 }}>{filteredStores.length} Store{filteredStores.length !== 1 ? 's' : ''}</Text>
|
||||||
</View>
|
</View>
|
||||||
: null
|
|
||||||
}
|
<View style={styles.searchByID}>
|
||||||
|
<Image source={IMAGES.searchIcon} style={{ height: 15, width: 15 }} />
|
||||||
|
<TextInput
|
||||||
|
placeholder="Search by Store Name or Store ID"
|
||||||
|
placeholderTextColor={'gray'}
|
||||||
|
value={searchQuery}
|
||||||
|
onChangeText={setSearchQuery}
|
||||||
|
style={{ color: '#000', marginLeft: 5, height: 38, width: '95%' }}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{filteredStores && filteredStores.length > 0 ? filteredStores.map((store) => (
|
||||||
|
<TouchableOpacity onPress={() => onSelectStore(store)}
|
||||||
|
key={store.StoreId} style={styles.storeCard}>
|
||||||
|
<Text style={styles.cardTextBold}>{store.StoreName}</Text>
|
||||||
|
<Text style={styles.cardText}>{store.Address}</Text>
|
||||||
|
<Text style={styles.cardText}>{'Store Id:'} {store.StoreId}</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
))
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</View>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
@@ -1436,5 +1410,3 @@ const Dashboard = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default Dashboard
|
export default Dashboard
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,631 @@
|
|||||||
|
{
|
||||||
|
"Tabs": [
|
||||||
|
{
|
||||||
|
"MainTabId": 1,
|
||||||
|
"MainTabName": "MTD",
|
||||||
|
"MainTabData": {
|
||||||
|
"subTabs": [
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"TabName": "PSS Score",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"TabName": "PSS Trend",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"TabName": "SOS Actual",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 4,
|
||||||
|
"TabName": "OSA",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"TabName": "Asset",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"TabName": "Promotion",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"graphDetails": [
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "PSS Score",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/pssscore",
|
||||||
|
"GraphBackground": "#C3D7FF",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 2,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "SOS Actual",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Actual_Perc",
|
||||||
|
"GraphBackground": "#E2C8FE",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 4,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "OSA",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/OSA_Perc",
|
||||||
|
"GraphBackground": "#FFF9A1",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Asset",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/Asset_Perc",
|
||||||
|
"GraphBackground": "#A2F3DE",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 6,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Promotion",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/Promotion_Perc",
|
||||||
|
"GraphBackground": "#BFC2FF",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "PSS Score",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Actual_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 0,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "PSS - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/sos_actual_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 2,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "PSS Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/sos_actual_trend_perc_mtd",
|
||||||
|
"GraphBackground": "#F4EAFF",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 0,
|
||||||
|
"gridLinesV": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "SOS Actual",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Actual_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "SOS - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/sos_actual_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 4,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "SOS Actual Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/sos_actual_trend_perc_mtd",
|
||||||
|
"GraphBackground": "#F4EAFF",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 0,
|
||||||
|
"gridLinesV": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 4,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "OSA",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/OSA_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "OSA - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/osa_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 4,
|
||||||
|
"GraphId": 6,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "OSA",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/osa_trend_perc_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 7,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Asset",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/Asset_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/asset_availability_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Additional Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/additional_visibility_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 8,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "Asset Details",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/asset_trend_perc_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 9,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Promotion",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/Promotion_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 9,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Promotion Not Executed",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/promotion_not_executed_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 10,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Promotion executed",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/promotion_executed_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 11,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "Promotion",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/promotion_trend_perc_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"MainTabId": 2,
|
||||||
|
"MainTabName": "Last Visit",
|
||||||
|
"MainTabData": {
|
||||||
|
"subTabs": [
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"TabName": "PSS Score",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"TabName": "SOS Actual",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 4,
|
||||||
|
"TabName": "OSA",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"TabName": "Asset",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"TabName": "Promotion",
|
||||||
|
"TabRow": 1,
|
||||||
|
"TabCol": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"graphDetails": [
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "PSS Score",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/PSS_Score_LSV_Perc",
|
||||||
|
"GraphBackground": "#E2C8FE",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 2,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "SOS Actual",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_actual_lsv_perc",
|
||||||
|
"GraphBackground": "#E2C8FE",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 4,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "OSA",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/osa_lsv_perc",
|
||||||
|
"GraphBackground": "#FFF9A1",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Asset",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/asset_lsv_perc",
|
||||||
|
"GraphBackground": "#A2F3DE",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 1,
|
||||||
|
"GraphId": 6,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Promotion",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/promotion_lsv_perc",
|
||||||
|
"GraphBackground": "#BFC2FF",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "PSS Score",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Actual_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 0,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "PSS - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/sos_actual_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 2,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "PSS Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/sos_actual_trend_perc_mtd",
|
||||||
|
"GraphBackground": "#F4EAFF",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 0,
|
||||||
|
"gridLinesV": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "SOS Actual",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_actual_lsv_perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "SOS Actual - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/sos_actual_lsv_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 4,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "SOS Actual Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/sos_actual_trend_lsv_perc",
|
||||||
|
"GraphBackground": "#F4EAFF",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 1,
|
||||||
|
"gridLinesV": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 4,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "OSA",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/osa_lsv_perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 4,
|
||||||
|
"GraphId": 7,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "OSA - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/osa_lsv_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 4,
|
||||||
|
"GraphId": 6,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "OSA Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/osa_trend_lsv_perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 7,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Asset",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/asset_lsv_perc",
|
||||||
|
"GraphBa ckground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/asset_availability_lsv",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Additional Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/additional_visibility_lsv",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 8,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "Asset Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/asset_trend_lsv_perc",
|
||||||
|
"GraphBackground": "#fff",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 1,
|
||||||
|
"gridLinesV": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 9,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Promotion",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/promotion_lsv_perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 9,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Promotion Not Executed",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/promotion_not_executed_lsv",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 10,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Promotion executed",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/promotion_executed_lsv",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 11,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "Promotion",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/promotion_trend_lsv_perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -13,15 +13,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 2,
|
"TabId": 2,
|
||||||
"TabName": "SOS Actual",
|
"TabName": "PSS Trend",
|
||||||
"TabRow": 1,
|
"TabRow": 1,
|
||||||
"TabCol": 2
|
"TabCol": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 3,
|
"TabId": 3,
|
||||||
"TabName": "SOS Compliance",
|
"TabName": "SOS Actual",
|
||||||
"TabRow": 1,
|
"TabRow": 1,
|
||||||
"TabCol": 3
|
"TabCol": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 4,
|
"TabId": 4,
|
||||||
@@ -42,6 +42,9 @@
|
|||||||
"TabCol": 6
|
"TabCol": 6
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"graphDetails": [
|
"graphDetails": [
|
||||||
{
|
{
|
||||||
"TabId": 1,
|
"TabId": 1,
|
||||||
@@ -61,15 +64,6 @@
|
|||||||
"GraphBackground": "#E2C8FE",
|
"GraphBackground": "#E2C8FE",
|
||||||
"GraphOptions": {}
|
"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,
|
"TabId": 1,
|
||||||
"GraphId": 4,
|
"GraphId": 4,
|
||||||
@@ -97,10 +91,62 @@
|
|||||||
"GraphBackground": "#BFC2FF",
|
"GraphBackground": "#BFC2FF",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"TabId": 2,
|
"TabId": 2,
|
||||||
"GraphId": 1,
|
"GraphId": 1,
|
||||||
"GraphType": "ScoreCard",
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "PSS Score",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/pssscore",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 0,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "PSS - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/sos_actual_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 2,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "PSS Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/pss_trend_perc_mtd_O",
|
||||||
|
"GraphBackground": "#F4EAFF",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 0,
|
||||||
|
"gridLinesV": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
"GraphTitle": "SOS Actual",
|
"GraphTitle": "SOS Actual",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Actual_Perc",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Actual_Perc",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
@@ -119,11 +165,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 2,
|
"TabId": 3,
|
||||||
"GraphId": 2,
|
"GraphId": 4,
|
||||||
"GraphType": "BarGraph",
|
"GraphType": "BarGraph",
|
||||||
"GraphTitle": "SOS Actual Trend",
|
"GraphTitle": "SOS Actual Trend",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/sos_actual_trend_perc_mtd",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/sos_actual_trend_perc_mtd_O",
|
||||||
"GraphBackground": "#F4EAFF",
|
"GraphBackground": "#F4EAFF",
|
||||||
"GraphOptions": {
|
"GraphOptions": {
|
||||||
"axisX": "month",
|
"axisX": "month",
|
||||||
@@ -138,89 +184,14 @@
|
|||||||
"gridLinesV": 0
|
"gridLinesV": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"TabId": 3,
|
|
||||||
"GraphId": 3,
|
|
||||||
"GraphType": "ScoreCard",
|
|
||||||
"GraphTitle": "SOS Compliance",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/SOS_Compliance_Perc",
|
{
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {},
|
|
||||||
"clickable": 1,
|
|
||||||
"DetailsPage": [
|
|
||||||
{
|
|
||||||
"TabId": 3,
|
|
||||||
"GraphId": 3,
|
|
||||||
"GraphType": "Table",
|
|
||||||
"GraphTitle": "SOS Compliance - Category",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/sos_sompliance_perc_on_category",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 3,
|
|
||||||
"GraphId": 4,
|
|
||||||
"GraphType": "BarGraph",
|
|
||||||
"GraphTitle": "SOS Compliance Trend",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/sos_compliance_trend_perc_mtd",
|
|
||||||
"GraphBackground": "#fff",
|
|
||||||
"GraphOptions": {
|
|
||||||
"axisX": "month",
|
|
||||||
"axisY": "score",
|
|
||||||
"labelShow": 1,
|
|
||||||
"barColors": [
|
|
||||||
"#11a4ff",
|
|
||||||
"#0ea3e3",
|
|
||||||
"#0b9ddb"
|
|
||||||
],
|
|
||||||
"gridLinesH": 1,
|
|
||||||
"gridLinesV": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 5,
|
|
||||||
"GraphType": "ScoreCard",
|
|
||||||
"GraphTitle": "Asset",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/Asset_Perc",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {},
|
|
||||||
"clickable": 1,
|
|
||||||
"DetailsPage": [
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 5,
|
|
||||||
"GraphType": "Table",
|
|
||||||
"GraphTitle": "Asset Availability",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/asset_availability_mtd",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 5,
|
|
||||||
"GraphType": "Table",
|
|
||||||
"GraphTitle": "Asset",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/additional_visibility_mtd",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 6,
|
|
||||||
"GraphType": "BarGraph",
|
|
||||||
"GraphTitle": "Asset Details",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/asset_trend_perc_mtd",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 4,
|
"TabId": 4,
|
||||||
"GraphId": 7,
|
"GraphId": 5,
|
||||||
"GraphType": "ScoreCard",
|
"GraphType": "ScoreCard",
|
||||||
"GraphTitle": "OSA",
|
"GraphTitle": "OSA",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/OSA_Perc",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/OSA_Perc",
|
||||||
@@ -232,7 +203,7 @@
|
|||||||
"TabId": 3,
|
"TabId": 3,
|
||||||
"GraphId": 3,
|
"GraphId": 3,
|
||||||
"GraphType": "Table",
|
"GraphType": "Table",
|
||||||
"GraphTitle": "SOS Compliance - Category",
|
"GraphTitle": "OSA - Category",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/osa_perc_on_category",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/osa_perc_on_category",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
@@ -241,13 +212,57 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 4,
|
"TabId": 4,
|
||||||
"GraphId": 8,
|
"GraphId": 6,
|
||||||
"GraphType": "BarGraph",
|
"GraphType": "BarGraph",
|
||||||
"GraphTitle": "OSA",
|
"GraphTitle": "OSA",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/osa_trend_perc_mtd",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/osa_trend_perc_mtd_O",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 7,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Asset",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/mtd/Asset_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/asset_availability_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Additional Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/additional_visibility_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 8,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "Asset Details",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/asset_trend_perc_mtd_O",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"TabId": 6,
|
"TabId": 6,
|
||||||
"GraphId": 9,
|
"GraphId": 9,
|
||||||
@@ -262,25 +277,51 @@
|
|||||||
"TabId": 6,
|
"TabId": 6,
|
||||||
"GraphId": 9,
|
"GraphId": 9,
|
||||||
"GraphType": "Table",
|
"GraphType": "Table",
|
||||||
"GraphTitle": "Promotion Availability",
|
"GraphTitle": "Promotion Not Executed",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/promotion_availability_mtd",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/promotion_not_executed_mtd",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 10,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Promotion executed",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/promotion_executed_mtd",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 6,
|
"TabId": 6,
|
||||||
"GraphId": 10,
|
"GraphId": 11,
|
||||||
"GraphType": "BarGraph",
|
"GraphType": "BarGraph",
|
||||||
"GraphTitle": "Promotion",
|
"GraphTitle": "Promotion",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/promotion_trend_perc_mtd",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpimtd/promotion_trend_perc_mtd_O",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"MainTabId": 2,
|
"MainTabId": 2,
|
||||||
"MainTabName": "Last Visit",
|
"MainTabName": "Last Visit",
|
||||||
@@ -292,17 +333,18 @@
|
|||||||
"TabRow": 1,
|
"TabRow": 1,
|
||||||
"TabCol": 1
|
"TabCol": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 2,
|
"TabId": 2,
|
||||||
"TabName": "SOS Actual",
|
"TabName": "PSS Trend",
|
||||||
"TabRow": 1,
|
"TabRow": 1,
|
||||||
"TabCol": 2
|
"TabCol": 2
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"TabId": 3,
|
"TabId": 3,
|
||||||
"TabName": "SOS Compliance",
|
"TabName": "SOS Actual",
|
||||||
"TabRow": 1,
|
"TabRow": 1,
|
||||||
"TabCol": 3
|
"TabCol": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 4,
|
"TabId": 4,
|
||||||
@@ -342,15 +384,6 @@
|
|||||||
"GraphBackground": "#E2C8FE",
|
"GraphBackground": "#E2C8FE",
|
||||||
"GraphOptions": {}
|
"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,
|
"TabId": 1,
|
||||||
"GraphId": 4,
|
"GraphId": 4,
|
||||||
@@ -378,10 +411,63 @@
|
|||||||
"GraphBackground": "#BFC2FF",
|
"GraphBackground": "#BFC2FF",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
"TabId": 2,
|
"TabId": 2,
|
||||||
"GraphId": 1,
|
"GraphId": 1,
|
||||||
"GraphType": "ScoreCard",
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "PSS Score",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/PSS_Score_LSV_Perc",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 0,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 1,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "PSS - Category",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detmtd/sos_actual_perc_on_category",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 2,
|
||||||
|
"GraphId": 2,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "PSS Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/pss_trend_perc_lsv_O",
|
||||||
|
"GraphBackground": "#F4EAFF",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 0,
|
||||||
|
"gridLinesV": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 3,
|
||||||
|
"GraphId": 3,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
"GraphTitle": "SOS Actual",
|
"GraphTitle": "SOS Actual",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_actual_lsv_perc",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_actual_lsv_perc",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
@@ -400,11 +486,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 2,
|
"TabId": 3,
|
||||||
"GraphId": 2,
|
"GraphId": 4,
|
||||||
"GraphType": "BarGraph",
|
"GraphType": "BarGraph",
|
||||||
"GraphTitle": "SOS Actual Trend",
|
"GraphTitle": "SOS Actual Trend",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/sos_actual_trend_lsv_perc",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/sos_actual_trend_lsv_perc_O",
|
||||||
"GraphBackground": "#F4EAFF",
|
"GraphBackground": "#F4EAFF",
|
||||||
"GraphOptions": {
|
"GraphOptions": {
|
||||||
"axisX": "month",
|
"axisX": "month",
|
||||||
@@ -419,100 +505,14 @@
|
|||||||
"gridLinesV": 1
|
"gridLinesV": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"TabId": 3,
|
|
||||||
"GraphId": 3,
|
|
||||||
"GraphType": "ScoreCard",
|
|
||||||
"GraphTitle": "SOS Compliance",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/sos_compliance_lsv_perc",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {},
|
|
||||||
"clickable": 1,
|
|
||||||
"DetailsPage": [
|
|
||||||
{
|
|
||||||
"TabId": 3,
|
|
||||||
"GraphId": 3,
|
|
||||||
"GraphType": "Table",
|
|
||||||
"GraphTitle": "SOS Actual - Category",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/sos_compliance_lsv_perc_on_category",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 3,
|
|
||||||
"GraphId": 4,
|
|
||||||
"GraphType": "BarGraph",
|
|
||||||
"GraphTitle": "SOS Compliance Trend",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/sos_compliance_trend_lsv_perc",
|
|
||||||
"GraphBackground": "#fff",
|
|
||||||
"GraphOptions": {
|
|
||||||
"axisX": "month",
|
|
||||||
"axisY": "score",
|
|
||||||
"labelShow": 1,
|
|
||||||
"barColors": [
|
|
||||||
"#11a4ff",
|
|
||||||
"#0ea3e3",
|
|
||||||
"#0b9ddb"
|
|
||||||
],
|
|
||||||
"gridLinesH": 1,
|
|
||||||
"gridLinesV": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 5,
|
|
||||||
"GraphType": "ScoreCard",
|
|
||||||
"GraphTitle": "Asset",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/asset_lsv_perc",
|
|
||||||
"GraphBa ckground": "#ECFFFA",
|
|
||||||
"GraphOptions": {},
|
|
||||||
"clickable": 1,
|
|
||||||
"DetailsPage": [
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 5,
|
|
||||||
"GraphType": "Table",
|
|
||||||
"GraphTitle": "Asset Availability",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/asset_availability_lsv",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 5,
|
|
||||||
"GraphType": "Table",
|
|
||||||
"GraphTitle": "Asset",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/additional_visibility_lsv",
|
|
||||||
"GraphBackground": "#ECFFFA",
|
|
||||||
"GraphOptions": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"TabId": 5,
|
|
||||||
"GraphId": 6,
|
|
||||||
"GraphType": "BarGraph",
|
|
||||||
"GraphTitle": "Asset Details",
|
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/asset_trend_lsv_perc",
|
|
||||||
"GraphBackground": "#fff",
|
|
||||||
"GraphOptions": {
|
|
||||||
"axisX": "month",
|
|
||||||
"axisY": "score",
|
|
||||||
"labelShow": 1,
|
|
||||||
"barColors": [
|
|
||||||
"#11a4ff",
|
|
||||||
"#0ea3e3",
|
|
||||||
"#0b9ddb"
|
|
||||||
],
|
|
||||||
"gridLinesH": 1,
|
|
||||||
"gridLinesV": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"TabId": 4,
|
"TabId": 4,
|
||||||
"GraphId": 7,
|
"GraphId": 5,
|
||||||
"GraphType": "ScoreCard",
|
"GraphType": "ScoreCard",
|
||||||
"GraphTitle": "OSA",
|
"GraphTitle": "OSA",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/osa_lsv_perc",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/osa_lsv_perc",
|
||||||
@@ -524,7 +524,7 @@
|
|||||||
"TabId": 4,
|
"TabId": 4,
|
||||||
"GraphId": 7,
|
"GraphId": 7,
|
||||||
"GraphType": "Table",
|
"GraphType": "Table",
|
||||||
"GraphTitle": "SOS Actual - Category",
|
"GraphTitle": "OSA - Category",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/osa_lsv_perc_on_category",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/osa_lsv_perc_on_category",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
@@ -533,13 +533,65 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 4,
|
"TabId": 4,
|
||||||
"GraphId": 8,
|
"GraphId": 6,
|
||||||
"GraphType": "BarGraph",
|
"GraphType": "BarGraph",
|
||||||
"GraphTitle": "OSA",
|
"GraphTitle": "OSA Trend",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/osa_trend_lsv_perc",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/osa_trend_lsv_perc_O",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 7,
|
||||||
|
"GraphType": "ScoreCard",
|
||||||
|
"GraphTitle": "Asset",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/lsv/asset_lsv_perc",
|
||||||
|
"GraphBa ckground": "#ECFFFA",
|
||||||
|
"GraphOptions": {},
|
||||||
|
"clickable": 1,
|
||||||
|
"DetailsPage": [
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/asset_availability_lsv",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 5,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Additional Visibility",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/additional_visibility_lsv",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 5,
|
||||||
|
"GraphId": 8,
|
||||||
|
"GraphType": "BarGraph",
|
||||||
|
"GraphTitle": "Asset Trend",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/asset_trend_lsv_perc_O",
|
||||||
|
"GraphBackground": "#fff",
|
||||||
|
"GraphOptions": {
|
||||||
|
"axisX": "month",
|
||||||
|
"axisY": "score",
|
||||||
|
"labelShow": 1,
|
||||||
|
"barColors": [
|
||||||
|
"#11a4ff",
|
||||||
|
"#0ea3e3",
|
||||||
|
"#0b9ddb"
|
||||||
|
],
|
||||||
|
"gridLinesH": 1,
|
||||||
|
"gridLinesV": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"TabId": 6,
|
"TabId": 6,
|
||||||
"GraphId": 9,
|
"GraphId": 9,
|
||||||
@@ -554,8 +606,17 @@
|
|||||||
"TabId": 6,
|
"TabId": 6,
|
||||||
"GraphId": 9,
|
"GraphId": 9,
|
||||||
"GraphType": "Table",
|
"GraphType": "Table",
|
||||||
"GraphTitle": "Promotion Availability",
|
"GraphTitle": "Promotion Not Executed",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/promotion_availability_lsv",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/promotion_not_executed_lsv",
|
||||||
|
"GraphBackground": "#ECFFFA",
|
||||||
|
"GraphOptions": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TabId": 6,
|
||||||
|
"GraphId": 10,
|
||||||
|
"GraphType": "Table",
|
||||||
|
"GraphTitle": "Promotion executed",
|
||||||
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/detlsv/promotion_executed_lsv",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
}
|
}
|
||||||
@@ -563,10 +624,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TabId": 6,
|
"TabId": 6,
|
||||||
"GraphId": 10,
|
"GraphId": 11,
|
||||||
"GraphType": "BarGraph",
|
"GraphType": "BarGraph",
|
||||||
"GraphTitle": "Promotion",
|
"GraphTitle": "Promotion",
|
||||||
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/promotion_trend_lsv_perc",
|
"GraphUrl": "https://dax.parinaam.in/execute/dabur/kpilsv/promotion_trend_lsv_perc_O",
|
||||||
"GraphBackground": "#ECFFFA",
|
"GraphBackground": "#ECFFFA",
|
||||||
"GraphOptions": {}
|
"GraphOptions": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export const styles = StyleSheet.create({
|
|||||||
fontWeight: '400'
|
fontWeight: '400'
|
||||||
},
|
},
|
||||||
dropHeaderText: {
|
dropHeaderText: {
|
||||||
width: '33%',
|
width: '50%',
|
||||||
color: '#000',
|
color: '#000',
|
||||||
fontWeight: '400',
|
fontWeight: '400',
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
@@ -202,7 +202,7 @@ export const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
filterIcon: {
|
filterIcon: {
|
||||||
backgroundColor: '#D8E3F1',
|
backgroundColor: '#D8E3F1',
|
||||||
padding: 3,
|
padding: 5,
|
||||||
borderRadius: 5
|
borderRadius: 5
|
||||||
},
|
},
|
||||||
storeInfoText: {
|
storeInfoText: {
|
||||||
@@ -217,9 +217,20 @@ export const styles = StyleSheet.create({
|
|||||||
minHeight: 100,
|
minHeight: 100,
|
||||||
backgroundColor: '#EAF1FF',
|
backgroundColor: '#EAF1FF',
|
||||||
borderRadius: 20,
|
borderRadius: 20,
|
||||||
elevation: 2,
|
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: '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: {
|
boxText: {
|
||||||
color: '#000',
|
color: '#000',
|
||||||
@@ -352,5 +363,19 @@ export const styles = StyleSheet.create({
|
|||||||
marginTop: 10,
|
marginTop: 10,
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
|
|
||||||
}
|
},
|
||||||
|
barGraphView: {
|
||||||
|
width: '100%',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
padding: 10,
|
||||||
|
borderWidth: 0.5,
|
||||||
|
borderRadius: 25,
|
||||||
|
},
|
||||||
|
trendTitle: {
|
||||||
|
color: '#000',
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: '600',
|
||||||
|
marginBottom: 10
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,319 +1,567 @@
|
|||||||
import React, { useState, useRef, useEffect } from 'react';
|
<<<<<<< HEAD
|
||||||
import { View, Text, TouchableOpacity, ScrollView, FlatList } from 'react-native';
|
import React, { useState , useRef} from 'react';
|
||||||
import { styles } from './style';
|
import {View,Text,TouchableOpacity,ScrollView,FlatList} from 'react-native';
|
||||||
import GlobalTheme, { horizonalLine, Screen } from '../../../theme/theme';
|
import { styles } from './style';
|
||||||
import CustomHeader from '../../../components/CustomHeader';
|
import { horizonalLine, Screen } from '../../../theme/theme';
|
||||||
import IMAGES from '../../../constants/Images';
|
|
||||||
import axios from 'axios';
|
const storeinfodata = [
|
||||||
import Loader from '../../../constants/Loader';
|
{
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
tabId: 0,
|
||||||
|
section: 'Store details',
|
||||||
const storeinfodata = [
|
items: [
|
||||||
{
|
{ brand: 'Store Name', name: 'Reliance Smart' },
|
||||||
tabId: 0,
|
{ brand: 'Store ID', name: '#98440' },
|
||||||
section: 'Store details',
|
{ brand: 'Address', name: 'Rabindra Nagar, Delhi 110003' },
|
||||||
items: [
|
{ brand: 'City', name: 'Okhla' },
|
||||||
{ brand: 'Store Name', name: 'Reliance Smart' },
|
{ brand: 'Store Size', name: '1500–2000 sq ft' },
|
||||||
{ brand: 'Store ID', name: '#98440' },
|
{ brand: 'Average Footfall', name: '10000' },
|
||||||
{ brand: 'Address', name: 'Rabindra Nagar, Delhi 110003' },
|
{ brand: 'Store age', name: '8' },
|
||||||
{ brand: 'City', name: 'Okhla' },
|
{ brand: 'Store Ranking', name: '24' },
|
||||||
{ brand: 'Store Size', name: '1500–2000 sq ft' },
|
],
|
||||||
{ brand: 'Average Footfall', name: '10000' },
|
},
|
||||||
{ brand: 'Store age', name: '8' },
|
{
|
||||||
{ brand: 'Store Ranking', name: '24' },
|
tabId: 0,
|
||||||
],
|
section: 'Dabur Employees',
|
||||||
},
|
items: [
|
||||||
{
|
{ brand: 'RKAM', name: 'Rajesh Paal Singh' },
|
||||||
tabId: 0,
|
{ brand: 'SO', name: 'Soniya Singhal' },
|
||||||
section: 'Dabur Employees',
|
],
|
||||||
items: [
|
},
|
||||||
{ brand: 'RKAM', name: 'Rajesh Paal Singh' },
|
{
|
||||||
{ brand: 'SO', name: 'Soniya Singhal' },
|
tabId: 0,
|
||||||
],
|
section: '3P employees',
|
||||||
},
|
items: [
|
||||||
{
|
{ brand: 'Promoter Name', name: 'Payal Singh' },
|
||||||
tabId: 0,
|
{ brand: 'AM Name', name: 'Soniya Singhal' },
|
||||||
section: '3P employees',
|
{ brand: 'Supervisor Name', name: 'Soniya Dhankar' },
|
||||||
items: [
|
{ brand: 'City', name: 'Okhla' },
|
||||||
{ brand: 'Promoter Name', name: 'Payal Singh' },
|
{ brand: 'Promoter duration', name: '2 Year 7 months' },
|
||||||
{ brand: 'AM Name', name: 'Soniya Singhal' },
|
{ brand: 'Average incentive', name: '5000' },
|
||||||
{ brand: 'Supervisor Name', name: 'Soniya Dhankar' },
|
],
|
||||||
{ brand: 'City', name: 'Okhla' },
|
},
|
||||||
{ brand: 'Promoter duration', name: '2 Year 7 months' },
|
|
||||||
{ brand: 'Average incentive', name: '5000' },
|
// Last Visit Details (tabId: 1)
|
||||||
],
|
{
|
||||||
},
|
tabId: 1,
|
||||||
|
section: 'Dabur employee',
|
||||||
// Last Visit Details (tabId: 1)
|
items: [
|
||||||
{
|
{ brand: 'SO', name: 'Rajesh Paal Singh', date: '23/05/2025' , test : 'gxsjhxbas' },
|
||||||
tabId: 1,
|
{ brand: 'AH', name: 'Umesh Singh', date: '18/04/2025' },
|
||||||
section: 'Dabur employee',
|
{ brand: 'KAM', name: 'Rahul Tawde', date: '15/05/2025' },
|
||||||
items: [
|
{ brand: 'Others', name: 'Singhal Singh', date: '06/05/2025' },
|
||||||
{ brand: 'SO', name: 'Rajesh Paal Singh', date: '23/05/2025', test: 'gxsjhxbas' },
|
],
|
||||||
{ brand: 'AH', name: 'Umesh Singh', date: '18/04/2025' },
|
},
|
||||||
{ brand: 'KAM', name: 'Rahul Tawde', date: '15/05/2025' },
|
{
|
||||||
{ brand: 'Others', name: 'Singhal Singh', date: '06/05/2025' },
|
tabId: 1,
|
||||||
],
|
section: '3P team',
|
||||||
},
|
items: [
|
||||||
{
|
{ brand: 'Supervisor', name: 'Ashish Talwar', date: '27/05/2025' },
|
||||||
tabId: 1,
|
{ brand: 'AM', name: 'Soniya Singhal', date: '23/05/2025' },
|
||||||
section: '3P team',
|
],
|
||||||
items: [
|
},
|
||||||
{ brand: 'Supervisor', name: 'Ashish Talwar', date: '27/05/2025' },
|
|
||||||
{ brand: 'AM', name: 'Soniya Singhal', date: '23/05/2025' },
|
// Competition (tabId: 2)
|
||||||
],
|
{
|
||||||
},
|
tabId: 2,
|
||||||
|
section: 'Competition assets',
|
||||||
// Competition (tabId: 2)
|
items: [
|
||||||
{
|
{ brand: 'Marico', value: 5 },
|
||||||
tabId: 2,
|
{ brand: 'Colgate', value: 1 },
|
||||||
section: 'Competition assets',
|
{ brand: 'Godrej', value: 2 },
|
||||||
items: [
|
{ brand: 'HUL', value: 1 },
|
||||||
{ brand: 'Marico', value: 5 },
|
{ brand: 'XX', value: 2 },
|
||||||
{ brand: 'Colgate', value: 1 },
|
],
|
||||||
{ brand: 'Godrej', value: 2 },
|
},
|
||||||
{ brand: 'HUL', value: 1 },
|
{
|
||||||
{ brand: 'XX', value: 2 },
|
tabId: 2,
|
||||||
],
|
section: 'Promoter details',
|
||||||
},
|
items: [
|
||||||
{
|
{ brand: 'Marico', value: 1 },
|
||||||
tabId: 2,
|
{ brand: 'Colgate', value: 1 },
|
||||||
section: 'Promoter details',
|
{ brand: 'Godrej', value: 1 },
|
||||||
items: [
|
{ brand: 'HUL', value: 1 },
|
||||||
{ brand: 'Marico', value: 1 },
|
{ brand: 'XX', value: 0 },
|
||||||
{ brand: 'Colgate', value: 1 },
|
],
|
||||||
{ brand: 'Godrej', value: 1 },
|
},
|
||||||
{ brand: 'HUL', value: 1 },
|
];
|
||||||
{ brand: 'XX', value: 0 },
|
|
||||||
],
|
const tabs = [
|
||||||
},
|
{ id: 0, title: 'Store Info' },
|
||||||
];
|
{ id: 1, title: 'Last visit details' },
|
||||||
|
{ id: 2, title: 'Competition' },
|
||||||
|
];
|
||||||
|
|
||||||
const tabs = [
|
const RenderHeader = ({ columns }) => {
|
||||||
{ id: 0, title: 'Store Info' },
|
const colWidth = Screen.screenWidth * 0.95 / columns?.length;
|
||||||
{ id: 1, title: 'Last visit details' },
|
|
||||||
{ id: 2, title: 'Competition' },
|
return (
|
||||||
];
|
<View style={{ flexDirection: 'row', paddingVertical: 6 }}>
|
||||||
|
{columns.map((col, index) => (
|
||||||
|
<View key={index} style={{ width: colWidth }}>
|
||||||
const RenderHeader = ({ columns }) => {
|
<Text style={styles.subheaderText}>{col.toUpperCase()}</Text>
|
||||||
const colWidth = Screen.screenWidth * 0.95 / columns?.length;
|
</View>
|
||||||
|
))}
|
||||||
return (
|
</View>
|
||||||
null
|
);
|
||||||
// <View style={{ flexDirection: 'row', paddingVertical: 6 }}>
|
};
|
||||||
// {columns.map((col, index) => (
|
|
||||||
// <View key={index} style={{ width: colWidth }}>
|
|
||||||
// <Text style={styles.subheaderText}>{col.toUpperCase()}</Text>
|
const RenderItem = ({ item, columns }) => {
|
||||||
// </View>
|
const colWidth = Screen.screenWidth * 0.95 / columns?.length;
|
||||||
// ))}
|
|
||||||
// </View>
|
return (
|
||||||
);
|
<View>
|
||||||
};
|
<View style={styles.row}>
|
||||||
|
{columns.map((key, index) => (
|
||||||
|
<View key={index} style={{ width: colWidth }}>
|
||||||
const RenderItem = ({ item, columns }) => {
|
<Text style={styles.name}>{String(item[key] ?? '')}</Text>
|
||||||
const colWidth = Screen.screenWidth * 0.95 / columns?.length;
|
</View>
|
||||||
|
))}
|
||||||
return (
|
</View>
|
||||||
<View>
|
<View style={[horizonalLine, { marginVertical: 4 }]} />
|
||||||
<View style={styles.row}>
|
</View>
|
||||||
{columns.map((key, index) => (
|
);
|
||||||
<View key={index} style={{ width: colWidth }}>
|
};
|
||||||
<Text style={styles.name}>{String(item[key] ?? '')}</Text>
|
|
||||||
</View>
|
|
||||||
))}
|
const SectionListView = ({ listData }) => {
|
||||||
</View>
|
const scrollRef = useRef(null); // shared horizontal scroll ref
|
||||||
<View style={[horizonalLine, { marginVertical: 4 }]} />
|
|
||||||
</View>
|
return (
|
||||||
);
|
<FlatList
|
||||||
};
|
data={listData}
|
||||||
|
keyExtractor={(item, index) => item.section + index}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
const SectionListView = ({ listData }) => {
|
ItemSeparatorComponent={() => <View style={{ paddingVertical: 5 }} />}
|
||||||
const scrollRef = useRef(null); // shared horizontal scroll ref
|
renderItem={({ item }) => {
|
||||||
console.log("/-", listData)
|
const columns = Object.keys(item.items[0] || {}).filter(
|
||||||
return (
|
key => item.items.some(obj => obj[key] !== undefined && obj[key] !== null)
|
||||||
<FlatList
|
);
|
||||||
data={listData}
|
|
||||||
keyExtractor={(item, index) => item.section + index}
|
return (
|
||||||
contentContainerStyle={{ paddingBottom: 20 }}
|
<View style={styles.section}>
|
||||||
ItemSeparatorComponent={() => <View style={{ paddingVertical: 5 }} />}
|
<Text style={styles.sectionTitle}>{item.section}</Text>
|
||||||
renderItem={({ item }) => {
|
<View style={[horizonalLine, { marginVertical: 10 }]} />
|
||||||
const columns = Object.keys(item.items[0] || {}).filter(
|
|
||||||
key => item.items.some(obj => obj[key] !== undefined && obj[key] !== null)
|
{/* Shared horizontal scroll view for header + rows */}
|
||||||
);
|
<ScrollView
|
||||||
|
horizontal
|
||||||
return (
|
ref={scrollRef}
|
||||||
<View style={styles.section}>
|
showsHorizontalScrollIndicator={false}
|
||||||
<Text style={styles.sectionTitle}>{item.section}</Text>
|
scrollEventThrottle={16}
|
||||||
<View style={[horizonalLine, { marginVertical: 10 }]} />
|
>
|
||||||
|
<View>
|
||||||
{/* Shared horizontal scroll view for header + rows */}
|
<RenderHeader columns={columns} />
|
||||||
<ScrollView
|
{item.items.map((subItem, index) => (
|
||||||
horizontal
|
<RenderItem key={index} item={subItem} columns={columns} />
|
||||||
ref={scrollRef}
|
))}
|
||||||
showsHorizontalScrollIndicator={false}
|
</View>
|
||||||
scrollEventThrottle={16}
|
</ScrollView>
|
||||||
>
|
</View>
|
||||||
<View>
|
);
|
||||||
<RenderHeader columns={columns} />
|
}}
|
||||||
{item.items.map((subItem, index) => (
|
/>
|
||||||
<RenderItem key={index} item={subItem} columns={columns} />
|
);
|
||||||
))}
|
};
|
||||||
</View>
|
|
||||||
</ScrollView>
|
|
||||||
</View>
|
const StoreInfo = () => {
|
||||||
);
|
const [selectedTab, setSelectedTab] = useState(0);
|
||||||
}}
|
const filteredData = storeinfodata?.filter(item => item.tabId === selectedTab);
|
||||||
/>
|
const selectedTabTitle = tabs?.find(tab => tab.id === selectedTab)?.title ?? 'NA';
|
||||||
);
|
|
||||||
};
|
const renderTabContent = () => {
|
||||||
|
switch (selectedTab) {
|
||||||
|
case 0:
|
||||||
const StoreInfo = ({ navigation, route }) => {
|
return <SectionListView listData={filteredData} />
|
||||||
|
case 1:
|
||||||
const { storeData } = route.params || {};
|
return <SectionListView listData={filteredData} />
|
||||||
const [loading, setLoading] = useState(false)
|
case 2:
|
||||||
const [selectedTab, setSelectedTab] = useState(0);
|
return <SectionListView listData={filteredData} />;
|
||||||
const [storeInfoData, setStoreInfoData] = useState([])
|
default:
|
||||||
|
return null;
|
||||||
useEffect(() => {
|
}
|
||||||
getStoreInfo()
|
};
|
||||||
}, [])
|
|
||||||
|
return (
|
||||||
const getStoreInfo = async () => {
|
<View style={styles.container}>
|
||||||
setLoading(true);
|
<View style={styles.tabstyle}>
|
||||||
try {
|
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
|
||||||
const params = { StoreId: storeData?.StoreId || "723" };
|
<View style={{ flexDirection: 'row' }}>
|
||||||
const config = {
|
{tabs?.map((tab) => (
|
||||||
method: 'post',
|
<TouchableOpacity key={tab.id} style={styles.tabview} activeOpacity={1} onPress={() => setSelectedTab(tab.id)}>
|
||||||
url: 'https://api1.parinaam.in/api/dabur/StoreDNAstoreInfo',
|
<View style={selectedTab === tab.id ? styles.selecttabView : styles.unselecttabView}>
|
||||||
headers: {
|
<Text style={[styles.tabtext,selectedTab === tab.id ? styles.selecttabText : styles.unselecttabText]}>
|
||||||
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
{tab.title}
|
||||||
'Content-Type': 'application/json'
|
</Text>
|
||||||
},
|
</View>
|
||||||
data: params
|
</TouchableOpacity>
|
||||||
};
|
))}
|
||||||
|
</View>
|
||||||
const response = await axios.request(config);
|
</ScrollView>
|
||||||
const res = response.data?.StoreDNAstoreInfo || {};
|
</View>
|
||||||
|
<ScrollView horizontal={false} style={{ flex: 1 }}>
|
||||||
// Step 1: Flatten API data
|
<Text style={styles.headerText}>{selectedTabTitle} </Text>
|
||||||
const tempData = [];
|
<View style={{ width: '100%' }}>{renderTabContent()}</View>
|
||||||
|
</ScrollView>
|
||||||
Object.entries(res).forEach(([sectionTitle, dataArray]) => {
|
</View>
|
||||||
if (dataArray?.length > 0) {
|
);
|
||||||
const tabId = dataArray[0]?.TabId ?? 0;
|
};
|
||||||
|
|
||||||
dataArray.forEach(item => {
|
export default StoreInfo;
|
||||||
const cleanItem = { ...item };
|
=======
|
||||||
delete cleanItem.TabId;
|
import React, { useState, useRef, useEffect } from 'react';
|
||||||
delete cleanItem.TabName;
|
import { View, Text, TouchableOpacity, ScrollView, FlatList } from 'react-native';
|
||||||
console.log("tempData---", item)
|
import { styles } from './style';
|
||||||
const formattedItems = Object.entries(cleanItem).map(([key, value]) => ({
|
import GlobalTheme, { horizonalLine, Screen } from '../../../theme/theme';
|
||||||
brand: key,
|
import CustomHeader from '../../../components/CustomHeader';
|
||||||
name: String(value)
|
import IMAGES from '../../../constants/Images';
|
||||||
}));
|
import axios from 'axios';
|
||||||
|
import Loader from '../../../constants/Loader';
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
tempData.push({
|
import { ApiURL } from '../../../api/ApiConstant';
|
||||||
tabId,
|
|
||||||
section: sectionTitle.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase()),
|
const storeinfodata = [
|
||||||
items: formattedItems
|
{
|
||||||
});
|
tabId: 0,
|
||||||
});
|
section: 'Store details',
|
||||||
}
|
items: [
|
||||||
});
|
{ brand: 'Store Name', name: 'Reliance Smart' },
|
||||||
|
{ brand: 'Store ID', name: '#98440' },
|
||||||
// Step 2: Group items by tabId and section
|
{ brand: 'Address', name: 'Rabindra Nagar, Delhi 110003' },
|
||||||
const groupedData = {};
|
{ brand: 'City', name: 'Okhla' },
|
||||||
|
{ brand: 'Store Size', name: '1500–2000 sq ft' },
|
||||||
tempData.forEach(entry => {
|
{ brand: 'Average Footfall', name: '10000' },
|
||||||
const key = `${entry.tabId}-${entry.section}`;
|
{ brand: 'Store age', name: '8' },
|
||||||
if (!groupedData[key]) {
|
{ brand: 'Store Ranking', name: '24' },
|
||||||
groupedData[key] = {
|
],
|
||||||
tabId: entry.tabId,
|
},
|
||||||
section: entry.section,
|
{
|
||||||
items: []
|
tabId: 0,
|
||||||
};
|
section: 'Dabur Employees',
|
||||||
}
|
items: [
|
||||||
groupedData[key].items.push(...entry.items);
|
{ brand: 'RKAM', name: 'Rajesh Paal Singh' },
|
||||||
});
|
{ brand: 'SO', name: 'Soniya Singhal' },
|
||||||
|
],
|
||||||
// let objTemp={}
|
},
|
||||||
// groupedData['0-Dabur Employee']?.items
|
{
|
||||||
|
tabId: 0,
|
||||||
|
section: '3P employees',
|
||||||
// Step 3: Set to state
|
items: [
|
||||||
setStoreInfoData(Object.values(groupedData));
|
{ brand: 'Promoter Name', name: 'Payal Singh' },
|
||||||
setLoading(false);
|
{ brand: 'AM Name', name: 'Soniya Singhal' },
|
||||||
} catch (error) {
|
{ brand: 'Supervisor Name', name: 'Soniya Dhankar' },
|
||||||
console.log("❌ store info api error:", error);
|
{ brand: 'City', name: 'Okhla' },
|
||||||
setLoading(false);
|
{ brand: 'Promoter duration', name: '2 Year 7 months' },
|
||||||
}
|
{ brand: 'Average incentive', name: '5000' },
|
||||||
};
|
],
|
||||||
|
},
|
||||||
const filteredData = Array.isArray(storeInfoData)
|
|
||||||
? storeInfoData.filter(item => item.tabId === selectedTab)
|
// Last Visit Details (tabId: 1)
|
||||||
: [];
|
{
|
||||||
const selectedTabTitle = tabs?.find(tab => tab.id === selectedTab)?.title ?? 'NA';
|
tabId: 1,
|
||||||
|
section: 'Dabur employee',
|
||||||
const dynamicTabs = Array.isArray(storeInfoData)
|
items: [
|
||||||
? Array.from(new Set(storeInfoData.map(item => item.tabId))).map(id => ({
|
{ brand: 'SO', name: 'Rajesh Paal Singh', date: '23/05/2025', test: 'gxsjhxbas' },
|
||||||
id,
|
{ brand: 'AH', name: 'Umesh Singh', date: '18/04/2025' },
|
||||||
title: tabs.find(tab => tab.id === id)?.title || `Tab ${id}`
|
{ brand: 'KAM', name: 'Rahul Tawde', date: '15/05/2025' },
|
||||||
}))
|
{ brand: 'Others', name: 'Singhal Singh', date: '06/05/2025' },
|
||||||
: [];
|
],
|
||||||
|
},
|
||||||
const renderTabContent = () => {
|
{
|
||||||
switch (selectedTab) {
|
tabId: 1,
|
||||||
case 0:
|
section: '3P team',
|
||||||
return <SectionListView listData={filteredData} />
|
items: [
|
||||||
case 1:
|
{ brand: 'Supervisor', name: 'Ashish Talwar', date: '27/05/2025' },
|
||||||
return <SectionListView listData={filteredData} />
|
{ brand: 'AM', name: 'Soniya Singhal', date: '23/05/2025' },
|
||||||
case 2:
|
],
|
||||||
return <SectionListView listData={filteredData} />;
|
},
|
||||||
default:
|
|
||||||
return null;
|
// Competition (tabId: 2)
|
||||||
}
|
{
|
||||||
};
|
tabId: 2,
|
||||||
|
section: 'Competition assets',
|
||||||
return (
|
items: [
|
||||||
|
{ brand: 'Marico', value: 5 },
|
||||||
<SafeAreaView style={{ flex: 1, backgroundColor: GlobalTheme.colors.primary }}>
|
{ brand: 'Colgate', value: 1 },
|
||||||
<View style={[styles.container, { paddingHorizontal: 0 }]}>
|
{ brand: 'Godrej', value: 2 },
|
||||||
<CustomHeader
|
{ brand: 'HUL', value: 1 },
|
||||||
title={'Store Info'}
|
{ brand: 'XX', value: 2 },
|
||||||
leftIcon={IMAGES.leftArrowIcon}
|
],
|
||||||
onLeftPress={() => navigation.goBack()} />
|
},
|
||||||
<View style={styles.container}>
|
{
|
||||||
<View style={styles.tabstyle}>
|
tabId: 2,
|
||||||
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
|
section: 'Promoter details',
|
||||||
<View style={{ flexDirection: 'row' }}>
|
items: [
|
||||||
{/* {tabs?.map((tab) => ( */}
|
{ brand: 'Marico', value: 1 },
|
||||||
{dynamicTabs?.map((tab) => (
|
{ brand: 'Colgate', value: 1 },
|
||||||
<TouchableOpacity key={tab.id} style={styles.tabview} activeOpacity={1} onPress={() => setSelectedTab(tab.id)}>
|
{ brand: 'Godrej', value: 1 },
|
||||||
<View style={selectedTab === tab.id ? styles.selecttabView : styles.unselecttabView}>
|
{ brand: 'HUL', value: 1 },
|
||||||
<Text style={[styles.tabtext, selectedTab === tab.id ? styles.selecttabText : styles.unselecttabText]}>
|
{ brand: 'XX', value: 0 },
|
||||||
{tab.title}
|
],
|
||||||
</Text>
|
},
|
||||||
</View>
|
];
|
||||||
</TouchableOpacity>
|
|
||||||
))}
|
|
||||||
</View>
|
|
||||||
</ScrollView>
|
const tabs = [
|
||||||
</View>
|
{ id: 0, title: 'Store Info' },
|
||||||
<ScrollView horizontal={false} style={{ flex: 1 }}>
|
{ id: 1, title: 'Last visit details' },
|
||||||
<Text style={styles.headerText}>{selectedTabTitle} </Text>
|
{ id: 2, title: 'Competition' },
|
||||||
<View style={{ width: '100%' }}>{renderTabContent()}</View>
|
];
|
||||||
</ScrollView>
|
|
||||||
</View>
|
|
||||||
<Loader visible={loading} />
|
const RenderHeader = ({ columns }) => {
|
||||||
</View>
|
const colWidth = Screen.screenWidth * 0.95 / columns?.length;
|
||||||
</SafeAreaView>
|
|
||||||
);
|
return (
|
||||||
};
|
null
|
||||||
export default StoreInfo;
|
// <View style={{ flexDirection: 'row', paddingVertical: 6 }}>
|
||||||
|
// {columns.map((col, index) => (
|
||||||
|
// <View key={index} style={{ width: colWidth }}>
|
||||||
|
// <Text style={styles.subheaderText}>{col.toUpperCase()}</Text>
|
||||||
|
// </View>
|
||||||
|
// ))}
|
||||||
|
// </View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const RenderItem = ({ item, columns }) => {
|
||||||
|
const colWidth = Screen.screenWidth * 0.95 / columns?.length;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<View style={styles.row}>
|
||||||
|
{columns.map((key, index) => (
|
||||||
|
<View key={index} style={{ width: colWidth }}>
|
||||||
|
<Text style={styles.name}>{String(item[key] ?? '')}</Text>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
<View style={[horizonalLine, { marginVertical: 4 }]} />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const SectionListView = ({ listData }) => {
|
||||||
|
const scrollRef = useRef(null); // shared horizontal scroll ref
|
||||||
|
console.log("/-", listData)
|
||||||
|
return (
|
||||||
|
<FlatList
|
||||||
|
data={listData}
|
||||||
|
keyExtractor={(item, index) => item.section + index}
|
||||||
|
contentContainerStyle={{ paddingBottom: 20 }}
|
||||||
|
ItemSeparatorComponent={() => <View style={{ paddingVertical: 5 }} />}
|
||||||
|
renderItem={({ item }) => {
|
||||||
|
const columns = Object.keys(item.items[0] || {}).filter(
|
||||||
|
key => item.items.some(obj => obj[key] !== undefined && obj[key] !== null)
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{!item.hideSectionTitle && (
|
||||||
|
<>
|
||||||
|
<Text style={styles.sectionTitle}>{item.section}</Text>
|
||||||
|
{/* <View style={[horizonalLine, { marginVertical: 10 }]} /> */}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<View style={styles.section}>
|
||||||
|
<ScrollView
|
||||||
|
horizontal
|
||||||
|
ref={scrollRef}
|
||||||
|
showsHorizontalScrollIndicator={false}
|
||||||
|
scrollEventThrottle={16}
|
||||||
|
>
|
||||||
|
<View>
|
||||||
|
<RenderHeader columns={columns} />
|
||||||
|
{item.items.map((subItem, index) => (
|
||||||
|
<RenderItem key={index} item={subItem} columns={columns} />
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const StoreInfo = ({ navigation, route }) => {
|
||||||
|
|
||||||
|
const { storeData } = route.params || {};
|
||||||
|
const [loading, setLoading] = useState(false)
|
||||||
|
const [selectedTab, setSelectedTab] = useState(0);
|
||||||
|
const [storeInfoData, setStoreInfoData] = useState([])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getStoreInfo()
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const getStoreInfo = async () => {
|
||||||
|
setLoading(true);
|
||||||
|
try {
|
||||||
|
const params = { StoreId: storeData?.StoreId || "723" };
|
||||||
|
const config = {
|
||||||
|
method: 'post',
|
||||||
|
url: ApiURL.storeInfo,
|
||||||
|
headers: {
|
||||||
|
'api_key': '9a1f056fecb84eaf8eb4152dda22ab0501955c4f9bbe7daa8780740459fdde7a',
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: params
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await axios.request(config);
|
||||||
|
const res = response.data?.StoreDNAstoreInfo || {};
|
||||||
|
|
||||||
|
// Step 1: Flatten API data
|
||||||
|
const tempData = [];
|
||||||
|
|
||||||
|
Object.entries(res).forEach(([sectionTitle, dataArray]) => {
|
||||||
|
if (dataArray?.length > 0) {
|
||||||
|
const tabId = dataArray[0]?.TabId ?? 0;
|
||||||
|
|
||||||
|
dataArray.forEach(item => {
|
||||||
|
const cleanItem = { ...item };
|
||||||
|
delete cleanItem.TabId;
|
||||||
|
delete cleanItem.TabName;
|
||||||
|
console.log("tempData---", item)
|
||||||
|
const formattedItems = Object.entries(cleanItem).map(([key, value]) => ({
|
||||||
|
brand: key,
|
||||||
|
name: String(value)
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
tempData.push({
|
||||||
|
tabId,
|
||||||
|
section: sectionTitle.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase()),
|
||||||
|
items: formattedItems
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 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] = {
|
||||||
|
tabId: entry.tabId,
|
||||||
|
section: entry.section,
|
||||||
|
items: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
groupedData[key].items.push(...entry.items);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// let objTemp={}
|
||||||
|
// groupedData['0-Dabur Employee']?.items
|
||||||
|
|
||||||
|
|
||||||
|
// Step 3: Set to state
|
||||||
|
setStoreInfoData(Object.values(groupedData));
|
||||||
|
setLoading(false);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("❌ store info api error:", error);
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const filteredData = Array.isArray(storeInfoData)
|
||||||
|
? storeInfoData.filter(item => item.tabId === selectedTab)
|
||||||
|
: [];
|
||||||
|
const selectedTabTitle = tabs?.find(tab => tab.id === selectedTab)?.title ?? 'NA';
|
||||||
|
|
||||||
|
const dynamicTabs = Array.isArray(storeInfoData)
|
||||||
|
? Array.from(new Set(storeInfoData.map(item => item.tabId))).map(id => ({
|
||||||
|
id,
|
||||||
|
title: tabs.find(tab => tab.id === id)?.title || `Tab ${id}`
|
||||||
|
}))
|
||||||
|
: [];
|
||||||
|
|
||||||
|
const renderTabContent = () => {
|
||||||
|
switch (selectedTab) {
|
||||||
|
case 0:
|
||||||
|
return <SectionListView listData={filteredData} />
|
||||||
|
case 1:
|
||||||
|
return <SectionListView listData={filteredData} />
|
||||||
|
case 2:
|
||||||
|
return <SectionListView listData={filteredData} />;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
|
||||||
|
<SafeAreaView style={{ flex: 1, backgroundColor: GlobalTheme.colors.primary }}>
|
||||||
|
<View style={[styles.container, { paddingHorizontal: 0 }]}>
|
||||||
|
<CustomHeader
|
||||||
|
title={'Store Info'}
|
||||||
|
leftIcon={IMAGES.leftArrowIcon}
|
||||||
|
onLeftPress={() => navigation.goBack()} />
|
||||||
|
<View style={styles.container}>
|
||||||
|
<View style={styles.tabstyle}>
|
||||||
|
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
|
||||||
|
<View style={{ flexDirection: 'row' }}>
|
||||||
|
{/* {tabs?.map((tab) => ( */}
|
||||||
|
{dynamicTabs?.map((tab) => (
|
||||||
|
<TouchableOpacity key={tab.id} style={styles.tabview} activeOpacity={1} onPress={() => setSelectedTab(tab.id)}>
|
||||||
|
<View style={selectedTab === tab.id ? styles.selecttabView : styles.unselecttabView}>
|
||||||
|
<Text style={[styles.tabtext, selectedTab === tab.id ? styles.selecttabText : styles.unselecttabText]}>
|
||||||
|
{tab.title}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
<ScrollView horizontal={false} style={{ flex: 1 }}>
|
||||||
|
{/* <Text style={styles.headerText}>{selectedTabTitle} </Text> */}
|
||||||
|
<View style={{ width: '100%', marginTop: 20, }}>{renderTabContent()}</View>
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
<Loader visible={loading} />
|
||||||
|
</View>
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default StoreInfo;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,115 +1,232 @@
|
|||||||
import { StyleSheet } from 'react-native';
|
<<<<<<< HEAD
|
||||||
|
import { StyleSheet } from 'react-native';
|
||||||
import { GlobalTheme, Screen, shadow } from '../../../theme';
|
|
||||||
|
import { GlobalTheme, Screen, shadow } from '../../../theme';
|
||||||
export const styles = StyleSheet.create({
|
|
||||||
container: {
|
export const styles = StyleSheet.create({
|
||||||
flex: 1,
|
container: {
|
||||||
backgroundColor: GlobalTheme.colors.white,
|
flex: 1,
|
||||||
paddingHorizontal: 10
|
backgroundColor: GlobalTheme.colors.white,
|
||||||
},
|
paddingHorizontal: 10
|
||||||
// tabs
|
},
|
||||||
tabview: {
|
// tabs
|
||||||
alignItems: 'center',
|
tabview: {
|
||||||
justifyContent: 'space-between',
|
alignItems: 'center',
|
||||||
marginVertical: 10,
|
justifyContent: 'space-between',
|
||||||
flexDirection: 'row',
|
marginVertical: 10,
|
||||||
},
|
flexDirection: 'row',
|
||||||
tabstyle: {
|
},
|
||||||
flexDirection: 'row',
|
tabstyle: {
|
||||||
justifyContent: 'space-between',
|
flexDirection: 'row',
|
||||||
borderColor: GlobalTheme.colors.lightblue,
|
justifyContent: 'space-between',
|
||||||
borderWidth: 1.5,
|
borderColor: GlobalTheme.colors.lightblue,
|
||||||
borderRadius: GlobalTheme.borderRadius.xxlg,
|
borderWidth: 1.5,
|
||||||
marginTop: 10,
|
borderRadius: GlobalTheme.borderRadius.xxlg,
|
||||||
paddingHorizontal: 10,
|
marginTop: 10,
|
||||||
},
|
paddingHorizontal: 10,
|
||||||
tabtext: {
|
},
|
||||||
overflow: 'hidden',
|
tabtext: {
|
||||||
color:'#000'
|
overflow: 'hidden',
|
||||||
},
|
},
|
||||||
selecttabView: {
|
selecttabView: {
|
||||||
backgroundColor: GlobalTheme.colors.primary,
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
paddingVertical: 8,
|
paddingVertical: 8,
|
||||||
paddingHorizontal: 15,
|
paddingHorizontal: 15,
|
||||||
borderRadius: GlobalTheme.borderRadius.lgg
|
borderRadius: GlobalTheme.borderRadius.lgg
|
||||||
},
|
},
|
||||||
selecttabText: {
|
selecttabText: {
|
||||||
color: GlobalTheme.colors.white,
|
color: GlobalTheme.colors.white,
|
||||||
fontSize: GlobalTheme.typography.fontSize.small,
|
fontSize: GlobalTheme.typography.fontSize.small,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
textAlign: 'center'
|
textAlign: 'center'
|
||||||
},
|
},
|
||||||
unselecttabView: {
|
unselecttabView: {
|
||||||
paddingVertical: 8,
|
paddingVertical: 8,
|
||||||
paddingHorizontal: 15,
|
paddingHorizontal: 15,
|
||||||
borderRadius: GlobalTheme.borderRadius.md
|
borderRadius: GlobalTheme.borderRadius.md
|
||||||
},
|
},
|
||||||
unselecttabText: {
|
unselecttabText: {
|
||||||
color: GlobalTheme.colors.lightbluetext,
|
color: GlobalTheme.colors.lightbluetext,
|
||||||
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
textAlign: 'center'
|
textAlign: 'center'
|
||||||
},
|
},
|
||||||
// comp
|
// comp
|
||||||
section: {
|
section: {
|
||||||
backgroundColor: GlobalTheme.colors.white,
|
backgroundColor: GlobalTheme.colors.white,
|
||||||
padding: 12,
|
padding: 12,
|
||||||
marginHorizontal: 5,
|
marginHorizontal: 5,
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
elevation: 2,
|
elevation: 2,
|
||||||
width: Screen.screenWidth * 0.92,
|
width: Screen.screenWidth * 0.92,
|
||||||
marginVertical: 5,
|
marginVertical: 5,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: GlobalTheme.colors.lightblueborder,
|
borderColor: GlobalTheme.colors.lightblueborder,
|
||||||
// ...shadow,
|
// ...shadow,
|
||||||
|
|
||||||
},
|
},
|
||||||
sectionTitle: {
|
sectionTitle: {
|
||||||
color:'#000',
|
fontWeight: GlobalTheme.typography.fontWeight.bold,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.bold,
|
fontSize: GlobalTheme.typography.fontSize.small,
|
||||||
fontSize: GlobalTheme.typography.fontSize.small,
|
},
|
||||||
},
|
row: {
|
||||||
row: {
|
flexDirection: 'row',
|
||||||
flexDirection: 'row',
|
justifyContent: 'space-between',
|
||||||
justifyContent: 'space-between',
|
paddingVertical: 4
|
||||||
paddingVertical: 4
|
},
|
||||||
},
|
brand: {
|
||||||
brand: {
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
color: GlobalTheme.colors.black,
|
||||||
color: GlobalTheme.colors.black,
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
},
|
||||||
},
|
value: {
|
||||||
value: {
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
},
|
||||||
},
|
name: {
|
||||||
name: {
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
flexWrap:'wrap'
|
||||||
flexWrap:'wrap',
|
},
|
||||||
color:'#000'
|
date: {
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
},
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
date: {
|
flexWrap:'wrap'
|
||||||
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
},
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
subheaderText:{
|
||||||
flexWrap:'wrap'
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
},
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
subheaderText:{
|
flexWrap:'wrap',
|
||||||
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
color : GlobalTheme.colors.gray,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
textTransform: 'capitalize',
|
||||||
flexWrap:'wrap',
|
},
|
||||||
color : GlobalTheme.colors.gray,
|
headerText:{
|
||||||
textTransform: 'capitalize',
|
fontSize: GlobalTheme.typography.fontSize.medium,
|
||||||
},
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
headerText:{
|
flexWrap:'wrap',
|
||||||
fontSize: GlobalTheme.typography.fontSize.medium,
|
color : GlobalTheme.colors.black,
|
||||||
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
paddingVertical:10,
|
||||||
flexWrap:'wrap',
|
paddingHorizontal:10
|
||||||
color : GlobalTheme.colors.black,
|
}
|
||||||
paddingVertical:10,
|
|
||||||
paddingHorizontal:10
|
});
|
||||||
}
|
=======
|
||||||
|
import { StyleSheet } from 'react-native';
|
||||||
});
|
|
||||||
|
import { GlobalTheme, Screen, shadow } from '../../../theme';
|
||||||
|
|
||||||
|
export const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: GlobalTheme.colors.white,
|
||||||
|
paddingHorizontal: 10
|
||||||
|
},
|
||||||
|
// tabs
|
||||||
|
tabview: {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
marginVertical: 10,
|
||||||
|
flexDirection: 'row',
|
||||||
|
},
|
||||||
|
tabstyle: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
borderColor: GlobalTheme.colors.lightblue,
|
||||||
|
borderWidth: 1.5,
|
||||||
|
borderRadius: GlobalTheme.borderRadius.xxlg,
|
||||||
|
marginTop: 10,
|
||||||
|
paddingHorizontal: 10,
|
||||||
|
},
|
||||||
|
tabtext: {
|
||||||
|
overflow: 'hidden',
|
||||||
|
color:'#000'
|
||||||
|
},
|
||||||
|
selecttabView: {
|
||||||
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
|
paddingVertical: 8,
|
||||||
|
paddingHorizontal: 15,
|
||||||
|
borderRadius: GlobalTheme.borderRadius.lgg
|
||||||
|
},
|
||||||
|
selecttabText: {
|
||||||
|
color: GlobalTheme.colors.white,
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.small,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
textAlign: 'center'
|
||||||
|
},
|
||||||
|
unselecttabView: {
|
||||||
|
paddingVertical: 8,
|
||||||
|
paddingHorizontal: 15,
|
||||||
|
borderRadius: GlobalTheme.borderRadius.md
|
||||||
|
},
|
||||||
|
unselecttabText: {
|
||||||
|
color: GlobalTheme.colors.lightbluetext,
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
textAlign: 'center'
|
||||||
|
},
|
||||||
|
// comp
|
||||||
|
section: {
|
||||||
|
backgroundColor: GlobalTheme.colors.white,
|
||||||
|
padding: 12,
|
||||||
|
marginHorizontal: 5,
|
||||||
|
borderRadius: 8,
|
||||||
|
elevation: 2,
|
||||||
|
width: Screen.screenWidth * 0.92,
|
||||||
|
marginVertical: 5,
|
||||||
|
borderWidth: 0.5,
|
||||||
|
borderColor: 'gray',
|
||||||
|
marginBottom:15,
|
||||||
|
marginTop:10,
|
||||||
|
// ...shadow,
|
||||||
|
|
||||||
|
},
|
||||||
|
sectionTitle: {
|
||||||
|
color:'#000',
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.bold,
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.small,
|
||||||
|
marginHorizontal:10
|
||||||
|
},
|
||||||
|
row: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
paddingVertical: 4
|
||||||
|
},
|
||||||
|
brand: {
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
|
color: GlobalTheme.colors.black,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
flexWrap:'wrap',
|
||||||
|
color:'#000'
|
||||||
|
|
||||||
|
},
|
||||||
|
date: {
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
flexWrap:'wrap'
|
||||||
|
},
|
||||||
|
subheaderText:{
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.xsmall,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.regular,
|
||||||
|
flexWrap:'wrap',
|
||||||
|
color : GlobalTheme.colors.gray,
|
||||||
|
textTransform: 'capitalize',
|
||||||
|
},
|
||||||
|
headerText:{
|
||||||
|
fontSize: GlobalTheme.typography.fontSize.medium,
|
||||||
|
fontWeight: GlobalTheme.typography.fontWeight.medium,
|
||||||
|
flexWrap:'wrap',
|
||||||
|
color : GlobalTheme.colors.black,
|
||||||
|
paddingVertical:10,
|
||||||
|
paddingHorizontal:10
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const Welcome = ({ navigation }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<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}>
|
<View style={styles.content}>
|
||||||
<Image source={IMAGES.Welcomelogo} style={styles.illustration} />
|
<Image source={IMAGES.Welcomelogo} style={styles.illustration} />
|
||||||
<Text style={styles.title}>Welcome to {"\n"} Performics Store DNA</Text>
|
<Text style={styles.title}>Welcome to {"\n"} Performics Store DNA</Text>
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
import GlobalTheme from './theme';
|
<<<<<<< HEAD
|
||||||
import { shadow , Screen , horizonalLine } from './theme';
|
import GlobalTheme from './theme';
|
||||||
|
import { shadow , Screen , horizonalLine } from './theme';
|
||||||
export {GlobalTheme, Screen , shadow, horizonalLine};
|
|
||||||
|
export {GlobalTheme, Screen , shadow, horizonalLine};
|
||||||
|
=======
|
||||||
|
import GlobalTheme from './theme';
|
||||||
|
import { shadow , Screen , horizonalLine } from './theme';
|
||||||
|
|
||||||
|
export {GlobalTheme, Screen , shadow, horizonalLine};
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,87 +1,176 @@
|
|||||||
import { Dimensions, Platform } from 'react-native';
|
<<<<<<< HEAD
|
||||||
|
import { Dimensions, Platform } from 'react-native';
|
||||||
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
|
|
||||||
|
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
|
||||||
export const Screen = {
|
|
||||||
screenWidth,
|
export const Screen = {
|
||||||
screenHeight,
|
screenWidth,
|
||||||
isAndroid: Platform.OS === 'android',
|
screenHeight,
|
||||||
isIOS: Platform.OS === 'ios',
|
isAndroid: Platform.OS === 'android',
|
||||||
};
|
isIOS: Platform.OS === 'ios',
|
||||||
|
};
|
||||||
const GlobalTheme = {
|
|
||||||
colors: {
|
const GlobalTheme = {
|
||||||
// Primary Colors
|
colors: {
|
||||||
primary: '#113F8C', // Main color for buttons, headers
|
// Primary Colors
|
||||||
secondary: '#2357C6',
|
primary: '#113F8C', // Main color for buttons, headers
|
||||||
lightbluetext:'#7F83AB',
|
secondary: '#2357C6',
|
||||||
text: '#333333', // Text color for most content
|
lightbluetext:'#7F83AB',
|
||||||
lightblue:'#E2E7F2',
|
text: '#333333', // Text color for most content
|
||||||
lightblueborder:'#ECECEC',
|
lightblue:'#E2E7F2',
|
||||||
bluebgcolor :'#EAF0F4',
|
lightblueborder:'#ECECEC',
|
||||||
|
|
||||||
// Additional Colors
|
// Additional Colors
|
||||||
success: '#4caf50', // Success or positive action color
|
success: '#4caf50', // Success or positive action color
|
||||||
yellow: '#FFD661', // Warning or alert color
|
yellow: '#FFD661', // Warning or alert color
|
||||||
error: '#ff5252', // Error or negative action color
|
error: '#ff5252', // Error or negative action color
|
||||||
info: '#2196f3', // Information color
|
info: '#2196f3', // Information color
|
||||||
|
|
||||||
// Grayscale
|
// Grayscale
|
||||||
white: '#ffffff',
|
white: '#ffffff',
|
||||||
lightGray: '#F1F1F1',
|
lightGray: '#F1F1F1',
|
||||||
gray: '#676767',
|
gray: '#676767',
|
||||||
darkGray: '#555555',
|
darkGray: '#555555',
|
||||||
black: '#000000',
|
black: '#000000',
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
// Define typography styles here (e.g., font family, sizes, line heights, etc.)
|
// Define typography styles here (e.g., font family, sizes, line heights, etc.)
|
||||||
fontFamily: 'Regular',
|
fontFamily: 'Regular',
|
||||||
fontSize: {
|
fontSize: {
|
||||||
xxsmall: 12,
|
xxsmall: 12,
|
||||||
xsmall :14,
|
xsmall :14,
|
||||||
small: 16,
|
small: 16,
|
||||||
medium: 18,
|
medium: 18,
|
||||||
large: 20,
|
large: 20,
|
||||||
},
|
},
|
||||||
fontWeight: {
|
fontWeight: {
|
||||||
regular: '400',
|
regular: '400',
|
||||||
medium: '500',
|
medium: '500',
|
||||||
bold: '700',
|
bold: '700',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
spacing: {
|
spacing: {
|
||||||
// Define spacing units (e.g., margin and padding) for consistent layout
|
// Define spacing units (e.g., margin and padding) for consistent layout
|
||||||
xs: 4,
|
xs: 4,
|
||||||
sm: 8,
|
sm: 8,
|
||||||
md: 16,
|
md: 16,
|
||||||
lg: 24,
|
lg: 24,
|
||||||
xl: 32,
|
xl: 32,
|
||||||
},
|
},
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
// Define border radius values for consistent UI elements
|
// Define border radius values for consistent UI elements
|
||||||
sm: 5,
|
sm: 5,
|
||||||
md: 10,
|
md: 10,
|
||||||
lg: 15,
|
lg: 15,
|
||||||
lgg: 20,
|
lgg: 20,
|
||||||
xlg: 25,
|
xlg: 25,
|
||||||
xxlg: 35,
|
xxlg: 35,
|
||||||
|
|
||||||
},
|
},
|
||||||
// Add other global theme properties as needed
|
// Add other global theme properties as needed
|
||||||
};
|
};
|
||||||
|
|
||||||
export default GlobalTheme;
|
export default GlobalTheme;
|
||||||
|
|
||||||
export const shadow = {
|
export const shadow = {
|
||||||
shadowColor: '#00000029',
|
shadowColor: '#00000029',
|
||||||
shadowOffset: {width: 5, height: 5},
|
shadowOffset: {width: 5, height: 5},
|
||||||
shadowOpacity: 0.8,
|
shadowOpacity: 0.8,
|
||||||
shadowRadius: 10,
|
shadowRadius: 10,
|
||||||
elevation: 20,
|
elevation: 20,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const horizonalLine = {
|
export const horizonalLine = {
|
||||||
backgroundColor :'#E2E7F2',
|
backgroundColor :'#E2E7F2',
|
||||||
height:1.5,
|
height:1.5,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
};
|
};
|
||||||
|
=======
|
||||||
|
import { Dimensions, Platform } from 'react-native';
|
||||||
|
|
||||||
|
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
|
||||||
|
|
||||||
|
export const Screen = {
|
||||||
|
screenWidth,
|
||||||
|
screenHeight,
|
||||||
|
isAndroid: Platform.OS === 'android',
|
||||||
|
isIOS: Platform.OS === 'ios',
|
||||||
|
};
|
||||||
|
|
||||||
|
const GlobalTheme = {
|
||||||
|
colors: {
|
||||||
|
// Primary Colors
|
||||||
|
primary: '#113F8C', // Main color for buttons, headers
|
||||||
|
secondary: '#2357C6',
|
||||||
|
lightbluetext:'#7F83AB',
|
||||||
|
text: '#333333', // Text color for most content
|
||||||
|
lightblue:'#E2E7F2',
|
||||||
|
lightblueborder:'#ECECEC',
|
||||||
|
bluebgcolor :'#EAF0F4',
|
||||||
|
|
||||||
|
// Additional Colors
|
||||||
|
success: '#4caf50', // Success or positive action color
|
||||||
|
yellow: '#FFD661', // Warning or alert color
|
||||||
|
error: '#ff5252', // Error or negative action color
|
||||||
|
info: '#2196f3', // Information color
|
||||||
|
|
||||||
|
// Grayscale
|
||||||
|
white: '#ffffff',
|
||||||
|
lightGray: '#F1F1F1',
|
||||||
|
gray: '#676767',
|
||||||
|
darkGray: '#555555',
|
||||||
|
black: '#000000',
|
||||||
|
},
|
||||||
|
typography: {
|
||||||
|
// Define typography styles here (e.g., font family, sizes, line heights, etc.)
|
||||||
|
fontFamily: 'Regular',
|
||||||
|
fontSize: {
|
||||||
|
xxsmall: 12,
|
||||||
|
xsmall :14,
|
||||||
|
small: 16,
|
||||||
|
medium: 18,
|
||||||
|
large: 20,
|
||||||
|
},
|
||||||
|
fontWeight: {
|
||||||
|
regular: '400',
|
||||||
|
medium: '500',
|
||||||
|
bold: '700',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
spacing: {
|
||||||
|
// Define spacing units (e.g., margin and padding) for consistent layout
|
||||||
|
xs: 4,
|
||||||
|
sm: 8,
|
||||||
|
md: 16,
|
||||||
|
lg: 24,
|
||||||
|
xl: 32,
|
||||||
|
},
|
||||||
|
borderRadius: {
|
||||||
|
// Define border radius values for consistent UI elements
|
||||||
|
sm: 5,
|
||||||
|
md: 10,
|
||||||
|
lg: 15,
|
||||||
|
lgg: 20,
|
||||||
|
xlg: 25,
|
||||||
|
xxlg: 35,
|
||||||
|
|
||||||
|
},
|
||||||
|
// Add other global theme properties as needed
|
||||||
|
};
|
||||||
|
|
||||||
|
export default GlobalTheme;
|
||||||
|
|
||||||
|
export const shadow = {
|
||||||
|
shadowColor: '#00000029',
|
||||||
|
shadowOffset: {width: 5, height: 5},
|
||||||
|
shadowOpacity: 0.8,
|
||||||
|
shadowRadius: 10,
|
||||||
|
elevation: 20,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const horizonalLine = {
|
||||||
|
backgroundColor :'#E2E7F2',
|
||||||
|
height:1.5,
|
||||||
|
width: '100%',
|
||||||
|
};
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||
@@ -1,21 +1,44 @@
|
|||||||
import { StatusBar} from 'react-native';
|
<<<<<<< HEAD
|
||||||
import React from 'react';
|
import {SafeAreaView, StatusBar} from 'react-native';
|
||||||
import {GlobalTheme} from '../theme';
|
import React from 'react';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import {GlobalTheme} from '../theme';
|
||||||
|
|
||||||
const MyStatusBar = () => {
|
const MyStatusBar = () => {
|
||||||
return (
|
return (
|
||||||
<SafeAreaView
|
<SafeAreaView
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: GlobalTheme.colors.primary,
|
backgroundColor: GlobalTheme.colors.black,
|
||||||
}}>
|
}}>
|
||||||
<StatusBar
|
<StatusBar
|
||||||
translucent={false}
|
translucent={false}
|
||||||
backgroundColor={GlobalTheme.colors.black}
|
backgroundColor={GlobalTheme.colors.black}
|
||||||
barStyle={'light-content'}
|
barStyle={'light-content'}
|
||||||
/>
|
/>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MyStatusBar;
|
export default MyStatusBar;
|
||||||
|
=======
|
||||||
|
import { StatusBar} from 'react-native';
|
||||||
|
import React from 'react';
|
||||||
|
import {GlobalTheme} from '../theme';
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
|
|
||||||
|
const MyStatusBar = () => {
|
||||||
|
return (
|
||||||
|
<SafeAreaView
|
||||||
|
style={{
|
||||||
|
backgroundColor: GlobalTheme.colors.primary,
|
||||||
|
}}>
|
||||||
|
<StatusBar
|
||||||
|
translucent={false}
|
||||||
|
backgroundColor={GlobalTheme.colors.black}
|
||||||
|
barStyle={'light-content'}
|
||||||
|
/>
|
||||||
|
</SafeAreaView>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MyStatusBar;
|
||||||
|
>>>>>>> dabur-store-dna
|
||||||
|
|||||||