Adding border in Group and Activities popup and Removing mandatory field in Tenant.

This commit is contained in:
Kartik Sharma 2025-09-26 14:56:19 +05:30
parent db815ba038
commit b044b88c49
4 changed files with 54 additions and 55 deletions

View File

@ -203,8 +203,7 @@ const OrganizationInfo = ({ onNext, onPrev, onSubmitTenant }) => {
</div>
<div className="col-sm-6">
<SelectMultiple
required
<SelectMultiple
name="serviceIds"
label="Services"
options={services?.data}

View File

@ -33,7 +33,7 @@ export const newTenantSchema = z.object({
organizationSize: z.string().nonempty("Organization size is required"),
industryId: z.string().uuid("Invalid industry ID"),
reference: z.string().nonempty("Reference is required"),
serviceIds: z.array(z.string()).nonempty("Services is required"),
serviceIds: z.array(z.string()).optional(),
});
export const tenantDefaultValues = {

View File

@ -137,8 +137,8 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
return (
<form onSubmit={handleSubmit(onSubmit)} className="px-7">
{/* <h6>Create Activity</h6> */}
<div className="row">
<div className="col-6 text-start">
<div className="row border border-1 border-secondary rounded-3 mt-2">
<div className="col-6 text-start mt-3">
<Label className="form-label" required>
Activity
</Label>
@ -154,7 +154,7 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
)}
</div>
<div className="col-6 text-start">
<div className="col-6 text-start mt-3">
<Label className="form-label" required>
Measurement
</Label>
@ -170,7 +170,7 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
)}
</div>
<div className="col-md-12 text-start mt-1">
<div className="col-md-12 text-start mt-3">
<label className="py-1 form-label my-0">
Add Check List <i
className="bx bx-plus-circle text-primary cursor-pointer"
@ -248,7 +248,7 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
</div>
<div className="col-12 text-end mt-3">
<div className="col-12 text-end mt-3 mb-4">
<button
type="reset"
className="btn btn-sm btn-label-secondary me-3"

View File

@ -53,55 +53,55 @@ const ManageGroup = ({ group = null, whichService = null, close }) => {
let isPending = isCreating || isUpdating;
return (
<form className="row px-12" onSubmit={handleSubmit(onSubmit)} cl>
<div className="col-12 col-md-12 text-start">
<Label className="form-label" required>
Group Name
</Label>
<input
type="text"
{...register("name")}
className={`form-control form-control-sm ${
errors.name ? "is-invalids" : ""
}`}
/>
{errors.name && (
<p className="danger-text m-0">{errors.name.message}</p>
)}
</div>
<div className="col-12 col-md-12 text-start mb-2">
<Label className="form-label" htmlFor="description" required>
Description
</Label>
<textarea
rows="3"
{...register("description")}
className={`form-control form-control-sm ${
errors.description ? "is-invalids" : ""
}`}
></textarea>
<form className="row px-12" onSubmit={handleSubmit(onSubmit)} >
<div className="border border-1 border-secondary rounded-3 p-2 mt-2">
<div className="col-12 col-md-12 text-start">
<Label className="form-label" required>
Group Name
</Label>
<input
type="text"
{...register("name")}
className={`form-control form-control-sm ${errors.name ? "is-invalids" : ""
}`}
/>
{errors.name && (
<p className="danger-text m-0">{errors.name.message}</p>
)}
</div>
<div className="col-12 col-md-12 text-start mb-2">
<Label className="form-label" htmlFor="description" required>
Description
</Label>
<textarea
rows="3"
{...register("description")}
className={`form-control form-control-sm ${errors.description ? "is-invalids" : ""
}`}
></textarea>
{errors.description && (
<p className="danger-text m-0">{errors.description.message}</p>
)}
</div>
{errors.description && (
<p className="danger-text m-0">{errors.description.message}</p>
)}
</div>
<div className="col-12 text-end">
<button
className="btn btn-xs btn-label-secondary me-3"
aria-label="Close"
disabled={isPending}
onClick={close}
>
Cancel
</button>
<button
type="submit"
className="btn btn-xs btn-primary"
disabled={isPending}
>
{isPending ? "Please Wait..." : group ? "Update" : "Submit"}
</button>
<div className="col-12 text-end mt-5">
<button
className="btn btn-sm btn-label-secondary me-3"
aria-label="Close"
disabled={isPending}
onClick={close}
>
Cancel
</button>
<button
type="submit"
className="btn btn-sm btn-primary"
disabled={isPending}
>
{isPending ? "Please Wait..." : group ? "Update" : "Submit"}
</button>
</div>
</div>
</form>
);