diff --git a/src/app/(dashboard)/dashboard/change-password/page.tsx b/src/app/(dashboard)/dashboard/change-password/page.tsx index 9c32b58..d0ffa86 100644 --- a/src/app/(dashboard)/dashboard/change-password/page.tsx +++ b/src/app/(dashboard)/dashboard/change-password/page.tsx @@ -3,14 +3,14 @@ import { Separator } from "@/components/ui/separator"; export default function SettingsProfilePage() { return ( -
-
+
+ {/*

Change Password

Change your password carefully.

- + */}
); diff --git a/src/app/(dashboard)/dashboard/preferences/page.tsx b/src/app/(dashboard)/dashboard/preferences/page.tsx index e32cc48..5adb41a 100644 --- a/src/app/(dashboard)/dashboard/preferences/page.tsx +++ b/src/app/(dashboard)/dashboard/preferences/page.tsx @@ -77,11 +77,22 @@ const dummyPreferences = [ ]; const Page = () => { - const [value, setValue] = useState([50]); + const [preference, setPreference] = useState({ + readability: [50], + refinement: [50], + modularity: [50], + optimization: [50], + portability: [50], + robustness: [50], + maintainability: [50], + conformity: [50], + security: [50], + functionality: [50], + }); return ( -
- +
+ Code Evaluation Criteria @@ -90,37 +101,39 @@ const Page = () => { -
- {dummyPreferences.map((item) => ( -
-
-

{item.name}

- - - - - -

{item.description}

-
-
+
+ {dummyPreferences.map( + (item: { id: number; name: string; description: string }) => ( +
+
+

{item.name}

+ + + + + +

{item.description}

+
+
+
+ { + setPreference((p) => ({ ...p, [item.name]: v })); + }} + min={0} + max={100} + step={1} + />
- { - console.log(v); - setValue(v); - }} - min={0} - max={100} - step={1} - /> -
- ))} + ) + )}
- +
diff --git a/src/components/change-password-form.tsx b/src/components/change-password-form.tsx index 953c973..576edc5 100644 --- a/src/components/change-password-form.tsx +++ b/src/components/change-password-form.tsx @@ -15,6 +15,8 @@ import { } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { toast } from "@/components/ui/use-toast"; +import { Card, CardContent, CardHeader, CardTitle } from "./ui/card"; +import { Separator } from "./ui/separator"; const profileFormSchema = z.object({ currentPassword: z.string().trim().min(6, { @@ -66,52 +68,69 @@ export default function ChangePasswordForm() { } return ( -
- - ( - - Current Password - - - - - - )} - /> - ( - - New Password - - - - - - )} - /> - ( - - Confirm New Password - - - - - - )} - /> - - - + + + + Change Password + + + + + +
+ + ( + + Current Password + + + + + + )} + /> + ( + + New Password + + + + + + )} + /> + ( + + Confirm New Password + + + + + + )} + /> + + + +
+
); } diff --git a/src/components/ui/slider.tsx b/src/components/ui/slider.tsx index c5fd6c8..2a49e04 100644 --- a/src/components/ui/slider.tsx +++ b/src/components/ui/slider.tsx @@ -12,12 +12,12 @@ const Slider = React.forwardRef< - +