Merge branch 'dev' of http://git.wdipl.com/Siddhesh.More/optifii-corporate into corpstatic
This commit is contained in:
427
package-lock.json
generated
427
package-lock.json
generated
@@ -1506,13 +1506,14 @@
|
||||
"integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww=="
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz",
|
||||
"integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
|
||||
"integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"aix"
|
||||
@@ -1522,13 +1523,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz",
|
||||
"integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
|
||||
"integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
@@ -1538,13 +1540,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
@@ -1554,13 +1557,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
@@ -1570,13 +1574,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
@@ -1586,13 +1591,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
@@ -1602,13 +1608,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
@@ -1618,13 +1625,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
@@ -1634,13 +1642,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz",
|
||||
"integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
|
||||
"integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1650,13 +1659,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1666,13 +1676,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ia32": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz",
|
||||
"integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
|
||||
"integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1682,13 +1693,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-loong64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz",
|
||||
"integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
|
||||
"integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1698,13 +1710,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-mips64el": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz",
|
||||
"integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
|
||||
"integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1714,13 +1727,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ppc64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz",
|
||||
"integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
|
||||
"integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1730,13 +1744,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-riscv64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz",
|
||||
"integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
|
||||
"integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1746,13 +1761,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-s390x": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz",
|
||||
"integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
|
||||
"integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1762,13 +1778,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
@@ -1778,13 +1795,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/netbsd-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"netbsd"
|
||||
@@ -1794,13 +1812,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openbsd-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openbsd"
|
||||
@@ -1810,13 +1829,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/sunos-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"sunos"
|
||||
@@ -1826,13 +1846,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
@@ -1842,13 +1863,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-ia32": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz",
|
||||
"integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
|
||||
"integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
@@ -1858,13 +1880,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
@@ -2051,208 +2074,224 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz",
|
||||
"integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.5.tgz",
|
||||
"integrity": "sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm64": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz",
|
||||
"integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.5.tgz",
|
||||
"integrity": "sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz",
|
||||
"integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.5.tgz",
|
||||
"integrity": "sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-x64": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz",
|
||||
"integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.5.tgz",
|
||||
"integrity": "sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz",
|
||||
"integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.5.tgz",
|
||||
"integrity": "sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz",
|
||||
"integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.5.tgz",
|
||||
"integrity": "sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz",
|
||||
"integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.5.tgz",
|
||||
"integrity": "sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz",
|
||||
"integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.5.tgz",
|
||||
"integrity": "sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz",
|
||||
"integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.5.tgz",
|
||||
"integrity": "sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz",
|
||||
"integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.5.tgz",
|
||||
"integrity": "sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz",
|
||||
"integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.5.tgz",
|
||||
"integrity": "sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz",
|
||||
"integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.5.tgz",
|
||||
"integrity": "sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz",
|
||||
"integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.5.tgz",
|
||||
"integrity": "sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz",
|
||||
"integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.5.tgz",
|
||||
"integrity": "sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz",
|
||||
"integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.5.tgz",
|
||||
"integrity": "sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz",
|
||||
"integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.5.tgz",
|
||||
"integrity": "sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
@@ -2472,10 +2511,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
||||
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
||||
"dev": true
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/hoist-non-react-statics": {
|
||||
"version": "3.3.5",
|
||||
@@ -2852,9 +2892,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz",
|
||||
"integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==",
|
||||
"version": "1.7.7",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
|
||||
"integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -3415,11 +3456,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz",
|
||||
"integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==",
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
|
||||
"integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
@@ -3427,29 +3469,29 @@
|
||||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.20.2",
|
||||
"@esbuild/android-arm": "0.20.2",
|
||||
"@esbuild/android-arm64": "0.20.2",
|
||||
"@esbuild/android-x64": "0.20.2",
|
||||
"@esbuild/darwin-arm64": "0.20.2",
|
||||
"@esbuild/darwin-x64": "0.20.2",
|
||||
"@esbuild/freebsd-arm64": "0.20.2",
|
||||
"@esbuild/freebsd-x64": "0.20.2",
|
||||
"@esbuild/linux-arm": "0.20.2",
|
||||
"@esbuild/linux-arm64": "0.20.2",
|
||||
"@esbuild/linux-ia32": "0.20.2",
|
||||
"@esbuild/linux-loong64": "0.20.2",
|
||||
"@esbuild/linux-mips64el": "0.20.2",
|
||||
"@esbuild/linux-ppc64": "0.20.2",
|
||||
"@esbuild/linux-riscv64": "0.20.2",
|
||||
"@esbuild/linux-s390x": "0.20.2",
|
||||
"@esbuild/linux-x64": "0.20.2",
|
||||
"@esbuild/netbsd-x64": "0.20.2",
|
||||
"@esbuild/openbsd-x64": "0.20.2",
|
||||
"@esbuild/sunos-x64": "0.20.2",
|
||||
"@esbuild/win32-arm64": "0.20.2",
|
||||
"@esbuild/win32-ia32": "0.20.2",
|
||||
"@esbuild/win32-x64": "0.20.2"
|
||||
"@esbuild/aix-ppc64": "0.21.5",
|
||||
"@esbuild/android-arm": "0.21.5",
|
||||
"@esbuild/android-arm64": "0.21.5",
|
||||
"@esbuild/android-x64": "0.21.5",
|
||||
"@esbuild/darwin-arm64": "0.21.5",
|
||||
"@esbuild/darwin-x64": "0.21.5",
|
||||
"@esbuild/freebsd-arm64": "0.21.5",
|
||||
"@esbuild/freebsd-x64": "0.21.5",
|
||||
"@esbuild/linux-arm": "0.21.5",
|
||||
"@esbuild/linux-arm64": "0.21.5",
|
||||
"@esbuild/linux-ia32": "0.21.5",
|
||||
"@esbuild/linux-loong64": "0.21.5",
|
||||
"@esbuild/linux-mips64el": "0.21.5",
|
||||
"@esbuild/linux-ppc64": "0.21.5",
|
||||
"@esbuild/linux-riscv64": "0.21.5",
|
||||
"@esbuild/linux-s390x": "0.21.5",
|
||||
"@esbuild/linux-x64": "0.21.5",
|
||||
"@esbuild/netbsd-x64": "0.21.5",
|
||||
"@esbuild/openbsd-x64": "0.21.5",
|
||||
"@esbuild/sunos-x64": "0.21.5",
|
||||
"@esbuild/win32-arm64": "0.21.5",
|
||||
"@esbuild/win32-ia32": "0.21.5",
|
||||
"@esbuild/win32-x64": "0.21.5"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
@@ -3886,6 +3928,7 @@
|
||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
@@ -4807,6 +4850,7 @@
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
@@ -5055,9 +5099,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
||||
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
|
||||
"integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/possible-typed-array-names": {
|
||||
"version": "1.0.0",
|
||||
@@ -5069,9 +5114,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.38",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
|
||||
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
|
||||
"version": "8.4.47",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz",
|
||||
"integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -5087,10 +5132,11 @@
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.7",
|
||||
"picocolors": "^1.0.0",
|
||||
"source-map-js": "^1.2.0"
|
||||
"picocolors": "^1.1.0",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
@@ -5635,12 +5681,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz",
|
||||
"integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==",
|
||||
"version": "4.22.5",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.5.tgz",
|
||||
"integrity": "sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.5"
|
||||
"@types/estree": "1.0.6"
|
||||
},
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
@@ -5650,22 +5697,22 @@
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.14.3",
|
||||
"@rollup/rollup-android-arm64": "4.14.3",
|
||||
"@rollup/rollup-darwin-arm64": "4.14.3",
|
||||
"@rollup/rollup-darwin-x64": "4.14.3",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.14.3",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.14.3",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.14.3",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.14.3",
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.14.3",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.14.3",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.14.3",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.14.3",
|
||||
"@rollup/rollup-linux-x64-musl": "4.14.3",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.14.3",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.14.3",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.14.3",
|
||||
"@rollup/rollup-android-arm-eabi": "4.22.5",
|
||||
"@rollup/rollup-android-arm64": "4.22.5",
|
||||
"@rollup/rollup-darwin-arm64": "4.22.5",
|
||||
"@rollup/rollup-darwin-x64": "4.22.5",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.22.5",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.22.5",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.22.5",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.22.5",
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.22.5",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.22.5",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.22.5",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.22.5",
|
||||
"@rollup/rollup-linux-x64-musl": "4.22.5",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.22.5",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.22.5",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.22.5",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
@@ -5824,10 +5871,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -6283,14 +6331,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.2.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.9.tgz",
|
||||
"integrity": "sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==",
|
||||
"version": "5.4.8",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz",
|
||||
"integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.20.1",
|
||||
"postcss": "^8.4.38",
|
||||
"rollup": "^4.13.0"
|
||||
"esbuild": "^0.21.3",
|
||||
"postcss": "^8.4.43",
|
||||
"rollup": "^4.20.0"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
@@ -6309,6 +6358,7 @@
|
||||
"less": "*",
|
||||
"lightningcss": "^1.21.0",
|
||||
"sass": "*",
|
||||
"sass-embedded": "*",
|
||||
"stylus": "*",
|
||||
"sugarss": "*",
|
||||
"terser": "^5.4.0"
|
||||
@@ -6326,6 +6376,9 @@
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"sass-embedded": {
|
||||
"optional": true
|
||||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
|
||||
152
src/Components/FileUploader/FileUploader.jsx
Normal file
152
src/Components/FileUploader/FileUploader.jsx
Normal file
@@ -0,0 +1,152 @@
|
||||
import React, { Children, useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { yupResolver } from '@hookform/resolvers/yup';
|
||||
import { Box, FormControl, FormErrorMessage, FormLabel, HStack, Icon, Image, Text, VStack, keyframes, useDisclosure } from '@chakra-ui/react';
|
||||
import * as Yup from 'yup';
|
||||
import { SlCloudUpload } from 'react-icons/sl';
|
||||
import { DeleteIcon } from '@chakra-ui/icons';
|
||||
import ImageViewer from '../ImageViewer'; // Make sure you have this component or replace it with a suitable one
|
||||
|
||||
// Define max file size in bytes (2MB = 2 * 1024 * 1024 bytes)
|
||||
const MAX_FILE_SIZE = 2 * 1024 * 1024;
|
||||
|
||||
// Define a keyframes animation for fade-in
|
||||
export const fadeIn = keyframes`
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
`;
|
||||
|
||||
const FileUploader = ({
|
||||
label = "Upload File",
|
||||
maxFileSize = MAX_FILE_SIZE,
|
||||
allowedFormats = ['image/jpeg'],
|
||||
onFileUpload, // Callback when a file is successfully uploaded
|
||||
onFileRemove, // Callback when a file is removed
|
||||
defaultPreview = null, // Default preview image if any
|
||||
isRequired = true, // To make the input required or not
|
||||
children,
|
||||
}) => {
|
||||
const [filePreview, setFilePreview] = useState(defaultPreview);
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
|
||||
const validationSchema = Yup.object().shape({
|
||||
file: Yup.mixed()
|
||||
.test('fileSize', `File is too large. Max size is ${maxFileSize / (1024 * 1024)}MB.`, (value) => {
|
||||
return value && value.length > 0 && value[0].size <= maxFileSize;
|
||||
})
|
||||
.test('fileType', `Unsupported file format. Allowed formats: ${allowedFormats.join(', ')}.`, (value) => {
|
||||
return value && value.length > 0 && allowedFormats.includes(value[0].type);
|
||||
}),
|
||||
});
|
||||
|
||||
const { register, formState: { errors }, handleSubmit, setValue } = useForm({
|
||||
resolver: yupResolver(validationSchema),
|
||||
});
|
||||
|
||||
const handleFileChange = (event) => {
|
||||
const file = event.target.files[0];
|
||||
if (file) {
|
||||
// const fileURL = URL.createObjectURL(file);
|
||||
// setFilePreview(fileURL);
|
||||
setValue('file', event.target.files);
|
||||
onFileUpload && onFileUpload(file, setFilePreview); // Call onFileUpload callback
|
||||
}
|
||||
};
|
||||
|
||||
const handleRemove = () => {
|
||||
setFilePreview(null);
|
||||
setValue('file', null);
|
||||
onFileRemove && onFileRemove(); // Call onFileRemove callback
|
||||
};
|
||||
|
||||
const handleClick = () => {
|
||||
const fileInput = document.getElementById(`file-${label}`);
|
||||
if (fileInput) {
|
||||
fileInput.click(); // Trigger the file input click via ID
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box as='form' onSubmit={handleSubmit} width="100%" mx="auto">
|
||||
<FormControl width="100%" isRequired={isRequired} isInvalid={errors.file}>
|
||||
<FormLabel color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
{label}
|
||||
</FormLabel>
|
||||
<Box width="100%" my={2} position="relative">
|
||||
{!filePreview && (
|
||||
<VStack
|
||||
width="100%"
|
||||
border={"1px dashed #D0D5DD"}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"}
|
||||
bg={"#faf8fd"}
|
||||
p={4}
|
||||
h={"28"}
|
||||
justifyContent={"center"}
|
||||
cursor="pointer"
|
||||
onClick={handleClick} // Trigger file input on click
|
||||
>
|
||||
<SlCloudUpload color={"#191D23"} size={30} />
|
||||
<Text
|
||||
color={"#191D23"}
|
||||
fontWeight={"500"}
|
||||
fontSize={"sm"}
|
||||
mt={"2"}
|
||||
mb={0}
|
||||
>
|
||||
Drag and drop files here or{" "}
|
||||
<Text as="span" textDecoration="underline">
|
||||
Choose file
|
||||
</Text>
|
||||
</Text>
|
||||
</VStack>
|
||||
)}
|
||||
|
||||
{filePreview && (
|
||||
<Box position={'relative'} width="100%" mt={4}>
|
||||
<Image cursor={'pointer'} onClick={onOpen} src={`${import.meta.env.VITE_IMAGE_URL}${filePreview}`} alt="File Preview"
|
||||
h={32}
|
||||
objectFit={'cover'}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"} w="100%"
|
||||
animation={`${fadeIn} 0.5s ease-in-out`} />
|
||||
<Icon
|
||||
transition={"all 0.5s"} cursor={'pointer'} onClick={handleRemove} color={"red.500"} boxSize={8}
|
||||
rounded={'md'} p={2} position={'absolute'} top={1} right={1}
|
||||
_hover={{
|
||||
bg: "#fff"
|
||||
}} as={DeleteIcon}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<input
|
||||
id={`file-${label}`} // Unique ID for each instance
|
||||
// required={isRequired}
|
||||
type="file"
|
||||
accept="image/*"
|
||||
style={{ display: 'none' }} // Ensure it's visually hidden
|
||||
{...register('file', { required: isRequired ? 'A file is required' : false })}
|
||||
onChange={handleFileChange}
|
||||
/>
|
||||
</Box>
|
||||
<HStack justifyContent={"space-between"}>
|
||||
<Text color={"#C3C3C3"} fontSize={"xs"} fontWeight={400} mb={1}>
|
||||
Supported formats- jpg, png, svg
|
||||
</Text>
|
||||
<Text color={"#C3C3C3"} fontSize={"xs"} fontWeight={400} mb={1}>
|
||||
Maximum size - 20MB
|
||||
</Text>
|
||||
</HStack>
|
||||
|
||||
{/* <FormErrorMessage>{errors.file && errors.file.message}</FormErrorMessage> */}
|
||||
|
||||
{children}
|
||||
</FormControl>
|
||||
|
||||
<ImageViewer src={`${import.meta.env.VITE_IMAGE_URL}${filePreview}`} isOpen={isOpen} onClose={onClose} />
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default FileUploader;
|
||||
@@ -19,14 +19,14 @@ const ImageViewer = ({ src, isOpen, onClose }) => {
|
||||
|
||||
<Modal size={"xl"} isCentered isOpen={isOpen} onClose={onClose}>
|
||||
<ModalOverlay />
|
||||
<ModalContent>
|
||||
<ModalContent w={500}>
|
||||
{/* <ModalCloseButton /> */}
|
||||
<ModalBody p={4}>
|
||||
<ModalBody p={0} bg={'transparent'} width={'100%'}>
|
||||
<Image
|
||||
rounded={6}
|
||||
w={"100%"}
|
||||
h={"100%"}
|
||||
src={"https://tanami.betadelivery.com/" + src}
|
||||
src={src}
|
||||
/>
|
||||
</ModalBody>
|
||||
</ModalContent>
|
||||
|
||||
36
src/Components/ProfileImageViewer.jsx
Normal file
36
src/Components/ProfileImageViewer.jsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import { AddIcon } from "@chakra-ui/icons";
|
||||
import {
|
||||
Avatar,
|
||||
Button,
|
||||
HStack,
|
||||
Image,
|
||||
Modal,
|
||||
ModalBody,
|
||||
ModalCloseButton,
|
||||
ModalContent,
|
||||
ModalFooter,
|
||||
ModalHeader,
|
||||
ModalOverlay,
|
||||
Text,
|
||||
VStack,
|
||||
} from "@chakra-ui/react";
|
||||
|
||||
import React from "react";
|
||||
|
||||
const ProfileImageViewer = ({ isOpen, onOpen, onClose, imgLink, rounded, snap }) => {
|
||||
return (
|
||||
<Modal isCentered isOpen={isOpen} onClose={onClose}>
|
||||
<ModalOverlay
|
||||
css={{
|
||||
backdropFilter: "blur(8px)",
|
||||
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
||||
}}
|
||||
/>
|
||||
<ModalContent rounded={rounded? "full":"md"} maxW={{base: rounded ? "65%" :'98%', md:rounded ? "20%" :'45%', "2xl":rounded ? "25%" :'55%'}} bg={"transparent"}>
|
||||
<Image transform={snap ? "scaleX(-1)" :""} alt="Null" rounded={rounded? "full":"md"} w={"100%"} h={"100%"} src={imgLink} />
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default ProfileImageViewer;
|
||||
@@ -14,7 +14,7 @@ const ToastBox = ({ message, status }) => {
|
||||
>
|
||||
|
||||
{status === "error" || status === "warn" ? <WarningIcon/> : <CheckCircleIcon /> }
|
||||
<Text as={"span"}>{message}</Text>
|
||||
<Text fontWeight={600} as={"span"}>{message}</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -973,7 +973,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -981,7 +981,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -989,7 +989,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -997,7 +997,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -1005,7 +1005,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -1013,7 +1013,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -1021,7 +1021,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -1029,7 +1029,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -1037,7 +1037,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -1045,7 +1045,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
{
|
||||
id: "12451",
|
||||
name: "Kartikey Gautam",
|
||||
emailID: "kg@wdimails.com",
|
||||
emailID: "mailto:kg@wdimails.com",
|
||||
department: "Finance",
|
||||
role: "Sr. Accountant",
|
||||
permissions: "Subadmin",
|
||||
@@ -1056,7 +1056,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1064,7 +1064,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1072,7 +1072,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1080,7 +1080,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1088,7 +1088,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1096,7 +1096,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1104,7 +1104,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1112,7 +1112,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1120,7 +1120,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1128,7 +1128,7 @@ const GlobalStateProvider = ({ children }) => {
|
||||
// {
|
||||
// "id": "12451",
|
||||
// "name": "Kartikey Gautam",
|
||||
// "emailID": "kg@wdimails.com",
|
||||
// "emailID": "mailto:kg@wdimails.com",
|
||||
// "department": "Finance",
|
||||
// "role": "Sr. Accountant",
|
||||
// "permissions": "Subadmin",
|
||||
@@ -1675,6 +1675,8 @@ const GlobalStateProvider = ({ children }) => {
|
||||
"Action": ""
|
||||
},
|
||||
])
|
||||
|
||||
|
||||
const [ApplicationStatus, setApplicationStatus] = useState([
|
||||
{
|
||||
EmpID: 124589,
|
||||
|
||||
@@ -14,6 +14,8 @@ import {
|
||||
FormErrorMessage,
|
||||
IconButton,
|
||||
Button,
|
||||
Spinner,
|
||||
useToast,
|
||||
} from "@chakra-ui/react";
|
||||
import PhoneInput from "react-phone-input-2";
|
||||
import "react-phone-input-2/lib/style.css";
|
||||
@@ -25,6 +27,9 @@ import * as Yup from "yup";
|
||||
import { yupResolver } from "@hookform/resolvers/yup";
|
||||
import { ArrowBackIcon, ArrowForwardIcon } from "@chakra-ui/icons";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
import { useSentFileMutation } from "../../Services/token.serivce";
|
||||
import FileUploader from "../../Components/FileUploader/FileUploader";
|
||||
import ToastBox from "../../Components/ToastBox";
|
||||
|
||||
// Validation schema using Yup
|
||||
const validationSchema = Yup.object().shape({
|
||||
@@ -33,6 +38,7 @@ const validationSchema = Yup.object().shape({
|
||||
mobileNumber_corporate: Yup.string()
|
||||
.matches(/^\d{10}$/, "Phone number must be 10 digits")
|
||||
.required("Phone number is required"),
|
||||
logo_path_file_name:Yup.mixed().required('Company logo is required'),
|
||||
});
|
||||
|
||||
const OnboardingAboutCompany = ({
|
||||
@@ -43,11 +49,15 @@ const OnboardingAboutCompany = ({
|
||||
steps,
|
||||
handleNext,
|
||||
}) => {
|
||||
const { data, isLoading } = useGetPrePopQuery();
|
||||
const { data } = useGetPrePopQuery();
|
||||
const toast = useToast()
|
||||
|
||||
console.log(data?.data?.prepopulateData);
|
||||
|
||||
const [phone, setPhone] = useState("");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const [sendFile] = useSentFileMutation();
|
||||
|
||||
// Setup form handling with react-hook-form
|
||||
const {
|
||||
@@ -71,18 +81,65 @@ const OnboardingAboutCompany = ({
|
||||
.splice(countryCode.length - 1, 15)
|
||||
.join("")
|
||||
); // Sync phone number
|
||||
setValue("ISDcode_corporate", countryCode); // Sync ISD code
|
||||
setValue("ISDCode_corporate", countryCode); // Sync ISD code
|
||||
};
|
||||
|
||||
// Handle form submission
|
||||
const onSubmit = (data) => {
|
||||
setCorpData({ ...corpData, ...data });
|
||||
const onSubmit = async (data) => {
|
||||
setCorpData({ ...corpData, ...data });
|
||||
handleNext();
|
||||
// Handle your submit logic here
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const handleFileUpload = async (file, setPreview) => {
|
||||
setIsLoading(true)
|
||||
console.log('File uploaded:', file);
|
||||
const formData = new FormData();
|
||||
formData.append("document", file); // Append file
|
||||
|
||||
const code = localStorage?.getItem("codeCorporate");
|
||||
try {
|
||||
const res = await sendFile({ data: formData, code }); // Upload file to server
|
||||
console.log(res);
|
||||
if (res?.data?.data) {
|
||||
// Assuming res.data.data contains the file URL or some ID
|
||||
setCorpData({ ...corpData, logo_path_file_name:res?.data?.data });
|
||||
setValue("logo_path_file_name", res?.data?.data);
|
||||
console.log(errors);
|
||||
setPreview(res?.data?.data)
|
||||
toast({
|
||||
render: () => <ToastBox message={res?.data?.message} />,
|
||||
});
|
||||
setIsLoading(false);
|
||||
} else if (res?.error?.data?.message){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={res?.error?.data?.message} />,
|
||||
});
|
||||
|
||||
} else if(res?.error){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={"Somthing went wrong"} />,
|
||||
});
|
||||
|
||||
}
|
||||
setIsLoading(false)
|
||||
} catch (error) {
|
||||
console.error("File upload failed", error);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
const handleFileRemove = () => {
|
||||
console.log('File removed');
|
||||
};
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD}>
|
||||
<Box {...OPACITY_ON_LOAD}>
|
||||
<Text color={"#49475A"} fontWeight={500} fontSize={"sm"} mb={1}>
|
||||
About your company
|
||||
</Text>
|
||||
@@ -172,7 +229,7 @@ const OnboardingAboutCompany = ({
|
||||
</FormControl>
|
||||
|
||||
{/* Upload Company Logo Field */}
|
||||
<Box mb={3}>
|
||||
{/* <Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Upload Company Logo
|
||||
</Text>
|
||||
@@ -211,9 +268,24 @@ const OnboardingAboutCompany = ({
|
||||
type="file"
|
||||
id="company-logo-file-input"
|
||||
style={{ display: "none" }} // Hide the file input
|
||||
onChange={(e) => {
|
||||
handleFileChange(e); // Handle file input
|
||||
}}
|
||||
/>
|
||||
|
||||
{fileName && (
|
||||
<Text fontSize="sm" mt={2}>
|
||||
Uploaded file: {fileName}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{errors.logo_path_file_name && (
|
||||
<Text color="red" fontWeight={500} fontSize="xs">
|
||||
{errors.logo_path_file_name.message}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
<HStack justifyContent={"space-between"}>
|
||||
<Text color={"#C3C3C3"} fontSize={"xs"} fontWeight={400} mb={1}>
|
||||
Supported formats- jpg, png, svg
|
||||
@@ -247,12 +319,70 @@ const OnboardingAboutCompany = ({
|
||||
rightIcon={<ArrowForwardIcon />}
|
||||
w={"100%"}
|
||||
type="submit"
|
||||
isLoading={isLoading}
|
||||
>
|
||||
{activeStep === steps.length - 1 ? "Next step" : "Next step"}
|
||||
</Button>
|
||||
</HStack>
|
||||
</Box>
|
||||
</Box> */}
|
||||
|
||||
|
||||
|
||||
|
||||
<FileUploader
|
||||
label="Upload Company Logo"
|
||||
maxFileSize={3 * 1024 * 1024} // Max 3MB size
|
||||
onFileUpload={handleFileUpload}
|
||||
|
||||
> {errors.logo_path_file_name?.message && (
|
||||
<Text color="red" fontWeight={500} fontSize="xs">
|
||||
{errors.logo_path_file_name?.message}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
</FileUploader>
|
||||
|
||||
<HStack mt={6}>
|
||||
<IconButton
|
||||
aria-label="Back"
|
||||
icon={<ArrowBackIcon />}
|
||||
variant="outline"
|
||||
size="sm"
|
||||
px={8}
|
||||
_hover={{ opacity: 0.8 }}
|
||||
color={"#d0b8ef"}
|
||||
border={"1px solid #d0b8ef"}
|
||||
isDisabled={activeStep === 0}
|
||||
onClick={() => setActiveStep(activeStep - 1)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
bg={"#6311CB"}
|
||||
color={"#fff"}
|
||||
fontSize={"xs"}
|
||||
fontWeight={500}
|
||||
size="sm"
|
||||
_hover={{ opacity: 0.8 }}
|
||||
rightIcon={<ArrowForwardIcon />}
|
||||
w={"100%"}
|
||||
type="submit"
|
||||
// isLoading={isLoading}
|
||||
>
|
||||
{activeStep === steps.length - 1 ? "Next step" : "Next step"}
|
||||
</Button>
|
||||
</HStack>
|
||||
|
||||
|
||||
</Box>
|
||||
|
||||
{/* Display the loading spinner */}
|
||||
{isLoading && (
|
||||
<Box border={'1px solid #6310CB'} px={4} py={2} rounded={'md'} shadow={'md'} as="span" bg={'#fff'} position={'fixed'} top={69} left={'40%'} display="flex" justifyContent="center" alignItems="center" >
|
||||
<Text as={'span'} fontWeight={600} fontSize={'sm'}>Uploading please wait...</Text>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,40 +1,204 @@
|
||||
import React from 'react';
|
||||
import { Box, Input, Text, VStack, HStack, FormLabel } from '@chakra-ui/react';
|
||||
import React, { useState } from 'react';
|
||||
import { Box, Input, Text, VStack, HStack, FormLabel, IconButton, Button, useToast } from '@chakra-ui/react';
|
||||
import { SlCloudUpload } from 'react-icons/sl';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { yupResolver } from '@hookform/resolvers/yup';
|
||||
import * as yup from 'yup';
|
||||
import { OPACITY_ON_LOAD } from '../../Layout/animations';
|
||||
import { ArrowBackIcon, ArrowForwardIcon } from '@chakra-ui/icons';
|
||||
import { useSentFileMutation } from '../../Services/token.serivce';
|
||||
import FileUploader from '../../Components/FileUploader/FileUploader';
|
||||
import ToastBox from '../../Components/ToastBox';
|
||||
|
||||
// Yup validation schema
|
||||
const schema = yup.object().shape({
|
||||
cin: yup
|
||||
cin_number: yup
|
||||
.string()
|
||||
.required('CIN is required')
|
||||
.matches(/^[A-Za-z0-9]{21}$/, 'CIN must be exactly 21 characters long'),
|
||||
pan: yup
|
||||
pancard_number: yup
|
||||
.string()
|
||||
.required('Company PAN is required')
|
||||
.matches(/[A-Z]{5}[0-9]{4}[A-Z]{1}$/, 'Invalid PAN format'),
|
||||
gst: yup
|
||||
gst_number: yup
|
||||
.string()
|
||||
.required('GST number is required')
|
||||
.matches(/\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}/, 'Invalid GST number format'),
|
||||
// gstFile: yup.mixed().required('GST certificate is required'),
|
||||
// panFile: yup.mixed().required('PAN card is required'),
|
||||
gst_file_path_name: yup.mixed().required('GST certificate is required'),
|
||||
pancard_file_path_name: yup.mixed().required('PAN card is required'),
|
||||
});
|
||||
|
||||
const OnboardingAddCompanyDetails = () => {
|
||||
const { register, handleSubmit, formState: { errors } } = useForm({
|
||||
const OnboardingAddCompanyDetails = ({
|
||||
corpData,
|
||||
setCorpData,
|
||||
setActiveStep,
|
||||
activeStep,
|
||||
steps,
|
||||
handleNext,
|
||||
}) => {
|
||||
const { register, handleSubmit, setValue, formState: { errors } } = useForm({
|
||||
resolver: yupResolver(schema),
|
||||
});
|
||||
|
||||
|
||||
const [fileName, setFileName] = useState("");
|
||||
const [ sendFile ] = useSentFileMutation()
|
||||
const [ isLoading, setIsLoading ] = useState()
|
||||
const toast = useToast()
|
||||
|
||||
const onSubmit = (data) => {
|
||||
console.log('Form Data:', data);
|
||||
setCorpData({ ...corpData, ...data });
|
||||
handleNext();
|
||||
};
|
||||
|
||||
|
||||
|
||||
const handleFileChangeGst = async (e) => {
|
||||
console.log("hit");
|
||||
const files = e.target.files;
|
||||
console.log(files);
|
||||
if (files && files.length > 0) {
|
||||
// Assuming only one file is allowed
|
||||
setFileName(files.name);
|
||||
console.log(files);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("document", files[0]); // Append file
|
||||
|
||||
|
||||
const code = localStorage?.getItem("codeCorporate");
|
||||
try {
|
||||
const res = await sendFile({data:formData, code}); // Upload file to server
|
||||
|
||||
if (res?.data?.data) {
|
||||
console.log(res?.data?.data);
|
||||
// Assuming res.data.data contains the file URL or some ID
|
||||
setValue("gst_file_path_name", res?.data?.data); // Set value with server response
|
||||
// setCorpData({ ...corpData, ...data });
|
||||
setIsLoading(false)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("File upload failed", error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// setValue("logo_path_file_name", files); // Update react-hook-form state
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
const handleFileChangePan = async (e) => {
|
||||
const files = e.target.files;
|
||||
if (files && files.length > 0) {
|
||||
// Assuming only one file is allowed
|
||||
setFileName(files.name);
|
||||
const formData = new FormData();
|
||||
formData.append("document", files[0]); // Append file
|
||||
const code = localStorage?.getItem("codeCorporate");
|
||||
try {
|
||||
const res = await sendFile({data:formData, code}); // Upload file to server
|
||||
if (res?.data?.data) {
|
||||
// Assuming res.data.data contains the file URL or some ID
|
||||
setValue("pancard_file_path_name", res?.data?.data); // Set value with server response
|
||||
// setCorpData({ ...corpData, ...data });
|
||||
setIsLoading(false)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("File upload failed", error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
const handleFileUploadGst = async (file, setPreview) => {
|
||||
setIsLoading(true)
|
||||
console.log('File uploaded:', file);
|
||||
const formData = new FormData();
|
||||
formData.append("document", file); // Append file
|
||||
|
||||
const code = localStorage?.getItem("codeCorporate");
|
||||
try {
|
||||
const res = await sendFile({ data: formData, code }); // Upload file to server
|
||||
console.log(res);
|
||||
if (res?.data?.data) {
|
||||
// Assuming res.data.data contains the file URL or some ID
|
||||
setCorpData({ ...corpData, gst_file_path_name:res?.data?.data });
|
||||
setValue("gst_file_path_name", res?.data?.data);
|
||||
console.log(errors);
|
||||
setPreview(res?.data?.data)
|
||||
toast({
|
||||
render: () => <ToastBox message={res?.data?.message} />,
|
||||
});
|
||||
setIsLoading(false);
|
||||
} else if (res?.error?.data?.message){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={res?.error?.data?.message} />,
|
||||
});
|
||||
|
||||
} else if(res?.error){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={"Somthing went wrong"} />,
|
||||
});
|
||||
|
||||
}
|
||||
setIsLoading(false)
|
||||
} catch (error) {
|
||||
console.error("File upload failed", error);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const handleFileUploadPan = async (file, setPreview) => {
|
||||
setIsLoading(true)
|
||||
console.log('File uploaded:', file);
|
||||
const formData = new FormData();
|
||||
formData.append("document", file); // Append file
|
||||
|
||||
const code = localStorage?.getItem("codeCorporate");
|
||||
try {
|
||||
const res = await sendFile({ data: formData, code }); // Upload file to server
|
||||
console.log(res);
|
||||
if (res?.data?.data) {
|
||||
// Assuming res.data.data contains the file URL or some ID
|
||||
setCorpData({ ...corpData, pancard_file_path_name:res?.data?.data });
|
||||
setValue("pancard_file_path_name", res?.data?.data);
|
||||
console.log(errors);
|
||||
setPreview(res?.data?.data)
|
||||
toast({
|
||||
render: () => <ToastBox message={res?.data?.message} />,
|
||||
});
|
||||
setIsLoading(false);
|
||||
} else if (res?.error?.data?.message){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={res?.error?.data?.message} />,
|
||||
});
|
||||
|
||||
} else if(res?.error){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={"Image is too large"} />,
|
||||
});
|
||||
|
||||
}
|
||||
setIsLoading(false)
|
||||
} catch (error) {
|
||||
console.error("File upload failed", error);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Box {...OPACITY_ON_LOAD}>
|
||||
<Box {...OPACITY_ON_LOAD}>
|
||||
<Text color={'#49475A'} fontWeight={500} fontSize={'sm'} mb={1}>
|
||||
Add company details
|
||||
</Text>
|
||||
@@ -54,9 +218,9 @@ const OnboardingAddCompanyDetails = () => {
|
||||
borderRadius="md"
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
{...register('cin')}
|
||||
{...register('cin_number')}
|
||||
/>
|
||||
{errors.cin && <Text color="red.500" fontWeight={500} fontSize="xs">{errors.cin.message}</Text>}
|
||||
{errors.cin_number && <Text color="red.500" fontWeight={500} fontSize="xs">{errors.cin_number.message}</Text>}
|
||||
</Box>
|
||||
|
||||
{/* Company PAN Field */}
|
||||
@@ -70,9 +234,9 @@ const OnboardingAddCompanyDetails = () => {
|
||||
borderRadius="md"
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
{...register('pan')}
|
||||
{...register('pancard_number')}
|
||||
/>
|
||||
{errors.pan && <Text color="red.500" fontWeight={500} fontSize="xs">{errors.pan.message}</Text>}
|
||||
{errors.pancard_number && <Text color="red.500" fontWeight={500} fontSize="xs">{errors.pancard_number.message}</Text>}
|
||||
</Box>
|
||||
|
||||
{/* Company GST Number */}
|
||||
@@ -86,13 +250,13 @@ const OnboardingAddCompanyDetails = () => {
|
||||
borderRadius="md"
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
{...register('gst')}
|
||||
{...register('gst_number')}
|
||||
/>
|
||||
{errors.gst && <Text color="red.500" fontWeight={500} fontSize="xs">{errors.gst.message}</Text>}
|
||||
{errors.gst_number && <Text color="red.500" fontWeight={500} fontSize="xs">{errors.gst_number.message}</Text>}
|
||||
</Box>
|
||||
|
||||
{/* Upload GST Certificate */}
|
||||
<Box mb={3}>
|
||||
{/* <Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Upload GST Certificate
|
||||
</Text>
|
||||
@@ -118,7 +282,7 @@ const OnboardingAddCompanyDetails = () => {
|
||||
mt={'2'}
|
||||
mb={0}
|
||||
>
|
||||
Drag and drop files here or{' '}
|
||||
Drag and drop files or{' '}
|
||||
<Text as="span" textDecoration="underline">
|
||||
Choose file
|
||||
</Text>
|
||||
@@ -128,10 +292,13 @@ const OnboardingAddCompanyDetails = () => {
|
||||
type="file"
|
||||
id="gst-file-input"
|
||||
style={{ display: 'none' }}
|
||||
{...register('gstFile')}
|
||||
|
||||
onChange={(e) => {
|
||||
handleFileChangeGst(e); // Handle file input
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
{errors.gstFile && <Text color="red.500" fontSize="xs">{errors.gstFile.message}</Text>}
|
||||
{errors.gst_file_path_name && <Text color="red.500" fontSize="xs">{errors.gst_file_path_name.message}</Text>}
|
||||
|
||||
<HStack justifyContent={"space-between"}>
|
||||
<Text color={"#C3C3C3"} fontSize={"xs"} fontWeight={400} mb={1}>
|
||||
@@ -141,10 +308,42 @@ const OnboardingAddCompanyDetails = () => {
|
||||
Maximum size - 20MB
|
||||
</Text>
|
||||
</HStack>
|
||||
</Box>
|
||||
</Box> */}
|
||||
|
||||
|
||||
|
||||
|
||||
<FileUploader
|
||||
label="Upload GST Certificate"
|
||||
maxFileSize={3 * 1024 * 1024} // Max 3MB size
|
||||
onFileUpload={handleFileUploadGst}
|
||||
|
||||
> {errors.gst_file_path_name?.message && (
|
||||
<Text color="red" fontWeight={500} fontSize="xs">
|
||||
{errors.gst_file_path_name?.message}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
</FileUploader>
|
||||
|
||||
|
||||
|
||||
<FileUploader
|
||||
label="Upload PAN card"
|
||||
maxFileSize={3 * 1024 * 1024} // Max 3MB size
|
||||
onFileUpload={handleFileUploadPan}
|
||||
|
||||
> {errors.pancard_file_path_name?.message && (
|
||||
<Text color="red" fontWeight={500} fontSize="xs">
|
||||
{errors.pancard_file_path_name?.message}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
</FileUploader>
|
||||
|
||||
|
||||
{/* Upload PAN Card */}
|
||||
<Box mb={3}>
|
||||
{/* <Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Upload PAN Card
|
||||
</Text>
|
||||
@@ -180,7 +379,11 @@ const OnboardingAddCompanyDetails = () => {
|
||||
type="file"
|
||||
id="pan-file-input"
|
||||
style={{ display: 'none' }}
|
||||
{...register('panFile')}
|
||||
|
||||
onChange={(e) => {
|
||||
handleFileChangePan(e); // Handle file input
|
||||
}}
|
||||
|
||||
/>
|
||||
</Box>
|
||||
{errors.panFile && <Text color="red.500" fontSize="xs">{errors.panFile.message}</Text>}
|
||||
@@ -193,10 +396,10 @@ const OnboardingAddCompanyDetails = () => {
|
||||
Maximum size - 20MB
|
||||
</Text>
|
||||
</HStack>
|
||||
</Box>
|
||||
</Box> */}
|
||||
|
||||
{/* Submit Button */}
|
||||
<Box mt={6}>
|
||||
{/* <Box mt={6}>
|
||||
<Text
|
||||
as="button"
|
||||
bg={'#6311CB'}
|
||||
@@ -209,8 +412,46 @@ const OnboardingAddCompanyDetails = () => {
|
||||
>
|
||||
Submit
|
||||
</Text>
|
||||
</Box>
|
||||
</Box> */}
|
||||
|
||||
|
||||
|
||||
<HStack mt={6}>
|
||||
<IconButton
|
||||
aria-label="Back"
|
||||
icon={<ArrowBackIcon />}
|
||||
variant="outline"
|
||||
size="sm"
|
||||
px={8}
|
||||
_hover={{ opacity: 0.8 }}
|
||||
color={"#d0b8ef"}
|
||||
border={"1px solid #d0b8ef"}
|
||||
isDisabled={activeStep === 0}
|
||||
onClick={() => setActiveStep(activeStep - 1)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
bg={"#6311CB"}
|
||||
color={"#fff"}
|
||||
fontSize={"xs"}
|
||||
fontWeight={500}
|
||||
size="sm"
|
||||
_hover={{ opacity: 0.8 }}
|
||||
rightIcon={<ArrowForwardIcon />}
|
||||
w={"100%"}
|
||||
type="submit"
|
||||
>
|
||||
{activeStep === steps.length - 1 ? "Next step" : "Next step"}
|
||||
</Button>
|
||||
</HStack>
|
||||
</Box>
|
||||
|
||||
{/* Display the loading spinner */}
|
||||
{isLoading && (
|
||||
<Box border={'1px solid #6310CB'} px={4} py={2} rounded={'md'} shadow={'md'} as="span" bg={'#fff'} position={'fixed'} top={69} left={'40%'} display="flex" justifyContent="center" alignItems="center" >
|
||||
<Text as={'span'} fontWeight={600} fontSize={'sm'}>Uploading please wait...</Text>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,294 +1,455 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Box, Input, Text, VStack, HStack } from '@chakra-ui/react';
|
||||
import { SlCloudUpload } from 'react-icons/sl';
|
||||
import PhoneInput from 'react-phone-input-2';
|
||||
import React, { useState } from "react";
|
||||
import { Box, Input, Text, VStack, HStack, IconButton, Button, Icon, Image, useDisclosure } from "@chakra-ui/react";
|
||||
import { SlCloudUpload } from "react-icons/sl";
|
||||
import PhoneInput from "react-phone-input-2";
|
||||
import { useSentFileMutation } from "../../Services/token.serivce";
|
||||
import { ArrowBackIcon, ArrowForwardIcon, DeleteIcon } from "@chakra-ui/icons";
|
||||
import { fadeIn } from "../../Components/FileUploader/FileUploader";
|
||||
import ImageViewer from "../../Components/ImageViewer";
|
||||
|
||||
const OnboardingDirectorDetails = () => {
|
||||
const [directorForms, setDirectorForms] = useState([
|
||||
{ id: 1, directorName: '', directorEmail: '', directorPhone: '', selectedPanImage: '', selectedAadharImage: '' }
|
||||
const OnboardingDirectorDetails = ({
|
||||
corpData,
|
||||
setCorpData,
|
||||
setActiveStep,
|
||||
activeStep,
|
||||
steps,
|
||||
handleNext,
|
||||
}) => {
|
||||
const [directorForms, setDirectorForms] = useState([
|
||||
{
|
||||
director_name: "",
|
||||
emailAddress: "",
|
||||
ISDCode: "",
|
||||
mobileNumber: "",
|
||||
pancard_file_path_name: "",
|
||||
aadhar_file_path_name: "",
|
||||
},
|
||||
]);
|
||||
|
||||
const [directorFormErrors, setDirectorFormErrors] = useState([]);
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
const [ isLoading, setIsLoading ] = useState(false)
|
||||
const [ prevLink, setPrevLink ] = useState(null)
|
||||
|
||||
const [sendFile] = useSentFileMutation();
|
||||
async function uploadFile(file) {
|
||||
const formData = new FormData();
|
||||
formData.append("document", file); // Append file
|
||||
const code = localStorage?.getItem("codeCorporate");
|
||||
try {
|
||||
const res = await sendFile({ data: formData, code }); // Upload file to server
|
||||
return res?.data?.data;
|
||||
} catch (error) {
|
||||
console.error("File upload failed", error);
|
||||
}
|
||||
}
|
||||
|
||||
// Add new director form
|
||||
const handleAddDirector = () => {
|
||||
setDirectorForms([
|
||||
...directorForms,
|
||||
{
|
||||
director_name: "",
|
||||
emailAddress: "",
|
||||
mobileNumber: "",
|
||||
pancard_file_path_name: "",
|
||||
aadhar_file_path_name: "",
|
||||
},
|
||||
]);
|
||||
};
|
||||
|
||||
const [directorFormErrors, setDirectorFormErrors] = useState([]);
|
||||
// Update the form field for a particular director
|
||||
const handleFieldChange = (index, field, value, country = {}) => {
|
||||
const updatedForms = [...directorForms];
|
||||
if (field === "mobileNumber") {
|
||||
const countryCode = `+${country.dialCode}`;
|
||||
updatedForms[index]["ISDCode"] = countryCode;
|
||||
updatedForms[index]["mobileNumber"] = value
|
||||
.split("")
|
||||
.splice(countryCode.length - 1, 15)
|
||||
.join("");
|
||||
}
|
||||
updatedForms[index][field] = value;
|
||||
setDirectorForms(updatedForms);
|
||||
};
|
||||
|
||||
// Add new director form
|
||||
const handleAddDirector = () => {
|
||||
setDirectorForms([
|
||||
...directorForms,
|
||||
{ id: directorForms.length + 1, directorName: '', directorEmail: '', directorPhone: '', selectedPanImage: '', selectedAadharImage: '' }
|
||||
]);
|
||||
};
|
||||
// Handle file upload for PAN and Aadhar
|
||||
const handleFileUpload = async (index, field, event) => {
|
||||
|
||||
// Update the form field for a particular director
|
||||
const handleFieldChange = (index, field, value) => {
|
||||
const updatedForms = [...directorForms];
|
||||
updatedForms[index][field] = value;
|
||||
setDirectorForms(updatedForms);
|
||||
};
|
||||
setIsLoading(true)
|
||||
const file = event.target.files[0];
|
||||
if (file) {
|
||||
const filePath = await uploadFile(file);
|
||||
const updatedForms = [...directorForms];
|
||||
updatedForms[index][field] = filePath; // Store file name (or file object)
|
||||
setDirectorForms(updatedForms);
|
||||
setIsLoading(false)
|
||||
}
|
||||
};
|
||||
|
||||
// Handle file upload for PAN and Aadhar
|
||||
const handleFileUpload = (index, field, event) => {
|
||||
const file = event.target.files[0];
|
||||
if (file) {
|
||||
const updatedForms = [...directorForms];
|
||||
updatedForms[index][field] = file.name; // Store file name (or file object)
|
||||
setDirectorForms(updatedForms);
|
||||
}
|
||||
};
|
||||
// Basic validation for each field
|
||||
const validateForm = () => {
|
||||
const errors = directorForms.map((directorForm) => {
|
||||
let formErrors = {};
|
||||
|
||||
// Basic validation for each field
|
||||
const validateForm = () => {
|
||||
const errors = directorForms.map((directorForm) => {
|
||||
let formErrors = {};
|
||||
if (!directorForm.director_name) {
|
||||
formErrors.director_name = "Director Name is required.";
|
||||
}
|
||||
|
||||
if (!directorForm.directorName) {
|
||||
formErrors.directorName = "Director Name is required.";
|
||||
}
|
||||
if (
|
||||
!directorForm.emailAddress ||
|
||||
!/\S+@\S+\.\S+/.test(directorForm.emailAddress)
|
||||
) {
|
||||
formErrors.emailAddress = "Please enter a valid email address.";
|
||||
}
|
||||
|
||||
if (!directorForm.directorEmail || !/\S+@\S+\.\S+/.test(directorForm.directorEmail)) {
|
||||
formErrors.directorEmail = "Please enter a valid email address.";
|
||||
}
|
||||
if (
|
||||
!directorForm.mobileNumber ||
|
||||
directorForm.mobileNumber.length < 10
|
||||
) {
|
||||
formErrors.mobileNumber =
|
||||
"Phone number is required and should be at least 10 digits.";
|
||||
}
|
||||
|
||||
if (!directorForm.directorPhone || directorForm.directorPhone.length < 10) {
|
||||
formErrors.directorPhone = "Phone number is required and should be at least 10 digits.";
|
||||
}
|
||||
if (!directorForm.pancard_file_path_name) {
|
||||
formErrors.pancard_file_path_name = "Please upload a PAN file.";
|
||||
}
|
||||
|
||||
if (!directorForm.selectedPanImage) {
|
||||
formErrors.selectedPanImage = "Please upload a PAN file.";
|
||||
}
|
||||
if (!directorForm.aadhar_file_path_name) {
|
||||
formErrors.aadhar_file_path_name = "Please upload an Aadhar file.";
|
||||
}
|
||||
|
||||
if (!directorForm.selectedAadharImage) {
|
||||
formErrors.selectedAadharImage = "Please upload an Aadhar file.";
|
||||
}
|
||||
return formErrors;
|
||||
});
|
||||
|
||||
return formErrors;
|
||||
});
|
||||
setDirectorFormErrors(errors);
|
||||
|
||||
setDirectorFormErrors(errors);
|
||||
|
||||
// Check if all forms are valid (no errors in any form)
|
||||
const isValid = errors.every((formErrors) => Object.keys(formErrors).length === 0);
|
||||
return isValid;
|
||||
};
|
||||
|
||||
// Handle form submission
|
||||
const handleSubmit = () => {
|
||||
if (validateForm()) {
|
||||
console.log("Form is valid, proceed with submission.");
|
||||
} else {
|
||||
console.log("Form has errors.");
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Text color={'#49475A'} fontWeight={500} fontSize={'sm'} mb={1}>
|
||||
Add director details
|
||||
</Text>
|
||||
<Text color={'#49475A'} fontWeight={500} fontSize={'xs'}>
|
||||
Lorem ipsum dolor sit amet, adipiscing elit.
|
||||
</Text>
|
||||
|
||||
{directorForms?.map((directorForm, index) => (
|
||||
<Box key={index} mb={6}>
|
||||
<Text color={'#49475A'} fontWeight={600} fontSize={'sm'} mb={2}>
|
||||
Director {index + 1}
|
||||
</Text>
|
||||
<Box
|
||||
as="form"
|
||||
bg={"#f7f7fb"}
|
||||
p={4}
|
||||
borderRadius={"md"}
|
||||
boxShadow={"md"}
|
||||
>
|
||||
{/* Director Name Field */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Director Name
|
||||
</Text>
|
||||
<Input
|
||||
type='text'
|
||||
border="1px solid #e2e8f0"
|
||||
borderRadius="md"
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
bg={"#fff"}
|
||||
placeholder="Enter director name"
|
||||
value={directorForm.directorName}
|
||||
onChange={(e) => handleFieldChange(index, 'directorName', e.target.value)}
|
||||
/>
|
||||
{directorFormErrors[index]?.directorName && (
|
||||
<Text color="red.500" fontSize="xs">{directorFormErrors[index].directorName}</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Director Email Field */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Email
|
||||
</Text>
|
||||
<Input
|
||||
type='email'
|
||||
border="1px solid #e2e8f0"
|
||||
borderRadius="md"
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
bg={"#fff"}
|
||||
placeholder="Enter email"
|
||||
value={directorForm.directorEmail}
|
||||
onChange={(e) => handleFieldChange(index, 'directorEmail', e.target.value)}
|
||||
/>
|
||||
{directorFormErrors[index]?.directorEmail && (
|
||||
<Text color="red.500" fontSize="xs">{directorFormErrors[index].directorEmail}</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Director Phone Number */}
|
||||
<Box mb={3}>
|
||||
<Text
|
||||
color={"#344054"}
|
||||
fontSize={"xs"}
|
||||
fontWeight={500}
|
||||
mb={1}
|
||||
>
|
||||
Phone Number
|
||||
</Text>
|
||||
<PhoneInput
|
||||
country={"in"}
|
||||
value={directorForm.directorPhone}
|
||||
onChange={(value) => handleFieldChange(index, 'directorPhone', value)}
|
||||
inputStyle={{
|
||||
width: "100%",
|
||||
borderRadius: "md",
|
||||
paddingLeft: "6",
|
||||
border: "1px solid #e2e8f0",
|
||||
height: "40px"
|
||||
}}
|
||||
buttonStyle={{
|
||||
border: "none",
|
||||
borderRadius: "8px 0 0 8px",
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
/>
|
||||
{directorFormErrors[index]?.directorPhone && (
|
||||
<Text color="red.500" fontSize="xs">{directorFormErrors[index].directorPhone}</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Upload Pan */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Upload Pan
|
||||
</Text>
|
||||
<Box my={2}
|
||||
position="relative"
|
||||
onClick={() => document.getElementById(`pan-file-input-${index}`).click()}
|
||||
>
|
||||
<VStack
|
||||
border={"1px dashed #D0D5DD"}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"}
|
||||
bg={"#faf8fd"}
|
||||
p={4}
|
||||
h={"28"}
|
||||
justifyContent={"center"}
|
||||
cursor="pointer"
|
||||
>
|
||||
<SlCloudUpload color={"#191D23"} size={30} />
|
||||
<Text
|
||||
color={"#191D23"}
|
||||
fontWeight={"500"}
|
||||
fontSize={"sm"}
|
||||
mt={'2'}
|
||||
mb={0}
|
||||
>
|
||||
{directorForm.selectedPanImage || "Drag and drop files here or Choose file"}
|
||||
</Text>
|
||||
</VStack>
|
||||
<input
|
||||
type="file"
|
||||
id={`pan-file-input-${index}`}
|
||||
style={{ display: 'none' }}
|
||||
onChange={(e) => handleFileUpload(index, 'selectedPanImage', e)}
|
||||
/>
|
||||
</Box>
|
||||
{directorFormErrors[index]?.selectedPanImage && (
|
||||
<Text color="red.500" fontSize="xs">{directorFormErrors[index].selectedPanImage}</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Upload Aadhar */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Upload Aadhar
|
||||
</Text>
|
||||
<Box my={2}
|
||||
position="relative"
|
||||
onClick={() => document.getElementById(`aadhar-file-input-${index}`).click()}
|
||||
>
|
||||
<VStack
|
||||
border={"1px dashed #D0D5DD"}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"}
|
||||
bg={"#faf8fd"}
|
||||
p={4}
|
||||
h={"28"}
|
||||
justifyContent={"center"}
|
||||
cursor="pointer"
|
||||
>
|
||||
<SlCloudUpload color={"#191D23"} size={30} />
|
||||
<Text
|
||||
color={"#191D23"}
|
||||
fontWeight={"500"}
|
||||
fontSize={"sm"}
|
||||
mt={'2'}
|
||||
mb={0}
|
||||
>
|
||||
{directorForm.selectedAadharImage || "Drag and drop files here or Choose file"}
|
||||
</Text>
|
||||
</VStack>
|
||||
<input
|
||||
type="file"
|
||||
id={`aadhar-file-input-${index}`}
|
||||
style={{ display: 'none' }}
|
||||
onChange={(e) => handleFileUpload(index, 'selectedAadharImage', e)}
|
||||
/>
|
||||
</Box>
|
||||
{directorFormErrors[index]?.selectedAadharImage && (
|
||||
<Text color="red.500" fontSize="xs">{directorFormErrors[index].selectedAadharImage}</Text>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
))}
|
||||
|
||||
<Box>
|
||||
<Text
|
||||
color={'#6311CB'}
|
||||
fontWeight={600}
|
||||
fontSize={'sm'} mt={4}
|
||||
cursor="pointer"
|
||||
onClick={() => handleAddDirector()}
|
||||
>
|
||||
+ Add director {directorForms.length + 1}
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
<Box mt={6}>
|
||||
<Text
|
||||
as="button"
|
||||
bg={'#6311CB'}
|
||||
color={"white"}
|
||||
fontWeight={600}
|
||||
fontSize={'sm'}
|
||||
p={2}
|
||||
borderRadius={"md"}
|
||||
onClick={() => handleSubmit()}
|
||||
>
|
||||
Submit
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
// Check if all forms are valid (no errors in any form)
|
||||
const isValid = errors.every(
|
||||
(formErrors) => Object.keys(formErrors).length === 0
|
||||
);
|
||||
return isValid;
|
||||
};
|
||||
|
||||
// Handle form submission
|
||||
const handleSubmit = () => {
|
||||
// console.log(directorForms);
|
||||
if (validateForm()) {
|
||||
console.log("Form is valid, proceed with submission.");
|
||||
const data = {
|
||||
directors: directorForms,
|
||||
};
|
||||
setCorpData({ ...corpData, ...data });
|
||||
handleNext();
|
||||
} else {
|
||||
console.log("Form has errors.");
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Text color={"#49475A"} fontWeight={500} fontSize={"sm"} mb={1}>
|
||||
Add director details
|
||||
</Text>
|
||||
<Text color={"#49475A"} fontWeight={500} fontSize={"xs"}>
|
||||
Lorem ipsum dolor sit amet, adipiscing elit.
|
||||
</Text>
|
||||
|
||||
{directorForms?.map((directorForm, index) => (
|
||||
<Box key={index} mb={6}>
|
||||
<Text color={"#49475A"} fontWeight={600} fontSize={"sm"} mb={2}>
|
||||
Director {index + 1}
|
||||
</Text>
|
||||
<Box
|
||||
as="form"
|
||||
bg={"#f7f7fb"}
|
||||
p={4}
|
||||
borderRadius={"md"}
|
||||
boxShadow={"md"}
|
||||
>
|
||||
{/* Director Name Field */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Director Name
|
||||
</Text>
|
||||
<Input
|
||||
type="text"
|
||||
border="1px solid #e2e8f0"
|
||||
borderRadius="md"
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
bg={"#fff"}
|
||||
placeholder="Enter director name"
|
||||
value={directorForm.director_name}
|
||||
onChange={(e) =>
|
||||
handleFieldChange(index, "director_name", e.target.value)
|
||||
}
|
||||
/>
|
||||
{directorFormErrors[index]?.director_name && (
|
||||
<Text color="red.500" fontSize="xs">
|
||||
{directorFormErrors[index].director_name}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Director Email Field */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Email
|
||||
</Text>
|
||||
<Input
|
||||
type="email"
|
||||
border="1px solid #e2e8f0"
|
||||
borderRadius="md"
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
bg={"#fff"}
|
||||
placeholder="Enter email"
|
||||
value={directorForm.emailAddress}
|
||||
onChange={(e) =>
|
||||
handleFieldChange(index, "emailAddress", e.target.value)
|
||||
}
|
||||
/>
|
||||
{directorFormErrors[index]?.emailAddress && (
|
||||
<Text color="red.500" fontSize="xs">
|
||||
{directorFormErrors[index].emailAddress}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Director Phone Number */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Phone Number
|
||||
</Text>
|
||||
<PhoneInput
|
||||
country={"in"}
|
||||
value={directorForm.mobileNumber}
|
||||
onChange={(value, country) =>
|
||||
handleFieldChange(index, "mobileNumber", value, country)
|
||||
}
|
||||
inputStyle={{
|
||||
width: "100%",
|
||||
borderRadius: "md",
|
||||
paddingLeft: "6",
|
||||
border: "1px solid #e2e8f0",
|
||||
height: "40px",
|
||||
}}
|
||||
buttonStyle={{
|
||||
border: "none",
|
||||
borderRadius: "8px 0 0 8px",
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
/>
|
||||
{directorFormErrors[index]?.mobileNumber && (
|
||||
<Text color="red.500" fontSize="xs">
|
||||
{directorFormErrors[index].mobileNumber}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Upload Pan */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Upload Pan
|
||||
</Text>
|
||||
<Box
|
||||
my={2}
|
||||
position="relative"
|
||||
|
||||
>
|
||||
{directorForm.pancard_file_path_name?
|
||||
<Box position={'relative'} width="100%" mt={4}>
|
||||
<Image onClick={()=> {
|
||||
setPrevLink(`${import.meta.env.VITE_IMAGE_URL}${directorForm.pancard_file_path_name}`)
|
||||
onOpen()}}
|
||||
cursor={'pointer'} src={`${import.meta.env.VITE_IMAGE_URL}${directorForm.pancard_file_path_name}`} alt="File Preview"
|
||||
h={32}
|
||||
objectFit={'cover'}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"} w="100%"
|
||||
animation={`${fadeIn} 0.5s ease-in-out`} />
|
||||
<Icon
|
||||
transition={"all 0.5s"} cursor={'pointer'}
|
||||
// onClick={handleRemove}
|
||||
onClick={() =>
|
||||
document.getElementById(`pan-file-input-${index}`).click()
|
||||
}
|
||||
color={"red.500"} boxSize={8}
|
||||
rounded={'md'} p={2} position={'absolute'} top={1} right={1}
|
||||
_hover={{
|
||||
bg: "#fff"
|
||||
}} as={DeleteIcon}
|
||||
/>
|
||||
</Box>: <VStack
|
||||
border={"1px dashed #D0D5DD"}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"}
|
||||
bg={"#faf8fd"}
|
||||
p={4}
|
||||
h={"28"}
|
||||
justifyContent={"center"}
|
||||
cursor="pointer"
|
||||
onClick={() =>
|
||||
document.getElementById(`pan-file-input-${index}`).click()
|
||||
}
|
||||
>
|
||||
<SlCloudUpload color={"#191D23"} size={30} />
|
||||
<Text
|
||||
color={"#191D23"}
|
||||
fontWeight={"500"}
|
||||
fontSize={"sm"}
|
||||
mt={"2"}
|
||||
mb={0}
|
||||
>
|
||||
{directorForm.pancard_file_path_name ||
|
||||
"Drag and drop files here or Choose file"}
|
||||
</Text>
|
||||
</VStack>}
|
||||
<input
|
||||
type="file"
|
||||
id={`pan-file-input-${index}`}
|
||||
style={{ display: "none" }}
|
||||
onChange={(e) =>
|
||||
handleFileUpload(index, "pancard_file_path_name", e)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
{directorFormErrors[index]?.pancard_file_path_name && (
|
||||
<Text color="red.500" fontSize="xs">
|
||||
{directorFormErrors[index].pancard_file_path_name}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Upload Aadhar */}
|
||||
<Box mb={3}>
|
||||
<Text color={"#344054"} fontSize={"xs"} fontWeight={500} mb={1}>
|
||||
Upload Aadhar
|
||||
</Text>
|
||||
<Box
|
||||
my={2}
|
||||
position="relative"
|
||||
|
||||
>
|
||||
{directorForm.aadhar_file_path_name?
|
||||
<Box position={'relative'} width="100%" mt={4}>
|
||||
<Image onClick={()=> {
|
||||
setPrevLink(`${import.meta.env.VITE_IMAGE_URL}${directorForm.aadhar_file_path_name}`)
|
||||
onOpen()}}
|
||||
cursor={'pointer'} src={`${import.meta.env.VITE_IMAGE_URL}${directorForm.aadhar_file_path_name}`} alt="File Preview"
|
||||
h={32}
|
||||
objectFit={'cover'}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"} w="100%"
|
||||
animation={`${fadeIn} 0.5s ease-in-out`} />
|
||||
<Icon
|
||||
transition={"all 0.5s"} cursor={'pointer'}
|
||||
// onClick={handleRemove}
|
||||
onClick={() =>
|
||||
document.getElementById(`pan-file-input-${index}`).click()
|
||||
}
|
||||
color={"red.500"} boxSize={8}
|
||||
rounded={'md'} p={2} position={'absolute'} top={1} right={1}
|
||||
_hover={{
|
||||
bg: "#fff"
|
||||
}} as={DeleteIcon}
|
||||
/>
|
||||
</Box>: <VStack
|
||||
border={"1px dashed #D0D5DD"}
|
||||
boxShadow={"md"}
|
||||
borderRadius={"md"}
|
||||
bg={"#faf8fd"}
|
||||
p={4}
|
||||
h={"28"}
|
||||
justifyContent={"center"}
|
||||
cursor="pointer"
|
||||
onClick={() =>
|
||||
document.getElementById(`aadhar-file-input-${index}`).click()
|
||||
}
|
||||
>
|
||||
<SlCloudUpload color={"#191D23"} size={30} />
|
||||
<Text
|
||||
color={"#191D23"}
|
||||
fontWeight={"500"}
|
||||
fontSize={"sm"}
|
||||
mt={"2"}
|
||||
mb={0}
|
||||
>
|
||||
{directorForm.aadhar_file_path_name ||
|
||||
"Drag and drop files here or Choose file"}
|
||||
</Text>
|
||||
</VStack>}
|
||||
<input
|
||||
type="file"
|
||||
id={`aadhar-file-input-${index}`}
|
||||
style={{ display: "none" }}
|
||||
onChange={(e) =>
|
||||
handleFileUpload(index, "aadhar_file_path_name", e)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
{directorFormErrors[index]?.aadhar_file_path_name && (
|
||||
<Text color="red.500" fontSize="xs">
|
||||
{directorFormErrors[index].aadhar_file_path_name}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
))}
|
||||
|
||||
<Box>
|
||||
<Text
|
||||
color={"#6311CB"}
|
||||
fontWeight={600}
|
||||
fontSize={"sm"}
|
||||
mt={4}
|
||||
cursor="pointer"
|
||||
onClick={() => handleAddDirector()}
|
||||
>
|
||||
+ Add director {directorForms.length + 1}
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
<HStack mt={6}>
|
||||
<IconButton
|
||||
aria-label="Back"
|
||||
icon={<ArrowBackIcon />}
|
||||
variant="outline"
|
||||
size="sm"
|
||||
px={8}
|
||||
_hover={{ opacity: 0.8 }}
|
||||
color={"#d0b8ef"}
|
||||
border={"1px solid #d0b8ef"}
|
||||
isDisabled={activeStep === 0}
|
||||
onClick={() => setActiveStep(activeStep - 1)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
bg={"#6311CB"}
|
||||
color={"#fff"}
|
||||
fontSize={"xs"}
|
||||
fontWeight={500}
|
||||
size="sm"
|
||||
_hover={{ opacity: 0.8 }}
|
||||
rightIcon={<ArrowForwardIcon />}
|
||||
w={"100%"}
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
{activeStep === steps.length - 1 ? "Next step" : "Next step"}
|
||||
</Button>
|
||||
</HStack>
|
||||
|
||||
<ImageViewer src={prevLink} isOpen={isOpen} onClose={onClose} />
|
||||
{/* Display the loading spinner */}
|
||||
{isLoading && (
|
||||
<Box border={'1px solid #6310CB'} px={4} py={2} rounded={'md'} shadow={'md'} as="span" bg={'#fff'} position={'fixed'} top={69} left={'40%'} display="flex" justifyContent="center" alignItems="center" >
|
||||
<Text as={'span'} fontWeight={600} fontSize={'sm'}>Uploading please wait...</Text>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default OnboardingDirectorDetails;
|
||||
|
||||
@@ -19,7 +19,7 @@ import { useSearchParams } from 'react-router-dom';
|
||||
|
||||
|
||||
// Retrieve the active step from localStorage or set it to 0 if it doesn't exist
|
||||
const initialStep = parseInt(localStorage.getItem("activeStep")) || 0;
|
||||
// const initialStep = parseInt(localStorage.getItem("activeStep")) || 0;
|
||||
|
||||
const OnboardingFrame = () => {
|
||||
|
||||
@@ -58,7 +58,7 @@ const OnboardingFrame = () => {
|
||||
|
||||
// Stepper configuration
|
||||
const { activeStep, setActiveStep } = useSteps({
|
||||
index: initialStep, // Initialize the active step from localStorage or 0
|
||||
index: 0, // Initialize the active step from localStorage or 0
|
||||
count: steps.length,
|
||||
});
|
||||
|
||||
@@ -215,7 +215,7 @@ const handleNext = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<HStack justifyContent={"end"}>
|
||||
<HStack justifyContent={"end"}>
|
||||
|
||||
{/* Step Indicator (Horizontal) */}
|
||||
<Flex justify="center" align="center" gap={2} mt={4}>
|
||||
|
||||
@@ -1,9 +1,34 @@
|
||||
import React from 'react';
|
||||
import { Box, Text, HStack, Image, Checkbox, List, ListItem, ListIcon } from '@chakra-ui/react';
|
||||
import React, { useState } from 'react';
|
||||
import { Box, Text, HStack, Image, Checkbox, List, ListItem, ListIcon, IconButton, Button, useToast, useDisclosure } from '@chakra-ui/react';
|
||||
import { MdCheckCircle } from 'react-icons/md';
|
||||
import oBenefits from "../../assets/o-benefits.svg";
|
||||
import oExpense from "../../assets/o-expense.svg";
|
||||
import oGift from "../../assets/o-gift.svg";
|
||||
import { ArrowBackIcon, ArrowForwardIcon } from '@chakra-ui/icons';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useCorpReggisterMutation } from '../../Services/on.board.service';
|
||||
import ToastBox from '../../Components/ToastBox';
|
||||
import OnboardingSelectPackageModal from './OnboardingSelectPackageModal';
|
||||
|
||||
const OnboardingSelectPackage = ({
|
||||
corpData,
|
||||
setCorpData,
|
||||
setActiveStep,
|
||||
activeStep,
|
||||
steps,
|
||||
handleNext,
|
||||
}) => {
|
||||
|
||||
const navigate = useNavigate()
|
||||
const toast = useToast();
|
||||
const [ expence, setExpence ] = useState(false)
|
||||
const [ gifting, setGifting ] = useState(false)
|
||||
const [ benefits, setBenefits ] = useState(false)
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [onBoard, setOnBoard] = useState(false);
|
||||
|
||||
const { isOpen, onOpen, onClose } = useDisclosure()
|
||||
|
||||
|
||||
const packages = [
|
||||
{
|
||||
@@ -16,7 +41,8 @@ const packages = [
|
||||
"Lorem ipsum dolor sit amet",
|
||||
"Lorem ipsum dolor sit amet",
|
||||
"Lorem ipsum dolor sit amet"
|
||||
]
|
||||
],
|
||||
onChange:()=>setExpence(!expence)
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
@@ -28,7 +54,8 @@ const packages = [
|
||||
"Lorem ipsum dolor sit amet",
|
||||
"Lorem ipsum dolor sit amet",
|
||||
"Lorem ipsum dolor sit amet"
|
||||
]
|
||||
],
|
||||
onChange:()=>setBenefits(!benefits)
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
@@ -40,11 +67,76 @@ const packages = [
|
||||
"Lorem ipsum dolor sit amet",
|
||||
"Lorem ipsum dolor sit amet",
|
||||
"Lorem ipsum dolor sit amet"
|
||||
]
|
||||
],
|
||||
onChange:()=>setGifting(!gifting)
|
||||
}
|
||||
];
|
||||
|
||||
const OnboardingSelectPackage = () => {
|
||||
const [ corpOnBoard ] = useCorpReggisterMutation()
|
||||
|
||||
const onSubmit = async () =>{
|
||||
|
||||
setIsLoading(true)
|
||||
setCorpData({ ...corpData, opted_for_expence: expence, opted_for_gifting:gifting, opted_for_benefit:benefits });
|
||||
|
||||
|
||||
|
||||
|
||||
const code = localStorage?.getItem("codeCorporateId");
|
||||
// Update corporate data
|
||||
const updatedData ={
|
||||
...corpData,
|
||||
code_corporateId:code,
|
||||
opted_for_expence: expence,
|
||||
opted_for_gifting: gifting,
|
||||
opted_for_benefit: benefits,
|
||||
};
|
||||
|
||||
|
||||
console.log(updatedData);
|
||||
|
||||
try {
|
||||
const res = await corpOnBoard(updatedData)
|
||||
|
||||
if(res?.data?.data){
|
||||
localStorage?.setItem('fullname',res?.data?.data?.fullName )
|
||||
|
||||
toast({
|
||||
// position: "bottom-left",
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={res?.data?.message} />
|
||||
),
|
||||
});
|
||||
setOnBoard(true)
|
||||
|
||||
setIsLoading(false)
|
||||
|
||||
|
||||
}else if (res?.error?.data?.message){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={res?.error?.data?.message} />,
|
||||
});
|
||||
|
||||
}else if(res?.error){
|
||||
toast({
|
||||
render: () => <ToastBox status={'error'} message={"Somthing went wrong"} />,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
console.log(res?.data?.data?.fullname);
|
||||
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
console.log(corpData);
|
||||
|
||||
return (
|
||||
<Box>
|
||||
@@ -66,7 +158,7 @@ const OnboardingSelectPackage = () => {
|
||||
>
|
||||
<HStack justifyContent={"space-between"} alignItems={"start"}>
|
||||
<Image src={pkg.img} alt={`${pkg.title} image`} />
|
||||
<Checkbox colorScheme='white'></Checkbox>
|
||||
<Checkbox onChange={pkg?.onChange} colorScheme='white'></Checkbox>
|
||||
</HStack>
|
||||
<Text
|
||||
fontSize={"sm"}
|
||||
@@ -101,6 +193,39 @@ const OnboardingSelectPackage = () => {
|
||||
</Box>
|
||||
))}
|
||||
</HStack>
|
||||
|
||||
<HStack mt={6}>
|
||||
<IconButton
|
||||
aria-label="Back"
|
||||
icon={<ArrowBackIcon />}
|
||||
variant="outline"
|
||||
size="sm"
|
||||
px={8}
|
||||
_hover={{ opacity: 0.8 }}
|
||||
color={"#d0b8ef"}
|
||||
border={"1px solid #d0b8ef"}
|
||||
isDisabled={activeStep === 0}
|
||||
onClick={() => setActiveStep(activeStep - 1)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
bg={"#6311CB"}
|
||||
color={"#fff"}
|
||||
fontSize={"xs"}
|
||||
fontWeight={500}
|
||||
size="sm"
|
||||
_hover={{ opacity: 0.8 }}
|
||||
rightIcon={<ArrowForwardIcon />}
|
||||
w={"100%"}
|
||||
type="submit"
|
||||
// isLoading={isLoading}
|
||||
// onClick={onSubmit}
|
||||
onClick={onOpen}
|
||||
>
|
||||
{activeStep === steps.length - 1 ? "Next step" : "Next step"}
|
||||
</Button>
|
||||
</HStack>
|
||||
<OnboardingSelectPackageModal onBoard={onBoard} isLoading={isLoading} onSubmit={onSubmit} isOpen={isOpen} onClose={onClose} />
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3,11 +3,12 @@ import React, { useState } from 'react';
|
||||
import PrimaryButton from '../../Components/Buttons/PrimaryButton';
|
||||
import OnboardingSelectPackageModalChild from './OnboardingSelectPackageModalChild';
|
||||
|
||||
const OnboardingSelectPackageModal = ({ isOpen, onClose }) => {
|
||||
const OnboardingSelectPackageModal = ({ isOpen, onClose, onSubmit, isLoading, onBoard }) => {
|
||||
const [isChildModalOpen, setIsChildModalOpen] = useState(false);
|
||||
|
||||
const handleProceed = () => {
|
||||
const handleProceed = async () => {
|
||||
// Close the parent modal and open the child modal
|
||||
await onSubmit()
|
||||
onClose();
|
||||
setIsChildModalOpen(true);
|
||||
};
|
||||
@@ -61,7 +62,7 @@ const OnboardingSelectPackageModal = ({ isOpen, onClose }) => {
|
||||
</Box>
|
||||
|
||||
<Box w={"100%"} my={4}>
|
||||
<PrimaryButton w={"100%"} title={"Proceed"} onClick={handleProceed} />
|
||||
<PrimaryButton isLoading={isLoading} w={"100%"} title={"Proceed"} onClick={handleProceed} />
|
||||
</Box>
|
||||
</ModalBody>
|
||||
</ModalContent>
|
||||
|
||||
@@ -44,7 +44,7 @@ import { AiOutlineEdit } from "react-icons/ai";
|
||||
import { FaRegEye } from "react-icons/fa";
|
||||
import { PiReceipt } from "react-icons/pi";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Link, NavLink } from "react-router-dom";
|
||||
import backFund from "../../assets/backfund.svg";
|
||||
import PrimaryButton from "../../Components/Buttons/PrimaryButton";
|
||||
import { FaArrowUpFromBracket } from "react-icons/fa6";
|
||||
@@ -228,7 +228,9 @@ const WalletProgram = () => {
|
||||
</MenuItem>
|
||||
</MenuList>
|
||||
</Menu>
|
||||
<NavLink to="/wallet-program/create-wallet">
|
||||
<PrimaryButton leftIcon={<AddIcon />} title={"Create wallet"} />
|
||||
</NavLink>
|
||||
</Box>
|
||||
</Box>
|
||||
<Divider />
|
||||
|
||||
55
src/Pages/OptiFiiExpense/wallet/CreateWallet.jsx
Normal file
55
src/Pages/OptiFiiExpense/wallet/CreateWallet.jsx
Normal file
@@ -0,0 +1,55 @@
|
||||
import React from "react";
|
||||
import {
|
||||
Box,
|
||||
Step,
|
||||
StepDescription,
|
||||
StepIcon,
|
||||
StepIndicator,
|
||||
StepNumber,
|
||||
StepSeparator,
|
||||
StepStatus,
|
||||
StepTitle,
|
||||
Stepper,
|
||||
useSteps,
|
||||
} from "@chakra-ui/react";
|
||||
|
||||
const steps = [
|
||||
{ title: "Wallet policy", description: "Wallet policy" },
|
||||
{ title: "Approval policy", description: "Approval policy" },
|
||||
{ title: "Submission policy", description: "Submission policy" },
|
||||
{ title: "Define budget", description: "Define budget" },
|
||||
];
|
||||
|
||||
const CreateWallet = () => {
|
||||
const { activeStep } = useSteps({
|
||||
index: 1,
|
||||
count: steps.length,
|
||||
});
|
||||
return (
|
||||
<Box>
|
||||
<Stepper index={activeStep}>
|
||||
{steps.map((step, index) => (
|
||||
<Step key={index}>
|
||||
<StepIndicator>
|
||||
<StepStatus
|
||||
complete={<StepIcon />}
|
||||
incomplete={<StepNumber />}
|
||||
active={<StepNumber
|
||||
/>}
|
||||
/>
|
||||
</StepIndicator>
|
||||
|
||||
<Box flexShrink="0">
|
||||
<StepTitle>{step.title}</StepTitle>
|
||||
<StepDescription>{step.description}</StepDescription>
|
||||
</Box>
|
||||
|
||||
<StepSeparator />
|
||||
</Step>
|
||||
))}
|
||||
</Stepper>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default CreateWallet;
|
||||
@@ -347,7 +347,7 @@ const StatusCheck = ({ isOnline = true }) => {
|
||||
shadow={"md"}
|
||||
h={"88vh"}
|
||||
>
|
||||
<MiniHeader title={"Welcome, Sachin!"} />
|
||||
<MiniHeader title={`welcome, ${localStorage?.getItem('fullname')}`} />
|
||||
<VStack overflow={"hidden"} rounded={"lg"} w={"100%"}>
|
||||
<VStack p={4} w={"100%"} bg={"#F0E8FA"} alignItems={"start"}>
|
||||
<Text as={"span"} fontWeight={600} fontSize={"md"}>
|
||||
|
||||
@@ -19,9 +19,12 @@ import OptiFiiExpenseDashboard from "../Pages/OptiFiiExpense/OptiFiiExpenseDashb
|
||||
import GiftCard from "../Pages/OptiFiiGifsAndVouchers/GiftCard";
|
||||
import ApplicationStatus from "../Pages/OptiFiiGifsAndVouchers/id/ApplicationStatus";
|
||||
import DigitalApplicationStatus from "../Pages/OptiFiiGifsAndVouchers/id/DigitalApplication";
|
||||
import CreateWallet from "../Pages/OptiFiiExpense/wallet/CreateWallet";
|
||||
import GiftDashboard from "../Pages/OptiFiiGifsAndVouchers/GiftDashboard";
|
||||
import AdvanceExpenseRequestView from "../Pages/OptiFiiExpense/AdvanceExpenseRequestView";
|
||||
import ReimbursementRequestView from "../Pages/OptiFiiExpense/ReimbursementRequestView";
|
||||
import ReimbursementRequestView from "../Pages/OptiFiiExpense/ReimbursementRequestView";
|
||||
import AdvanceExpenseRequestView from "../Pages/OptiFiiExpense/AdvanceExpenseRequestView";
|
||||
export const RouteLink = [
|
||||
{ path: "/", Component: Dashbaord },
|
||||
{ path: "/expenses", Component: Expenses },
|
||||
@@ -46,7 +49,7 @@ export const RouteLink = [
|
||||
{ path: "/gift-card", Component: GiftCard },
|
||||
{ path: "/gift-card/application-status", Component: ApplicationStatus },
|
||||
{ path: "/gift-card/digital-application-status", Component: DigitalApplicationStatus },
|
||||
{ path: "/application-status", Component: ApplicationStatus },
|
||||
{path:"/wallet-program/create-wallet" , Component : CreateWallet},
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,10 +19,26 @@ export const onBoarding = createApi({
|
||||
query: () => `/corporate/pre-populate`,
|
||||
providesTags: ["prePop"],
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
corpReggister: builder.mutation({
|
||||
query: (data) => ({
|
||||
url: "/corporate/register-with-code",
|
||||
method: "POST",
|
||||
body: data ,
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const { useGetPrePopQuery } = onBoarding;
|
||||
export const { useGetPrePopQuery, useCorpReggisterMutation } = onBoarding;
|
||||
|
||||
@@ -143,6 +143,20 @@ export const apiSlice = createApi({
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
sentFile: builder.mutation({
|
||||
query: ({data, code}) => ({
|
||||
url: "/auth/admin/file-upload",
|
||||
method: "POST",
|
||||
body: data ,
|
||||
headers: {
|
||||
'x-auth-code': code, // Set your custom header here
|
||||
},
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -150,4 +164,4 @@ export const apiSlice = createApi({
|
||||
}),
|
||||
});
|
||||
|
||||
export const { useLoginMutation, useRefreshTokenMutation, useForgotPasswordMutation, useResetPasswordMutation,useResendOtpMutation, useSetOtpMutation } = apiSlice;
|
||||
export const { useLoginMutation, useRefreshTokenMutation, useForgotPasswordMutation, useResetPasswordMutation,useResendOtpMutation, useSetOtpMutation, useSentFileMutation } = apiSlice;
|
||||
|
||||
Reference in New Issue
Block a user