position ui and owliver update

This commit is contained in:
2026-08-14 01:18:59 +05:30
parent 1c653264b5
commit cccada9bd2
29 changed files with 3718 additions and 1313 deletions

View File

@@ -89,6 +89,7 @@ export default function CreatePosition({ prefill: prefillProp, embedded = false,
const payload = {
...form,
status,
company: String(form.company || '').trim(),
pay_range_min: Number(form.pay_range_min) || 0,
pay_range_max: Number(form.pay_range_max) || 0,
...(aiResult ? { description: aiResult.description, responsibilities: aiResult.responsibilities, qualifications: aiResult.qualifications, nice_to_haves: aiResult.nice_to_haves, ai_generated: true } : {}),
@@ -154,6 +155,20 @@ export default function CreatePosition({ prefill: prefillProp, embedded = false,
</div>
</div>
{/* The client this role is being staffed for. Stored on the position
record (`company`), which is what every surface reads to show who the
hire is actually for — the field existed in the model and had no way
in from this form until now. */}
<div>
<label className="text-[13px] font-medium text-[#374151]">Client / Company</label>
<input
value={form.company}
onChange={(e) => update('company', e.target.value)}
placeholder="e.g. Fairmont San Jose"
className="w-full mt-1.5 h-10 rounded-lg border border-[#E5E7EB] bg-white px-3 text-[13px] focus:border-[#0838E0] focus:outline-none"
/>
</div>
{/* Add new category */}
<div className="flex gap-2">
<input value={newCategory} onChange={(e) => setNewCategory(e.target.value)} placeholder="Create a new role category (saved for reuse)..." className="flex-1 h-10 rounded-lg border border-[#E5E7EB] px-3 text-[13px] focus:border-[#0838E0] focus:outline-none" />
@@ -180,18 +195,31 @@ export default function CreatePosition({ prefill: prefillProp, embedded = false,
<textarea value={form.custom_requirements} onChange={(e) => update('custom_requirements', e.target.value)} placeholder="e.g. Must have fine dining experience..." className="w-full mt-1.5 min-h-[70px] p-3 text-[13px] rounded-lg border border-[#E5E7EB] focus:border-[#0838E0] focus:outline-none resize-none" />
</div>
{/* Physical / Leadership / Attendance Expectations */}
{/* Physical / Leadership / Attendance Expectations.
All three are role-specific and optional, and the labels say so: a
blank one is not shown on the position at all. The placeholder used
to read "Lift 50 lbs, stand 8 hrs", which invited every role to be
given a warehouse requirement whether or not the work has one. */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<div>
<label className="text-[13px] font-medium text-[#374151]">Physical Requirements</label>
<input value={form.physical_requirements} onChange={(e) => update('physical_requirements', e.target.value)} placeholder="e.g. Lift 50 lbs, stand 8 hrs" className="w-full mt-1.5 h-10 rounded-lg border border-[#E5E7EB] bg-white px-3 text-[13px] focus:border-[#0838E0] focus:outline-none" />
<label className="text-[13px] font-medium text-[#374151]">
Physical Requirements <span className="font-normal text-[#9CA3AF]">— optional</span>
</label>
<p className="mt-0.5 text-[11px] text-[#9CA3AF]">Only if this role genuinely has them.</p>
<input value={form.physical_requirements} onChange={(e) => update('physical_requirements', e.target.value)} placeholder="e.g. Extended standing, lifting or climbing" className="w-full mt-1.5 h-10 rounded-lg border border-[#E5E7EB] bg-white px-3 text-[13px] focus:border-[#0838E0] focus:outline-none" />
</div>
<div>
<label className="text-[13px] font-medium text-[#374151]">Leadership Expectations</label>
<label className="text-[13px] font-medium text-[#374151]">
Leadership Expectations <span className="font-normal text-[#9CA3AF]">— optional</span>
</label>
<p className="mt-0.5 text-[11px] text-[#9CA3AF]">Only if this role leads people.</p>
<input value={form.leadership_expectations} onChange={(e) => update('leadership_expectations', e.target.value)} placeholder="e.g. Lead a team of 5" className="w-full mt-1.5 h-10 rounded-lg border border-[#E5E7EB] bg-white px-3 text-[13px] focus:border-[#0838E0] focus:outline-none" />
</div>
<div>
<label className="text-[13px] font-medium text-[#374151]">Attendance Expectations</label>
<label className="text-[13px] font-medium text-[#374151]">
Attendance Expectations <span className="font-normal text-[#9CA3AF]">— optional</span>
</label>
<p className="mt-0.5 text-[11px] text-[#9CA3AF]">Shift pattern or availability, if it matters.</p>
<input value={form.attendance_expectations} onChange={(e) => update('attendance_expectations', e.target.value)} placeholder="e.g. On-time, no weekends off" className="w-full mt-1.5 h-10 rounded-lg border border-[#E5E7EB] bg-white px-3 text-[13px] focus:border-[#0838E0] focus:outline-none" />
</div>
</div>