diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock new file mode 100644 index 0000000..e69de29 diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt new file mode 100644 index 0000000..7432013 --- /dev/null +++ b/.scannerwork/report-task.txt @@ -0,0 +1,6 @@ +projectKey=procurelinc +serverUrl=http://localhost:9000 +serverVersion=9.9.8.100196 +dashboardUrl=http://localhost:9000/dashboard?id=procurelinc +ceTaskId=AZui1_IJunY9vPNeE5RI +ceTaskUrl=http://localhost:9000/api/ce/task?id=AZui1_IJunY9vPNeE5RI diff --git a/App.tsx b/App.tsx index 7a44767..5e7da2f 100644 --- a/App.tsx +++ b/App.tsx @@ -1,6 +1,6 @@ -import React, { useEffect, useState } from 'react'; +import React from 'react'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; -import { Alert, Linking, LogBox, StatusBar, View } from 'react-native'; +import { LogBox, StatusBar, View } from 'react-native'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { AlertNotificationRoot } from 'react-native-alert-notification'; import { PersistGate } from 'redux-persist/integration/react'; @@ -8,13 +8,14 @@ import { Provider } from 'react-redux'; import { persistor, store } from './src/Redux/Store.js'; import Routes from './src/Navigation/Routes.jsx'; import { NavigationContainer } from '@react-navigation/native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import colors from './src/Constant/Color'; import { TextEncoder } from 'text-encoding'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; LogBox.ignoreAllLogs(true); const App = () => { const queryClient = new QueryClient(); + const insets = useSafeAreaInsets() global.TextEncoder = TextEncoder; return ( @@ -23,11 +24,8 @@ const App = () => { - {/* paddingTop: inset.top + 10, */} - - + + diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 11b0257..bc4ff95 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -8,3 +8,6 @@ # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: + +-keep class com.facebook.hermes.** { *; } +-keep class com.facebook.react.** { *; } \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e189252..aa069ff 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,14 @@ + + + + + + + ( diff --git a/package-lock.json b/package-lock.json index 1cad35f..dcdfc92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@stomp/stompjs": "^7.2.1", "@tanstack/react-query": "^5.90.12", "axios": "^1.13.2", + "buffer": "^6.0.3", "eslint-config-prettier": "^10.1.8", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-native": "^5.0.0", @@ -31,9 +32,12 @@ "react-native": "0.79.0", "react-native-alert-notification": "^0.4.2", "react-native-app-intro-slider": "^4.0.4", +<<<<<<<<< Temporary merge branch 1 + "react-native-bouncy-checkbox": "^4.1.2", +========= "react-native-bouncy-checkbox": "^4.1.3", +>>>>>>>>> Temporary merge branch 2 "react-native-date-picker": "^5.0.13", - "react-native-element-dropdown": "^2.12.4", "react-native-gesture-handler": "^2.30.0", "react-native-gifted-charts": "^1.4.70", "react-native-haptic-feedback": "^2.3.3", @@ -51,6 +55,7 @@ "redux-persist": "^6.0.0", "sockjs-client": "^1.6.1", "text-encoding": "^0.7.0", + "xlsx": "^0.18.5", "yup": "^1.7.1" }, "devDependencies": { @@ -72,6 +77,7 @@ "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", + "react-native-bundle-visualizer": "^3.1.3", "react-test-renderer": "19.0.0", "typescript": "5.0.4" }, @@ -107,6 +113,10 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -138,6 +148,10 @@ "integrity": "sha512-fcdRcWahONYo+JRnJg1/AekOacGvKx12Gu0qXJXFi2WBqQA1i7+O5PaxRB7kxE/Op94dExnCiiar6T09pvdHpA==", "dev": true, "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", "eslint-visitor-keys": "^2.1.0", @@ -2210,6 +2224,27 @@ "deprecated": "Use @eslint/object-schema instead", "license": "BSD-3-Clause" }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@isaacs/ttlcache": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz", @@ -2789,6 +2824,10 @@ "integrity": "sha512-nEEYwfyP00j9i4nr/HhwPabDscoBhhCjxDBpcKERi2oTYHcBr3FTu9PV1gbeJCa4vRCHr6b6VgOcVTdy99NddQ==", "devOptional": true, "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@react-native-community/cli-clean": "18.0.1", "@react-native-community/cli-config": "18.0.1", @@ -3215,9 +3254,15 @@ } }, "node_modules/@react-native-documents/picker": { +<<<<<<<<< Temporary merge branch 1 "version": "11.0.3", "resolved": "https://registry.npmjs.org/@react-native-documents/picker/-/picker-11.0.3.tgz", "integrity": "sha512-q+vQNT1NtZcFGwsDpTwMKNNcgOEq6foFDGlPQVt8H7KaEjCjC+wTGdXuVSe8JJr2uO9xZR6kJ7aRHReZ4XDRBw==", +========= + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@react-native-documents/picker/-/picker-11.0.4.tgz", + "integrity": "sha512-lbwcBwXMwZ5eTvNI6j/HqPjyB87moRCA8k7EoLCXF4KsLNt2jYDBXkUONX/WcMRMyQEaJPWB77W2zMCcRdX4jw==", +>>>>>>>>> Temporary merge branch 2 "license": "MIT", "peerDependencies": { "react": "*", @@ -3229,6 +3274,10 @@ "resolved": "https://registry.npmjs.org/@react-native-masked-view/masked-view/-/masked-view-0.3.2.tgz", "integrity": "sha512-XwuQoW7/GEgWRMovOQtX3A4PrXhyaZm0lVUiY8qJDvdngjLms9Cpdck6SmGAUNqQwcj2EadHC1HwL0bEyoa/SQ==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "peerDependencies": { "react": ">=16", "react-native": ">=0.57" @@ -3785,6 +3834,10 @@ "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-7.1.26.tgz", "integrity": "sha512-RhKmeD0E2ejzKS6z8elAfdfwShpcdkYY8zJzvHYLq+wv183BBcElTeyMLcIX6wIn7QutXeI92Yi21t7aUWfqNQ==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@react-navigation/core": "^7.13.7", "escape-string-regexp": "^4.0.0", @@ -4076,6 +4129,10 @@ "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -4230,6 +4287,7 @@ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.16.tgz", "integrity": "sha512-bpMGOmV4OPmif7TNMteU/Ehf/hoC0Kf98PDc0F4BZkFrEapRMEqI/V6YS0lyzwSV6PQpY1y4xxArUIfBW5LVxQ==", "license": "MIT", + "peer": true, "dependencies": { "@tanstack/query-core": "5.90.16" }, @@ -4409,6 +4467,10 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "csstype": "^3.2.2" } @@ -4477,6 +4539,10 @@ "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "7.18.0", @@ -4511,6 +4577,10 @@ "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "license": "BSD-2-Clause", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@typescript-eslint/scope-manager": "7.18.0", "@typescript-eslint/types": "7.18.0", @@ -4697,9 +4767,9 @@ "license": "ISC" }, "node_modules/@vscode/sudo-prompt": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/@vscode/sudo-prompt/-/sudo-prompt-9.3.1.tgz", - "integrity": "sha512-9ORTwwS74VaTn38tNbQhsA5U44zkJfcb0BdTSyyG6frP4e8KMtHuTXYmwefe5dpL8XB1aGSIVTaLjD3BbWb5iA==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@vscode/sudo-prompt/-/sudo-prompt-9.3.2.tgz", + "integrity": "sha512-gcXoCN00METUNFeQOFJ+C9xUI0DKB+0EGMVg7wbVYRHBw2Eq3fKisDZOkRdOz3kqXRKOENMfShPOmypw1/8nOw==", "devOptional": true, "license": "MIT" }, @@ -4751,6 +4821,10 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "bin": { "acorn": "bin/acorn" }, @@ -4767,6 +4841,15 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/agent-base": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", @@ -5069,6 +5152,13 @@ "node": ">=4" } }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/async-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", @@ -5293,6 +5383,11 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, + "node_modules/base-64": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", + "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==" + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -5314,9 +5409,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.9.11", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz", - "integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==", + "version": "2.9.13", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.13.tgz", + "integrity": "sha512-WhtvB2NG2wjr04+h77sg3klAIwrgOqnjS49GGudnUPGFFgg7G17y7Qecqp+2Dr5kUDxNRBca0SK7cG8JwzkWDQ==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -5334,6 +5429,31 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "devOptional": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/body-parser": { "version": "1.20.4", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", @@ -5423,6 +5543,10 @@ } ], "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -5446,11 +5570,23 @@ "node-int64": "^0.4.0" } }, + "node_modules/btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "bin": { + "btoa": "bin/btoa.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "devOptional": true, + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "funding": [ { "type": "github", @@ -5468,7 +5604,7 @@ "license": "MIT", "dependencies": { "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "ieee754": "^1.2.1" } }, "node_modules/buffer-from": { @@ -5586,9 +5722,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001762", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001762.tgz", - "integrity": "sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==", + "version": "1.0.30001763", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001763.tgz", + "integrity": "sha512-mh/dGtq56uN98LlNX9qdbKnzINhX0QzhiWBFEkFfsFO4QyCvL8YegrJAazCwXIeqkIob8BlZPGM3xdnY+sgmvQ==", "funding": [ { "type": "opencollective", @@ -5605,6 +5741,19 @@ ], "license": "CC-BY-4.0" }, + "node_modules/cfb": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "license": "Apache-2.0", + "dependencies": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -5770,6 +5919,15 @@ "node": ">= 0.12.0" } }, + "node_modules/codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", @@ -5996,6 +6154,18 @@ } } }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -6266,6 +6436,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/define-properties": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", @@ -6435,12 +6615,35 @@ "node": ">= 0.4" } }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "license": "MIT" }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.267", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz", @@ -6748,6 +6951,10 @@ "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -7492,6 +7699,29 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -7685,6 +7915,15 @@ "node": ">=0.10.0" } }, + "node_modules/frac": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -8012,6 +8251,22 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "license": "MIT" }, + "node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -8211,7 +8466,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "devOptional": true, "funding": [ { "type": "github", @@ -8940,12 +9194,34 @@ "node": ">= 0.4" } }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -10911,6 +11187,25 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -11406,6 +11701,31 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "license": "MIT" }, + "node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", + "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -11549,6 +11869,10 @@ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "bin": { "prettier": "bin-prettier.js" }, @@ -11786,6 +12110,10 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "engines": { "node": ">=0.10.0" } @@ -11850,6 +12178,10 @@ "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.79.0.tgz", "integrity": "sha512-fLG/zl/YF30TWTmp2bbo3flHSFGe4WTyVkb7/wJnMEC39jjXVSCxfDtvSUVavhCc03fA/RTkWWvlmg7NEJk7Vg==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@jest/create-cache-key-function": "^29.7.0", "@react-native/assets-registry": "0.79.0", @@ -11931,13 +12263,22 @@ "license": "MIT" }, "node_modules/react-native-bouncy-checkbox": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/react-native-bouncy-checkbox/-/react-native-bouncy-checkbox-4.1.4.tgz", - "integrity": "sha512-JK/ib8nICVhbi6RJpRQwozqEr6mHneAECSHYh6ZreMj8f27t95xiihZPrTF/rVPHWcC3FQm7+eSfgtihMXDncg==", +<<<<<<<<< Temporary merge branch 1 + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/react-native-bouncy-checkbox/-/react-native-bouncy-checkbox-4.1.2.tgz", + "integrity": "sha512-hB7YwCGTNoMpTPOPiP+RWyQH35S6vxUbc7IGEW/Rqyp7GonEyhtqtthmxiphneRXnywMh8CZwND7OnvppJZscg==", + "license": "MIT", + "dependencies": { + "@freakycoder/react-native-bounceable": "^1.0.3" +========= + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/react-native-bouncy-checkbox/-/react-native-bouncy-checkbox-4.1.3.tgz", + "integrity": "sha512-duS0gN2FuLpAdEPuurWW3G+f9QhKCQTc9R51aQwPYTT6d01B2lZ/yzyzYbpPAv9SY142oieeUZLufPyjuOx3Ww==", "license": "MIT", "dependencies": { "@freakycoder/react-native-bounceable": "^1.0.3", "react-native-bouncy-checkbox": "^4.1.2" +>>>>>>>>> Temporary merge branch 2 } }, "node_modules/react-native-date-picker": { @@ -11950,27 +12291,15 @@ "react-native": ">= 0.64.3" } }, - "node_modules/react-native-element-dropdown": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/react-native-element-dropdown/-/react-native-element-dropdown-2.12.4.tgz", - "integrity": "sha512-abZc5SVji9FIt7fjojRYrbuvp03CoeZJrgvezQoDoSOrpiTqkX69ix5m+j06W2AVncA0VWvbT+vCMam8SoVadw==", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.21" - }, - "engines": { - "node": ">= 16.0.0" - }, - "peerDependencies": { - "react": "*", - "react-native": "*" - } - }, "node_modules/react-native-gesture-handler": { "version": "2.30.0", "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.30.0.tgz", "integrity": "sha512-5YsnKHGa0X9C8lb5oCnKm0fLUPM6CRduvUUw2Bav4RIj/C3HcFh4RIUnF8wgG6JQWCL1//gRx4v+LVWgcIQdGA==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@egjs/hammerjs": "^2.0.17", "hoist-non-react-statics": "^3.3.0", @@ -12032,6 +12361,10 @@ "resolved": "https://registry.npmjs.org/react-native-linear-gradient/-/react-native-linear-gradient-2.8.3.tgz", "integrity": "sha512-KflAXZcEg54PXkLyflaSZQ3PJp4uC4whM7nT/Uot9m0e/qxFV3p6uor1983D1YOBJbJN7rrWdqIjq0T42jOJyA==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "peerDependencies": { "react": "*", "react-native": "*" @@ -12105,6 +12438,10 @@ "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-5.6.2.tgz", "integrity": "sha512-4XGqMNj5qjUTYywJqpdWZ9IG8jgkS3h06sfVjfw5yZQZfWnRFXczi0GnYyFyCc2EBps/qFmoCH8fez//WumdVg==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "peerDependencies": { "react": "*", "react-native": "*" @@ -12115,6 +12452,10 @@ "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-4.12.0.tgz", "integrity": "sha512-T2KL6RcDSYDRZswh9glRe600Hvaeq240U21eaqv0uxCNmJz05UeFc4YGQgbFPI8XsakPKx3HjNonItxElFy+QA==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "react-freeze": "^1.0.0", "react-native-is-edge-to-edge": "^1.1.7", @@ -12142,6 +12483,10 @@ "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-15.15.1.tgz", "integrity": "sha512-ZUD1xwc3Hwo4cOmOLumjJVoc7lEf9oQFlHnLmgccLC19fNm6LVEdtB+Cnip6gEi0PG3wfvVzskViEtrySQP8Fw==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "css-select": "^5.1.0", "css-tree": "^1.1.3", @@ -12249,6 +12594,10 @@ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz", "integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==", "license": "MIT", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" @@ -12309,7 +12658,12 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", +<<<<<<<<< Temporary merge branch 1 + "license": "MIT", + "peer": true +========= "license": "MIT" +>>>>>>>>> Temporary merge branch 2 }, "node_modules/redux-persist": { "version": "6.0.0", @@ -13082,6 +13436,122 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-explorer": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/source-map-explorer/-/source-map-explorer-2.5.3.tgz", + "integrity": "sha512-qfUGs7UHsOBE5p/lGfQdaAj/5U/GWYBw2imEpD6UQNkqElYonkow8t+HBL1qqIl3CuGZx7n8/CQo4x1HwSHhsg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "btoa": "^1.2.1", + "chalk": "^4.1.0", + "convert-source-map": "^1.7.0", + "ejs": "^3.1.5", + "escape-html": "^1.0.3", + "glob": "^7.1.6", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "open": "^7.3.1", + "source-map": "^0.7.4", + "temp": "^0.9.4", + "yargs": "^16.2.0" + }, + "bin": { + "sme": "bin/cli.js", + "source-map-explorer": "bin/cli.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/source-map-explorer/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/source-map-explorer/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/source-map-explorer/node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-explorer/node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/source-map-explorer/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, + "node_modules/source-map-explorer/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/source-map-explorer/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -13117,6 +13587,18 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "license": "BSD-3-Clause" }, + "node_modules/ssf": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "license": "Apache-2.0", + "dependencies": { + "frac": "~1.1.2" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -13483,6 +13965,47 @@ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", "license": "CC0-1.0" }, + "node_modules/temp": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz", + "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mkdirp": "^0.5.1", + "rimraf": "~2.6.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/temp/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/temp/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/terser": { "version": "5.44.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", @@ -13786,6 +14309,10 @@ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "devOptional": true, "license": "Apache-2.0", +<<<<<<<<< Temporary merge branch 1 + "peer": true, +========= +>>>>>>>>> Temporary merge branch 2 "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -13956,6 +14483,12 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "license": "MIT" + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -14164,6 +14697,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wmf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -14218,15 +14769,6 @@ "async-limiter": "~1.0.0" } }, - "node_modules/xmlbuilder": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", - "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", - "license": "MIT", - "engines": { - "node": ">=8.0" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index f1e6dfd..c4a973a 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@stomp/stompjs": "^7.2.1", "@tanstack/react-query": "^5.90.12", "axios": "^1.13.2", + "buffer": "^6.0.3", "eslint-config-prettier": "^10.1.8", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-native": "^5.0.0", @@ -33,9 +34,12 @@ "react-native": "0.79.0", "react-native-alert-notification": "^0.4.2", "react-native-app-intro-slider": "^4.0.4", - "react-native-bouncy-checkbox": "^4.1.3", + "react-native-blob-util": "^0.24.6", + "react-native-bouncy-checkbox": "^4.1.2", "react-native-date-picker": "^5.0.13", "react-native-element-dropdown": "^2.12.4", + "react-native-file-viewer": "^2.1.5", + "react-native-fs": "^2.20.0", "react-native-gesture-handler": "^2.30.0", "react-native-gifted-charts": "^1.4.70", "react-native-haptic-feedback": "^2.3.3", @@ -53,6 +57,7 @@ "redux-persist": "^6.0.0", "sockjs-client": "^1.6.1", "text-encoding": "^0.7.0", + "xlsx": "^0.18.5", "yup": "^1.7.1" }, "devDependencies": { @@ -74,6 +79,7 @@ "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", + "react-native-bundle-visualizer": "^3.1.3", "react-test-renderer": "19.0.0", "typescript": "5.0.4" }, diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..934b69d --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +# Required project identifiers +sonar.projectKey=procurelinc +sonar.projectName=ProcureLinc +sonar.projectVersion=1.0 + +# Source configuration +sonar.sources=. + +# SonarQube server +sonar.host.url=http://localhost:9000 + +# Authentication token +sonar.login=sqp_da89e447c964b6e91e142777097e25fa2f17a1cc diff --git a/src/Axios/Axios.ts b/src/Axios/Axios.ts index 0486fc0..bd88ee7 100644 --- a/src/Axios/Axios.ts +++ b/src/Axios/Axios.ts @@ -1,5 +1,4 @@ import axios from 'axios'; -import { NavigationString, showErrorAlert, Variable } from '../Constant/AllImports'; import { setToken } from '../Redux/Slices/Token'; import { store } from '../Redux/Store'; @@ -50,7 +49,7 @@ export const apiCall = async ( return response.data; } catch (error: any) { const errorMessage = error?.response?.data?.error; - { error?.response?.data?.error && showErrorAlert(error?.response?.data?.error || '') } + console.log(errorMessage, '---------------------------api error message'); if (error?.response?.status === 401) { store.dispatch(setToken({})); diff --git a/src/Component/Card/Card.tsx b/src/Component/Card/Card.tsx index 238a07c..8184491 100644 --- a/src/Component/Card/Card.tsx +++ b/src/Component/Card/Card.tsx @@ -1,12 +1,5 @@ import React, { FC, useRef, useEffect } from 'react'; -import { - StyleSheet, - Text, - View, - TouchableOpacity, - Animated, - Platform, -} from 'react-native'; +import { StyleSheet, Text, View, TouchableOpacity, Animated, Platform } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; import { BlurView } from '@react-native-community/blur'; import colors from '../../Constant/Color'; diff --git a/src/Component/Counter/CountdownTimer.tsx b/src/Component/Counter/CountdownTimer.tsx index 62eef69..e979451 100644 --- a/src/Component/Counter/CountdownTimer.tsx +++ b/src/Component/Counter/CountdownTimer.tsx @@ -7,10 +7,10 @@ import LottieView from 'lottie-react-native'; interface CountdownTimerProps { endDate: string; myStyle?: any - size?: number // Expected format: "DD-MM-YYYY HH:mm:ss" + size?: number } -const CountdownTimer: React.FC = React.memo(({ endDate, myStyle = {}, size = 20 }) => { +const CountdownTimer: React.FC = React.memo(({ endDate, myStyle = {}, size = 20 }) => { const calculateTimeLeft = useCallback(() => { if (!endDate) return null; diff --git a/src/Component/Header/Header.tsx b/src/Component/Header/Header.tsx index b427fba..1d663c5 100644 --- a/src/Component/Header/Header.tsx +++ b/src/Component/Header/Header.tsx @@ -1,12 +1,5 @@ import React, { useState } from 'react'; -import { - View, - Text, - TouchableOpacity, - Image, - StyleSheet, - Dimensions, -} from 'react-native'; +import { View, Text, TouchableOpacity, Image, StyleSheet, Dimensions } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Menu } from 'lucide-react-native'; diff --git a/src/Component/Header/InsideHeader.tsx b/src/Component/Header/InsideHeader.tsx index 5314581..8c75d86 100644 --- a/src/Component/Header/InsideHeader.tsx +++ b/src/Component/Header/InsideHeader.tsx @@ -1,12 +1,5 @@ import React from 'react'; -import { - View, - Text, - TouchableOpacity, - Image, - StyleSheet, - Dimensions, -} from 'react-native'; +import { View, Text, TouchableOpacity, Image, StyleSheet, Dimensions } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { ArrowLeft } from 'lucide-react-native'; import colors from '../../Constant/Color'; @@ -23,7 +16,7 @@ interface HeaderProps { } const InsideHeader: React.FC = ({ title, showArrow = false }) => { - const navigation:any = useNavigation(); + const navigation: any = useNavigation(); const insets = useSafeAreaInsets(); return ( diff --git a/src/Component/InternetConnectivity/InternetConnectivity.tsx b/src/Component/InternetConnectivity/InternetConnectivity.tsx index f424b25..18ff903 100644 --- a/src/Component/InternetConnectivity/InternetConnectivity.tsx +++ b/src/Component/InternetConnectivity/InternetConnectivity.tsx @@ -1,10 +1,8 @@ import React from "react"; -import { View, Text, StyleSheet, TouchableOpacity, Dimensions } from "react-native"; +import { View, Text, StyleSheet, TouchableOpacity } from "react-native"; import LottieView from "lottie-react-native"; import LinearGradient from "react-native-linear-gradient"; -const { width } = Dimensions.get("window"); - const InternetConnectivity = () => { return ( diff --git a/src/Component/InternetConnectivity/ServerDown.tsx b/src/Component/InternetConnectivity/ServerDown.tsx index c382d76..40e0923 100644 --- a/src/Component/InternetConnectivity/ServerDown.tsx +++ b/src/Component/InternetConnectivity/ServerDown.tsx @@ -1,42 +1,16 @@ import React from 'react'; -import { - View, - Text, - StyleSheet, - TouchableOpacity, - Dimensions, - ScrollView, - StatusBar, -} from 'react-native'; +import { View, Text, StyleSheet, TouchableOpacity, Dimensions, ScrollView, StatusBar } from 'react-native'; import LottieView from 'lottie-react-native'; import LinearGradient from 'react-native-linear-gradient'; -import { - AlertCircle, - Clock, - Server, - Calendar, - RefreshCw, - MessageCircle, - Twitter, - Activity, - MessageSquare, - Bell, - WifiOff, -} from 'lucide-react-native'; -import Colors from '../../Styles/Color'; +import { AlertCircle, Clock, RefreshCw, Activity } from 'lucide-react-native'; +import colors from '../../Constant/Color'; import FontsFamily from '../../Constant/FontsFamily'; -const {width} = Dimensions.get('window'); const ServerDown = () => { return ( <> - - + @@ -81,12 +55,12 @@ const ServerDown = () => { {}} + onPress={() => { }} style={styles.touchable}> void + rightIconPress?: () => void } & TextInputProps; const MyInput: React.FC = ({ @@ -67,23 +66,9 @@ const MyInput: React.FC = ({ { rightIcon ? - {/* */} : null} - {/* {isVarify ? ( - - ) : null} */} ); }; @@ -101,7 +86,7 @@ const styles = StyleSheet.create({ paddingHorizontal: 10, marginVertical: 10, height: 55, - + }, icon: { marginRight: 10, diff --git a/src/Component/Serach/SeacrhInput.tsx b/src/Component/Serach/SeacrhInput.tsx index da365c7..5f66aa0 100644 --- a/src/Component/Serach/SeacrhInput.tsx +++ b/src/Component/Serach/SeacrhInput.tsx @@ -1,12 +1,7 @@ import { Filter, Search } from "lucide-react-native"; import React from "react"; import { View, Text, TextInput, StyleSheet, TouchableOpacity, Platform } from "react-native"; -import Animated, { - useAnimatedStyle, - useSharedValue, - withTiming, - interpolateColor -} from "react-native-reanimated"; +import Animated, { useAnimatedStyle, useSharedValue, withTiming, interpolateColor } from "react-native-reanimated"; import colors from "../../Constant/Color"; export interface SearchType { @@ -19,21 +14,14 @@ export interface SearchType { const AnimatedView = Animated.createAnimatedComponent(View); -export const SearchInput: React.FC = ({ - placeholder, - onChange, - label, - filter = true, - filterPress -}) => { +export const SearchInput: React.FC = ({ placeholder, onChange, label, filter = true, filterPress }) => { const isFocused = useSharedValue(0); - // Animate border color and shadow based on focus const inputContainerStyle = useAnimatedStyle(() => { const borderColor = interpolateColor( isFocused.value, [0, 1], - [colors.grayText + '50', colors.grayText] // Assuming colors.primary exists + [colors.grayText + '50', colors.grayText] ); return { diff --git a/src/Component/SideDrawer/SideDrawer.tsx b/src/Component/SideDrawer/SideDrawer.tsx index 0771965..03bd8f4 100644 --- a/src/Component/SideDrawer/SideDrawer.tsx +++ b/src/Component/SideDrawer/SideDrawer.tsx @@ -143,8 +143,6 @@ const SideDrawer: React.FC = ({ visible, onClose }) => { export default SideDrawer; -/* ================= Styles ================= */ - const styles = StyleSheet.create({ modal: { margin: 0, diff --git a/src/Component/list/AuctionItem.tsx b/src/Component/list/AuctionItem.tsx deleted file mode 100644 index 34b53f4..0000000 --- a/src/Component/list/AuctionItem.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import React, { useEffect, useRef } from 'react'; -import { Animated, Text, StyleSheet } from 'react-native'; -import colors from '../../Constant/Color'; - -interface AuctionItemProps { - item: any; - index: number; -} - -const AuctionItem: React.FC = ({ item, index }) => { - const scale = useRef(new Animated.Value(0)).current; - - useEffect(() => { - Animated.spring(scale, { - toValue: 1, - friction: 8, - useNativeDriver: true, - delay: index * 50, - }).start(); - }, []); - - return ( - - {item.title || `${item.auctionNumber}`} - End Date: {item.purchaseEnd || 'N/A'} - - ); -}; - -export default AuctionItem; - -const styles = StyleSheet.create({ - itemCard: { - backgroundColor: '#fff', - padding: 18, - borderRadius: 16, - marginBottom: 14, - shadowColor: '#000', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.12, - shadowRadius: 8, - elevation: 4, - }, - itemTitle: { - fontSize: 16, - fontWeight: '700', - marginBottom: 4, - color: '#020617', - }, - itemDate: { - fontSize: 13, - color: '#64748b', - }, -}); diff --git a/src/Constant/NavigationString.tsx b/src/Constant/NavigationString.tsx index 7dbfa19..0c3abea 100644 --- a/src/Constant/NavigationString.tsx +++ b/src/Constant/NavigationString.tsx @@ -10,6 +10,7 @@ const NavigationString = { StartBidding: 'StartBidding', PurchaseAuctionList:'PurchaseAuctionList', StartReverseBidding:'StartReverseBidding', + // tender PurchaseTenderList:'PurchaseTenderList', ProceedToPurTender:'ProceedToPurTender', TenderBidding:'TenderBidding', diff --git a/src/Helper/DateFormat.tsx b/src/Helper/DateFormat.tsx new file mode 100644 index 0000000..248e00d --- /dev/null +++ b/src/Helper/DateFormat.tsx @@ -0,0 +1,26 @@ +import moment from 'moment'; + +export const format = { + // Internal helper to safely parse any input + parse: (date: string | Date) => { + if (!date) return null; + let d = date; + if (typeof date === 'string') { + // Replace IST or other known timezone abbreviations with UTC offset + d = date.replace('IST', '+0530'); + } + return moment(d); + }, + + date1: (date: string | Date) => format.parse(date)?.format('DD-MM-YYYY'), + date2: (date: string | Date) => format.parse(date)?.format('YYYY-MM-DD'), + date3: (date: string | Date) => format.parse(date)?.format('MMMM Do, YYYY'), + date4: (date: string | Date) => format.parse(date)?.format('dddd, MMMM Do YYYY'), + date5: (date: string | Date) => format.parse(date)?.format('MM/DD/YYYY'), + date6: (date: string | Date) => format.parse(date)?.format('YYYY/MM/DD HH:mm'), + time1: (date: string | Date) => format.parse(date)?.format('hh:mm A'), + time2: (date: string | Date) => format.parse(date)?.format('HH:mm:ss'), + iso: (date: string | Date) => format.parse(date)?.toISOString(), + fromNow: (date: string | Date) => format.parse(date)?.fromNow(), + custom: (date: string | Date, formatStr: string) => format.parse(date)?.format(formatStr), +}; diff --git a/src/Navigation/Bottom.tsx b/src/Navigation/Bottom.tsx index c1904ed..e413a66 100644 --- a/src/Navigation/Bottom.tsx +++ b/src/Navigation/Bottom.tsx @@ -12,6 +12,7 @@ import * as LucideIcons from 'lucide-react-native'; import Screens from '../Screens'; import colors from '../Constant/Color'; import NavigationString from '../Constant/NavigationString'; +import EditableExcel from '../Screens/Tender/Component/EditableExcel'; const { width } = Dimensions.get('window'); const TAB_BAR_HEIGHT = 60; @@ -24,6 +25,7 @@ const TabButton = ({ route, isFocused, onPress }: any) => { Home: { outline: "Home", filled: "Home" }, Auction: { outline: "Gavel", filled: "Gavel" }, Tender: { outline: "FileText", filled: "FileText" }, + EditableExcel: { outline: "FileText", filled: "FileText" }, }; const IconName = LucideIcons[isFocused ? icons[route.name].filled : icons[route.name].outline]; const scaleAnim = useRef(new Animated.Value(1)).current; @@ -146,6 +148,7 @@ export default function BottomTab() { + ); diff --git a/src/Navigation/MainStack.jsx b/src/Navigation/MainStack.jsx index 5055307..e2fd6ed 100644 --- a/src/Navigation/MainStack.jsx +++ b/src/Navigation/MainStack.jsx @@ -46,6 +46,7 @@ export default function MainStack() { + ); diff --git a/src/Redux/Slices/selectPurchaseAuction.tsx b/src/Redux/Slices/selectPurchaseAuction.tsx index 078c069..1c0f230 100644 --- a/src/Redux/Slices/selectPurchaseAuction.tsx +++ b/src/Redux/Slices/selectPurchaseAuction.tsx @@ -5,7 +5,6 @@ export interface AuctionItem { [key: string]: any; } -// ✅ DEFAULT = EMPTY ARRAY const initialState: AuctionItem[] = []; export const selectPurchaseAuctionSlice = createSlice({ diff --git a/src/Screens/Auction/LiveAuction.tsx b/src/Screens/Auction/LiveAuction.tsx index 532a1e8..40519f9 100644 --- a/src/Screens/Auction/LiveAuction.tsx +++ b/src/Screens/Auction/LiveAuction.tsx @@ -1,52 +1,40 @@ -import React, { useCallback, useState, useEffect } from 'react'; +import React, { useCallback, useState, useEffect, useRef } from 'react'; import { View, FlatList, ActivityIndicator, RefreshControl, Text } from 'react-native'; import Animated, { FadeInDown, FadeOutUp } from 'react-native-reanimated'; import LiveAuctionTile from './LiveAuctionTile'; -import { useNavigation } from '@react-navigation/native'; import { useFetchLiveAuction } from '../../Services/BBPS/Hooks'; import { SearchInput } from '../../Component/Serach/SeacrhInput'; import { Skelton } from '../../Component/Index'; import colors from '../../Constant/Color'; import { useDispatch, useSelector } from 'react-redux'; -import { selectPurchaseAuctionSlice, togglePurchaseAuction } from '../../Redux/Slices/selectPurchaseAuction'; +import { togglePurchaseAuction } from '../../Redux/Slices/selectPurchaseAuction'; import { apiCall } from '../../Axios/Axios'; -import { GET_MY_AUCTION, LIVE_AUCTION } from '../../Services/BBPS/ApiUrls'; -import moment from 'moment'; +import { GET_MY_AUCTION } from '../../Services/BBPS/ApiUrls'; const LiveAuction = () => { - const navigation: any = useNavigation(); const Dispatch = useDispatch() + const onEndReachedCalledDuringMomentum = useRef(true); const SelectedPurchaseList = useSelector((state: any) => state.selectPurchaseAuction); - const { data, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading, isRefetching, refetch }: any = useFetchLiveAuction(); const [showRefreshBanner, setShowRefreshBanner] = useState(false); const [allBoolean, setAllBoolean] = useState({ liveAuctionData: [] }) + const { data, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading, isRefetching, refetch, isPending }: any = useFetchLiveAuction(); - useEffect(() => { - if (isRefetching) { - setShowRefreshBanner(true); - } else { - const timer = setTimeout(() => { - setShowRefreshBanner(false); - }, 1000); + // My Methods - return () => clearTimeout(timer); + const getMyAuction = async () => { + try { + const res = await apiCall('get', `${GET_MY_AUCTION}`,); + if (res?.statusCode === 200) { + const purchasedIds = new Set(res.data.map((item: any) => item.auctionId)); + const filteredLive = data?.result.map((item: any) => ({ ...item, active: !purchasedIds.has(item.auctionId) })); + setAllBoolean(prev => ({ ...prev, liveAuctionData: filteredLive })); + } + } catch (error) { + console.error('getMyAuction error', error); + } finally { + setAllBoolean(prev => ({ ...prev, isLoading: false })); } - }, [isRefetching]); - - const loadMore = useCallback(() => { - if (hasNextPage && !isFetchingNextPage) { - fetchNextPage(); - } - }, [hasNextPage, isFetchingNextPage]); - - const renderFooter = useCallback(() => { - if (!isFetchingNextPage) return null; - return ( - - - - ); - }, [isFetchingNextPage]); + }; const renderItem = useCallback( ({ item, index }: any) => { @@ -68,32 +56,35 @@ const LiveAuction = () => { [SelectedPurchaseList] ); - const getMyAuction = async () => { - try { + const loadMore = useCallback(() => { + if (onEndReachedCalledDuringMomentum.current) return; - const res = await apiCall('get', `${GET_MY_AUCTION}`,); + if (!hasNextPage || isFetchingNextPage) return; - if (res?.statusCode === 200) { - const purchasedIds = new Set( - res.data.map((item: any) => item.auctionId), - ); + fetchNextPage(); + onEndReachedCalledDuringMomentum.current = true; + }, [hasNextPage, isFetchingNextPage, fetchNextPage]); - const filteredLive = data?.result.map((item: any) => ({ - ...item, - active: !purchasedIds.has(item.auctionId), // false if match, true otherwise - })); + const renderFooter = useCallback(() => { + if (!isFetchingNextPage) return null; + return ( + + + + ); + }, [isFetchingNextPage]); - setAllBoolean(prev => ({ - ...prev, - liveAuctionData: filteredLive - })); - } - } catch (error) { - console.error('getMyAuction error', error); - } finally { - setAllBoolean(prev => ({ ...prev, isLoading: false })); + useEffect(() => { + if (isRefetching) { + setShowRefreshBanner(true); + } else { + const timer = setTimeout(() => { + setShowRefreshBanner(false); + }, 1000); + + return () => clearTimeout(timer); } - }; + }, [isRefetching]); useEffect(() => { if (data?.result?.length > 0) { @@ -148,27 +139,34 @@ const LiveAuction = () => { String(item.auctionNumber)} renderItem={renderItem} showsVerticalScrollIndicator={false} contentContainerStyle={{ paddingBottom: 50, paddingTop: 10 }} + onEndReached={loadMore} - onEndReachedThreshold={0.2} + onEndReachedThreshold={0.1} + + onMomentumScrollBegin={() => { + onEndReachedCalledDuringMomentum.current = false; + }} + ListFooterComponent={renderFooter} + refreshControl={ } + initialNumToRender={6} maxToRenderPerBatch={6} windowSize={7} removeClippedSubviews - updateCellsBatchingPeriod={50} /> + ); }; diff --git a/src/Screens/Auction/LiveAuctionTile.tsx b/src/Screens/Auction/LiveAuctionTile.tsx index e243a91..a5f0002 100644 --- a/src/Screens/Auction/LiveAuctionTile.tsx +++ b/src/Screens/Auction/LiveAuctionTile.tsx @@ -21,8 +21,6 @@ const LiveAuctionTile: React.FC = ({ return ( - {/* Status Tag */} - { !showDetail ? <> diff --git a/src/Screens/Auction/Modal/AuctionDetail.tsx b/src/Screens/Auction/Modal/AuctionDetail.tsx index 4802cb4..fb85e9a 100644 --- a/src/Screens/Auction/Modal/AuctionDetail.tsx +++ b/src/Screens/Auction/Modal/AuctionDetail.tsx @@ -1,4 +1,4 @@ -import React, { memo, useState } from 'react'; +import React, { memo, useEffect, useState } from 'react'; import { View, Text, StyleSheet, TouchableOpacity, ScrollView, SafeAreaView, Platform, StatusBar } from 'react-native'; import Modal from 'react-native-modal'; import moment from 'moment'; @@ -6,26 +6,29 @@ import { Briefcase, Calendar, FileText, Download, Eye, Layers, ArrowLeft, Clock import colors from '../../../Constant/Color'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import AuctionItemDetail from './AuctionItemDetail'; +import { useAucitonDocDownload, useAuctionItem, useGetAuciton, useGetAucitonDocument } from '../../../Services/BBPS/Hooks'; +import ReactNativeBlobUtil from 'react-native-blob-util'; +import { AUCTION_DOCUMENT_DOWNLOAD, ITEM_DOCUMENT_DOWNLOAD } from '../../../Services/BBPS/ApiUrls'; +import { useSelector } from 'react-redux'; +import { Loader } from '../../../Component/Index'; -interface Props { - visible: boolean; - onClose: () => void; - data?: any; -} +interface Props { visible: boolean; onClose: () => void; data?: any } const AuctionFullDetail: React.FC = ({ visible, onClose, data }) => { const inset = useSafeAreaInsets() - const [allBoolean, setAllBoolean] = useState({ showItemDetail: false }) + const { data: auctionData, isLoading } = useGetAuciton({ auctionId: data?.auctionId }) + const [aucitonDetail, setAuciotnDetail] = useState(auctionData) + const [allBoolean, setAllBoolean] = useState({ showItemDetail: false, selectedItem: {}, fileLoading: false }); + const { data: auctionDocuments } = useGetAucitonDocument({ auctionId: data?.auctionId }) + const { mutate: downloadDocument, isPending } = useAucitonDocDownload() + const { mutate } = useAuctionItem() const formatDate = (date?: string) => { if (!date) return '-'; return moment(date, 'DD-MM-YYYY HH:mm:ss').format('DD MMM YYYY, hh:mm A'); }; - const isLive = data?.purchaseEnd - ? moment().isBefore(moment(data.purchaseEnd, 'DD-MM-YYYY HH:mm:ss')) - : false; + const isLive = data?.purchaseEnd ? moment().isBefore(moment(data.purchaseEnd, 'DD-MM-YYYY HH:mm:ss')) : false; - // Internal Components const Section = ({ title, icon: Icon, children }: any) => ( @@ -43,6 +46,64 @@ const AuctionFullDetail: React.FC = ({ visible, onClose, data }) => { ); + + + + const handleDownload = async (id: number, fileName: string) => { + try { + setAllBoolean((prev: any) => ({ ...prev, fileLoading: true })); + const { dirs } = ReactNativeBlobUtil.fs; + + // ✅ PUBLIC DOWNLOADS DIRECTORY + const path = `${dirs.DownloadDir}/${fileName}.pdf`; + + console.log('📂 Saving to:', path); + + const downloadUrl = `${AUCTION_DOCUMENT_DOWNLOAD}?documentId=${id}&isAmendment=false`; + console.log('🌐 Download URL:', downloadUrl); + + const response = await ReactNativeBlobUtil.config({ + fileCache: false, // important for public folder + addAndroidDownloads: { + useDownloadManager: true, + notification: true, + path, + mime: 'application/pdf', + title: `${fileName}.pdf`, + description: 'Downloading document', + mediaScannable: true, // 👈 makes it visible instantly + }, + }).fetch('GET', downloadUrl, { + Accept: 'application/pdf', + }); + + console.log('✅ Download completed'); + console.log('📦 Status:', response.info().status); + console.log('📦 Headers:', response.info().headers); + console.log('📍 Saved at:', path); + + const stat = await ReactNativeBlobUtil.fs.stat(path); + console.log('📦 File size:', stat.size); + + } catch (error: any) { + console.log('❌ Download failed'); + console.log('❌ Error:', error?.message || error); + } finally { + setAllBoolean((prev: any) => ({ ...prev, fileLoading: false })); + } + }; + + + useEffect(() => { + mutate({ auctionNumber: data?.auctionNumber, status: data?.auctionPattern }, { + onSuccess: (res) => { + setAuciotnDetail((prev: any) => ({ ...prev, auctionItems: res.data, auctionDocuments })) + }, onError: (err) => { + console.log(err, '-----auction item error'); + } + }); + }, [data.auctionNumber, auctionDocuments]); + return ( = ({ visible, onClose, data }) => { {/* 2. Work Description */}
- - - - - - + + + + +
@@ -129,68 +189,55 @@ const AuctionFullDetail: React.FC = ({ visible, onClose, data }) => { Item - Qty + Time View {/* Dummy Item Row */} - - - Sick Sari / Laundry - Category: Sari + {aucitonDetail?.auctionItems?.map((item: any, index: number) => ( + + + {item.productName} + Category: {item?.categoryName} + + {item.timeDurationType} + { setAllBoolean((prev: any) => ({ ...prev, showItemDetail: true, selectedItem: item })) }}> + + - 120,000 - { setAllBoolean((prev: any) => ({ ...prev, showItemDetail: true })) }}> - - - + ))} {/* 5. Downloads */}
- - - - Auction_Notice_Main.pdf - 1.2 MB • PDF - - - + {aucitonDetail?.auctionDocuments?.map((doc: any, index: number) => ( + { + handleDownload( + doc.auctionDocumentId, + doc.fileName.replace('.pdf', '') + ) + }}> + + + {doc.fileName} + + {allBoolean.fileLoading ? ( + + + + ) : ( + + )} + + + ))}
- {/* Sticky Footer */} - - - - {isLive ? 'Add to Cart / Purchase' : 'Auction Closed'} - - - - - { setAllBoolean((prev: any) => ({ ...prev, showItemDetail: false })) }} visible={allBoolean.showItemDetail} /> + {allBoolean.showItemDetail && { setAllBoolean((prev: any) => ({ ...prev, showItemDetail: false })) }} visible={allBoolean.showItemDetail} />}
-
+ ); }; @@ -242,7 +289,7 @@ const styles = StyleSheet.create({ liveText: { fontSize: 11, fontWeight: '800', color: '#475569' }, scrollView: { flex: 1, backgroundColor: '#f8fafc' }, - scrollContent: { padding: 16, paddingBottom: 100 }, + scrollContent: { padding: 16, paddingBottom: 30 }, sectionContainer: { backgroundColor: '#fff', diff --git a/src/Screens/Auction/Modal/AuctionItemDetail.tsx b/src/Screens/Auction/Modal/AuctionItemDetail.tsx index befda66..876b2c2 100644 --- a/src/Screens/Auction/Modal/AuctionItemDetail.tsx +++ b/src/Screens/Auction/Modal/AuctionItemDetail.tsx @@ -1,79 +1,84 @@ -import React, { memo } from 'react'; -import { - View, - Text, - StyleSheet, - TouchableOpacity, - ScrollView, - SafeAreaView, - Platform, - StatusBar, - Dimensions -} from 'react-native'; +import React, { memo, useState } from 'react'; +import { View, Text, StyleSheet, TouchableOpacity, ScrollView, Platform } from 'react-native'; import Modal from 'react-native-modal'; -import { - X, - Package, - Clock, - Tag, - IndianRupee, - FileText, - Download, - ArrowLeft, - Info, - Layers, - ChevronRight -} from 'lucide-react-native'; +import { Package, IndianRupee, FileText, Download, ArrowLeft, Info, } from 'lucide-react-native'; import colors from '../../../Constant/Color'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { useAucitonItemDetail } from '../../../Services/BBPS/Hooks'; +import ReactNativeBlobUtil from 'react-native-blob-util'; +import { AUCTION_ITEM_DOCUMENT_DOWNLOAD } from '../../../Services/BBPS/ApiUrls'; +import { Loader } from '../../../Component/Index'; -const { width } = Dimensions.get('window'); +interface Props { visible: boolean; onClose: () => void; data?: any; } -// --- Exact Dummy Data Mapping --- -const ITEM_DUMMY_DATA = { - productName: "sick sari", - timeDuration: "112 YEAR", - category: "laundry", - subCategory: "sari", - reservePriceFig: "120000", - reservePriceWords: "One Lakh Twenty Thousand", - auctionStartFig: "120000", - auctionStartWords: "One Lakh Twenty Thousand", - bidVariationFig: "200", - bidVariationWords: "Two Hundred", - emdFig: "2000", - emdWords: "Two Thousand", - description: "Auction of cars", - documentName: "BBPS screens.pdf" -}; - -interface Props { - visible: boolean; - onClose: () => void; - data?: typeof ITEM_DUMMY_DATA; -} - -const AuctionItemDetail: React.FC = ({ visible, onClose, data = ITEM_DUMMY_DATA }) => { - const inset = useSafeAreaInsets() - const Section = ({ title, icon: Icon, children }: any) => ( - - - - - - {title} +const Section = ({ title, icon: Icon, children }: any) => ( + + + + - {children} + {title} - ); + {children} + +); - const PriceTile = ({ label, fig, words, full = false }: any) => ( - - {label} - ₹{Number(fig).toLocaleString('en-IN')} - {words} - - ); +const PriceTile = ({ label, fig, words, full = false }: any) => ( + + {label} + ₹{Number(fig).toLocaleString('en-IN')} + {words} + +); +const AuctionItemDetail: React.FC = ({ visible, onClose, data }) => { + const inset = useSafeAreaInsets() + const [allBoolean, setAllBoolean] = useState({ fileLoading: false }); + const { data: itemData } = useAucitonItemDetail({ auctionItemId: data.id }); + + const handleDownload = async (id: number, fileName: string) => { + try { + setAllBoolean((prev: any) => ({ ...prev, fileLoading: true })); + const { dirs } = ReactNativeBlobUtil.fs; + + // ✅ PUBLIC DOWNLOADS DIRECTORY + const path = `${dirs.DownloadDir}/${fileName}.pdf`; + + console.log('📂 Saving to:', path); + + const downloadUrl = `${AUCTION_ITEM_DOCUMENT_DOWNLOAD}?auctionItemId=${id}`; + console.log('🌐 Download URL:', downloadUrl); + + const response = await ReactNativeBlobUtil.config({ + fileCache: false, // important for public folder + addAndroidDownloads: { + useDownloadManager: true, + notification: true, + path, + mime: 'application/pdf', + title: `${fileName}.pdf`, + description: 'Downloading document', + mediaScannable: true, // 👈 makes it visible instantly + }, + }).fetch('GET', downloadUrl, { + Accept: 'application/pdf', + }); + + console.log('✅ Download completed'); + console.log('📦 Status:', response.info().status); + console.log('📦 Headers:', response.info().headers); + console.log('📍 Saved at:', path); + + const stat = await ReactNativeBlobUtil.fs.stat(path); + console.log('📦 File size:', stat.size); + + } catch (error: any) { + console.log('❌ Download failed'); + console.log('❌ Error:', error?.message || error); + } finally { + setAllBoolean((prev: any) => ({ ...prev, fileLoading: false })); + } + }; + console.log(data, 'kkkkk---'); return ( = ({ visible, onClose, data = ITEM_DUMM contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={false} > - {/* Product Identity Card */}
{data.productName.toUpperCase()} - {data.category} + {data.categoryName} Sub Category - {data.subCategory} + {data.subCategoryName} Duration - {data.timeDuration} + {data.timeDurationType}
- {/* Pricing & Financials */}
- + {/* - - + + */}
- {/* Description Card */}
- {data.description} + {data.briefDescription}
- {/* Documents Card */} -
+ {itemData?.length &&
Sr No. Document Name Action - - 1 - - {data.documentName} - - - - - -
+ {itemData?.map((doc: any, index: any) => ( + { handleDownload(doc.assetId, doc.fileName) }} key={doc.assetId}> + {index + 1} + + {doc.fileName} + + + {allBoolean.fileLoading ? ( + + + + ) : ( + + )} + + ))} +
}
diff --git a/src/Screens/Auction/PurchaseAuctionList.tsx b/src/Screens/Auction/PurchaseAuctionList.tsx index 9b50757..bc4f927 100644 --- a/src/Screens/Auction/PurchaseAuctionList.tsx +++ b/src/Screens/Auction/PurchaseAuctionList.tsx @@ -1,14 +1,15 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { View, Text, FlatList, StyleSheet, TouchableOpacity, Alert } from 'react-native'; import { InsideHeader, Loader } from '../../Component/Index'; import colors from '../../Constant/Color'; import { CreditCard, Calendar, User, DollarSign, ArrowRight } from 'lucide-react-native'; import { useDispatch, useSelector } from 'react-redux'; -import { useOfflineAuctionPurchase } from '../../Services/BBPS/Hooks'; +import { useOfflineAuctionPurchase, usePurchaseAuctionList } from '../../Services/BBPS/Hooks'; import { showSuccessAlert } from '../../Constant/ShowDailog'; import { clearPurchaseAuction } from '../../Redux/Slices/selectPurchaseAuction'; -import { CommonActions, useNavigation } from '@react-navigation/native'; +import { CommonActions, useFocusEffect, useNavigation } from '@react-navigation/native'; import NavigationString from '../../Constant/NavigationString'; +import Skeleton from '../../Component/Skelton/Skelton'; const dummyAuctionList = [ { @@ -23,40 +24,19 @@ const dummyAuctionList = [ portalCharge: 100, payableAmount: 3050, }, - { - auctionId: 2, - auctionNumber: 'AUC-2025-002', - auctionPattern: 'Two Stage', - auctionDispatchDate: '28 Feb 2025', - auctionDispatcherNumber: 'DISP-002', - auctionFees: 1800, - gst: 18, - gstAmount: 324, - portalCharge: 80, - payableAmount: 2204, - }, - { - auctionId: 3, - auctionNumber: 'AUC-2025-003', - auctionPattern: 'Single Stage', - auctionDispatchDate: '01 Mar 2025', - auctionDispatcherNumber: 'DISP-003', - auctionFees: 3200, - gst: 18, - gstAmount: 576, - portalCharge: 120, - payableAmount: 3896, - }, ]; const PurchaseAuctionList = () => { const Navigation = useNavigation() const Dispatch = useDispatch() const [loading, setLoading] = useState(false); - const [list, setList] = useState(dummyAuctionList); + const [list, setList] = useState([]); const SelectedPurchaseList = useSelector((state: any) => state.selectPurchaseAuction); + const LoginUser = useSelector((state: any) => state.token.token); const { mutate, isPending } = useOfflineAuctionPurchase() + const { mutate: purchaseListMutation, isPending: purchaseListPending } = usePurchaseAuctionList(); + const calculateTotalAmount = (item: any) => { const gstAmount = (Number(item.auctionFees) + Number(item.portalCharge)) * @@ -69,7 +49,7 @@ const PurchaseAuctionList = () => { const handleOfflinePurchase = async () => { const body = { - auctionDetails: SelectedPurchaseList.map((b: any) => ({ + auctionDetails: list.map((b: any) => ({ auctionDispatchDate: b?.auctionDispatchDate, auctionDispatcherNumber: b?.auctionDispatcherNumber, auctionFees: b?.auctionFees, @@ -156,16 +136,37 @@ const PurchaseAuctionList = () => {
); + const getPurchaseList = () => { + const auctionNumbers: string[] = SelectedPurchaseList.map( + (item: { auctionNumber: string }) => item.auctionNumber + ); + purchaseListMutation({ auctionNumbers, contractorId: LoginUser.contractorId }, { + onSuccess: (res) => { + if (res.statusCode == 200) { + setList(res.data) + } + }, + onError: (error) => { + console.log(error, "=================purchase list error"); + } + }) + } + useFocusEffect( + React.useCallback(() => { + getPurchaseList() + }, [SelectedPurchaseList]) + ); + return ( - : item.auctionId.toString()} contentContainerStyle={styles.container} - /> + />} diff --git a/src/Screens/Auction/PurchaseAuctionTile.tsx b/src/Screens/Auction/PurchaseAuctionTile.tsx index 9b183e4..578cb5b 100644 --- a/src/Screens/Auction/PurchaseAuctionTile.tsx +++ b/src/Screens/Auction/PurchaseAuctionTile.tsx @@ -31,7 +31,6 @@ const PurchaseAuctionTile = ({ item, onPressDetails, onStartBidding, buttonEnabl const statusColor = isAuctionEnd ? '#EF4444' : buttonEnable ? colors.primary : '#94A3B8'; const lightStatusBg = isAuctionEnd ? '#FEF2F2' : buttonEnable ? '#EFF6FF' : '#F8FAFC'; - console.log(item?.keyDates?.auctionBidding?.endDateTime, 'kk'); return ( diff --git a/src/Screens/Auction/PurchaseList.tsx b/src/Screens/Auction/PurchaseList.tsx index fe36fb6..a33700f 100644 --- a/src/Screens/Auction/PurchaseList.tsx +++ b/src/Screens/Auction/PurchaseList.tsx @@ -26,7 +26,7 @@ const PurchaseList = () => { {/* Header */} Purchase List - + {/* */} {/* Cards */} diff --git a/src/Screens/Bidding/Component/BiddingCard.tsx b/src/Screens/Bidding/Component/BiddingCard.tsx index 853e785..485b7d3 100644 --- a/src/Screens/Bidding/Component/BiddingCard.tsx +++ b/src/Screens/Bidding/Component/BiddingCard.tsx @@ -1,12 +1,20 @@ -import React, { memo, useCallback, useRef } from 'react'; -import { View, Text, TouchableOpacity, StyleSheet, Platform } from 'react-native'; +import React, { memo, useCallback, useRef, useState } from 'react'; +import { View, Text, TouchableOpacity, StyleSheet, Platform, TextInput, Alert } from 'react-native'; import Animated, { FadeInUp, Layout, interpolate, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated'; import colors from '../../../Constant/Color'; import AuctionItemDetail from '../../Auction/Modal/AuctionItemDetail'; import MainStyle from '../../../Styles/MainStyle'; +import { Loader } from '../../../Component/Index'; +import { useSelector } from 'react-redux'; +import axios from 'axios'; +import Variables from '../../../Constant/Variable'; +import { showErrorAlert, showSuccessAlert } from '../../../Constant/ShowDailog'; -const BiddingCard = ({ item, bidValue, onIncrease, onDecrease, onPlaceBid, SelectedAuction }: any) => { - const [showDetail, setShowDetail] = React.useState(false); +const BiddingCard = ({ item, bidValue, onIncrease, onDecrease, onPlaceBid, SelectedAuction, allBoolean, setAllBoolean }: any) => { + const Token = useSelector((state: any) => state.token.token) + const [showDetail, setShowDetail] = useState(false); + const [value, setValue] = useState(`${item.bidAmount}`); + const [allState, setAllState] = useState({ isLoading: false }) const isMin = bidValue <= item.bidAmount; // 🔒 Persist expand state safely @@ -26,6 +34,11 @@ const BiddingCard = ({ item, bidValue, onIncrease, onDecrease, onPlaceBid, Selec opacity: interpolate(animation.value, [0, 0.5, 1], [0, 0, 1]), marginTop: interpolate(animation.value, [0, 1], [0, 15]), })); + const bodyStyle2 = useAnimatedStyle(() => ({ + height: interpolate(animation.value, [0, 1], [0, 100]), + opacity: interpolate(animation.value, [0, 0.5, 1], [0, 0, 1]), + marginTop: interpolate(animation.value, [0, 1], [0, 15]), + })); const arrowStyle = useAnimatedStyle(() => ({ transform: [ @@ -34,6 +47,53 @@ const BiddingCard = ({ item, bidValue, onIncrease, onDecrease, onPlaceBid, Selec }, ], })); + const MAX_VALUE = Number(item.bidAmount); + + const handleChange = (text: string) => { + let cleaned = text.replace(/[^0-9.]/g, ''); + if ((cleaned.match(/\./g) || []).length > 1) return; + setValue(cleaned); + }; + + + const oneTimePlaceBid = async () => { + try { + if (Number(value) < MAX_VALUE) { + showErrorAlert("Enter the greather vlaue to current bid value") + return false + } + setAllState((prev: any) => ({ ...prev, isLoading: true })) + const payload = { + itemId: item.id, + bidAmount: Number(value), + auctionId: SelectedAuction.auctionId, + contractorId: Token.contractorId, + fullName: Token.fullName, + }; + + + const res = await axios.post( + `${Variables.socketUrl}bidding/placeBidForAuction`, + [payload], + { headers: { Authentication: `Bearer ${Token.token}` } } + ); + + if (res.data.statusCode === 200) { + showSuccessAlert(res.data.message); + } + setAllBoolean((prev: any) => ({ ...prev, reload: !prev.reload })) + } catch (error) { + if (axios.isAxiosError(error)) { + showErrorAlert(error.response?.data.message) + } else { + console.log('UNKNOWN ERROR:', error); + } + + } finally { + setAllState((prev: any) => ({ ...prev, isLoading: false })) + } + } + // console.log(item, 'jkjjj'); return ( @@ -80,7 +140,7 @@ const BiddingCard = ({ item, bidValue, onIncrease, onDecrease, onPlaceBid, Selec Current Bid - ₹{item?.bidAmount} + ₹{item?.bidAmount || item.auctionStartValueFigure} @@ -92,12 +152,12 @@ const BiddingCard = ({ item, bidValue, onIncrease, onDecrease, onPlaceBid, Selec {/* COLLAPSIBLE BODY */} - + Set Your Bid - + {!allBoolean.oneTimeBid && + - + } + { + (allBoolean.oneTimeBid || allBoolean.rebid) && + ₹ - + + } + {(!allBoolean.rebid && item.contractorId == undefined) ? - Confirm Bid - + { + allState.isLoading ? : Confirm Bid + } + : null} : @@ -135,7 +209,31 @@ const BiddingCard = ({ item, bidValue, onIncrease, onDecrease, onPlaceBid, Selec }; export default memo(BiddingCard); + const styles = StyleSheet.create({ + inputBox2: { + flexDirection: 'row', + alignItems: 'center', + backgroundColor: '#F1F5F9', + borderRadius: 12, + height: 45, + paddingHorizontal: 12, + width: '100%', + marginBottom: 20 + }, + currency2: { + fontSize: 16, + fontWeight: 'bold', + color: '#64748B', + marginRight: 4, + }, + input: { + flex: 1, + fontSize: 18, + fontWeight: '700', + color: '#0F172A', + width: '100%' + }, card: { backgroundColor: '#FFF', borderRadius: 24, diff --git a/src/Screens/Bidding/Emd.tsx b/src/Screens/Bidding/Emd.tsx index 90a86ea..97138fe 100644 --- a/src/Screens/Bidding/Emd.tsx +++ b/src/Screens/Bidding/Emd.tsx @@ -12,9 +12,12 @@ import { useNavigation } from '@react-navigation/native'; import { useSelector } from 'react-redux'; import { useAuctionItem, useEmdCheck } from '../../Services/BBPS/Hooks'; import { apiCall } from '../../Axios/Axios'; -import { AUCTION_ITEM_SUBMIT, CHECK_TECHNICAL_DOCUMENTAION, GET_TECHNICAL_DOCUMENTAION } from '../../Services/BBPS/ApiUrls'; +import { AUCITON_SINGLE_EMD, AUCTION_ITEM_SUBMIT, CHECK_TECHNICAL_DOCUMENTAION, GET_AUCTION_DETAILS, GET_TECHNICAL_DOCUMENTAION } from '../../Services/BBPS/ApiUrls'; import TemplateFormModal from './Component/TemplateFormModal'; import { SelectedItem } from './Type/BidType'; +import FontsFamily from '../../Constant/FontsFamily'; +import { all } from 'axios'; +import { showSuccessAlert } from '../../Constant/ShowDailog'; const Emd = () => { @@ -22,7 +25,7 @@ const Emd = () => { const SelectedAuction = useSelector((state: any) => state.auction.auction) const [selectedItems, setSelectedItems] = useState([]); const [acceptedPolicy, setAcceptedPolicy] = useState(false); - const [allBoolean, setAllBoolean] = useState({ isSubmitEmdLoading: false, isEmdComplete: false, auctionItems: [], technicalDocumentStatus: false, selectTemplate: {}, technicalDocModalVisible: false }) + const [allBoolean, setAllBoolean]: any = useState({ isSubmitEmdLoading: false, isEmdComplete: false, auctionItems: [], technicalDocumentStatus: false, selectTemplate: {}, technicalDocModalVisible: false, emdType: false, fileName: '', file: {} }) const { mutate } = useEmdCheck() const { mutate: AuctionItemMutate, isPending } = useAuctionItem() @@ -63,8 +66,15 @@ const Emd = () => { } }; - - + const pickFileSingle = async () => { + try { + const res = await pick({ type: ['application/pdf'] }); + const file = res[0]; + setAllBoolean((prev: any) => ({ ...prev, file: { name: file.name ?? 'document.pdf', uri: file.uri, type: 'application/pdf' } })) + } catch { + console.log('Pick cancelled'); + } + }; /* ---------------- Render Item ---------------- */ const renderItem = ({ item }: any) => { const selected = isSelected(item.id); @@ -202,15 +212,33 @@ const Emd = () => { setAllBoolean((prev: any) => ({ ...prev, isLoading: false })) } } + const getAuction = async () => { + const selectedRes = await apiCall('get', GET_AUCTION_DETAILS, {}, { id: SelectedAuction.auctionId }); + const emdType = String(selectedRes.data.emd) + .trim() + .replace(/\s+/g, ' ') + .toLowerCase(); + + + if (selectedRes.statusCode == 200 && emdType === 'auction wise') { + return true + } else { + return false + } + } const AlreadyEmdCheck = async () => { try { mutate({ auctionNumber: SelectedAuction.auctionNumber }, { - onSuccess: (res => { - console.log(SelectedAuction.auctionNumber, res , SelectedAuction,'iiiiiiiiiiiiiiiiiiiiiiiii'); - + onSuccess: (async (res) => { if (res.statusCode == 200) { + if (res.message == 'No EMD Documents') { + const result = await getAuction() + if (result) { + setAllBoolean((prev: any) => ({ ...prev, emdType: true })) + return + } setAllBoolean((prev: any) => ({ ...prev, isEmdComplete: false })) getAuctionItem() } else { @@ -308,7 +336,53 @@ const Emd = () => { getTemplateDocumentation() } } + + + const singleEmdSubmit = async () => { + try { + setAllBoolean((prev: any) => ({ ...prev, isSubmitEmdLoading: true })) + + if (!acceptedPolicy) { + Alert.alert('Policy Required', 'Please accept terms'); + return; + } + const formData = new FormData(); + + formData.append('auctionId', SelectedAuction.auctionId); + formData.append('productImageName', allBoolean.fileName); + formData.append('files', allBoolean.file); + + const response = await apiCall( + 'post', + AUCITON_SINGLE_EMD, + formData, + {}, + 'multipart/form-data' + ); + + if (response?.statusCode === 200) { + showSuccessAlert(response.message || 'EMD submitted successfully'); + if (SelectedAuction.auctionPattern === 'Forward') { + Navigation.navigate(NavigationString.StartBidding) + } else { + Navigation.navigate(NavigationString.StartReverseBidding) + } + } + } catch (error: any) { + if (error?.response) { + console.log('Server error:', error.response.data); + } else if (error?.request) { + console.log('Network error:', error.request); + } else { + console.log('Error message:', error.message); + } + } finally { + setAllBoolean((prev: any) => ({ ...prev, isSubmitEmdLoading: false })) + } + }; + useEffect(() => { + // getAuction() AlreadyEmdCheck() }, []) @@ -324,16 +398,24 @@ const Emd = () => { ) : allBoolean.isEmdComplete ? ( - ) : <> - item.auctionId} - renderItem={renderItem} - contentContainerStyle={{ paddingBottom: 170 }} - /> + ) : allBoolean.emdType ? + + Document Name + { setAllBoolean((prev: any) => ({ ...prev, fileName: text })) }} + /> + { pickFileSingle() }}> + {allBoolean?.file?.name ? allBoolean?.file?.name : 'Choose File'} + + - {/* { onPress={() => setAcceptedPolicy(p => !p)} text="I agree to Terms & Privacy Policy" textStyle={styles.policyText} - /> */} + /> + + + { + allBoolean.isSubmitEmdLoading ? : Submit EMD + } + + + + : <> + item.auctionId} + renderItem={renderItem} + contentContainerStyle={{ paddingBottom: 170 }} + /> + + + setAcceptedPolicy(p => !p)} + text="I agree to Terms & Privacy Policy" + textStyle={styles.policyText} + /> { const Navigation: any = useNavigation() const [items, setItems] = useState([]); const [bidValues, setBidValues] = useState>({}); - const [allBoolean, setAllBoolean] = useState({ showSuccess: false, showDialog: false, bidPayload: {} }) + const [allBoolean, setAllBoolean] = useState({ showSuccess: false, showDialog: false, bidPayload: {}, oneTimeBid: false, rebid: false, reload: false }) const { subscribe, createRoom, placeBid } = useWebSocketService( Variables.webSocketUrl, () => console.log('Connected!'), @@ -28,6 +28,25 @@ const StartBidding = () => { loginUser.token, ); + const getAuction = async () => { + const selectedRes = await apiCall('get', GET_AUCTION_DETAILS, {}, { id: SelectedAuction.auctionId }); + if (selectedRes.statusCode == 200 && selectedRes.data.contractorId.length) { + setAllBoolean((prev: any) => ({ ...prev, oneTimeBid: true })) + } + } + const getOneTimeBidValue = async () => { + try { + const selectedRes = await apiCall('get', AUCTION_ONE_TIME_BID, {}, { auctionId: SelectedAuction.auctionId }); + if (selectedRes.statusCode == 200) { + return selectedRes.data + } else { + return [] + } + } catch (error) { + + } + + } const getAllAcutionItems = async () => { try { const payload = { auctionNumber: SelectedAuction.auctionNumber }; @@ -36,13 +55,9 @@ const StartBidding = () => { if (SelectedAuction.auctionPattern === 'Forward') { const res = await apiCall('get', FORWARD_AUCTION_ITEM, {}, payload); if (res?.statusCode === 200) auctionItem = res.data || []; - } else { - const res = await apiCall('get', REVERSE_AUCTION_ITEM, {}, payload); - if (res?.statusCode === 200) auctionItem = res.data || []; } const selectedRes = await apiCall('get', SELECTED_AUCTION_ITEM, {}, payload); -console.log(selectedRes,'jhhhhhhhhhh'); const uniqueArray: number[] = Array.from( new Set(selectedRes?.data || []) @@ -52,47 +67,96 @@ console.log(selectedRes,'jhhhhhhhhhh'); uniqueArray.includes(item.id) ); + if (SelectedAuction.auctionCategories == 'Live') { + const result = await createRoom(SelectedAuction.auctionNumber); - const result = await createRoom(SelectedAuction.auctionNumber); - - subscribe(`/topic/room/${SelectedAuction.auctionNumber}`, data => { - console.log('🔥 BID UPDATE:', data); - }); - - const bidAmountMap2 = new Map(); - - (result || []).forEach((r: any) => { - bidAmountMap2.set(r.auctionItemId, { - bidAmount: r.bidAmount, - contractorId: r.contractorId, + subscribe(`/topic/room/${SelectedAuction.auctionNumber}`, data => { + console.log('🔥 BID UPDATE:', data); }); - }); + const bidAmountMap2 = new Map(); + (result || []).forEach((r: any) => { + bidAmountMap2.set(r.auctionItemId, { + bidAmount: r.bidAmount, + contractorId: r.contractorId, + }); + }); + // Check One Time bid enable butoon + if (SelectedAuction.auctionCategories != 'Live') { + const myBid = result.find( + (bid: any) => bid.contractorId === loginUser.contractorId + ); + if (myBid) { + setAllBoolean((prev: any) => ({ ...prev, oneTimeBid: true })) + } + } - const bidAmountMap = new Map(); + const bidAmountMap = new Map(); - (result || []).forEach((r: any) => { - bidAmountMap.set(r.auctionItemId, r.bidAmount); - }); + (result || []).forEach((r: any) => { + bidAmountMap.set(r.auctionItemId, r.bidAmount); + }); - const updatedFilteredItems = filteredItems.map(item => { - const bidData = bidAmountMap2.get(item.id); - return { - ...item, - bidAmount: bidData?.bidAmount ?? item.auctionStartValueFigure, - bidAvilable: bidData?.bidAmount ?? 0, - me: bidData?.contractorId == loginUser.contractorId ? true : false - }; - }); + const updatedFilteredItems = filteredItems.map(item => { + const bidData = bidAmountMap2.get(item.id); + return { + ...item, + bidAmount: bidData?.bidAmount ?? item.auctionStartValueFigure, + bidAvilable: bidData?.bidAmount ?? 0, + me: bidData?.contractorId == loginUser.contractorId ? true : false + }; + }); - const initialBids: Record = {}; - updatedFilteredItems.forEach(item => { - initialBids[item.id] = item.bidAmount; - }); - setBidValues(initialBids); - setItems(updatedFilteredItems); + const initialBids: Record = {}; + updatedFilteredItems.forEach(item => { + initialBids[item.id] = item.bidAmount; + }); + setBidValues(initialBids); + setItems(updatedFilteredItems); + } else { + let result = [] + if (SelectedAuction.rebidAllowed) { + setAllBoolean((prev: any) => ({ ...prev, rebid: true })) + } + if (SelectedAuction.auctionCategories != 'Live') { + result = await getOneTimeBidValue() + } + const bidMap = new Map(); + + result.forEach((bid: any) => { + bidMap.set(bid.auctionItemId, bid); + }); + const mergedData = auctionItem.map((item: any) => { + const bid = bidMap.get(item.id); + + if (!bid) { + return { + ...item, + bidAmount: item.auctionStartValueFigure, + contractorId: item.contractorId, + }; + } + + return { + ...item, + bidAmount: bid.bidAmount, + bidId: bid.bidId, + contractorId: bid.contractorId, + contractorName: bid.contractorName, + me: bid.contractorId === loginUser.contractorId, + bidTime: bid.bidTime, + }; + }); + const initialBids: Record = {}; + mergedData.forEach(item => { + initialBids[item.id] = item.bidAmount; + }); + setBidValues(initialBids); + setItems(mergedData) + setBidValues(initialBids); + } } catch (error) { console.error('Error fetching auction items:', error); } @@ -122,11 +186,14 @@ console.log(selectedRes,'jhhhhhhhhhh'); } }); + useEffect(() => { + if (SelectedAuction.auctionCategories == 'One-time') { + getAuction() + } getAllAcutionItems(); subscribe(`/topic/room/${SelectedAuction.auctionNumber}`, (data) => { }); - }, []); - + }, [allBoolean.reload]); useEffect(() => { const initial: Record = {}; @@ -233,6 +300,8 @@ console.log(selectedRes,'jhhhhhhhhhh'); return () => subscription.remove(); }, [Navigation]) ); + // console.log(bidValues, 'jjfdlsjfldsjfl'); + return ( @@ -261,9 +330,11 @@ console.log(selectedRes,'jhhhhhhhhhh'); onDecrease={() => handleUpdate(item.id, -item.bidVariationValue)} onPlaceBid={() => { submitBid(item) }} SelectedAuction={SelectedAuction} + allBoolean={allBoolean} + setAllBoolean={setAllBoolean} /> )} - contentContainerStyle={{ padding: 16 }} + contentContainerStyle={{ padding: 16, paddingBottom: 300 }} /> {allBoolean.showSuccess && ( diff --git a/src/Screens/Home/Home.tsx b/src/Screens/Home/Home.tsx index 2f10bc0..df9cdb6 100644 --- a/src/Screens/Home/Home.tsx +++ b/src/Screens/Home/Home.tsx @@ -1,30 +1,9 @@ import React, { useEffect } from 'react'; -import { - View, - Text, - StyleSheet, - Dimensions, - FlatList, - ActivityIndicator, -} from 'react-native'; -import Animated, { - useSharedValue, - useAnimatedStyle, - withDelay, - withTiming, -} from 'react-native-reanimated'; -import { - Layers, - Clock, - ShoppingCart, - X, - FileText, -} from 'lucide-react-native'; +import { View, Text, StyleSheet, Dimensions, FlatList, ActivityIndicator } from 'react-native'; +import Animated, { useSharedValue, useAnimatedStyle, withDelay, withTiming } from 'react-native-reanimated'; +import { Layers, Clock, ShoppingCart, X, FileText } from 'lucide-react-native'; import { Header } from '../../Component/Index'; import colors from '../../Constant/Color'; -import { useWebSocketService } from '../../socket/Socket'; -import Variables from '../../Constant/Variable'; -import { useFocusEffect } from '@react-navigation/native'; import { useDashboard } from '../../Services/BBPS/Hooks'; const { width } = Dimensions.get('window'); @@ -142,17 +121,6 @@ const Home = () => { }, ]; - /* ---------------- WebSocket ---------------- */ - const { connect } = useWebSocketService( - Variables.webSocketUrl, - () => console.log('WebSocket Connected'), - error => console.log('WebSocket Error:', error), - ); - - useFocusEffect(() => { - connect(); - }); - return (
diff --git a/src/Screens/Tender/Component/EditableExcel.tsx b/src/Screens/Tender/Component/EditableExcel.tsx new file mode 100644 index 0000000..fd01fb3 --- /dev/null +++ b/src/Screens/Tender/Component/EditableExcel.tsx @@ -0,0 +1,187 @@ +import React, { useEffect, useState } from 'react'; +import { + View, + Text, + TextInput, + ScrollView, + TouchableOpacity, + StyleSheet, + ActivityIndicator, + Alert, +} from 'react-native'; +import RNFS from 'react-native-fs'; +import * as XLSX from 'xlsx'; +import axios from 'axios'; + +const EXCEL_API_URL = 'https://procurelinc.in/EProcurementSB/eTendering/getEnvelopeCTemplate/tenderId'; + +const EnvelopeCExcelPreview = () => { + const [data, setData] = useState([]); + const [columns, setColumns] = useState([]); + const [loading, setLoading] = useState(false); + + useEffect(() => { + loadExcelFromApi(); + }, []); + + // 📥 FETCH EXCEL BLOB + READ + const loadExcelFromApi = async () => { + try { + setLoading(true); + + const urlWithParams = `${EXCEL_API_URL}?tenderId=2479`; + + // ⬇️ Fetch Excel as blob + const response = await axios.get(urlWithParams, { + responseType: 'arraybuffer', + headers: { + Authorization: `Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJBQklOVE9QUE85NkBHTUFJTC5DT00iLCJpYXQiOjE3Njc5MzgzMDMsImV4cCI6MTc2Nzk3NDMwM30.NiT5iOIdQH0y8TutLfLVp9ApQIAI3NHbkmRjb1fl-JlGxeyX21n3oPGvU6sDw_uU9iTZHI183e2FH_IL2sZYpQ`, + }, + }); + console.log(response, '--------------------------------------'); + + // ⬇️ Save file locally + const filePath = `${RNFS.DocumentDirectoryPath}/envelopeC.xlsx`; + const buffer = Buffer.from(response.data, 'binary'); // convert arraybuffer to buffer + await RNFS.writeFile(filePath, buffer.toString('base64'), 'base64'); + + // 📖 Read Excel + const workbook = XLSX.readFile(filePath); + const sheet = workbook.Sheets[workbook.SheetNames[0]]; + const jsonData: any[] = XLSX.utils.sheet_to_json(sheet, { defval: '' }); + + setData(jsonData); + setColumns(Object.keys(jsonData[0] || {})); + } catch (error: any) { + console.log('Excel load error:', error); + Alert.alert('Error', error.message || 'Unable to load Excel'); + } finally { + setLoading(false); + } + }; + + // ✏️ UPDATE CELL + const updateCell = (rowIndex: number, key: string, value: string) => { + const updated = [...data]; + updated[rowIndex][key] = value; + setData(updated); + }; + + // 💾 SAVE UPDATED EXCEL (LOCAL) + const saveUpdatedExcel = async () => { + try { + setLoading(true); + + const worksheet = XLSX.utils.json_to_sheet(data); + const workbook = XLSX.utils.book_new(); + XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1'); + + const base64Excel = XLSX.write(workbook, { bookType: 'xlsx', type: 'base64' }); + const updatedPath = `${RNFS.DocumentDirectoryPath}/envelopeC_updated.xlsx`; + + await RNFS.writeFile(updatedPath, base64Excel, 'base64'); + + Alert.alert('Success', 'Updated Excel saved successfully'); + console.log('Saved at:', updatedPath); + } catch (error) { + console.log('Save error:', error); + Alert.alert('Error', 'Failed to save Excel'); + } finally { + setLoading(false); + } + }; + + if (loading) { + return ( + + + + ); + } + + return ( + + Envelope-C Excel Preview + + + + {/* HEADER */} + + {columns.map(col => ( + + {col} + + ))} + + + {/* DATA */} + + {data.map((row, rowIndex) => ( + + {columns.map(key => ( + updateCell(rowIndex, key, text)} + /> + ))} + + ))} + + + + + + Save Updated Excel + + + ); +}; + +export default EnvelopeCExcelPreview; + +const styles = StyleSheet.create({ + container: { + flex: 1, + padding: 16, + backgroundColor: '#fff', + }, + loader: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + }, + title: { + fontSize: 18, + fontWeight: '700', + marginBottom: 10, + }, + row: { + flexDirection: 'row', + }, + headerCell: { + minWidth: 140, + padding: 10, + backgroundColor: '#f1f5f9', + borderWidth: 1, + fontWeight: '700', + }, + cell: { + minWidth: 140, + padding: 10, + borderWidth: 1, + borderColor: '#cbd5e1', + }, + button: { + marginTop: 15, + backgroundColor: '#2563eb', + padding: 14, + borderRadius: 8, + }, + buttonText: { + color: '#fff', + textAlign: 'center', + fontWeight: '600', + }, +}); diff --git a/src/Screens/Tender/LiveTender.tsx b/src/Screens/Tender/LiveTender.tsx index 3e48882..e851113 100644 --- a/src/Screens/Tender/LiveTender.tsx +++ b/src/Screens/Tender/LiveTender.tsx @@ -57,8 +57,8 @@ const LiveTender = () => { tenderOfWork={item.departmentName} tenderFees={item.documentFees} tenderNumber={item.tenderNumber} - // onPurchasePress={() => { Dispatch(togglePurchaseTender(item)) }} - // onDetailsPress={() => navigation.navigate('LiveTenderDetail', {item})} + onPurchasePress={() => { Dispatch(togglePurchaseTender(item)) }} + onDetailsPress={() => navigation.navigate('LiveTenderDetail', { item })} /> }, [SelectedPurchaseList] @@ -104,7 +104,7 @@ const LiveTender = () => { fontWeight: '500', }} > - Refreshing auctions + Refreshing Tender )} @@ -122,7 +122,7 @@ const LiveTender = () => { } diff --git a/src/Screens/Tender/ProceedToBidDetail.tsx b/src/Screens/Tender/ProceedToBidDetail.tsx index f981123..cc1349d 100644 --- a/src/Screens/Tender/ProceedToBidDetail.tsx +++ b/src/Screens/Tender/ProceedToBidDetail.tsx @@ -1,97 +1,94 @@ -import { StyleSheet, Text, View, ScrollView, StatusBar, TouchableOpacity } from 'react-native' -import React from 'react' -import { InsideHeader } from '../../Component/Index' -import colors from '../../Constant/Color' -import { useNavigation, useRoute } from '@react-navigation/native' -import { useProceedToBid } from '../../Services/BBPS/Hooks' +import { StyleSheet, Text, View, ScrollView, TouchableOpacity } from 'react-native'; +import React from 'react'; +import { InsideHeader } from '../../Component/Index'; +import colors from '../../Constant/Color'; +import { useNavigation, useRoute } from '@react-navigation/native'; +import { useProceedToBid } from '../../Services/BBPS/Hooks'; +import { format } from '../../Helper/DateFormat'; +import FontsFamily from '../../Constant/FontsFamily'; const ProceedToBidDetail = () => { - // Sample data based on your JSON - const route = useRoute() + const route: any = useRoute(); const tenderData = route.params?.tender; - const {data, refetch} = useProceedToBid(tenderData?.tenderId); - - const navigation = useNavigation() - // Format date from array + const navigation = useNavigation(); + const { data, refetch } = useProceedToBid(tenderData?.tenderId); const handleStartBidding = () => { refetch(); if (data) { - navigation.navigate('TenderBidding', { tenderData: tenderData , bidData: data.data }); + navigation.navigate('TenderBidding', { tenderData: tenderData, bidData: data.data }); } - } - const formatDate = (dateArray: any[]) => { - if (!dateArray || dateArray.length < 3) return "N/A"; - const [year, month, day, hour = 0, minute = 0] = dateArray; - return `${day.toString().padStart(2, '0')}/${month.toString().padStart(2, '0')}/${year} ${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`; }; // Status indicator component - const StatusIndicator = ({ status, label }) => ( + const StatusIndicator = ({ status, label }: { status: any, label: string }) => ( - + {label}: {status ? "Submitted" : "Not Submitted"} ); // Envelope log card component - const EnvelopeLogCard = ({ log, title }) => ( - - - {title} - - {log?.envelope} + const EnvelopeLogCard = ({ log, title }: { log: any, title: string }) => { + + return ( + + + {title} + + {log?.envelope} + - - - Activity: - {log?.activity} - - - - Date & Time: - {log?.dateTime} - - - - System Info: - {log?.osName} / {log?.browserName} - - - - IP Address: - {log?.ipAddress} - - - - Status Message: - {log?.logMessage} - - - {log?.headingMsg && ( - Heading: - {log?.headingMsg} + Activity: + {log?.activity} - )} - - ); + + + Date & Time: + {format.date6(log?.dateTime)} + + + + System Info: + {log?.osName} / {log?.browserName} + + + + IP Address: + {log?.ipAddress} + + + + Status Message: + {log?.logMessage} + + + {log?.headingMsg && ( + + Heading: + {log?.headingMsg} + + )} + + ) + } // Information row component - const InfoRow = ({ label, value, isHighlighted = false }) => ( + const InfoRow = ({ label, value, isHighlighted = false }: { label: string, value: string, isHighlighted?: boolean }) => ( - {label}: - {value} + {label}: + {value} ); // Feature chip component - const FeatureChip = ({ label, enabled }) => ( + const FeatureChip = ({ label, enabled }: { label: string, enabled: boolean }) => ( - + {label} {enabled ? '✓' : '✗'} @@ -99,42 +96,41 @@ const ProceedToBidDetail = () => { return ( - - - {/* Tender Header Section */} + + {/* Tender Header */} - {tenderData?.tenderNumber} - ID: {tenderData?.tenderId} + {tenderData.tenderNumber} + ID: {tenderData.tenderId} - - - {tenderData?.biddingStatus ? "Active" : "Inactive"} + + + {tenderData.biddingStatus ? "Active" : "Inactive"} - {tenderData?.nameofWork} + {tenderData.nameofWork} - NIT No. - {tenderData?.nitNo} + NIT No. + {tenderData.nitNo} - EMD Amount - ₹{tenderData?.emdInFig} + EMD Amount + ₹{tenderData.emdInFig} - {/* Envelope Submission Status */} + {/* Envelope Status */} - Envelope Submission Status + {`Envelope Submission Status`} @@ -142,19 +138,19 @@ const ProceedToBidDetail = () => { - {/* Envelope Logs */} - {tenderData?.envelopeA_Logs && ( + {/* Logs */} + {tenderData.envelopeA_Logs && ( - Submission Logs - - - + Submission Logs + + + )} {/* Tender Details */} - Tender Details + Tender Details @@ -164,24 +160,24 @@ const ProceedToBidDetail = () => { - {/* Time Period */} + {/* Submission Time */} - Submission Time Period + Submission Time Period - Starts On: - {formatDate(tenderData?.submittedStartDate)} + Starts On: + {format.date6(tenderData.submittedStartDate)} - Ends On: - {formatDate(tenderData?.submittedEndDate)} + Ends On: + {format.date6(tenderData.submittedEndDate)} - {/* Feature Flags */} + {/* Feature Chips */} - Available Features + Available Features @@ -192,362 +188,93 @@ const ProceedToBidDetail = () => { - {/* Final Status */} + {/* Overall Status */} - Overall Status + Overall Status - All Envelopes Submitted: - All Envelopes Submitted: + - {tenderData?.envelopeASubmittStatus && tenderData?.envelopeBSubmittStatus && tenderData?.envelopeCSubmittStatus - ? "COMPLETED" : "PENDING"} + {tenderData.envelopeASubmittStatus && tenderData.envelopeBSubmittStatus && tenderData.envelopeCSubmittStatus ? "COMPLETED" : "PENDING"} - Bidding Status: - - {tenderData?.biddingStatus ? "ACTIVE" : "CLOSED"} + Bidding Status: + + {tenderData.biddingStatus ? "ACTIVE" : "CLOSED"} - - - + {/* Footer */} { tenderData?.proceedtoBid && !tenderData?.viewBid && tenderData?.biddingStatus && tenderData?.bidWithdrawStatus === false ? ( - - Start Bidding + Start Bidding - - ) : One time bidding is completed - } + ) : One time bidding is completed + } + + ); +}; - ) -} - -export default ProceedToBidDetail +export default ProceedToBidDetail; +// Styles remain mostly unchanged but improved shadows, spacing, and rounded corners const styles = StyleSheet.create({ - container: { - flex: 1, - padding: 16, - marginBottom: 60, - }, - headerCard: { - backgroundColor: colors.primaryLight, - borderRadius: 12, - padding: 20, - marginBottom: 20, - borderLeftWidth: 4, - borderLeftColor: colors.primary, - }, - tenderHeader: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - marginBottom: 12, - }, - tenderNumber: { - fontSize: 22, - fontWeight: 'bold', - color: colors.primary, - }, - tenderId: { - fontSize: 14, - color: colors.darkGray, - marginTop: 4, - }, - statusBadge: { - paddingHorizontal: 12, - paddingVertical: 6, - borderRadius: 20, - }, - statusBadgeText: { - color: colors.white, - fontWeight: '600', - fontSize: 12, - }, - workDescription: { - fontSize: 16, - color: colors.darkText, - lineHeight: 22, - marginBottom: 16, - }, - headerInfoRow: { - flexDirection: 'row', - alignItems: 'center', - backgroundColor: colors.white, - borderRadius: 8, - padding: 12, - }, - headerInfoItem: { - flex: 1, - alignItems: 'center', - }, - headerInfoLabel: { - fontSize: 12, - color: colors.darkGray, - marginBottom: 4, - }, - headerInfoValue: { - fontSize: 16, - fontWeight: '600', - color: colors.primary, - }, - separator: { - width: 1, - height: 30, - backgroundColor: colors.lightGray, - }, - section: { - marginBottom: 20, - }, - sectionTitle: { - fontSize: 18, - fontWeight: '600', - color: colors.primary, - marginBottom: 12, - paddingLeft: 4, - }, - statusGrid: { - backgroundColor: colors.white, - borderRadius: 12, - padding: 16, - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.1, - shadowRadius: 4, - elevation: 3, - }, - statusContainer: { - flexDirection: 'row', - alignItems: 'center', - marginBottom: 12, - }, - statusDot: { - width: 12, - height: 12, - borderRadius: 6, - marginRight: 10, - }, - statusText: { - fontSize: 15, - fontWeight: '500', - }, - envelopeCard: { - backgroundColor: colors.white, - borderRadius: 12, - padding: 16, - marginBottom: 12, - borderWidth: 1, - borderColor: colors.lightGray, - }, - cardHeader: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - marginBottom: 12, - }, - cardTitle: { - fontSize: 16, - fontWeight: '600', - color: colors.primary, - }, - envelopeBadge: { - paddingHorizontal: 10, - paddingVertical: 4, - borderRadius: 12, - }, - envelopeBadgeText: { - color: colors.white, - fontWeight: 'bold', - fontSize: 12, - }, - logDetailRow: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - marginBottom: 8, - }, - label: { - fontSize: 14, - color: colors.darkGray, - flex: 1, - }, - value: { - fontSize: 14, - color: colors.darkText, - fontWeight: '500', - flex: 2, - textAlign: 'right', - }, - successText: { - color: colors.success, - fontWeight: '600', - }, - detailsCard: { - backgroundColor: colors.white, - borderRadius: 12, - padding: 16, - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.1, - shadowRadius: 4, - elevation: 3, - }, - infoRow: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - paddingVertical: 10, - borderBottomWidth: 1, - borderBottomColor: colors.lightestGray, - }, - infoLabel: { - fontSize: 14, - color: colors.darkGray, - }, - infoValue: { - fontSize: 15, - fontWeight: '500', - color: colors.darkText, - }, - highlightedValue: { - color: colors.success, - fontWeight: '600', - }, - timeCard: { - backgroundColor: colors.white, - borderRadius: 12, - padding: 16, - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.1, - shadowRadius: 4, - elevation: 3, - }, - timeRow: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - paddingVertical: 12, - borderBottomWidth: 1, - borderBottomColor: colors.lightestGray, - }, - timeLabel: { - fontSize: 15, - color: colors.darkGray, - fontWeight: '500', - }, - timeValue: { - fontSize: 15, - color: colors.primary, - fontWeight: '600', - }, - chipsContainer: { - flexDirection: 'row', - flexWrap: 'wrap', - gap: 10, - }, - chip: { - paddingHorizontal: 16, - paddingVertical: 8, - borderRadius: 20, - marginBottom: 8, - }, - chipText: { - fontSize: 14, - fontWeight: '500', - }, - finalStatusCard: { - backgroundColor: colors.primaryLight, - borderRadius: 12, - padding: 20, - marginTop: 10, - borderWidth: 2, - borderColor: colors.primary, - }, - finalStatusTitle: { - fontSize: 18, - fontWeight: 'bold', - color: colors.primary, - marginBottom: 16, - textAlign: 'center', - }, - finalStatusRow: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - marginBottom: 12, - paddingVertical: 8, - borderBottomWidth: 1, - borderBottomColor: 'rgba(0, 0, 0, 0.1)', - }, - finalStatusLabel: { - fontSize: 16, - color: colors.darkText, - fontWeight: '500', - }, - finalStatusValue: { - fontSize: 16, - fontWeight: 'bold', - }, - footerSpace: { - height: 30, - }, - success: { - color: colors.success, - }, - error: { - color: colors.error, - }, - primary: { - color: colors.primary, - }, - warning: { - color: colors.warning, - }, - successLight: { - backgroundColor: colors.successLight, - }, - lightGray: { - backgroundColor: colors.lightGray, - }, - footer: { - position: 'absolute', - bottom: 0, - left: 0, - right: 0, - backgroundColor: colors.white, - padding: 16, - borderTopWidth: 1, - borderTopColor: colors.lightGray, - elevation: 10, - }, - proceedButton: { - backgroundColor: colors.primary, - paddingVertical: 14, - borderRadius: 30, - alignItems: 'center', - }, - proceedButtonText: { - color: colors.white, - fontSize: 16, - fontWeight: '600', - }, - footerText: { - textAlign: 'center', - color: colors.darkGray, - fontSize: 14, - }, -}); \ No newline at end of file + container: { flex: 1, padding: 16 }, + headerCard: { backgroundColor: colors.white, borderRadius: 14, padding: 20, marginBottom: 20, borderLeftWidth: 4, borderLeftColor: colors.primary, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 5, elevation: 5 }, + tenderHeader: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', marginBottom: 12 }, + tenderNumber: { fontSize: 22, fontWeight: 'bold', color: colors.primary }, + tenderId: { fontSize: 14, color: colors.darkGray, marginTop: 4 }, + statusBadge: { paddingHorizontal: 12, paddingVertical: 6, borderRadius: 20 }, + statusBadgeText: { color: colors.white, fontWeight: '600', fontSize: 12 }, + workDescription: { fontSize: 13, color: colors.black, marginBottom: 16, fontFamily: FontsFamily.poppinsMedium }, + headerInfoRow: { flexDirection: 'row', alignItems: 'center', backgroundColor: colors.lightestGray, borderRadius: 8, padding: 12 }, + headerInfoItem: { flex: 1, alignItems: 'center' }, + headerInfoLabel: { fontSize: 12, color: colors.darkGray, marginBottom: 4 }, + headerInfoValue: { fontSize: 16, fontWeight: '600', color: colors.primary }, + separator: { width: 1, height: 30, backgroundColor: colors.lightGray }, + section: { marginBottom: 20 }, + sectionTitle: { fontSize: 18, fontWeight: '600', marginBottom: 12, paddingLeft: 4 }, + statusGrid: { backgroundColor: colors.white, borderRadius: 14, padding: 16, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 5, elevation: 3 }, + statusContainer: { flexDirection: 'row', alignItems: 'center', marginBottom: 12 }, + statusDot: { width: 12, height: 12, borderRadius: 6, marginRight: 10 }, + statusText: { fontSize: 15, fontWeight: '500' }, + envelopeCard: { backgroundColor: colors.white, borderRadius: 14, padding: 16, marginBottom: 12, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.05, shadowRadius: 4, elevation: 2 }, + cardHeader: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12 }, + cardTitle: { fontSize: 16, fontWeight: '600', color: colors.black }, + envelopeBadge: { paddingHorizontal: 10, paddingVertical: 4, borderRadius: 12 }, + envelopeBadgeText: { color: colors.white, fontWeight: 'bold', fontSize: 12 }, + logDetailRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }, + label: { fontSize: 14, color: colors.black, flex: 1, fontFamily: FontsFamily.poppinsSemiBold }, + value: { fontSize: 14, color: colors.darkText, flex: 2, textAlign: 'right' }, + successText: { color: colors.success, fontWeight: '600' }, + detailsCard: { backgroundColor: colors.white, borderRadius: 14, padding: 16, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.05, shadowRadius: 4, elevation: 3 }, + infoRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 10, borderBottomWidth: 1, borderBottomColor: colors.lightestGray }, + infoLabel: { fontSize: 14, color: colors.black, fontFamily: FontsFamily.poppinsSemiBold }, + infoValue: { fontSize: 15, fontWeight: '500', color: colors.darkText }, + highlightedValue: { color: colors.success, fontWeight: '600' }, + timeCard: { backgroundColor: colors.white, borderRadius: 14, padding: 16, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.05, shadowRadius: 4, elevation: 3 }, + timeRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 12, borderBottomWidth: 1, borderBottomColor: colors.lightestGray }, + timeLabel: { fontSize: 15, color: colors.black, }, + timeValue: { fontSize: 15, color: colors.grayText, }, + chipsContainer: { flexDirection: 'row', flexWrap: 'wrap', gap: 10 }, + chip: { paddingHorizontal: 16, paddingVertical: 8, borderRadius: 20, marginBottom: 8 }, + chipText: { fontSize: 14, fontWeight: '500' }, + finalStatusCard: { backgroundColor: colors.white, borderRadius: 14, padding: 20, marginTop: 10, borderWidth: 2, borderColor: colors.primary, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 5, elevation: 5 }, + finalStatusTitle: { fontSize: 18, fontWeight: 'bold', marginBottom: 16, textAlign: 'center' }, + finalStatusRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12, paddingVertical: 8, borderBottomWidth: 1, borderBottomColor: 'rgba(0,0,0,0.1)' }, + finalStatusLabel: { fontSize: 14, color: colors.black, fontFamily: FontsFamily.poppinsSemiBold }, + finalStatusValue: { fontSize: 13, }, + footer: { position: 'absolute', bottom: 0, left: 0, right: 0, backgroundColor: colors.white, padding: 16, borderTopWidth: 1, borderTopColor: colors.lightGray, elevation: 10 }, + proceedButton: { backgroundColor: colors.primary, paddingVertical: 14, borderRadius: 30, alignItems: 'center' }, + proceedButtonText: { color: colors.white, fontSize: 16, fontWeight: '600' }, + footerText: { textAlign: 'center', color: colors.darkGray, fontSize: 14 }, +}); diff --git a/src/Screens/Tender/PurchaseTenderTile.tsx b/src/Screens/Tender/PurchaseTenderTile.tsx index 30b79db..6a57b41 100644 --- a/src/Screens/Tender/PurchaseTenderTile.tsx +++ b/src/Screens/Tender/PurchaseTenderTile.tsx @@ -1,29 +1,14 @@ import React, { use, useEffect } from 'react'; -import { - View, - Text, - StyleSheet, - TouchableOpacity, - Platform, - Alert, -} from 'react-native'; -import Animated, { - FadeInUp, - useAnimatedStyle, - useSharedValue, - withTiming, -} from 'react-native-reanimated'; +import { View, Text, StyleSheet, TouchableOpacity, Platform } from 'react-native'; +import Animated, { FadeInUp, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; import moment from 'moment'; import CountdownTimer from '../../Component/Counter/CountdownTimer'; import colors from '../../Constant/Color'; -import { useFetchTenderById, useProceedToBid } from '../../Services/BBPS/Hooks'; +import { useFetchTenderById } from '../../Services/BBPS/Hooks'; import { useNavigation } from '@react-navigation/native'; import TenderFullDetail from './Modal/TenderFullDetail'; -const PurchaseTenderTile = ({ - item, - onPressDetails, -}: any) => { +const PurchaseTenderTile = ({ item, onPressDetails }: any) => { const scale = useSharedValue(1); const elevation = useSharedValue(8); const navigation = useNavigation(); @@ -36,15 +21,6 @@ const PurchaseTenderTile = ({ const { data: tenderResponse, }: any = useFetchTenderById(item?.tenderId); const tender = tenderResponse?.data; - // console.log("item my : ", item) - - { - if (item?.nitNumber == 'TN/111') { - console.log("tender item : ", item?.nitNumber) - - } - } - const handlePressIn = () => { scale.value = withTiming(0.97, { duration: 120 }); elevation.value = withTiming(3, { duration: 120 }); @@ -61,11 +37,6 @@ const PurchaseTenderTile = ({ const lightStatusBg = isLive ? '#EFF6FF' : '#F8FAFC'; const [showDetail, setShowDetail] = React.useState(false); - useEffect(() => { - if(item?.tenderNumber == 'TN/210'){ - console.log("tender item : ", item) - } - }, [item]); return ( { queryFn: () => fetchLiveTender() }); }; + export const useFetchPurchaseAuction = () => { return useQuery({ queryKey: ['fetchPurchaseAuction',], @@ -69,25 +70,28 @@ export const useFetchPurchaseAuction = () => { }); }; - export const useFetchLiveAuction = () => { return useInfiniteQuery({ - queryKey: ['fetchLiveAuction',], - queryFn: ({ pageParam = 1 }) => + queryKey: ['fetchLiveAuction'], + queryFn: ({ pageParam = 0 }) => fetchLiveAuction({ page: pageParam, size: 10, }), - initialPageParam: 1, - getNextPageParam: (lastPage) => { - const { page, size, totalCount } = lastPage; + initialPageParam: 0, + + getNextPageParam: (lastPage, allPages) => { + const { size, totalCount } = lastPage; const totalPages = Math.ceil(totalCount / size); - const nextPage = page + 1; + const nextPage = allPages.length; return nextPage < totalPages ? nextPage : undefined; }, - select: (data) => { - const mergedResults = data.pages.flatMap((page: any) => page.data ?? []); + select: (data) => { + const mergedResults = data.pages.flatMap( + (page: any) => page?.data ?? [] + ); + return { ...data, result: mergedResults, @@ -97,7 +101,6 @@ export const useFetchLiveAuction = () => { }; - // Auction Purchase offline export const useOfflineAuctionPurchase = () => { diff --git a/src/Services/BBPS/apis.ts b/src/Services/BBPS/apis.ts index 05eb29d..8da5721 100644 --- a/src/Services/BBPS/apis.ts +++ b/src/Services/BBPS/apis.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { ALL_DESIGNATION, DASHBOARD_COUNT, EMD_CHECK, FORARD_AUCTION_ITEM, GET_MASTER_DATA, GET_MY_AUCTION, GET_MY_TENDER, GET_REGISTRATION_STATE, GET_TENDER_DETAILS, GETCONTRACTORBYSTATE, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PARTNER_API_ENDPOINT, PROCEED_PURCHASE_AUCTION, PROCEED_TO_BID, PURCHASE_OFFLINE_AUCTION, PURCHASE_TENDER_OFFLINE, SUBMIT_ENVELOPE_A, SUBMIT_ENVELOPE_B, SUBMIT_ENVELOPE_FILE_A, SUBMIT_ENVELOPE_FILE_B, REJ_STAGE_TWO, REVERSE_AUCTION_ITEM, SAVE_CONTRACTOR_STAGE1, SEND_ADHAROTP, STAGETHREE, TENDER_LOGIN, VERIFY_ADHAR, VERIFY_GST,VERIFY_ORGPAN } from "./ApiUrls"; +import { AUCTION_DOCUMENT_DOWNLOAD, DASHBOARD_COUNT, EMD_CHECK, FORARD_AUCTION_ITEM, GET_AUCTION_DETAILS, GET_MY_AUCTION, GET_MY_TENDER, GET_TENDER_DETAILS, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PROCEED_PURCHASE_AUCTION, PROCEED_TO_BID, PURCHASE_TENDER_OFFLINE, TENDER_LOGIN, PURCHASE_AUCTION_LIST, PURCHASE_OFFLINE_AUCTION, REVERSE_AUCTION_ITEM, VIEW_AUCTION_DOCUMENTS, VIEW_AUCTION_ITEM_DETAIL } from "./ApiUrls"; import { apiCall } from "../../Axios/Axios"; // User @@ -24,31 +24,14 @@ type City = { id: number; name: string }; export const userLogin = async (payload: { emailAdd: string, password: string }): Promise => { try { - // const response = await axios.post(LOG_IN_URL, { ...payload, divice: "mobileApp" }); - const response = await axios.post(TENDER_LOGIN, { ...payload, device: "mobileApp" }); - return response.data; - } catch (error: any) { - throw error.response?.data || error.message; - } -}; -export const userAuctionLogin = async (payload: { emailAdd: string, password: string }): Promise => { - try { - const response = await axios.post(LOG_IN_URL, { ...payload, device: "mobileApp" }); + const response = await axios.post(LOG_IN_URL, { ...payload, divice: "mobileApp" }); + // const response = await axios.post(TENDER_LOGIN, { ...payload, device: "mobileApp" }); return response.data; } catch (error: any) { throw error.response?.data || error.message; } }; -export const registerContractor = async (payload: any): Promise => { - console.log("registerContractor payload : ", payload) - try { - const response = await axios.post(SAVE_CONTRACTOR_STAGE1, { ...payload, device: "mobileApp" }); - return response.data; - } catch (error: any) { - throw error.response?.data || error.message; - } -}; export const fetchDashboard = async (): Promise => { const data = await apiCall('get', `${DASHBOARD_COUNT}`); return data @@ -59,7 +42,7 @@ export const fetchPurchaseAuction = async (): Promise => { return data } export const fetchLiveAuction = async (payload: any): Promise => { - const data = await apiCall('get', `${LIVE_AUCTION}`, {}, { payload }); + const data = await apiCall('get', `${LIVE_AUCTION}`, {}, payload); return data } @@ -146,179 +129,26 @@ export const proceedToBid = async (tenderId: string): Promise => { return data; } -export const getDesignation = async (): Promise => { - const data = await axios.get(ALL_DESIGNATION).then((response) => response.data); - return data; -} - -export const getRagistrationState = async (): Promise => { - const data = await apiCall( - 'get', - `${GET_REGISTRATION_STATE}` - ); - return data; -} - -//////////////////////////////////////////////////////////////////// - -export const fetchMasterData = async (): Promise => { - const data = await apiCall( - 'get', - `${GET_MASTER_DATA}` - ); - return data; -}; - - -export const fetchCityDropdown = async (stateId: number): Promise => { - const res = await apiCall<{ statusCode: number; data: City[] }>( - 'get', - `${GETCONTRACTORBYSTATE}?stateId=${stateId}`, - ); -console.log("--",res) - if (res.statusCode !== 200 || !res.data) { - throw new Error('Failed load cities'); - } - - return res.data.map(item => ({ - label: item.name, - value: item.id, - })); -}; - - - - - - -export const verifyPanHandler = ( - payload: { - dob: string; - name: string; - panNumber: string; - } -): Promise => { - return apiCall( - 'post', - VERIFY_ORGPAN, - payload, - ); -}; - - -export const sendAadhaarOtp = ( - payload: any -): Promise => { - return apiCall('post', SEND_ADHAROTP, payload); -}; - - -export type VerifyAadhaarOtpPayload = { - otp: string; - refNumber: string; -}; - -export const verifyAadhaarOtp = ( - payload: { - otp: string; - refNumber: string; -} -): Promise => { - return apiCall( - 'post', - VERIFY_ADHAR, - payload, - ); -}; - -export type VerifyGstPayload = { - gstNumber: string; -}; - -export const verifyGstNumber = ( - payload: { - gstNumber: string; -} -): Promise => { - return apiCall( - 'post', - VERIFY_GST, - payload, - ); -}; -export const contractorStageTwoSubmit = ( -fileData: any -): Promise => { - return apiCall( - 'post', - REJ_STAGE_TWO, - fileData, - undefined, - 'multipart/form-data' - ); -}; - -export const contractorStageThreeSubmit = ( - payload: any -): Promise => { - return apiCall( - 'post', - STAGETHREE, - payload, - ); -}; - -export const partnerShipSubmit = ( - payload: any -): Promise => { - return apiCall( - 'post', - PARTNER_API_ENDPOINT, - payload, - ); -}; - -export const submitEnvelopeA = async (payload: any) => { - console.log('SUBMIT ENVELOPE A API CALLED', payload) - const { data } = await apiCall('post', SUBMIT_ENVELOPE_A, payload) - console.log("data : ", data) - return data -} -export const submitEnvelopeB = async (payload: any) => { - console.log('SUBMIT ENVELOPE B API CALLED', payload) - const { data } = await apiCall('post', SUBMIT_ENVELOPE_B, payload) - console.log("data : ", data) +export const fetchPurchaseAuctionList = async (payload: any): Promise => { + const data = await apiCall('post', `${PURCHASE_AUCTION_LIST}`, payload); return data } - -export const uploadEnvelopeFile = async ({ - activeEnvelope, - file, - payload, -}: UploadArgs) => { - const formData = new FormData() - - formData.append('files', { - uri: file.uri, - name: file.name, - type: file.type, - } as any) - - formData.append('requestDto', JSON.stringify(payload)) - - const url = - activeEnvelope === 'B' ? SUBMIT_ENVELOPE_FILE_B : SUBMIT_ENVELOPE_FILE_A - - const data = await apiCall('post', url, formData, { - headers: { - 'Content-Type': 'multipart/form-data', - }, - }) - - return data +export const getAuction = async (payload: any) => { + const selectedRes = await apiCall('get', GET_AUCTION_DETAILS, {}, { id: payload.auctionId }); + return selectedRes.data; } - - +export const viewAuctionItemDocuments = async (payload: { auctionItemId: number }) => { + const selectedRes = await apiCall('get', VIEW_AUCTION_ITEM_DETAIL, {}, payload); + return selectedRes.data; +} +export const viewAuctionDocuments = async (payload: { auctionId: number }) => { + const selectedRes = await apiCall('get', VIEW_AUCTION_DOCUMENTS, {}, payload); + return selectedRes.data; +} +export const viewAuctionDocumentDownload = async (payload: { documentId: number, isAmendment: boolean }) => { + const selectedRes = await apiCall('get', AUCTION_DOCUMENT_DOWNLOAD, {}, payload); + return selectedRes.data; +} \ No newline at end of file diff --git a/src/assets/images/bharatbilllogo2.png b/src/assets/images/bharatbilllogo2.png deleted file mode 100644 index 1737a8b..0000000 Binary files a/src/assets/images/bharatbilllogo2.png and /dev/null differ diff --git a/waste.ts b/waste.ts index 0c84711..5a2c2cd 100644 --- a/waste.ts +++ b/waste.ts @@ -1,5 +1,5 @@ // import React, { useCallback, useEffect, useState } from 'react'; -// import { View, FlatList, StyleSheet, Platform, Alert, BackHandler, Text, ToastAndroid } from 'react-native'; +// import { View, FlatList, StyleSheet, Platform, Alert, BackHandler, Text } from 'react-native'; // import LottieView from 'lottie-react-native'; // import { InsideHeader } from '../../Component/Index'; // import colors from '../../Constant/Color'; @@ -36,12 +36,13 @@ // if (SelectedAuction.auctionPattern === 'Forward') { // const res = await apiCall('get', FORWARD_AUCTION_ITEM, {}, payload); // if (res?.statusCode === 200) auctionItem = res.data || []; -// } else if(SelectedAuction.auctionPattern === 'Reverse') { +// } else { // const res = await apiCall('get', REVERSE_AUCTION_ITEM, {}, payload); // if (res?.statusCode === 200) auctionItem = res.data || []; // } // const selectedRes = await apiCall('get', SELECTED_AUCTION_ITEM, {}, payload); +// console.log(selectedRes, 'jhhhhhhhhhh'); // const uniqueArray: number[] = Array.from( // new Set(selectedRes?.data || []) @@ -98,7 +99,7 @@ // }; // subscribe(`/topic/room/${SelectedAuction.auctionNumber}`, async (message) => { - +// // console.log('RAW MESSAGE:', message[message.length - 1]); // const result = message[message.length - 1] // const updatedBidItem = (prev: any[]) => @@ -160,6 +161,7 @@ // { // text: 'Submit', // onPress: () => { + // placeBidSubmit(payload); // }, // }, @@ -180,7 +182,6 @@ // : item // ); -// // ToastAndroid.show(result.message, ToastAndroid.SHORT) // // setItems(updatedBidItem);