diff --git a/Android/app/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/ProgressDialogBinding.class.uniqueId4 b/Android/app/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/ProgressDialogBinding.class.uniqueId4
index f170ead6..e69de29b 100644
Binary files a/Android/app/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/ProgressDialogBinding.class.uniqueId4 and b/Android/app/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/ProgressDialogBinding.class.uniqueId4 differ
diff --git a/backend/index.js b/backend/index.js
index 6fa707ad..f28fdc6e 100644
--- a/backend/index.js
+++ b/backend/index.js
@@ -42,8 +42,7 @@ app.use("/auth", authRoutes);
app.use("/api", routes);
app.use("/api", passwordResetRoutes);
app.use("/vpi", userRoutes);
-app.use("/api", adminRegistrationRoutes);
-
+app.use("/api/v1", adminRegistrationRoutes);
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
diff --git a/src/Admin/Pages/VigyForm.css b/src/Admin/Pages/VigyForm.css
new file mode 100644
index 00000000..3f5f31b1
--- /dev/null
+++ b/src/Admin/Pages/VigyForm.css
@@ -0,0 +1,17 @@
+.vigy-form .nav-pills .nav-link.active {
+ background-color: #007bff;
+ color: #fff;
+}
+
+.vigy-form .nav-pills .nav-link {
+ cursor: pointer;
+}
+
+.vigy-form .form-check-label {
+ display: block;
+ margin-top: 1rem;
+}
+
+.vigy-form .form-check-label input {
+ margin-right: 0.5rem;
+}
diff --git a/src/Admin/Pages/VigyForm.jsx b/src/Admin/Pages/VigyForm.jsx
index fb6581cc..18660ffd 100644
--- a/src/Admin/Pages/VigyForm.jsx
+++ b/src/Admin/Pages/VigyForm.jsx
@@ -1,33 +1,35 @@
-import React, { useState } from 'react';
-import { Link } from 'react-router-dom';
-import InputField from '../components/RegisterAdmin/InputField';
-import SelectField from '../components/RegisterAdmin/SelectField';
-import FileInput from '../components/RegisterAdmin/FileInput';
-import Swal from 'sweetalert2';
-
+import React, { useState } from "react";
+import { Link } from "react-router-dom";
+import InputField from "../components/RegisterAdmin/InputField";
+import SelectField from "../components/RegisterAdmin/SelectField";
+import FileInput from "../components/RegisterAdmin/FileInput";
+import Swal from "sweetalert2";
+import axios from "axios";
+import { ClipLoader } from "react-spinners";
const VigyForm = () => {
- const [activeTab, setActiveTab] = useState('personal');
+ const [activeTab, setActiveTab] = useState("personal");
const [formData, setFormData] = useState({
personal: {},
contact: {},
banking: {},
verification: {},
- additional: {}
+ additional: {},
});
+ const [loading, setLoading] = useState(false); // Add this line
const tabs = [
- { id: 'personal', label: 'Personal' },
- { id: 'contact', label: 'Contact' },
- { id: 'banking', label: 'Banking' },
- { id: 'verification', label: 'Verification' },
- { id: 'additional', label: 'Additional' },
+ { id: "personal", label: "Personal" },
+ { id: "contact", label: "Contact" },
+ { id: "banking", label: "Banking" },
+ { id: "verification", label: "Verification" },
+ { id: "additional", label: "Additional" },
];
const handleTabChange = (direction) => {
- const currentIndex = tabs.findIndex(tab => tab.id === activeTab);
+ const currentIndex = tabs.findIndex((tab) => tab.id === activeTab);
let newIndex;
- if (direction === 'next') {
+ if (direction === "next") {
newIndex = Math.min(currentIndex + 1, tabs.length - 1);
} else {
newIndex = Math.max(currentIndex - 1, 0);
@@ -41,243 +43,247 @@ const VigyForm = () => {
const handleInputChange = (e) => {
const { name, value, type } = e.target;
let processedValue = value;
-
- if (type === 'file') {
+
+ if (type === "file") {
processedValue = e.target.files[0];
} else {
const inputProcessors = {
- aadhaarNumber: val => val.replace(/\D/g, '').slice(0, 12),
- phoneNumber: val => val.replace(/\D/g, '').slice(0, 10),
- email: val => val.toLowerCase(),
- bankAccountName: val => val.toUpperCase(),
- bankBranch: val => val.toUpperCase(),
- ifscCode: val => val.toUpperCase(),
- bankAccountNumber: val => val.replace(/\D/g, '').slice(0, 18),
- };
-
- processedValue = inputProcessors[name] ? inputProcessors[name](value) : value;
- }
+ aadhaarNumber: (val) => val.replace(/\D/g, "").slice(0, 12),
+ phoneNumber: (val) => val.replace(/\D/g, "").slice(0, 10),
+ email: (val) => val.toLowerCase(),
+ bankAccountName: (val) => val.toUpperCase(),
+ bankBranch: (val) => val.toUpperCase(),
+ ifscCode: (val) => val.toUpperCase(),
+ bankAccountNumber: (val) => val.replace(/\D/g, "").slice(0, 18),
+ };
- setFormData(prevData => ({
- ...prevData,
- [activeTab]: {
- ...prevData[activeTab],
- [name]: processedValue
+ processedValue = inputProcessors[name]
+ ? inputProcessors[name](value)
+ : value;
}
- }));
-};
+
+ setFormData((prevData) => ({
+ ...prevData,
+ [activeTab]: {
+ ...prevData[activeTab],
+ [name]: processedValue,
+ },
+ }));
+ };
const validateEmail = (email) => {
- return email.includes('@');
+ return email.includes("@");
};
const indianBanks = [
- { value: '', label: 'Select bank' },
- { value: 'SBI', label: 'State Bank of India' },
- { value: 'HDFC', label: 'HDFC Bank' },
- { value: 'ICICI', label: 'ICICI Bank' },
- { value: 'PNB', label: 'Punjab National Bank' },
- { value: 'BOB', label: 'Bank of Baroda' },
- { value: 'AXIS', label: 'Axis Bank' },
- { value: 'KOTAK', label: 'Kotak Mahindra Bank' },
- { value: 'IDBI', label: 'IDBI Bank' },
- { value: 'UBI', label: 'Union Bank of India' },
- { value: 'CANARA', label: 'Canara Bank' },
+ { value: "", label: "Select bank" },
+ { value: "SBI", label: "State Bank of India" },
+ { value: "HDFC", label: "HDFC Bank" },
+ { value: "ICICI", label: "ICICI Bank" },
+ { value: "PNB", label: "Punjab National Bank" },
+ { value: "BOB", label: "Bank of Baroda" },
+ { value: "AXIS", label: "Axis Bank" },
+ { value: "KOTAK", label: "Kotak Mahindra Bank" },
+ { value: "IDBI", label: "IDBI Bank" },
+ { value: "UBI", label: "Union Bank of India" },
+ { value: "CANARA", label: "Canara Bank" },
];
const renderTabContent = () => {
const currentFormData = formData[activeTab] || {};
switch (activeTab) {
- case 'personal':
+ case "personal":
return (
<>
-