Incorrect button sequence in Tenant Edit form #428

Merged
pramod.mahajan merged 1 commits from Kartik_Bug#1301 into Organization_Management 2025-09-25 09:17:17 +00:00
Showing only changes of commit 1274a795e3 - Show all commits

View File

@ -72,15 +72,15 @@ const EditProfile = ({ TenantId, onClose }) => {
return ( return (
<FormProvider {...methods}> <FormProvider {...methods}>
<form className="row g-6" onSubmit={handleSubmit(onSubmit)}> <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> <Label htmlFor="firstName" required>First Name</Label>
<input id="firstName" type="text" className="form-control form-control-sm" {...register("firstName")} inputMode='text' /> <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>} {errors.firstName && <div className="danger-text">{errors.firstName.message}</div>}
</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> <Label htmlFor="lastName" required>Last Name</Label>
<input id="lastName" type="text" className="form-control form-control-sm" {...register("lastName")} /> <input id="lastName" type="text" className="form-control form-control-sm" {...register("lastName")} />
{errors.lastName && <div className="danger-text">{errors.lastName.message}</div>} {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> <Label htmlFor="contactNumber" required>Contact Number</Label>
<input id="contactNumber" type="text" className="form-control form-control-sm" {...register("contactNumber")} inputMode="tel" <input id="contactNumber" type="text" className="form-control form-control-sm" {...register("contactNumber")} inputMode="tel"
placeholder="+91 9876543210" /> placeholder="+91 9876543210" />
{errors.contactNumber && <div className="danger-text">{errors.contactNumber.message}</div>} {errors.contactNumber && <div className="danger-text">{errors.contactNumber.message}</div>}
</div> </div>
<div className="col-sm-6 mt-1"> <div className="col-sm-6 mt-1 text-start">
<Label htmlFor="domainName" >Domain Name</Label> <Label htmlFor="domainName" >Domain Name</Label>
<input id="domainName" type="text" className="form-control form-control-sm" {...register("domainName")} /> <input id="domainName" type="text" className="form-control form-control-sm" {...register("domainName")} />
{errors.domainName && <div className="danger-text">{errors.domainName.message}</div>} {errors.domainName && <div className="danger-text">{errors.domainName.message}</div>}
</div> </div>
<div className="col-sm-6 mt-1"> <div className="col-sm-6 mt-1 text-start">
<Label htmlFor="taxId" >Tax ID</Label> <Label htmlFor="taxId" >Tax ID</Label>
<input id="taxId" type="text" className="form-control form-control-sm" {...register("taxId")} /> <input id="taxId" type="text" className="form-control form-control-sm" {...register("taxId")} />
{errors.taxId && <div className="danger-text">{errors.taxId.message}</div>} {errors.taxId && <div className="danger-text">{errors.taxId.message}</div>}
</div> </div>
<div className="col-sm-6 mt-1"> <div className="col-sm-6 mt-1 text-start">
<Label htmlFor="officeNumber" >Office Number</Label> <Label htmlFor="officeNumber" >Office Number</Label>
<input id="officeNumber" type="text" className="form-control form-control-sm" {...register("officeNumber")} /> <input id="officeNumber" type="text" className="form-control form-control-sm" {...register("officeNumber")} />
{errors.officeNumber && <div className="danger-text">{errors.officeNumber.message}</div>} {errors.officeNumber && <div className="danger-text">{errors.officeNumber.message}</div>}
</div> </div>
<div className="col-sm-6 mt-1"> <div className="col-sm-6 mt-1 text-start">
<Label htmlFor="industryId" required>Industry</Label> <Label htmlFor="industryId" required>Industry</Label>
<select className="form-select form-select-sm" {...register("industryId")}> <select className="form-select form-select-sm" {...register("industryId")}>
{industryLoading ? <option value="">Loading...</option> : {industryLoading ? <option value="">Loading...</option> :
@ -125,7 +125,7 @@ const EditProfile = ({ TenantId, onClose }) => {
{errors.industryId && <div className="danger-text">{errors.industryId.message}</div>} {errors.industryId && <div className="danger-text">{errors.industryId.message}</div>}
</div> </div>
<div className="col-sm-6 mt-1"> <div className="col-sm-6 mt-1 text-start">
<Label htmlFor="reference">Reference</Label> <Label htmlFor="reference">Reference</Label>
<select className="form-select form-select-sm" {...register("reference")}> <select className="form-select form-select-sm" {...register("reference")}>
{reference.map((org) => ( {reference.map((org) => (
@ -134,7 +134,7 @@ const EditProfile = ({ TenantId, onClose }) => {
</select> </select>
{errors.reference && <div className="danger-text">{errors.reference.message}</div>} {errors.reference && <div className="danger-text">{errors.reference.message}</div>}
</div> </div>
<div className="col-sm-6"> <div className="col-sm-6 text-start">
<Label htmlFor="organizationSize" required> <Label htmlFor="organizationSize" required>
Organization Size Organization Size
</Label> </Label>
@ -154,19 +154,19 @@ const EditProfile = ({ TenantId, onClose }) => {
)} )}
</div> </div>
<div className="col-12 mt-1"> <div className="col-12 mt-1 text-start">
<Label htmlFor="billingAddress" required>Billing Address</Label> <Label htmlFor="billingAddress" required>Billing Address</Label>
<textarea id="billingAddress" className="form-control" {...register("billingAddress")} rows={2} /> <textarea id="billingAddress" className="form-control" {...register("billingAddress")} rows={2} />
{errors.billingAddress && <div className="danger-text">{errors.billingAddress.message}</div>} {errors.billingAddress && <div className="danger-text">{errors.billingAddress.message}</div>}
</div> </div>
<div className="col-12 mt-1"> <div className="col-12 mt-1 text-start">
<Label htmlFor="description">Description</Label> <Label htmlFor="description">Description</Label>
<textarea id="description" className="form-control" {...register("description")} rows={2} /> <textarea id="description" className="form-control" {...register("description")} rows={2} />
{errors.description && <div className="danger-text">{errors.description.message}</div>} {errors.description && <div className="danger-text">{errors.description.message}</div>}
</div> </div>
<div className="col-sm-12"> <div className="col-sm-12 text-start">
<Label htmlFor="logImage">Logo Image</Label> <Label htmlFor="logImage">Logo Image</Label>
<LogoUpload <LogoUpload
preview={logoPreview} preview={logoPreview}
@ -176,9 +176,9 @@ const EditProfile = ({ TenantId, onClose }) => {
/> />
</div> </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="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> </div>
</form> </form>
</FormProvider> </FormProvider>