This commit is contained in:
Pradeeppon01 2024-11-30 18:43:01 +05:30
parent 01234e9295
commit cbcbf33228
22 changed files with 1687 additions and 179 deletions

563
package-lock.json generated
View File

@ -10,6 +10,7 @@
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@material-ui/core": "^4.12.4",
"@mui/icons-material": "^5.15.18",
"@mui/material": "^5.15.18",
"antd": "^5.17.3",
@ -18,6 +19,8 @@
"html5-qrcode": "^2.1.5",
"react": "^18.3.1",
"react-bootstrap": "^2.10.2",
"react-csv-reader": "^4.0.0",
"react-csv-viewer": "^1.0.4",
"react-dom": "^18.3.1",
"react-lazy-load-image-component": "^1.6.0",
"react-medium-image-zoom": "^5.2.4",
@ -1191,6 +1194,168 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@material-ui/core": {
"version": "4.12.4",
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.4.tgz",
"integrity": "sha512-tr7xekNlM9LjA6pagJmL8QCgZXaubWUwkJnoYcMKd4gw/t4XiyvnTkjdGrUVicyB2BsdaAv1tvow45bPM4sSwQ==",
"deprecated": "Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@material-ui/styles": "^4.11.5",
"@material-ui/system": "^4.12.2",
"@material-ui/types": "5.1.0",
"@material-ui/utils": "^4.11.3",
"@types/react-transition-group": "^4.2.0",
"clsx": "^1.0.4",
"hoist-non-react-statics": "^3.3.2",
"popper.js": "1.16.1-lts",
"prop-types": "^15.7.2",
"react-is": "^16.8.0 || ^17.0.0",
"react-transition-group": "^4.4.0"
},
"engines": {
"node": ">=8.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/material-ui"
},
"peerDependencies": {
"@types/react": "^16.8.6 || ^17.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@material-ui/core/node_modules/clsx": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
"engines": {
"node": ">=6"
}
},
"node_modules/@material-ui/styles": {
"version": "4.11.5",
"resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.5.tgz",
"integrity": "sha512-o/41ot5JJiUsIETME9wVLAJrmIWL3j0R0Bj2kCOLbSfqEkKf0fmaPt+5vtblUh5eXr2S+J/8J3DaCb10+CzPGA==",
"deprecated": "Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@emotion/hash": "^0.8.0",
"@material-ui/types": "5.1.0",
"@material-ui/utils": "^4.11.3",
"clsx": "^1.0.4",
"csstype": "^2.5.2",
"hoist-non-react-statics": "^3.3.2",
"jss": "^10.5.1",
"jss-plugin-camel-case": "^10.5.1",
"jss-plugin-default-unit": "^10.5.1",
"jss-plugin-global": "^10.5.1",
"jss-plugin-nested": "^10.5.1",
"jss-plugin-props-sort": "^10.5.1",
"jss-plugin-rule-value-function": "^10.5.1",
"jss-plugin-vendor-prefixer": "^10.5.1",
"prop-types": "^15.7.2"
},
"engines": {
"node": ">=8.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/material-ui"
},
"peerDependencies": {
"@types/react": "^16.8.6 || ^17.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@material-ui/styles/node_modules/clsx": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
"engines": {
"node": ">=6"
}
},
"node_modules/@material-ui/styles/node_modules/csstype": {
"version": "2.6.21",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz",
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
},
"node_modules/@material-ui/system": {
"version": "4.12.2",
"resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.12.2.tgz",
"integrity": "sha512-6CSKu2MtmiJgcCGf6nBQpM8fLkuB9F55EKfbdTC80NND5wpTmKzwdhLYLH3zL4cLlK0gVaaltW7/wMuyTnN0Lw==",
"dependencies": {
"@babel/runtime": "^7.4.4",
"@material-ui/utils": "^4.11.3",
"csstype": "^2.5.2",
"prop-types": "^15.7.2"
},
"engines": {
"node": ">=8.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/material-ui"
},
"peerDependencies": {
"@types/react": "^16.8.6 || ^17.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@material-ui/system/node_modules/csstype": {
"version": "2.6.21",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz",
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
},
"node_modules/@material-ui/types": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz",
"integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==",
"peerDependencies": {
"@types/react": "*"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@material-ui/utils": {
"version": "4.11.3",
"resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.3.tgz",
"integrity": "sha512-ZuQPV4rBK/V1j2dIkSSEcH5uT6AaHuKWFfotADHsC0wVL1NLd2WkFCm4ZZbX33iO4ydl6V0GPngKm8HZQ2oujg==",
"dependencies": {
"@babel/runtime": "^7.4.4",
"prop-types": "^15.7.2",
"react-is": "^16.8.0 || ^17.0.0"
},
"engines": {
"node": ">=8.0.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
}
},
"node_modules/@mui/base": {
"version": "5.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz",
@ -2554,6 +2719,15 @@
"node": ">= 8"
}
},
"node_modules/css-vendor": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz",
"integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==",
"dependencies": {
"@babel/runtime": "^7.8.3",
"is-in-browser": "^1.0.2"
}
},
"node_modules/csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
@ -3600,6 +3774,11 @@
"resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.1.5.tgz",
"integrity": "sha512-3cOA0lPIcKtMd7Sz9BZm5ERAokv5uj35zT3o59LMVF6wLesYJ4WZaD28Z0OPnsfxe4dHGFgZ3RZ1si8f2AfOGw=="
},
"node_modules/hyphenate-style-name": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz",
"integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw=="
},
"node_modules/ignore": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
@ -3837,6 +4016,11 @@
"node": ">=0.10.0"
}
},
"node_modules/is-in-browser": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz",
"integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g=="
},
"node_modules/is-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
@ -4110,6 +4294,88 @@
"node": ">=6"
}
},
"node_modules/jss": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz",
"integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"csstype": "^3.0.2",
"is-in-browser": "^1.1.3",
"tiny-warning": "^1.0.2"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/jss"
}
},
"node_modules/jss-plugin-camel-case": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz",
"integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"hyphenate-style-name": "^1.0.3",
"jss": "10.10.0"
}
},
"node_modules/jss-plugin-default-unit": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.10.0.tgz",
"integrity": "sha512-SvpajxIECi4JDUbGLefvNckmI+c2VWmP43qnEy/0eiwzRUsafg5DVSIWSzZe4d2vFX1u9nRDP46WCFV/PXVBGQ==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0"
}
},
"node_modules/jss-plugin-global": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz",
"integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0"
}
},
"node_modules/jss-plugin-nested": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.10.0.tgz",
"integrity": "sha512-9R4JHxxGgiZhurDo3q7LdIiDEgtA1bTGzAbhSPyIOWb7ZubrjQe8acwhEQ6OEKydzpl8XHMtTnEwHXCARLYqYA==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0",
"tiny-warning": "^1.0.2"
}
},
"node_modules/jss-plugin-props-sort": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.10.0.tgz",
"integrity": "sha512-5VNJvQJbnq/vRfje6uZLe/FyaOpzP/IH1LP+0fr88QamVrGJa0hpRRyAa0ea4U/3LcorJfBFVyC4yN2QC73lJg==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0"
}
},
"node_modules/jss-plugin-rule-value-function": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.10.0.tgz",
"integrity": "sha512-uEFJFgaCtkXeIPgki8ICw3Y7VMkL9GEan6SqmT9tqpwM+/t+hxfMUdU4wQ0MtOiMNWhwnckBV0IebrKcZM9C0g==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0",
"tiny-warning": "^1.0.2"
}
},
"node_modules/jss-plugin-vendor-prefixer": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.10.0.tgz",
"integrity": "sha512-UY/41WumgjW8r1qMCO8l1ARg7NHnfRVWRhZ2E2m0DMYsr2DD91qIXLyNhiX83hHswR7Wm4D+oDYNC1zWCJWtqg==",
"dependencies": {
"@babel/runtime": "^7.3.1",
"css-vendor": "^2.0.8",
"jss": "10.10.0"
}
},
"node_modules/jsx-ast-utils": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
@ -4417,6 +4683,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/papaparse": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz",
"integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw=="
},
"node_modules/parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@ -4490,6 +4761,11 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew=="
},
"node_modules/popper.js": {
"version": "1.16.1-lts",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz",
"integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA=="
},
"node_modules/possible-typed-array-names": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz",
@ -5212,6 +5488,37 @@
}
}
},
"node_modules/react-csv-reader": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/react-csv-reader/-/react-csv-reader-4.0.0.tgz",
"integrity": "sha512-NRo27kv1YWYAJAR3H5ZZ5KREEw35avUtdGr4DwYel87QN3rwJf2wdAw97swNDO3cTW2i3cuXSNjfPqVIJm5xOg==",
"dependencies": {
"papaparse": "^5.3.0"
},
"peerDependencies": {
"prop-types": "^15.7.2",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/react-csv-viewer": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/react-csv-viewer/-/react-csv-viewer-1.0.4.tgz",
"integrity": "sha512-aA6WPI+AuEoLCFYiaeaBGavrl+CDmrBkCVcRhgyZySIp2n9Xlgga/b613CUphOBK27mNmgnnj7fiYS+FD1RzLw==",
"dependencies": {
"papaparse": "4.6.3",
"react-table": "6.9.2"
},
"peerDependencies": {
"react": "^16.8.2",
"react-dom": "^16.8.2"
}
},
"node_modules/react-csv-viewer/node_modules/papaparse": {
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-4.6.3.tgz",
"integrity": "sha512-LRq7BrHC2kHPBYSD50aKuw/B/dGcg29omyJbKWY3KsYUZU69RKwaBHu13jGmCYBtOc4odsLCrFyk6imfyNubJQ=="
},
"node_modules/react-dom": {
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
@ -5386,6 +5693,19 @@
"react-dom": ">=16.8"
}
},
"node_modules/react-table": {
"version": "6.9.2",
"resolved": "https://registry.npmjs.org/react-table/-/react-table-6.9.2.tgz",
"integrity": "sha512-sTbNHU8Um0xRtmCd1js873HXnXaMWeBwZoiljuj0l1d44eaqjKyYPK/3HCBbJg1yeE2O5pQJ3Km0tlm9niNL9w==",
"dependencies": {
"classnames": "^2.2.5"
},
"peerDependencies": {
"prop-types": "^15.5.0",
"react": "^15.x.x || ^16.x.x",
"react-dom": "^15.x.x || ^16.x.x"
}
},
"node_modules/react-toastify": {
"version": "10.0.5",
"resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.5.tgz",
@ -5891,6 +6211,11 @@
"node": ">=12.22"
}
},
"node_modules/tiny-warning": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
},
"node_modules/to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@ -7054,6 +7379,100 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"@material-ui/core": {
"version": "4.12.4",
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.4.tgz",
"integrity": "sha512-tr7xekNlM9LjA6pagJmL8QCgZXaubWUwkJnoYcMKd4gw/t4XiyvnTkjdGrUVicyB2BsdaAv1tvow45bPM4sSwQ==",
"requires": {
"@babel/runtime": "^7.4.4",
"@material-ui/styles": "^4.11.5",
"@material-ui/system": "^4.12.2",
"@material-ui/types": "5.1.0",
"@material-ui/utils": "^4.11.3",
"@types/react-transition-group": "^4.2.0",
"clsx": "^1.0.4",
"hoist-non-react-statics": "^3.3.2",
"popper.js": "1.16.1-lts",
"prop-types": "^15.7.2",
"react-is": "^16.8.0 || ^17.0.0",
"react-transition-group": "^4.4.0"
},
"dependencies": {
"clsx": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="
}
}
},
"@material-ui/styles": {
"version": "4.11.5",
"resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.5.tgz",
"integrity": "sha512-o/41ot5JJiUsIETME9wVLAJrmIWL3j0R0Bj2kCOLbSfqEkKf0fmaPt+5vtblUh5eXr2S+J/8J3DaCb10+CzPGA==",
"requires": {
"@babel/runtime": "^7.4.4",
"@emotion/hash": "^0.8.0",
"@material-ui/types": "5.1.0",
"@material-ui/utils": "^4.11.3",
"clsx": "^1.0.4",
"csstype": "^2.5.2",
"hoist-non-react-statics": "^3.3.2",
"jss": "^10.5.1",
"jss-plugin-camel-case": "^10.5.1",
"jss-plugin-default-unit": "^10.5.1",
"jss-plugin-global": "^10.5.1",
"jss-plugin-nested": "^10.5.1",
"jss-plugin-props-sort": "^10.5.1",
"jss-plugin-rule-value-function": "^10.5.1",
"jss-plugin-vendor-prefixer": "^10.5.1",
"prop-types": "^15.7.2"
},
"dependencies": {
"clsx": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="
},
"csstype": {
"version": "2.6.21",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz",
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
}
}
},
"@material-ui/system": {
"version": "4.12.2",
"resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.12.2.tgz",
"integrity": "sha512-6CSKu2MtmiJgcCGf6nBQpM8fLkuB9F55EKfbdTC80NND5wpTmKzwdhLYLH3zL4cLlK0gVaaltW7/wMuyTnN0Lw==",
"requires": {
"@babel/runtime": "^7.4.4",
"@material-ui/utils": "^4.11.3",
"csstype": "^2.5.2",
"prop-types": "^15.7.2"
},
"dependencies": {
"csstype": {
"version": "2.6.21",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz",
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
}
}
},
"@material-ui/types": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz",
"integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A=="
},
"@material-ui/utils": {
"version": "4.11.3",
"resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.3.tgz",
"integrity": "sha512-ZuQPV4rBK/V1j2dIkSSEcH5uT6AaHuKWFfotADHsC0wVL1NLd2WkFCm4ZZbX33iO4ydl6V0GPngKm8HZQ2oujg==",
"requires": {
"@babel/runtime": "^7.4.4",
"prop-types": "^15.7.2",
"react-is": "^16.8.0 || ^17.0.0"
}
},
"@mui/base": {
"version": "5.0.0-beta.40",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz",
@ -7950,6 +8369,15 @@
"which": "^2.0.1"
}
},
"css-vendor": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz",
"integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==",
"requires": {
"@babel/runtime": "^7.8.3",
"is-in-browser": "^1.0.2"
}
},
"csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
@ -8722,6 +9150,11 @@
"resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.1.5.tgz",
"integrity": "sha512-3cOA0lPIcKtMd7Sz9BZm5ERAokv5uj35zT3o59LMVF6wLesYJ4WZaD28Z0OPnsfxe4dHGFgZ3RZ1si8f2AfOGw=="
},
"hyphenate-style-name": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz",
"integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw=="
},
"ignore": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
@ -8886,6 +9319,11 @@
"is-extglob": "^2.1.1"
}
},
"is-in-browser": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz",
"integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g=="
},
"is-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
@ -9072,6 +9510,84 @@
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true
},
"jss": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz",
"integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==",
"requires": {
"@babel/runtime": "^7.3.1",
"csstype": "^3.0.2",
"is-in-browser": "^1.1.3",
"tiny-warning": "^1.0.2"
}
},
"jss-plugin-camel-case": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz",
"integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==",
"requires": {
"@babel/runtime": "^7.3.1",
"hyphenate-style-name": "^1.0.3",
"jss": "10.10.0"
}
},
"jss-plugin-default-unit": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.10.0.tgz",
"integrity": "sha512-SvpajxIECi4JDUbGLefvNckmI+c2VWmP43qnEy/0eiwzRUsafg5DVSIWSzZe4d2vFX1u9nRDP46WCFV/PXVBGQ==",
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0"
}
},
"jss-plugin-global": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz",
"integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==",
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0"
}
},
"jss-plugin-nested": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.10.0.tgz",
"integrity": "sha512-9R4JHxxGgiZhurDo3q7LdIiDEgtA1bTGzAbhSPyIOWb7ZubrjQe8acwhEQ6OEKydzpl8XHMtTnEwHXCARLYqYA==",
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0",
"tiny-warning": "^1.0.2"
}
},
"jss-plugin-props-sort": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.10.0.tgz",
"integrity": "sha512-5VNJvQJbnq/vRfje6uZLe/FyaOpzP/IH1LP+0fr88QamVrGJa0hpRRyAa0ea4U/3LcorJfBFVyC4yN2QC73lJg==",
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0"
}
},
"jss-plugin-rule-value-function": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.10.0.tgz",
"integrity": "sha512-uEFJFgaCtkXeIPgki8ICw3Y7VMkL9GEan6SqmT9tqpwM+/t+hxfMUdU4wQ0MtOiMNWhwnckBV0IebrKcZM9C0g==",
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.10.0",
"tiny-warning": "^1.0.2"
}
},
"jss-plugin-vendor-prefixer": {
"version": "10.10.0",
"resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.10.0.tgz",
"integrity": "sha512-UY/41WumgjW8r1qMCO8l1ARg7NHnfRVWRhZ2E2m0DMYsr2DD91qIXLyNhiX83hHswR7Wm4D+oDYNC1zWCJWtqg==",
"requires": {
"@babel/runtime": "^7.3.1",
"css-vendor": "^2.0.8",
"jss": "10.10.0"
}
},
"jsx-ast-utils": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
@ -9298,6 +9814,11 @@
"p-limit": "^3.0.2"
}
},
"papaparse": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz",
"integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw=="
},
"parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@ -9350,6 +9871,11 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew=="
},
"popper.js": {
"version": "1.16.1-lts",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz",
"integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA=="
},
"possible-typed-array-names": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz",
@ -9828,6 +10354,30 @@
"warning": "^4.0.3"
}
},
"react-csv-reader": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/react-csv-reader/-/react-csv-reader-4.0.0.tgz",
"integrity": "sha512-NRo27kv1YWYAJAR3H5ZZ5KREEw35avUtdGr4DwYel87QN3rwJf2wdAw97swNDO3cTW2i3cuXSNjfPqVIJm5xOg==",
"requires": {
"papaparse": "^5.3.0"
}
},
"react-csv-viewer": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/react-csv-viewer/-/react-csv-viewer-1.0.4.tgz",
"integrity": "sha512-aA6WPI+AuEoLCFYiaeaBGavrl+CDmrBkCVcRhgyZySIp2n9Xlgga/b613CUphOBK27mNmgnnj7fiYS+FD1RzLw==",
"requires": {
"papaparse": "4.6.3",
"react-table": "6.9.2"
},
"dependencies": {
"papaparse": {
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-4.6.3.tgz",
"integrity": "sha512-LRq7BrHC2kHPBYSD50aKuw/B/dGcg29omyJbKWY3KsYUZU69RKwaBHu13jGmCYBtOc4odsLCrFyk6imfyNubJQ=="
}
}
},
"react-dom": {
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
@ -9943,6 +10493,14 @@
"react-router": "6.23.1"
}
},
"react-table": {
"version": "6.9.2",
"resolved": "https://registry.npmjs.org/react-table/-/react-table-6.9.2.tgz",
"integrity": "sha512-sTbNHU8Um0xRtmCd1js873HXnXaMWeBwZoiljuj0l1d44eaqjKyYPK/3HCBbJg1yeE2O5pQJ3Km0tlm9niNL9w==",
"requires": {
"classnames": "^2.2.5"
}
},
"react-toastify": {
"version": "10.0.5",
"resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.5.tgz",
@ -10292,6 +10850,11 @@
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-5.0.0.tgz",
"integrity": "sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg=="
},
"tiny-warning": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
},
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",

