Skip to content

Commit

Permalink
only show unlinked facilties
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranshu1902 committed Sep 9, 2023
1 parent dcc7b70 commit daa88cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Components/Common/FacilitySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { FacilityModel } from "../Facility/models";

interface FacilitySelectProps {
name: string;
username: string;
errors?: string | undefined;
className?: string;
searchAll?: boolean;
Expand All @@ -22,6 +23,7 @@ interface FacilitySelectProps {
export const FacilitySelect = (props: FacilitySelectProps) => {
const {
name,
username,
multiple,
selected,
setSelected,
Expand All @@ -45,6 +47,7 @@ export const FacilitySelect = (props: FacilitySelectProps) => {
search_text: text,
all: searchAll,
facility_type: facilityType,
username: username,
district,
};

Expand Down
1 change: 1 addition & 0 deletions src/Components/Users/ManageUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ function UserFacilities(props: { user: any }) {
<FacilitySelect
multiple={false}
name="facility"
username={username}
showAll={false} // Show only facilities that user has access to link (not all facilities)
showNOptions={8}
selected={facility}
Expand Down

0 comments on commit daa88cd

Please sign in to comment.