profile name change
This commit is contained in:
@@ -20,6 +20,8 @@ import { useAppCategories } from '@/queries/hooks';
|
||||
interface FormState {
|
||||
tenantname: string;
|
||||
companyname: string;
|
||||
/** Who runs the shop. Written to `tenants.firstname` — see `CreateTenantRequest`. */
|
||||
adminname: string;
|
||||
primarycontact: string;
|
||||
primaryemail: string;
|
||||
locationname: string;
|
||||
@@ -34,6 +36,7 @@ interface FormState {
|
||||
const EMPTY: FormState = {
|
||||
tenantname: '',
|
||||
companyname: '',
|
||||
adminname: '',
|
||||
primarycontact: '',
|
||||
primaryemail: '',
|
||||
locationname: '',
|
||||
@@ -94,6 +97,7 @@ export function OnboardTenantPage() {
|
||||
const isComplete =
|
||||
form.tenantname.trim() !== '' &&
|
||||
form.companyname.trim() !== '' &&
|
||||
form.adminname.trim() !== '' &&
|
||||
form.primarycontact.trim() !== '' &&
|
||||
form.primaryemail.trim() !== '' &&
|
||||
form.locationname.trim() !== '' &&
|
||||
@@ -109,6 +113,7 @@ export function OnboardTenantPage() {
|
||||
mutation.mutate({
|
||||
tenantname: form.tenantname.trim(),
|
||||
companyname: form.companyname.trim(),
|
||||
firstname: form.adminname.trim(),
|
||||
primarycontact: form.primarycontact.trim(),
|
||||
primaryemail: form.primaryemail.trim(),
|
||||
locationname: form.locationname.trim(),
|
||||
@@ -193,6 +198,19 @@ export function OnboardTenantPage() {
|
||||
onChange={set('companyname')}
|
||||
placeholder="e.g. Kaveri Retail Pvt. Ltd."
|
||||
/>
|
||||
{/* Asked here because here is the only place it can be asked.
|
||||
The primary outlet and the merchant's own admin login are
|
||||
both created inside this one call, and the login is copied
|
||||
from the tenant row — so the name given here names the
|
||||
business AND the account that signs in. Left out, both are
|
||||
blank, which is the state every merchant is in today. */}
|
||||
<TextInput
|
||||
label={<span>Store admin <span style={{ color: 'var(--color-error)' }}>*</span></span> as any}
|
||||
value={form.adminname}
|
||||
onChange={set('adminname')}
|
||||
placeholder="e.g. Ravi Kumar"
|
||||
description="The person who administers this shop. Their name goes on the store profile and on the admin login created with it — the account is provisioned as Admin, which is what this field is named after."
|
||||
/>
|
||||
<TextInput
|
||||
label={<span>Primary phone <span style={{ color: 'var(--color-error)' }}>*</span></span> as any}
|
||||
value={form.primarycontact}
|
||||
|
||||
Reference in New Issue
Block a user