Changes in Organization popup
This commit is contained in:
parent
69cc3b9383
commit
c609387924
@ -146,6 +146,7 @@ const ManagOrg = () => {
|
|||||||
required
|
required
|
||||||
valueKey="id"
|
valueKey="id"
|
||||||
options={service?.data || []}
|
options={service?.data || []}
|
||||||
|
required = {true}
|
||||||
/>
|
/>
|
||||||
{errors.serviceIds && (
|
{errors.serviceIds && (
|
||||||
<span className="danger-text">{errors.serviceIds.message}</span>
|
<span className="danger-text">{errors.serviceIds.message}</span>
|
||||||
|
@ -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,8 @@ const SelectMultiple = ({
|
|||||||
className="multi-select-dropdown-container"
|
className="multi-select-dropdown-container"
|
||||||
style={{ position: "relative" }}
|
style={{ position: "relative" }}
|
||||||
>
|
>
|
||||||
<label>{label}</label>
|
<Label required={required}>{label}</Label>
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="multi-select-dropdown-header"
|
className="multi-select-dropdown-header"
|
||||||
|
@ -174,27 +174,25 @@ const AttendancePage = () => {
|
|||||||
{/* Search + Organization filter */}
|
{/* Search + Organization filter */}
|
||||||
<div className="col-12 col-md-auto mt-2 mt-md-0 ms-md-auto d-flex gap-2 align-items-center">
|
<div className="col-12 col-md-auto mt-2 mt-md-0 ms-md-auto d-flex gap-2 align-items-center">
|
||||||
{/* Organization Dropdown */}
|
{/* Organization Dropdown */}
|
||||||
{organizations?.length > 1 && (
|
<select
|
||||||
<select
|
className="form-select form-select-sm"
|
||||||
className="form-select form-select-sm"
|
style={{ minWidth: "180px" }}
|
||||||
style={{ minWidth: "180px" }}
|
value={appliedFilters.selectedOrganization}
|
||||||
value={appliedFilters.selectedOrganization}
|
onChange={(e) =>
|
||||||
onChange={(e) =>
|
setAppliedFilters((prev) => ({
|
||||||
setAppliedFilters((prev) => ({
|
...prev,
|
||||||
...prev,
|
selectedOrganization: e.target.value,
|
||||||
selectedOrganization: e.target.value,
|
}))
|
||||||
}))
|
}
|
||||||
}
|
disabled={orgLoading}
|
||||||
disabled={orgLoading}
|
>
|
||||||
>
|
<option value="">All Organizations</option>
|
||||||
<option value="">All Organizations</option>
|
{organizations?.map((org) => (
|
||||||
{organizations?.map((org) => (
|
<option key={org.id} value={org.id}>
|
||||||
<option key={org.id} value={org.id}>
|
{org.name}
|
||||||
{org.name}
|
</option>
|
||||||
</option>
|
))}
|
||||||
))}
|
</select>
|
||||||
</select>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Search Input */}
|
{/* Search Input */}
|
||||||
<input
|
<input
|
||||||
@ -207,6 +205,7 @@ const AttendancePage = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user