Fix missing Primary Outlet Name field on the Super Admin tenant form
AdminConsole renders the Tenant Onboarding form twice (embedded vs. showHeader standalone) from two separate JSX blocks. The Primary Outlet Name / Business Category fields added earlier only landed in the embedded block, so the showHeader block SuperAdminPage actually renders had no way to fill tenantForm.locationname — the required- field check on submit failed unconditionally, no matter what was filled in. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1067,6 +1067,33 @@ VALUES (${newUserId}, 1, 'Active', NOW());
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div className="space-y-1">
|
||||
<label className="text-[10px] font-bold text-slate-450 uppercase tracking-widest">Primary Outlet Name (*)</label>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="e.g. Kaveri Groceries - Main Branch"
|
||||
value={tenantForm.locationname}
|
||||
onChange={(e) => setTenantForm({ ...tenantForm, locationname: e.target.value })}
|
||||
className="w-full border border-slate-250 rounded-xl p-3 bg-slate-50/40 hover:bg-slate-100 focus:bg-white outline-none focus:border-purple-500 transition-all font-semibold text-xs text-slate-800"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<label className="text-[10px] font-bold text-slate-450 uppercase tracking-widest">Business Category</label>
|
||||
<select
|
||||
value={tenantForm.categoryid}
|
||||
onChange={(e) => setTenantForm({ ...tenantForm, categoryid: Number(e.target.value) })}
|
||||
className="w-full border border-slate-250 rounded-xl p-3 bg-slate-50/40 hover:bg-slate-100 focus:bg-white outline-none focus:border-purple-500 transition-all font-semibold text-xs text-slate-800 cursor-pointer"
|
||||
>
|
||||
<option value={1}>Food & Dining</option>
|
||||
<option value={2}>Grocery & Daily</option>
|
||||
<option value={3}>Pharmacy</option>
|
||||
<option value={4}>Retail</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<label className="text-[10px] font-bold text-slate-450 uppercase tracking-widest">HQ Street Address</label>
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user