Organization_Management : Organization Hierarchy #443
@ -12,7 +12,6 @@ import {
|
|||||||
} from "../../hooks/useOrganization";
|
} from "../../hooks/useOrganization";
|
||||||
import Label from "../common/Label";
|
import Label from "../common/Label";
|
||||||
import SelectMultiple from "../common/SelectMultiple";
|
import SelectMultiple from "../common/SelectMultiple";
|
||||||
import { useServices } from "../../hooks/masterHook/useMaster";
|
|
||||||
|
|
||||||
const ManageOrganization = () => {
|
const ManageOrganization = () => {
|
||||||
const orgModal = useOrganizationModal();
|
const orgModal = useOrganizationModal();
|
||||||
@ -86,30 +85,18 @@ const ManageOrganization = () => {
|
|||||||
<Label htmlFor="email" required>
|
<Label htmlFor="email" required>
|
||||||
Email Address
|
Email Address
|
||||||
</Label>
|
</Label>
|
||||||
<input
|
<input className="form-control form-control-sm" />
|
||||||
className="form-control form-control-sm"
|
|
||||||
{...register("email")}
|
|
||||||
/>
|
|
||||||
{errors.email && (
|
|
||||||
<span className="danger-text">{errors.email.message}</span>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mb-1 text-start">
|
<div className="mb-1 text-start">
|
||||||
<SelectMultiple
|
<SelectMultiple
|
||||||
name="serviceIds"
|
name="serviceIds"
|
||||||
label="Services"
|
label="Services"
|
||||||
required={true}
|
required={true}
|
||||||
valueKey="id"
|
valueKey="id"
|
||||||
options={services?.data || []}
|
|
||||||
/>
|
/>
|
||||||
{errors.serviceIds && (
|
|
||||||
<span className="danger-text">{errors.serviceIds.message}</span>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mb-1 text-start">
|
<div className="mb-1 text-start">
|
||||||
<Label htmlFor="address" required>
|
<Label htmlFor="organization" required>
|
||||||
Address
|
Address
|
||||||
</Label>
|
</Label>
|
||||||
<textarea
|
<textarea
|
||||||
@ -147,7 +134,9 @@ const ManageOrganization = () => {
|
|||||||
<Modal
|
<Modal
|
||||||
isOpen={orgModal.isOpen}
|
isOpen={orgModal.isOpen}
|
||||||
onClose={orgModal.onClose}
|
onClose={orgModal.onClose}
|
||||||
title="Manage Organization"
|
onSubmit={onSubmit}
|
||||||
|
title={"Manage Organization"}
|
||||||
|
actionLabel={"Submit"}
|
||||||
body={contentBody}
|
body={contentBody}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -12,6 +12,7 @@ const SelectMultiple = ({
|
|||||||
valueKey = "id",
|
valueKey = "id",
|
||||||
placeholder = "Please select...",
|
placeholder = "Please select...",
|
||||||
IsLoading = false,
|
IsLoading = false,
|
||||||
|
required = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { setValue, watch } = useFormContext();
|
const { setValue, watch } = useFormContext();
|
||||||
const selectedValues = watch(name) || [];
|
const selectedValues = watch(name) || [];
|
||||||
@ -146,7 +147,9 @@ const SelectMultiple = ({
|
|||||||
className="multi-select-dropdown-container"
|
className="multi-select-dropdown-container"
|
||||||
style={{ position: "relative" }}
|
style={{ position: "relative" }}
|
||||||
>
|
>
|
||||||
<label>{label}</label>
|
<Label htmlFor={name} required={required}>
|
||||||
|
{label}
|
||||||
|
</Label>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="multi-select-dropdown-header"
|
className="multi-select-dropdown-header"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user