Skip to content

Commit

Permalink
Merge pull request #623 from jona42-ui/tj/resultcomponent
Browse files Browse the repository at this point in the history
(feat)add translations to the search result form component
  • Loading branch information
mozzy11 authored Dec 4, 2023
2 parents a4cf106 + 4b35a41 commit ec48f57
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
16 changes: 6 additions & 10 deletions frontend/src/components/resultPage/SearchResultForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import {
convertAlphaNumLabNumForDisplay,
} from "../utils/Utils";
import {
Heading,
Form,
FormLabel,
TextInput,
TextArea,
Checkbox,
Expand All @@ -19,7 +17,6 @@ import {
DatePicker,
DatePickerInput,
Stack,
Section,
Pagination,
Select,
SelectItem,
Expand Down Expand Up @@ -101,7 +98,6 @@ export function SearchResultForm(props) {
}
};

const handleAdvancedSearch = () => {};

const loadNextResultsPage = () => {
setLoading(true);
Expand Down Expand Up @@ -877,15 +873,15 @@ export function SearchResults(props) {
value={data.pastNotes}
disabled={true}
type="text"
labelText="Past Notes"
labelText={<FormattedMessage id="referral.testresult.pastnote"/>}
rows={2}
></TextArea>
</Column>
<Column lg={2}>
<Select
id={"testMethod" + data.id}
name={"testResult[" + data.id + "].testMethod"}
labelText={"Methods"}
labelText={<FormattedMessage id= "referral.label.testmethod"/>}
onChange={(e) => handleChange(e, data.id)}
value={data.method}
>
Expand All @@ -904,7 +900,7 @@ export function SearchResults(props) {
id={"referralReason" + data.id}
name={"testResult[" + data.id + "].referralReason"}
// noLabel={true}
labelText={"Referral Reason"}
labelText={<FormattedMessage id= "referral.label.reason"/>}
onChange={(e) => handleChange(e, data.id)}
>
{/* {...updateShadowResult(e, this, param.rowId)} */}
Expand All @@ -923,7 +919,7 @@ export function SearchResults(props) {
id={"institute" + data.id}
name={"testResult[" + data.id + "].institute"}
// noLabel={true}
labelText={"Institute"}
labelText={<FormattedMessage id ="referral.label.institute"/>}
onChange={(e) => handleChange(e, data.id)}
>
{/* {...updateShadowResult(e, this, param.rowId)} */}
Expand All @@ -939,7 +935,7 @@ export function SearchResults(props) {
id={"testToPerform" + data.id}
name={"testResult[" + data.id + "].testToPerform"}
// noLabel={true}
labelText={"Test to Perform"}
labelText={<FormattedMessage id="referral.label.testtoperform"/>}
onChange={(e) => handleChange(e, data.id)}
>
{/* {...updateShadowResult(e, this, param.rowId)} */}
Expand All @@ -956,7 +952,7 @@ export function SearchResults(props) {
>
<DatePickerInput
placeholder="mm/dd/yyyy"
labelText="Sent Date"
labelText={<FormattedMessage id="referral.label.sentdate"/>}
id="date-picker-single"
/>
</DatePicker>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@
"patient.label": "Patient",
"requester.label": "Requester",
"search.patient.label": "Search for Patient",
"referral.label.institute":"Institute",
"referral.label.testmethod":"Method",
"referral.testresult.pastnote":"Past Notes",
"referral.label.sentdate":"Sent Date",
"referral.label.reason":"Referral Reason",
"new.patient.label": "New Patient",
"sample.select.type": "Select sample type",
"sample.reject.label": "Reject Sample",
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
"result.noTestsFound": "Aucun test approprié trouvé",
"quick.entry.accession.number":"N° Labo",
"patient.subject.number":"Sujet No.",
"referral.label.institute":"Institut",
"referral.label.testmethod":"Méthode",
"referral.testresult.pastnote":"Notes passées",
"referral.label.sentdate":"Date envoyée",
"referral.label.reason":"Raison de la référence",
"sample.entry.nextVisit.date":"Date de rendez vous",
"sample.entry.project.testName":"Nom du Test",
"sample.receivedDate":"Date de réception",
Expand Down

0 comments on commit ec48f57

Please sign in to comment.