View File

@ -12,6 +12,7 @@
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@material-ui/core": "^4.12.4",
"@mui/icons-material": "^5.15.18",
"@mui/material": "^5.15.18",
"antd": "^5.17.3",
@ -20,6 +21,8 @@
"html5-qrcode": "^2.1.5",
"react": "^18.3.1",
"react-bootstrap": "^2.10.2",
"react-csv-reader": "^4.0.0",
"react-csv-viewer": "^1.0.4",
"react-dom": "^18.3.1",
"react-lazy-load-image-component": "^1.6.0",
"react-medium-image-zoom": "^5.2.4",

View File

@ -34,6 +34,11 @@ import IndividualStudAttendence from "./Components/IndividualStudAttendence";
import PendingAttendenceCorrection from "./Components/PendingAttendenceCorrection";
import QrcodeFinder from "./Components/QrcodeFinder";
import IndividualMarksheetGen from "./Components/IndividualMarksheetGen";
import UploadMarksheetDataContainer from "./Components/UploadMarksheetDataContainer";
import DataInsertion from "./Components/DataInsertion";
import DataInsertionCsvViewer from "./Components/DataInsertionCsvViewer";
import Login from "./Components/Login";
import HomeSections from "./Components/HomeSections";
function App() {
return (
@ -41,87 +46,100 @@ function App() {
<BrowserRouter>
<Routes>
<Route path="/" element={<Home />}></Route>
<Route path="/sqlPlayground" element={<QueryExecutor />}></Route>
<Route path="/certificate/gen/individual" element={<IndividualMarksheetGen/>}></Route>
<Route path="/sections/:year/sqlPlayground" element={<QueryExecutor />}></Route>
<Route path="/sections/:year/data/insertion" element={<DataInsertion />}></Route>
<Route path="/sections/:year" element={<HomeSections/>}></Route>
<Route
path="/sqlPlayground/edit"
path="/sections/:year/data/insertion/validation"
element={<DataInsertionCsvViewer />}
></Route>
<Route
path="/sections/:year/certificate/gen"
element={<IndividualMarksheetGen />}
></Route>
<Route
path="/sections/:year/certificate/gen/upload"
element={<UploadMarksheetDataContainer />}
></Route>
<Route
path="/sections/:year/sqlPlayground/edit"
element={<QueryCardEditor />}
></Route>
<Route path="/evQrcode/edit" element={<QrcodeCardEditor />}></Route>
<Route path="/sections/:year/evQrcode/edit" element={<QrcodeCardEditor />}></Route>
<Route
path="/studentsDetails"
path="/sections/:year/studentsDetails"
element={<StudentResultsData />}
></Route>
<Route path="/Playgrounds" element={<PlayGrounds />}></Route>
<Route path="/Playground/:type" element={<PlayGround />}></Route>
<Route path="/revaluation" element={<Revaluation />}></Route>
<Route path="/sections/:year/Playgrounds" element={<PlayGrounds />}></Route>
<Route path="/sections/:year/Playground/:type" element={<PlayGround />}></Route>
<Route path="/sections/:year/revaluation" element={<Revaluation />}></Route>
<Route
path="/playground/updated/:type"
path="/sections/:year/playground/updated/:type"
element={<PlayGroundUpdated />}
></Route>
<Route
path="/anomoly/attendence/reassigned"
path="/sections/:year/anomoly/attendence/reassigned"
element={<AnomolyReassigned />}
></Route>
<Route
path="/anomoly/attendence/pending_stud_check"
path="/sections/:year/anomoly/attendence/pending_stud_check"
element={<PendingAttendenceCorrection />}
/>
<Route
path="/DummyDuplicates/:type"
path="/sections/:year/DummyDuplicates/:type"
element={<DummyDuplicates />}
></Route>
<Route
path="/sqlPlayground/Editor"
path="/sections/:year/sqlPlayground/Editor"
element={<RecordEditor />}
></Route>
<Route
path="/anomoly/attendence/stud_check"
path="/sections/:year/anomoly/attendence/stud_check"
element={<IndividualStudAttendence />}
></Route>
<Route
path="/anomoly/attendence/additionalSheet"
path="/sections/:year/anomoly/attendence/additionalSheet"
element={<AttendanceAdditionalSheet />}
></Route>
<Route path="/barcodeScanner" element={<BarcodeScanner />}></Route>
<Route path="/sections/:year/barcodeScanner" element={<BarcodeScanner />}></Route>
<Route
path="/anomoly/reassigned/booklet"
path="/sections/:year/anomoly/reassigned/booklet"
element={<AttendenceCorrection />}
></Route>
<Route
path="/anomoly/reassigned/stats"
path="/sections/:year/anomoly/reassigned/stats"
element={<ReassignedStats />}
></Route>
<Route
path="/anomoly/attendence"
path="/sections/:year/anomoly/attendence"
element={<AnomolyAttendencePage />}
></Route>
<Route path ="/qrcodeFinder" element={<QrcodeFinder/>}></Route>
<Route path="/sections/:year/qrcodeFinder" element={<QrcodeFinder />}></Route>
<Route
path="/anomoly/attendence/additionalRecord"
path="/sections/:year/anomoly/attendence/additionalRecord"
element={<AttendenceAdditionalRecord />}
/>
<Route
path="/anomoly/attendence/additionalRecord/correction"
path="/sections/:year/anomoly/attendence/additionalRecord/correction"
element={<AttendenceAdditionalRecordCorrection />}
/>
<Route
path="/anomoly/reassigned/stats/:exam_centre_code"
path="/sections/:year/anomoly/reassigned/stats/:exam_centre_code"
element={<IndividualExamCentreStats />}
></Route>
<Route path="/anomoly/PartA" element={<PartAReassigned />}></Route>
<Route path="/sections/:year/anomoly/PartA" element={<PartAReassigned />}></Route>
{/* <Route
path="/verification"
element={<Verification/>}
>
</Route> */}
<Route path="/statistics" element={<Statistics />}></Route>
<Route path="/sections/:year/statistics" element={<Statistics />}></Route>
<Route
path="/anomoly/partA/booklet"
path="/sections/:year/anomoly/partA/booklet"
element={<PartACorrection />}
></Route>
<Route path="/anomoly/partC" element={<AnomolyPartC />}></Route>
<Route path="/evQrcode" element={<EvQrcode />}></Route>
<Route path="/sections/:year/anomoly/partC" element={<AnomolyPartC />}></Route>
<Route path="/sections/:year/evQrcode" element={<EvQrcode />}></Route>
</Routes>
</BrowserRouter>
</>

View File

@ -96,7 +96,7 @@ const AntdesignLayout = ({ children }) => {
<Button
className="bg-primary rounded-circle p-3"
onClick={() => {
window.scrollTo(0, 0);
document.getElementById("text-area-input").scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" })
}}
>
<ArrowUpwardIcon className="text-white" />

View File

@ -26,11 +26,15 @@ const CustomQueryExecutorCard = ({
degreeType,
type,
tableName,
year
}) => {
// console.log("ERROR ============= ",error)
// console.log("ERROR REASON ============== ",error_reason)
// console.log("REDUX SYSTEM NO ================== ",reduxSystemNo)
const navigate = useNavigate();
console.log("year in custom query executer card ====== ",year)
const imageDomain = (year === "april2024" ? "https://docs.exampaper.vidh.ai" : (year === "november2024" ? 'https://images.exampaper.usln.in' : 'https://docs.exampaper.vidh.ai'))
console.log('imageDomain ===== ',imageDomain)
const [dataValue, setDataValue] = useState({});
const [isLoading, setIsLoading] = useState(false);
// console.log("data in query executor Card : ", data);
@ -164,6 +168,7 @@ const CustomQueryExecutorCard = ({
console.log("update front");
const payload = {
data,
year
};
try {
setIsLoading(true);
@ -198,6 +203,7 @@ const CustomQueryExecutorCard = ({
const updateBack = async () => {
const payload = {
data,
year
};
try {
setIsLoading(true);
@ -253,6 +259,7 @@ const CustomQueryExecutorCard = ({
const updateEvCover = async () => {
const payload = {
data,
year
};
try {
setIsLoading(true);
@ -285,6 +292,7 @@ const CustomQueryExecutorCard = ({
const markAsPart_A = async () => {
const payload = {
data,
year
};
try {
setIsLoading(true);
@ -317,6 +325,7 @@ const CustomQueryExecutorCard = ({
const markAsDummy = async () => {
const payload = {
data,
year
};
try {
setIsLoading(true);
@ -515,7 +524,7 @@ const CustomQueryExecutorCard = ({
</Box>
<Box className="border border-dark" id={imageName}>
<img
src={`https://docs.exampaper.vidh.ai/${data[s3_image_column]}`}
src={`${imageDomain}/${data[s3_image_column]}`}
width="800px"
height="auto"
alt="Image Alt"
@ -580,6 +589,8 @@ const CustomQueryExecutorCard = ({
{showEditContainer && (
<PlayGroundEditContainer
type={type}
year = {year}
imageDomain = {imageDomain}
rotateAngle={rotateAngle}
data={data}
s3Path={data[s3_image_column]}

View File

@ -0,0 +1,323 @@
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { Box, Button } from "@mui/material";
import AntdesignLayout from "./AntdesignLayout";
import LoadingContainer from "./LoadingContainer";
import infinity_loader from "../../assets/Infinity_loader.gif";
import Notification from "./Notification"; // Import the Notification componentimport InputLabel from '@mui/material/InputLabel';
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
import InputLabel from "@mui/material/InputLabel";
import TextField from "@material-ui/core/TextField";
import CsvViewer from "react-csv-viewer";
import csvData from "/home/neuu/attendence_UI/backend/tmp/UG PENDING 17-09-2024.csv";
import {
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
Paper,
} from "@mui/material";
const DataInsertion = () => {
const [isLoading, setIsLoading] = useState(null);
const [notification, setNotification] = useState(null);
const [degreeType, setDegreeType] = useState(null);
const [file, setFile] = React.useState(null);
const [wrongData, setWrongData] = useState({});
const [processList, setProcesList] = useState([]);
const handleFileChange = (event) => {
setFile(event.target.files[0]);
};
useEffect(() => {
fetchProcessList();
}, []);
const fetchProcessList = async () => {
setIsLoading(true)
try {
const response = await fetch(
`${
import.meta.env.VITE_REACT_APP_BACKEND_URL
}/fetchcsvDataValidationList`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
}
);
const responseData = await response.json();
console.log("Response ==== ", responseData);
if (responseData?.status == "success") {
setProcesList(responseData?.data);
}
} catch (error) {
console.log(error);
}
setIsLoading(false)
};
const parseCreatedOn = (dateValue) => {
console.log("parse created on ....", typeof dateValue);
if (!dateValue) {
return null; // Handle invalid input
} else if (typeof dateValue == "number") {
dateValue = String(dateValue);
}
const year = parseInt(dateValue.substring(0, 4), 10);
console.log("year ===== ", year);
const month = parseInt(dateValue.substring(4, 6), 10) - 1; // Month is 0-based in JS
const day = parseInt(dateValue.substring(6, 8), 10);
const hours = parseInt(dateValue.substring(8, 10), 10);
const minutes = parseInt(dateValue.substring(10, 12), 10);
const seconds = parseInt(dateValue.substring(12, 14), 10);
const parsedDate = new Date(year, month, day, hours, minutes, seconds);
// Check if the date is valid
if (isNaN(parsedDate.getTime())) {
return null; // Invalid date
}
return parsedDate;
};
useEffect(() => {
setWrongData({
subject_data: [
{ column_index: 2, row_index: 74, wrong_data: "CYOG31" },
{ column_index: 2, row_index: 75, wrong_data: "CMPE11" },
{ column_index: 2, row_index: 76, wrong_data: "S2EN31" },
{ column_index: 2, row_index: 222, wrong_data: "CABA31" },
],
});
}, []);
const showStyle = () => {
if (wrongData) {
const subject_data = [
{ column_index: 2, row_index: 74, wrong_data: "CYOG31" },
{ column_index: 2, row_index: 75, wrong_data: "CMPE11" },
{ column_index: 2, row_index: 76, wrong_data: "S2EN31" },
{ column_index: 2, row_index: 222, wrong_data: "CABA31" },
];
console.log("Subject data ==== ", subject_data);
console.log("wrong data ===== ", wrongData);
for (const data of subject_data) {
// row_index and column_index to identify the cell
const { column_index, row_index } = data;
// Use document.querySelector to target the specific cell
// Assuming the table rows are in order, and each cell has the class 'rt-td'
const querySelectorClass = `.rt-tr-group:nth-child(${
row_index - 1
}) .rt-td:nth-child(${column_index + 1})`;
console.log("query selector classs ==== ", querySelectorClass);
const cell = document.querySelector(querySelectorClass);
console.log("cell ====== ", cell);
// Apply red color if the cell exists
if (cell) {
cell.style.backgroundColor = "red";
cell.style.color = "white";
}
}
}
};
const handleSubmit = async (event) => {
event.preventDefault(); // Prevent the default form submission
if (file) {
setIsLoading(true);
let formData = new FormData();
formData.append("file", file); // Append the file
formData.append("degreeType", degreeType); // Append additional data
// Correct usage of fetch with 'body'
const response = await fetch(
`${import.meta.env.VITE_REACT_APP_BACKEND_URL}/validate/insertionData`,
{
method: "POST",
body: formData, // Use 'body' instead of 'data'
}
);
// Check if the response is ok
if (response.ok) {
const responseData = await response.json();
console.log("Response Data: ", responseData);
if (responseData?.status === "success") {
showNotification("File Added To Queue Successfully...", "success");
fetchProcessList();
} else {
showNotification("Something Went Wrong ...", "error");
}
} else {
console.error("Error in response: ", response.statusText);
}
setIsLoading(false);
} else {
setIsLoading(false);
console.log("No file selected");
}
};
const showNotification = (message, type) => {
setNotification({ message, type });
};
const [age, setAge] = React.useState("");
const handleChange = (event) => {
setDegreeType(event.target.value);
};
return (
<AntdesignLayout>
<Box className="d-flex justify-content-between flex-row gap-5 p-5 align-items-start w-100">
<Box>
<Box>
<FormControl fullWidth>
<InputLabel id="demo-simple-select-label">Degree Type</InputLabel>
<Select
labelId="demo-simple-select-label"
id="demo-simple-select"
value={degreeType}
className="bg-white"
label="Degree Type"
onChange={handleChange}
>
<MenuItem value={10}>UG</MenuItem>
<MenuItem value={20}>PG</MenuItem>
<MenuItem value={30}>UNIVERSITY</MenuItem>
<MenuItem value={30}>SUPLLEMENTRY</MenuItem>
<MenuItem value={30}>PHD</MenuItem>
</Select>
</FormControl>
</Box>
<Box>
<form onSubmit={handleSubmit}>
<TextField
type="file" // Set type to "file"
inputProps={{ accept: ".csv" }} // Accept specific file types
onChange={handleFileChange} // Handle file change
fullWidth // Make the input full width
margin="normal" // Set margin for spacing
variant="outlined" // Choose the variant (outlined, filled, standard)
/>
<Button
type="submit"
variant="contained"
color="primary"
className="w-100"
style={{ marginTop: "16px" }} // Optional: add some margin
>
validate
</Button>
</form>
</Box>
</Box>
<Box style={{ width: "70%", margin: "auto", textAlign: "center" }}>
{processList.length > 0 && (
<>
<Box className="pb-3">
<h5>
<strong>Validation Process List:</strong>
</h5>
</Box>
<TableContainer component={Paper}>
<Table>
<TableHead>
<TableRow>
<TableCell>
<strong>ID</strong>
</TableCell>
<TableCell>
<strong>File Name</strong>
</TableCell>
<TableCell>
<strong>Status</strong>
</TableCell>
<TableCell>
<strong>Created on</strong>
</TableCell>
<TableCell>
<strong>Validation Status</strong>
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{processList.map((processData) => (
<TableRow key={processData.job_vidh_ms_solutions_id}>
<TableCell>
{processData?.validation_status === "FAILED" ? (
<a href={`/data/insertion/validation?id=${processData.job_vidh_ms_solutions_id}`}>
{processData?.job_vidh_ms_solutions_id}
</a>
) : (
processData?.job_vidh_ms_solutions_id
)}
</TableCell>
<TableCell>{processData?.file_name}</TableCell>
<TableCell style={{ textAlign: "center" }}>
<button
style={{
backgroundColor:
processData?.status_code === "JF"
? "red"
: "green",
color: "white",
borderRadius: "10px",
padding: "3px 10px",
}}
>
{processData?.status_code}
</button>
</TableCell>
<TableCell>
{processData?.created_on
? new Intl.DateTimeFormat("en-US", {
year: "numeric",
month: "long",
day: "numeric",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
}).format(parseCreatedOn(processData?.created_on))
: "N/A"}
</TableCell>
<TableCell>{processData?.validation_status}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
</>
)}
</Box>
</Box>
{isLoading && <LoadingContainer />}
{notification && (
<Notification
message={notification.message}
type={notification.type}
onClose={() => setNotification(null)}
/>
)}
</AntdesignLayout>
);
};
export default DataInsertion;

View File

@ -0,0 +1,35 @@
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { Box, Button } from "@mui/material";
import AntdesignLayout from "./AntdesignLayout";
import LoadingContainer from "./LoadingContainer";
import infinity_loader from "../../assets/Infinity_loader.gif";
import Notification from "./Notification"; // Import the Notification componentimport InputLabel from '@mui/material/InputLabel';
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
import InputLabel from "@mui/material/InputLabel";
import TextField from "@material-ui/core/TextField";
import CsvViewer from "react-csv-viewer";
import csvData from "/home/neuu/attendence_UI/backend/tmp/UG PENDING 17-09-2024.csv";
import {
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
Paper,
} from "@mui/material";
const DataInsertionCsvViewer = () => {
const [isLoading, setIsLoading] = useState(false);
return (
<AntdesignLayout>
<CsvViewer />
{isLoading && <LoadingContainer />}
</AntdesignLayout>
);
};
export default DataInsertionCsvViewer;

22
src/Components/Footer.jsx Normal file
View File

@ -0,0 +1,22 @@
import { Height } from "@mui/icons-material";
import { Box } from "@mui/material";
const Footer = () => {
const footerStyle = {
Height: "100px",
position: "absolute",
bottom: "0",
left: "0",
backgroundColor: "#defbef",
color: "black",
width: "100%",
padding: "20px",
};
return (
<Box style={footerStyle}>
<Box className="d-flex justify-content-center align-items-center gap-2"><span>©</span><span>exampaper.usln.in.</span></Box>
</Box>
);
};
export default Footer;

View File

@ -1,91 +1,36 @@
import { Box } from "@mui/material";
import HomepageCard from "./HomepageCard";
import {useState,useEffect} from "react"
import Notification from "./Notification";
import { useState, useEffect } from "react";
import Notification from "./Notification";
import Footer from "./Footer";
const Home = () => {
const cards = [
{
title:"Individual Student Marksheet Generation",
url:"/certificate/gen/individual"
title: "APRIL-2024 Examination",
url: "/sections/april2024",
},
{
title: "Reassigned Serial No Anomoly Manual Updation (ATTENDANCE)",
url: "/anomoly/attendence",
title: "NOVEMBER-2024 Examination",
url: "/sections/november2024",
},
// {
// title: "Part A OCR Anomoly - Batch 2022",
// url: "/anomoly/partA",
// },
{
title: "Part A OCR Anomoly Dummy",
url: "/anomoly/partA?type=new",
},
{
title: "Part A OCR Anomoly - Old Dummy",
url: "/anomoly/partA?type=old",
},
{
title: "Part C",
url: "/anomoly/partC",
},
// {
// title:"Verification",
// url:"/verification"
// }
{
title:"SQL Playground",
url:"/sqlPlayground"
},
{
title:"QR Code Finder",
url:"/qrcodeFinder"
},
{
title:"QR Code Scanner",
url:"/barcodeScanner"
},
{
title:"EV Qrcode",
url:"/evQrcode"
},
{
title:"PlayGrounds",
url:"/Playgrounds"
},
{
title:"Part-A Dummy Duplicates",
url:"/DummyDuplicates/PartA"
},
// {
// title:"Revaluation",
// url:"/revaluation"
// },
// {
// title:"Marks Verfication",
// url:"/part-c/marks/verify"
// }
];
// const cards = [
// {
// title: "Reassingned Serial No Anomoly Manual Updation",
// url: "/anomoly/reassigned",
// }]
return (
<>
<Box className="overflow-auto">
<Box className="d-flex justify-content-center text-light bg-primary rounded py-3">
<h1>Welcome to exampaper.vidh.ai</h1>
<h3>
<strong>MSU Software Solutions</strong>
</h3>
</Box>
<Box className="p-3" style={{width:'100%'}}>
<Box className="p-3" style={{ width: "100%" }}>
{cards.map((card) => (
<HomepageCard title={card?.title} url={card?.url} />
))}
</Box>
</Box>
<Footer/>
</>
);
};

View File

@ -0,0 +1,99 @@
import { Box } from "@mui/material";
import HomepageCard from "./HomepageCard";
import {useState,useEffect} from "react"
import Notification from "./Notification";
import { useParams } from 'react-router-dom';
const HomeSections = () => {
const { year } = useParams()
const cards = [
// {
// title:"Data Insertion",
// url:`/sections/${year}/data/insertion`
// },
// {
// title:"Certificate Generation",
// url:`/sections/${year}/certificate/gen`
// },
{
title: "Reassigned Serial No Anomoly Manual Updation (ATTENDANCE)",
url: `/sections/${year}/anomoly/attendence`,
},
// {
// title: "Part A OCR Anomoly - Batch 2022",
// url: "/anomoly/partA",
// },
{
title: "Part A OCR Anomoly Dummy",
url: `/sections/${year}/anomoly/partA?type=new`,
},
{
title: "Part A OCR Anomoly - Old Dummy",
url: `/sections/${year}/anomoly/partA?type=old`,
},
// {
// title: "Part C",
// url: `/sections/${year}/anomoly/partC`,
// },
// {
// title:"Verification",
// url:"/verification"
// }
{
title:"SQL Playground",
url:`/sections/${year}/sqlPlayground`
},
{
title:"QR Code Finder",
url:`/sections/${year}/qrcodeFinder`
},
// {
// title:"QR Code Scanner",
// url:`/sections/${year}/barcodeScanner`
// },
// {
// title:"EV Qrcode",
// url:`/sections/${year}/evQrcode`
// },
{
title:"PlayGrounds",
url:`/sections/${year}/Playgrounds`
},// {
// title:"Revaluation",
// url:"/revaluation"
// },
// {
// title:"Marks Verfication",
// url:"/part-c/marks/verify"
// }
// {
// title:"Part-A Dummy Duplicates",
// url:`/sections/${year}/DummyDuplicates/PartA`
// },
];
// const cards = [
// {
// title: "Reassingned Serial No Anomoly Manual Updation",
// url: "/anomoly/reassigned",
// }]
return (
<>
<Box className="overflow-auto">
<Box className="d-flex justify-content-center text-light bg-primary rounded py-3">
<h3><strong>MSU Software Solutions</strong></h3>
</Box>
<Box className="p-3" style={{width:'100%'}}>
{cards.map((card) => (
<HomepageCard title={card?.title} url={card?.url} />
))}
</Box>
</Box>
</>
);
};
export default HomeSections;

View File

@ -7,7 +7,8 @@ const HomepageCard = ({ title, url }) => {
return (
<Row
gutter={16}
className="p-2"
className="p-2 cursor-pointer"
style={{cursor:"pointer !important"}}
>
<Col span={24}>
<Card
@ -18,7 +19,7 @@ const HomepageCard = ({ title, url }) => {
bordered={true}
style={{with:'100%'}}
>
{title}
<strong>{title}</strong>
</Card>
</Col>
</Row>

View File

@ -1,4 +1,5 @@
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { Box, Button } from "@mui/material";
import AntdesignLayout from "./AntdesignLayout";
import LoadingContainer from "./LoadingContainer";
@ -7,8 +8,15 @@ import Notification from "./Notification"; // Import the Notification component
import { Height } from "@mui/icons-material";
import ZoomInIcon from "@mui/icons-material/ZoomIn";
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Paper } from '@mui/material';
import {
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
Paper,
} from "@mui/material";
const IndividualMarksheetGen = () => {
const [registerNumber, setRegisterNumber] = useState(null);
@ -21,19 +29,26 @@ const IndividualMarksheetGen = () => {
setNotification({ message, type });
};
const uploadDataStyleContainer = {
backgroundColor: "white",
borderRadius: "10px",
minWidth: "800px",
padding: "20px",
margin: "10px",
};
useEffect(() => {
fetchProcessList()
const fetchInterval = setInterval(() => {
// fetchProcessList();
fetchProcessList();
const fetchInterval = setInterval(() => {
fetchProcessList();
}, 20000);
return ()=>{
clearInterval(fetchInterval)
}
return () => {
clearInterval(fetchInterval);
};
}, []);
const fetchProcessList = async () => {
try {
setIsLoading(true);
const response = await fetch(
`${
import.meta.env.VITE_REACT_APP_BACKEND_URL
@ -48,12 +63,10 @@ const IndividualMarksheetGen = () => {
const responseData = await response.json();
console.log("Response ==== ", responseData);
setIsLoading(false);
if (responseData?.status == "success") {
setProcesList(responseData?.data);
}
} catch (error) {
setIsLoading(false);
console.log(error);
}
};
@ -86,7 +99,7 @@ const IndividualMarksheetGen = () => {
setIsLoading(false);
if (responseData?.status == "success") {
showNotification("Process Started ...", "success");
fetchProcessList()
fetchProcessList();
} else if (responseData?.status == "failed") {
showNotification("Something went wrong ...", "error");
} else if (responseData?.status == "invalid") {
@ -98,6 +111,32 @@ const IndividualMarksheetGen = () => {
}
};
const parseCreatedOn = (dateValue) => {
console.log("parse created on ....", typeof dateValue);
if (!dateValue) {
return null; // Handle invalid input
} else if (typeof dateValue == "number") {
dateValue = String(dateValue);
}
const year = parseInt(dateValue.substring(0, 4), 10);
console.log("year ===== ", year);
const month = parseInt(dateValue.substring(4, 6), 10) - 1; // Month is 0-based in JS
const day = parseInt(dateValue.substring(6, 8), 10);
const hours = parseInt(dateValue.substring(8, 10), 10);
const minutes = parseInt(dateValue.substring(10, 12), 10);
const seconds = parseInt(dateValue.substring(12, 14), 10);
const parsedDate = new Date(year, month, day, hours, minutes, seconds);
// Check if the date is valid
if (isNaN(parsedDate.getTime())) {
return null; // Invalid date
}
return parsedDate;
};
return (
<AntdesignLayout>
<Box
@ -125,27 +164,76 @@ const IndividualMarksheetGen = () => {
>
Submit
</button>
<Link to="/certificate/gen/upload">
<button
type="button"
className="btn btn-primary btn-sm px-4 h-75"
onClick={triggenCertificateGen}
>
Upload Data
</button>
</Link>
</Box>
<Box style={{width:"70%",margin:"auto",textAlign:'center'}}>
<Box style={{ width: "70%", margin: "auto", textAlign: "center" }}>
{processList.length > 0 && (
<>
<TableContainer component={Paper}>
<Table>
<TableHead>
<TableRow>
<TableCell><strong>ID</strong></TableCell>
<TableCell><strong>Register Number</strong></TableCell>
<TableCell><strong>Status</strong></TableCell>
<TableCell><strong>Created on</strong></TableCell>
<TableCell>
<strong>ID</strong>
</TableCell>
<TableCell>
<strong>Register Number</strong>
</TableCell>
<TableCell>
<strong>Status</strong>
</TableCell>
<TableCell>
<strong>Created on</strong>
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{processList.map((processData) => (
<TableRow key={processData.id}>
<TableCell>{processData?.id}</TableCell>
<TableCell>{processData?.register_number}</TableCell>
<TableCell style={{textAlign:'center'}}><button style={{backgroundColor:processData?.status === "INCOMPLETE" ? 'red' : 'green',color:"white",borderRadius:'10px',padding:'3px 10px'}}>{processData?.status}</button></TableCell>
<TableCell>{processData?.created_on}</TableCell>
<TableRow key={processData.job_vidh_ms_solutions_id}>
<TableCell>
{processData?.job_vidh_ms_solutions_id}
</TableCell>
{processData?.status_code == "JS" ? (
<TableCell><a target="__blank" href={`http://files.usln.in/individual_files_gen/${processData?.register_number}_certificates.pdf`}>{processData?.register_number}</a></TableCell>
) : (
<TableCell>{processData?.register_number}</TableCell>
)}
<TableCell style={{ textAlign: "center" }}>
<button
style={{
backgroundColor:
processData?.status_code === "JF"
? "red"
: "green",
color: "white",
borderRadius: "10px",
padding: "3px 10px",
}}
>
{processData?.status_code}
</button>
</TableCell>
<TableCell>
{processData?.created_on
? new Intl.DateTimeFormat("en-US", {
year: "numeric",
month: "long",
day: "numeric",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
}).format(parseCreatedOn(processData?.created_on))
: "N/A"}
</TableCell>
</TableRow>
))}
</TableBody>

51
src/Components/Login.jsx Normal file
View File

@ -0,0 +1,51 @@
import { Height } from "@mui/icons-material";
import { Box, Button } from "@mui/material";
import TextInputField from "./TextInputField";
import AccountCircleIcon from "@mui/icons-material/AccountCircle";
import { useState, useEffect } from "react";
const Login = () => {
const [username,setUsername] = useState(null)
const [password,setPassword] = useState(null)
const loginContainerStyle = {
backgroundColor: "white",
width: "500px",
Height: "500px",
borderRadius: "15px",
padding: "25px",
};
const loginMainContainerStyle = {
position: "absolute",
width: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
backgroundColor: "rgba(0,0,0,0.5)",
height: "100%",
top: "0",
left: "0",
};
const accountIconStyle = {
width: "50px",
height: "auto",
color: "blue",
};
return (
<Box style={loginMainContainerStyle}>
<Box style={loginContainerStyle}>
<AccountCircleIcon style={accountIconStyle} />
<TextInputField placeholder={"Username"} />
<TextInputField placeholder={"Password"} />
<Button className="bg-primary rounded p-3 text-white my-4 w-100">
Submit
</Button>
</Box>
</Box>
);
};
export default Login;

View File

@ -44,19 +44,20 @@ import { updatePlaygroundQuery } from "../redux/actions/actions";
import { useSelector, useDispatch } from "react-redux";
import PlayGrounds from "./PlayGrounds";
import { useParams } from "react-router-dom";
import Login from "./Login";
const { Header, Content, Footer, Sider } = Layout;
const PlayGround = () => {
const { type } = useParams();
const { type, year } = useParams();
console.log("year in playground ====== ",year)
console.log("Backend URL:", import.meta.env.VITE_REACT_APP_BACKEND_URL);
console.log("Type ============= ", type);
const [tableName, setTableName] = useState(null);
const tableType = {
PartA: "ocr_scanned_part_a_v1",
PartC: "ocr_scanned_part_c_v1",
Attendence: "attendence_scanned_data",
PartA: year == "april2024" ? "ocr_scanned_part_a_v1" : year == "november2024" ? "ocr_scanned_part_a_v2" : '',
PartC: year == "april2024" ? "ocr_scanned_part_c_v1" : year == "november2024" ? "ocr_scanned_part_c_v2" : '',
Attendence: year == "april2024" ? "attendence_scanned_data" : year == "november2024" ? "attendence_scanned_data_oct" : '',
};
useEffect(() => {
@ -73,7 +74,7 @@ const PlayGround = () => {
const [currentPage, setCurrentPage] = useState(1);
const [totalPages, setTotalPages] = useState(0);
const [imageColumn, setImageColumn] = useState(null);
const [dataFetched,setDataFetched] = useState(false)
const [dataFetched, setDataFetched] = useState(false);
const [query, setQuery] = useState("");
const [isLoading, setIsLoading] = useState(false);
const [paginationPages, setPaginationPages] = useState(null);
@ -190,7 +191,7 @@ const PlayGround = () => {
const data = await response.json();
setIsLoading(false);
if (data.status === "success") {
setDataFetched(true)
setDataFetched(true);
setTotalData(data.results);
var tmp = {};
tmp.type = type;
@ -319,6 +320,7 @@ const PlayGround = () => {
data={data}
s3_image_column={imageColumn}
query={query}
year={year}
/>
))
) : (

View File

@ -17,6 +17,8 @@ import Notification from "./Notification"; // Import the Notification component
import { ToastContainer } from "react-toastify";
const PlayGroundEditContainer = ({
year,
imageDomain,
data,
s3Path,
imageName,
@ -64,6 +66,7 @@ const PlayGroundEditContainer = ({
type,
imageName,
tableName,
year
};
const response = await fetch(
`${
@ -124,9 +127,6 @@ const PlayGroundEditContainer = ({
// }, [data]);
const updateRecordPartC = async () => {
// if (!marks) {
// return;
// }
setIsLoading(true);
try {
const payload = {
@ -140,6 +140,7 @@ const PlayGroundEditContainer = ({
marksR2,
imageName,
rotateAngle,
year
};
const response = await fetch(
`${import.meta.env.VITE_REACT_APP_BACKEND_URL}/editPartCdata`,
@ -161,7 +162,8 @@ const PlayGroundEditContainer = ({
console.log("querycontainerEle ===== ", queryContainerEle);
if (queryContainerEle) {
queryContainerEle.classList.add("grey-background");
toast.success("Record Updated Successfully !!");
// toast.success("Record Updated Successfully !!");
// showNotification("Record Updated Successfully ...", "success");
}
}
} catch (error) {
@ -192,7 +194,8 @@ const PlayGroundEditContainer = ({
registerNumber,
imageName,
rotateAngle,
serialNo
serialNo,
year
};
const response = await fetch(
`${import.meta.env.VITE_REACT_APP_BACKEND_URL}/editPartAdata`,
@ -246,7 +249,7 @@ const PlayGroundEditContainer = ({
<Box className="d-flex justify-content-between align-items-center gap-4">
<Box className="d-flex flex-column" style={imageStyle}>
<img
src={`https://docs.exampaper.vidh.ai/${s3Path}`}
src={`${imageDomain}/${s3Path}`}
height={"100%"}
width={"100%"}
/>

View File

@ -1,25 +1,27 @@
import React from "react";
import { Box } from "@mui/material";
import HomepageCard from "./HomepageCard";
import { useParams } from "react-router-dom";
const PlayGrounds = () => {
const { year } = useParams()
const cards = [
// {
// title: "PART - A",
// url: `/sections/${year}/Playground/PartA`,
// },
{
title: "PART - A",
url: "/Playground/PartA",
title: "Part - A",
url: `/sections/${year}/Playground/updated/PartA`,
},
{
title: "PART - C",
url: "/Playground/PartC",
url: `/sections/${year}/Playground/PartC`,
},
{
title: "ATTENDENCE",
url: "/Playground/Attendence",
},
{
title: "Part - A Updated",
url: "/Playground/updated/PartA",
},
url: `/sections/${year}/Playground/Attendence`,
}
];
return (
<>

View File

@ -48,16 +48,16 @@ import UpdatedPlaygroundUpdater from "./UpdatedPlaygroundUpdater";
const { Header, Content, Footer, Sider } = Layout;
const PlayGroundUpdated = () => {
const { type } = useParams();
const { type, year } = useParams();
console.log("Backend URL:", import.meta.env.VITE_REACT_APP_BACKEND_URL);
console.log("Type ============= ", type);
const [tableName, setTableName] = useState(null);
const tableType = {
PartA: "ocr_scanned_part_a_v1",
PartC: "ocr_scanned_part_c_v1",
Attendence: "attendence_scanned_data",
PartA: year == "april2024" ? "ocr_scanned_part_a_v1" : year == "november2024" ? "ocr_scanned_part_a_v2" : '',
PartC: year == "april2024" ? "ocr_scanned_part_c_v1" : year == "november2024" ? "ocr_scanned_part_c_v2" : '',
Attendence: year == "april2024" ? "attendence_scanned_data" : year == "november2024" ? "attendence_scanned_data_oct" : '',
};
useEffect(() => {

View File

@ -1,16 +1,26 @@
import { useState } from "react";
const QueryExecutortextArea = ({ query, setQuery }) => {
const [inputValue, setInputValue] = useState(query);
const handleChange = (e) => {
setInputValue(e.target.value);
// Debounce the state update
clearTimeout(window.debounceTimeout);
window.debounceTimeout = setTimeout(() => {
setQuery(e.target.value);
}, 500); // Update state after 500ms of no typing
};
const QueryExecutortextArea = ({query,setQuery}) => {
return (
<>
<textarea
className="w-100 p-3 h5 bg-white"
id="text-area-input"
placeholder="Enter your query ...."
rows="7"
value={query}
onChange={(e) => setQuery(e.target.value)}
></textarea>
</>
<textarea
className="w-100 p-3 h5 bg-white"
id="text-area-input"
placeholder="Enter your query ...."
rows="7"
value={inputValue}
onChange={handleChange}
></textarea>
);
};

View File

@ -1,25 +1,27 @@
import { TextField, Box } from "@mui/material";
import React from 'react';
import React from "react";
const TextInputField = React.forwardRef(({ placeholder, value, setValue, onKeyDown }, ref) => {
return (
<Box className="d-flex flex-column">
<label htmlFor="limit-input" className="text-left">
{placeholder} :-
</label>
<TextField
className="rounded h6 bg-white"
type="text"
placeholder={placeholder}
id="limit-input"
autoComplete="off"
value={value}
onChange={(e) => setValue(e.target.value)}
onKeyDown={onKeyDown}
inputRef={ref}
/>
</Box>
);
});
const TextInputField = React.forwardRef(
({ placeholder, value, setValue, onKeyDown }, ref) => {
return (
<Box className="d-flex flex-column py-3">
<label htmlFor="limit-input" className="text-left">
{placeholder} :-
</label>
<TextField
className="rounded h6 bg-white"
type="text"
placeholder={placeholder}
id="limit-input"
autoComplete="off"
value={value}
onChange={(e) => setValue(e.target.value)}
onKeyDown={onKeyDown}
inputRef={ref}
/>
</Box>
);
}
);
export default TextInputField;

View File

@ -16,6 +16,7 @@ import { updateAttendenceBlank } from "./Utilities/AttendencePlaygroundUtilities
import TextInputField from "./TextInputField";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
import { useParams } from "react-router-dom";
const UpdatedPlaygroundUpdater = ({
oldData,
@ -36,6 +37,7 @@ const UpdatedPlaygroundUpdater = ({
// console.log("ERROR REASON ============== ",error_reason)
// console.log("REDUX SYSTEM NO ================== ",reduxSystemNo)
const navigate = useNavigate();
const { year } = useParams();
const [dataValue, setDataValue] = useState({});
const [isLoading, setIsLoading] = useState(false);
// console.log("data in query executor Card : ", data);
@ -422,6 +424,7 @@ const UpdatedPlaygroundUpdater = ({
registerNumber,
imageName,
rotateAngle,
year
};
const response = await fetch(
`${import.meta.env.VITE_REACT_APP_BACKEND_URL}/editPartAdata`,

View File

@ -0,0 +1,325 @@
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { Box, Button, Typography } from "@mui/material";
import AntdesignLayout from "./AntdesignLayout";
import LoadingContainer from "./LoadingContainer";
import infinity_loader from "../../assets/Infinity_loader.gif";
import Notification from "./Notification"; // Import the Notification component
import { Height } from "@mui/icons-material";
import ZoomInIcon from "@mui/icons-material/ZoomIn";
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
import DeleteIcon from "@mui/icons-material/Delete";
import { Navigate} from "react-router-dom";
import {
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
Paper,
} from "@mui/material";
const UploadMarksheetDataContainer = () => {
const uploadDataStyleContainer = {
backgroundColor: "white",
borderRadius: "10px",
minWidth: "800px",
padding: "25px 40px",
margin: "10px",
};
const [selectedFile, setSelectedFile] = useState(null);
const [isLoading, setIsLoading] = useState(false);
const [notification, setNotification] = useState(null); // Notification state
const [processList, setProcesList] = useState([]);
const showNotification = (message, type) => {
setNotification({ message, type });
};
const handleFileChange = (event) => {
const file = event.target.files && event.target.files[0];
setSelectedFile(file);
};
useEffect(() => {
fetchCertificateDataInsertionList();
const fetchInterval = setInterval(() => {
fetchCertificateDataInsertionList();
}, 2000);
return () => {
clearInterval(fetchInterval);
};
}, []);
const fetchCertificateDataInsertionList = async () => {
try {
const response = await fetch(
`${
import.meta.env.VITE_REACT_APP_BACKEND_URL
}/fetchCertificateDataInsertionList`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
}
);
const responseData = await response.json();
console.log("Response ==== ", responseData);
if (responseData?.status == "success") {
setProcesList(responseData?.data);
}
} catch (error) {
console.log(error);
}
};
const handleUploadClick = async () => {
// Logic to handle file upload (send the file to server, etc.)
if (selectedFile) {
setIsLoading(true);
console.log(`File selected: ${selectedFile.name}`);
try {
const formData = new FormData();
formData.append("file", selectedFile);
const response = await fetch(
`${import.meta.env.VITE_REACT_APP_BACKEND_URL}/uploadCertificateData`,
{
method: "POST",
body: formData,
}
);
const result = await response.json();
setIsLoading(false);
if (response.ok) {
console.log(`File uploaded successfully: ${result.message}`);
showNotification("File Uploaded Successfully ...", "success");
} else {
console.error(`Error during upload: ${result.message}`);
showNotification("Something Went Wrong ...", "error");
}
} catch (error) {
setIsLoading(false);
showNotification("Something Went Wrong ...", "error");
console.error("Error uploading the file:", error);
}
}
};
const handleSampleDownload = async () => {
console.log("Downloading ....");
try {
const response = await fetch(
`${
import.meta.env.VITE_REACT_APP_BACKEND_URL
}/download/certificate/sample`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
}
);
if (!response.ok) {
throw new Error("Network response was not ok");
}
const blob = await response.blob();
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "sample_certificate_upload_data.csv"; // Customize the file name here
document.body.appendChild(a);
a.click();
a.remove(); // Cleanup
} catch (error) {
console.error("Error downloading the file:", error);
}
};
const parseCreatedOn = (dateValue) => {
console.log("parse created on ....", typeof dateValue);
if (!dateValue) {
return null; // Handle invalid input
} else if (typeof dateValue == "number") {
dateValue = String(dateValue);
}
const year = parseInt(dateValue.substring(0, 4), 10);
console.log("year ===== ", year);
const month = parseInt(dateValue.substring(4, 6), 10) - 1; // Month is 0-based in JS
const day = parseInt(dateValue.substring(6, 8), 10);
const hours = parseInt(dateValue.substring(8, 10), 10);
const minutes = parseInt(dateValue.substring(10, 12), 10);
const seconds = parseInt(dateValue.substring(12, 14), 10);
const parsedDate = new Date(year, month, day, hours, minutes, seconds);
// Check if the date is valid
if (isNaN(parsedDate.getTime())) {
return null; // Invalid date
}
return parsedDate;
};
return (
<AntdesignLayout>
<Box className="d-flex justify-content-center">
<Box style={uploadDataStyleContainer}>
<input
accept=".csv" // File types to accept
style={{ display: "none" }}
id="contained-button-file"
type="file"
onChange={handleFileChange}
/>
<Box className="py-3" style={{ fontSize: "18px" }}>
<strong>Certificate Generation Data Upload:</strong>
</Box>
<Box style={{ fontSize: "15px" }}>
<strong>Note :</strong> The upload data has to be a CSV format with
the following sample CSV header structure.Please Make sure before
Uploading the Data ..
</Box>
<Box className="d-flex justify-content-center align-items-center gap-2 py-4">
<label htmlFor="contained-button-file">
<Button variant="contained" color="primary" component="span">
Choose File
</Button>
</label>
<label>
<Button
variant="contained"
color="primary"
component="span"
onClick={handleSampleDownload}
>
Download Sample CSV
</Button>
</label>
</Box>
{selectedFile && (
<Box
className="d-flex justify-content-center gap-2 rounded p-2 w-100"
style={{ backgroundColor: "#e4f7f5" }}
>
<Typography variant="body1" sx={{ mt: 2 }}>
<strong>Selected File :</strong> {selectedFile.name}
</Typography>
<DeleteIcon
style={{ cursor: "pointer" }}
onClick={() => setSelectedFile(null)}
/>
</Box>
)}
{selectedFile && (
<Button
variant="contained"
color="secondary"
onClick={handleUploadClick}
sx={{ mt: 2 }}
disabled={!selectedFile}
>
Upload File
</Button>
)}
<Box>
<Link to="/certificate/gen">
<Button
variant="contained"
color="secondary"
sx={{ mt: 2 }}
>
Generate For Individual
</Button>
</Link>
</Box>
</Box>
</Box>
<Box
className="py-3"
style={{ width: "70%", margin: "auto", textAlign: "center" }}
>
{processList.length > 0 && (
<>
<TableContainer component={Paper}>
<Table>
<TableHead>
<TableRow>
<TableCell>
<strong>ID</strong>
</TableCell>
<TableCell>
<strong>File Name</strong>
</TableCell>
<TableCell>
<strong>Status</strong>
</TableCell>
<TableCell>
<strong>Created on</strong>
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{processList.map((processData) => (
<TableRow key={processData.id}>
<TableCell>
{processData?.job_vidh_ms_solutions_id}
</TableCell>
<TableCell>{processData?.file_name}</TableCell>
<TableCell style={{ textAlign: "center" }}>
<button
style={{
backgroundColor:
processData?.status_code === "JQ"
? "red"
: "green",
color: "white",
borderRadius: "10px",
padding: "3px 10px",
}}
>
{processData?.status_code}
</button>
</TableCell>
<TableCell>
{processData?.created_on
? new Intl.DateTimeFormat("en-US", {
year: "numeric",
month: "long",
day: "numeric",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
}).format(parseCreatedOn(processData?.created_on))
: "N/A"}
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
</>
)}
</Box>
{isLoading && <LoadingContainer />}
{notification && (
<Notification
message={notification.message}
type={notification.type}
onClose={() => setNotification(null)}
/>
)}
</AntdesignLayout>
);
};
export default UploadMarksheetDataContainer;

View File

@ -14,11 +14,13 @@ import react from '@vitejs/plugin-react'
export default defineConfig(({ mode }) => {
// Load environment variables based on the current mode (e.g., 'development' or 'production')
const env = loadEnv(mode, process.cwd());
return {
define: {
'process.env': env // expose all environment variables prefixed with VITE_ to process.env
},
plugins: [react()],
assetsInclude: ['**/*.csv']
}
})