diff --git a/ipi-survey-platform/src/pages/ChangePassword/ChangePassword.jsx b/ipi-survey-platform/src/pages/ChangePassword/ChangePassword.jsx
index 06d66fc..1097fe5 100644
--- a/ipi-survey-platform/src/pages/ChangePassword/ChangePassword.jsx
+++ b/ipi-survey-platform/src/pages/ChangePassword/ChangePassword.jsx
@@ -59,7 +59,12 @@ const ChangePassword = () => {
const navigate = useNavigate();
const location = useLocation();
- const registeredEmail = location.state?.email || "";
+ const { email: registeredEmail, user_type: userType } = location.state || {};
+
+ // Ensure user_type is set in the form data
+ const [formData, setFormData] = React.useState({
+ user_type: userType
+ });
const [otp, setOtp] = React.useState("");
const [newPassword, setNewPassword] = React.useState("");
@@ -132,6 +137,7 @@ if (newPassword !== confirmPassword) {
otp: otp.trim(),
password: newPassword,
confirm_password: confirmPassword,
+ user_type: userType // Use the user_type from location state
};
const response = await apiClient.post("/forgot-password/verify-otp", payload);
@@ -197,6 +203,21 @@ if (newPassword !== confirmPassword) {
/>
+
+
+
+
+
+
+
+
{
- const [openIndex, setOpenIndex] = useState(null);
-
- const faqs = [
+ const [openIndexLeft, setOpenIndexLeft] = useState(null);
+ const [openIndexRight, setOpenIndexRight] = useState(null);
+
+ // FULL FAQ DATA
+ const leftFaqs = [
{
question: "Do I need an account to respond?",
answer:
"Yes. FCSC provisions accounts to selected establishments. Use Login to access the survey.",
},
- {
- question: "Can I register myself?",
- answer:
- "No. There is no self-registration. If you were contacted but can’t access your account, use Forgot password or Contact support.",
- },
{
question: "Is my data public?",
answer: "No. Results are published only in aggregate form.",
},
- {
- question: "What if production was zero in a month?",
- answer: "Enter 0 for the month and provide a reason when prompted.",
- },
{
question: "Can I update after submission?",
answer:
"Yes, if a revision window is open or if FCSC requests a correction.",
},
- {
- question: "Which browser is supported?",
- answer: "Latest Chrome, Edge, Safari.",
- },
{
question: "How long does it take?",
answer:
"Most respondents complete within minutes each quarter, depending on product lines.",
},
+ ];
+
+ const rightFaqs = [
+ {
+ question: "Can I register myself?",
+ answer:
+ "No. There is no self-registration. If you were contacted but can’t access your account, use Forgot password or Contact support.",
+ },
+ {
+ question: "What if production was zero in a month?",
+ answer: "Enter 0 for the month and provide a reason when prompted.",
+ },
+ {
+ question: "Which browser is supported?",
+ answer: "Latest Chrome, Edge, Safari.",
+ },
{
question: "Who can I contact?",
answer: "See Need help below.",
},
];
-
- const toggleFaq = (index) => {
- setOpenIndex(openIndex === index ? null : index);
+
+ // Auto height expand component
+ const Expandable = ({ isOpen, children }) => {
+ const ref = useRef(null);
+
+ useEffect(() => {
+ if (isOpen) {
+ ref.current.style.maxHeight = ref.current.scrollHeight + "px";
+ } else {
+ ref.current.style.maxHeight = "0px";
+ }
+ }, [isOpen]);
+
+ return (
+