Office Number, Domain Name, and Tax ID fields should be nullable but are mandatory. #361
@ -96,19 +96,19 @@ const EditProfile = ({ TenantId,onClose }) => {
|
||||
</div>
|
||||
|
||||
<div className="col-sm-6 mt-1">
|
||||
<Label htmlFor="domainName" required>Domain Name</Label>
|
||||
<Label htmlFor="domainName" >Domain Name</Label>
|
||||
<input id="domainName" type="text" className="form-control form-control-sm" {...register("domainName")} />
|
||||
{errors.domainName && <div className="danger-text">{errors.domainName.message}</div>}
|
||||
</div>
|
||||
|
||||
<div className="col-sm-6 mt-1">
|
||||
<Label htmlFor="taxId" required>Tax ID</Label>
|
||||
<Label htmlFor="taxId" >Tax ID</Label>
|
||||
<input id="taxId" type="text" className="form-control form-control-sm" {...register("taxId")} />
|
||||
{errors.taxId && <div className="danger-text">{errors.taxId.message}</div>}
|
||||
</div>
|
||||
|
||||
<div className="col-sm-6 mt-1">
|
||||
<Label htmlFor="officeNumber" required>Office Number</Label>
|
||||
<Label htmlFor="officeNumber" >Office Number</Label>
|
||||
<input id="officeNumber" type="text" className="form-control form-control-sm" {...register("officeNumber")} />
|
||||
{errors.officeNumber && <div className="danger-text">{errors.officeNumber.message}</div>}
|
||||
</div>
|
||||
|
@ -73,7 +73,7 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
|
||||
</div>
|
||||
|
||||
<div className="col-sm-6">
|
||||
<Label htmlFor="officeNumber" required>
|
||||
<Label htmlFor="officeNumber" >
|
||||
Office Number
|
||||
</Label>
|
||||
<input
|
||||
@ -87,7 +87,7 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
|
||||
</div>
|
||||
|
||||
<div className="col-sm-6">
|
||||
<Label htmlFor="domainName" required>
|
||||
<Label htmlFor="domainName" >
|
||||
Domain Name
|
||||
</Label>
|
||||
<input
|
||||
@ -101,7 +101,7 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
|
||||
</div>
|
||||
|
||||
<div className="col-sm-6">
|
||||
<Label htmlFor="taxId" required>
|
||||
<Label htmlFor="taxId" >
|
||||
Tax ID
|
||||
</Label>
|
||||
<input
|
||||
@ -138,8 +138,10 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
|
||||
</Label>
|
||||
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
{...register("organizationSize")}
|
||||
id="organizationSize"
|
||||
className="form-select shadow-none border py-1 px-2"
|
||||
style={{ fontSize: "0.875rem" }} // Bootstrap's small text size
|
||||
{...register("organizationSize", { required: "Organization size is required" })}
|
||||
>
|
||||
{orgSize.map((org) => (
|
||||
<option key={org.val} value={org.val}>
|
||||
@ -147,17 +149,20 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
|
||||
{errors.organizationSize && (
|
||||
<div className="danger-text">{errors.organizationSize.message}</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
<div className="col-sm-6">
|
||||
<Label htmlFor="industryId" required>
|
||||
Industry
|
||||
</Label>
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
id="industryId"
|
||||
className="form-select shadow-none border py-1 px-2 small"
|
||||
{...register("industryId")}
|
||||
>
|
||||
{industryLoading ? (
|
||||
@ -177,9 +182,9 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
|
||||
|
||||
<div className="col-sm-6">
|
||||
<Label htmlFor="reference">Reference</Label>
|
||||
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
id="reference"
|
||||
className="form-select shadow-none border py-1 px-2 small"
|
||||
{...register("reference")}
|
||||
>
|
||||
{reference.map((org) => (
|
||||
@ -193,6 +198,7 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
<div className="col-sm-12">
|
||||
<Label htmlFor="description">Description</Label>
|
||||
<textarea
|
||||
|
@ -11,12 +11,12 @@ export const newTenantSchema = z.object({
|
||||
.regex(/^[A-Za-z]+$/, { message: "Last Name should contain only letters!" }),
|
||||
email: z.string().trim().email("Invalid email address"),
|
||||
description: z.string().trim().optional(),
|
||||
domainName: z.string().trim().nonempty("Domain name is required"),
|
||||
domainName: z.string().trim().optional(),
|
||||
billingAddress: z.string().trim().nonempty("Billing address is required"),
|
||||
taxId: z.string().trim().nonempty("Tax ID is required"),
|
||||
taxId: z.string().trim().optional(),
|
||||
logoImage: z.string().trim().optional(),
|
||||
organizationName: z.string().trim().nonempty("Organization name is required"),
|
||||
officeNumber: z.string().trim().nonempty("Office number is required"),
|
||||
officeNumber: z.string().trim().optional(),
|
||||
contactNumber: z.string().trim()
|
||||
.nonempty("Contact number is required")
|
||||
.regex(/^\+?[1-9]\d{7,14}$/, "Enter a valid contact number"),
|
||||
@ -141,11 +141,11 @@ lastName: z
|
||||
.min(1, { message: "Last Name is required!" })
|
||||
.regex(/^[A-Za-z]+$/, { message: "Last Name should contain only letters!" }),
|
||||
description: z.string().trim().optional(),
|
||||
domainName: z.string().trim().min(1, { message: "Domain Name is required!" }),
|
||||
domainName: z.string().trim().optional(),
|
||||
billingAddress: z.string().trim().min(1, { message: "Billing Address is required!" }),
|
||||
taxId: z.string().trim().min(1, { message: "Tax ID is required!" }),
|
||||
taxId: z.string().trim().optional(),
|
||||
logoImage: z.string().optional(),
|
||||
officeNumber: z.string().trim().min(1, { message: "Office Number is required!" }),
|
||||
officeNumber: z.string().trim().optional(),
|
||||
contactNumber: z.string().trim()
|
||||
.nonempty("Contact number is required")
|
||||
.regex(/^\+?[1-9]\d{7,14}$/, "Enter a valid contact number"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user