Skip to content

Commit 4b9e74f

Browse files
committed
Making the function start with capital letter
1 parent a5ade0e commit 4b9e74f

File tree

9 files changed

+64
-95
lines changed

9 files changed

+64
-95
lines changed

packages/esm-patient-queues-app/src/active-visits/change-status-move-to-next-dialog.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const ChangeStatusMoveToNext: React.FC<ChangeStatusDialogProps> = ({ patientUuid
169169
queueEntry[0]?.uuid,
170170
contentSwitcherIndex,
171171
priorityComment,
172-
"comment",
172+
'comment',
173173
);
174174

175175
let navigateTo = `${window.getOpenmrsSpaBase()}home`;

packages/esm-patient-queues-app/src/active-visits/queue-patients-clinical/queue-clinical-table.component.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ const ActiveClinicalVisitsTable: React.FC<ActiveVisitsTableProps> = ({ status })
8181
setSearchTerm(event?.target?.value?.trim().toLowerCase());
8282
}, []);
8383

84-
8584
const { isLoading, items, totalCount, currentPageSize, setPageSize, pageSizes, currentPage, setCurrentPage } =
8685
usePatientQueuePages(activeLocationUuid, status, isToggled, true);
8786

packages/esm-ugandaemr-app/src/app-menu/app-search-bar/app-search-bar.component.tsx

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ interface AppSearchBarProps {
1818
const AppSearchBar = React.forwardRef<HTMLInputElement, AppSearchBarProps>(
1919
({ onChange, onClear, onSubmit, small }, ref) => {
2020
const { t } = useTranslation();
21-
const [searchTerm, setSearchTerm] = useState("");
22-
const menuItemExtensions = useAssignedExtensions(
23-
appMenuItemSlot
24-
) as AssignedExtension[];
21+
const [searchTerm, setSearchTerm] = useState('');
22+
const menuItemExtensions = useAssignedExtensions(appMenuItemSlot) as AssignedExtension[];
2523

2624
const handleChange = (val: string) => {
2725
setSearchTerm(val);
@@ -39,7 +37,7 @@ const AppSearchBar = React.forwardRef<HTMLInputElement, AppSearchBarProps>(
3937

4038
const filteredExtensions = menuItemExtensions
4139
.filter((extension) => {
42-
const itemName = extension?.name ?? "";
40+
const itemName = extension?.name ?? '';
4341
return itemName.toLowerCase().includes(searchTerm.toLowerCase());
4442
})
4543
.map((extension) => (
@@ -65,12 +63,12 @@ const AppSearchBar = React.forwardRef<HTMLInputElement, AppSearchBarProps>(
6563
<Search
6664
autoFocus
6765
className={styles.appSearchInput}
68-
closeButtonLabelText={t("clearSearch", "Clear")}
66+
closeButtonLabelText={t('clearSearch', 'Clear')}
6967
labelText=""
7068
onChange={(event) => handleChange(event.target.value)}
7169
onClear={onClear}
72-
placeholder={t("searchForApp", "Search for an application")}
73-
size={small ? "sm" : "lg"}
70+
placeholder={t('searchForApp', 'Search for an application')}
71+
size={small ? 'sm' : 'lg'}
7472
value={searchTerm}
7573
ref={ref}
7674
data-testid="appSearchBar"
@@ -80,26 +78,25 @@ const AppSearchBar = React.forwardRef<HTMLInputElement, AppSearchBarProps>(
8078
{searchTerm
8179
? filteredExtensions
8280
: menuItemExtensions.map((extension) => (
83-
<ComponentContext.Provider
84-
key={extension?.id}
85-
value={{
86-
featureName: extension?.moduleName,
87-
moduleName: extension?.moduleName,
88-
extension: {
89-
extensionId: extension?.id,
90-
extensionSlotName: appMenuItemSlot,
91-
extensionSlotModuleName: extension?.moduleName,
92-
},
93-
}}
94-
>
95-
<Extension />
96-
</ComponentContext.Provider>
97-
))}
81+
<ComponentContext.Provider
82+
key={extension?.id}
83+
value={{
84+
featureName: extension?.moduleName,
85+
moduleName: extension?.moduleName,
86+
extension: {
87+
extensionId: extension?.id,
88+
extensionSlotName: appMenuItemSlot,
89+
extensionSlotModuleName: extension?.moduleName,
90+
},
91+
}}
92+
>
93+
<Extension />
94+
</ComponentContext.Provider>
95+
))}
9896
</div>
9997
</>
10098
);
101-
}
99+
},
102100
);
103101

104-
export default AppSearchBar;;
105-
102+
export default AppSearchBar;

packages/esm-ugandaemr-app/src/app-menu/app-search-icon/app-search-icon.component.tsx

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
import React, { useCallback, useState } from "react";
2-
import { useTranslation } from "react-i18next";
3-
import { HeaderGlobalAction } from "@carbon/react";
4-
import { Close, Switcher } from "@carbon/react/icons";
5-
import AppSearchOverlay from "../app-search-overlay/app-search-overlay.component";
6-
import styles from "./app-search-icon.scss";
1+
import React, { useCallback, useState } from 'react';
2+
import { useTranslation } from 'react-i18next';
3+
import { HeaderGlobalAction } from '@carbon/react';
4+
import { Close, Switcher } from '@carbon/react/icons';
5+
import AppSearchOverlay from '../app-search-overlay/app-search-overlay.component';
6+
import styles from './app-search-icon.scss';
77

8-
interface AppSearchLaunchProps { }
8+
interface AppSearchLaunchProps {}
99

1010
const AppSearchLaunch: React.FC<AppSearchLaunchProps> = () => {
1111
const { t } = useTranslation();
1212
const [showSearchInput, setShowSearchInput] = useState(false);
1313

14-
1514
const handleGlobalAction = useCallback(() => {
1615
if (showSearchInput) {
1716
setShowSearchInput(false);
@@ -20,24 +19,15 @@ const AppSearchLaunch: React.FC<AppSearchLaunchProps> = () => {
2019
}
2120
}, [setShowSearchInput, showSearchInput]);
2221

23-
2422
return (
2523
<div className={styles.appSearchIconWrapper}>
26-
{showSearchInput && (
27-
<AppSearchOverlay
28-
onClose={handleGlobalAction}
29-
query={''}
30-
/>
31-
)}
24+
{showSearchInput && <AppSearchOverlay onClose={handleGlobalAction} query={''} />}
3225

3326
<div className={`${showSearchInput && styles.closeButton}`}>
3427
<HeaderGlobalAction
35-
aria-label={t("searchApp", "Search App")}
28+
aria-label={t('searchApp', 'Search App')}
3629
aria-labelledby="Search App"
37-
className={`${showSearchInput
38-
? styles.activeSearchIconButton
39-
: styles.searchIconButton
40-
}`}
30+
className={`${showSearchInput ? styles.activeSearchIconButton : styles.searchIconButton}`}
4131
enterDelayMs={500}
4232
name="SearchAppIcon"
4333
data-testid="searchAppIcon"
@@ -47,7 +37,6 @@ const AppSearchLaunch: React.FC<AppSearchLaunchProps> = () => {
4737
</HeaderGlobalAction>
4838
</div>
4939
</div>
50-
5140
);
5241
};
5342

packages/esm-ugandaemr-app/src/app-menu/app-search-overlay/app-search-overlay.component.tsx

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
import React, { useCallback, useEffect, useState } from "react";
2-
import { useTranslation } from "react-i18next";
3-
import Overlay from "../../overlay/overlay";
4-
import AppSearchBar from "../app-search-bar/app-search-bar.component";
5-
import debounce from "lodash-es/debounce";
1+
import React, { useCallback, useEffect, useState } from 'react';
2+
import { useTranslation } from 'react-i18next';
3+
import Overlay from '../../overlay/overlay';
4+
import AppSearchBar from '../app-search-bar/app-search-bar.component';
5+
import debounce from 'lodash-es/debounce';
66

77
interface AppSearchOverlayProps {
88
onClose: () => void;
99
query?: string;
1010
header?: string;
1111
}
1212

13-
const AppSearchOverlay: React.FC<AppSearchOverlayProps> = ({
14-
onClose,
15-
query = "",
16-
header,
17-
}) => {
13+
const AppSearchOverlay: React.FC<AppSearchOverlayProps> = ({ onClose, query = '', header }) => {
1814
const { t } = useTranslation();
1915
const [searchTerm, setSearchTerm] = useState(query);
20-
const handleClear = useCallback(() => setSearchTerm(""), [setSearchTerm]);
16+
const handleClear = useCallback(() => setSearchTerm(''), [setSearchTerm]);
2117

2218
useEffect(() => {
2319
if (query) {
@@ -30,15 +26,8 @@ const AppSearchOverlay: React.FC<AppSearchOverlayProps> = ({
3026
}, 300);
3127

3228
return (
33-
<Overlay
34-
header={header ?? t("searchResults", "Search results")}
35-
close={onClose}
36-
>
37-
<AppSearchBar
38-
onSubmit={onSearchQueryChange}
39-
onChange={onSearchQueryChange}
40-
onClear={handleClear}
41-
/>
29+
<Overlay header={header ?? t('searchResults', 'Search results')} close={onClose}>
30+
<AppSearchBar onSubmit={onSearchQueryChange} onChange={onSearchQueryChange} onClear={handleClear} />
4231
</Overlay>
4332
);
4433
};

packages/esm-ugandaemr-app/src/dashboard.meta.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ export const htsDashboardMeta = {
3131
title: 'HTS',
3232
path: 'hts',
3333
layoutMode: 'anchored',
34-
};
34+
};

packages/esm-ugandaemr-app/src/index.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,25 @@ import SubjectiveFindingsComponent from './pages/clinical-patient-summary/clinic
2020
import ObjectiveFindingsComponent from './pages/clinical-patient-summary/clinical-patient-summary-tabs/objective-findings.component';
2121
import TreatmentPlanComponent from './pages/clinical-patient-summary/clinical-patient-summary-tabs/treatment-plan.component';
2222
import AssessmentComponent from './pages/clinical-patient-summary/clinical-patient-summary-tabs/assessment.component';
23-
import { createOHRIPatientChartSideNavLink, patientChartDivider_dashboardMeta } from "@ohri/openmrs-esm-ohri-commons-lib";
23+
import {
24+
createOHRIPatientChartSideNavLink,
25+
patientChartDivider_dashboardMeta,
26+
} from '@ohri/openmrs-esm-ohri-commons-lib';
2427

2528
import {
2629
CalcMonthsOnART,
2730
DSDMCategorizationDatasource,
2831
latestObs,
2932
patientDSDM,
3033
} from './custom-expressions/custom-expressions';
31-
import { generalCounsellingDashboardMeta, hivCareAndTreatmentDashboardDMeta, hivPrevetionServicesboardDMeta, htsDashboardMeta } from './dashboard.meta';
34+
import {
35+
generalCounsellingDashboardMeta,
36+
hivCareAndTreatmentDashboardDMeta,
37+
hivPrevetionServicesboardDMeta,
38+
htsDashboardMeta,
39+
} from './dashboard.meta';
3240
import GeneralCounsellingSummary from './views/hiv/hct/general-counselling/general-counselling-summary.component';
33-
import hivTestingServices from './views/hiv/hps/hts/hiv-testing-services.component';
41+
import HivTestingServices from './views/hiv/hps/hts/hiv-testing-services.component';
3442

3543
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
3644

@@ -130,17 +138,13 @@ export const generalCounsellingDashboard = getSyncLifecycle(GeneralCounsellingSu
130138
moduleName,
131139
});
132140

133-
export const htsDashboardLink = getSyncLifecycle(
134-
createDashboardLink({ ...htsDashboardMeta, moduleName }),
135-
options,
136-
);
141+
export const htsDashboardLink = getSyncLifecycle(createDashboardLink({ ...htsDashboardMeta, moduleName }), options);
137142

138-
export const htsDashboard = getSyncLifecycle(hivTestingServices, {
143+
export const htsDashboard = getSyncLifecycle(HivTestingServices, {
139144
featureName: 'hiv-testing-services',
140145
moduleName,
141146
});
142147

143-
144148
export const clinicalPatientSummary = getSyncLifecycle(ClinicalPatientSummary, options);
145149

146150
export const clincialPatientSummaryTabs = getSyncLifecycle(ClinicalPatientSummaryTabs, options);

packages/esm-ugandaemr-app/src/overlay/overlay.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React from "react";
1+
import React from 'react';
22

3-
import { isDesktop, useLayoutType } from "@openmrs/esm-framework";
4-
import styles from "./overlay.scss";
3+
import { isDesktop, useLayoutType } from '@openmrs/esm-framework';
4+
import styles from './overlay.scss';
55

66
interface OverlayProps {
77
close: () => void;
@@ -10,20 +10,11 @@ interface OverlayProps {
1010
buttonsGroup?: React.ReactElement;
1111
}
1212

13-
const Overlay: React.FC<OverlayProps> = ({
14-
close,
15-
children,
16-
header,
17-
buttonsGroup,
18-
}) => {
13+
const Overlay: React.FC<OverlayProps> = ({ close, children, header, buttonsGroup }) => {
1914
const layout = useLayoutType();
2015

2116
return (
22-
<div
23-
className={
24-
isDesktop(layout) ? styles.desktopOverlay : styles.tabletOverlay
25-
}
26-
>
17+
<div className={isDesktop(layout) ? styles.desktopOverlay : styles.tabletOverlay}>
2718
<div className={styles.overlayContent}>{children}</div>
2819
<div className={styles.buttonsGroup}>{buttonsGroup}</div>
2920
</div>

packages/esm-ugandaemr-app/src/views/hiv/hps/hts/hiv-testing-services.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface OverviewListProps {
77
patientUuid: string;
88
}
99

10-
const hivTestingServices: React.FC<OverviewListProps> = ({ patientUuid }) => {
10+
const HivTestingServices: React.FC<OverviewListProps> = ({ patientUuid }) => {
1111
const config = useConfig();
1212

1313
const tabFilter = (encounter, formName) => {
@@ -24,4 +24,4 @@ const hivTestingServices: React.FC<OverviewListProps> = ({ patientUuid }) => {
2424
);
2525
};
2626

27-
export default hivTestingServices;
27+
export default HivTestingServices;

0 commit comments

Comments
 (0)