Skip to content

Commit 3fe3a65

Browse files
committed
chore
1 parent 683360a commit 3fe3a65

File tree

4 files changed

+5
-23
lines changed

4 files changed

+5
-23
lines changed

packages/esm-patient-queues-app/src/active-visits/patient-queues.resource.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ export function usePatientQueuePages(
241241
isToggled?: boolean,
242242
isClinical?: boolean,
243243
) {
244-
245244
const [patientQueueFilter, setPatientQueueFilter] = useState<PatientQueueFilter>({
246245
v: ResourceRepresentation.Full,
247246
totalCount: true,
@@ -264,7 +263,7 @@ export function usePatientQueuePages(
264263
status: isToggled ? currentStatus : '',
265264
room: !isToggled ? currentLocation : '',
266265
});
267-
}, [ currentPage, currentPageSize, currentLocation, currentStatus, isToggled, isClinical]);
266+
}, [currentPage, currentPageSize, currentLocation, currentStatus, isToggled, isClinical]);
268267

269268
return {
270269
items: paginatedItems,

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ import {
2020

2121
import { useTranslation } from 'react-i18next';
2222
import { useSession, useLayoutType, isDesktop, useConfig } from '@openmrs/esm-framework';
23-
import {
24-
getOriginFromPathName,
25-
useParentLocation,
26-
usePatientQueuePages,
27-
} from '../patient-queues.resource';
23+
import { getOriginFromPathName, useParentLocation, usePatientQueuePages } from '../patient-queues.resource';
2824
import StatusIcon, {
2925
QueueStatus,
3026
buildStatusString,

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ import {
2020

2121
import { useTranslation } from 'react-i18next';
2222
import { useSession, useLayoutType, isDesktop, useConfig } from '@openmrs/esm-framework';
23-
import {
24-
getOriginFromPathName,
25-
useParentLocation,
26-
usePatientQueuePages,
27-
} from '../patient-queues.resource';
23+
import { getOriginFromPathName, useParentLocation, usePatientQueuePages } from '../patient-queues.resource';
2824
import StatusIcon, {
2925
QueueStatus,
3026
buildStatusString,

packages/esm-patient-queues-app/src/helpers/functions.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import React from 'react';
22
import dayjs from 'dayjs';
3-
import { restBaseUrl ,getGlobalStore} from '@openmrs/esm-framework';
3+
import { restBaseUrl, getGlobalStore } from '@openmrs/esm-framework';
44
import debounce from 'lodash-es/debounce';
55
import { mutate } from 'swr';
66
import { Group, InProgress } from '@carbon/react/icons';
77
import { PatientQueue } from '../types/patient-queues';
88

9-
109
export type amPm = 'AM' | 'PM';
1110

12-
1311
export const buildStatusString = (status: string) => {
1412
if (!status) {
1513
return '';
@@ -66,8 +64,6 @@ export const getProviderTagColor = (entryProvider: string, loggedInProviderName:
6664
}
6765
};
6866

69-
70-
7167
function StatusIcon({ status }) {
7268
switch (status) {
7369
case 'pending':
@@ -83,7 +79,6 @@ function StatusIcon({ status }) {
8379

8480
export default StatusIcon;
8581

86-
8782
export const convertTime12to24 = (time12h, timeFormat: amPm) => {
8883
let [hours, minutes] = time12h.split(':');
8984

@@ -98,7 +93,6 @@ export const convertTime12to24 = (time12h, timeFormat: amPm) => {
9893
return [hours, minutes];
9994
};
10095

101-
10296
export function extractErrorMessagesFromResponse(errorObject) {
10397
const fieldErrors = errorObject?.responseBody?.error?.fieldErrors;
10498
if (!fieldErrors) {
@@ -146,7 +140,6 @@ export interface PagingCriteria {
146140
limit?: number | null;
147141
}
148142

149-
150143
export enum ResourceRepresentation {
151144
Default = 'default',
152145
Full = 'full',
@@ -179,8 +172,6 @@ export function toQueryParams<T extends ResourceFilterCriteria>(
179172
return queryParams.length > 0 ? '?' + queryParams : '';
180173
}
181174

182-
183-
184175
export function getPatientQueueWaitingList() {
185176
return getGlobalStore<{ queue: PatientQueue[] }>('patientQueueWaitingList', { queue: [] });
186177
}
@@ -189,4 +180,4 @@ export function getPatientQueueWaitingList() {
189180
export const updatePatientQueueWaitingList = (queue: PatientQueue[]) => {
190181
const store = getPatientQueueWaitingList();
191182
store.setState({ queue });
192-
};
183+
};

0 commit comments

Comments
 (0)