Skip to content

Commit

Permalink
Task#229472 (#17)
Browse files Browse the repository at this point in the history
* Task #229075 Solve sonar issue and remove T & C from login

* Task #229075 Solve sonar issue

* Task #229075 text changes

* Task #229075 fix comment by manoj sir

* Task #229075 fix: add height to modal,loading position,lang constant

* Task #229075 - fix ChartWithErrorBoundary

* Task #229075 - fix Typo,add const in format and alphabatically,add one liner HTML

* Task #229075 - fix Typo mistake

* Task#229472 checking Digit API to see CORS issue

* Task#229472 change URL name from proxy
  • Loading branch information
namita-25 authored Oct 28, 2024
1 parent 063810d commit 470d35d
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 9 deletions.
43 changes: 38 additions & 5 deletions src/components/common/MultiStepForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
AccordionItem,
AccordionPanel,
Box,
Button,
Divider,
HStack,
Icon,
Expand Down Expand Up @@ -64,12 +65,30 @@ const MultiStepForm: React.FC<MultiStepFormProps> = ({
onSubmit,
}) => {
const [completedSteps, setCompletedSteps] = useState<number[]>([]);
useEffect(() => {
setCompletedSteps([]);
}, []);
const [currentStep, setCurrentStep] = useState<number>(0);
const isLastStep = currentStep === items.length - 1;
// useEffect(() => {
// setCompletedSteps([]);
// }, []);

const handleSaveAndNext = () => {
// Mark the current step as completed
setCompletedSteps((prev) => [...prev, items[currentStep].step]);

// Move to the next step
if (!isLastStep) {
setCurrentStep((prev) => prev + 1);
} else {
onSubmit(); // Call the submit function if it's the last step
}
};

return (
<Box p={5} mx="auto">
<Accordion allowToggle>
<Accordion
allowToggle
index={currentStep >= 0 ? [currentStep] : undefined}
>
{items?.map((stepItem, index) => (
<React.Fragment key={stepItem?.step}>
<AccordionItem border="none">
Expand All @@ -95,6 +114,8 @@ const MultiStepForm: React.FC<MultiStepFormProps> = ({
boxSize={5}
position="relative"
zIndex={1}
onClick={() => setCurrentStep(index)} // Allow clicking on icon to toggle
cursor="pointer" // Change cursor to pointer
/>
{index < stepsData.length - 1 && (
<Divider
Expand Down Expand Up @@ -125,11 +146,23 @@ const MultiStepForm: React.FC<MultiStepFormProps> = ({
schema={stepItem?.schema}
formData={formData}
onChange={onChange}
onSubmit={onSubmit}
// onSubmit={onSubmit}
uiSchema={stepItem?.uiSchema}
validator={validator}
/>
)}
<HStack spacing={4} justifyContent="flex-end" mt={4}>
{!isLastStep && (
<Button onClick={handleSaveAndNext} colorScheme="blue">
Save & Next
</Button>
)}
{isLastStep && (
<Button onClick={onSubmit} colorScheme="green">
Submit
</Button>
)}
</HStack>
</AccordionPanel>
</Box>
</HStack>
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = function (app) {
"/fsm-calculator/v1/billingSlab/_search",
"/muster-roll",
"/uba-bff-service",
"/application/v1/_appstat",
"/application",
].forEach((location) => app.use(location, createProxy));
["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy));
};
61 changes: 58 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,13 @@
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64"
integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==

"@types/http-proxy@^1.17.15":
version "1.17.15"
resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.15.tgz#12118141ce9775a6499ecb4c01d02f90fc839d36"
integrity sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==
dependencies:
"@types/node" "*"

"@types/json-schema@^7.0.15":
version "7.0.15"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
Expand All @@ -1472,6 +1479,13 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.10.tgz#64f3edf656af2fe59e7278b73d3e62404144a6e6"
integrity sha512-YpS0zzoduEhuOWjAotS6A5AVCva7X4lVlYLF0FYHAY9sdraBfnatttHItlWeZdGhuEkf+OzMNg2ZYAx8t+52uQ==

"@types/node@*":
version "22.7.9"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.9.tgz#2bf2797b5e84702d8262ea2cf843c3c3c880d0e9"
integrity sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==
dependencies:
undici-types "~6.19.2"

"@types/parse-json@^4.0.0":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239"
Expand Down Expand Up @@ -1934,7 +1948,7 @@ debounce@^1.2.1:
resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5"
integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==

debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.6:
version "4.3.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52"
integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==
Expand Down Expand Up @@ -2130,6 +2144,11 @@ esutils@^2.0.2:
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==

eventemitter3@^4.0.0:
version "4.0.7"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==

fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
Expand Down Expand Up @@ -2215,7 +2234,7 @@ focus-lock@^0.9.1:
dependencies:
tslib "^2.0.3"

follow-redirects@^1.15.6:
follow-redirects@^1.0.0, follow-redirects@^1.15.6:
version "1.15.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1"
integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==
Expand Down Expand Up @@ -2355,6 +2374,27 @@ html-parse-stringify@^3.0.1:
dependencies:
void-elements "3.1.0"

http-proxy-middleware@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-3.0.3.tgz#dc1313c75bd00d81e103823802551ee30130ebd1"
integrity sha512-usY0HG5nyDUwtqpiZdETNbmKtw3QQ1jwYFZ9wi5iHzX2BcILwQKtYDJPo7XHTsu5Z0B2Hj3W9NNnbd+AjFWjqg==
dependencies:
"@types/http-proxy" "^1.17.15"
debug "^4.3.6"
http-proxy "^1.18.1"
is-glob "^4.0.3"
is-plain-object "^5.0.0"
micromatch "^4.0.8"

http-proxy@^1.18.1:
version "1.18.1"
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549"
integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==
dependencies:
eventemitter3 "^4.0.0"
follow-redirects "^1.0.0"
requires-port "^1.0.0"

i18next-http-backend@^2.6.1:
version "2.6.2"
resolved "https://registry.yarnpkg.com/i18next-http-backend/-/i18next-http-backend-2.6.2.tgz#b25516446ae6f251ce8231e70e6ffbca833d46a5"
Expand Down Expand Up @@ -2428,6 +2468,11 @@ is-number@^7.0.0:
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==

is-plain-object@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==

isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
Expand Down Expand Up @@ -2587,7 +2632,7 @@ merge2@^1.3.0:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==

micromatch@^4.0.4:
micromatch@^4.0.4, micromatch@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
Expand Down Expand Up @@ -2956,6 +3001,11 @@ require-from-string@^2.0.2:
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==

requires-port@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==

reselect@^5.1.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.1.1.tgz#c766b1eb5d558291e5e550298adb0becc24bb72e"
Expand Down Expand Up @@ -3216,6 +3266,11 @@ typescript@^5.5.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b"
integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==

undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==

update-browserslist-db@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5"
Expand Down

0 comments on commit 470d35d

Please sign in to comment.