Incorrect button sequence in Tenant Edit form

This commit is contained in:
Kartik Sharma 2025-09-24 15:19:39 +05:30
parent 1d3fcff859
commit 1274a795e3

View File

@ -72,15 +72,15 @@ const EditProfile = ({ TenantId, onClose }) => {
return (
<FormProvider {...methods}>
<form className="row g-6" onSubmit={handleSubmit(onSubmit)}>
<h6>Edit Tenant</h6>
<h5>Edit Tenant</h5>
<div className="col-sm-6 mt-1">
<div className="col-sm-6 mt-1 text-start">
<Label htmlFor="firstName" required>First Name</Label>
<input id="firstName" type="text" className="form-control form-control-sm" {...register("firstName")} inputMode='text' />
{errors.firstName && <div className="danger-text">{errors.firstName.message}</div>}
</div>
<div className="col-sm-6 mt-1">
<div className="col-sm-6 mt-1 text-start">
<Label htmlFor="lastName" required>Last Name</Label>
<input id="lastName" type="text" className="form-control form-control-sm" {...register("lastName")} />
{errors.lastName && <div className="danger-text">{errors.lastName.message}</div>}
@ -88,32 +88,32 @@ const EditProfile = ({ TenantId, onClose }) => {
<div className="col-sm-6 mt-1">
<div className="col-sm-6 mt-1 text-start">
<Label htmlFor="contactNumber" required>Contact Number</Label>
<input id="contactNumber" type="text" className="form-control form-control-sm" {...register("contactNumber")} inputMode="tel"
placeholder="+91 9876543210" />
{errors.contactNumber && <div className="danger-text">{errors.contactNumber.message}</div>}
</div>
<div className="col-sm-6 mt-1">
<div className="col-sm-6 mt-1 text-start">
<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">
<div className="col-sm-6 mt-1 text-start">
<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">
<div className="col-sm-6 mt-1 text-start">
<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>
<div className="col-sm-6 mt-1">
<div className="col-sm-6 mt-1 text-start">
<Label htmlFor="industryId" required>Industry</Label>
<select className="form-select form-select-sm" {...register("industryId")}>
{industryLoading ? <option value="">Loading...</option> :
@ -125,7 +125,7 @@ const EditProfile = ({ TenantId, onClose }) => {
{errors.industryId && <div className="danger-text">{errors.industryId.message}</div>}
</div>
<div className="col-sm-6 mt-1">
<div className="col-sm-6 mt-1 text-start">
<Label htmlFor="reference">Reference</Label>
<select className="form-select form-select-sm" {...register("reference")}>
{reference.map((org) => (
@ -134,7 +134,7 @@ const EditProfile = ({ TenantId, onClose }) => {
</select>
{errors.reference && <div className="danger-text">{errors.reference.message}</div>}
</div>
<div className="col-sm-6">
<div className="col-sm-6 text-start">
<Label htmlFor="organizationSize" required>
Organization Size
</Label>
@ -154,19 +154,19 @@ const EditProfile = ({ TenantId, onClose }) => {
)}
</div>
<div className="col-12 mt-1">
<div className="col-12 mt-1 text-start">
<Label htmlFor="billingAddress" required>Billing Address</Label>
<textarea id="billingAddress" className="form-control" {...register("billingAddress")} rows={2} />
{errors.billingAddress && <div className="danger-text">{errors.billingAddress.message}</div>}
</div>
<div className="col-12 mt-1">
<div className="col-12 mt-1 text-start">
<Label htmlFor="description">Description</Label>
<textarea id="description" className="form-control" {...register("description")} rows={2} />
{errors.description && <div className="danger-text">{errors.description.message}</div>}
</div>
<div className="col-sm-12">
<div className="col-sm-12 text-start">
<Label htmlFor="logImage">Logo Image</Label>
<LogoUpload
preview={logoPreview}
@ -176,9 +176,9 @@ const EditProfile = ({ TenantId, onClose }) => {
/>
</div>
<div className="d-flex justify-content-center gap-2 mt-3">
<div className="d-flex justify-content-end gap-2 mt-3">
<button type="button" disabled={isPending} className="btn btn-sm btn-label-secondary" onClick={onClose}>Cancel</button>
<button type="submit" disabled={isPending} className="btn btn-sm btn-primary">{isPending ? "Please Wait..." : "Submit"}</button>
<button type="button" disabled={isPending} className="btn btn-sm btn-secondary" onClick={onClose}>Cancel</button>
</div>
</form>
</FormProvider>