diff --git a/package-lock.json b/package-lock.json
index 116303c..0a75b85 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,14 +8,18 @@
"name": "quizcreator",
"version": "0.1.0",
"dependencies": {
+ "@heroicons/react": "^2.0.18",
"@types/react-select": "^5.0.1",
"cross-env": "^7.0.3",
"eslint": "8.44.0",
"eslint-config-next": "13.4.9",
+ "feather-icons-react": "^0.6.2",
"next": "13.4.9",
"pre-commit": "^1.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
+ "react-feather": "^2.0.10",
+ "react-hook-form": "^7.45.4",
"react-select": "^5.7.4",
"typescript": "^5.1.6"
},
@@ -355,6 +359,14 @@
"@floating-ui/core": "^1.3.1"
}
},
+ "node_modules/@heroicons/react": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.18.tgz",
+ "integrity": "sha512-7TyMjRrZZMBPa+/5Y8lN0iyvUU/01PeMGX2+RE7cQWpEUIcb4QotzUObFkJDejj/HUH4qjP/eQ0gzzKs2f+6Yw==",
+ "peerDependencies": {
+ "react": ">= 16"
+ }
+ },
"node_modules/@humanwhocodes/config-array": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
@@ -2175,6 +2187,14 @@
"reusify": "^1.0.4"
}
},
+ "node_modules/feather-icons-react": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/feather-icons-react/-/feather-icons-react-0.6.2.tgz",
+ "integrity": "sha512-G677Y5nc3HzP1f5NNb5LJuZwKrI58BK4+/9O8Bl4naF9JixC+YL4trVom1F2ajnilq/EbU8JETPTNqvCzwH1qA==",
+ "peerDependencies": {
+ "react": ">= 16.8.4"
+ }
+ },
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -3835,6 +3855,32 @@
"react": "^18.2.0"
}
},
+ "node_modules/react-feather": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/react-feather/-/react-feather-2.0.10.tgz",
+ "integrity": "sha512-BLhukwJ+Z92Nmdcs+EMw6dy1Z/VLiJTzEQACDUEnWMClhYnFykJCGWQx+NmwP/qQHGX/5CzQ+TGi8ofg2+HzVQ==",
+ "dependencies": {
+ "prop-types": "^15.7.2"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.6"
+ }
+ },
+ "node_modules/react-hook-form": {
+ "version": "7.45.4",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.45.4.tgz",
+ "integrity": "sha512-HGDV1JOOBPZj10LB3+OZgfDBTn+IeEsNOKiq/cxbQAIbKaiJUe/KV8DBUzsx0Gx/7IG/orWqRRm736JwOfUSWQ==",
+ "engines": {
+ "node": ">=12.22.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/react-hook-form"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17 || ^18"
+ }
+ },
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
diff --git a/package.json b/package.json
index e212fda..e17b9a3 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
"format": "npx prettier --write ."
},
"dependencies": {
+ "@heroicons/react": "^2.0.18",
"@types/react-select": "^5.0.1",
"cross-env": "^7.0.3",
"eslint": "8.44.0",
@@ -20,6 +21,8 @@
"pre-commit": "^1.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
+ "react-feather": "^2.0.10",
+ "react-hook-form": "^7.45.4",
"react-select": "^5.7.4",
"typescript": "^5.1.6"
},
diff --git a/src/components/Options/StudentDetailsOptions.tsx b/src/components/Options/StudentDetailsOptions.tsx
index 894b518..572c069 100644
--- a/src/components/Options/StudentDetailsOptions.tsx
+++ b/src/components/Options/StudentDetailsOptions.tsx
@@ -1,7 +1,7 @@
-export type OptionType = {
- value: string;
+export interface OptionType {
+ value: string | boolean;
label: string;
-};
+}
const ProgramOptions: OptionType[] = [
{ value: "Haryana Students", label: "Haryana Students" },
@@ -174,10 +174,10 @@ const TestTakersOptions = [
];
export {
- ProgramOptions,
- GradeOptions,
+ BatchOptions,
CourseOptions,
+ GradeOptions,
+ ProgramOptions,
StreamOptions,
TestTakersOptions,
- BatchOptions,
};
diff --git a/src/components/Options/TestDetailsOptions.tsx b/src/components/Options/TestDetailsOptions.tsx
index 5c2fbbb..7d4ff1c 100644
--- a/src/components/Options/TestDetailsOptions.tsx
+++ b/src/components/Options/TestDetailsOptions.tsx
@@ -1,7 +1,4 @@
-export type OptionType = {
- value: string;
- label: string;
-};
+import { OptionType } from "./StudentDetailsOptions";
const TestTypeOptions: OptionType[] = [
{ value: "assessment", label: "Assessment" },
@@ -44,9 +41,9 @@ const OptionalLimitOptions: OptionType[] = [
export {
MarkingSchemeOptions,
+ OptionalLimitOptions,
TestFormatOptions,
- TestPurposeOptions,
TestPlatformOptions,
+ TestPurposeOptions,
TestTypeOptions,
- OptionalLimitOptions,
};
diff --git a/src/components/Options/TimelineOptions.tsx b/src/components/Options/TimelineOptions.tsx
index 0afa374..220a135 100644
--- a/src/components/Options/TimelineOptions.tsx
+++ b/src/components/Options/TimelineOptions.tsx
@@ -1,16 +1,18 @@
-const IsEnabledOptions = [
+import { OptionType } from "./StudentDetailsOptions";
+
+const IsEnabledOptions: OptionType[] = [
{ value: true, label: "ON" },
{ value: false, label: "OFF" },
];
-const HasSyncedOptions = [
+const HasSyncedOptions: OptionType[] = [
{ value: true, label: "TRUE" },
{ value: false, label: "FALSE" },
];
-const SessionTypeOptions = [
+const SessionTypeOptions: OptionType[] = [
{ value: "infinite", label: "Infinite" },
{ value: "standard", label: "Standard" },
];
-export { IsEnabledOptions, HasSyncedOptions, SessionTypeOptions };
+export { HasSyncedOptions, IsEnabledOptions, SessionTypeOptions };
diff --git a/src/components/Stepper.tsx b/src/components/Stepper.tsx
index eb6d2dd..0b8f535 100644
--- a/src/components/Stepper.tsx
+++ b/src/components/Stepper.tsx
@@ -1,40 +1,33 @@
-// Stepper.js
-import { Step } from "@/pages/SessionCreator";
-import React from "react";
-
-//Navigates throught different sub-pages by passing the current step and the active step and renders the components based on the sub-page user is presented at
export default function Stepper({
steps,
activeStep,
}: {
- steps: Step[];
+ steps: string[];
activeStep: string;
}) {
return (
- <>
-
- {steps.map((step, index) => (
- -
+ {steps.map((step, index) => (
+
-
+
-
- {index + 1}
-
-
-
- {step}
-
-
-
- ))}
-
- >
+ {index + 1}
+
+
+
+ {step}
+
+
+
+ ))}
+
);
}
diff --git a/src/components/Steps/Form/SelectedField.tsx b/src/components/Steps/Form/SelectedField.tsx
new file mode 100644
index 0000000..dcc27ae
--- /dev/null
+++ b/src/components/Steps/Form/SelectedField.tsx
@@ -0,0 +1,39 @@
+import styles from "@/styles/Home.module.css";
+import { MyForm, MyFormKey } from "@/types/FormTypes";
+import { OptionType } from "@/types/types";
+import { Control, Controller } from "react-hook-form";
+import Select from "react-select";
+interface SelectFieldProps {
+ control: Control;
+ options: OptionType[];
+ name_: MyFormKey;
+ placeholder?: string;
+}
+
+const SelectField = ({
+ control,
+ options,
+ name_,
+ placeholder,
+}: SelectFieldProps) => {
+ return (
+ (
+