diff --git a/src/components/UserCreator.tsx b/src/components/UserCreator.tsx index 418ffdf5..ad56fedf 100755 --- a/src/components/UserCreator.tsx +++ b/src/components/UserCreator.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; -import { Sliders, Plus, Users, Save, Loader, Trash2 } from 'lucide-react'; +import { Plus, Users, Save, Loader, Trash2 } from 'lucide-react'; import { toastService } from '@/lib/toast'; import { personasApi, authApi } from '@/lib/api'; import { useNavigate } from 'react-router-dom'; @@ -31,7 +31,6 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { Slider } from "@/components/ui/slider"; import { Textarea } from "@/components/ui/textarea"; import { Switch } from "@/components/ui/switch"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; @@ -559,20 +558,24 @@ export default function UserCreator({ targetFolderId, targetFolderName }: UserCr

Create Synthetic Users

-
- -
- - {userCount} -
- +
+ + setUserCount(Math.min(10, Math.max(1, parseInt(e.target.value) || 1)))} + className="w-16 h-8 text-center text-sm" + /> + users
- + Basic Attitudinal Personality @@ -771,100 +774,44 @@ export default function UserCreator({ targetFolderId, targetFolderName }: UserCr )} /> -
-

Behavioral Attributes

- - ( - -
- Tech Savviness - {field.value}% -
- - field.onChange(value[0])} - /> - - -
- )} - /> - - ( - -
- Brand Loyalty - {field.value}% -
- - field.onChange(value[0])} - /> - - -
- )} - /> - - ( - -
- Price Consciousness - {field.value}% -
- - field.onChange(value[0])} - /> - - -
- )} - /> - - ( - -
- Environmental Concern - {field.value}% -
- - field.onChange(value[0])} - /> - - -
- )} - /> +
+

Behavioral Attributes

+ + {( + [ + { name: 'techSavviness', label: 'Tech Savviness' }, + { name: 'brandLoyalty', label: 'Brand Loyalty' }, + { name: 'priceConsciousness', label: 'Price Consciousness' }, + { name: 'environmentalConcern', label: 'Environmental Concern' }, + ] as const + ).map(({ name, label }) => ( + ( + +
+ {label} +
+ + field.onChange(Math.min(100, Math.max(0, parseInt(e.target.value) || 0)))} + className="w-16 h-8 text-center text-sm" + /> + + % +
+
+ +
+ )} + /> + ))}

OCEAN Personality Traits

- -
-
-
- - {(form.watch('oceanTraits') || { openness: 50 }).openness || 50}% -
- handleOceanChange('openness', values[0])} - max={100} - step={1} - /> -

- Creativity, curiosity, and openness to new ideas -

-
- -
-
- - {(form.watch('oceanTraits') || { conscientiousness: 50 }).conscientiousness || 50}% -
- handleOceanChange('conscientiousness', values[0])} - max={100} - step={1} - /> -

- Organization, responsibility, and self-discipline -

-
- -
-
- - {(form.watch('oceanTraits') || { extraversion: 50 }).extraversion || 50}% -
- handleOceanChange('extraversion', values[0])} - max={100} - step={1} - /> -

- Sociability, assertiveness, and talkativeness -

-
- -
-
- - {(form.watch('oceanTraits') || { agreeableness: 50 }).agreeableness || 50}% -
- handleOceanChange('agreeableness', values[0])} - max={100} - step={1} - /> -

- Compassion, cooperation, and concern for others -

-
- -
-
- - {(form.watch('oceanTraits') || { neuroticism: 50 }).neuroticism || 50}% -
- handleOceanChange('neuroticism', values[0])} - max={100} - step={1} - /> -

- Emotional reactivity, anxiety, and sensitivity to stress -

-
+ +
+ {( + [ + { key: 'openness', label: 'Openness to Experience', desc: 'Creativity, curiosity, and openness to new ideas' }, + { key: 'conscientiousness', label: 'Conscientiousness', desc: 'Organization, responsibility, and self-discipline' }, + { key: 'extraversion', label: 'Extraversion', desc: 'Sociability, assertiveness, and talkativeness' }, + { key: 'agreeableness', label: 'Agreeableness', desc: 'Compassion, cooperation, and concern for others' }, + { key: 'neuroticism', label: 'Neuroticism', desc: 'Emotional reactivity, anxiety, and sensitivity to stress' }, + ] as const + ).map(({ key, label, desc }) => { + const ocean = form.watch('oceanTraits') || { openness: 50, conscientiousness: 50, extraversion: 50, agreeableness: 50, neuroticism: 50 }; + const val = ocean[key] ?? 50; + return ( +
+
+ +
+ handleOceanChange(key, Math.min(100, Math.max(0, parseInt(e.target.value) || 0)))} + className="w-16 h-8 text-center text-sm" + /> + % +
+
+

{desc}

+
+ ); + })}
diff --git a/src/components/ai-recruiter/AIRecruiterForm.tsx b/src/components/ai-recruiter/AIRecruiterForm.tsx index 59e0c863..c68518bc 100755 --- a/src/components/ai-recruiter/AIRecruiterForm.tsx +++ b/src/components/ai-recruiter/AIRecruiterForm.tsx @@ -179,13 +179,17 @@ export default function AIRecruiterForm({ onSubmit, isGenerating }: AIRecruiterF /> -