Skip to content

Commit

Permalink
remove alphabet shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaJ2305 committed Jan 11, 2025
1 parent 5a920c1 commit 3cfb24a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/components/Common/SearchByMultipleFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ interface SearchOption {
type: "text" | "phone";
placeholder: string;
value: string;
shortcutKey: string;
component?: React.ComponentType<HTMLDivElement>;
}

Expand Down
1 change: 0 additions & 1 deletion src/components/Patient/PatientIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export default function PatientIndex({ facilityId }: { facilityId: string }) {
type: "phone" as const,
placeholder: t("search_by_phone_number"),
value: phoneNumber,
shortcutKey: "p",
},
];

Expand Down
7 changes: 3 additions & 4 deletions src/pages/Encounters/EncounterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,31 +214,27 @@ export function EncounterList({
}),
enabled: !!encounter_id,
});

const searchOptions = [
{
key: "name",
label: "Patient Name",
type: "text" as const,
placeholder: "Search by patient name",
value: name || "",
shortcutKey: "n",
},
{
key: "encounter_id",
label: "Encounter ID",
type: "text" as const,
placeholder: "Search by encounter ID",
value: encounter_id || "",
shortcutKey: "i",
},
{
key: "external_identifier",
label: "External ID",
type: "text" as const,
placeholder: "Search by external ID",
value: external_identifier || "",
shortcutKey: "e",
},
];

Expand Down Expand Up @@ -285,6 +281,9 @@ export function EncounterList({
<SearchByMultipleFields
id="encounter-search"
options={searchOptions}
initialOptionIndex={searchOptions.findIndex(
(option) => option.value !== "",
)}
onFieldChange={handleFieldChange}
onSearch={handleSearch}
clearSearch={clearSearch}
Expand Down
1 change: 0 additions & 1 deletion src/pages/Facility/FacilitiesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export function FacilitiesPage() {
type: "text" as const,
placeholder: t("facility_search_placeholder_text"),
value: qParams.name || "",
shortcutKey: "f",
},
]}
className="w-full sm:w-1/2"
Expand Down
2 changes: 0 additions & 2 deletions src/pages/Organization/OrganizationPatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,12 @@ export default function OrganizationPatients({ id, navOrganizationId }: Props) {
type: "text",
placeholder: "Search by name",
value: qParams.name || "",
shortcutKey: "n",
},
{
key: "phone_number",
type: "phone",
placeholder: "Search by phone number",
value: qParams.phone_number || "",
shortcutKey: "p",
},
]}
onSearch={handleSearch}
Expand Down

0 comments on commit 3cfb24a

Please sign in to comment.