From 9f40efc2ebc3bc36acd47b39aad493cd308d5263 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Mon, 2 Dec 2024 17:12:10 +0100 Subject: [PATCH 01/22] Add PageContainer component --- .../BaseLayout/BaseLayout.module.scss | 35 ---- .../BaseLayout/BaseLayout.styles.ts | 62 ++++++- .../PageContainer/PageContainer.stories.tsx | 172 ++++++++++++++++++ .../BaseLayout/PageContainer/index.tsx | 54 ++++++ .../BaseLayout/PageContainer/styles.ts | 46 +++++ src/components/BaseLayout/index.tsx | 48 ++--- 6 files changed, 357 insertions(+), 60 deletions(-) delete mode 100644 src/components/BaseLayout/BaseLayout.module.scss create mode 100644 src/components/BaseLayout/PageContainer/PageContainer.stories.tsx create mode 100644 src/components/BaseLayout/PageContainer/index.tsx create mode 100644 src/components/BaseLayout/PageContainer/styles.ts diff --git a/src/components/BaseLayout/BaseLayout.module.scss b/src/components/BaseLayout/BaseLayout.module.scss deleted file mode 100644 index f566b4a6..00000000 --- a/src/components/BaseLayout/BaseLayout.module.scss +++ /dev/null @@ -1,35 +0,0 @@ -.content { - background: 0; - position: relative; - padding-bottom: 64px; -} - -.pageHeader { - flex: 1; - display: flex; - flex-direction: column; - padding: 24px 20px; - - @media screen and (min-width: 1281px) { - max-width: 1120px; - } -} - -.pageContentWrapper { - @media screen and (min-width: 1281px) { - display: flex; - justify-content: center; - } -} - -.pageContent { - flex: 1; - display: flex; - flex-direction: column; - padding: 40px 20px; - gap: 40px; - - @media screen and (min-width: 1281px) { - max-width: 1120px; - } -} diff --git a/src/components/BaseLayout/BaseLayout.styles.ts b/src/components/BaseLayout/BaseLayout.styles.ts index 5b9101f5..dc004dfe 100644 --- a/src/components/BaseLayout/BaseLayout.styles.ts +++ b/src/components/BaseLayout/BaseLayout.styles.ts @@ -1,5 +1,26 @@ import { Layout } from 'antd'; -import styled from 'styled-components'; +import { isNumber, isString } from 'lodash'; +import styled, { css } from 'styled-components'; + +const maxWidthStyles = css<{ $maxWidth?: number | string }>` + ${({ $maxWidth }) => { + if (isNumber($maxWidth)) { + return css` + max-width: ${() => `${$maxWidth}px`}; + `; + } + + if (isString($maxWidth)) { + return css` + max-width: ${() => `${$maxWidth}`}; + `; + } + + return css` + max-width: 1080px; + `; + }} +`; export const S = { Container: styled(Layout)` @@ -10,9 +31,42 @@ export const S = { padding-top: 50px; } `, - PageWrapper: styled.div` - background-color: ${({ theme }) => theme.primaryPalette.bcp_1}; + Layout: styled(Layout)` + background: 0; + position: relative; + padding-bottom: 64px; + `, + PageHeaderContainer: styled.div` + background-color: ${({ theme }) => theme.neutralPalette.gray_1}; display: flex; - justify-content: center; + flex-direction: column; + align-items: center; + padding: 0 24px; + `, + PageHeader: styled.div<{ $maxWidth?: number | string }>` + flex: 1; + display: flex; + flex-direction: column; + padding: 24px 0; + gap: 32px 0; + width: 100%; + + ${maxWidthStyles} + `, + PageContentContainer: styled.div` + padding: 0 24px; + display: flex; + flex-direction: column; + align-items: center; + `, + PageContent: styled.div<{ $maxWidth?: number | string }>` + flex: 1; + display: flex; + flex-direction: column; + padding: 32px 0; + gap: 24px 0; + width: 100%; + + ${maxWidthStyles} `, }; diff --git a/src/components/BaseLayout/PageContainer/PageContainer.stories.tsx b/src/components/BaseLayout/PageContainer/PageContainer.stories.tsx new file mode 100644 index 00000000..4a43d292 --- /dev/null +++ b/src/components/BaseLayout/PageContainer/PageContainer.stories.tsx @@ -0,0 +1,172 @@ +import { CalendarOutlined, MailOutlined, PhoneOutlined, PlusOutlined } from '@ant-design/icons'; +import { Meta, StoryObj } from '@storybook/react'; +import { Button, Input } from 'antd'; +import styled from 'styled-components'; + +import { Table } from 'src/components/Table'; +import { Tabs } from 'src/components/Tabs'; +import { Text } from 'src/components/Typography'; +import { withColorSchemeDecorator } from 'src/storybook/decorators'; + +import { PageContainer, PageContainerProps } from './index'; + +const content = ( + <> + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. In suscipit magna sed pretium maximus. Duis + bibendum a lacus ut commodo. Nam eget justo tristique, tincidunt ligula vel, accumsan odio. Morbi purus + ante, bibendum vitae arcu eget, ultrices faucibus dolor. Sed fermentum blandit malesuada. Duis fringilla ac + tortor ut convallis. Fusce iaculis arcu dui. Ut non neque rhoncus, tincidunt ipsum in, lobortis magna. Donec + aliquet leo tellus. Proin pulvinar lacus sodales tortor eleifend rhoncus. Praesent varius maximus pulvinar. + + +); + +const table = ( + '-', + }, + { + title: 'Practitioner', + dataIndex: 'practitioner', + key: 'practitioner', + width: '50%', + render: () => '-', + }, + ]} + /> +); + +const tabs = ( + +); + +const S = { + Container: styled.div` + background-color: ${({ theme }) => theme.neutralPalette.gray_2}; + `, + CustomRightColumn: styled.div` + display: flex; + align-items: center; + gap: 0 16px; + `, + Item: styled.div` + display: flex; + align-items: center; + gap: 0 4px; + color: ${({ theme }) => theme.neutral.secondaryText}; + `, +}; + +const rightColumn1 = ( + + + + 05/12/1955 • 66 y.o. + + + + +972-222-3333 + + + + cooper@gmail.com + + +); + +const rightColumn2 = ( + <> + + + +); + +const meta: Meta = { + title: 'Layout / PageContainer', + component: PageContainer, + // @ts-ignore + decorators: [withColorSchemeDecorator], + args: { + title: 'Patients', + children: content, + }, + render: (args) => { + return ( + + + + ); + }, +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + title: 'Madison Cooper', + headerRightColumn: rightColumn1, + }, +}; + +export const WithTable: Story = { + args: { + variant: 'with-table', + children: table, + headerRightColumn: rightColumn2, + }, +}; + +export const WithTabs: Story = { + args: { + variant: 'with-tabs', + header: { + children: tabs, + }, + }, +}; + +export const FullWidth: Story = { + args: { + maxWidth: '100%', + }, +}; + +export const CustomWidth: Story = { + args: { + maxWidth: 500, + }, +}; diff --git a/src/components/BaseLayout/PageContainer/index.tsx b/src/components/BaseLayout/PageContainer/index.tsx new file mode 100644 index 00000000..c072499b --- /dev/null +++ b/src/components/BaseLayout/PageContainer/index.tsx @@ -0,0 +1,54 @@ +import { Title } from 'src/components'; + +import { S } from './styles'; +import { BasePageContentProps, BasePageHeaderProps } from '..'; + +export interface PageContainerProps { + variant?: 'default' | 'with-table' | 'with-tabs'; + maxWidth?: number | string; + title?: React.ReactNode; + headerLeftColumn?: React.ReactNode; + headerRightColumn?: React.ReactNode; + children?: React.ReactNode; + + header?: BasePageHeaderProps; + content?: BasePageContentProps; +} + +export function PageContainer(props: PageContainerProps = {}) { + const { + variant = 'default', + title, + header, + content, + children, + maxWidth, + headerLeftColumn, + headerRightColumn, + } = props; + + return ( + <> + + + + {headerLeftColumn ? ( + headerLeftColumn + ) : ( + <>{title && {title}} + )} + + {headerRightColumn && {headerRightColumn}} + + {header?.children} + + + {content?.children ?? children} + + + ); +} + +export function PageContainerTitle(props: React.HTMLAttributes) { + return ; +} diff --git a/src/components/BaseLayout/PageContainer/styles.ts b/src/components/BaseLayout/PageContainer/styles.ts new file mode 100644 index 00000000..1f527abf --- /dev/null +++ b/src/components/BaseLayout/PageContainer/styles.ts @@ -0,0 +1,46 @@ +import styled, { css } from 'styled-components'; + +import { BasePageContent, BasePageHeader } from '..'; + +export const S = { + HeaderContainer: styled(BasePageHeader)<{ $variant?: 'default' | 'with-table' | 'with-tabs' }>` + display: flex; + flex-direction: column; + + ${({ $variant }) => + $variant === 'with-table' && + css` + padding-bottom: 79px; + `} + + ${({ $variant }) => + $variant === 'with-tabs' && + css` + padding-bottom: 0; + `} + `, + Header: styled.div` + display: flex; + justify-content: space-between; + align-items: center; + gap: 0 40px; + `, + HeaderLeftColumn: styled.div` + display: flex; + align-items: center; + gap: 0 8px; + `, + HeaderRightColumn: styled.div` + display: flex; + align-items: center; + gap: 0 40px; + `, + ContentContainer: styled(BasePageContent)<{ $variant?: 'default' | 'with-table' | 'with-tabs' }>` + ${({ $variant }) => + $variant === 'with-table' && + css` + padding-top: 0; + margin-top: -47px; + `} + `, +}; diff --git a/src/components/BaseLayout/index.tsx b/src/components/BaseLayout/index.tsx index 591222aa..3154f315 100644 --- a/src/components/BaseLayout/index.tsx +++ b/src/components/BaseLayout/index.tsx @@ -1,8 +1,5 @@ -import { Layout } from 'antd'; -import classNames from 'classnames'; import { ReactNode } from 'react'; -import s from './BaseLayout.module.scss'; import { S } from './BaseLayout.styles'; import { AppFooter } from './Footer'; import { AppSidebar } from './Sidebar'; @@ -11,49 +8,58 @@ import { AppTabBar } from './TabBar'; interface Props { children: ReactNode; style?: React.CSSProperties; + className?: string | undefined; } -export function BaseLayout({ children, style }: Props) { +export function BaseLayout({ children, style, className }: Props) { return ( - <S.Container style={style}> + <S.Container style={style} className={className}> <AppSidebar /> <AppTabBar /> - <Layout className={s.content}> + <S.Layout> {children} <AppFooter /> - </Layout> + </S.Layout> </S.Container> ); } -export function AnonymousLayout({ children, style }: Props) { +export function AnonymousLayout({ children, style, className }: Props) { return ( - <S.Container style={style}> + <S.Container style={style} className={className}> <AppSidebar /> - <Layout className={s.content}> + <S.Layout> {children} <AppFooter /> - </Layout> + </S.Layout> </S.Container> ); } -export function BasePageHeader(props: React.HTMLAttributes<HTMLDivElement>) { - const { className, ...rest } = props; +export type BasePageHeaderProps = React.HTMLAttributes<HTMLDivElement> & { + maxWidth?: number | string; +}; + +export function BasePageHeader(props: BasePageHeaderProps) { + const { maxWidth, ...rest } = props; return ( - <S.PageWrapper> - <div className={classNames(s.pageHeader, className)} {...rest} /> - </S.PageWrapper> + <S.PageHeaderContainer> + <S.PageHeader {...rest} $maxWidth={maxWidth} /> + </S.PageHeaderContainer> ); } -export function BasePageContent(props: React.HTMLAttributes<HTMLDivElement>) { - const { className, ...rest } = props; +export type BasePageContentProps = React.HTMLAttributes<HTMLDivElement> & { + maxWidth?: number | string; +}; + +export function BasePageContent(props: BasePageContentProps) { + const { maxWidth, ...rest } = props; return ( - <div className={s.pageContentWrapper}> - <div className={classNames(s.pageContent, className)} {...rest} /> - </div> + <S.PageContentContainer> + <S.PageContent {...rest} $maxWidth={maxWidth} /> + </S.PageContentContainer> ); } From eec11cb5f332d3c32b4ea571d74a60d2cf3d4a18 Mon Sep 17 00:00:00 2001 From: Elena Grednikova <vesnushkalena@gmail.com> Date: Mon, 2 Dec 2024 17:13:30 +0100 Subject: [PATCH 02/22] Update Table component and add Tabs component --- src/components/Table/index.tsx | 2 +- src/components/Tabs/Tabs.stories.tsx | 46 ++++++++++++++++++++++++++++ src/components/Tabs/index.tsx | 17 ++++++++++ src/components/Tabs/styles.ts | 28 +++++++++++++++++ src/theme/antd-theme.ts | 5 +++ 5 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/components/Tabs/Tabs.stories.tsx create mode 100644 src/components/Tabs/index.tsx create mode 100644 src/components/Tabs/styles.ts diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index cf7c7658..19f721ac 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -6,7 +6,7 @@ import s from './Table.module.scss'; export function Table<T extends object>(props: TableProps<T>) { return ( <div className={s.container}> - <ANTDTable<T> className={s.table} bordered {...props} /> + <ANTDTable<T> className={s.table} bordered size="middle" {...props} /> </div> ); } diff --git a/src/components/Tabs/Tabs.stories.tsx b/src/components/Tabs/Tabs.stories.tsx new file mode 100644 index 00000000..4190bb97 --- /dev/null +++ b/src/components/Tabs/Tabs.stories.tsx @@ -0,0 +1,46 @@ +import { Meta, StoryObj } from '@storybook/react'; + +import { withColorSchemeDecorator } from 'src/storybook/decorators'; + +import { Tabs, TabsProps } from './index'; + +const args: TabsProps = { + items: [ + { + label: 'Tab', + key: 'tab1', + }, + { + label: 'Tab', + key: 'tab2', + }, + { + label: 'Tab', + key: 'tab3', + }, + { + label: 'Tab', + key: 'tab4', + }, + ], + activeKey: 'tab2', +}; + +const meta: Meta<TabsProps> = { + title: 'components / Tabs', + component: Tabs, + decorators: [withColorSchemeDecorator], + args, +}; + +export default meta; + +type Story = StoryObj<TabsProps>; + +export const Default: Story = {}; + +export const NoDivider: Story = { + args: { + boxShadow: false, + }, +}; diff --git a/src/components/Tabs/index.tsx b/src/components/Tabs/index.tsx new file mode 100644 index 00000000..9726bb69 --- /dev/null +++ b/src/components/Tabs/index.tsx @@ -0,0 +1,17 @@ +import { Tabs as ANTDTabs, TabsProps as ANTDTabsProps } from 'antd'; + +import { S } from './styles'; + +export interface TabsProps extends ANTDTabsProps { + boxShadow?: boolean; +} + +export function Tabs(props: TabsProps) { + const { boxShadow = true, ...rest } = props; + + return ( + <S.Tabs $boxShadow={boxShadow}> + <ANTDTabs size="large" {...rest} /> + </S.Tabs> + ); +} diff --git a/src/components/Tabs/styles.ts b/src/components/Tabs/styles.ts new file mode 100644 index 00000000..0b3bff95 --- /dev/null +++ b/src/components/Tabs/styles.ts @@ -0,0 +1,28 @@ +import styled, { css } from 'styled-components'; + +export const S = { + Tabs: styled.div<{ $boxShadow?: boolean }>` + .ant-tabs-nav { + margin-bottom: 0; + + &:before { + border-bottom-width: 0; + + ${({ $boxShadow }) => + $boxShadow && + css` + border-bottom-width: 1px; + `} + } + } + + .ant-tabs-tab { + font-weight: 400; + position: relative; + + a { + color: inherit; + } + } + `, +}; diff --git a/src/theme/antd-theme.ts b/src/theme/antd-theme.ts index 4502acfb..4778d951 100644 --- a/src/theme/antd-theme.ts +++ b/src/theme/antd-theme.ts @@ -24,8 +24,13 @@ export function getANTDTheme({ dark }: { dark?: boolean }): ThemeConfig { }, algorithm: dark ? ANTDTheme.darkAlgorithm : ANTDTheme.defaultAlgorithm, components: { + Typography: { + titleMarginBottom: 0, + titleMarginTop: 0, + }, Layout: { colorBgHeader: palette.neutral.sidebarBackground, + colorBgBody: palette.neutralPalette.gray_2, }, Result: { colorSuccess: palette.secondary, From e6fe2f31fbf91b25b264337fe141d4c525da0972 Mon Sep 17 00:00:00 2001 From: Elena Grednikova <vesnushkalena@gmail.com> Date: Mon, 2 Dec 2024 17:15:16 +0100 Subject: [PATCH 03/22] Use PageContainer across the app --- .../DashboardCard/DashboardCard.styles.ts | 2 +- src/components/PageContainer/index.tsx | 29 --- src/components/PatientEncounter/index.tsx | 5 +- src/components/index.ts | 1 - .../Appointment/PublicAppointment.styles.ts | 3 - .../Appointment/PublicAppointment.tsx | 77 +++--- src/containers/EncounterDetails/index.tsx | 3 - src/containers/EncounterList/index.tsx | 45 ++-- .../HealthcareServiceList/index.tsx | 165 ++++++------ .../components/InvoiceDetailsHeader/index.tsx | 9 +- src/containers/InvoiceDetails/index.tsx | 43 +-- src/containers/InvoiceList/index.tsx | 84 +++--- src/containers/MedicationManagement/index.tsx | 110 ++++---- .../OrganizationScheduling/index.tsx | 148 +++++------ .../PatientDetailsTabs/index.tsx | 53 ++++ .../PatientDetails/PatientDocument/index.tsx | 5 - .../PatientDocumentDetails/index.tsx | 3 - .../PatientDetails/PatientDocuments/index.tsx | 6 +- .../PatientHeader/PatientHeader.module.scss | 8 - .../PatientDetails/PatientHeader/context.ts | 18 -- .../PatientDetails/PatientHeader/hooks.ts | 15 -- .../PatientDetails/PatientHeader/index.tsx | 131 ---------- .../PatientDetails/PatientWearables/index.tsx | 3 - src/containers/PatientDetails/index.tsx | 180 ++++++------- src/containers/PatientList/index.tsx | 215 ++++++++------- src/containers/PatientQuestionnaire/index.tsx | 18 +- .../PractitionerDetailsTabs/index.tsx | 48 ++++ .../PractitionerHeader.module.scss | 8 - .../PractitionerHeader/index.tsx | 106 -------- src/containers/PractitionerDetails/index.tsx | 107 ++++---- src/containers/PractitionerList/index.tsx | 154 ++++++----- src/containers/Prescriptions/index.tsx | 246 +++++++++--------- src/containers/QuestionnaireBuilder/index.tsx | 187 +++++++------ src/containers/QuestionnaireList/index.tsx | 84 +++--- src/containers/VideoCall/index.tsx | 70 +++-- src/uberComponents/ResourceListPage/index.tsx | 151 +++++------ 36 files changed, 1117 insertions(+), 1423 deletions(-) delete mode 100644 src/components/PageContainer/index.tsx create mode 100644 src/containers/PatientDetails/PatientDetailsTabs/index.tsx delete mode 100644 src/containers/PatientDetails/PatientHeader/PatientHeader.module.scss delete mode 100644 src/containers/PatientDetails/PatientHeader/context.ts delete mode 100644 src/containers/PatientDetails/PatientHeader/hooks.ts delete mode 100644 src/containers/PatientDetails/PatientHeader/index.tsx create mode 100644 src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx delete mode 100644 src/containers/PractitionerDetails/PractitionerHeader/PractitionerHeader.module.scss delete mode 100644 src/containers/PractitionerDetails/PractitionerHeader/index.tsx diff --git a/src/components/DashboardCard/DashboardCard.styles.ts b/src/components/DashboardCard/DashboardCard.styles.ts index 424b44a2..e77f6f09 100644 --- a/src/components/DashboardCard/DashboardCard.styles.ts +++ b/src/components/DashboardCard/DashboardCard.styles.ts @@ -6,7 +6,7 @@ export const S = { `, Card: styled.div` border-radius: 10px; - background-color: ${({ theme }) => theme.neutralPalette.gray_2}; + background-color: ${({ theme }) => theme.neutralPalette.gray_1}; color: ${({ theme }) => theme.neutralPalette.gray_13}; border: 1px solid ${({ theme }) => theme.antdTheme?.colorBorderSecondary}; min-width: fit-content; diff --git a/src/components/PageContainer/index.tsx b/src/components/PageContainer/index.tsx deleted file mode 100644 index b5c7f03a..00000000 --- a/src/components/PageContainer/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Col, Row } from 'antd'; - -import { BasePageHeader, BasePageContent } from '../BaseLayout'; -import { Title } from '../Typography'; - -interface PageContainerProps { - title: string; - titleRightContent?: React.ReactElement; - headerContent?: React.ReactElement; - content?: React.ReactElement; -} - -export function PageContainer(props: PageContainerProps) { - const { title, titleRightContent, headerContent, content } = props; - return ( - <> - <BasePageHeader style={{ paddingTop: 40, paddingBottom: 92 }}> - <Row justify="space-between" align="middle" style={{ marginBottom: 40 }} gutter={[16, 16]}> - <Col> - <Title>{title} - - {titleRightContent} - - {headerContent} - - {content} - - ); -} diff --git a/src/components/PatientEncounter/index.tsx b/src/components/PatientEncounter/index.tsx index c8c6a412..3b368111 100644 --- a/src/components/PatientEncounter/index.tsx +++ b/src/components/PatientEncounter/index.tsx @@ -1,4 +1,4 @@ -import { t, Trans } from '@lingui/macro'; +import { Trans } from '@lingui/macro'; import { Col, Row } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import { Patient } from 'fhir/r4b'; @@ -11,7 +11,6 @@ import { EncounterData } from 'src/components/EncountersTable/types'; import { StatusBadge } from 'src/components/EncounterStatusBadge'; import { ModalNewEncounter } from 'src/components/ModalNewEncounter'; import { useEncounterList } from 'src/containers/EncounterList/hooks'; -import { usePatientHeaderLocationTitle } from 'src/containers/PatientDetails/PatientHeader/hooks'; import { formatPeriodDateTime } from 'src/utils/date'; import { renderHumanName } from 'src/utils/fhir'; @@ -76,8 +75,6 @@ export const PatientEncounter = ({ patient, searchParams, hideCreateButton }: Pr ...searchParams, }); - usePatientHeaderLocationTitle({ title: t`Encounters` }); - return ( <> {hideCreateButton ? null : ( diff --git a/src/components/index.ts b/src/components/index.ts index c3fd35ec..3000b691 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -18,7 +18,6 @@ export * from './ModalNewEncounter'; export * from './ModalNewHealthcareService'; export * from './ModalNewPatient'; export * from './ModalTrigger'; -export * from './PageContainer'; export * from './PatientEncounter'; export * from './QuestionnaireResponseForm'; export * from './QuestionnairesWizard'; diff --git a/src/containers/Appointment/PublicAppointment.styles.ts b/src/containers/Appointment/PublicAppointment.styles.ts index 559e43d6..ef43d551 100644 --- a/src/containers/Appointment/PublicAppointment.styles.ts +++ b/src/containers/Appointment/PublicAppointment.styles.ts @@ -1,9 +1,6 @@ import styled from 'styled-components'; -import { BasePageHeader } from 'src/components/BaseLayout'; - export const S = { - Header: styled(BasePageHeader)``, Content: styled.div` width: 540px; background-color: ${({ theme }) => theme.antdTheme?.colorBgContainer}; diff --git a/src/containers/Appointment/PublicAppointment.tsx b/src/containers/Appointment/PublicAppointment.tsx index 17e9f405..ab593c29 100644 --- a/src/containers/Appointment/PublicAppointment.tsx +++ b/src/containers/Appointment/PublicAppointment.tsx @@ -6,11 +6,10 @@ import { axiosInstance as axiosAidboxInstance } from 'aidbox-react/lib/services/ import { uuid4 } from '@beda.software/fhir-react'; -import { BasePageContent } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { DateTimeSlotPicker } from 'src/components/BaseQuestionnaireResponseForm/widgets'; import { QuestionnaireResponseForm } from 'src/components/QuestionnaireResponseForm'; import { Spinner } from 'src/components/Spinner'; -import { Title } from 'src/components/Typography'; import { questionnaireIdLoader } from 'src/hooks/questionnaire-response-form-data'; import { getToken } from 'src/services/auth'; import { axiosInstance as axiosFHIRInstance } from 'src/services/fhir'; @@ -42,47 +41,39 @@ export function PublicAppointment() { }, [isAnonymousUser]); return ( - <> - - - <Trans>Appointment booking</Trans> - - - - - - {isLoading ? ( - - ) : ( - { - notification.success({ - message: t`Appointment successfully created`, - }); - history.replace('/'); - }} - itemControlQuestionItemComponents={{ - 'date-time-slot': (props) => ( - - ), - }} - initialQuestionnaireResponse={{ - questionnaire: 'public-appointment', - }} - launchContextParameters={[ - { - name: 'Patient', - resource: { - resourceType: 'Patient', - id: uuid4(), - }, + Appointment booking} content={{ style: { alignItems: 'center' } }}> + + {isLoading ? ( + + ) : ( + { + notification.success({ + message: t`Appointment successfully created`, + }); + history.replace('/'); + }} + itemControlQuestionItemComponents={{ + 'date-time-slot': (props) => ( + + ), + }} + initialQuestionnaireResponse={{ + questionnaire: 'public-appointment', + }} + launchContextParameters={[ + { + name: 'Patient', + resource: { + resourceType: 'Patient', + id: uuid4(), }, - ]} - /> - )} - - - + }, + ]} + /> + )} + + ); } diff --git a/src/containers/EncounterDetails/index.tsx b/src/containers/EncounterDetails/index.tsx index be6a5977..f75b1133 100644 --- a/src/containers/EncounterDetails/index.tsx +++ b/src/containers/EncounterDetails/index.tsx @@ -15,7 +15,6 @@ import { Spinner } from 'src/components/Spinner'; import { Text } from 'src/components/Typography'; import { DocumentsList } from 'src/containers/DocumentsList'; import { ChooseDocumentToCreateModal } from 'src/containers/DocumentsList/ChooseDocumentToCreateModal'; -import { usePatientHeaderLocationTitle } from 'src/containers/PatientDetails/PatientHeader/hooks'; import { questionnaireIdLoader } from 'src/hooks/questionnaire-response-form-data'; import { AIScribe, useAIScribe } from './AIScribe'; @@ -35,8 +34,6 @@ export const EncounterDetails = (props: EncounterDetailsProps) => { const [documentListKey, setDocumentListKey] = useState(0); const reload = useCallback(() => setDocumentListKey((k) => k + 1), [setDocumentListKey]); - usePatientHeaderLocationTitle({ title: t`Consultation` }); - const [showScriber, setShowScriber] = useState(false); const { recorderControls } = useAIScribe(); diff --git a/src/containers/EncounterList/index.tsx b/src/containers/EncounterList/index.tsx index 8bf32ce2..fcd7bad4 100644 --- a/src/containers/EncounterList/index.tsx +++ b/src/containers/EncounterList/index.tsx @@ -2,13 +2,12 @@ import { Trans } from '@lingui/macro'; import { Col, Row } from 'antd'; import { Link } from 'react-router-dom'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { EncountersTable } from 'src/components/EncountersTable'; import { EncounterData } from 'src/components/EncountersTable/types'; import { StatusBadge } from 'src/components/EncounterStatusBadge'; import { SearchBar } from 'src/components/SearchBar'; import { useSearchBar } from 'src/components/SearchBar/hooks'; -import { Title } from 'src/components/Typography'; import { formatPeriodDateTime } from 'src/utils/date'; import { renderHumanName } from 'src/utils/fhir'; import { matchCurrentUserRole, Role } from 'src/utils/role'; @@ -97,27 +96,25 @@ export function EncounterList() { ]; return ( - <> - - - <Trans>Encounters</Trans> - - - - - - - - - + Encounters} + header={{ + children: ( + + ), + }} + > + + ); } diff --git a/src/containers/HealthcareServiceList/index.tsx b/src/containers/HealthcareServiceList/index.tsx index 812824cc..58fbab9b 100644 --- a/src/containers/HealthcareServiceList/index.tsx +++ b/src/containers/HealthcareServiceList/index.tsx @@ -1,16 +1,16 @@ import { Trans } from '@lingui/macro'; -import { Col, Empty, Row, Table } from 'antd'; +import { Col, Empty, Row } from 'antd'; import { isLoading, isSuccess } from '@beda.software/remote-data'; -import { BasePageHeader, BasePageContent } from 'src/components/BaseLayout'; +import { Table } from 'src/components'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { ModalChangeActiveHealthcareService } from 'src/components/ModalChangeActiveHealthcareService'; import { ModalEditHealthcareService } from 'src/components/ModalEditHealthcareService'; import { ModalNewHealthcareService } from 'src/components/ModalNewHealthcareService'; import { SearchBar } from 'src/components/SearchBar'; import { useSearchBar } from 'src/components/SearchBar/hooks'; import { SpinIndicator } from 'src/components/Spinner'; -import { Title } from 'src/components/Typography'; import { useHealthcareServiceList } from './hooks'; import { getHealthcareServiceListSearchBarColumns } from './searchBarUtils'; @@ -24,89 +24,82 @@ export function HealthcareServiceList() { useHealthcareServiceList(columnsFilterValues); return ( - <> - - - - - <Trans>Healthcare Services</Trans> - - - - - - - - - - -
- No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> - + Healthcare Services} + headerRightColumn={} + header={{ + children: ( + + ), + }} + > +
+ No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> + + ), + }} + dataSource={isSuccess(healthcareServiceResponse) ? healthcareServiceResponse.data : []} + columns={[ + { + title: Type, + dataIndex: 'type', + key: 'type', + width: '20%', + render: (_text, resource) => resource.name, + }, + { + title: Duration (minutes), + dataIndex: 'duration', + key: 'duration', + width: '20%', + render: (_text, resource) => + resource.extension?.find( + (extension) => extension.url === 'urn:extensions:healthcare-service-duration', + )?.valueInteger, + }, + { + title: Status, + dataIndex: 'active', + key: 'active', + width: '20%', + render: (_text, resource) => (resource.active ? 'Active' : 'Inactive'), + }, + { + title: Actions, + dataIndex: 'actions', + key: 'actions', + width: '20%', + render: (_text, resource) => ( + + + + + + + + ), - }} - dataSource={isSuccess(healthcareServiceResponse) ? healthcareServiceResponse.data : []} - columns={[ - { - title: Type, - dataIndex: 'type', - key: 'type', - width: '20%', - render: (_text, resource) => resource.name, - }, - { - title: Duration (minutes), - dataIndex: 'duration', - key: 'duration', - width: '20%', - render: (_text, resource) => - resource.extension?.find( - (extension) => extension.url === 'urn:extensions:healthcare-service-duration', - )?.valueInteger, - }, - { - title: Status, - dataIndex: 'active', - key: 'active', - width: '20%', - render: (_text, resource) => (resource.active ? 'Active' : 'Inactive'), - }, - { - title: Actions, - dataIndex: 'actions', - key: 'actions', - width: '20%', - render: (_text, resource) => ( - - - - - - - - - ), - }, - ]} - loading={isLoading(healthcareServiceResponse) && { indicator: SpinIndicator }} - /> - - + }, + ]} + loading={isLoading(healthcareServiceResponse) && { indicator: SpinIndicator }} + /> + ); } diff --git a/src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx b/src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx index 6435b3a1..f8231e7a 100644 --- a/src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx +++ b/src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx @@ -1,20 +1,17 @@ +import { t } from '@lingui/macro'; import { Col, Row, Statistic } from 'antd'; -import { BasePageHeader } from 'src/components/BaseLayout'; -import { Title } from 'src/components/Typography'; import { getInvoiceStatusHumanized } from 'src/containers/InvoiceList/tableUtils'; import { formatHumanDateTime } from 'src/utils/date'; import { renderHumanName } from 'src/utils/fhir'; import { InvoiceDetailsHeaderProps } from './types'; -import { t, Trans } from '@lingui/macro'; export function InvoiceDetailsHeader(props: InvoiceDetailsHeaderProps) { const { invoice, patient, practitioner } = props; return ( - - <Trans>Medical Services Invoice</Trans> + <> @@ -29,6 +26,6 @@ export function InvoiceDetailsHeader(props: InvoiceDetailsHeaderProps) { - + ); } diff --git a/src/containers/InvoiceDetails/index.tsx b/src/containers/InvoiceDetails/index.tsx index 0b3f5826..762db0d2 100644 --- a/src/containers/InvoiceDetails/index.tsx +++ b/src/containers/InvoiceDetails/index.tsx @@ -1,11 +1,11 @@ import { Trans, t } from '@lingui/macro'; -import { Table } from 'antd'; import _ from 'lodash'; import { Outlet, Route, Routes, useParams } from 'react-router-dom'; import { RenderRemoteData } from 'aidbox-react/lib/components/RenderRemoteData'; -import { BasePageContent } from 'src/components/BaseLayout'; +import { Table } from 'src/components'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { Spinner } from 'src/components/Spinner'; import { getFHIRReferenceResourceId } from 'src/utils/reference'; @@ -22,23 +22,28 @@ export function InvoiceDetails() { return ( {({ invoice, patient, practitioner }) => ( - <> - - - - - - - } - > - } /> - - - - + Medical Services Invoice} + header={{ + children: ( + + ), + }} + > + + + + + } + > + } /> + + + )} ); diff --git a/src/containers/InvoiceList/index.tsx b/src/containers/InvoiceList/index.tsx index facbe0b9..2c45f114 100644 --- a/src/containers/InvoiceList/index.tsx +++ b/src/containers/InvoiceList/index.tsx @@ -1,10 +1,11 @@ import { Trans, t } from '@lingui/macro'; -import { Empty, Table } from 'antd'; +import { Empty } from 'antd'; import { RenderRemoteData } from '@beda.software/fhir-react'; import { isLoading } from '@beda.software/remote-data'; -import { PageContainer } from 'src/components/PageContainer'; +import { Table } from 'src/components'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { SpinIndicator, Spinner } from 'src/components/Spinner'; import { Role, matchCurrentUserRole, selectCurrentUserRoleResource } from 'src/utils/role'; @@ -42,45 +43,44 @@ export function InvoiceList() { return ( onChange(selectedOption, 'patient')} - onChangePractitionerRole={(selectedOption) => onChange(selectedOption, 'practitionerRole')} - onChangeStatus={(selectedOption) => onChange(selectedOption, 'status')} - reset={resetFilter} - /> - } - content={ - - {({ invoices, practitioners, practitionerRoles, patients }) => ( -
- No data} - image={Empty.PRESENTED_IMAGE_SIMPLE} - /> - - ), - }} - dataSource={invoices} - columns={getInvoiceTableColumns(practitioners, practitionerRoles, patients, pagerManager)} - loading={isLoading(invoiceResponse) && { indicator: SpinIndicator }} - scroll={{ x: 'max-content' }} - /> - )} - - } - /> + variant="with-table" + header={{ + children: ( + onChange(selectedOption, 'patient')} + onChangePractitionerRole={(selectedOption) => onChange(selectedOption, 'practitionerRole')} + onChangeStatus={(selectedOption) => onChange(selectedOption, 'status')} + reset={resetFilter} + /> + ), + }} + > + + {({ invoices, practitioners, practitionerRoles, patients }) => ( +
+ No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> + + ), + }} + dataSource={invoices} + columns={getInvoiceTableColumns(practitioners, practitionerRoles, patients, pagerManager)} + loading={isLoading(invoiceResponse) && { indicator: SpinIndicator }} + scroll={{ x: 'max-content' }} + /> + )} + + ); } diff --git a/src/containers/MedicationManagement/index.tsx b/src/containers/MedicationManagement/index.tsx index 22093e7e..585b7096 100644 --- a/src/containers/MedicationManagement/index.tsx +++ b/src/containers/MedicationManagement/index.tsx @@ -1,11 +1,12 @@ import { t, Trans } from '@lingui/macro'; -import { Typography, Table } from 'antd'; +import { Typography } from 'antd'; import { MedicationKnowledge } from 'fhir/r4b'; import { RenderRemoteData } from '@beda.software/fhir-react'; import { isLoading, isSuccess } from '@beda.software/remote-data'; -import { PageContainer } from 'src/components/PageContainer'; +import { Table } from 'src/components'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { SpinIndicator } from 'src/components/Spinner'; import { formatHumanDate } from 'src/utils/date'; @@ -26,59 +27,58 @@ export function MedicationManagement() { return ( } - headerContent={ - onChange(selectedOption, 'medication')} - reset={resetFilter} - /> - } - content={ -
{ - return { ...{ key: resourceData.id }, ...resourceData }; - }) - : [] - } - expandable={{ - expandedRowRender: (record) => , - }} - columns={[ - { - title: Name, - dataIndex: 'name', - key: 'name', - render: (_text, resource) => resource.code?.coding?.[0]?.display, - }, - { - title: Cost, - dataIndex: 'cost', - key: 'cost', - render: (_text, resource) => - `${resource.cost?.[0]?.cost.value} ${resource.cost?.[0]?.cost.currency}`, - }, - { - title: Actions, - dataIndex: 'actions', - key: 'actions', - render: (_text, resource) => ( - - ), - }, - ]} - loading={isLoading(medicationKnowledgeResponse) && { indicator: SpinIndicator }} - /> - } - /> + variant="with-table" + headerRightColumn={} + header={{ + children: ( + onChange(selectedOption, 'medication')} + reset={resetFilter} + /> + ), + }} + > +
{ + return { ...{ key: resourceData.id }, ...resourceData }; + }) + : [] + } + expandable={{ + expandedRowRender: (record) => , + }} + columns={[ + { + title: Name, + dataIndex: 'name', + key: 'name', + render: (_text, resource) => resource.code?.coding?.[0]?.display, + }, + { + title: Cost, + dataIndex: 'cost', + key: 'cost', + render: (_text, resource) => + `${resource.cost?.[0]?.cost.value} ${resource.cost?.[0]?.cost.currency}`, + }, + { + title: Actions, + dataIndex: 'actions', + key: 'actions', + render: (_text, resource) => ( + + ), + }, + ]} + loading={isLoading(medicationKnowledgeResponse) && { indicator: SpinIndicator }} + /> + ); } diff --git a/src/containers/OrganizationScheduling/index.tsx b/src/containers/OrganizationScheduling/index.tsx index 7cd03ae2..c4478ec9 100644 --- a/src/containers/OrganizationScheduling/index.tsx +++ b/src/containers/OrganizationScheduling/index.tsx @@ -3,9 +3,8 @@ import { Button, Row, notification } from 'antd'; import { RenderRemoteData } from '@beda.software/fhir-react'; -import { BasePageHeader, BasePageContent } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { Calendar } from 'src/components/Calendar'; -import { Title } from 'src/components/Typography'; import { S } from './Calendar.styles'; import { HealthcareServicePractitionerSelect } from './HealthcareServicePractitionerSelect'; @@ -65,84 +64,85 @@ export function OrganizationScheduling() { ]; return ( - <> - - - <Trans>Scheduling</Trans> - - - - - onChange(selectedOption, 'healthcareService') - } - onChangePractitionerRole={(selectedOption) => onChange(selectedOption, 'practitionerRole')} + Scheduling} + header={{ + children: ( + + + + onChange(selectedOption, 'healthcareService') + } + onChangePractitionerRole={(selectedOption) => + onChange(selectedOption, 'practitionerRole') + } + /> + + + + ), + }} + > + + {({ slots, businessHours, allPractitionersAndPractitionerRoles, healthcareServices }) => ( + + - - - - - - - {({ slots, businessHours, allPractitionersAndPractitionerRoles, healthcareServices }) => ( - - openEditAppointment(id)} + onClose={closeAppointmentDetails} /> - {appointmentDetails && ( - openEditAppointment(id)} - onClose={closeAppointmentDetails} - /> - )} - {editingAppointmentId && ( - + )} + {newAppointmentData && + isAppointmentCreatingAvailable( + newAppointmentData, + selectedHealthcareService, + selectedPractitionerRole, + ) && ( + )} - {newAppointmentData && - isAppointmentCreatingAvailable( - newAppointmentData, - selectedHealthcareService, - selectedPractitionerRole, - ) && ( - - )} - - )} - - - + + )} + + ); } diff --git a/src/containers/PatientDetails/PatientDetailsTabs/index.tsx b/src/containers/PatientDetails/PatientDetailsTabs/index.tsx new file mode 100644 index 00000000..f2f17546 --- /dev/null +++ b/src/containers/PatientDetails/PatientDetailsTabs/index.tsx @@ -0,0 +1,53 @@ +import { t } from '@lingui/macro'; +import { useEffect, useMemo, useState } from 'react'; +import { useParams, useLocation, Link, useNavigate } from 'react-router-dom'; + +import { RouteItem } from 'src/components/BaseLayout/Sidebar/SidebarTop'; +import { Tabs } from 'src/components/Tabs'; + +export function PatientDetailsTabs(props: { extraMenuItems?: RouteItem[]; isDefaultRoutesDisabled?: boolean }) { + const location = useLocation(); + const params = useParams<{ id: string }>(); + const { extraMenuItems = [] } = props; + const navigate = useNavigate(); + + const menuItems: RouteItem[] = useMemo( + () => + (!props.isDefaultRoutesDisabled + ? [ + { label: t`Overview`, path: `/patients/${params.id}` }, + { label: t`Encounters`, path: `/patients/${params.id}/encounters` }, + { label: t`Documents`, path: `/patients/${params.id}/documents` }, + { label: t`Wearables`, path: `/patients/${params.id}/wearables` }, + { label: t`Orders`, path: `/patients/${params.id}/orders` }, + { label: t`Smart Apps`, path: `/patients/${params.id}/apps` }, + { label: t`Resources`, path: `/patients/${params.id}/resources` }, + ] + : [] + ).concat( + extraMenuItems.map(({ label, path }) => ({ + label, + path: `/patients/${params.id}` + path, + })), + ), + [props.isDefaultRoutesDisabled, params.id, extraMenuItems], + ); + + const [currentPath, setCurrentPath] = useState(location?.pathname); + + useEffect(() => { + setCurrentPath(location?.pathname); + }, [location]); + + return ( + ({ + key: route.path, + label: {route.label}, + }))} + onTabClick={(path) => navigate(path)} + /> + ); +} diff --git a/src/containers/PatientDetails/PatientDocument/index.tsx b/src/containers/PatientDetails/PatientDocument/index.tsx index c0352088..079565c8 100644 --- a/src/containers/PatientDetails/PatientDocument/index.tsx +++ b/src/containers/PatientDetails/PatientDocument/index.tsx @@ -8,7 +8,6 @@ import { RemoteData, isSuccess, notAsked } from '@beda.software/remote-data'; import { BaseQuestionnaireResponseForm } from 'src/components/BaseQuestionnaireResponseForm'; import { AnxietyScore, DepressionScore } from 'src/components/BaseQuestionnaireResponseForm/readonly-widgets/score'; import { Spinner } from 'src/components/Spinner'; -import { usePatientHeaderLocationTitle } from 'src/containers/PatientDetails/PatientHeader/hooks'; import s from './PatientDocument.module.scss'; import { S } from './PatientDocument.styles'; @@ -40,10 +39,6 @@ export function PatientDocument(props: PatientDocumentProps) { const { savedMessage } = useSavedMessage(draftSaveResponse); - usePatientHeaderLocationTitle({ - title: isSuccess(response) ? response.data.formData.context.questionnaire?.name ?? '' : '', - }); - return (
diff --git a/src/containers/PatientDetails/PatientDocumentDetails/index.tsx b/src/containers/PatientDetails/PatientDocumentDetails/index.tsx index be2ffe5f..5cf0f188 100644 --- a/src/containers/PatientDetails/PatientDocumentDetails/index.tsx +++ b/src/containers/PatientDetails/PatientDocumentDetails/index.tsx @@ -19,7 +19,6 @@ import { PatientDocumentData, usePatientDocument, } from 'src/containers/PatientDetails/PatientDocument/usePatientDocument'; -import { usePatientHeaderLocationTitle } from 'src/containers/PatientDetails/PatientHeader/hooks'; import { forceDeleteFHIRResource, getFHIRResources, patchFHIRResource } from 'src/services/fhir'; import { selectCurrentUserRoleResource } from 'src/utils/role'; import { isExternalQuestionnaire } from 'src/utils/smart-apps'; @@ -115,8 +114,6 @@ function PatientDocumentDetailsReadonly(props: { const navigate = useNavigate(); const { formData, reload, provenance, hideControls } = props; - usePatientHeaderLocationTitle({ title: formData.context.questionnaire?.name ?? '' }); - const patientId = location.pathname.split('/')[2]; const qrCompleted = formData.context.questionnaireResponse.status === 'completed'; const qrId = formData.context.questionnaireResponse.id; diff --git a/src/containers/PatientDetails/PatientDocuments/index.tsx b/src/containers/PatientDetails/PatientDocuments/index.tsx index e1406386..fa448714 100644 --- a/src/containers/PatientDetails/PatientDocuments/index.tsx +++ b/src/containers/PatientDetails/PatientDocuments/index.tsx @@ -1,12 +1,11 @@ import { PlusOutlined } from '@ant-design/icons'; -import { t, Trans } from '@lingui/macro'; +import { Trans } from '@lingui/macro'; import { Button } from 'antd'; import { Patient } from 'fhir/r4b'; import { useState } from 'react'; import { DocumentsList } from 'src/containers/DocumentsList'; import { ChooseDocumentToCreateModal } from 'src/containers/DocumentsList/ChooseDocumentToCreateModal'; -import { usePatientHeaderLocationTitle } from 'src/containers/PatientDetails/PatientHeader/hooks'; interface Props { patient: Patient; @@ -19,9 +18,6 @@ interface Props { export const PatientDocuments = (props: Props) => { const [modalOpened, setModalOpened] = useState(false); const { patient, hideCreateButton } = props; - const title = props.title ?? t`Documents`; - - usePatientHeaderLocationTitle({ title }); return ( <> diff --git a/src/containers/PatientDetails/PatientHeader/PatientHeader.module.scss b/src/containers/PatientDetails/PatientHeader/PatientHeader.module.scss deleted file mode 100644 index fda4c063..00000000 --- a/src/containers/PatientDetails/PatientHeader/PatientHeader.module.scss +++ /dev/null @@ -1,8 +0,0 @@ -.menu { - position: relative; - background: 0; - display: flex; - margin: 0 -20px; - border-bottom: 0; - padding-bottom: 1px; -} \ No newline at end of file diff --git a/src/containers/PatientDetails/PatientHeader/context.ts b/src/containers/PatientDetails/PatientHeader/context.ts deleted file mode 100644 index 947e6d0b..00000000 --- a/src/containers/PatientDetails/PatientHeader/context.ts +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; - -export interface BreadCrumb { - name: string; - path?: string; -} - -interface PatientHeaderContextProps { - title: string; - breadcrumbs: BreadCrumb[]; - setBreadcrumbs?: (v: { [x: string]: string }) => void; -} - -export const PatientHeaderContext = React.createContext({ - title: '', - breadcrumbs: [], - setBreadcrumbs: undefined, -}); diff --git a/src/containers/PatientDetails/PatientHeader/hooks.ts b/src/containers/PatientDetails/PatientHeader/hooks.ts deleted file mode 100644 index 6376c5ce..00000000 --- a/src/containers/PatientDetails/PatientHeader/hooks.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useContext, useEffect } from 'react'; -import { useLocation } from 'react-router-dom'; - -import { PatientHeaderContext } from './context'; - -export function usePatientHeaderLocationTitle(config: { title: string }) { - const { setBreadcrumbs } = useContext(PatientHeaderContext); - const { title } = config; - const location = useLocation(); - - useEffect(() => { - setBreadcrumbs?.({ [location?.pathname]: title }); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [title]); -} diff --git a/src/containers/PatientDetails/PatientHeader/index.tsx b/src/containers/PatientDetails/PatientHeader/index.tsx deleted file mode 100644 index 9adb34a7..00000000 --- a/src/containers/PatientDetails/PatientHeader/index.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import { t } from '@lingui/macro'; -import { Menu } from 'antd'; -import { Patient } from 'fhir/r4b'; -import _ from 'lodash'; -import { useContext, useEffect, useMemo, useState } from 'react'; -import { useParams, useLocation, Link } from 'react-router-dom'; - -import { BasePageHeader } from 'src/components/BaseLayout'; -import { RouteItem } from 'src/components/BaseLayout/Sidebar/SidebarTop'; -import { Breadcrumbs } from 'src/components/Breadcrumbs'; -import { Title } from 'src/components/Typography'; -import { renderHumanName } from 'src/utils/fhir'; -import { matchCurrentUserRole, Role } from 'src/utils/role'; - -import { BreadCrumb, PatientHeaderContext } from './context'; -import s from './PatientHeader.module.scss'; - -export function PatientHeaderContextProvider(props: React.HTMLAttributes & { patient: Patient }) { - const { children, patient } = props; - const [pageTitle] = useState(renderHumanName(patient.name?.[0])); - const params = useParams<{ id: string }>(); - const location = useLocation(); - const rootPath = useMemo(() => `/patients/${params.id}`, [params.id]); - - const [breadcrumbsMap, setBreadcrumbs] = useState({ - '/patients': t`Patients`, - [rootPath]: renderHumanName(patient.name?.[0]), - }); - - const breadcrumbs: BreadCrumb[] = useMemo(() => { - const isRoot = rootPath === location?.pathname; - const paths = _.toPairs(breadcrumbsMap); - - const result = _.chain(paths) - .map(([path, name]) => (location?.pathname.includes(path) ? [path, name] : undefined)) - .compact() - .sortBy(([path]) => path) - .map(([path, name]) => ({ path, name })) - .value() as BreadCrumb[]; - - return isRoot ? [...result, { name: t`Overview` }] : result; - }, [location?.pathname, breadcrumbsMap, rootPath]); - - return ( - { - const pathNames = breadcrumbs.map((b) => b.name); - const newPathName = _.toPairs(newPath)[0]?.[1]; - if (newPathName && pathNames.includes(newPathName)) { - return; - } - - setBreadcrumbs((prevValue) => ({ - ...prevValue, - ...newPath, - })); - }, - }} - > - {children} - - ); -} - -export function PatientHeader(props: { extraMenuItems?: RouteItem[]; isDefaultRoutesDisabled?: boolean }) { - const location = useLocation(); - const params = useParams<{ id: string }>(); - const { title, breadcrumbs } = useContext(PatientHeaderContext); - const { extraMenuItems = [] } = props; - - const menuItems: RouteItem[] = useMemo( - () => - (!props.isDefaultRoutesDisabled - ? [ - { label: t`Overview`, path: `/patients/${params.id}` }, - { label: t`Encounters`, path: `/patients/${params.id}/encounters` }, - { label: t`Documents`, path: `/patients/${params.id}/documents` }, - { label: t`Wearables`, path: `/patients/${params.id}/wearables` }, - { label: t`Orders`, path: `/patients/${params.id}/orders` }, - { label: t`Smart Apps`, path: `/patients/${params.id}/apps` }, - { label: t`Resources`, path: `/patients/${params.id}/resources` }, - ] - : [] - ).concat( - extraMenuItems.map(({ label, path }) => ({ - label, - path: `/patients/${params.id}` + path, - })), - ), - [props.isDefaultRoutesDisabled, params.id, extraMenuItems], - ); - - const [currentPath, setCurrentPath] = useState(location?.pathname); - - useEffect(() => { - setCurrentPath(location?.pathname); - }, [location]); - - const renderMenu = () => { - return ( - ({ - key: route.path, - label: {route.label}, - }))} - /> - ); - }; - - return ( - - breadcrumbs, - [Role.Patient]: () => breadcrumbs.slice(1), - [Role.Practitioner]: () => breadcrumbs, - [Role.Receptionist]: () => breadcrumbs, - })} - /> - {title} - {renderMenu()} - - ); -} diff --git a/src/containers/PatientDetails/PatientWearables/index.tsx b/src/containers/PatientDetails/PatientWearables/index.tsx index f8f3a1fe..beb324dc 100644 --- a/src/containers/PatientDetails/PatientWearables/index.tsx +++ b/src/containers/PatientDetails/PatientWearables/index.tsx @@ -8,7 +8,6 @@ import { isFailure, isLoading } from '@beda.software/remote-data'; import { SpinIndicator, Spinner } from 'src/components/Spinner'; import { Table } from 'src/components/Table'; -import { usePatientHeaderLocationTitle } from 'src/containers/PatientDetails/PatientHeader/hooks'; import { usePatientWearablesData, WearablesDataRecord } from './hooks'; @@ -61,8 +60,6 @@ function getColumns(): ColumnsType { export function PatientWearables(props: PatientWearablesProps) { const [wearablesData] = usePatientWearablesData(props.patient); - usePatientHeaderLocationTitle({ title: t`Wearables` }); - if (isFailure(wearablesData)) { console.log('status', wearablesData.status); console.log('error', wearablesData.error); diff --git a/src/containers/PatientDetails/index.tsx b/src/containers/PatientDetails/index.tsx index f27e83eb..d6e768e8 100644 --- a/src/containers/PatientDetails/index.tsx +++ b/src/containers/PatientDetails/index.tsx @@ -5,20 +5,21 @@ import { useParams, Outlet, Route, Routes } from 'react-router-dom'; import { RenderRemoteData } from '@beda.software/fhir-react'; import { isSuccess } from '@beda.software/remote-data'; -import { BasePageContent } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { RouteItem } from 'src/components/BaseLayout/Sidebar/SidebarTop'; import { PatientEncounter } from 'src/components/PatientEncounter'; import { Spinner } from 'src/components/Spinner'; import { PatientReloadProvider } from 'src/containers/PatientDetails/Dashboard/contexts'; import { sharedAuthorizedPractitionerRoles } from 'src/sharedState'; +import { renderHumanName } from 'src/utils'; import { matchCurrentUserRole, selectCurrentUserRoleResource, Role } from 'src/utils/role'; import { usePatientResource } from './hooks'; import { PatientApps } from './PatientApps'; +import { PatientDetailsTabs } from './PatientDetailsTabs'; import { PatientDocument } from './PatientDocument'; import { PatientDocumentDetails } from './PatientDocumentDetails'; import { PatientDocuments } from './PatientDocuments'; -import { PatientHeader, PatientHeaderContextProvider } from './PatientHeader'; import { PatientOrders } from './PatientOrders'; import { PatientOverview } from './PatientOverviewDynamic'; import { PatientResources } from './PatientResources'; @@ -50,98 +51,89 @@ export const PatientDetails = (props: PatientDetailsProps) => { {({ patient }) => { return ( - - - - - - - - } - > - {!props.isDefaultRoutesDisabled && ( - <> - } /> - { - return {}; - }, - [Role.Practitioner]: (practitioner) => { - return { - participant: ( - sharedAuthorizedPractitionerRoles.getSharedState() || - [] - ) - .map((pr) => `PractitionerRole/${pr.id}`) - .join(','), - }; - }, - [Role.Patient]: () => { - return {}; - }, - [Role.Receptionist]: () => { - return {}; - }, - })} - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - } /> - } /> - - )} - {embeddedPages?.flatMap(({ routes }) => routes)} - - - - + , + }} + > + + + + + } + > + {!props.isDefaultRoutesDisabled && ( + <> + } /> + { + return {}; + }, + [Role.Practitioner]: (practitioner) => { + return { + participant: ( + sharedAuthorizedPractitionerRoles.getSharedState() || + [] + ) + .map((pr) => `PractitionerRole/${pr.id}`) + .join(','), + }; + }, + [Role.Patient]: () => { + return {}; + }, + [Role.Receptionist]: () => { + return {}; + }, + })} + /> + } + /> + } + /> + } + /> + } + /> + } /> + } + /> + } + /> + } /> + } + /> + } /> + } /> + } /> + + )} + {embeddedPages?.flatMap(({ routes }) => routes)} + + + ); }} diff --git a/src/containers/PatientList/index.tsx b/src/containers/PatientList/index.tsx index 0d76d2fc..6be31ace 100644 --- a/src/containers/PatientList/index.tsx +++ b/src/containers/PatientList/index.tsx @@ -5,7 +5,7 @@ import { useNavigate } from 'react-router-dom'; import { isLoading, isSuccess } from '@beda.software/remote-data'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { ModalNewPatient } from 'src/components/ModalNewPatient'; import { ModalTrigger } from 'src/components/ModalTrigger'; import { QuestionnaireResponseForm } from 'src/components/QuestionnaireResponseForm'; @@ -13,7 +13,6 @@ import { SearchBar } from 'src/components/SearchBar'; import { useSearchBar } from 'src/components/SearchBar/hooks'; import { SpinIndicator } from 'src/components/Spinner'; import { Table } from 'src/components/Table'; -import { Title } from 'src/components/Typography'; import { questionnaireIdLoader } from 'src/hooks/questionnaire-response-form-data'; import { formatHumanDate } from 'src/utils/date'; import { renderHumanName } from 'src/utils/fhir'; @@ -51,116 +50,108 @@ export function PatientList() { ); return ( - <> - - -
- - <Trans>Patients</Trans> - - - - - - - - - - - - pagination={pagination} - onChange={handleTableChange} - locale={{ - emptyText: ( - <> - No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> - - ), - }} - rowKey={(p) => p.id!} - dataSource={isSuccess(patientsResponse) ? patientsResponse.data : []} - columns={[ - { - title: Name, - dataIndex: 'name', - key: 'name', - render: (_text, resource) => renderHumanName(resource.name?.[0]), - }, - { - title: Birth date, - dataIndex: 'birthDate', - key: 'birthDate', - render: (_text, resource) => - resource.birthDate ? formatHumanDate(resource.birthDate) : null, - width: '25%', - }, - { - title: SSN, - dataIndex: 'identifier', - key: 'identifier', - render: (_text, resource) => - resource.identifier?.find(({ system }) => system === 'http://hl7.org/fhir/sid/us-ssn') - ?.value, - width: '25%', - }, - { - title: Actions, - dataIndex: 'actions', - key: 'actions', - render: (_text, resource) => { - return ( - - - - - - - Edit - - } - > - {({ closeModal }) => ( - { - notification.success({ - message: t`Patient saved`, - }); - pagerManager.reload(); - closeModal(); - }} - onCancel={closeModal} - /> - )} - - - - ); - }, - width: 200, + Patients} + headerRightColumn={} + header={{ + children: ( + + ), + }} + > + + pagination={pagination} + onChange={handleTableChange} + locale={{ + emptyText: ( + <> + No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> + + ), + }} + rowKey={(p) => p.id!} + dataSource={isSuccess(patientsResponse) ? patientsResponse.data : []} + columns={[ + { + title: Name, + dataIndex: 'name', + key: 'name', + render: (_text, resource) => renderHumanName(resource.name?.[0]), + }, + { + title: Birth date, + dataIndex: 'birthDate', + key: 'birthDate', + render: (_text, resource) => (resource.birthDate ? formatHumanDate(resource.birthDate) : null), + width: '25%', + }, + { + title: SSN, + dataIndex: 'identifier', + key: 'identifier', + render: (_text, resource) => + resource.identifier?.find(({ system }) => system === 'http://hl7.org/fhir/sid/us-ssn') + ?.value, + width: '25%', + }, + { + title: Actions, + dataIndex: 'actions', + key: 'actions', + render: (_text, resource) => { + return ( + + + + + + + Edit + + } + > + {({ closeModal }) => ( + { + notification.success({ + message: t`Patient saved`, + }); + pagerManager.reload(); + closeModal(); + }} + onCancel={closeModal} + /> + )} + + + + ); }, - ]} - loading={isLoading(patientsResponse) && { indicator: SpinIndicator }} - /> - - + width: 200, + }, + ]} + loading={isLoading(patientsResponse) && { indicator: SpinIndicator }} + /> + ); } diff --git a/src/containers/PatientQuestionnaire/index.tsx b/src/containers/PatientQuestionnaire/index.tsx index 76b43c77..5ef8b302 100644 --- a/src/containers/PatientQuestionnaire/index.tsx +++ b/src/containers/PatientQuestionnaire/index.tsx @@ -7,9 +7,9 @@ import { axiosInstance as axiosAidboxInstance } from 'aidbox-react/lib/services/ import { RenderRemoteData, WithId, useService } from '@beda.software/fhir-react'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { Spinner } from 'src/components/Spinner'; -import { Paragraph, Title } from 'src/components/Typography'; +import { Paragraph } from 'src/components/Typography'; import { getToken } from 'src/services/auth'; import { axiosInstance as axiosFHIRInstance, getFHIRResource } from 'src/services/fhir'; import { selectCurrentUserRoleResource } from 'src/utils/role'; @@ -67,17 +67,9 @@ export function PatientQuestionnaire({ onSuccess }: { onSuccess?: () => void }) }, [isAnonymousUser]); return ( - <> - - - <Trans>Questionnaire</Trans> - - - - - {isLoading ? : } - - + Questionnaire} content={{ style: { alignItems: 'center' } }}> + {isLoading ? : } + ); } diff --git a/src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx b/src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx new file mode 100644 index 00000000..14263d78 --- /dev/null +++ b/src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx @@ -0,0 +1,48 @@ +import { t } from '@lingui/macro'; +import { Practitioner, PractitionerRole } from 'fhir/r4b'; +import { useEffect, useMemo, useState } from 'react'; +import { useParams, useLocation, Link, useNavigate } from 'react-router-dom'; + +import { WithId } from '@beda.software/fhir-react'; + +import { RouteItem } from 'src/components/BaseLayout/Sidebar/SidebarTop'; +import { Tabs } from 'src/components/Tabs'; + +interface Props { + practitioner: WithId; + practitionerRole?: WithId; +} + +export function PractitionerDetailsTabs(props: Props) { + const { practitionerRole } = props; + const location = useLocation(); + const params = useParams<{ id: string }>(); + const navigate = useNavigate(); + + const menuItems: RouteItem[] = useMemo( + () => [ + { label: t`Overview`, path: `/practitioners/${params.id}` }, + { label: t`Scheduling`, path: `/practitioners/${params.id}/scheduling`, disabled: !practitionerRole }, + { label: t`Availability`, path: `/practitioners/${params.id}/availability`, disabled: !practitionerRole }, + ], + [params.id, practitionerRole], + ); + + const [currentPath, setCurrentPath] = useState(location?.pathname); + + useEffect(() => { + setCurrentPath(location?.pathname); + }, [location]); + + return ( + ({ + key: route.path, + label: {route.label}, + }))} + onTabClick={(path) => navigate(path)} + /> + ); +} diff --git a/src/containers/PractitionerDetails/PractitionerHeader/PractitionerHeader.module.scss b/src/containers/PractitionerDetails/PractitionerHeader/PractitionerHeader.module.scss deleted file mode 100644 index fda4c063..00000000 --- a/src/containers/PractitionerDetails/PractitionerHeader/PractitionerHeader.module.scss +++ /dev/null @@ -1,8 +0,0 @@ -.menu { - position: relative; - background: 0; - display: flex; - margin: 0 -20px; - border-bottom: 0; - padding-bottom: 1px; -} \ No newline at end of file diff --git a/src/containers/PractitionerDetails/PractitionerHeader/index.tsx b/src/containers/PractitionerDetails/PractitionerHeader/index.tsx deleted file mode 100644 index daef0a0b..00000000 --- a/src/containers/PractitionerDetails/PractitionerHeader/index.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { t } from '@lingui/macro'; -import { Menu } from 'antd'; -import { Practitioner, PractitionerRole } from 'fhir/r4b'; -import _ from 'lodash'; -import { useEffect, useMemo, useState } from 'react'; -import { useParams, useLocation, Link } from 'react-router-dom'; - -import { WithId } from '@beda.software/fhir-react'; - -import { BasePageHeader } from 'src/components/BaseLayout'; -import { RouteItem } from 'src/components/BaseLayout/Sidebar/SidebarTop'; -import { Breadcrumbs } from 'src/components/Breadcrumbs'; -import { Title } from 'src/components/Typography'; -import { renderHumanName } from 'src/utils/fhir'; - -import s from './PractitionerHeader.module.scss'; - -interface BreadCrumb { - name: string; - path?: string; -} - -interface Props { - practitioner: WithId; - practitionerRole?: WithId; -} - -function usePractitionerHeader(props: Props) { - const { practitioner } = props; - const pageTitle = useMemo(() => renderHumanName(practitioner.name?.[0]), [practitioner]); - const params = useParams<{ id: string }>(); - const location = useLocation(); - const rootPath = useMemo(() => `/practitioners/${params.id}`, [params.id]); - - const breadcrumbsMap = useMemo( - () => ({ - '/practitioners': t`Practitioners`, - [rootPath]: pageTitle, - [`${rootPath}/scheduling`]: t`Scheduling`, - [`${rootPath}/availability`]: t`Availability`, - }), - [pageTitle, rootPath], - ); - - const breadcrumbs: BreadCrumb[] = useMemo(() => { - const isRoot = rootPath === location?.pathname; - const paths = _.toPairs(breadcrumbsMap); - - const result = _.chain(paths) - .map(([path, name]) => (location?.pathname.includes(path) ? [path, name] : undefined)) - .compact() - .sortBy(([path]) => path) - .map(([path, name]) => ({ path, name })) - .value() as BreadCrumb[]; - - return isRoot ? [...result, { name: t`Overview` }] : result; - }, [location?.pathname, breadcrumbsMap, rootPath]); - - return { pageTitle, breadcrumbs }; -} - -export function PractitionerHeader(props: Props) { - const { practitionerRole } = props; - const location = useLocation(); - const params = useParams<{ id: string }>(); - const { pageTitle, breadcrumbs } = usePractitionerHeader(props); - - const menuItems: RouteItem[] = useMemo( - () => [ - { label: t`Overview`, path: `/practitioners/${params.id}` }, - { label: t`Scheduling`, path: `/practitioners/${params.id}/scheduling`, disabled: !practitionerRole }, - { label: t`Availability`, path: `/practitioners/${params.id}/availability`, disabled: !practitionerRole }, - ], - [params.id, practitionerRole], - ); - - const [currentPath, setCurrentPath] = useState(location?.pathname); - - useEffect(() => { - setCurrentPath(location?.pathname); - }, [location]); - - const renderMenu = () => { - return ( - ({ - key: route.path, - label: route.disabled ? route.label : {route.label}, - disabled: route.disabled, - }))} - /> - ); - }; - - return ( - - - {pageTitle} - {renderMenu()} - - ); -} diff --git a/src/containers/PractitionerDetails/index.tsx b/src/containers/PractitionerDetails/index.tsx index 8fafe275..0a30dcc1 100644 --- a/src/containers/PractitionerDetails/index.tsx +++ b/src/containers/PractitionerDetails/index.tsx @@ -4,11 +4,12 @@ import { Outlet, Route, Routes, useNavigate, useParams } from 'react-router-dom' import { RenderRemoteData, WithId, extractBundleResources, useService } from '@beda.software/fhir-react'; import { mapSuccess } from '@beda.software/remote-data'; -import { BasePageContent } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { Spinner } from 'src/components/Spinner'; import { getFHIRResources } from 'src/services/fhir'; +import { renderHumanName } from 'src/utils'; -import { PractitionerHeader } from './PractitionerHeader'; +import { PractitionerDetailsTabs } from './PractitionerDetailsTabs'; import { PractitionerOverview } from './PractitionerOverview'; import { Availability } from '../Scheduling/Availability'; import { ScheduleCalendar } from '../Scheduling/ScheduleCalendar'; @@ -40,57 +41,65 @@ export const PractitionerDetails = () => { {({ practitioner, practitionerRole, healthcareServices }) => { return ( - <> - - - + + ), + }} + > + + + + + } + > - - + } - > - - } - /> - {practitionerRole ? ( - <> - } - /> - ) => { - navigate(`/practitioners/${practitioner.id}/scheduling`); - manager.set({ - practitioner, - practitionerRole: updatedPR, - healthcareServices, - }); - }} - /> - } - /> - - ) : null} - - - - + /> + {practitionerRole ? ( + <> + } + /> + ) => { + navigate(`/practitioners/${practitioner.id}/scheduling`); + manager.set({ + practitioner, + practitionerRole: updatedPR, + healthcareServices, + }); + }} + /> + } + /> + + ) : null} + + + ); }} diff --git a/src/containers/PractitionerList/index.tsx b/src/containers/PractitionerList/index.tsx index 29cc4d17..922965c6 100644 --- a/src/containers/PractitionerList/index.tsx +++ b/src/containers/PractitionerList/index.tsx @@ -1,12 +1,12 @@ import { PlusOutlined } from '@ant-design/icons'; import { t, Trans } from '@lingui/macro'; -import { Button, Col, Empty, notification, Row } from 'antd'; +import { Button, Empty, notification } from 'antd'; import { Practitioner } from 'fhir/r4b'; import { useNavigate } from 'react-router-dom'; import { isLoading, isSuccess } from '@beda.software/remote-data'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { ModalTrigger } from 'src/components/ModalTrigger'; import { QuestionnaireResponseForm } from 'src/components/QuestionnaireResponseForm'; import { SearchBar } from 'src/components/SearchBar'; @@ -14,7 +14,6 @@ import { useSearchBar } from 'src/components/SearchBar/hooks'; import { StringTypeColumnFilterValue } from 'src/components/SearchBar/types'; import { SpinIndicator } from 'src/components/Spinner'; import { Table } from 'src/components/Table'; -import { Title } from 'src/components/Typography'; import { questionnaireIdLoader } from 'src/hooks/questionnaire-response-form-data'; import { usePractitionersList } from './hooks'; @@ -69,84 +68,79 @@ export function PractitionerList(props: PractitionerListProps) { ); return ( - <> - - - - - <Trans>Practitioners</Trans> - - - - { - practitionerListReload(); - notification.success({ - message: t`Practitioner successfully created`, - }); - }} - /> - - - - - - -
- No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> - - ), + Practitioners} + headerRightColumn={ + { + practitionerListReload(); + notification.success({ + message: t`Practitioner successfully created`, + }); }} - dataSource={isSuccess(practitionerDataListRD) ? practitionerDataListRD.data : []} - columns={[ - { - title: Name, - dataIndex: 'practitionerName', - key: 'practitionerName', - width: '20%', - }, - { - title: Specialty, - dataIndex: 'practitionerRoleList', - key: 'practitionerRoleList', - width: '30%', - render: (specialties: string[]) => specialties.join(', '), - }, - { - title: Actions, - dataIndex: 'practitionerResource', - key: 'actions', - width: '5%', - render: (practitioner: Practitioner) => { - return ( - - ); - }, - }, - ]} - loading={isLoading(practitionerDataListRD) && { indicator: SpinIndicator }} /> - - + } + header={{ + children: ( + + ), + }} + > +
+ No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> + + ), + }} + dataSource={isSuccess(practitionerDataListRD) ? practitionerDataListRD.data : []} + columns={[ + { + title: Name, + dataIndex: 'practitionerName', + key: 'practitionerName', + width: '20%', + }, + { + title: Specialty, + dataIndex: 'practitionerRoleList', + key: 'practitionerRoleList', + width: '30%', + render: (specialties: string[]) => specialties.join(', '), + }, + { + title: Actions, + dataIndex: 'practitionerResource', + key: 'actions', + width: '5%', + render: (practitioner: Practitioner) => { + return ( + + ); + }, + }, + ]} + loading={isLoading(practitionerDataListRD) && { indicator: SpinIndicator }} + /> + ); } diff --git a/src/containers/Prescriptions/index.tsx b/src/containers/Prescriptions/index.tsx index 336de714..4878c5dc 100644 --- a/src/containers/Prescriptions/index.tsx +++ b/src/containers/Prescriptions/index.tsx @@ -1,11 +1,11 @@ import { t, Trans } from '@lingui/macro'; -import { Table } from 'antd'; import { Medication, MedicationRequest } from 'fhir/r4b'; import { extractExtension } from 'sdc-qrf'; import { RenderRemoteData } from '@beda.software/fhir-react'; -import { PageContainer } from 'src/components/PageContainer'; +import { Table } from 'src/components'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { Spinner } from 'src/components/Spinner'; import { formatHumanDate } from 'src/utils/date'; import { renderHumanName } from 'src/utils/fhir'; @@ -46,136 +46,132 @@ export function Prescriptions() { return ( onChange(selectedOption, 'patient')} - onChangePractitionerRole={(selectedOption) => onChange(selectedOption, 'practitionerRole')} - onChangeStatus={(selectedOption) => onChange(selectedOption, 'status')} - reset={resetFilter} - /> - } - content={ - - {({ patients, organizations, practitioners, medications, medicationRequests }) => { - return ( -
Patient, - dataIndex: 'name', - key: 'name', - render: (_text, resource) => - renderHumanName( - patients.find( - (patient) => - patient.id === resource.subject.reference?.split('/')?.[1], - )?.name?.[0], - ), - }, - { - title: Requester, - dataIndex: 'requester', - key: 'requester', - render: (_text, resource) => { - const requesterId = resource.requester?.reference?.split('/')?.[1]; - const requesterResourceType = - resource.requester?.reference?.split('/')?.[0]; - if (requesterResourceType === 'Organization') { - const currentOrganization = organizations.find( - (organization) => organization.id === requesterId, - ); - return currentOrganization?.name; - } + variant="with-table" + header={{ + children: ( + onChange(selectedOption, 'patient')} + onChangePractitionerRole={(selectedOption) => onChange(selectedOption, 'practitionerRole')} + onChangeStatus={(selectedOption) => onChange(selectedOption, 'status')} + reset={resetFilter} + /> + ), + }} + > + + {({ patients, organizations, practitioners, medications, medicationRequests }) => { + return ( +
Patient, + dataIndex: 'name', + key: 'name', + render: (_text, resource) => + renderHumanName( + patients.find( + (patient) => patient.id === resource.subject.reference?.split('/')?.[1], + )?.name?.[0], + ), + }, + { + title: Requester, + dataIndex: 'requester', + key: 'requester', + render: (_text, resource) => { + const requesterId = resource.requester?.reference?.split('/')?.[1]; + const requesterResourceType = resource.requester?.reference?.split('/')?.[0]; + if (requesterResourceType === 'Organization') { + const currentOrganization = organizations.find( + (organization) => organization.id === requesterId, + ); + return currentOrganization?.name; + } - if (requesterResourceType === 'Practitioner') { - const currentPractitioner = practitioners.find( - (practitioner) => practitioner.id === requesterId, - ); - return renderHumanName(currentPractitioner?.name?.[0]); - } + if (requesterResourceType === 'Practitioner') { + const currentPractitioner = practitioners.find( + (practitioner) => practitioner.id === requesterId, + ); + return renderHumanName(currentPractitioner?.name?.[0]); + } - return resource.id; - }, - }, - { - title: Medication, - dataIndex: 'medication', - key: 'medication', - render: (_text, resource) => { - const medicationResource = findCurrentMedication(medications, resource); - const medicationName = medicationResource - ? medicationResource.code?.coding?.[0]?.display - : resource?.medicationCodeableConcept?.coding?.[0]?.display; - return medicationName ?? 'Unknown'; - }, + return resource.id; }, - { - title: Batch Number, - dataIndex: 'batchNumber', - key: 'batchNumber', - render: (_text, resource) => - findCurrentMedication(medications, resource)?.batch?.lotNumber ?? 'Unknown', + }, + { + title: Medication, + dataIndex: 'medication', + key: 'medication', + render: (_text, resource) => { + const medicationResource = findCurrentMedication(medications, resource); + const medicationName = medicationResource + ? medicationResource.code?.coding?.[0]?.display + : resource?.medicationCodeableConcept?.coding?.[0]?.display; + return medicationName ?? 'Unknown'; }, - { - title: Status, - dataIndex: 'status', - key: 'status', - render: (_text, resource) => mapPrescriptionStatus(resource), - }, - { - title: Date, - dataIndex: 'date', - key: 'date', - render: (_text, resource) => { - const createdAt = extractExtension( - resource.meta?.extension, - 'ex:createdAt', - ); + }, + { + title: Batch Number, + dataIndex: 'batchNumber', + key: 'batchNumber', + render: (_text, resource) => + findCurrentMedication(medications, resource)?.batch?.lotNumber ?? 'Unknown', + }, + { + title: Status, + dataIndex: 'status', + key: 'status', + render: (_text, resource) => mapPrescriptionStatus(resource), + }, + { + title: Date, + dataIndex: 'date', + key: 'date', + render: (_text, resource) => { + const createdAt = extractExtension(resource.meta?.extension, 'ex:createdAt'); - return createdAt ? formatHumanDate(createdAt) : null; - }, + return createdAt ? formatHumanDate(createdAt) : null; }, - { - title: Actions, - dataIndex: 'actions', - key: 'actions', - render: (_text, resource) => { - const currentMedication = findCurrentMedication(medications, resource); - return ( -
- - -
- ); - }, + }, + { + title: Actions, + dataIndex: 'actions', + key: 'actions', + render: (_text, resource) => { + const currentMedication = findCurrentMedication(medications, resource); + return ( +
+ + +
+ ); }, - ]} - /> - ); - }} - - } - /> + }, + ]} + /> + ); + }} + + ); } diff --git a/src/containers/QuestionnaireBuilder/index.tsx b/src/containers/QuestionnaireBuilder/index.tsx index 6148f96a..f403b58b 100644 --- a/src/containers/QuestionnaireBuilder/index.tsx +++ b/src/containers/QuestionnaireBuilder/index.tsx @@ -1,6 +1,6 @@ import { CloseOutlined } from '@ant-design/icons'; import { t, Trans } from '@lingui/macro'; -import { Button, Col, Row } from 'antd'; +import { Button } from 'antd'; import { Questionnaire } from 'fhir/r4b'; import React, { useState } from 'react'; import { GroupItemProps, QuestionItemProps } from 'sdc-qrf/lib/types'; @@ -8,9 +8,8 @@ import { GroupItemProps, QuestionItemProps } from 'sdc-qrf/lib/types'; import { RenderRemoteData } from '@beda.software/fhir-react'; import { isLoading } from '@beda.software/remote-data'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { ModalTrigger } from 'src/components/ModalTrigger'; -import { Title } from 'src/components/Typography'; import { Builder } from './Builder'; import { useQuestionnaireBuilder } from './hooks'; @@ -40,106 +39,98 @@ export function QuestionnaireBuilder() { const [groupItem, setGroupItem] = useState(); return ( - <> - -
- -
- - <Trans>Build your form</Trans> - - - - - {(questionnaire: Questionnaire) => { - return questionnaire.item ? ( - {t`Save questionnaire`}} - > - {({ closeModal }) => { - return ( - - ); - }} - - ) : ( - + Build your form} + headerRightColumn={ + + {(questionnaire: Questionnaire) => { + return questionnaire.item ? ( + {t`Save questionnaire`}} + > + {({ closeModal }) => { + return ( + ); }} - - - + + ) : ( + + ); + }} + + } + content={{ + className: s.container, + }} + > + +
+ { + if (item?.questionItem.type === 'group') { + setGroupItem(item as GroupItemProps); + setQuestionnaireItem(undefined); + } else { + setQuestionnaireItem(item as QuestionItemProps); + setGroupItem(undefined); + } + }} + onItemDrag={onItemDrag} + />
- - - -
- { - if (item?.questionItem.type === 'group') { - setGroupItem(item as GroupItemProps); + + {questionnaireItem || groupItem ? ( +
+ { setQuestionnaireItem(undefined); - } else { - setQuestionnaireItem(item as QuestionItemProps); setGroupItem(undefined); - } - }} - onItemDrag={onItemDrag} - /> -
- - {questionnaireItem || groupItem ? ( -
- { - setQuestionnaireItem(undefined); - setGroupItem(undefined); - }} - > - - - { - setQuestionnaireItem(undefined); - setGroupItem(undefined); - onItemChange(item); - }} - onDelete={(item) => { - setQuestionnaireItem(undefined); - setGroupItem(undefined); - onItemDelete(item); - }} - /> -
- ) : null} - onSubmitPrompt(prompt)} - onUploadFile={onUploadFile} - onPromptSelect={(prompt) => onPromptSelect(prompt)} - selectedPrompt={selectedPrompt} - isLoading={isLoading(response) || isLoading(updateResponse)} - editHistory={editHistory} - onPromptDelete={onPromptDelete} - /> -
- - - + + + { + setQuestionnaireItem(undefined); + setGroupItem(undefined); + onItemChange(item); + }} + onDelete={(item) => { + setQuestionnaireItem(undefined); + setGroupItem(undefined); + onItemDelete(item); + }} + /> +
+ ) : null} + onSubmitPrompt(prompt)} + onUploadFile={onUploadFile} + onPromptSelect={(prompt) => onPromptSelect(prompt)} + selectedPrompt={selectedPrompt} + isLoading={isLoading(response) || isLoading(updateResponse)} + editHistory={editHistory} + onPromptDelete={onPromptDelete} + /> + +
+ ); } diff --git a/src/containers/QuestionnaireList/index.tsx b/src/containers/QuestionnaireList/index.tsx index 7589ea4e..d2bbc628 100644 --- a/src/containers/QuestionnaireList/index.tsx +++ b/src/containers/QuestionnaireList/index.tsx @@ -8,12 +8,11 @@ import { Link } from 'react-router-dom'; import config from '@beda.software/emr-config'; import { isLoading, isSuccess } from '@beda.software/remote-data'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { SearchBar } from 'src/components/SearchBar'; import { useSearchBar } from 'src/components/SearchBar/hooks'; import { SpinIndicator } from 'src/components/Spinner'; import { Table } from 'src/components/Table'; -import { Title } from 'src/components/Typography'; import { useQuestionnaireList } from './hooks'; import { getQuestionnaireListSearchBarColumns } from './searchBarUtils'; @@ -72,48 +71,43 @@ export function QuestionnaireList() { const { pagination, questionnaireListRD, handleTableChange } = useQuestionnaireList(columnsFilterValues); return ( - <> - - -
- - <Trans>Questionnaires</Trans> - - - - - - - - - - - - - - pagination={pagination} - onChange={handleTableChange} - locale={{ - emptyText: ( - <> - No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> - - ), - }} - rowKey={(p) => p.id!} - dataSource={isSuccess(questionnaireListRD) ? questionnaireListRD.data : []} - columns={columns} - loading={isLoading(questionnaireListRD) && { indicator: SpinIndicator }} - /> - - + Questionnaires} + headerRightColumn={ + + + + } + header={{ + children: ( + + ), + }} + > + + pagination={pagination} + onChange={handleTableChange} + locale={{ + emptyText: ( + <> + No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> + + ), + }} + rowKey={(p) => p.id!} + dataSource={isSuccess(questionnaireListRD) ? questionnaireListRD.data : []} + columns={columns} + loading={isLoading(questionnaireListRD) && { indicator: SpinIndicator }} + /> + ); } diff --git a/src/containers/VideoCall/index.tsx b/src/containers/VideoCall/index.tsx index 86ca19b0..0cf1b5e9 100644 --- a/src/containers/VideoCall/index.tsx +++ b/src/containers/VideoCall/index.tsx @@ -1,13 +1,12 @@ import { JitsiMeeting } from '@jitsi/react-sdk'; -import { Col, Row } from 'antd'; +import { Trans } from '@lingui/macro'; import { ContactPoint } from 'fhir/r4b'; import { useLocation, useNavigate } from 'react-router-dom'; import config from '@beda.software/emr-config'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { EncounterData } from 'src/components/EncountersTable/types'; -import { Title } from 'src/components/Typography'; import { sharedJitsiAuthToken } from 'src/sharedState'; import { renderHumanName } from 'src/utils/fhir'; @@ -26,42 +25,33 @@ export function VideoCall() { const jwtAuthToken = sharedJitsiAuthToken.getSharedState(); return ( - <> - - - - Video call - - - - - - - { - iframeRef.style.height = '500px'; - }} - onReadyToClose={() => { - navigate(`/patients/${encounter.patient?.id}/encounters/${encounter.id}`); - }} - /> - - - + Video call}> + + + { + iframeRef.style.height = '500px'; + }} + onReadyToClose={() => { + navigate(`/patients/${encounter.patient?.id}/encounters/${encounter.id}`); + }} + /> + + ); } diff --git a/src/uberComponents/ResourceListPage/index.tsx b/src/uberComponents/ResourceListPage/index.tsx index 2f5b5686..1b1f63a5 100644 --- a/src/uberComponents/ResourceListPage/index.tsx +++ b/src/uberComponents/ResourceListPage/index.tsx @@ -2,16 +2,16 @@ import { plural, Trans } from '@lingui/macro'; import { Empty, Row, Col, Button } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import { Bundle, Resource } from 'fhir/r4b'; +import React from 'react'; import { formatError, SearchParams } from '@beda.software/fhir-react'; import { isFailure, isLoading, isSuccess } from '@beda.software/remote-data'; -import { BasePageContent, BasePageHeader } from 'src/components/BaseLayout'; +import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { SearchBar } from 'src/components/SearchBar'; import { useSearchBar } from 'src/components/SearchBar/hooks'; import { SpinIndicator } from 'src/components/Spinner'; import { Table } from 'src/components/Table'; -import { Title } from 'src/components/Typography'; import { NavigationActionType, @@ -34,6 +34,9 @@ interface ResourceListPageProps { /* Page header title (for example, Organizations) */ headerTitle: string; + /* Page content max width */ + maxWidth?: number | string; + /* Primary resource type (for example, Organization) */ resourceType: R['resourceType']; @@ -80,6 +83,7 @@ interface ResourceListPageProps { export function ResourceListPage({ headerTitle: title, + maxWidth, resourceType, extractPrimaryResources, searchParams, @@ -107,83 +111,80 @@ export function ResourceListPage({ const batchActions = getBatchActions?.() ?? []; return ( - <> - - - - {title} - - {headerActions.map((action, index) => ( + ( + + + + ))} + header={{ + children: ( + + ), + }} + > + {batchActions.length ? ( + + {batchActions.map((action, index) => ( - + + action={action} + reload={pagerManager.reload} + bundle={selectedResourcesBundle} + disabled={!selectedRowKeys.length} + /> ))} + + {selectedRowKeys.length ? ( + + ) : null} + + + {selectedRowKeys.length + ? plural(selectedRowKeys.length, { one: 'Selected # item', other: 'Selected # items' }) + : null} + - - - - - {batchActions.length ? ( - - {batchActions.map((action, index) => ( - - - action={action} - reload={pagerManager.reload} - bundle={selectedResourcesBundle} - disabled={!selectedRowKeys.length} - /> - - ))} - - {selectedRowKeys.length ? ( - - ) : null} - - - {selectedRowKeys.length - ? plural(selectedRowKeys.length, { one: 'Selected # item', other: 'Selected # items' }) - : null} - - - ) : null} - - > - pagination={pagination} - onChange={handleTableChange} - rowSelection={batchActions.length ? { selectedRowKeys, onChange: setSelectedRowKeys } : undefined} - locale={{ - emptyText: isFailure(recordResponse) ? ( - <> - - - ) : ( - <> - No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> - - ), - }} - rowKey={(p) => p.resource.id!} - dataSource={isSuccess(recordResponse) ? recordResponse.data : []} - columns={[ - ...tableColumns, - ...(getRecordActions - ? [getRecordActionsColumn({ getRecordActions, reload: pagerManager.reload })] - : []), - ]} - loading={isLoading(recordResponse) && { indicator: SpinIndicator }} - /> - - + ) : null} + + > + pagination={pagination} + onChange={handleTableChange} + rowSelection={batchActions.length ? { selectedRowKeys, onChange: setSelectedRowKeys } : undefined} + locale={{ + emptyText: isFailure(recordResponse) ? ( + <> + + + ) : ( + <> + No data} image={Empty.PRESENTED_IMAGE_SIMPLE} /> + + ), + }} + rowKey={(p) => p.resource.id!} + dataSource={isSuccess(recordResponse) ? recordResponse.data : []} + columns={[ + ...tableColumns, + ...(getRecordActions + ? [getRecordActionsColumn({ getRecordActions, reload: pagerManager.reload })] + : []), + ]} + loading={isLoading(recordResponse) && { indicator: SpinIndicator }} + /> + ); } From 35cd4dd2c3a36d2f805d3485ac11fc7ac4b3b1a7 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Mon, 2 Dec 2024 18:47:21 +0100 Subject: [PATCH 04/22] Update table header bg color --- src/components/Table/Table.module.scss | 21 -------------------- src/components/Table/index.tsx | 8 ++++---- src/components/Table/styles.ts | 27 ++++++++++++++++++++++++++ src/components/index.ts | 2 ++ 4 files changed, 33 insertions(+), 25 deletions(-) delete mode 100644 src/components/Table/Table.module.scss create mode 100644 src/components/Table/styles.ts diff --git a/src/components/Table/Table.module.scss b/src/components/Table/Table.module.scss deleted file mode 100644 index b47f340c..00000000 --- a/src/components/Table/Table.module.scss +++ /dev/null @@ -1,21 +0,0 @@ -.container { - overflow: auto; -} - -:local .table { - :global .ant-spin-container { - min-width: fit-content; - } - - :global .ant-table { - min-width: fit-content; - } - - :global .ant-table-container { - min-width: fit-content; - } - - :global .ant-table-content { - min-width: fit-content; - } -} diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index 19f721ac..e8451d2a 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -1,12 +1,12 @@ import { Table as ANTDTable } from 'antd'; import { TableProps } from 'antd/lib/table'; -import s from './Table.module.scss'; +import { S } from './styles'; export function Table(props: TableProps) { return ( -
- className={s.table} bordered size="middle" {...props} /> -
+ + bordered size="middle" {...props} /> + ); } diff --git a/src/components/Table/styles.ts b/src/components/Table/styles.ts new file mode 100644 index 00000000..d574d9e2 --- /dev/null +++ b/src/components/Table/styles.ts @@ -0,0 +1,27 @@ +import styled from 'styled-components'; + +export const S = { + Table: styled.div` + overflow: auto; + + .ant-spin-container { + min-width: fit-content; + } + + .ant-table { + min-width: fit-content; + } + + .ant-table-container { + min-width: fit-content; + } + + .ant-table-content { + min-width: fit-content; + } + + .ant-table-thead .ant-table-cell { + background-color: ${({ theme }) => theme.neutralPalette.gray_3}; + } + `, +}; diff --git a/src/components/index.ts b/src/components/index.ts index 3000b691..2ddef6ec 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -31,3 +31,5 @@ export * from './Table'; export * from './TextWithMacroFill'; export * from './TimePicker'; export * from './Typography'; +export * from './BaseLayout/PageContainer'; +export * from './Tabs'; From 2d4ace6987d6e483f183bdcd4e003871a417a371 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Mon, 2 Dec 2024 18:52:57 +0100 Subject: [PATCH 05/22] Update Search bar styles --- src/components/SearchBar/SearchBar.styles.ts | 21 ---------------- src/components/SearchBar/index.tsx | 10 ++++---- src/components/SearchBar/styles.ts | 26 ++++++++++++++++++++ src/components/Select/styles.ts | 9 +++++++ 4 files changed, 40 insertions(+), 26 deletions(-) delete mode 100644 src/components/SearchBar/SearchBar.styles.ts create mode 100644 src/components/SearchBar/styles.ts diff --git a/src/components/SearchBar/SearchBar.styles.ts b/src/components/SearchBar/SearchBar.styles.ts deleted file mode 100644 index 119c53ef..00000000 --- a/src/components/SearchBar/SearchBar.styles.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Layout } from 'antd'; -import styled from 'styled-components'; - -export const S = { - Container: styled(Layout)` - position: relative; - padding: 16px; - border-radius: 10px; - background-color: ${({ theme }) => theme.primaryPalette.bcp_3}; - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 16px 32px; - flex-wrap: wrap; - - .ant-input-search, - .ant-picker { - width: 264px; - } - `, -}; diff --git a/src/components/SearchBar/index.tsx b/src/components/SearchBar/index.tsx index d05ed73d..7046a5db 100644 --- a/src/components/SearchBar/index.tsx +++ b/src/components/SearchBar/index.tsx @@ -1,8 +1,8 @@ import { Trans } from '@lingui/macro'; -import { Button, Row } from 'antd'; +import { Button } from 'antd'; -import { S } from './SearchBar.styles'; import { SearchBarColumn } from './SearchBarColumn'; +import { S } from './styles'; import { SearchBarData } from './types'; export function SearchBar(props: SearchBarData) { @@ -10,7 +10,7 @@ export function SearchBar(props: SearchBarData) { return ( - + {columnsFilterValues.map((columnFilterValue) => ( ))} - + ); diff --git a/src/components/SearchBar/styles.ts b/src/components/SearchBar/styles.ts new file mode 100644 index 00000000..e9d9b7d7 --- /dev/null +++ b/src/components/SearchBar/styles.ts @@ -0,0 +1,26 @@ +import styled from 'styled-components'; + +export const S = { + Container: styled.div` + position: relative; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + gap: 16px; + flex-wrap: wrap; + + .ant-input-search, + .ant-picker, + .react-select__control { + width: 270px; + } + `, + LeftColumn: styled.div` + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: wrap; + gap: 10px 8px; + `, +}; diff --git a/src/components/Select/styles.ts b/src/components/Select/styles.ts index f5b4a188..9602ec86 100644 --- a/src/components/Select/styles.ts +++ b/src/components/Select/styles.ts @@ -32,6 +32,11 @@ export const S = { color: ${({ theme }) => theme.antdTheme?.colorTextPlaceholder}; } + .react-select__loading-indicator { + justify-content: center; + align-items: center; + } + .react-select__placeholder { margin: 0; color: ${({ theme }) => theme.antdTheme?.colorTextDisabled}; @@ -40,6 +45,10 @@ export const S = { .react-select__input-container { margin: 0; padding: 0; + + input { + color: ${({ theme }) => theme.antdTheme?.colorText} !important; + } } .react-select__indicator-separator { From 2af6bf4edbcfd0972c985c2463bbf2b4d3f37a85 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Mon, 2 Dec 2024 19:07:03 +0100 Subject: [PATCH 06/22] Refactor search bar styles copies --- .../InvoiceListSearchBar.styles.ts | 28 --------- .../components/InvoiceListSearchBar/index.tsx | 58 +++++++++--------- .../MedicationsSearchBar.styles.ts | 27 --------- .../components/MedicationsSearchBar/index.tsx | 23 ++++---- .../OrganizationScheduling/Calendar.styles.ts | 17 ------ ...lthcareServicePractitionerSelect.styles.ts | 3 - .../index.tsx | 22 ++++--- .../OrganizationScheduling/index.tsx | 11 ++-- .../PrescriptionsSearchBar.styles.ts | 27 --------- .../PrescriptionsSearchBar/index.tsx | 59 +++++++++---------- 10 files changed, 82 insertions(+), 193 deletions(-) delete mode 100644 src/containers/InvoiceList/components/InvoiceListSearchBar/InvoiceListSearchBar.styles.ts delete mode 100644 src/containers/MedicationManagement/components/MedicationsSearchBar/MedicationsSearchBar.styles.ts delete mode 100644 src/containers/Prescriptions/components/PrescriptionsSearchBar/PrescriptionsSearchBar.styles.ts diff --git a/src/containers/InvoiceList/components/InvoiceListSearchBar/InvoiceListSearchBar.styles.ts b/src/containers/InvoiceList/components/InvoiceListSearchBar/InvoiceListSearchBar.styles.ts deleted file mode 100644 index c562d85a..00000000 --- a/src/containers/InvoiceList/components/InvoiceListSearchBar/InvoiceListSearchBar.styles.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Layout } from 'antd'; -import styled from 'styled-components'; - -export const S = { - Container: styled(Layout)` - position: relative; - padding: 16px; - border-radius: 10px; - background-color: ${({ theme }) => theme.primaryPalette.bcp_3}; - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 16px 32px; - flex-wrap: wrap; - - .ant-input-search, - .ant-picker { - width: 264px; - } - `, - SelectContainer: styled.div` - margin-left: 16px; - display: flex; - flex-direction: row; - gap: 32px; - flex-wrap: wrap; - `, -}; diff --git a/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx b/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx index 2dfba9c0..60bf5e5a 100644 --- a/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx +++ b/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx @@ -1,11 +1,11 @@ import { t } from '@lingui/macro'; -import { Row, Button } from 'antd'; +import { Button } from 'antd'; +import { S } from 'src/components/SearchBar/styles'; import { AsyncDropdown } from 'src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect'; import { OptionType } from 'src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/types'; import { Role, matchCurrentUserRole } from 'src/utils/role'; -import { S } from './InvoiceListSearchBar.styles'; import { InvoiceListSearchBarSelectProps } from '../../types'; export function InvoiceListSearchBar(props: InvoiceListSearchBarSelectProps) { @@ -24,34 +24,32 @@ export function InvoiceListSearchBar(props: InvoiceListSearchBarSelectProps) { return ( - - - - - + + + diff --git a/src/containers/MedicationManagement/components/MedicationsSearchBar/MedicationsSearchBar.styles.ts b/src/containers/MedicationManagement/components/MedicationsSearchBar/MedicationsSearchBar.styles.ts deleted file mode 100644 index 66c51f4d..00000000 --- a/src/containers/MedicationManagement/components/MedicationsSearchBar/MedicationsSearchBar.styles.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Layout } from 'antd'; -import styled from 'styled-components'; - -export const S = { - Container: styled(Layout)` - position: relative; - padding: 16px; - border-radius: 10px; - background-color: ${({ theme }) => theme.primaryPalette.bcp_3}; - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 16px 32px; - flex-wrap: wrap; - - .ant-input-search, - .ant-picker { - width: 264px; - } - `, - SelectContainer: styled.div` - margin-left: 16px; - display: flex; - flex-direction: row; - gap: 32px; - `, -}; diff --git a/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx b/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx index 351d36a7..284024ba 100644 --- a/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx +++ b/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx @@ -1,14 +1,13 @@ import { t } from '@lingui/macro'; -import { Row, Button } from 'antd'; +import { Button } from 'antd'; +import { S } from 'src/components/SearchBar/styles'; import { AsyncDropdown } from 'src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect'; import { OptionType, SelectOption, } from 'src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/types'; -import { S } from './MedicationsSearchBar.styles'; - export interface MedicationsSearchBarSelectProps { selectedMedication: SelectOption; loadMedicationOptions: (search: string) => void; @@ -21,16 +20,14 @@ export function MedicationsSearchBar(props: MedicationsSearchBarSelectProps) { return ( - - - - - + + + diff --git a/src/containers/OrganizationScheduling/Calendar.styles.ts b/src/containers/OrganizationScheduling/Calendar.styles.ts index d77dd09d..378a5012 100644 --- a/src/containers/OrganizationScheduling/Calendar.styles.ts +++ b/src/containers/OrganizationScheduling/Calendar.styles.ts @@ -1,23 +1,6 @@ -import { Layout } from 'antd'; import styled from 'styled-components'; export const S = { - SearchBarContainer: styled(Layout)` - position: relative; - padding: 16px; - border-radius: 10px; - background-color: ${({ theme }) => theme.primaryPalette.bcp_3}; - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 16px 32px; - flex-wrap: wrap; - - .ant-input-search, - .ant-picker { - width: 264px; - } - `, Wrapper: styled.div` overflow-x: auto; `, diff --git a/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/HealthcareServicePractitionerSelect.styles.ts b/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/HealthcareServicePractitionerSelect.styles.ts index 16f76e7e..6ac1b0c5 100644 --- a/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/HealthcareServicePractitionerSelect.styles.ts +++ b/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/HealthcareServicePractitionerSelect.styles.ts @@ -6,7 +6,4 @@ export const S = { flex-direction: row; gap: 10px; `, - SelectWrapper: styled.div` - width: 250px; - `, }; diff --git a/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/index.tsx b/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/index.tsx index a7bea7a5..27f660ea 100644 --- a/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/index.tsx +++ b/src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/index.tsx @@ -52,17 +52,15 @@ export function AsyncDropdown(props: AsyncDropdownProps) { } return ( - - - + ); } diff --git a/src/containers/OrganizationScheduling/index.tsx b/src/containers/OrganizationScheduling/index.tsx index c4478ec9..95f2ef85 100644 --- a/src/containers/OrganizationScheduling/index.tsx +++ b/src/containers/OrganizationScheduling/index.tsx @@ -1,10 +1,11 @@ import { Trans, t } from '@lingui/macro'; -import { Button, Row, notification } from 'antd'; +import { Button, notification } from 'antd'; import { RenderRemoteData } from '@beda.software/fhir-react'; import { PageContainer } from 'src/components/BaseLayout/PageContainer'; import { Calendar } from 'src/components/Calendar'; +import { S as SearchBarStyles } from 'src/components/SearchBar/styles'; import { S } from './Calendar.styles'; import { HealthcareServicePractitionerSelect } from './HealthcareServicePractitionerSelect'; @@ -68,8 +69,8 @@ export function OrganizationScheduling() { title={Scheduling} header={{ children: ( - - + + - + - + ), }} > diff --git a/src/containers/Prescriptions/components/PrescriptionsSearchBar/PrescriptionsSearchBar.styles.ts b/src/containers/Prescriptions/components/PrescriptionsSearchBar/PrescriptionsSearchBar.styles.ts deleted file mode 100644 index 66c51f4d..00000000 --- a/src/containers/Prescriptions/components/PrescriptionsSearchBar/PrescriptionsSearchBar.styles.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Layout } from 'antd'; -import styled from 'styled-components'; - -export const S = { - Container: styled(Layout)` - position: relative; - padding: 16px; - border-radius: 10px; - background-color: ${({ theme }) => theme.primaryPalette.bcp_3}; - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 16px 32px; - flex-wrap: wrap; - - .ant-input-search, - .ant-picker { - width: 264px; - } - `, - SelectContainer: styled.div` - margin-left: 16px; - display: flex; - flex-direction: row; - gap: 32px; - `, -}; diff --git a/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx b/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx index fa2b7207..e6e1c909 100644 --- a/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx +++ b/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx @@ -1,6 +1,7 @@ import { t } from '@lingui/macro'; -import { Row, Button } from 'antd'; +import { Button } from 'antd'; +import { S } from 'src/components/SearchBar/styles'; import { AsyncDropdown } from 'src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect'; import { OptionType, @@ -8,8 +9,6 @@ import { } from 'src/containers/OrganizationScheduling/HealthcareServicePractitionerSelect/types'; import { Role, matchCurrentUserRole } from 'src/utils/role'; -import { S } from './PrescriptionsSearchBar.styles'; - export interface PrescriptionsSearchBarSelectProps { selectedPatient: SelectOption; selectedPractitionerRole: SelectOption; @@ -39,34 +38,32 @@ export function PrescriptionsSearchBar(props: PrescriptionsSearchBarSelectProps) return ( - - - - + + From 1507cfbc846b76144ea542a4f99d78ebc12413cd Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Mon, 2 Dec 2024 19:14:21 +0100 Subject: [PATCH 07/22] Extract locales --- src/locale/en/messages.po | 391 +++++++++++++++++++------------------- src/locale/es/messages.po | 391 +++++++++++++++++++------------------- src/locale/ru/messages.po | 391 +++++++++++++++++++------------------- 3 files changed, 579 insertions(+), 594 deletions(-) diff --git a/src/locale/en/messages.po b/src/locale/en/messages.po index d69f76ea..e5c67641 100644 --- a/src/locale/en/messages.po +++ b/src/locale/en/messages.po @@ -13,11 +13,11 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/components/ResourceList/index.tsx:117 +#: src/uberComponents/ResourceListPage/index.tsx:153 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" -#: src/components/ResourceList/actions.tsx:165 +#: src/uberComponents/ResourceListPage/actions.tsx:165 msgid "{0}" msgstr "" @@ -25,17 +25,17 @@ msgstr "" msgid "Action" msgstr "" -#: src/components/PatientEncounter/index.tsx:47 -#: src/components/ResourceList/index.tsx:166 +#: src/components/PatientEncounter/index.tsx:46 #: src/containers/DocumentsList/index.tsx:69 -#: src/containers/EncounterList/index.tsx:71 -#: src/containers/HealthcareServiceList/index.tsx:85 +#: src/containers/EncounterList/index.tsx:70 +#: src/containers/HealthcareServiceList/index.tsx:79 #: src/containers/InvoiceList/tableUtils.tsx:150 #: src/containers/InvoiceList/tableUtils.tsx:157 -#: src/containers/MedicationManagement/index.tsx:67 -#: src/containers/PatientList/index.tsx:111 -#: src/containers/PractitionerList/index.tsx:126 -#: src/containers/Prescriptions/index.tsx:151 +#: src/containers/MedicationManagement/index.tsx:71 +#: src/containers/PatientList/index.tsx:103 +#: src/containers/PractitionerList/index.tsx:121 +#: src/containers/Prescriptions/index.tsx:148 +#: src/uberComponents/ResourceListPage/index.tsx:201 msgid "Actions" msgstr "" @@ -48,21 +48,21 @@ msgid "Activate healthcare service" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:97 -#: src/containers/Prescriptions/index.tsx:191 +#: src/containers/Prescriptions/index.tsx:187 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:82 msgid "Active" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:223 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:232 #: src/containers/PatientDetails/PatientResources/utils.tsx:24 msgid "Active Medications" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:157 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:163 msgid "Activities" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:22 +#: src/containers/PatientDetails/PatientWearables/index.tsx:21 msgid "Activity" msgstr "" @@ -91,7 +91,7 @@ msgstr "" msgid "Add Medication Batch" msgstr "" -#: src/containers/PractitionerList/index.tsx:34 +#: src/containers/PractitionerList/index.tsx:33 msgid "Add new practitioner" msgstr "" @@ -117,7 +117,7 @@ msgstr "" msgid "Add patient" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:87 +#: src/containers/QuestionnaireList/index.tsx:81 msgid "Add questionnaire" msgstr "" @@ -125,24 +125,24 @@ msgstr "" msgid "Adjust Last Option Right" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:40 +#: src/containers/QuestionnaireList/index.tsx:39 msgid "AI builder" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:57 +#: src/containers/QuestionnaireList/index.tsx:56 msgid "Aidbox Forms Builder" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:34 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:35 #: src/containers/PatientDetails/PatientResources/utils.tsx:98 msgid "Allergies" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:154 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:151 msgid "Amend" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:97 +#: src/containers/InvoiceDetails/index.tsx:102 #: src/containers/InvoiceList/tableUtils.tsx:143 #: src/containers/MedicationManagement/utils.tsx:36 msgid "Amount" @@ -152,29 +152,29 @@ msgstr "" msgid "Appointment" msgstr "" -#: src/containers/Appointment/PublicAppointment.tsx:48 +#: src/containers/Appointment/PublicAppointment.tsx:44 msgid "Appointment booking" msgstr "" -#: src/containers/OrganizationScheduling/index.tsx:223 +#: src/containers/OrganizationScheduling/index.tsx:224 #: src/containers/Scheduling/ScheduleCalendar/index.tsx:93 msgid "Appointment successfully added" msgstr "" -#: src/containers/Appointment/PublicAppointment.tsx:61 +#: src/containers/Appointment/PublicAppointment.tsx:53 msgid "Appointment successfully created" msgstr "" -#: src/containers/OrganizationScheduling/index.tsx:176 +#: src/containers/OrganizationScheduling/index.tsx:177 #: src/containers/Scheduling/ScheduleCalendar/index.tsx:76 msgid "Appointment successfully rescheduled" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:149 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:146 msgid "Are you sure you want to amend the document?" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:174 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:171 msgid "Are you sure you want to delete the document?" msgstr "" @@ -182,8 +182,7 @@ msgstr "" msgid "Are you sure you want to delete this item?" msgstr "" -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:40 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:72 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:26 #: src/containers/Scheduling/Availability/index.tsx:54 msgid "Availability" msgstr "" @@ -210,7 +209,7 @@ msgid "Batch Number" msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 -#: src/containers/PatientList/index.tsx:94 +#: src/containers/PatientList/index.tsx:87 #: src/containers/PatientResourceListExample/index.tsx:45 msgid "Birth date" msgstr "" @@ -223,11 +222,11 @@ msgstr "" msgid "Break" msgstr "" -#: src/containers/QuestionnaireBuilder/index.tsx:49 +#: src/containers/QuestionnaireBuilder/index.tsx:43 msgid "Build your form" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:47 +#: src/containers/PatientDetails/PatientWearables/index.tsx:46 msgid "Calories" msgstr "" @@ -249,7 +248,7 @@ msgstr "" #: src/containers/InvoiceList/tableUtils.tsx:28 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:101 -#: src/containers/Prescriptions/index.tsx:193 +#: src/containers/Prescriptions/index.tsx:189 msgid "Cancelled" msgstr "" @@ -261,6 +260,10 @@ msgstr "" msgid "Characteristics" msgstr "" +#: src/components/SearchBar/index.tsx:24 +msgid "Clear filters" +msgstr "" + #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:92 msgid "Clinician successfully updated" msgstr "" @@ -282,8 +285,8 @@ msgstr "" msgid "Complete" msgstr "" -#: src/containers/EncounterDetails/index.tsx:165 -#: src/containers/EncounterDetails/index.tsx:169 +#: src/containers/EncounterDetails/index.tsx:162 +#: src/containers/EncounterDetails/index.tsx:166 msgid "Complete encounter" msgstr "" @@ -293,7 +296,7 @@ msgid "completed" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:105 -#: src/containers/Prescriptions/index.tsx:194 +#: src/containers/Prescriptions/index.tsx:190 msgid "Completed" msgstr "" @@ -301,7 +304,7 @@ msgstr "" msgid "Concepts:" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:72 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:75 #: src/containers/PatientDetails/PatientResources/utils.tsx:59 msgid "Conditions" msgstr "" @@ -314,21 +317,20 @@ msgstr "" msgid "Confirm Medication Request" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:110 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:115 #: src/containers/PatientDetails/PatientResources/utils.tsx:172 msgid "Consents" msgstr "" -#: src/containers/EncounterDetails/index.tsx:38 -#: src/containers/EncounterDetails/index.tsx:51 +#: src/containers/EncounterDetails/index.tsx:48 msgid "Consultation" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:92 +#: src/containers/PatientDetails/PatientWearables/index.tsx:89 msgid "Contact the patient to obtain their consent for accessing activity data" msgstr "" -#: src/containers/MedicationManagement/index.tsx:60 +#: src/containers/MedicationManagement/index.tsx:64 #: src/containers/MedicationManagement/utils.tsx:39 msgid "Cost" msgstr "" @@ -339,7 +341,7 @@ msgstr "" #: src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx:51 #: src/containers/EncounterDetails/hooks.ts:30 -#: src/containers/PatientDetails/PatientDocuments/index.tsx:32 +#: src/containers/PatientDetails/PatientDocuments/index.tsx:28 msgid "Create document" msgstr "" @@ -349,7 +351,7 @@ msgstr "" msgid "Create Encounter" msgstr "" -#: src/containers/PractitionerList/index.tsx:30 +#: src/containers/PractitionerList/index.tsx:29 msgid "Create practitioner" msgstr "" @@ -370,15 +372,15 @@ msgstr "" msgid "CRP" msgstr "" -#: src/components/PatientEncounter/index.tsx:40 -#: src/containers/EncounterList/index.tsx:64 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:26 +#: src/components/PatientEncounter/index.tsx:39 +#: src/containers/EncounterList/index.tsx:63 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:23 #: src/containers/InvoiceList/tableUtils.tsx:129 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:53 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:91 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:136 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:208 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:273 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:55 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:95 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:142 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:216 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:283 #: src/containers/PatientDetails/PatientResources/utils.tsx:85 #: src/containers/PatientDetails/PatientResources/utils.tsx:124 #: src/containers/PatientDetails/PatientResources/utils.tsx:163 @@ -420,7 +422,7 @@ msgstr "" msgid "Default" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:179 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:176 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:140 msgid "Delete" msgstr "" @@ -449,8 +451,7 @@ msgstr "" msgid "Display" msgstr "" -#: src/containers/PatientDetails/PatientDocuments/index.tsx:22 -#: src/containers/PatientDetails/PatientHeader/index.tsx:80 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:20 msgid "Documents" msgstr "" @@ -458,7 +459,7 @@ msgstr "" msgid "Documents have been successfully extracted" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:242 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:252 #: src/containers/PatientDetails/PatientResources/utils.tsx:50 msgid "Dosage" msgstr "" @@ -469,28 +470,28 @@ msgstr "" #: src/containers/InvoiceList/tableUtils.tsx:30 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:121 -#: src/containers/Prescriptions/index.tsx:197 +#: src/containers/Prescriptions/index.tsx:193 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:81 msgid "Draft" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:47 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:46 msgid "Draft successfully deleted" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:28 +#: src/containers/PatientDetails/PatientWearables/index.tsx:27 msgid "Duration (min)" msgstr "" -#: src/containers/HealthcareServiceList/index.tsx:68 +#: src/containers/HealthcareServiceList/index.tsx:62 msgid "Duration (minutes)" msgstr "" #: src/components/ModalEditHealthcareService/index.tsx:21 #: src/containers/EncounterDetails/AIScribe/index.tsx:197 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:187 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:184 #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:23 -#: src/containers/PatientList/index.tsx:135 +#: src/containers/PatientList/index.tsx:127 #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:67 #: src/containers/Scheduling/ScheduleCalendar/components/AppointmentDetailsModal/index.tsx:87 msgid "Edit" @@ -504,7 +505,7 @@ msgstr "" msgid "Edit Healthcare Service" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:30 +#: src/containers/QuestionnaireList/index.tsx:29 msgid "Edit in" msgstr "" @@ -513,7 +514,7 @@ msgstr "" #~ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:20 -#: src/containers/PatientList/index.tsx:132 +#: src/containers/PatientList/index.tsx:124 msgid "Edit patient" msgstr "" @@ -529,7 +530,7 @@ msgstr "" msgid "Encounter" msgstr "" -#: src/containers/EncounterDetails/index.tsx:117 +#: src/containers/EncounterDetails/index.tsx:114 msgid "Encounter completed" msgstr "" @@ -537,19 +538,18 @@ msgstr "" msgid "Encounter successfully created" msgstr "" -#: src/containers/EncounterDetails/index.tsx:185 +#: src/containers/EncounterDetails/index.tsx:182 msgid "Encounter was successfully completed" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:25 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:31 -#: src/components/PatientEncounter/index.tsx:79 -#: src/containers/EncounterList/index.tsx:103 -#: src/containers/PatientDetails/PatientHeader/index.tsx:79 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:28 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:34 +#: src/containers/EncounterList/index.tsx:101 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:19 msgid "Encounters" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:41 +#: src/containers/PatientDetails/PatientWearables/index.tsx:40 msgid "End" msgstr "" @@ -559,11 +559,11 @@ msgstr "" #: src/containers/InvoiceList/tableUtils.tsx:31 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:113 -#: src/containers/Prescriptions/index.tsx:195 +#: src/containers/Prescriptions/index.tsx:191 msgid "Entered in error" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:53 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:52 msgid "Error deleting a draft" msgstr "" @@ -571,7 +571,7 @@ msgstr "" msgid "Error saving a draft:" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:77 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:76 msgid "Error while amending the document" msgstr "" @@ -655,7 +655,7 @@ msgstr "" msgid "Healthcare service successfully updated" msgstr "" -#: src/containers/HealthcareServiceList/index.tsx:32 +#: src/containers/HealthcareServiceList/index.tsx:29 msgid "Healthcare Services" msgstr "" @@ -667,7 +667,7 @@ msgstr "" msgid "Here will be your questionnaire" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:163 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:160 msgid "History" msgstr "" @@ -679,7 +679,7 @@ msgstr "" msgid "IL-6" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:189 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:196 #: src/containers/PatientDetails/PatientResources/utils.tsx:137 msgid "Immunization" msgstr "" @@ -696,7 +696,7 @@ msgstr "" msgid "Inline options?" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:307 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:317 msgid "Intent" msgstr "" @@ -708,10 +708,10 @@ msgstr "" msgid "Invoice was successfully payed" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:23 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:36 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:26 #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:40 -#: src/containers/InvoiceList/index.tsx:44 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:44 +#: src/containers/InvoiceList/index.tsx:45 msgid "Invoices" msgstr "" @@ -719,7 +719,7 @@ msgstr "" msgid "Issued" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:67 +#: src/containers/InvoiceDetails/index.tsx:72 msgid "Item" msgstr "" @@ -759,11 +759,11 @@ msgstr "" msgid "Max" msgstr "" -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:17 +#: src/containers/InvoiceDetails/index.tsx:27 msgid "Medical Services Invoice" msgstr "" -#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:30 +#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:28 #: src/containers/Prescriptions/index.tsx:113 msgid "Medication" msgstr "" @@ -784,8 +784,8 @@ msgstr "" msgid "Medication request successfully confirmed" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:41 -#: src/containers/MedicationManagement/index.tsx:28 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:45 +#: src/containers/MedicationManagement/index.tsx:29 msgid "Medications" msgstr "" @@ -801,26 +801,26 @@ msgstr "" msgid "Monday" msgstr "" -#: src/containers/MedicationManagement/index.tsx:54 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:42 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:80 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:118 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:197 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:231 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:302 +#: src/containers/MedicationManagement/index.tsx:58 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:43 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:83 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:123 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:204 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:240 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:312 #: src/containers/PatientDetails/PatientResources/utils.tsx:39 #: src/containers/PatientDetails/PatientResources/utils.tsx:74 #: src/containers/PatientDetails/PatientResources/utils.tsx:113 #: src/containers/PatientDetails/PatientResources/utils.tsx:152 #: src/containers/PatientDetails/PatientResources/utils.tsx:188 -#: src/containers/PatientList/index.tsx:88 +#: src/containers/PatientList/index.tsx:81 #: src/containers/PatientResourceListExample/index.tsx:39 -#: src/containers/PractitionerList/index.tsx:113 +#: src/containers/PractitionerList/index.tsx:108 msgid "Name" msgstr "" #. js-lingui-explicit-id -#: src/containers/QuestionnaireList/index.tsx:23 +#: src/containers/QuestionnaireList/index.tsx:22 msgid "msg.QuestionnaireName" msgstr "Name" @@ -829,23 +829,23 @@ msgstr "Name" msgid "New Appointment" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:151 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:176 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:148 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:173 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:137 #: src/utils/questionnaire.ts:61 msgid "No" msgstr "" #: src/components/EncountersTable/index.tsx:30 -#: src/components/ResourceList/index.tsx:137 #: src/components/ResourceTable/index.tsx:67 -#: src/containers/HealthcareServiceList/index.tsx:54 -#: src/containers/InvoiceList/index.tsx:70 -#: src/containers/PatientDetails/PatientWearables/index.tsx:88 -#: src/containers/PatientList/index.tsx:80 -#: src/containers/PractitionerList/index.tsx:106 +#: src/containers/HealthcareServiceList/index.tsx:48 +#: src/containers/InvoiceList/index.tsx:73 +#: src/containers/PatientDetails/PatientWearables/index.tsx:85 +#: src/containers/PatientList/index.tsx:73 +#: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 -#: src/containers/QuestionnaireList/index.tsx:107 +#: src/containers/QuestionnaireList/index.tsx:102 +#: src/uberComponents/ResourceListPage/index.tsx:173 msgid "No data" msgstr "" @@ -874,7 +874,7 @@ msgid "Observations" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:109 -#: src/containers/Prescriptions/index.tsx:192 +#: src/containers/Prescriptions/index.tsx:188 msgid "On Hold" msgstr "" @@ -887,13 +887,13 @@ msgstr "" #~ msgid "On the next page, please, use the following credentials" #~ msgstr "" -#: src/components/PatientEncounter/index.tsx:58 +#: src/components/PatientEncounter/index.tsx:57 #: src/containers/DocumentsList/index.tsx:79 -#: src/containers/EncounterList/index.tsx:82 +#: src/containers/EncounterList/index.tsx:81 #: src/containers/InvoiceList/tableUtils.tsx:82 #: src/containers/PatientDetails/PatientOverviewDynamic/components/PatientNoteListCard/ModalNoteOpen/index.tsx:22 -#: src/containers/PatientList/index.tsx:127 -#: src/containers/PractitionerList/index.tsx:141 +#: src/containers/PatientList/index.tsx:119 +#: src/containers/PractitionerList/index.tsx:136 msgid "Open" msgstr "" @@ -908,7 +908,7 @@ msgstr "" msgid "Option {index}" msgstr "" -#: src/containers/EncounterDetails/index.tsx:92 +#: src/containers/EncounterDetails/index.tsx:89 msgid "or" msgstr "" @@ -916,15 +916,13 @@ msgstr "" msgid "Order added" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:82 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:294 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:22 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:304 msgid "Orders" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:41 -#: src/containers/PatientDetails/PatientHeader/index.tsx:78 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:56 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:70 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:18 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:24 msgid "Overview" msgstr "" @@ -937,22 +935,23 @@ msgstr "" msgid "Password" msgstr "" -#: src/containers/EncounterList/index.tsx:46 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:20 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:39 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:39 +#: src/containers/EncounterList/index.tsx:45 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:17 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:38 #: src/containers/InvoiceList/tableUtils.tsx:122 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:48 -#: src/containers/Prescriptions/index.tsx:76 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:46 +#: src/containers/Prescriptions/index.tsx:78 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:69 msgid "Patient" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:93 +#: src/containers/PatientDetails/PatientWearables/index.tsx:90 msgid "Patient consent is required" msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:33 -#: src/containers/PatientList/index.tsx:145 +#: src/containers/PatientList/index.tsx:137 msgid "Patient saved" msgstr "" @@ -960,10 +959,9 @@ msgstr "" msgid "Patient successfully created" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:26 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:32 -#: src/containers/PatientDetails/PatientHeader/index.tsx:26 -#: src/containers/PatientList/index.tsx:59 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:29 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:35 +#: src/containers/PatientList/index.tsx:55 #: src/containers/PatientResourceListExample/index.tsx:34 msgid "Patients" msgstr "" @@ -985,32 +983,31 @@ msgstr "" msgid "Phone widget" msgstr "" -#: src/components/PatientEncounter/index.tsx:26 -#: src/containers/EncounterList/index.tsx:52 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:23 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:33 +#: src/components/PatientEncounter/index.tsx:25 +#: src/containers/EncounterList/index.tsx:51 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:20 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:32 #: src/containers/InvoiceList/tableUtils.tsx:114 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:146 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:265 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:152 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/PatientDetails/PatientResources/utils.tsx:210 msgid "Practitioner" msgstr "" -#: src/containers/PractitionerList/index.tsx:85 +#: src/containers/PractitionerList/index.tsx:79 msgid "Practitioner successfully created" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:27 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:37 -#: src/containers/PractitionerList/index.tsx:77 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:30 +#: src/containers/PractitionerList/index.tsx:73 msgid "Practitioners" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:141 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:138 msgid "Prepare for print" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:42 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:46 #: src/containers/Prescriptions/index.tsx:48 msgid "Prescriptions" msgstr "" @@ -1019,16 +1016,16 @@ msgstr "" msgid "Properties" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:53 +#: src/containers/PatientDetails/PatientWearables/index.tsx:52 msgid "Provider" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:76 +#: src/containers/InvoiceDetails/index.tsx:81 msgid "Quantity" msgstr "" #: src/containers/DocumentsList/index.tsx:46 -#: src/containers/PatientQuestionnaire/index.tsx:73 +#: src/containers/PatientQuestionnaire/index.tsx:70 msgid "Questionnaire" msgstr "" @@ -1036,13 +1033,13 @@ msgstr "" msgid "Questionnaire properties" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:28 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:33 -#: src/containers/QuestionnaireList/index.tsx:80 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:31 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:36 +#: src/containers/QuestionnaireList/index.tsx:76 msgid "Questionnaires" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:83 +#: src/containers/InvoiceDetails/index.tsx:88 msgid "Rate" msgstr "" @@ -1058,8 +1055,8 @@ msgstr "" msgid "Request Appointment" msgstr "" -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:60 -#: src/containers/Prescriptions/index.tsx:88 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:58 +#: src/containers/Prescriptions/index.tsx:89 msgid "Requester" msgstr "" @@ -1067,11 +1064,10 @@ msgstr "" msgid "Required" msgstr "" -#: src/components/SearchBar/index.tsx:24 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:56 -#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:35 -#: src/containers/OrganizationScheduling/index.tsx:87 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:71 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:54 +#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:32 +#: src/containers/OrganizationScheduling/index.tsx:88 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:68 msgid "Reset" msgstr "" @@ -1079,7 +1075,7 @@ msgstr "" #~ msgid "Reset password" #~ msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:84 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:24 msgid "Resources" msgstr "" @@ -1100,8 +1096,8 @@ msgstr "" msgid "Save" msgstr "" -#: src/containers/QuestionnaireBuilder/index.tsx:57 -#: src/containers/QuestionnaireBuilder/index.tsx:58 +#: src/containers/QuestionnaireBuilder/index.tsx:49 +#: src/containers/QuestionnaireBuilder/index.tsx:50 msgid "Save questionnaire" msgstr "" @@ -1109,10 +1105,9 @@ msgstr "" msgid "Schedule calendar" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:39 -#: src/containers/OrganizationScheduling/index.tsx:71 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:39 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:71 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:43 +#: src/containers/OrganizationScheduling/index.tsx:69 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:25 msgid "Scheduling" msgstr "" @@ -1120,7 +1115,7 @@ msgstr "" msgid "Scribe results" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:51 +#: src/containers/QuestionnaireList/index.tsx:50 msgid "SDC IDE" msgstr "" @@ -1162,7 +1157,7 @@ msgstr "" msgid "Serum creatinin" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:269 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:279 msgid "Service" msgstr "" @@ -1170,7 +1165,7 @@ msgstr "" msgid "Service Requests" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:24 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:27 msgid "Services" msgstr "" @@ -1190,7 +1185,7 @@ msgstr "" msgid "Slider" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:83 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:23 msgid "Smart Apps" msgstr "" @@ -1199,16 +1194,16 @@ msgid "Solid radio button" msgstr "" #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:40 -#: src/containers/PractitionerList/index.tsx:119 +#: src/containers/PractitionerList/index.tsx:114 msgid "Specialty" msgstr "" -#: src/containers/PatientList/index.tsx:102 +#: src/containers/PatientList/index.tsx:94 #: src/containers/PatientResourceListExample/index.tsx:52 msgid "SSN" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:35 +#: src/containers/PatientDetails/PatientWearables/index.tsx:34 msgid "Start" msgstr "" @@ -1216,7 +1211,7 @@ msgstr "" msgid "Start date" msgstr "" -#: src/containers/EncounterDetails/index.tsx:104 +#: src/containers/EncounterDetails/index.tsx:101 msgid "Start scribe" msgstr "" @@ -1229,19 +1224,19 @@ msgstr "" msgid "Start value" msgstr "" -#: src/containers/EncounterDetails/index.tsx:84 +#: src/containers/EncounterDetails/index.tsx:81 msgid "Start video call" msgstr "" -#: src/components/PatientEncounter/index.tsx:32 +#: src/components/PatientEncounter/index.tsx:31 #: src/containers/DocumentsList/index.tsx:63 -#: src/containers/EncounterList/index.tsx:58 -#: src/containers/HealthcareServiceList/index.tsx:78 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:29 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:51 +#: src/containers/EncounterList/index.tsx:57 +#: src/containers/HealthcareServiceList/index.tsx:72 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:26 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:50 #: src/containers/InvoiceList/tableUtils.tsx:136 #: src/containers/PatientDetails/PatientResources/utils.tsx:328 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:66 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:64 #: src/containers/Prescriptions/index.tsx:132 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:77 msgid "Status" @@ -1260,7 +1255,7 @@ msgid "Stop value" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:117 -#: src/containers/Prescriptions/index.tsx:196 +#: src/containers/Prescriptions/index.tsx:192 msgid "Stopped" msgstr "" @@ -1276,9 +1271,9 @@ msgstr "" msgid "Submit" msgstr "" -#: src/components/ResourceList/actions.tsx:69 -#: src/components/ResourceList/actions.tsx:96 -#: src/components/ResourceList/actions.tsx:137 +#: src/uberComponents/ResourceListPage/actions.tsx:69 +#: src/uberComponents/ResourceListPage/actions.tsx:96 +#: src/uberComponents/ResourceListPage/actions.tsx:137 msgid "Successfully saved" msgstr "" @@ -1294,7 +1289,7 @@ msgstr "" msgid "System" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:90 +#: src/containers/InvoiceDetails/index.tsx:95 msgid "Tax" msgstr "" @@ -1311,19 +1306,19 @@ msgstr "" msgid "Text with macro" msgstr "" -#: src/containers/App/index.tsx:129 +#: src/containers/App/index.tsx:128 msgid "Thank you for filling out the questionnaire. Now you can close this page." msgstr "" -#: src/containers/App/index.tsx:128 +#: src/containers/App/index.tsx:127 msgid "Thank you!" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:99 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:98 msgid "The document does not exist" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:71 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:70 msgid "The document successfully amended" msgstr "" @@ -1348,7 +1343,7 @@ msgstr "" msgid "Thursday" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:277 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:287 #: src/containers/Scheduling/Availability/index.tsx:129 msgid "Time" msgstr "" @@ -1361,7 +1356,7 @@ msgstr "" msgid "Title" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:111 +#: src/containers/PatientDetails/PatientWearables/index.tsx:108 msgid "To obtain this information, you need to authorize your account in the mobile application and link it with your health data providers." msgstr "" @@ -1369,7 +1364,7 @@ msgstr "" msgid "Today" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:117 +#: src/containers/InvoiceDetails/index.tsx:122 msgid "Total" msgstr "" @@ -1381,7 +1376,7 @@ msgstr "" msgid "Tuesday" msgstr "" -#: src/containers/HealthcareServiceList/index.tsx:61 +#: src/containers/HealthcareServiceList/index.tsx:55 msgid "Type" msgstr "" @@ -1394,7 +1389,7 @@ msgstr "" #: src/containers/InvoiceList/tableUtils.tsx:34 #: src/containers/PatientDetails/PatientDocumentDetails/ExternalDocumentView/index.tsx:53 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:125 -#: src/containers/Prescriptions/index.tsx:198 +#: src/containers/Prescriptions/index.tsx:194 #: src/containers/Scheduling/available-time.ts:22 msgid "Unknown" msgstr "" @@ -1433,13 +1428,13 @@ msgstr "" msgid "ValueSet url" msgstr "" -#: src/components/PatientEncounter/index.tsx:63 -#: src/containers/EncounterList/index.tsx:91 +#: src/components/PatientEncounter/index.tsx:62 +#: src/containers/EncounterList/index.tsx:90 +#: src/containers/VideoCall/index.tsx:28 msgid "Video call" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:81 -#: src/containers/PatientDetails/PatientWearables/index.tsx:64 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:21 msgid "Wearables" msgstr "" @@ -1455,13 +1450,13 @@ msgstr "" msgid "Welcome to" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:150 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:175 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:147 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:172 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:136 #: src/utils/questionnaire.ts:61 msgid "Yes" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:110 +#: src/containers/PatientDetails/PatientWearables/index.tsx:107 msgid "You currently lack access to the patient's data. To obtain it, you must secure the patient's signed consent authorizing the release of their activity data." msgstr "" diff --git a/src/locale/es/messages.po b/src/locale/es/messages.po index d5bd204e..948b14a6 100644 --- a/src/locale/es/messages.po +++ b/src/locale/es/messages.po @@ -13,11 +13,11 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/components/ResourceList/index.tsx:117 +#: src/uberComponents/ResourceListPage/index.tsx:153 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" -#: src/components/ResourceList/actions.tsx:165 +#: src/uberComponents/ResourceListPage/actions.tsx:165 msgid "{0}" msgstr "" @@ -25,17 +25,17 @@ msgstr "" msgid "Action" msgstr "Acción" -#: src/components/PatientEncounter/index.tsx:47 -#: src/components/ResourceList/index.tsx:166 +#: src/components/PatientEncounter/index.tsx:46 #: src/containers/DocumentsList/index.tsx:69 -#: src/containers/EncounterList/index.tsx:71 -#: src/containers/HealthcareServiceList/index.tsx:85 +#: src/containers/EncounterList/index.tsx:70 +#: src/containers/HealthcareServiceList/index.tsx:79 #: src/containers/InvoiceList/tableUtils.tsx:150 #: src/containers/InvoiceList/tableUtils.tsx:157 -#: src/containers/MedicationManagement/index.tsx:67 -#: src/containers/PatientList/index.tsx:111 -#: src/containers/PractitionerList/index.tsx:126 -#: src/containers/Prescriptions/index.tsx:151 +#: src/containers/MedicationManagement/index.tsx:71 +#: src/containers/PatientList/index.tsx:103 +#: src/containers/PractitionerList/index.tsx:121 +#: src/containers/Prescriptions/index.tsx:148 +#: src/uberComponents/ResourceListPage/index.tsx:201 msgid "Actions" msgstr "Acciones" @@ -48,21 +48,21 @@ msgid "Activate healthcare service" msgstr "Activar servicio clínico" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:97 -#: src/containers/Prescriptions/index.tsx:191 +#: src/containers/Prescriptions/index.tsx:187 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:82 msgid "Active" msgstr "Activo" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:223 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:232 #: src/containers/PatientDetails/PatientResources/utils.tsx:24 msgid "Active Medications" msgstr "Medicamentos Activos" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:157 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:163 msgid "Activities" msgstr "Actividades" -#: src/containers/PatientDetails/PatientWearables/index.tsx:22 +#: src/containers/PatientDetails/PatientWearables/index.tsx:21 msgid "Activity" msgstr "Actividad" @@ -91,7 +91,7 @@ msgstr "Añadir Medicamento" msgid "Add Medication Batch" msgstr "Añadir Lote de Medicamento" -#: src/containers/PractitionerList/index.tsx:34 +#: src/containers/PractitionerList/index.tsx:33 msgid "Add new practitioner" msgstr "Añadir nuevo profesional" @@ -117,7 +117,7 @@ msgstr "Añadir Orden" msgid "Add patient" msgstr "Añadir paciente" -#: src/containers/QuestionnaireList/index.tsx:87 +#: src/containers/QuestionnaireList/index.tsx:81 msgid "Add questionnaire" msgstr "Añadir cuestionario" @@ -125,24 +125,24 @@ msgstr "Añadir cuestionario" msgid "Adjust Last Option Right" msgstr "Ajustar última opción a la derecha" -#: src/containers/QuestionnaireList/index.tsx:40 +#: src/containers/QuestionnaireList/index.tsx:39 msgid "AI builder" msgstr "Creador de IA" -#: src/containers/QuestionnaireList/index.tsx:57 +#: src/containers/QuestionnaireList/index.tsx:56 msgid "Aidbox Forms Builder" msgstr "Constructor de Formularios Aidbox" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:34 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:35 #: src/containers/PatientDetails/PatientResources/utils.tsx:98 msgid "Allergies" msgstr "Alergias" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:154 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:151 msgid "Amend" msgstr "Modificar" -#: src/containers/InvoiceDetails/index.tsx:97 +#: src/containers/InvoiceDetails/index.tsx:102 #: src/containers/InvoiceList/tableUtils.tsx:143 #: src/containers/MedicationManagement/utils.tsx:36 msgid "Amount" @@ -152,29 +152,29 @@ msgstr "Cantidad" msgid "Appointment" msgstr "Cita" -#: src/containers/Appointment/PublicAppointment.tsx:48 +#: src/containers/Appointment/PublicAppointment.tsx:44 msgid "Appointment booking" msgstr "Reserva de cita" -#: src/containers/OrganizationScheduling/index.tsx:223 +#: src/containers/OrganizationScheduling/index.tsx:224 #: src/containers/Scheduling/ScheduleCalendar/index.tsx:93 msgid "Appointment successfully added" msgstr "Cita añadida con éxito" -#: src/containers/Appointment/PublicAppointment.tsx:61 +#: src/containers/Appointment/PublicAppointment.tsx:53 msgid "Appointment successfully created" msgstr "Agendamiento creado exitosamente" -#: src/containers/OrganizationScheduling/index.tsx:176 +#: src/containers/OrganizationScheduling/index.tsx:177 #: src/containers/Scheduling/ScheduleCalendar/index.tsx:76 msgid "Appointment successfully rescheduled" msgstr "Cita reprogramada con éxito" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:149 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:146 msgid "Are you sure you want to amend the document?" msgstr "¿Estás seguro de que quieres modificar el documento?" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:174 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:171 msgid "Are you sure you want to delete the document?" msgstr "¿Estás seguro de que quieres eliminar el documento?" @@ -182,8 +182,7 @@ msgstr "¿Estás seguro de que quieres eliminar el documento?" msgid "Are you sure you want to delete this item?" msgstr "¿Estás seguro que deseas eliminar este ítem?" -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:40 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:72 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:26 #: src/containers/Scheduling/Availability/index.tsx:54 msgid "Availability" msgstr "Disponibilidad" @@ -210,7 +209,7 @@ msgid "Batch Number" msgstr "Número de lote" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 -#: src/containers/PatientList/index.tsx:94 +#: src/containers/PatientList/index.tsx:87 #: src/containers/PatientResourceListExample/index.tsx:45 msgid "Birth date" msgstr "Fecha de nacimiento" @@ -223,11 +222,11 @@ msgstr "IMC" msgid "Break" msgstr "Pausa" -#: src/containers/QuestionnaireBuilder/index.tsx:49 +#: src/containers/QuestionnaireBuilder/index.tsx:43 msgid "Build your form" msgstr "Construye tu formulario" -#: src/containers/PatientDetails/PatientWearables/index.tsx:47 +#: src/containers/PatientDetails/PatientWearables/index.tsx:46 msgid "Calories" msgstr "Calorías" @@ -249,7 +248,7 @@ msgstr "Cancelar solicitud de medicamento" #: src/containers/InvoiceList/tableUtils.tsx:28 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:101 -#: src/containers/Prescriptions/index.tsx:193 +#: src/containers/Prescriptions/index.tsx:189 msgid "Cancelled" msgstr "Cancelado" @@ -261,6 +260,10 @@ msgstr "Ejecución en curso" msgid "Characteristics" msgstr "Características" +#: src/components/SearchBar/index.tsx:24 +msgid "Clear filters" +msgstr "" + #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:92 msgid "Clinician successfully updated" msgstr "Profesional actualizado exitosamente" @@ -282,8 +285,8 @@ msgstr "Columna (predeterminado)" msgid "Complete" msgstr "Completado" -#: src/containers/EncounterDetails/index.tsx:165 -#: src/containers/EncounterDetails/index.tsx:169 +#: src/containers/EncounterDetails/index.tsx:162 +#: src/containers/EncounterDetails/index.tsx:166 msgid "Complete encounter" msgstr "Completar cita" @@ -293,7 +296,7 @@ msgid "completed" msgstr "Completado" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:105 -#: src/containers/Prescriptions/index.tsx:194 +#: src/containers/Prescriptions/index.tsx:190 msgid "Completed" msgstr "Completado" @@ -301,7 +304,7 @@ msgstr "Completado" msgid "Concepts:" msgstr "Conceptos:" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:72 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:75 #: src/containers/PatientDetails/PatientResources/utils.tsx:59 msgid "Conditions" msgstr "Condiciones" @@ -314,21 +317,20 @@ msgstr "Confirmar" msgid "Confirm Medication Request" msgstr "Confirmar solicitud de medicamento" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:110 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:115 #: src/containers/PatientDetails/PatientResources/utils.tsx:172 msgid "Consents" msgstr "Consentimientos" -#: src/containers/EncounterDetails/index.tsx:38 -#: src/containers/EncounterDetails/index.tsx:51 +#: src/containers/EncounterDetails/index.tsx:48 msgid "Consultation" msgstr "Consulta" -#: src/containers/PatientDetails/PatientWearables/index.tsx:92 +#: src/containers/PatientDetails/PatientWearables/index.tsx:89 msgid "Contact the patient to obtain their consent for accessing activity data" msgstr "Contactar al paciente para obtener su consentimiento para acceder a los datos de esta prestación" -#: src/containers/MedicationManagement/index.tsx:60 +#: src/containers/MedicationManagement/index.tsx:64 #: src/containers/MedicationManagement/utils.tsx:39 msgid "Cost" msgstr "Costo" @@ -339,7 +341,7 @@ msgstr "Crear" #: src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx:51 #: src/containers/EncounterDetails/hooks.ts:30 -#: src/containers/PatientDetails/PatientDocuments/index.tsx:32 +#: src/containers/PatientDetails/PatientDocuments/index.tsx:28 msgid "Create document" msgstr "Crear documento" @@ -349,7 +351,7 @@ msgstr "Crear documento" msgid "Create Encounter" msgstr "Crear un encuentro" -#: src/containers/PractitionerList/index.tsx:30 +#: src/containers/PractitionerList/index.tsx:29 msgid "Create practitioner" msgstr "Crear un profesional" @@ -370,15 +372,15 @@ msgstr "Fecha de creación" msgid "CRP" msgstr "" -#: src/components/PatientEncounter/index.tsx:40 -#: src/containers/EncounterList/index.tsx:64 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:26 +#: src/components/PatientEncounter/index.tsx:39 +#: src/containers/EncounterList/index.tsx:63 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:23 #: src/containers/InvoiceList/tableUtils.tsx:129 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:53 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:91 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:136 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:208 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:273 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:55 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:95 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:142 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:216 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:283 #: src/containers/PatientDetails/PatientResources/utils.tsx:85 #: src/containers/PatientDetails/PatientResources/utils.tsx:124 #: src/containers/PatientDetails/PatientResources/utils.tsx:163 @@ -420,7 +422,7 @@ msgstr "Desactivar servicio clínico" msgid "Default" msgstr "Predeterminado" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:179 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:176 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:140 msgid "Delete" msgstr "Eliminar" @@ -445,8 +447,7 @@ msgstr "Descripción:" msgid "Display" msgstr "Mostrar" -#: src/containers/PatientDetails/PatientDocuments/index.tsx:22 -#: src/containers/PatientDetails/PatientHeader/index.tsx:80 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:20 msgid "Documents" msgstr "Documentos" @@ -454,7 +455,7 @@ msgstr "Documentos" msgid "Documents have been successfully extracted" msgstr "Los documentos han sido obtenidos exitosamente" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:242 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:252 #: src/containers/PatientDetails/PatientResources/utils.tsx:50 msgid "Dosage" msgstr "Dosis" @@ -465,28 +466,28 @@ msgstr "Forma de dosificación" #: src/containers/InvoiceList/tableUtils.tsx:30 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:121 -#: src/containers/Prescriptions/index.tsx:197 +#: src/containers/Prescriptions/index.tsx:193 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:81 msgid "Draft" msgstr "Borrador" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:47 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:46 msgid "Draft successfully deleted" msgstr "Borrador eliminado exitosamente" -#: src/containers/PatientDetails/PatientWearables/index.tsx:28 +#: src/containers/PatientDetails/PatientWearables/index.tsx:27 msgid "Duration (min)" msgstr "Duración (min)" -#: src/containers/HealthcareServiceList/index.tsx:68 +#: src/containers/HealthcareServiceList/index.tsx:62 msgid "Duration (minutes)" msgstr "Duración (minutos)" #: src/components/ModalEditHealthcareService/index.tsx:21 #: src/containers/EncounterDetails/AIScribe/index.tsx:197 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:187 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:184 #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:23 -#: src/containers/PatientList/index.tsx:135 +#: src/containers/PatientList/index.tsx:127 #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:67 #: src/containers/Scheduling/ScheduleCalendar/components/AppointmentDetailsModal/index.tsx:87 msgid "Edit" @@ -500,7 +501,7 @@ msgstr "Editar agendamiento" msgid "Edit Healthcare Service" msgstr "Editar Servicio Clínico" -#: src/containers/QuestionnaireList/index.tsx:30 +#: src/containers/QuestionnaireList/index.tsx:29 msgid "Edit in" msgstr "Editar en" @@ -509,7 +510,7 @@ msgstr "Editar en" #~ msgstr "Editar en SDC IDE" #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:20 -#: src/containers/PatientList/index.tsx:132 +#: src/containers/PatientList/index.tsx:124 msgid "Edit patient" msgstr "Editar paciente" @@ -525,7 +526,7 @@ msgstr "Correo electrónico" msgid "Encounter" msgstr "Encuentro" -#: src/containers/EncounterDetails/index.tsx:117 +#: src/containers/EncounterDetails/index.tsx:114 msgid "Encounter completed" msgstr "Encuentro completado" @@ -533,19 +534,18 @@ msgstr "Encuentro completado" msgid "Encounter successfully created" msgstr "Encuentro creado exitosamente" -#: src/containers/EncounterDetails/index.tsx:185 +#: src/containers/EncounterDetails/index.tsx:182 msgid "Encounter was successfully completed" msgstr "El encuentro se completó con éxito" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:25 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:31 -#: src/components/PatientEncounter/index.tsx:79 -#: src/containers/EncounterList/index.tsx:103 -#: src/containers/PatientDetails/PatientHeader/index.tsx:79 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:28 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:34 +#: src/containers/EncounterList/index.tsx:101 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:19 msgid "Encounters" msgstr "Encuentros" -#: src/containers/PatientDetails/PatientWearables/index.tsx:41 +#: src/containers/PatientDetails/PatientWearables/index.tsx:40 msgid "End" msgstr "Fin" @@ -555,11 +555,11 @@ msgstr "Fecha de finalización" #: src/containers/InvoiceList/tableUtils.tsx:31 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:113 -#: src/containers/Prescriptions/index.tsx:195 +#: src/containers/Prescriptions/index.tsx:191 msgid "Entered in error" msgstr "Ingresado erróneamente" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:53 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:52 msgid "Error deleting a draft" msgstr "Error al eliminar un borrador" @@ -567,7 +567,7 @@ msgstr "Error al eliminar un borrador" msgid "Error saving a draft:" msgstr "Error al guardar el borrador:" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:77 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:76 msgid "Error while amending the document" msgstr "Error mientras se modifica el documento" @@ -651,7 +651,7 @@ msgstr "Servicio de salud creado con éxito" msgid "Healthcare service successfully updated" msgstr "Servicio de salud actualizado con éxito" -#: src/containers/HealthcareServiceList/index.tsx:32 +#: src/containers/HealthcareServiceList/index.tsx:29 msgid "Healthcare Services" msgstr "Servicios de Salud" @@ -663,7 +663,7 @@ msgstr "Texto de ayuda" msgid "Here will be your questionnaire" msgstr "Aquí estará su cuestionario" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:163 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:160 msgid "History" msgstr "Historial" @@ -675,7 +675,7 @@ msgstr "Historial de cambios" msgid "IL-6" msgstr "IL-6" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:189 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:196 #: src/containers/PatientDetails/PatientResources/utils.tsx:137 msgid "Immunization" msgstr "Inmunización" @@ -692,7 +692,7 @@ msgstr "Elección en línea" msgid "Inline options?" msgstr "¿Opciones en línea?" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:307 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:317 msgid "Intent" msgstr "Intención" @@ -704,10 +704,10 @@ msgstr "La factura fue cancelada con éxito" msgid "Invoice was successfully payed" msgstr "La factura fue pagada con éxito" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:23 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:36 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:26 #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:40 -#: src/containers/InvoiceList/index.tsx:44 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:44 +#: src/containers/InvoiceList/index.tsx:45 msgid "Invoices" msgstr "Facturas" @@ -715,7 +715,7 @@ msgstr "Facturas" msgid "Issued" msgstr "Agendado" -#: src/containers/InvoiceDetails/index.tsx:67 +#: src/containers/InvoiceDetails/index.tsx:72 msgid "Item" msgstr "Ítem" @@ -751,11 +751,11 @@ msgstr "Texto macro" msgid "Max" msgstr "Máximo" -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:17 +#: src/containers/InvoiceDetails/index.tsx:27 msgid "Medical Services Invoice" msgstr "Recibo de servicios médicos" -#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:30 +#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:28 #: src/containers/Prescriptions/index.tsx:113 msgid "Medication" msgstr "Medicación" @@ -776,8 +776,8 @@ msgstr "Solicitud de medicamento cancelada con éxito" msgid "Medication request successfully confirmed" msgstr "Solicitud de medicamento confirmada con éxito" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:41 -#: src/containers/MedicationManagement/index.tsx:28 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:45 +#: src/containers/MedicationManagement/index.tsx:29 msgid "Medications" msgstr "Medicaciones" @@ -793,26 +793,26 @@ msgstr "Mínimo" msgid "Monday" msgstr "Lunes" -#: src/containers/MedicationManagement/index.tsx:54 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:42 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:80 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:118 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:197 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:231 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:302 +#: src/containers/MedicationManagement/index.tsx:58 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:43 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:83 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:123 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:204 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:240 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:312 #: src/containers/PatientDetails/PatientResources/utils.tsx:39 #: src/containers/PatientDetails/PatientResources/utils.tsx:74 #: src/containers/PatientDetails/PatientResources/utils.tsx:113 #: src/containers/PatientDetails/PatientResources/utils.tsx:152 #: src/containers/PatientDetails/PatientResources/utils.tsx:188 -#: src/containers/PatientList/index.tsx:88 +#: src/containers/PatientList/index.tsx:81 #: src/containers/PatientResourceListExample/index.tsx:39 -#: src/containers/PractitionerList/index.tsx:113 +#: src/containers/PractitionerList/index.tsx:108 msgid "Name" msgstr "Nombre" #. js-lingui-explicit-id -#: src/containers/QuestionnaireList/index.tsx:23 +#: src/containers/QuestionnaireList/index.tsx:22 msgid "msg.QuestionnaireName" msgstr "Nombre del cuestionario" @@ -821,23 +821,23 @@ msgstr "Nombre del cuestionario" msgid "New Appointment" msgstr "Nuevo agendamiento" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:151 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:176 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:148 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:173 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:137 #: src/utils/questionnaire.ts:61 msgid "No" msgstr "No" #: src/components/EncountersTable/index.tsx:30 -#: src/components/ResourceList/index.tsx:137 #: src/components/ResourceTable/index.tsx:67 -#: src/containers/HealthcareServiceList/index.tsx:54 -#: src/containers/InvoiceList/index.tsx:70 -#: src/containers/PatientDetails/PatientWearables/index.tsx:88 -#: src/containers/PatientList/index.tsx:80 -#: src/containers/PractitionerList/index.tsx:106 +#: src/containers/HealthcareServiceList/index.tsx:48 +#: src/containers/InvoiceList/index.tsx:73 +#: src/containers/PatientDetails/PatientWearables/index.tsx:85 +#: src/containers/PatientList/index.tsx:73 +#: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 -#: src/containers/QuestionnaireList/index.tsx:107 +#: src/containers/QuestionnaireList/index.tsx:102 +#: src/uberComponents/ResourceListPage/index.tsx:173 msgid "No data" msgstr "Sin datos" @@ -866,7 +866,7 @@ msgid "Observations" msgstr "Resultados" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:109 -#: src/containers/Prescriptions/index.tsx:192 +#: src/containers/Prescriptions/index.tsx:188 msgid "On Hold" msgstr "Guardado" @@ -875,13 +875,13 @@ msgstr "Guardado" msgid "On the next page, please, use one of the following credentials" msgstr "En la siguiente página, por favor, utilice una de las siguientes credenciales" -#: src/components/PatientEncounter/index.tsx:58 +#: src/components/PatientEncounter/index.tsx:57 #: src/containers/DocumentsList/index.tsx:79 -#: src/containers/EncounterList/index.tsx:82 +#: src/containers/EncounterList/index.tsx:81 #: src/containers/InvoiceList/tableUtils.tsx:82 #: src/containers/PatientDetails/PatientOverviewDynamic/components/PatientNoteListCard/ModalNoteOpen/index.tsx:22 -#: src/containers/PatientList/index.tsx:127 -#: src/containers/PractitionerList/index.tsx:141 +#: src/containers/PatientList/index.tsx:119 +#: src/containers/PractitionerList/index.tsx:136 msgid "Open" msgstr "Abrir" @@ -896,7 +896,7 @@ msgstr "Opción {0}" msgid "Option {index}" msgstr "Opción {índice}" -#: src/containers/EncounterDetails/index.tsx:92 +#: src/containers/EncounterDetails/index.tsx:89 msgid "or" msgstr "o" @@ -904,15 +904,13 @@ msgstr "o" msgid "Order added" msgstr "Orden añadida" -#: src/containers/PatientDetails/PatientHeader/index.tsx:82 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:294 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:22 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:304 msgid "Orders" msgstr "Resultados" -#: src/containers/PatientDetails/PatientHeader/index.tsx:41 -#: src/containers/PatientDetails/PatientHeader/index.tsx:78 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:56 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:70 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:18 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:24 msgid "Overview" msgstr "Descripción general" @@ -925,22 +923,23 @@ msgstr "Envase" msgid "Password" msgstr "Contraseña" -#: src/containers/EncounterList/index.tsx:46 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:20 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:39 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:39 +#: src/containers/EncounterList/index.tsx:45 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:17 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:38 #: src/containers/InvoiceList/tableUtils.tsx:122 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:48 -#: src/containers/Prescriptions/index.tsx:76 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:46 +#: src/containers/Prescriptions/index.tsx:78 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:69 msgid "Patient" msgstr "Paciente" -#: src/containers/PatientDetails/PatientWearables/index.tsx:93 +#: src/containers/PatientDetails/PatientWearables/index.tsx:90 msgid "Patient consent is required" msgstr "El consentimiento del paciente es necesario" #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:33 -#: src/containers/PatientList/index.tsx:145 +#: src/containers/PatientList/index.tsx:137 msgid "Patient saved" msgstr "Paciente guardado" @@ -948,10 +947,9 @@ msgstr "Paciente guardado" msgid "Patient successfully created" msgstr "Paciente creado con éxito" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:26 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:32 -#: src/containers/PatientDetails/PatientHeader/index.tsx:26 -#: src/containers/PatientList/index.tsx:59 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:29 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:35 +#: src/containers/PatientList/index.tsx:55 #: src/containers/PatientResourceListExample/index.tsx:34 msgid "Patients" msgstr "Pacientes" @@ -973,32 +971,31 @@ msgstr "Número telefónico" msgid "Phone widget" msgstr "Widget de teléfono" -#: src/components/PatientEncounter/index.tsx:26 -#: src/containers/EncounterList/index.tsx:52 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:23 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:33 +#: src/components/PatientEncounter/index.tsx:25 +#: src/containers/EncounterList/index.tsx:51 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:20 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:32 #: src/containers/InvoiceList/tableUtils.tsx:114 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:146 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:265 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:152 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/PatientDetails/PatientResources/utils.tsx:210 msgid "Practitioner" msgstr "Profesional" -#: src/containers/PractitionerList/index.tsx:85 +#: src/containers/PractitionerList/index.tsx:79 msgid "Practitioner successfully created" msgstr "Profesional creado con éxito" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:27 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:37 -#: src/containers/PractitionerList/index.tsx:77 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:30 +#: src/containers/PractitionerList/index.tsx:73 msgid "Practitioners" msgstr "Profesionales" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:141 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:138 msgid "Prepare for print" msgstr "Preparar para imprimir" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:42 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:46 #: src/containers/Prescriptions/index.tsx:48 msgid "Prescriptions" msgstr "Prescripciones" @@ -1007,16 +1004,16 @@ msgstr "Prescripciones" msgid "Properties" msgstr "Propiedades" -#: src/containers/PatientDetails/PatientWearables/index.tsx:53 +#: src/containers/PatientDetails/PatientWearables/index.tsx:52 msgid "Provider" msgstr "Proveedor" -#: src/containers/InvoiceDetails/index.tsx:76 +#: src/containers/InvoiceDetails/index.tsx:81 msgid "Quantity" msgstr "Cantidad" #: src/containers/DocumentsList/index.tsx:46 -#: src/containers/PatientQuestionnaire/index.tsx:73 +#: src/containers/PatientQuestionnaire/index.tsx:70 msgid "Questionnaire" msgstr "Cuestionario" @@ -1024,13 +1021,13 @@ msgstr "Cuestionario" msgid "Questionnaire properties" msgstr "Propiedades del cuestionario" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:28 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:33 -#: src/containers/QuestionnaireList/index.tsx:80 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:31 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:36 +#: src/containers/QuestionnaireList/index.tsx:76 msgid "Questionnaires" msgstr "Cuestionarios" -#: src/containers/InvoiceDetails/index.tsx:83 +#: src/containers/InvoiceDetails/index.tsx:88 msgid "Rate" msgstr "Tasa" @@ -1046,8 +1043,8 @@ msgstr "Repite" msgid "Request Appointment" msgstr "Solicitar cita" -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:60 -#: src/containers/Prescriptions/index.tsx:88 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:58 +#: src/containers/Prescriptions/index.tsx:89 msgid "Requester" msgstr "Solicitante" @@ -1055,15 +1052,14 @@ msgstr "Solicitante" msgid "Required" msgstr "Requerido" -#: src/components/SearchBar/index.tsx:24 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:56 -#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:35 -#: src/containers/OrganizationScheduling/index.tsx:87 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:71 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:54 +#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:32 +#: src/containers/OrganizationScheduling/index.tsx:88 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:68 msgid "Reset" msgstr "Restablecer" -#: src/containers/PatientDetails/PatientHeader/index.tsx:84 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:24 msgid "Resources" msgstr "Recursos" @@ -1084,8 +1080,8 @@ msgstr "Sábado" msgid "Save" msgstr "Guardar" -#: src/containers/QuestionnaireBuilder/index.tsx:57 -#: src/containers/QuestionnaireBuilder/index.tsx:58 +#: src/containers/QuestionnaireBuilder/index.tsx:49 +#: src/containers/QuestionnaireBuilder/index.tsx:50 msgid "Save questionnaire" msgstr "Guardar cuestionario" @@ -1093,10 +1089,9 @@ msgstr "Guardar cuestionario" msgid "Schedule calendar" msgstr "Calendario de programación" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:39 -#: src/containers/OrganizationScheduling/index.tsx:71 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:39 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:71 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:43 +#: src/containers/OrganizationScheduling/index.tsx:69 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:25 msgid "Scheduling" msgstr "Programación" @@ -1104,7 +1099,7 @@ msgstr "Programación" msgid "Scribe results" msgstr "Resultados de escritura" -#: src/containers/QuestionnaireList/index.tsx:51 +#: src/containers/QuestionnaireList/index.tsx:50 msgid "SDC IDE" msgstr "IDE SDC" @@ -1146,7 +1141,7 @@ msgstr "Seleccionar..." msgid "Serum creatinin" msgstr "Creatinina sérica" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:269 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:279 msgid "Service" msgstr "Servicio" @@ -1154,7 +1149,7 @@ msgstr "Servicio" msgid "Service Requests" msgstr "Solicitud de servicios" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:24 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:27 msgid "Services" msgstr "Servicios" @@ -1174,7 +1169,7 @@ msgstr "Compartir enlace" msgid "Slider" msgstr "Deslizador" -#: src/containers/PatientDetails/PatientHeader/index.tsx:83 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:23 msgid "Smart Apps" msgstr "Aplicaciones Inteligentes" @@ -1183,16 +1178,16 @@ msgid "Solid radio button" msgstr "Botón de opción sólido" #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:40 -#: src/containers/PractitionerList/index.tsx:119 +#: src/containers/PractitionerList/index.tsx:114 msgid "Specialty" msgstr "Especialidad" -#: src/containers/PatientList/index.tsx:102 +#: src/containers/PatientList/index.tsx:94 #: src/containers/PatientResourceListExample/index.tsx:52 msgid "SSN" msgstr "NSS" -#: src/containers/PatientDetails/PatientWearables/index.tsx:35 +#: src/containers/PatientDetails/PatientWearables/index.tsx:34 msgid "Start" msgstr "Comenzar" @@ -1200,7 +1195,7 @@ msgstr "Comenzar" msgid "Start date" msgstr "Fecha de inicio" -#: src/containers/EncounterDetails/index.tsx:104 +#: src/containers/EncounterDetails/index.tsx:101 msgid "Start scribe" msgstr "Iniciar escritura" @@ -1213,19 +1208,19 @@ msgstr "Comenzar el encuentro" msgid "Start value" msgstr "Valor inicial" -#: src/containers/EncounterDetails/index.tsx:84 +#: src/containers/EncounterDetails/index.tsx:81 msgid "Start video call" msgstr "Iniciar videollamada" -#: src/components/PatientEncounter/index.tsx:32 +#: src/components/PatientEncounter/index.tsx:31 #: src/containers/DocumentsList/index.tsx:63 -#: src/containers/EncounterList/index.tsx:58 -#: src/containers/HealthcareServiceList/index.tsx:78 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:29 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:51 +#: src/containers/EncounterList/index.tsx:57 +#: src/containers/HealthcareServiceList/index.tsx:72 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:26 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:50 #: src/containers/InvoiceList/tableUtils.tsx:136 #: src/containers/PatientDetails/PatientResources/utils.tsx:328 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:66 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:64 #: src/containers/Prescriptions/index.tsx:132 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:77 msgid "Status" @@ -1244,7 +1239,7 @@ msgid "Stop value" msgstr "Valor de parada" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:117 -#: src/containers/Prescriptions/index.tsx:196 +#: src/containers/Prescriptions/index.tsx:192 msgid "Stopped" msgstr "Detenido" @@ -1260,9 +1255,9 @@ msgstr "Tipo de sujeto" msgid "Submit" msgstr "Enviar" -#: src/components/ResourceList/actions.tsx:69 -#: src/components/ResourceList/actions.tsx:96 -#: src/components/ResourceList/actions.tsx:137 +#: src/uberComponents/ResourceListPage/actions.tsx:69 +#: src/uberComponents/ResourceListPage/actions.tsx:96 +#: src/uberComponents/ResourceListPage/actions.tsx:137 msgid "Successfully saved" msgstr "" @@ -1278,7 +1273,7 @@ msgstr "Domingo" msgid "System" msgstr "Sistema" -#: src/containers/InvoiceDetails/index.tsx:90 +#: src/containers/InvoiceDetails/index.tsx:95 msgid "Tax" msgstr "Impuesto" @@ -1295,19 +1290,19 @@ msgstr "Texto (por defecto)" msgid "Text with macro" msgstr "Texto con macro" -#: src/containers/App/index.tsx:129 +#: src/containers/App/index.tsx:128 msgid "Thank you for filling out the questionnaire. Now you can close this page." msgstr "Gracias por completar el cuestionario. Ahora puedes cerrar esta página." -#: src/containers/App/index.tsx:128 +#: src/containers/App/index.tsx:127 msgid "Thank you!" msgstr "¡Gracias!" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:99 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:98 msgid "The document does not exist" msgstr "El documento no existe" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:71 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:70 msgid "The document successfully amended" msgstr "El documento fue modificado exitosamente" @@ -1332,7 +1327,7 @@ msgstr "Aún no hay documentos" msgid "Thursday" msgstr "Jueves" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:277 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:287 #: src/containers/Scheduling/Availability/index.tsx:129 msgid "Time" msgstr "Hora" @@ -1345,7 +1340,7 @@ msgstr "Hora" msgid "Title" msgstr "Título" -#: src/containers/PatientDetails/PatientWearables/index.tsx:111 +#: src/containers/PatientDetails/PatientWearables/index.tsx:108 msgid "To obtain this information, you need to authorize your account in the mobile application and link it with your health data providers." msgstr "Para obtener esta información, necesitas autorizar tu cuenta en la aplicación móvil y enlazarla con tus proveedores de datos clínicos" @@ -1353,7 +1348,7 @@ msgstr "Para obtener esta información, necesitas autorizar tu cuenta en la apli msgid "Today" msgstr "Hoy" -#: src/containers/InvoiceDetails/index.tsx:117 +#: src/containers/InvoiceDetails/index.tsx:122 msgid "Total" msgstr "Total" @@ -1365,7 +1360,7 @@ msgstr "Verdadero" msgid "Tuesday" msgstr "Martes" -#: src/containers/HealthcareServiceList/index.tsx:61 +#: src/containers/HealthcareServiceList/index.tsx:55 msgid "Type" msgstr "Tipo" @@ -1378,7 +1373,7 @@ msgstr "Unidades" #: src/containers/InvoiceList/tableUtils.tsx:34 #: src/containers/PatientDetails/PatientDocumentDetails/ExternalDocumentView/index.tsx:53 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:125 -#: src/containers/Prescriptions/index.tsx:198 +#: src/containers/Prescriptions/index.tsx:194 #: src/containers/Scheduling/available-time.ts:22 msgid "Unknown" msgstr "Desconocido" @@ -1417,13 +1412,13 @@ msgstr "Detalles de ValueSet" msgid "ValueSet url" msgstr "URL de ValueSet" -#: src/components/PatientEncounter/index.tsx:63 -#: src/containers/EncounterList/index.tsx:91 +#: src/components/PatientEncounter/index.tsx:62 +#: src/containers/EncounterList/index.tsx:90 +#: src/containers/VideoCall/index.tsx:28 msgid "Video call" msgstr "Videollamada" -#: src/containers/PatientDetails/PatientHeader/index.tsx:81 -#: src/containers/PatientDetails/PatientWearables/index.tsx:64 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:21 msgid "Wearables" msgstr "Dispositivos" @@ -1439,13 +1434,13 @@ msgstr "Semana" msgid "Welcome to" msgstr "Bienvenido a" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:150 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:175 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:147 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:172 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:136 #: src/utils/questionnaire.ts:61 msgid "Yes" msgstr "Sí" -#: src/containers/PatientDetails/PatientWearables/index.tsx:110 +#: src/containers/PatientDetails/PatientWearables/index.tsx:107 msgid "You currently lack access to the patient's data. To obtain it, you must secure the patient's signed consent authorizing the release of their activity data." msgstr "Actualmente no tienes acceso a los datos del paciente. Para obtenerlos, debes conseguir el consentimiento firmado del paciente que autorice la liberación de sus datos de actividad." diff --git a/src/locale/ru/messages.po b/src/locale/ru/messages.po index eb33eefa..6873a96f 100644 --- a/src/locale/ru/messages.po +++ b/src/locale/ru/messages.po @@ -13,11 +13,11 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/components/ResourceList/index.tsx:117 +#: src/uberComponents/ResourceListPage/index.tsx:153 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" -#: src/components/ResourceList/actions.tsx:165 +#: src/uberComponents/ResourceListPage/actions.tsx:165 msgid "{0}" msgstr "" @@ -25,17 +25,17 @@ msgstr "" msgid "Action" msgstr "" -#: src/components/PatientEncounter/index.tsx:47 -#: src/components/ResourceList/index.tsx:166 +#: src/components/PatientEncounter/index.tsx:46 #: src/containers/DocumentsList/index.tsx:69 -#: src/containers/EncounterList/index.tsx:71 -#: src/containers/HealthcareServiceList/index.tsx:85 +#: src/containers/EncounterList/index.tsx:70 +#: src/containers/HealthcareServiceList/index.tsx:79 #: src/containers/InvoiceList/tableUtils.tsx:150 #: src/containers/InvoiceList/tableUtils.tsx:157 -#: src/containers/MedicationManagement/index.tsx:67 -#: src/containers/PatientList/index.tsx:111 -#: src/containers/PractitionerList/index.tsx:126 -#: src/containers/Prescriptions/index.tsx:151 +#: src/containers/MedicationManagement/index.tsx:71 +#: src/containers/PatientList/index.tsx:103 +#: src/containers/PractitionerList/index.tsx:121 +#: src/containers/Prescriptions/index.tsx:148 +#: src/uberComponents/ResourceListPage/index.tsx:201 msgid "Actions" msgstr "Действия" @@ -48,21 +48,21 @@ msgid "Activate healthcare service" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:97 -#: src/containers/Prescriptions/index.tsx:191 +#: src/containers/Prescriptions/index.tsx:187 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:82 msgid "Active" msgstr "Активный" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:223 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:232 #: src/containers/PatientDetails/PatientResources/utils.tsx:24 msgid "Active Medications" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:157 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:163 msgid "Activities" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:22 +#: src/containers/PatientDetails/PatientWearables/index.tsx:21 msgid "Activity" msgstr "" @@ -91,7 +91,7 @@ msgstr "" msgid "Add Medication Batch" msgstr "" -#: src/containers/PractitionerList/index.tsx:34 +#: src/containers/PractitionerList/index.tsx:33 msgid "Add new practitioner" msgstr "" @@ -117,7 +117,7 @@ msgstr "" msgid "Add patient" msgstr "Добавить пациенда" -#: src/containers/QuestionnaireList/index.tsx:87 +#: src/containers/QuestionnaireList/index.tsx:81 msgid "Add questionnaire" msgstr "Добавить опросник" @@ -125,24 +125,24 @@ msgstr "Добавить опросник" msgid "Adjust Last Option Right" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:40 +#: src/containers/QuestionnaireList/index.tsx:39 msgid "AI builder" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:57 +#: src/containers/QuestionnaireList/index.tsx:56 msgid "Aidbox Forms Builder" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:34 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:35 #: src/containers/PatientDetails/PatientResources/utils.tsx:98 msgid "Allergies" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:154 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:151 msgid "Amend" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:97 +#: src/containers/InvoiceDetails/index.tsx:102 #: src/containers/InvoiceList/tableUtils.tsx:143 #: src/containers/MedicationManagement/utils.tsx:36 msgid "Amount" @@ -152,29 +152,29 @@ msgstr "" msgid "Appointment" msgstr "" -#: src/containers/Appointment/PublicAppointment.tsx:48 +#: src/containers/Appointment/PublicAppointment.tsx:44 msgid "Appointment booking" msgstr "" -#: src/containers/OrganizationScheduling/index.tsx:223 +#: src/containers/OrganizationScheduling/index.tsx:224 #: src/containers/Scheduling/ScheduleCalendar/index.tsx:93 msgid "Appointment successfully added" msgstr "" -#: src/containers/Appointment/PublicAppointment.tsx:61 +#: src/containers/Appointment/PublicAppointment.tsx:53 msgid "Appointment successfully created" msgstr "" -#: src/containers/OrganizationScheduling/index.tsx:176 +#: src/containers/OrganizationScheduling/index.tsx:177 #: src/containers/Scheduling/ScheduleCalendar/index.tsx:76 msgid "Appointment successfully rescheduled" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:149 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:146 msgid "Are you sure you want to amend the document?" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:174 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:171 msgid "Are you sure you want to delete the document?" msgstr "" @@ -182,8 +182,7 @@ msgstr "" msgid "Are you sure you want to delete this item?" msgstr "" -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:40 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:72 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:26 #: src/containers/Scheduling/Availability/index.tsx:54 msgid "Availability" msgstr "" @@ -210,7 +209,7 @@ msgid "Batch Number" msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 -#: src/containers/PatientList/index.tsx:94 +#: src/containers/PatientList/index.tsx:87 #: src/containers/PatientResourceListExample/index.tsx:45 msgid "Birth date" msgstr "Дата рождения" @@ -223,11 +222,11 @@ msgstr "" msgid "Break" msgstr "" -#: src/containers/QuestionnaireBuilder/index.tsx:49 +#: src/containers/QuestionnaireBuilder/index.tsx:43 msgid "Build your form" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:47 +#: src/containers/PatientDetails/PatientWearables/index.tsx:46 msgid "Calories" msgstr "" @@ -249,7 +248,7 @@ msgstr "" #: src/containers/InvoiceList/tableUtils.tsx:28 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:101 -#: src/containers/Prescriptions/index.tsx:193 +#: src/containers/Prescriptions/index.tsx:189 msgid "Cancelled" msgstr "" @@ -261,6 +260,10 @@ msgstr "" msgid "Characteristics" msgstr "" +#: src/components/SearchBar/index.tsx:24 +msgid "Clear filters" +msgstr "" + #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:92 msgid "Clinician successfully updated" msgstr "" @@ -282,8 +285,8 @@ msgstr "" msgid "Complete" msgstr "" -#: src/containers/EncounterDetails/index.tsx:165 -#: src/containers/EncounterDetails/index.tsx:169 +#: src/containers/EncounterDetails/index.tsx:162 +#: src/containers/EncounterDetails/index.tsx:166 msgid "Complete encounter" msgstr "" @@ -293,7 +296,7 @@ msgid "completed" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:105 -#: src/containers/Prescriptions/index.tsx:194 +#: src/containers/Prescriptions/index.tsx:190 msgid "Completed" msgstr "" @@ -301,7 +304,7 @@ msgstr "" msgid "Concepts:" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:72 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:75 #: src/containers/PatientDetails/PatientResources/utils.tsx:59 msgid "Conditions" msgstr "" @@ -314,21 +317,20 @@ msgstr "" msgid "Confirm Medication Request" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:110 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:115 #: src/containers/PatientDetails/PatientResources/utils.tsx:172 msgid "Consents" msgstr "" -#: src/containers/EncounterDetails/index.tsx:38 -#: src/containers/EncounterDetails/index.tsx:51 +#: src/containers/EncounterDetails/index.tsx:48 msgid "Consultation" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:92 +#: src/containers/PatientDetails/PatientWearables/index.tsx:89 msgid "Contact the patient to obtain their consent for accessing activity data" msgstr "" -#: src/containers/MedicationManagement/index.tsx:60 +#: src/containers/MedicationManagement/index.tsx:64 #: src/containers/MedicationManagement/utils.tsx:39 msgid "Cost" msgstr "" @@ -339,7 +341,7 @@ msgstr "" #: src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx:51 #: src/containers/EncounterDetails/hooks.ts:30 -#: src/containers/PatientDetails/PatientDocuments/index.tsx:32 +#: src/containers/PatientDetails/PatientDocuments/index.tsx:28 msgid "Create document" msgstr "" @@ -349,7 +351,7 @@ msgstr "" msgid "Create Encounter" msgstr "" -#: src/containers/PractitionerList/index.tsx:30 +#: src/containers/PractitionerList/index.tsx:29 msgid "Create practitioner" msgstr "" @@ -370,15 +372,15 @@ msgstr "" msgid "CRP" msgstr "" -#: src/components/PatientEncounter/index.tsx:40 -#: src/containers/EncounterList/index.tsx:64 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:26 +#: src/components/PatientEncounter/index.tsx:39 +#: src/containers/EncounterList/index.tsx:63 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:23 #: src/containers/InvoiceList/tableUtils.tsx:129 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:53 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:91 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:136 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:208 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:273 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:55 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:95 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:142 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:216 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:283 #: src/containers/PatientDetails/PatientResources/utils.tsx:85 #: src/containers/PatientDetails/PatientResources/utils.tsx:124 #: src/containers/PatientDetails/PatientResources/utils.tsx:163 @@ -420,7 +422,7 @@ msgstr "" msgid "Default" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:179 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:176 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:140 msgid "Delete" msgstr "" @@ -449,8 +451,7 @@ msgstr "" msgid "Display" msgstr "" -#: src/containers/PatientDetails/PatientDocuments/index.tsx:22 -#: src/containers/PatientDetails/PatientHeader/index.tsx:80 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:20 msgid "Documents" msgstr "Документы" @@ -458,7 +459,7 @@ msgstr "Документы" msgid "Documents have been successfully extracted" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:242 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:252 #: src/containers/PatientDetails/PatientResources/utils.tsx:50 msgid "Dosage" msgstr "" @@ -469,28 +470,28 @@ msgstr "" #: src/containers/InvoiceList/tableUtils.tsx:30 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:121 -#: src/containers/Prescriptions/index.tsx:197 +#: src/containers/Prescriptions/index.tsx:193 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:81 msgid "Draft" msgstr "Черновик" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:47 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:46 msgid "Draft successfully deleted" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:28 +#: src/containers/PatientDetails/PatientWearables/index.tsx:27 msgid "Duration (min)" msgstr "" -#: src/containers/HealthcareServiceList/index.tsx:68 +#: src/containers/HealthcareServiceList/index.tsx:62 msgid "Duration (minutes)" msgstr "" #: src/components/ModalEditHealthcareService/index.tsx:21 #: src/containers/EncounterDetails/AIScribe/index.tsx:197 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:187 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:184 #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:23 -#: src/containers/PatientList/index.tsx:135 +#: src/containers/PatientList/index.tsx:127 #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:67 #: src/containers/Scheduling/ScheduleCalendar/components/AppointmentDetailsModal/index.tsx:87 msgid "Edit" @@ -504,7 +505,7 @@ msgstr "" msgid "Edit Healthcare Service" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:30 +#: src/containers/QuestionnaireList/index.tsx:29 msgid "Edit in" msgstr "" @@ -513,7 +514,7 @@ msgstr "" #~ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:20 -#: src/containers/PatientList/index.tsx:132 +#: src/containers/PatientList/index.tsx:124 msgid "Edit patient" msgstr "Редактировать пациента" @@ -529,7 +530,7 @@ msgstr "" msgid "Encounter" msgstr "" -#: src/containers/EncounterDetails/index.tsx:117 +#: src/containers/EncounterDetails/index.tsx:114 msgid "Encounter completed" msgstr "" @@ -537,19 +538,18 @@ msgstr "" msgid "Encounter successfully created" msgstr "" -#: src/containers/EncounterDetails/index.tsx:185 +#: src/containers/EncounterDetails/index.tsx:182 msgid "Encounter was successfully completed" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:25 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:31 -#: src/components/PatientEncounter/index.tsx:79 -#: src/containers/EncounterList/index.tsx:103 -#: src/containers/PatientDetails/PatientHeader/index.tsx:79 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:28 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:34 +#: src/containers/EncounterList/index.tsx:101 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:19 msgid "Encounters" msgstr "Приемы" -#: src/containers/PatientDetails/PatientWearables/index.tsx:41 +#: src/containers/PatientDetails/PatientWearables/index.tsx:40 msgid "End" msgstr "" @@ -559,11 +559,11 @@ msgstr "Конец периода" #: src/containers/InvoiceList/tableUtils.tsx:31 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:113 -#: src/containers/Prescriptions/index.tsx:195 +#: src/containers/Prescriptions/index.tsx:191 msgid "Entered in error" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:53 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:52 msgid "Error deleting a draft" msgstr "" @@ -571,7 +571,7 @@ msgstr "" msgid "Error saving a draft:" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:77 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:76 msgid "Error while amending the document" msgstr "" @@ -655,7 +655,7 @@ msgstr "" msgid "Healthcare service successfully updated" msgstr "" -#: src/containers/HealthcareServiceList/index.tsx:32 +#: src/containers/HealthcareServiceList/index.tsx:29 msgid "Healthcare Services" msgstr "" @@ -667,7 +667,7 @@ msgstr "" msgid "Here will be your questionnaire" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:163 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:160 msgid "History" msgstr "" @@ -679,7 +679,7 @@ msgstr "" msgid "IL-6" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:189 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:196 #: src/containers/PatientDetails/PatientResources/utils.tsx:137 msgid "Immunization" msgstr "" @@ -696,7 +696,7 @@ msgstr "" msgid "Inline options?" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:307 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:317 msgid "Intent" msgstr "" @@ -708,10 +708,10 @@ msgstr "" msgid "Invoice was successfully payed" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:23 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:36 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:26 #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:40 -#: src/containers/InvoiceList/index.tsx:44 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:44 +#: src/containers/InvoiceList/index.tsx:45 msgid "Invoices" msgstr "" @@ -719,7 +719,7 @@ msgstr "" msgid "Issued" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:67 +#: src/containers/InvoiceDetails/index.tsx:72 msgid "Item" msgstr "" @@ -759,11 +759,11 @@ msgstr "" msgid "Max" msgstr "" -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:17 +#: src/containers/InvoiceDetails/index.tsx:27 msgid "Medical Services Invoice" msgstr "" -#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:30 +#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:28 #: src/containers/Prescriptions/index.tsx:113 msgid "Medication" msgstr "" @@ -784,8 +784,8 @@ msgstr "" msgid "Medication request successfully confirmed" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:41 -#: src/containers/MedicationManagement/index.tsx:28 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:45 +#: src/containers/MedicationManagement/index.tsx:29 msgid "Medications" msgstr "" @@ -801,26 +801,26 @@ msgstr "" msgid "Monday" msgstr "" -#: src/containers/MedicationManagement/index.tsx:54 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:42 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:80 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:118 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:197 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:231 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:302 +#: src/containers/MedicationManagement/index.tsx:58 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:43 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:83 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:123 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:204 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:240 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:312 #: src/containers/PatientDetails/PatientResources/utils.tsx:39 #: src/containers/PatientDetails/PatientResources/utils.tsx:74 #: src/containers/PatientDetails/PatientResources/utils.tsx:113 #: src/containers/PatientDetails/PatientResources/utils.tsx:152 #: src/containers/PatientDetails/PatientResources/utils.tsx:188 -#: src/containers/PatientList/index.tsx:88 +#: src/containers/PatientList/index.tsx:81 #: src/containers/PatientResourceListExample/index.tsx:39 -#: src/containers/PractitionerList/index.tsx:113 +#: src/containers/PractitionerList/index.tsx:108 msgid "Name" msgstr "Имя" #. js-lingui-explicit-id -#: src/containers/QuestionnaireList/index.tsx:23 +#: src/containers/QuestionnaireList/index.tsx:22 msgid "msg.QuestionnaireName" msgstr "Название" @@ -829,23 +829,23 @@ msgstr "Название" msgid "New Appointment" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:151 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:176 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:148 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:173 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:137 #: src/utils/questionnaire.ts:61 msgid "No" msgstr "" #: src/components/EncountersTable/index.tsx:30 -#: src/components/ResourceList/index.tsx:137 #: src/components/ResourceTable/index.tsx:67 -#: src/containers/HealthcareServiceList/index.tsx:54 -#: src/containers/InvoiceList/index.tsx:70 -#: src/containers/PatientDetails/PatientWearables/index.tsx:88 -#: src/containers/PatientList/index.tsx:80 -#: src/containers/PractitionerList/index.tsx:106 +#: src/containers/HealthcareServiceList/index.tsx:48 +#: src/containers/InvoiceList/index.tsx:73 +#: src/containers/PatientDetails/PatientWearables/index.tsx:85 +#: src/containers/PatientList/index.tsx:73 +#: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 -#: src/containers/QuestionnaireList/index.tsx:107 +#: src/containers/QuestionnaireList/index.tsx:102 +#: src/uberComponents/ResourceListPage/index.tsx:173 msgid "No data" msgstr "Нет данных" @@ -874,7 +874,7 @@ msgid "Observations" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:109 -#: src/containers/Prescriptions/index.tsx:192 +#: src/containers/Prescriptions/index.tsx:188 msgid "On Hold" msgstr "" @@ -887,13 +887,13 @@ msgstr "" #~ msgid "On the next page, please, use the following credentials" #~ msgstr "" -#: src/components/PatientEncounter/index.tsx:58 +#: src/components/PatientEncounter/index.tsx:57 #: src/containers/DocumentsList/index.tsx:79 -#: src/containers/EncounterList/index.tsx:82 +#: src/containers/EncounterList/index.tsx:81 #: src/containers/InvoiceList/tableUtils.tsx:82 #: src/containers/PatientDetails/PatientOverviewDynamic/components/PatientNoteListCard/ModalNoteOpen/index.tsx:22 -#: src/containers/PatientList/index.tsx:127 -#: src/containers/PractitionerList/index.tsx:141 +#: src/containers/PatientList/index.tsx:119 +#: src/containers/PractitionerList/index.tsx:136 msgid "Open" msgstr "Открыть" @@ -908,7 +908,7 @@ msgstr "" msgid "Option {index}" msgstr "" -#: src/containers/EncounterDetails/index.tsx:92 +#: src/containers/EncounterDetails/index.tsx:89 msgid "or" msgstr "" @@ -916,15 +916,13 @@ msgstr "" msgid "Order added" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:82 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:294 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:22 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:304 msgid "Orders" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:41 -#: src/containers/PatientDetails/PatientHeader/index.tsx:78 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:56 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:70 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:18 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:24 msgid "Overview" msgstr "" @@ -937,22 +935,23 @@ msgstr "" msgid "Password" msgstr "" -#: src/containers/EncounterList/index.tsx:46 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:20 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:39 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:39 +#: src/containers/EncounterList/index.tsx:45 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:17 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:38 #: src/containers/InvoiceList/tableUtils.tsx:122 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:48 -#: src/containers/Prescriptions/index.tsx:76 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:46 +#: src/containers/Prescriptions/index.tsx:78 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:69 msgid "Patient" msgstr "Пациент" -#: src/containers/PatientDetails/PatientWearables/index.tsx:93 +#: src/containers/PatientDetails/PatientWearables/index.tsx:90 msgid "Patient consent is required" msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/EditPatient/index.tsx:33 -#: src/containers/PatientList/index.tsx:145 +#: src/containers/PatientList/index.tsx:137 msgid "Patient saved" msgstr "Пациент сохранен" @@ -960,10 +959,9 @@ msgstr "Пациент сохранен" msgid "Patient successfully created" msgstr "Пациент успешно создан" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:26 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:32 -#: src/containers/PatientDetails/PatientHeader/index.tsx:26 -#: src/containers/PatientList/index.tsx:59 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:29 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:35 +#: src/containers/PatientList/index.tsx:55 #: src/containers/PatientResourceListExample/index.tsx:34 msgid "Patients" msgstr "Пациенты" @@ -985,32 +983,31 @@ msgstr "" msgid "Phone widget" msgstr "" -#: src/components/PatientEncounter/index.tsx:26 -#: src/containers/EncounterList/index.tsx:52 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:23 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:33 +#: src/components/PatientEncounter/index.tsx:25 +#: src/containers/EncounterList/index.tsx:51 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:20 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:32 #: src/containers/InvoiceList/tableUtils.tsx:114 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:146 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:265 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:152 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/PatientDetails/PatientResources/utils.tsx:210 msgid "Practitioner" msgstr "Врач" -#: src/containers/PractitionerList/index.tsx:85 +#: src/containers/PractitionerList/index.tsx:79 msgid "Practitioner successfully created" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:27 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:37 -#: src/containers/PractitionerList/index.tsx:77 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:30 +#: src/containers/PractitionerList/index.tsx:73 msgid "Practitioners" msgstr "Врачи" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:141 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:138 msgid "Prepare for print" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:42 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:46 #: src/containers/Prescriptions/index.tsx:48 msgid "Prescriptions" msgstr "" @@ -1019,16 +1016,16 @@ msgstr "" msgid "Properties" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:53 +#: src/containers/PatientDetails/PatientWearables/index.tsx:52 msgid "Provider" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:76 +#: src/containers/InvoiceDetails/index.tsx:81 msgid "Quantity" msgstr "" #: src/containers/DocumentsList/index.tsx:46 -#: src/containers/PatientQuestionnaire/index.tsx:73 +#: src/containers/PatientQuestionnaire/index.tsx:70 msgid "Questionnaire" msgstr "Опросник" @@ -1036,13 +1033,13 @@ msgstr "Опросник" msgid "Questionnaire properties" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:28 -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:33 -#: src/containers/QuestionnaireList/index.tsx:80 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:31 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:36 +#: src/containers/QuestionnaireList/index.tsx:76 msgid "Questionnaires" msgstr "Опросники" -#: src/containers/InvoiceDetails/index.tsx:83 +#: src/containers/InvoiceDetails/index.tsx:88 msgid "Rate" msgstr "" @@ -1058,8 +1055,8 @@ msgstr "" msgid "Request Appointment" msgstr "" -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:60 -#: src/containers/Prescriptions/index.tsx:88 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:58 +#: src/containers/Prescriptions/index.tsx:89 msgid "Requester" msgstr "" @@ -1067,11 +1064,10 @@ msgstr "" msgid "Required" msgstr "" -#: src/components/SearchBar/index.tsx:24 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:56 -#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:35 -#: src/containers/OrganizationScheduling/index.tsx:87 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:71 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:54 +#: src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx:32 +#: src/containers/OrganizationScheduling/index.tsx:88 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:68 msgid "Reset" msgstr "Сбросить" @@ -1079,7 +1075,7 @@ msgstr "Сбросить" #~ msgid "Reset password" #~ msgstr "Сбросить пароль" -#: src/containers/PatientDetails/PatientHeader/index.tsx:84 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:24 msgid "Resources" msgstr "" @@ -1100,8 +1096,8 @@ msgstr "" msgid "Save" msgstr "Сохранить" -#: src/containers/QuestionnaireBuilder/index.tsx:57 -#: src/containers/QuestionnaireBuilder/index.tsx:58 +#: src/containers/QuestionnaireBuilder/index.tsx:49 +#: src/containers/QuestionnaireBuilder/index.tsx:50 msgid "Save questionnaire" msgstr "" @@ -1109,10 +1105,9 @@ msgstr "" msgid "Schedule calendar" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:39 -#: src/containers/OrganizationScheduling/index.tsx:71 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:39 -#: src/containers/PractitionerDetails/PractitionerHeader/index.tsx:71 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:43 +#: src/containers/OrganizationScheduling/index.tsx:69 +#: src/containers/PractitionerDetails/PractitionerDetailsTabs/index.tsx:25 msgid "Scheduling" msgstr "" @@ -1120,7 +1115,7 @@ msgstr "" msgid "Scribe results" msgstr "" -#: src/containers/QuestionnaireList/index.tsx:51 +#: src/containers/QuestionnaireList/index.tsx:50 msgid "SDC IDE" msgstr "" @@ -1162,7 +1157,7 @@ msgstr "" msgid "Serum creatinin" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:269 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:279 msgid "Service" msgstr "" @@ -1170,7 +1165,7 @@ msgstr "" msgid "Service Requests" msgstr "" -#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:24 +#: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:27 msgid "Services" msgstr "" @@ -1190,7 +1185,7 @@ msgstr "" msgid "Slider" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:83 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:23 msgid "Smart Apps" msgstr "" @@ -1199,16 +1194,16 @@ msgid "Solid radio button" msgstr "" #: src/containers/PractitionerDetails/PractitionerOverview/index.tsx:40 -#: src/containers/PractitionerList/index.tsx:119 +#: src/containers/PractitionerList/index.tsx:114 msgid "Specialty" msgstr "" -#: src/containers/PatientList/index.tsx:102 +#: src/containers/PatientList/index.tsx:94 #: src/containers/PatientResourceListExample/index.tsx:52 msgid "SSN" msgstr "СНИЛС" -#: src/containers/PatientDetails/PatientWearables/index.tsx:35 +#: src/containers/PatientDetails/PatientWearables/index.tsx:34 msgid "Start" msgstr "" @@ -1216,7 +1211,7 @@ msgstr "" msgid "Start date" msgstr "Начало периода" -#: src/containers/EncounterDetails/index.tsx:104 +#: src/containers/EncounterDetails/index.tsx:101 msgid "Start scribe" msgstr "" @@ -1229,19 +1224,19 @@ msgstr "" msgid "Start value" msgstr "" -#: src/containers/EncounterDetails/index.tsx:84 +#: src/containers/EncounterDetails/index.tsx:81 msgid "Start video call" msgstr "" -#: src/components/PatientEncounter/index.tsx:32 +#: src/components/PatientEncounter/index.tsx:31 #: src/containers/DocumentsList/index.tsx:63 -#: src/containers/EncounterList/index.tsx:58 -#: src/containers/HealthcareServiceList/index.tsx:78 -#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:29 -#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:51 +#: src/containers/EncounterList/index.tsx:57 +#: src/containers/HealthcareServiceList/index.tsx:72 +#: src/containers/InvoiceDetails/components/InvoiceDetailsHeader/index.tsx:26 +#: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:50 #: src/containers/InvoiceList/tableUtils.tsx:136 #: src/containers/PatientDetails/PatientResources/utils.tsx:328 -#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:66 +#: src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx:64 #: src/containers/Prescriptions/index.tsx:132 #: src/containers/QuestionnaireBuilder/QuestionnaireSaveForm/index.tsx:77 msgid "Status" @@ -1260,7 +1255,7 @@ msgid "Stop value" msgstr "" #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:117 -#: src/containers/Prescriptions/index.tsx:196 +#: src/containers/Prescriptions/index.tsx:192 msgid "Stopped" msgstr "" @@ -1276,9 +1271,9 @@ msgstr "" msgid "Submit" msgstr "" -#: src/components/ResourceList/actions.tsx:69 -#: src/components/ResourceList/actions.tsx:96 -#: src/components/ResourceList/actions.tsx:137 +#: src/uberComponents/ResourceListPage/actions.tsx:69 +#: src/uberComponents/ResourceListPage/actions.tsx:96 +#: src/uberComponents/ResourceListPage/actions.tsx:137 msgid "Successfully saved" msgstr "" @@ -1294,7 +1289,7 @@ msgstr "" msgid "System" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:90 +#: src/containers/InvoiceDetails/index.tsx:95 msgid "Tax" msgstr "" @@ -1311,19 +1306,19 @@ msgstr "" msgid "Text with macro" msgstr "" -#: src/containers/App/index.tsx:129 +#: src/containers/App/index.tsx:128 msgid "Thank you for filling out the questionnaire. Now you can close this page." msgstr "" -#: src/containers/App/index.tsx:128 +#: src/containers/App/index.tsx:127 msgid "Thank you!" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:99 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:98 msgid "The document does not exist" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:71 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:70 msgid "The document successfully amended" msgstr "" @@ -1348,7 +1343,7 @@ msgstr "" msgid "Thursday" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:277 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:287 #: src/containers/Scheduling/Availability/index.tsx:129 msgid "Time" msgstr "" @@ -1361,7 +1356,7 @@ msgstr "" msgid "Title" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:111 +#: src/containers/PatientDetails/PatientWearables/index.tsx:108 msgid "To obtain this information, you need to authorize your account in the mobile application and link it with your health data providers." msgstr "" @@ -1369,7 +1364,7 @@ msgstr "" msgid "Today" msgstr "" -#: src/containers/InvoiceDetails/index.tsx:117 +#: src/containers/InvoiceDetails/index.tsx:122 msgid "Total" msgstr "" @@ -1381,7 +1376,7 @@ msgstr "" msgid "Tuesday" msgstr "" -#: src/containers/HealthcareServiceList/index.tsx:61 +#: src/containers/HealthcareServiceList/index.tsx:55 msgid "Type" msgstr "" @@ -1394,7 +1389,7 @@ msgstr "" #: src/containers/InvoiceList/tableUtils.tsx:34 #: src/containers/PatientDetails/PatientDocumentDetails/ExternalDocumentView/index.tsx:53 #: src/containers/Prescriptions/components/PrescriptionsSearchBar/hooks.ts:125 -#: src/containers/Prescriptions/index.tsx:198 +#: src/containers/Prescriptions/index.tsx:194 #: src/containers/Scheduling/available-time.ts:22 msgid "Unknown" msgstr "" @@ -1433,13 +1428,13 @@ msgstr "" msgid "ValueSet url" msgstr "" -#: src/components/PatientEncounter/index.tsx:63 -#: src/containers/EncounterList/index.tsx:91 +#: src/components/PatientEncounter/index.tsx:62 +#: src/containers/EncounterList/index.tsx:90 +#: src/containers/VideoCall/index.tsx:28 msgid "Video call" msgstr "" -#: src/containers/PatientDetails/PatientHeader/index.tsx:81 -#: src/containers/PatientDetails/PatientWearables/index.tsx:64 +#: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:21 msgid "Wearables" msgstr "" @@ -1455,13 +1450,13 @@ msgstr "" msgid "Welcome to" msgstr "" -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:150 -#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:175 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:147 +#: src/containers/PatientDetails/PatientDocumentDetails/index.tsx:172 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/index.tsx:136 #: src/utils/questionnaire.ts:61 msgid "Yes" msgstr "" -#: src/containers/PatientDetails/PatientWearables/index.tsx:110 +#: src/containers/PatientDetails/PatientWearables/index.tsx:107 msgid "You currently lack access to the patient's data. To obtain it, you must secure the patient's signed consent authorizing the release of their activity data." msgstr "" From d643fcd672d7b52961336dd74945d4df01f38ff6 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Mon, 2 Dec 2024 22:30:56 +0100 Subject: [PATCH 08/22] Add Search bar solid choice control --- .../ChoiceColumn/SelectChoiceColumn/index.tsx | 24 +++++------ .../ChoiceColumn/ValueSetColumn/index.tsx | 24 +++++------ .../SearchBarColumn/DateColumn/index.tsx | 14 +++--- .../SearchBarColumn/ReferenceColumn/index.tsx | 24 +++++------ .../SolidChoiceColumn/hooks.ts | 43 +++++++++++++++++++ .../SolidChoiceColumn/index.tsx | 21 +++++++++ .../SolidChoiceColumn/types.ts | 7 +++ .../SearchBarColumn/StringColumn/index.tsx | 14 +++--- .../SearchBar/SearchBarColumn/index.tsx | 11 +++++ .../SearchBar/SearchBarColumn/types.ts | 6 +++ src/components/SearchBar/hooks.ts | 15 ++++++- src/components/SearchBar/types.ts | 32 +++++++++++++- src/components/SearchBar/utils.ts | 5 +++ src/components/SearchBar/validate.ts | 15 +++++++ 14 files changed, 193 insertions(+), 62 deletions(-) create mode 100644 src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/hooks.ts create mode 100644 src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx create mode 100644 src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/types.ts diff --git a/src/components/SearchBar/SearchBarColumn/ChoiceColumn/SelectChoiceColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/ChoiceColumn/SelectChoiceColumn/index.tsx index 6fb9b945..8171d8c1 100644 --- a/src/components/SearchBar/SearchBarColumn/ChoiceColumn/SelectChoiceColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/ChoiceColumn/SelectChoiceColumn/index.tsx @@ -1,5 +1,3 @@ -import { Col } from 'antd'; - import { Select } from 'src/components/Select'; import { ValueSetOption } from 'src/services'; @@ -13,17 +11,15 @@ export function SelectChoiceColumn(props: SearchBarColumnChoiceTypeProps) { const { onSelect, getOptionLabel, isOptionSelected } = useChoiceColumn(props); return ( -
- - value={columnFilterValue.value} - options={options} - onChange={onSelect} - isOptionSelected={isOptionSelected} - isMulti={repeats} - getOptionLabel={getOptionLabel} - classNamePrefix="react-select" - placeholder={placeholder} - /> - + + value={columnFilterValue.value} + options={options} + onChange={onSelect} + isOptionSelected={isOptionSelected} + isMulti={repeats} + getOptionLabel={getOptionLabel} + classNamePrefix="react-select" + placeholder={placeholder} + /> ); } diff --git a/src/components/SearchBar/SearchBarColumn/ChoiceColumn/ValueSetColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/ChoiceColumn/ValueSetColumn/index.tsx index dfe87d67..61363b7d 100644 --- a/src/components/SearchBar/SearchBarColumn/ChoiceColumn/ValueSetColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/ChoiceColumn/ValueSetColumn/index.tsx @@ -1,5 +1,3 @@ -import { Col } from 'antd'; - import { AsyncSelect } from 'src/components/Select'; import { SearchBarColumnChoiceTypeProps } from '../../types'; @@ -12,17 +10,15 @@ export function ValueSetColumn(props: SearchBarColumnChoiceTypeProps) { const { onSelect, isOptionSelected, getOptionLabel, debouncedLoadOptions } = useChoiceColumn(props); return ( - - - + ); } diff --git a/src/components/SearchBar/SearchBarColumn/DateColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/DateColumn/index.tsx index d41283cd..a91f8c95 100644 --- a/src/components/SearchBar/SearchBarColumn/DateColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/DateColumn/index.tsx @@ -1,5 +1,3 @@ -import { Col } from 'antd'; - import { DatePicker } from 'src/components/DatePicker'; import { useDateColumn } from './hooks'; @@ -13,12 +11,10 @@ export function DateColumn(props: SearchBarColumnDateTypeProps) { const { onColumnChange } = useDateColumn(props); return ( - - - + ); } diff --git a/src/components/SearchBar/SearchBarColumn/ReferenceColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/ReferenceColumn/index.tsx index 84b05fc6..4b8373c7 100644 --- a/src/components/SearchBar/SearchBarColumn/ReferenceColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/ReferenceColumn/index.tsx @@ -1,5 +1,3 @@ -import { Col } from 'antd'; - import { AsyncSelect } from 'src/components/Select'; import { getAnswerCode, getAnswerDisplay } from 'src/utils/questionnaire'; @@ -12,17 +10,15 @@ export function ReferenceColumn(props: SearchBarColumnReferenceTypeProps) { const { debouncedLoadOptions, onOptionChange } = useReferenceColumn(props); return ( - - getAnswerDisplay(option.value)} - getOptionValue={(option) => getAnswerCode(option.value)} - isMulti={false} - placeholder={columnFilterValue.column.placeholder} - /> - + getAnswerDisplay(option.value)} + getOptionValue={(option) => getAnswerCode(option.value)} + isMulti={false} + placeholder={columnFilterValue.column.placeholder} + /> ); } diff --git a/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/hooks.ts b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/hooks.ts new file mode 100644 index 00000000..cf96f44e --- /dev/null +++ b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/hooks.ts @@ -0,0 +1,43 @@ +import _ from 'lodash'; +import { useCallback } from 'react'; + +import { ValueSetOption } from 'src/services'; + +import { ChoiceColumnOption } from './types'; +import { SearchBarColumnSolidChoiceTypeProps } from '../types'; + +export function useSolidChoiceColumn(props: SearchBarColumnSolidChoiceTypeProps) { + const { columnFilterValue, onChange } = props; + const { id, options } = columnFilterValue.column; + + const onSelect = useCallback( + (code: string) => { + if (!code) { + return onChange(null, id); + } + + const option = options.find((o) => o.code === code); + + if (!option) { + return onChange(null, id); + } + + onChange([option], id); + }, + [id, options, onChange], + ); + + const isOptionSelected = (option: ChoiceColumnOption) => { + return !!columnFilterValue.value && columnFilterValue.value?.findIndex((v) => _.isEqual(v, option)) !== -1; + }; + + const getOptionLabel = (option: ValueSetOption) => { + return option?.value?.Coding?.display || ''; + }; + + return { + onSelect, + isOptionSelected, + getOptionLabel, + }; +} diff --git a/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx new file mode 100644 index 00000000..9f8a3cc0 --- /dev/null +++ b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx @@ -0,0 +1,21 @@ +import { Radio } from 'antd'; + +import { useSolidChoiceColumn } from './hooks'; +import { SearchBarColumnSolidChoiceTypeProps } from '../types'; + +export function SolidChoiceColumn(props: SearchBarColumnSolidChoiceTypeProps) { + const { columnFilterValue } = props; + const { options, defaultValue } = columnFilterValue.column; + + const { onSelect } = useSolidChoiceColumn(props); + + return ( + onSelect(e.target.value)}> + {options.map((c) => ( + + {c.display} + + ))} + + ); +} diff --git a/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/types.ts b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/types.ts new file mode 100644 index 00000000..32e4deca --- /dev/null +++ b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/types.ts @@ -0,0 +1,7 @@ +import { PropsValue } from 'react-select'; + +import { ValueSetOption } from 'src/services'; + +import { SolidChoiceTypeColumnFilterValue } from '../../types'; + +export type ChoiceColumnOption = PropsValue; diff --git a/src/components/SearchBar/SearchBarColumn/StringColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/StringColumn/index.tsx index 78fe9821..f1ba76a3 100644 --- a/src/components/SearchBar/SearchBarColumn/StringColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/StringColumn/index.tsx @@ -1,4 +1,4 @@ -import { Col, Input } from 'antd'; +import { Input } from 'antd'; import { useStringColumn } from './hooks'; import { SearchBarColumnStringTypeProps } from '../types'; @@ -9,12 +9,10 @@ export function StringColumn(props: SearchBarColumnStringTypeProps) { const { onColumnChange } = useStringColumn(props); return ( - - - + ); } diff --git a/src/components/SearchBar/SearchBarColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/index.tsx index a0387f64..f05d7ea2 100644 --- a/src/components/SearchBar/SearchBarColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/index.tsx @@ -1,6 +1,7 @@ import { ChoiceColumn } from './ChoiceColumn'; import { DateColumn } from './DateColumn'; import { ReferenceColumn } from './ReferenceColumn'; +import { SolidChoiceColumn } from './SolidChoiceColumn'; import { StringColumn } from './StringColumn'; import { SearchBarColumnProps } from './types'; import { @@ -8,6 +9,7 @@ import { isDateColumnFilterValue, isReferenceColumnFilterValue, isChoiceColumnFilterValue, + isSolidChoiceColumnFilterValue, } from '../types'; export function SearchBarColumn(props: SearchBarColumnProps) { @@ -45,5 +47,14 @@ export function SearchBarColumn(props: SearchBarColumnProps) { return ; } + if (isSolidChoiceColumnFilterValue(columnFilterValue)) { + const choiceProps = { + ...props, + columnFilterValue, + }; + + return ; + } + return null; } diff --git a/src/components/SearchBar/SearchBarColumn/types.ts b/src/components/SearchBar/SearchBarColumn/types.ts index 23791a9f..dcf94301 100644 --- a/src/components/SearchBar/SearchBarColumn/types.ts +++ b/src/components/SearchBar/SearchBarColumn/types.ts @@ -1,5 +1,6 @@ import { ChoiceTypeColumnFilterValue, + SolidChoiceTypeColumnFilterValue, ColumnFilterValue, DateTypeColumnFilterValue, ReferenceTypeColumnFilterValue, @@ -30,3 +31,8 @@ export interface SearchBarColumnChoiceTypeProps { columnFilterValue: ChoiceTypeColumnFilterValue; onChange: (value: ChoiceTypeColumnFilterValue['value'], key: string) => void; } + +export interface SearchBarColumnSolidChoiceTypeProps { + columnFilterValue: SolidChoiceTypeColumnFilterValue; + onChange: (value: SolidChoiceTypeColumnFilterValue['value'], key: string) => void; +} diff --git a/src/components/SearchBar/hooks.ts b/src/components/SearchBar/hooks.ts index f9a51f9f..50a5f596 100644 --- a/src/components/SearchBar/hooks.ts +++ b/src/components/SearchBar/hooks.ts @@ -1,4 +1,3 @@ -import _ from 'lodash'; import { useCallback, useMemo, useState } from 'react'; import { @@ -13,12 +12,15 @@ import { SearchBarProps, isChoiceColumn, isChoiceColumnFilterValue, + isSolidChoiceColumn, + isSolidChoiceColumnFilterValue, } from './types'; import { validateStringColumnFilterValue, validateDateColumnFilterValue, validateReferenceColumnFilterValue, validateChoiceColumnFilterValue, + validateSolidChoiceColumnFilterValue, } from './validate'; export function useSearchBar(props: SearchBarProps): SearchBarData { @@ -42,6 +44,10 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { return { column, value: null }; } + if (isSolidChoiceColumn(column)) { + return { column, value: null }; + } + throw new Error('Unsupported column type'); }); }, [columns]); @@ -86,6 +92,13 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { } } + if (isSolidChoiceColumnFilterValue(newFilterValue)) { + if (validateSolidChoiceColumnFilterValue(value)) { + newFilterValue.value = value; + return newFilterValue; + } + } + throw new Error('Unsupported column type'); }); }); diff --git a/src/components/SearchBar/types.ts b/src/components/SearchBar/types.ts index 51c65868..24671577 100644 --- a/src/components/SearchBar/types.ts +++ b/src/components/SearchBar/types.ts @@ -1,3 +1,5 @@ +import { Coding } from 'fhir/r4b'; + import { Expression, Resource, QuestionnaireItemChoiceColumn, ValueSet } from '@beda.software/aidbox-types'; import { ValueSetOption } from 'src/services'; @@ -8,6 +10,7 @@ export enum SearchBarColumnType { DATE = 'date', REFERENCE = 'reference', CHOICE = 'choice', + SOLIDCHOICE = 'solidChoice', } export interface SearchBarProps { @@ -46,11 +49,22 @@ export type SearchBarChoiceColumn = { } ); +export type SearchBarSolidChoiceColumn = { + id: string; + type: SearchBarColumnType.SOLIDCHOICE; + repeats?: boolean; + placeholder: string; + options: Coding[]; + valueSet?: never; + defaultValue?: Coding; +}; + export type SearchBarColumn = | SearchBarStringColumn | SearchBarDateColumn | SearchBarReferenceColumn - | SearchBarChoiceColumn; + | SearchBarChoiceColumn + | SearchBarSolidChoiceColumn; export function isStringColumn(column: SearchBarColumn): column is SearchBarStringColumn { return column.type === SearchBarColumnType.STRING; } @@ -63,6 +77,9 @@ export function isReferenceColumn(column: SearchBarColumn): column is SearchBarR export function isChoiceColumn(column: SearchBarColumn): column is SearchBarChoiceColumn { return column.type === SearchBarColumnType.CHOICE; } +export function isSolidChoiceColumn(column: SearchBarColumn): column is SearchBarSolidChoiceColumn { + return column.type === SearchBarColumnType.SOLIDCHOICE; +} export type DateColumnFilterValue = [moment.Moment, moment.Moment]; @@ -83,11 +100,17 @@ export interface ChoiceTypeColumnFilterValue { value?: ValueSetOption[] | null; } +export interface SolidChoiceTypeColumnFilterValue { + column: SearchBarSolidChoiceColumn; + value?: Coding[] | null; +} + export type ColumnFilterValue = | StringTypeColumnFilterValue | DateTypeColumnFilterValue | ReferenceTypeColumnFilterValue - | ChoiceTypeColumnFilterValue; + | ChoiceTypeColumnFilterValue + | SolidChoiceTypeColumnFilterValue; export function isStringColumnFilterValue(filterValue: ColumnFilterValue): filterValue is StringTypeColumnFilterValue { return isStringColumn(filterValue.column); } @@ -102,6 +125,11 @@ export function isReferenceColumnFilterValue( export function isChoiceColumnFilterValue(filterValue: ColumnFilterValue): filterValue is ChoiceTypeColumnFilterValue { return isChoiceColumn(filterValue.column); } +export function isSolidChoiceColumnFilterValue( + filterValue: ColumnFilterValue, +): filterValue is SolidChoiceTypeColumnFilterValue { + return isSolidChoiceColumn(filterValue.column); +} export interface SearchBarData { columnsFilterValues: ColumnFilterValue[]; diff --git a/src/components/SearchBar/utils.ts b/src/components/SearchBar/utils.ts index de6940d6..5fb6592e 100644 --- a/src/components/SearchBar/utils.ts +++ b/src/components/SearchBar/utils.ts @@ -5,6 +5,7 @@ import { isChoiceColumnFilterValue, isDateColumnFilterValue, isReferenceColumnFilterValue, + isSolidChoiceColumnFilterValue, isStringColumnFilterValue, SearchBarColumn, } from './types'; @@ -41,5 +42,9 @@ export function getSearchBarColumnFilterValue(filterValue: ColumnFilterValue) { return filterValue.value?.map((option) => option.value.Coding.code!); } + if (isSolidChoiceColumnFilterValue(filterValue)) { + return filterValue.value?.map((option) => option.code!); + } + throw new Error('Unsupported column type'); } diff --git a/src/components/SearchBar/validate.ts b/src/components/SearchBar/validate.ts index 17c96f8f..197ebc7f 100644 --- a/src/components/SearchBar/validate.ts +++ b/src/components/SearchBar/validate.ts @@ -6,6 +6,7 @@ import { ColumnFilterValue, DateTypeColumnFilterValue, ReferenceTypeColumnFilterValue, + SolidChoiceTypeColumnFilterValue, StringTypeColumnFilterValue, } from './types'; @@ -63,3 +64,17 @@ export function validateChoiceColumnFilterValue( throw new Error('Invalid choice column filter value'); } + +export function validateSolidChoiceColumnFilterValue( + value?: ColumnFilterValue['value'], +): value is SolidChoiceTypeColumnFilterValue['value'] { + if ( + _.isUndefined(value) || + _.isNull(value) || + (_.isArray(value) && value.length > 0 && _.isObject(value[0]) && 'code' in value[0] && 'display' in value[0]) + ) { + return true; + } + + throw new Error('Invalid choice column filter value'); +} From 11cf04b9f582740d752d999ba3450a8f858cd51e Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Tue, 3 Dec 2024 12:58:02 +0100 Subject: [PATCH 09/22] Add default value for Solid Choice control on Search bar --- .../SearchBarColumn/SolidChoiceColumn/index.tsx | 12 +++++++----- src/components/SearchBar/hooks.ts | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx index 9f8a3cc0..9a29a6bb 100644 --- a/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx @@ -5,15 +5,17 @@ import { SearchBarColumnSolidChoiceTypeProps } from '../types'; export function SolidChoiceColumn(props: SearchBarColumnSolidChoiceTypeProps) { const { columnFilterValue } = props; - const { options, defaultValue } = columnFilterValue.column; + const { value } = columnFilterValue; + const { options } = columnFilterValue.column; const { onSelect } = useSolidChoiceColumn(props); return ( - onSelect(e.target.value)}> - {options.map((c) => ( - - {c.display} + // NOTE: Radio.Button defaultChecked and checked cannot be applied properly to check Coding value. + onSelect(e.target.value)}> + {options.map((coding) => ( + + {coding.display} ))} diff --git a/src/components/SearchBar/hooks.ts b/src/components/SearchBar/hooks.ts index 50a5f596..acfc20cd 100644 --- a/src/components/SearchBar/hooks.ts +++ b/src/components/SearchBar/hooks.ts @@ -45,7 +45,7 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { } if (isSolidChoiceColumn(column)) { - return { column, value: null }; + return { column, value: column.defaultValue ? [column.defaultValue] : null }; } throw new Error('Unsupported column type'); From 9acecebca671f106a4c48a3f100816d9a7dd81c0 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Tue, 3 Dec 2024 18:45:35 +0100 Subject: [PATCH 10/22] Add default value for Search bar choice control --- src/components/SearchBar/hooks.ts | 2 +- src/components/SearchBar/types.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/SearchBar/hooks.ts b/src/components/SearchBar/hooks.ts index acfc20cd..ab1720e9 100644 --- a/src/components/SearchBar/hooks.ts +++ b/src/components/SearchBar/hooks.ts @@ -41,7 +41,7 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { } if (isChoiceColumn(column)) { - return { column, value: null }; + return { column, value: column.defaultValue ? [column.defaultValue] : null }; } if (isSolidChoiceColumn(column)) { diff --git a/src/components/SearchBar/types.ts b/src/components/SearchBar/types.ts index 24671577..207fdc39 100644 --- a/src/components/SearchBar/types.ts +++ b/src/components/SearchBar/types.ts @@ -38,6 +38,7 @@ export type SearchBarChoiceColumn = { type: SearchBarColumnType.CHOICE; repeats?: boolean; placeholder: string; + defaultValue?: ValueSetOption; } & ( | { options: ValueSetOption[]; From 18814ed93b2d377c80d0e08c07d853dbda953e7a Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Tue, 3 Dec 2024 19:28:16 +0100 Subject: [PATCH 11/22] Add Single Date Search bar control --- .../SearchBarColumn/DateSingleColumn/hooks.ts | 19 +++++++++++++++ .../DateSingleColumn/index.tsx | 20 ++++++++++++++++ .../SearchBarColumn/DateSingleColumn/types.ts | 4 ++++ .../SearchBar/SearchBarColumn/index.tsx | 10 ++++++++ .../SearchBar/SearchBarColumn/types.ts | 6 +++++ src/components/SearchBar/hooks.ts | 14 +++++++++++ src/components/SearchBar/types.ts | 23 +++++++++++++++++++ src/components/SearchBar/utils.ts | 7 +++++- src/components/SearchBar/validate.ts | 13 ++++++++++- 9 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts create mode 100644 src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx create mode 100644 src/components/SearchBar/SearchBarColumn/DateSingleColumn/types.ts diff --git a/src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts new file mode 100644 index 00000000..1a181d74 --- /dev/null +++ b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts @@ -0,0 +1,19 @@ +import moment from 'moment'; +import { useCallback } from 'react'; + +import { SearchBarColumnSingleDateTypeProps } from '../types'; + +export function useDateColumn(props: SearchBarColumnSingleDateTypeProps) { + const { onChange, columnFilterValue } = props; + + const onColumnChange = useCallback( + (value: moment.Moment | null) => { + if (value) { + onChange(value, columnFilterValue.column.id); + } + }, + [onChange, columnFilterValue], + ); + + return { onColumnChange }; +} diff --git a/src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx new file mode 100644 index 00000000..6be64ae0 --- /dev/null +++ b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx @@ -0,0 +1,20 @@ +import { DatePicker } from 'src/components/DatePicker'; + +import { useDateColumn } from './hooks'; +import { SearchBarColumnSingleDateTypeProps } from '../types'; + +export function DateSingleColumn(props: SearchBarColumnSingleDateTypeProps) { + const { columnFilterValue } = props; + const { placeholder } = columnFilterValue.column; + const { onColumnChange } = useDateColumn(props); + + return ( + + ); +} diff --git a/src/components/SearchBar/SearchBarColumn/DateSingleColumn/types.ts b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/types.ts new file mode 100644 index 00000000..c2e504b6 --- /dev/null +++ b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/types.ts @@ -0,0 +1,4 @@ +import { RangePickerProps } from 'antd/lib/date-picker/generatePicker'; +import moment from 'moment'; + +export type RangePickerOnChange = Exclude['onChange'], undefined>; diff --git a/src/components/SearchBar/SearchBarColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/index.tsx index f05d7ea2..fe791b76 100644 --- a/src/components/SearchBar/SearchBarColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/index.tsx @@ -1,5 +1,6 @@ import { ChoiceColumn } from './ChoiceColumn'; import { DateColumn } from './DateColumn'; +import { DateSingleColumn } from './DateSingleColumn'; import { ReferenceColumn } from './ReferenceColumn'; import { SolidChoiceColumn } from './SolidChoiceColumn'; import { StringColumn } from './StringColumn'; @@ -10,6 +11,7 @@ import { isReferenceColumnFilterValue, isChoiceColumnFilterValue, isSolidChoiceColumnFilterValue, + isSingleDateColumnFilterValue, } from '../types'; export function SearchBarColumn(props: SearchBarColumnProps) { @@ -31,6 +33,14 @@ export function SearchBarColumn(props: SearchBarColumnProps) { return ; } + if (isSingleDateColumnFilterValue(columnFilterValue)) { + const dateProps = { + ...props, + columnFilterValue, + }; + return ; + } + if (isReferenceColumnFilterValue(columnFilterValue)) { const referenceProps = { ...props, diff --git a/src/components/SearchBar/SearchBarColumn/types.ts b/src/components/SearchBar/SearchBarColumn/types.ts index dcf94301..db3eeb8c 100644 --- a/src/components/SearchBar/SearchBarColumn/types.ts +++ b/src/components/SearchBar/SearchBarColumn/types.ts @@ -5,6 +5,7 @@ import { DateTypeColumnFilterValue, ReferenceTypeColumnFilterValue, StringTypeColumnFilterValue, + SingleDateTypeColumnFilterValue, } from '../types'; export type SearchBarColumnProps = { @@ -22,6 +23,11 @@ export interface SearchBarColumnDateTypeProps { onChange: (value: DateTypeColumnFilterValue['value'], key: string) => void; } +export interface SearchBarColumnSingleDateTypeProps { + columnFilterValue: SingleDateTypeColumnFilterValue; + onChange: (value: SingleDateTypeColumnFilterValue['value'], key: string) => void; +} + export interface SearchBarColumnReferenceTypeProps { columnFilterValue: ReferenceTypeColumnFilterValue; onChange: (value: ReferenceTypeColumnFilterValue['value'], key: string) => void; diff --git a/src/components/SearchBar/hooks.ts b/src/components/SearchBar/hooks.ts index ab1720e9..6de4300a 100644 --- a/src/components/SearchBar/hooks.ts +++ b/src/components/SearchBar/hooks.ts @@ -14,6 +14,8 @@ import { isChoiceColumnFilterValue, isSolidChoiceColumn, isSolidChoiceColumnFilterValue, + isSingleDateColumn, + isSingleDateColumnFilterValue, } from './types'; import { validateStringColumnFilterValue, @@ -21,6 +23,7 @@ import { validateReferenceColumnFilterValue, validateChoiceColumnFilterValue, validateSolidChoiceColumnFilterValue, + validateSingleDateColumnFilterValue, } from './validate'; export function useSearchBar(props: SearchBarProps): SearchBarData { @@ -36,6 +39,10 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { return { column, value: undefined }; } + if (isSingleDateColumn(column)) { + return { column, value: column.defaultValue ?? undefined }; + } + if (isReferenceColumn(column)) { return { column, value: null }; } @@ -78,6 +85,13 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { } } + if (isSingleDateColumnFilterValue(newFilterValue)) { + if (validateSingleDateColumnFilterValue(value)) { + newFilterValue.value = value; + return newFilterValue; + } + } + if (isReferenceColumnFilterValue(newFilterValue)) { if (validateReferenceColumnFilterValue(value)) { newFilterValue.value = value; diff --git a/src/components/SearchBar/types.ts b/src/components/SearchBar/types.ts index 207fdc39..1fac95af 100644 --- a/src/components/SearchBar/types.ts +++ b/src/components/SearchBar/types.ts @@ -8,6 +8,7 @@ import { LoadResourceOption } from 'src/services/questionnaire'; export enum SearchBarColumnType { STRING = 'string', DATE = 'date', + SINGLEDATE = 'singleDate', REFERENCE = 'reference', CHOICE = 'choice', SOLIDCHOICE = 'solidChoice', @@ -26,6 +27,12 @@ export type SearchBarDateColumn = { type: SearchBarColumnType.DATE; placeholder: [string, string]; }; +export type SearchBarSingleDateColumn = { + id: string; + type: SearchBarColumnType.SINGLEDATE; + placeholder: string; + defaultValue?: moment.Moment; +}; export type SearchBarReferenceColumn = { id: string; type: SearchBarColumnType.REFERENCE; @@ -63,6 +70,7 @@ export type SearchBarSolidChoiceColumn = { export type SearchBarColumn = | SearchBarStringColumn | SearchBarDateColumn + | SearchBarSingleDateColumn | SearchBarReferenceColumn | SearchBarChoiceColumn | SearchBarSolidChoiceColumn; @@ -72,6 +80,9 @@ export function isStringColumn(column: SearchBarColumn): column is SearchBarStri export function isDateColumn(column: SearchBarColumn): column is SearchBarDateColumn { return column.type === SearchBarColumnType.DATE; } +export function isSingleDateColumn(column: SearchBarColumn): column is SearchBarSingleDateColumn { + return column.type === SearchBarColumnType.SINGLEDATE; +} export function isReferenceColumn(column: SearchBarColumn): column is SearchBarReferenceColumn { return column.type === SearchBarColumnType.REFERENCE; } @@ -83,6 +94,7 @@ export function isSolidChoiceColumn(column: SearchBarColumn): column is SearchBa } export type DateColumnFilterValue = [moment.Moment, moment.Moment]; +export type SingleDateColumnFilterValue = moment.Moment; export interface StringTypeColumnFilterValue { column: SearchBarStringColumn; @@ -92,6 +104,11 @@ export interface DateTypeColumnFilterValue { column: SearchBarDateColumn; value?: DateColumnFilterValue; } + +export interface SingleDateTypeColumnFilterValue { + column: SearchBarSingleDateColumn; + value?: SingleDateColumnFilterValue; +} export interface ReferenceTypeColumnFilterValue { column: SearchBarReferenceColumn; value?: LoadResourceOption | null; @@ -109,6 +126,7 @@ export interface SolidChoiceTypeColumnFilterValue { export type ColumnFilterValue = | StringTypeColumnFilterValue | DateTypeColumnFilterValue + | SingleDateTypeColumnFilterValue | ReferenceTypeColumnFilterValue | ChoiceTypeColumnFilterValue | SolidChoiceTypeColumnFilterValue; @@ -118,6 +136,11 @@ export function isStringColumnFilterValue(filterValue: ColumnFilterValue): filte export function isDateColumnFilterValue(filterValue: ColumnFilterValue): filterValue is DateTypeColumnFilterValue { return isDateColumn(filterValue.column); } +export function isSingleDateColumnFilterValue( + filterValue: ColumnFilterValue, +): filterValue is SingleDateTypeColumnFilterValue { + return isSingleDateColumn(filterValue.column); +} export function isReferenceColumnFilterValue( filterValue: ColumnFilterValue, ): filterValue is ReferenceTypeColumnFilterValue { diff --git a/src/components/SearchBar/utils.ts b/src/components/SearchBar/utils.ts index 5fb6592e..a18b947f 100644 --- a/src/components/SearchBar/utils.ts +++ b/src/components/SearchBar/utils.ts @@ -1,10 +1,11 @@ -import { formatFHIRDateTime } from '@beda.software/fhir-react'; +import { formatFHIRDate, formatFHIRDateTime } from '@beda.software/fhir-react'; import { ColumnFilterValue, isChoiceColumnFilterValue, isDateColumnFilterValue, isReferenceColumnFilterValue, + isSingleDateColumnFilterValue, isSolidChoiceColumnFilterValue, isStringColumnFilterValue, SearchBarColumn, @@ -34,6 +35,10 @@ export function getSearchBarColumnFilterValue(filterValue: ColumnFilterValue) { : undefined; } + if (isSingleDateColumnFilterValue(filterValue)) { + return filterValue.value ? formatFHIRDate(filterValue.value) : undefined; + } + if (isReferenceColumnFilterValue(filterValue)) { return filterValue.value?.value.Reference.id; } diff --git a/src/components/SearchBar/validate.ts b/src/components/SearchBar/validate.ts index 197ebc7f..9435c7dc 100644 --- a/src/components/SearchBar/validate.ts +++ b/src/components/SearchBar/validate.ts @@ -6,6 +6,7 @@ import { ColumnFilterValue, DateTypeColumnFilterValue, ReferenceTypeColumnFilterValue, + SingleDateTypeColumnFilterValue, SolidChoiceTypeColumnFilterValue, StringTypeColumnFilterValue, } from './types'; @@ -33,6 +34,16 @@ export function validateDateColumnFilterValue( throw new Error('Invalid date column filter value'); } +export function validateSingleDateColumnFilterValue( + value?: ColumnFilterValue['value'], +): value is SingleDateTypeColumnFilterValue['value'] { + if (_.isUndefined(value) || moment.isMoment(value)) { + return true; + } + + throw new Error('Invalid single date column filter value'); +} + export function validateReferenceColumnFilterValue( value?: ColumnFilterValue['value'], ): value is ReferenceTypeColumnFilterValue['value'] { @@ -76,5 +87,5 @@ export function validateSolidChoiceColumnFilterValue( return true; } - throw new Error('Invalid choice column filter value'); + throw new Error('Invalid solid choice column filter value'); } From d52a4a05a790fee4c11a13dc19c27f4a2903fc33 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Tue, 3 Dec 2024 19:55:08 +0100 Subject: [PATCH 12/22] Fix questionnaire validation --- src/utils/questionnaire.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/questionnaire.ts b/src/utils/questionnaire.ts index bbe36ad3..03330608 100644 --- a/src/utils/questionnaire.ts +++ b/src/utils/questionnaire.ts @@ -131,7 +131,7 @@ export function questionnaireItemsToValidationSchema(questionnaireItems: Questio } else { validationSchema[item.linkId] = schema; - if (item.item) { + if (item.item && !item.repeats) { validationSchema[item.linkId] = yup .object({ items: questionnaireItemsToValidationSchema(item.item) }) .required(); From edf03f6f5b60c6550fa68fe556d8a6ef8b4a4495 Mon Sep 17 00:00:00 2001 From: Vadim Laletin Date: Wed, 4 Dec 2024 19:58:34 +0100 Subject: [PATCH 13/22] Extract locales --- src/locale/en/messages.po | 41 ++++++++++++++++++++++++--------------- src/locale/es/messages.po | 41 ++++++++++++++++++++++++--------------- src/locale/ru/messages.po | 41 ++++++++++++++++++++++++--------------- 3 files changed, 75 insertions(+), 48 deletions(-) diff --git a/src/locale/en/messages.po b/src/locale/en/messages.po index cb395f63..2827dd5c 100644 --- a/src/locale/en/messages.po +++ b/src/locale/en/messages.po @@ -13,7 +13,7 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/uberComponents/ResourceListPage/index.tsx:155 +#: src/uberComponents/ResourceListPage/index.tsx:167 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" @@ -31,7 +31,7 @@ msgstr "" #: src/containers/PatientList/index.tsx:103 #: src/containers/PractitionerList/index.tsx:121 #: src/containers/Prescriptions/index.tsx:148 -#: src/uberComponents/ResourceListPage/index.tsx:207 +#: src/uberComponents/ResourceListPage/index.tsx:227 msgid "Actions" msgstr "" @@ -110,7 +110,7 @@ msgstr "" #: src/components/ModalNewPatient/index.tsx:16 #: src/components/ModalNewPatient/index.tsx:20 -#: src/containers/PatientResourceListExample/index.tsx:73 +#: src/containers/PatientResourceListExample/index.tsx:75 msgid "Add patient" msgstr "" @@ -207,7 +207,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 #: src/containers/PatientList/index.tsx:87 -#: src/containers/PatientResourceListExample/index.tsx:46 +#: src/containers/PatientResourceListExample/index.tsx:47 msgid "Birth date" msgstr "" @@ -424,7 +424,7 @@ msgstr "" msgid "Delete" msgstr "" -#: src/containers/PatientResourceListExample/index.tsx:75 +#: src/containers/PatientResourceListExample/index.tsx:77 msgid "Delete patients" msgstr "" @@ -554,7 +554,7 @@ msgstr "" msgid "End" msgstr "" -#: src/containers/EncounterList/searchBarUtils.ts:45 +#: src/containers/EncounterList/searchBarUtils.ts:22 msgid "End date" msgstr "" @@ -606,7 +606,7 @@ msgid "Fill" msgstr "" #: src/containers/PatientList/searchBarUtils.ts:10 -#: src/containers/PatientResourceListExample/index.tsx:65 +#: src/containers/PatientResourceListExample/index.tsx:66 msgid "Find patient" msgstr "" @@ -815,7 +815,7 @@ msgstr "" #: src/containers/PatientDetails/PatientResources/utils.tsx:152 #: src/containers/PatientDetails/PatientResources/utils.tsx:188 #: src/containers/PatientList/index.tsx:81 -#: src/containers/PatientResourceListExample/index.tsx:40 +#: src/containers/PatientResourceListExample/index.tsx:41 #: src/containers/PractitionerList/index.tsx:108 msgid "Name" msgstr "" @@ -846,7 +846,7 @@ msgstr "" #: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 #: src/containers/QuestionnaireList/index.tsx:102 -#: src/uberComponents/ResourceListPage/index.tsx:179 +#: src/uberComponents/ResourceListPage/index.tsx:191 msgid "No data" msgstr "" @@ -963,7 +963,7 @@ msgstr "" #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:29 #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:35 #: src/containers/PatientList/index.tsx:55 -#: src/containers/PatientResourceListExample/index.tsx:35 +#: src/containers/PatientResourceListExample/index.tsx:36 msgid "Patients" msgstr "" @@ -1076,7 +1076,7 @@ msgstr "" #~ msgid "Reset password" #~ msgstr "" -#: src/uberComponents/ResourceListPage/index.tsx:148 +#: src/uberComponents/ResourceListPage/index.tsx:160 msgid "Reset selection" msgstr "" @@ -1150,8 +1150,8 @@ msgid "Search by practitioner" msgstr "" #: src/containers/EncounterList/searchBarUtils.ts:22 -msgid "Search by status" -msgstr "" +#~ msgid "Search by status" +#~ msgstr "" #: src/containers/PatientDetails/PatientOrders/index.tsx:177 msgid "Search orders" @@ -1220,7 +1220,7 @@ msgid "Specialty" msgstr "" #: src/containers/PatientList/index.tsx:94 -#: src/containers/PatientResourceListExample/index.tsx:53 +#: src/containers/PatientResourceListExample/index.tsx:54 msgid "SSN" msgstr "" @@ -1228,7 +1228,7 @@ msgstr "" msgid "Start" msgstr "" -#: src/containers/EncounterList/searchBarUtils.ts:45 +#: src/containers/EncounterList/searchBarUtils.ts:22 msgid "Start date" msgstr "" @@ -1289,13 +1289,22 @@ msgid "Subject Type" msgstr "" #: src/containers/QuestionnaireBuilder/PromptForm.tsx:104 +#: src/uberComponents/ResourceListPage/actions.tsx:94 +#: src/uberComponents/ResourceListPage/actions.tsx:127 +#: src/uberComponents/ResourceListPage/actions.tsx:172 msgid "Submit" msgstr "" #: src/uberComponents/ResourceListPage/actions.tsx:78 #: src/uberComponents/ResourceListPage/actions.tsx:105 #: src/uberComponents/ResourceListPage/actions.tsx:146 -msgid "Successfully saved" +#~ msgid "Successfully saved" +#~ msgstr "" + +#: src/uberComponents/ResourceListPage/actions.tsx:88 +#: src/uberComponents/ResourceListPage/actions.tsx:122 +#: src/uberComponents/ResourceListPage/actions.tsx:168 +msgid "Successfully submitted" msgstr "" #: src/containers/Scheduling/Availability/index.tsx:43 diff --git a/src/locale/es/messages.po b/src/locale/es/messages.po index a023ce95..6c85ff2d 100644 --- a/src/locale/es/messages.po +++ b/src/locale/es/messages.po @@ -13,7 +13,7 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/uberComponents/ResourceListPage/index.tsx:155 +#: src/uberComponents/ResourceListPage/index.tsx:167 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" @@ -31,7 +31,7 @@ msgstr "Acción" #: src/containers/PatientList/index.tsx:103 #: src/containers/PractitionerList/index.tsx:121 #: src/containers/Prescriptions/index.tsx:148 -#: src/uberComponents/ResourceListPage/index.tsx:207 +#: src/uberComponents/ResourceListPage/index.tsx:227 msgid "Actions" msgstr "Acciones" @@ -110,7 +110,7 @@ msgstr "Añadir Orden" #: src/components/ModalNewPatient/index.tsx:16 #: src/components/ModalNewPatient/index.tsx:20 -#: src/containers/PatientResourceListExample/index.tsx:73 +#: src/containers/PatientResourceListExample/index.tsx:75 msgid "Add patient" msgstr "Añadir paciente" @@ -207,7 +207,7 @@ msgstr "Número de lote" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 #: src/containers/PatientList/index.tsx:87 -#: src/containers/PatientResourceListExample/index.tsx:46 +#: src/containers/PatientResourceListExample/index.tsx:47 msgid "Birth date" msgstr "Fecha de nacimiento" @@ -424,7 +424,7 @@ msgstr "Predeterminado" msgid "Delete" msgstr "Eliminar" -#: src/containers/PatientResourceListExample/index.tsx:75 +#: src/containers/PatientResourceListExample/index.tsx:77 msgid "Delete patients" msgstr "" @@ -550,7 +550,7 @@ msgstr "Encuentros" msgid "End" msgstr "Fin" -#: src/containers/EncounterList/searchBarUtils.ts:45 +#: src/containers/EncounterList/searchBarUtils.ts:22 msgid "End date" msgstr "Fecha de finalización" @@ -602,7 +602,7 @@ msgid "Fill" msgstr "Rellenar" #: src/containers/PatientList/searchBarUtils.ts:10 -#: src/containers/PatientResourceListExample/index.tsx:65 +#: src/containers/PatientResourceListExample/index.tsx:66 msgid "Find patient" msgstr "Buscar paciente" @@ -807,7 +807,7 @@ msgstr "Lunes" #: src/containers/PatientDetails/PatientResources/utils.tsx:152 #: src/containers/PatientDetails/PatientResources/utils.tsx:188 #: src/containers/PatientList/index.tsx:81 -#: src/containers/PatientResourceListExample/index.tsx:40 +#: src/containers/PatientResourceListExample/index.tsx:41 #: src/containers/PractitionerList/index.tsx:108 msgid "Name" msgstr "Nombre" @@ -838,7 +838,7 @@ msgstr "No" #: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 #: src/containers/QuestionnaireList/index.tsx:102 -#: src/uberComponents/ResourceListPage/index.tsx:179 +#: src/uberComponents/ResourceListPage/index.tsx:191 msgid "No data" msgstr "Sin datos" @@ -951,7 +951,7 @@ msgstr "Paciente creado con éxito" #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:29 #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:35 #: src/containers/PatientList/index.tsx:55 -#: src/containers/PatientResourceListExample/index.tsx:35 +#: src/containers/PatientResourceListExample/index.tsx:36 msgid "Patients" msgstr "Pacientes" @@ -1060,7 +1060,7 @@ msgstr "Requerido" msgid "Reset" msgstr "Restablecer" -#: src/uberComponents/ResourceListPage/index.tsx:148 +#: src/uberComponents/ResourceListPage/index.tsx:160 msgid "Reset selection" msgstr "" @@ -1134,8 +1134,8 @@ msgid "Search by practitioner" msgstr "Buscar por profesional" #: src/containers/EncounterList/searchBarUtils.ts:22 -msgid "Search by status" -msgstr "" +#~ msgid "Search by status" +#~ msgstr "" #: src/containers/PatientDetails/PatientOrders/index.tsx:177 msgid "Search orders" @@ -1204,7 +1204,7 @@ msgid "Specialty" msgstr "Especialidad" #: src/containers/PatientList/index.tsx:94 -#: src/containers/PatientResourceListExample/index.tsx:53 +#: src/containers/PatientResourceListExample/index.tsx:54 msgid "SSN" msgstr "NSS" @@ -1212,7 +1212,7 @@ msgstr "NSS" msgid "Start" msgstr "Comenzar" -#: src/containers/EncounterList/searchBarUtils.ts:45 +#: src/containers/EncounterList/searchBarUtils.ts:22 msgid "Start date" msgstr "Fecha de inicio" @@ -1273,13 +1273,22 @@ msgid "Subject Type" msgstr "Tipo de sujeto" #: src/containers/QuestionnaireBuilder/PromptForm.tsx:104 +#: src/uberComponents/ResourceListPage/actions.tsx:94 +#: src/uberComponents/ResourceListPage/actions.tsx:127 +#: src/uberComponents/ResourceListPage/actions.tsx:172 msgid "Submit" msgstr "Enviar" #: src/uberComponents/ResourceListPage/actions.tsx:78 #: src/uberComponents/ResourceListPage/actions.tsx:105 #: src/uberComponents/ResourceListPage/actions.tsx:146 -msgid "Successfully saved" +#~ msgid "Successfully saved" +#~ msgstr "" + +#: src/uberComponents/ResourceListPage/actions.tsx:88 +#: src/uberComponents/ResourceListPage/actions.tsx:122 +#: src/uberComponents/ResourceListPage/actions.tsx:168 +msgid "Successfully submitted" msgstr "" #: src/containers/Scheduling/Availability/index.tsx:43 diff --git a/src/locale/ru/messages.po b/src/locale/ru/messages.po index f2963351..4b69a9ad 100644 --- a/src/locale/ru/messages.po +++ b/src/locale/ru/messages.po @@ -13,7 +13,7 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/uberComponents/ResourceListPage/index.tsx:155 +#: src/uberComponents/ResourceListPage/index.tsx:167 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" @@ -31,7 +31,7 @@ msgstr "" #: src/containers/PatientList/index.tsx:103 #: src/containers/PractitionerList/index.tsx:121 #: src/containers/Prescriptions/index.tsx:148 -#: src/uberComponents/ResourceListPage/index.tsx:207 +#: src/uberComponents/ResourceListPage/index.tsx:227 msgid "Actions" msgstr "Действия" @@ -110,7 +110,7 @@ msgstr "" #: src/components/ModalNewPatient/index.tsx:16 #: src/components/ModalNewPatient/index.tsx:20 -#: src/containers/PatientResourceListExample/index.tsx:73 +#: src/containers/PatientResourceListExample/index.tsx:75 msgid "Add patient" msgstr "Добавить пациенда" @@ -207,7 +207,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 #: src/containers/PatientList/index.tsx:87 -#: src/containers/PatientResourceListExample/index.tsx:46 +#: src/containers/PatientResourceListExample/index.tsx:47 msgid "Birth date" msgstr "Дата рождения" @@ -424,7 +424,7 @@ msgstr "" msgid "Delete" msgstr "" -#: src/containers/PatientResourceListExample/index.tsx:75 +#: src/containers/PatientResourceListExample/index.tsx:77 msgid "Delete patients" msgstr "" @@ -554,7 +554,7 @@ msgstr "Приемы" msgid "End" msgstr "" -#: src/containers/EncounterList/searchBarUtils.ts:45 +#: src/containers/EncounterList/searchBarUtils.ts:22 msgid "End date" msgstr "Конец периода" @@ -606,7 +606,7 @@ msgid "Fill" msgstr "" #: src/containers/PatientList/searchBarUtils.ts:10 -#: src/containers/PatientResourceListExample/index.tsx:65 +#: src/containers/PatientResourceListExample/index.tsx:66 msgid "Find patient" msgstr "Найти пациента" @@ -815,7 +815,7 @@ msgstr "" #: src/containers/PatientDetails/PatientResources/utils.tsx:152 #: src/containers/PatientDetails/PatientResources/utils.tsx:188 #: src/containers/PatientList/index.tsx:81 -#: src/containers/PatientResourceListExample/index.tsx:40 +#: src/containers/PatientResourceListExample/index.tsx:41 #: src/containers/PractitionerList/index.tsx:108 msgid "Name" msgstr "Имя" @@ -846,7 +846,7 @@ msgstr "" #: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 #: src/containers/QuestionnaireList/index.tsx:102 -#: src/uberComponents/ResourceListPage/index.tsx:179 +#: src/uberComponents/ResourceListPage/index.tsx:191 msgid "No data" msgstr "Нет данных" @@ -963,7 +963,7 @@ msgstr "Пациент успешно создан" #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:29 #: src/components/BaseLayout/Sidebar/SidebarTop/context.tsx:35 #: src/containers/PatientList/index.tsx:55 -#: src/containers/PatientResourceListExample/index.tsx:35 +#: src/containers/PatientResourceListExample/index.tsx:36 msgid "Patients" msgstr "Пациенты" @@ -1076,7 +1076,7 @@ msgstr "Сбросить" #~ msgid "Reset password" #~ msgstr "Сбросить пароль" -#: src/uberComponents/ResourceListPage/index.tsx:148 +#: src/uberComponents/ResourceListPage/index.tsx:160 msgid "Reset selection" msgstr "" @@ -1150,8 +1150,8 @@ msgid "Search by practitioner" msgstr "Поиск по врачу" #: src/containers/EncounterList/searchBarUtils.ts:22 -msgid "Search by status" -msgstr "" +#~ msgid "Search by status" +#~ msgstr "" #: src/containers/PatientDetails/PatientOrders/index.tsx:177 msgid "Search orders" @@ -1220,7 +1220,7 @@ msgid "Specialty" msgstr "" #: src/containers/PatientList/index.tsx:94 -#: src/containers/PatientResourceListExample/index.tsx:53 +#: src/containers/PatientResourceListExample/index.tsx:54 msgid "SSN" msgstr "СНИЛС" @@ -1228,7 +1228,7 @@ msgstr "СНИЛС" msgid "Start" msgstr "" -#: src/containers/EncounterList/searchBarUtils.ts:45 +#: src/containers/EncounterList/searchBarUtils.ts:22 msgid "Start date" msgstr "Начало периода" @@ -1289,13 +1289,22 @@ msgid "Subject Type" msgstr "" #: src/containers/QuestionnaireBuilder/PromptForm.tsx:104 +#: src/uberComponents/ResourceListPage/actions.tsx:94 +#: src/uberComponents/ResourceListPage/actions.tsx:127 +#: src/uberComponents/ResourceListPage/actions.tsx:172 msgid "Submit" msgstr "" #: src/uberComponents/ResourceListPage/actions.tsx:78 #: src/uberComponents/ResourceListPage/actions.tsx:105 #: src/uberComponents/ResourceListPage/actions.tsx:146 -msgid "Successfully saved" +#~ msgid "Successfully saved" +#~ msgstr "" + +#: src/uberComponents/ResourceListPage/actions.tsx:88 +#: src/uberComponents/ResourceListPage/actions.tsx:122 +#: src/uberComponents/ResourceListPage/actions.tsx:168 +msgid "Successfully submitted" msgstr "" #: src/containers/Scheduling/Availability/index.tsx:43 From e3d921431efbb1804746f76a0ff591f1c8d29bd0 Mon Sep 17 00:00:00 2001 From: Vadim Laletin Date: Fri, 6 Dec 2024 11:37:08 +0100 Subject: [PATCH 14/22] Hide search bar if no filters --- src/uberComponents/ResourceListPage/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uberComponents/ResourceListPage/index.tsx b/src/uberComponents/ResourceListPage/index.tsx index 7cd953b9..269c8d12 100644 --- a/src/uberComponents/ResourceListPage/index.tsx +++ b/src/uberComponents/ResourceListPage/index.tsx @@ -137,13 +137,13 @@ export function ResourceListPage({ ))} header={{ - children: ( + children: columnsFilterValues.length ? ( - ), + ) : null, }} > {batchActions.length ? ( From b122366e88a75aea17fef0fe027e6392e935fa2a Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Tue, 10 Dec 2024 18:27:57 +0100 Subject: [PATCH 15/22] Add default value for refernce search bar column --- src/components/SearchBar/hooks.ts | 11 ++++++++++- src/components/SearchBar/types.ts | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/components/SearchBar/hooks.ts b/src/components/SearchBar/hooks.ts index 6de4300a..4a1bcc58 100644 --- a/src/components/SearchBar/hooks.ts +++ b/src/components/SearchBar/hooks.ts @@ -44,7 +44,16 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { } if (isReferenceColumn(column)) { - return { column, value: null }; + return { + column, + value: column.defaultValue + ? { + value: { + Reference: column.defaultValue, + }, + } + : null, + }; } if (isChoiceColumn(column)) { diff --git a/src/components/SearchBar/types.ts b/src/components/SearchBar/types.ts index 033c7d36..6e913bf7 100644 --- a/src/components/SearchBar/types.ts +++ b/src/components/SearchBar/types.ts @@ -1,6 +1,12 @@ import { Coding } from 'fhir/r4b'; -import { Expression, Resource, QuestionnaireItemChoiceColumn, ValueSet } from '@beda.software/aidbox-types'; +import { + Expression, + Resource, + QuestionnaireItemChoiceColumn, + ValueSet, + AidboxReference, +} from '@beda.software/aidbox-types'; import { ValueSetOption } from 'src/services'; import { LoadResourceOption } from 'src/services/questionnaire'; @@ -41,6 +47,7 @@ export type SearchBarReferenceColumn = SearchBarColumnBase & { expression: Expression['expression']; path: QuestionnaireItemChoiceColumn['path']; placeholder: string; + defaultValue?: AidboxReference; }; export type SearchBarChoiceColumn = SearchBarColumnBase & { type: SearchBarColumnType.CHOICE; From dc063a394db05a1d9ff5c33ac65e581aeb99f066 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Fri, 13 Dec 2024 20:20:39 +0100 Subject: [PATCH 16/22] Add table cards and filters mobile version --- .../BaseLayout/PageContainer/styles.ts | 10 ++- .../SearchBar/SearchBarMobile/index.tsx | 57 +++++++++++++ .../SearchBar/SearchBarMobile/styles.ts | 81 +++++++++++++++++++ src/components/SearchBar/index.tsx | 42 ++++++---- src/components/SearchBar/styles.ts | 23 +++++- src/components/Table/TableCards/index.tsx | 77 ++++++++++++++++++ src/components/Table/TableCards/styles.ts | 33 ++++++++ src/components/Table/index.tsx | 20 ++++- src/components/Table/styles.ts | 23 +++++- .../components/InvoiceListSearchBar/index.tsx | 4 +- .../components/MedicationsSearchBar/index.tsx | 4 +- .../OrganizationScheduling/index.tsx | 4 +- .../PrescriptionsSearchBar/index.tsx | 4 +- 13 files changed, 349 insertions(+), 33 deletions(-) create mode 100644 src/components/SearchBar/SearchBarMobile/index.tsx create mode 100644 src/components/SearchBar/SearchBarMobile/styles.ts create mode 100644 src/components/Table/TableCards/index.tsx create mode 100644 src/components/Table/TableCards/styles.ts diff --git a/src/components/BaseLayout/PageContainer/styles.ts b/src/components/BaseLayout/PageContainer/styles.ts index 1f527abf..9e7a4f32 100644 --- a/src/components/BaseLayout/PageContainer/styles.ts +++ b/src/components/BaseLayout/PageContainer/styles.ts @@ -2,6 +2,8 @@ import styled, { css } from 'styled-components'; import { BasePageContent, BasePageHeader } from '..'; +const mobileWidth = 768; + export const S = { HeaderContainer: styled(BasePageHeader)<{ $variant?: 'default' | 'with-table' | 'with-tabs' }>` display: flex; @@ -23,7 +25,13 @@ export const S = { display: flex; justify-content: space-between; align-items: center; - gap: 0 40px; + flex-wrap: wrap; + gap: 16px 40px; + position: relative; + + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + padding-right: 48px; + } `, HeaderLeftColumn: styled.div` display: flex; diff --git a/src/components/SearchBar/SearchBarMobile/index.tsx b/src/components/SearchBar/SearchBarMobile/index.tsx new file mode 100644 index 00000000..f536593b --- /dev/null +++ b/src/components/SearchBar/SearchBarMobile/index.tsx @@ -0,0 +1,57 @@ +import { Trans } from '@lingui/macro'; +import { Button } from 'antd'; + +import { SearchBarColumn } from '../SearchBarColumn'; +import { S } from './styles'; +import { SearchBarData } from '../types'; +import { CloseOutlined, FilterFilled } from '@ant-design/icons'; +import { useState } from 'react'; +import { Title } from 'src/components/Typography'; +import _ from 'lodash'; + +export function SearchBarMobile(props: SearchBarData) { + const { columnsFilterValues, onChangeColumnFilter, onResetFilters } = props; + const [filtersOpened, toggleFiltersOpened] = useState(false); + const appliedFiltersCount = _.compact(columnsFilterValues.map((f) => f.value)).length; + + return ( + + + + + + + + ); +} diff --git a/src/components/SearchBar/SearchBarMobile/styles.ts b/src/components/SearchBar/SearchBarMobile/styles.ts new file mode 100644 index 00000000..fae00e74 --- /dev/null +++ b/src/components/SearchBar/SearchBarMobile/styles.ts @@ -0,0 +1,81 @@ +import { Badge, Button, Drawer } from 'antd'; +import styled from 'styled-components'; + +export const S = { + Container: styled.div` + position: absolute; + right: 24px; + top: 24px; + `, + FiltersButton: styled.div` + position: relative; + `, + Badge: styled(Badge)` + position: absolute; + right: -3px; + top: -3px; + + .ant-badge-count { + background-color: ${({ theme }) => theme.primaryPalette.bcp_2}; + color: ${({ theme }) => theme.primary}; + } + `, + CloseIcon: styled(Button)` + height: 56px; + width: 48px !important; + color: ${({ theme }) => theme.neutralPalette.gray_7} !important; + + &:hover { + background: 0 !important; + } + `, + Drawer: styled(Drawer)` + padding-top: 56px; + padding-bottom: 129px; + background-color: ${({ theme }) => theme.neutralPalette.gray_1}; + + .ant-drawer-body { + padding: 0; + display: flex; + flex-direction: column; + justify-content: space-between; + } + + .ant-input-search, + .ant-picker, + .react-select__control { + width: 100%; + max-width: 450px; + } + `, + DrawerHeader: styled.div` + position: absolute; + left: 0; + right: 0; + top: 0; + height: 56px; + padding-left: 16px; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid ${({ theme }) => theme.neutralPalette.gray_4}; + `, + DrawerContent: styled.div` + padding: 16px; + display: flex; + flex-direction: column; + gap: 16px; + flex: 1; + `, + DrawerFooter: styled.div` + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 16px; + display: flex; + flex-direction: column; + gap: 16px; + border-top: 1px solid ${({ theme }) => theme.neutralPalette.gray_4}; + `, +}; diff --git a/src/components/SearchBar/index.tsx b/src/components/SearchBar/index.tsx index 7046a5db..346bb51c 100644 --- a/src/components/SearchBar/index.tsx +++ b/src/components/SearchBar/index.tsx @@ -4,25 +4,35 @@ import { Button } from 'antd'; import { SearchBarColumn } from './SearchBarColumn'; import { S } from './styles'; import { SearchBarData } from './types'; +import { SearchBarMobile } from './SearchBarMobile'; -export function SearchBar(props: SearchBarData) { - const { columnsFilterValues, onChangeColumnFilter, onResetFilters } = props; +interface SearchBarProps extends SearchBarData { + showInDrawerOnMobile?: boolean; +} + +export function SearchBar(props: SearchBarProps) { + const { columnsFilterValues, onChangeColumnFilter, onResetFilters, showInDrawerOnMobile = true } = props; return ( - - - {columnsFilterValues.map((columnFilterValue) => ( - - ))} - + <> + + + {columnsFilterValues.map((columnFilterValue) => ( + + ))} + - - + + + + + + ); } diff --git a/src/components/SearchBar/styles.ts b/src/components/SearchBar/styles.ts index e9d9b7d7..07ebfe18 100644 --- a/src/components/SearchBar/styles.ts +++ b/src/components/SearchBar/styles.ts @@ -1,7 +1,9 @@ -import styled from 'styled-components'; +import styled, { css } from 'styled-components'; + +const mobileWidth = 768; export const S = { - Container: styled.div` + SearchBar: styled.div<{ $showInDrawerOnMobile?: boolean }>` position: relative; display: flex; flex-direction: row; @@ -15,6 +17,23 @@ export const S = { .react-select__control { width: 270px; } + + ${({ $showInDrawerOnMobile }) => + $showInDrawerOnMobile && + css` + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + display: none; + } + `} + `, + MobileFilters: styled.div<{ $showInDrawerOnMobile?: boolean }>` + ${({ $showInDrawerOnMobile }) => + $showInDrawerOnMobile && + css` + @media screen and (min-width: ${() => `${mobileWidth}px`}) { + display: none; + } + `} `, LeftColumn: styled.div` display: flex; diff --git a/src/components/Table/TableCards/index.tsx b/src/components/Table/TableCards/index.tsx new file mode 100644 index 00000000..878b2bb9 --- /dev/null +++ b/src/components/Table/TableCards/index.tsx @@ -0,0 +1,77 @@ +import { TableProps } from 'antd/lib/table'; + +import { S } from './styles'; +import { Pagination, TablePaginationConfig } from 'antd'; +import { ColumnTitle, SorterResult, TableCurrentDataSource } from 'antd/lib/table/interface'; +import _ from 'lodash'; + +export function TableCards(props: TableProps) { + const { pagination, onChange, dataSource, columns = [], rowKey } = props; + + const renderTitle = (title: ColumnTitle) => { + if (typeof title === 'function') { + return {title({})}; + } + + return {title}; + }; + + const getCardKey = (resource: T) => { + if (typeof rowKey === 'function') { + return rowKey(resource) as string; + } + + return rowKey as string; + }; + + return ( + + {dataSource?.map((resource, index) => { + const key = getCardKey(resource); + + return ( + + {columns.map((column) => ( + + {column?.title ? renderTitle(column.title) : null} + + { + // @ts-ignore + column?.render + ? (column?.render( + // @ts-ignore + column.dataIndex ? _.get(resource, column.dataIndex) : null, + resource, + index, + ) as React.ReactNode) + : // @ts-ignore + _.get(resource, column.dataIndex) + } + + + ))} + + ); + })} + + { + const paginationConfig: TablePaginationConfig = { + ...(pagination ?? {}), + current: page, + pageSize, + }; + const filtersConfig: Record = {}; + const sorterConfig: SorterResult = {}; + const extraConfig: TableCurrentDataSource = {} as any; + + // @ts-ignore + onChange(paginationConfig, filtersConfig, sorterConfig, extraConfig); + }} + /> + + + ); +} diff --git a/src/components/Table/TableCards/styles.ts b/src/components/Table/TableCards/styles.ts new file mode 100644 index 00000000..4961596a --- /dev/null +++ b/src/components/Table/TableCards/styles.ts @@ -0,0 +1,33 @@ +import styled from 'styled-components'; +import { Text } from 'src/components/Typography'; + +export const S = { + Container: styled.div` + display: flex; + flex-direction: column; + gap: 10px 0; + color: ${({ theme }) => theme.neutral.primaryText} + `, + Card: styled.div` + display: flex; + flex-direction: column; + gap: 16px 0; + padding: 16px; + border: 1px solid ${({ theme }) => theme.neutralPalette.gray_4}; + border-radius: 6px; + background-color: ${({ theme }) => theme.neutralPalette.gray_1}; + `, + Column: styled.div` + display: flex; + flex-direction: column; + gap: 4px 0; + `, + Title: styled(Text)` + font-weight: 700; + `, + Content: styled.div``, + Pagination: styled.div` + display: flex; + justify-content: flex-end; + `, +}; diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index e8451d2a..1189b423 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -1,12 +1,24 @@ import { Table as ANTDTable } from 'antd'; -import { TableProps } from 'antd/lib/table'; +import { TableProps as ANTDTableProps } from 'antd/lib/table'; import { S } from './styles'; +import { TableCards } from './TableCards'; + +interface TableProps extends ANTDTableProps { + showCardsOnMobile?: boolean; +} export function Table(props: TableProps) { + const { showCardsOnMobile = true } = props; + return ( - - bordered size="middle" {...props} /> - + <> + + bordered size="middle" {...props} /> + + + + + ); } diff --git a/src/components/Table/styles.ts b/src/components/Table/styles.ts index d574d9e2..44fb9a13 100644 --- a/src/components/Table/styles.ts +++ b/src/components/Table/styles.ts @@ -1,9 +1,19 @@ -import styled from 'styled-components'; +import styled, { css } from 'styled-components'; + +const mobileWidth = 768; export const S = { - Table: styled.div` + Table: styled.div<{ $showCardsOnMobile?: boolean }>` overflow: auto; + ${({ $showCardsOnMobile }) => + $showCardsOnMobile && + css` + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + display: none; + } + `} + .ant-spin-container { min-width: fit-content; } @@ -24,4 +34,13 @@ export const S = { background-color: ${({ theme }) => theme.neutralPalette.gray_3}; } `, + Cards: styled.div<{ $showCardsOnMobile?: boolean }>` + ${({ $showCardsOnMobile }) => + $showCardsOnMobile && + css` + @media screen and (min-width: ${() => `${mobileWidth}px`}) { + display: none; + } + `} + `, }; diff --git a/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx b/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx index 60bf5e5a..a1d59f19 100644 --- a/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx +++ b/src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx @@ -23,7 +23,7 @@ export function InvoiceListSearchBar(props: InvoiceListSearchBarSelectProps) { } = props; return ( - + - + ); } diff --git a/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx b/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx index 284024ba..45d8f8ca 100644 --- a/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx +++ b/src/containers/MedicationManagement/components/MedicationsSearchBar/index.tsx @@ -19,7 +19,7 @@ export function MedicationsSearchBar(props: MedicationsSearchBarSelectProps) { const { onChangeMedication, loadMedicationOptions, selectedMedication, reset } = props; return ( - + - + ); } diff --git a/src/containers/OrganizationScheduling/index.tsx b/src/containers/OrganizationScheduling/index.tsx index 95f2ef85..a10fb34b 100644 --- a/src/containers/OrganizationScheduling/index.tsx +++ b/src/containers/OrganizationScheduling/index.tsx @@ -69,7 +69,7 @@ export function OrganizationScheduling() { title={Scheduling} header={{ children: ( - + Reset - + ), }} > diff --git a/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx b/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx index e6e1c909..613afcfe 100644 --- a/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx +++ b/src/containers/Prescriptions/components/PrescriptionsSearchBar/index.tsx @@ -37,7 +37,7 @@ export function PrescriptionsSearchBar(props: PrescriptionsSearchBarSelectProps) } = props; return ( - + - + ); } From 9419491d7882c4fc4387259f33098d961e8556af Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Fri, 13 Dec 2024 20:25:54 +0100 Subject: [PATCH 17/22] Extract locales --- src/locale/en/messages.po | 13 +++++++++++-- src/locale/es/messages.po | 13 +++++++++++-- src/locale/ru/messages.po | 13 +++++++++++-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/locale/en/messages.po b/src/locale/en/messages.po index 58a8431e..51e0ce2e 100644 --- a/src/locale/en/messages.po +++ b/src/locale/en/messages.po @@ -258,7 +258,8 @@ msgstr "" msgid "Characteristics" msgstr "" -#: src/components/SearchBar/index.tsx:24 +#: src/components/SearchBar/index.tsx:30 +#: src/components/SearchBar/SearchBarMobile/index.tsx:51 msgid "Clear filters" msgstr "" @@ -610,6 +611,10 @@ msgstr "" msgid "Fill" msgstr "" +#: src/components/SearchBar/SearchBarMobile/index.tsx:33 +msgid "Filters" +msgstr "" + #: src/containers/PatientList/searchBarUtils.ts:10 #: src/containers/PatientResourceListExample/index.tsx:67 msgid "Find patient" @@ -1211,6 +1216,10 @@ msgstr "" msgid "Share link" msgstr "" +#: src/components/SearchBar/SearchBarMobile/index.tsx:48 +msgid "Show results" +msgstr "" + #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:53 msgid "Slider" msgstr "" @@ -1241,7 +1250,7 @@ msgstr "" msgid "Start date" msgstr "" -#: src/components/BaseQuestionnaireResponseForm/widgets/AudioRecorderUploader/index.tsx:84 +#: src/components/BaseQuestionnaireResponseForm/widgets/AudioRecorderUploader/index.tsx:72 #: src/containers/EncounterDetails/index.tsx:101 msgid "Start scribe" msgstr "" diff --git a/src/locale/es/messages.po b/src/locale/es/messages.po index cc1273d9..68b4ded3 100644 --- a/src/locale/es/messages.po +++ b/src/locale/es/messages.po @@ -258,7 +258,8 @@ msgstr "Ejecución en curso" msgid "Characteristics" msgstr "Características" -#: src/components/SearchBar/index.tsx:24 +#: src/components/SearchBar/index.tsx:30 +#: src/components/SearchBar/SearchBarMobile/index.tsx:51 msgid "Clear filters" msgstr "" @@ -606,6 +607,10 @@ msgstr "Falso" msgid "Fill" msgstr "Rellenar" +#: src/components/SearchBar/SearchBarMobile/index.tsx:33 +msgid "Filters" +msgstr "" + #: src/containers/PatientList/searchBarUtils.ts:10 #: src/containers/PatientResourceListExample/index.tsx:67 msgid "Find patient" @@ -1191,6 +1196,10 @@ msgstr "Sexo" msgid "Share link" msgstr "Compartir enlace" +#: src/components/SearchBar/SearchBarMobile/index.tsx:48 +msgid "Show results" +msgstr "" + #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:53 msgid "Slider" msgstr "Deslizador" @@ -1221,7 +1230,7 @@ msgstr "Comenzar" msgid "Start date" msgstr "Fecha de inicio" -#: src/components/BaseQuestionnaireResponseForm/widgets/AudioRecorderUploader/index.tsx:84 +#: src/components/BaseQuestionnaireResponseForm/widgets/AudioRecorderUploader/index.tsx:72 #: src/containers/EncounterDetails/index.tsx:101 msgid "Start scribe" msgstr "Iniciar escritura" diff --git a/src/locale/ru/messages.po b/src/locale/ru/messages.po index 17a5da79..21963bb9 100644 --- a/src/locale/ru/messages.po +++ b/src/locale/ru/messages.po @@ -258,7 +258,8 @@ msgstr "" msgid "Characteristics" msgstr "" -#: src/components/SearchBar/index.tsx:24 +#: src/components/SearchBar/index.tsx:30 +#: src/components/SearchBar/SearchBarMobile/index.tsx:51 msgid "Clear filters" msgstr "" @@ -610,6 +611,10 @@ msgstr "" msgid "Fill" msgstr "" +#: src/components/SearchBar/SearchBarMobile/index.tsx:33 +msgid "Filters" +msgstr "" + #: src/containers/PatientList/searchBarUtils.ts:10 #: src/containers/PatientResourceListExample/index.tsx:67 msgid "Find patient" @@ -1211,6 +1216,10 @@ msgstr "" msgid "Share link" msgstr "" +#: src/components/SearchBar/SearchBarMobile/index.tsx:48 +msgid "Show results" +msgstr "" + #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:53 msgid "Slider" msgstr "" @@ -1241,7 +1250,7 @@ msgstr "" msgid "Start date" msgstr "Начало периода" -#: src/components/BaseQuestionnaireResponseForm/widgets/AudioRecorderUploader/index.tsx:84 +#: src/components/BaseQuestionnaireResponseForm/widgets/AudioRecorderUploader/index.tsx:72 #: src/containers/EncounterDetails/index.tsx:101 msgid "Start scribe" msgstr "" From 026fc2ce35e59ebeab11f5143c000530bde2c528 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Sat, 14 Dec 2024 14:45:09 +0100 Subject: [PATCH 18/22] Add empty state for mobile cards --- src/components/SearchBar/SearchBarMobile/styles.ts | 6 +----- src/components/SearchBar/styles.ts | 4 ++++ src/components/Select/styles.ts | 4 ++++ src/components/Table/TableCards/index.tsx | 10 +++++++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/SearchBar/SearchBarMobile/styles.ts b/src/components/SearchBar/SearchBarMobile/styles.ts index fae00e74..9fd65048 100644 --- a/src/components/SearchBar/SearchBarMobile/styles.ts +++ b/src/components/SearchBar/SearchBarMobile/styles.ts @@ -2,11 +2,7 @@ import { Badge, Button, Drawer } from 'antd'; import styled from 'styled-components'; export const S = { - Container: styled.div` - position: absolute; - right: 24px; - top: 24px; - `, + Container: styled.div``, FiltersButton: styled.div` position: relative; `, diff --git a/src/components/SearchBar/styles.ts b/src/components/SearchBar/styles.ts index 07ebfe18..c1526dae 100644 --- a/src/components/SearchBar/styles.ts +++ b/src/components/SearchBar/styles.ts @@ -27,6 +27,10 @@ export const S = { `} `, MobileFilters: styled.div<{ $showInDrawerOnMobile?: boolean }>` + position: absolute; + right: 24px; + top: 24px; + ${({ $showInDrawerOnMobile }) => $showInDrawerOnMobile && css` diff --git a/src/components/Select/styles.ts b/src/components/Select/styles.ts index 9602ec86..1481af21 100644 --- a/src/components/Select/styles.ts +++ b/src/components/Select/styles.ts @@ -14,6 +14,10 @@ export const S = { } } + .react-select__menu { + z-index: 10; + } + .react-select__control--menu-is-open, .react-select__control--is-focused { border-color: ${({ theme }) => theme.antdTheme?.colorPrimary}; diff --git a/src/components/Table/TableCards/index.tsx b/src/components/Table/TableCards/index.tsx index 878b2bb9..3aa0a19b 100644 --- a/src/components/Table/TableCards/index.tsx +++ b/src/components/Table/TableCards/index.tsx @@ -1,12 +1,12 @@ import { TableProps } from 'antd/lib/table'; import { S } from './styles'; -import { Pagination, TablePaginationConfig } from 'antd'; +import { Empty, Pagination, TablePaginationConfig } from 'antd'; import { ColumnTitle, SorterResult, TableCurrentDataSource } from 'antd/lib/table/interface'; import _ from 'lodash'; export function TableCards(props: TableProps) { - const { pagination, onChange, dataSource, columns = [], rowKey } = props; + const { pagination, onChange, dataSource = [], columns = [], rowKey } = props; const renderTitle = (title: ColumnTitle) => { if (typeof title === 'function') { @@ -24,9 +24,13 @@ export function TableCards(props: TableProps) { return rowKey as string; }; + if (dataSource.length === 0) { + return ; + } + return ( - {dataSource?.map((resource, index) => { + {dataSource.map((resource, index) => { const key = getCardKey(resource); return ( From 8cff01f4efb25ceff8c4a6dd24cded57f7fb2f69 Mon Sep 17 00:00:00 2001 From: Elena Grednikova Date: Mon, 16 Dec 2024 12:06:28 +0100 Subject: [PATCH 19/22] Remove header title bottom margin --- src/components/BaseLayout/PageContainer/index.tsx | 4 +--- src/components/BaseLayout/PageContainer/styles.ts | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/BaseLayout/PageContainer/index.tsx b/src/components/BaseLayout/PageContainer/index.tsx index c072499b..739701b2 100644 --- a/src/components/BaseLayout/PageContainer/index.tsx +++ b/src/components/BaseLayout/PageContainer/index.tsx @@ -1,5 +1,3 @@ -import { Title } from 'src/components'; - import { S } from './styles'; import { BasePageContentProps, BasePageHeaderProps } from '..'; @@ -50,5 +48,5 @@ export function PageContainer(props: PageContainerProps = {}) { } export function PageContainerTitle(props: React.HTMLAttributes) { - return ; + return <S.Title level={3} {...props} />; } diff --git a/src/components/BaseLayout/PageContainer/styles.ts b/src/components/BaseLayout/PageContainer/styles.ts index 9e7a4f32..4b21e52a 100644 --- a/src/components/BaseLayout/PageContainer/styles.ts +++ b/src/components/BaseLayout/PageContainer/styles.ts @@ -1,6 +1,7 @@ import styled, { css } from 'styled-components'; import { BasePageContent, BasePageHeader } from '..'; +import { Title } from 'src/components/Typography'; const mobileWidth = 768; @@ -33,6 +34,9 @@ export const S = { padding-right: 48px; } `, + Title: styled(Title)` + margin-bottom: 0 !important; + `, HeaderLeftColumn: styled.div` display: flex; align-items: center; From 275e2fc554c3216ded533b45c5057d8a3ec849ef Mon Sep 17 00:00:00 2001 From: Elena Grednikova <vesnushkalena@gmail.com> Date: Thu, 19 Dec 2024 19:58:35 +0100 Subject: [PATCH 20/22] Add card selection --- src/components/Table/TableCards/index.tsx | 66 +++++++++++++++-------- src/components/Table/TableCards/styles.ts | 12 +++-- 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/src/components/Table/TableCards/index.tsx b/src/components/Table/TableCards/index.tsx index 3aa0a19b..2deba08d 100644 --- a/src/components/Table/TableCards/index.tsx +++ b/src/components/Table/TableCards/index.tsx @@ -1,12 +1,12 @@ import { TableProps } from 'antd/lib/table'; import { S } from './styles'; -import { Empty, Pagination, TablePaginationConfig } from 'antd'; +import { Checkbox, Empty, Pagination, TablePaginationConfig } from 'antd'; import { ColumnTitle, SorterResult, TableCurrentDataSource } from 'antd/lib/table/interface'; import _ from 'lodash'; export function TableCards<T extends object>(props: TableProps<T>) { - const { pagination, onChange, dataSource = [], columns = [], rowKey } = props; + const { pagination, onChange, dataSource = [], columns = [], rowKey, rowSelection } = props; const renderTitle = (title: ColumnTitle<T>) => { if (typeof title === 'function') { @@ -32,28 +32,52 @@ export function TableCards<T extends object>(props: TableProps<T>) { <S.Container> {dataSource.map((resource, index) => { const key = getCardKey(resource); + const selectedRowKeys = rowSelection?.selectedRowKeys ?? []; return ( <S.Card key={key}> - {columns.map((column) => ( - <S.Column key={`${key}-${column.key}`}> - {column?.title ? renderTitle(column.title) : null} - <S.Content> - { - // @ts-ignore - column?.render - ? (column?.render( - // @ts-ignore - column.dataIndex ? _.get(resource, column.dataIndex) : null, - resource, - index, - ) as React.ReactNode) - : // @ts-ignore - _.get(resource, column.dataIndex) - } - </S.Content> - </S.Column> - ))} + <S.Columns> + {columns.map((column) => ( + <S.Column key={`${key}-${column.key}`}> + {column?.title ? renderTitle(column.title) : null} + <S.Content> + { + // @ts-ignore + column?.render + ? (column?.render( + // @ts-ignore + column.dataIndex ? _.get(resource, column.dataIndex) : null, + resource, + index, + ) as React.ReactNode) + : // @ts-ignore + _.get(resource, column.dataIndex) + } + </S.Content> + </S.Column> + ))} + </S.Columns> + {rowSelection ? ( + <S.RowSelection> + <Checkbox + checked={selectedRowKeys.includes(key)} + onChange={(e) => { + const checked = e.target.checked; + + if (checked) { + rowSelection.onChange?.([...selectedRowKeys, key], [], { + type: 'single', + }); + } else { + const filteredKeys = selectedRowKeys.filter((k) => k !== key); + rowSelection.onChange?.(filteredKeys, [], { + type: 'single', + }); + } + }} + /> + </S.RowSelection> + ) : null} </S.Card> ); })} diff --git a/src/components/Table/TableCards/styles.ts b/src/components/Table/TableCards/styles.ts index 4961596a..3de92a2c 100644 --- a/src/components/Table/TableCards/styles.ts +++ b/src/components/Table/TableCards/styles.ts @@ -6,17 +6,23 @@ export const S = { display: flex; flex-direction: column; gap: 10px 0; - color: ${({ theme }) => theme.neutral.primaryText} + color: ${({ theme }) => theme.neutral.primaryText}; `, Card: styled.div` display: flex; - flex-direction: column; - gap: 16px 0; + gap: 0 24px; padding: 16px; border: 1px solid ${({ theme }) => theme.neutralPalette.gray_4}; border-radius: 6px; background-color: ${({ theme }) => theme.neutralPalette.gray_1}; `, + Columns: styled.div` + flex: 1; + display: flex; + flex-direction: column; + gap: 16px 0; + `, + RowSelection: styled.div``, Column: styled.div` display: flex; flex-direction: column; From c79126d94430f6253de8c517962392ec93877935 Mon Sep 17 00:00:00 2001 From: Elena Grednikova <vesnushkalena@gmail.com> Date: Thu, 19 Dec 2024 21:22:31 +0100 Subject: [PATCH 21/22] Update batch action for mobile --- .../BaseLayout/PageContainer/styles.ts | 3 +- src/components/SearchBar/styles.ts | 3 +- src/components/Table/styles.ts | 3 +- src/locale/en/messages.po | 59 +++++++++------- src/locale/es/messages.po | 59 +++++++++------- src/locale/ru/messages.po | 59 +++++++++------- src/theme/utils.ts | 1 + .../ResourceListPage/BatchActions.tsx | 70 ++++++++++++++----- src/uberComponents/ResourceListPage/index.tsx | 1 + src/uberComponents/ResourceListPage/styles.ts | 53 ++++++++++++++ 10 files changed, 209 insertions(+), 102 deletions(-) create mode 100644 src/theme/utils.ts diff --git a/src/components/BaseLayout/PageContainer/styles.ts b/src/components/BaseLayout/PageContainer/styles.ts index 4b21e52a..b942f4cb 100644 --- a/src/components/BaseLayout/PageContainer/styles.ts +++ b/src/components/BaseLayout/PageContainer/styles.ts @@ -2,8 +2,7 @@ import styled, { css } from 'styled-components'; import { BasePageContent, BasePageHeader } from '..'; import { Title } from 'src/components/Typography'; - -const mobileWidth = 768; +import { mobileWidth } from 'src/theme/utils'; export const S = { HeaderContainer: styled(BasePageHeader)<{ $variant?: 'default' | 'with-table' | 'with-tabs' }>` diff --git a/src/components/SearchBar/styles.ts b/src/components/SearchBar/styles.ts index c1526dae..ec486fad 100644 --- a/src/components/SearchBar/styles.ts +++ b/src/components/SearchBar/styles.ts @@ -1,7 +1,6 @@ +import { mobileWidth } from 'src/theme/utils'; import styled, { css } from 'styled-components'; -const mobileWidth = 768; - export const S = { SearchBar: styled.div<{ $showInDrawerOnMobile?: boolean }>` position: relative; diff --git a/src/components/Table/styles.ts b/src/components/Table/styles.ts index 44fb9a13..68a4cd28 100644 --- a/src/components/Table/styles.ts +++ b/src/components/Table/styles.ts @@ -1,7 +1,6 @@ +import { mobileWidth } from 'src/theme/utils'; import styled, { css } from 'styled-components'; -const mobileWidth = 768; - export const S = { Table: styled.div<{ $showCardsOnMobile?: boolean }>` overflow: auto; diff --git a/src/locale/en/messages.po b/src/locale/en/messages.po index 6cf61454..79d3fd6e 100644 --- a/src/locale/en/messages.po +++ b/src/locale/en/messages.po @@ -13,7 +13,7 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/uberComponents/ResourceListPage/index.tsx:176 +#: src/uberComponents/ResourceListPage/BatchActions.tsx:57 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" @@ -31,7 +31,7 @@ msgstr "" #: src/containers/PatientList/index.tsx:103 #: src/containers/PractitionerList/index.tsx:121 #: src/containers/Prescriptions/index.tsx:148 -#: src/uberComponents/ResourceListPage/index.tsx:237 +#: src/uberComponents/ResourceListPage/index.tsx:273 msgid "Actions" msgstr "" @@ -110,7 +110,7 @@ msgstr "" #: src/components/ModalNewPatient/index.tsx:16 #: src/components/ModalNewPatient/index.tsx:20 -#: src/containers/PatientResourceListExample/index.tsx:76 +#: src/containers/PatientResourceListExample/index.tsx:78 msgid "Add patient" msgstr "" @@ -207,7 +207,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 #: src/containers/PatientList/index.tsx:87 -#: src/containers/PatientResourceListExample/index.tsx:47 +#: src/containers/PatientResourceListExample/index.tsx:48 msgid "Birth date" msgstr "" @@ -258,7 +258,7 @@ msgstr "" msgid "Characteristics" msgstr "" -#: src/components/SearchBar/index.tsx:30 +#: src/components/SearchBar/index.tsx:36 #: src/components/SearchBar/SearchBarMobile/index.tsx:51 msgid "Clear filters" msgstr "" @@ -383,7 +383,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:95 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:142 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:216 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:283 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:271 #: src/containers/PatientDetails/PatientResources/utils.tsx:96 #: src/containers/PatientDetails/PatientResources/utils.tsx:135 #: src/containers/PatientDetails/PatientResources/utils.tsx:174 @@ -430,7 +430,7 @@ msgstr "" msgid "Delete" msgstr "" -#: src/containers/PatientResourceListExample/index.tsx:78 +#: src/containers/PatientResourceListExample/index.tsx:80 msgid "Delete patients" msgstr "" @@ -620,7 +620,7 @@ msgid "Filters" msgstr "" #: src/containers/PatientList/searchBarUtils.ts:10 -#: src/containers/PatientResourceListExample/index.tsx:67 +#: src/containers/PatientResourceListExample/index.tsx:68 msgid "Find patient" msgstr "" @@ -711,7 +711,7 @@ msgstr "" msgid "Inline options?" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:317 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:313 msgid "Intent" msgstr "" @@ -826,7 +826,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:123 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:204 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:240 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:312 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:308 #: src/containers/PatientDetails/PatientResources/utils.tsx:50 #: src/containers/PatientDetails/PatientResources/utils.tsx:85 #: src/containers/PatientDetails/PatientResources/utils.tsx:124 @@ -864,7 +864,7 @@ msgstr "" #: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 #: src/containers/QuestionnaireList/index.tsx:102 -#: src/uberComponents/ResourceListPage/index.tsx:200 +#: src/uberComponents/ResourceListPage/index.tsx:214 msgid "No data" msgstr "" @@ -888,6 +888,10 @@ msgstr "" msgid "Number (default)" msgstr "" +#: src/containers/PatientResourceListExample/index.tsx:83 +msgid "Number of Patients" +msgstr "" + #: src/containers/PatientDetails/PatientResources/utils.tsx:230 msgid "Observations" msgstr "" @@ -936,7 +940,7 @@ msgid "Order added" msgstr "" #: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:22 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:304 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:300 msgid "Orders" msgstr "" @@ -1008,7 +1012,6 @@ msgstr "" #: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:32 #: src/containers/InvoiceList/tableUtils.tsx:114 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:152 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/PatientDetails/PatientResources/utils.tsx:221 msgid "Practitioner" msgstr "" @@ -1094,7 +1097,7 @@ msgstr "" #~ msgid "Reset password" #~ msgstr "" -#: src/uberComponents/ResourceListPage/index.tsx:169 +#: src/uberComponents/ResourceListPage/BatchActions.tsx:48 msgid "Reset selection" msgstr "" @@ -1187,6 +1190,10 @@ msgstr "" msgid "Select (default)" msgstr "" +#: src/uberComponents/ResourceListPage/BatchActions.tsx:69 +msgid "Select all" +msgstr "" + #: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:30 #: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:55 msgid "Select..." @@ -1197,8 +1204,8 @@ msgid "Serum creatinin" msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:279 -msgid "Service" -msgstr "" +#~ msgid "Service" +#~ msgstr "" #: src/containers/PatientDetails/PatientResources/utils.tsx:306 msgid "Service Requests" @@ -1242,7 +1249,7 @@ msgid "Specialty" msgstr "" #: src/containers/PatientList/index.tsx:94 -#: src/containers/PatientResourceListExample/index.tsx:54 +#: src/containers/PatientResourceListExample/index.tsx:55 msgid "SSN" msgstr "" @@ -1312,9 +1319,9 @@ msgid "Subject Type" msgstr "" #: src/containers/QuestionnaireBuilder/PromptForm.tsx:104 -#: src/uberComponents/ResourceListPage/actions.tsx:96 -#: src/uberComponents/ResourceListPage/actions.tsx:130 -#: src/uberComponents/ResourceListPage/actions.tsx:176 +#: src/uberComponents/ResourceListPage/actions.tsx:97 +#: src/uberComponents/ResourceListPage/actions.tsx:131 +#: src/uberComponents/ResourceListPage/actions.tsx:177 msgid "Submit" msgstr "" @@ -1324,9 +1331,9 @@ msgstr "" #~ msgid "Successfully saved" #~ msgstr "" -#: src/uberComponents/ResourceListPage/actions.tsx:90 -#: src/uberComponents/ResourceListPage/actions.tsx:125 -#: src/uberComponents/ResourceListPage/actions.tsx:172 +#: src/uberComponents/ResourceListPage/actions.tsx:91 +#: src/uberComponents/ResourceListPage/actions.tsx:126 +#: src/uberComponents/ResourceListPage/actions.tsx:173 msgid "Successfully submitted" msgstr "" @@ -1359,11 +1366,11 @@ msgstr "" msgid "Text with macro" msgstr "" -#: src/containers/App/index.tsx:129 +#: src/containers/App/index.tsx:130 msgid "Thank you for filling out the questionnaire. Now you can close this page." msgstr "" -#: src/containers/App/index.tsx:128 +#: src/containers/App/index.tsx:129 msgid "Thank you!" msgstr "" @@ -1400,7 +1407,7 @@ msgstr "" msgid "Thursday" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:287 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/Scheduling/Availability/index.tsx:129 msgid "Time" msgstr "" diff --git a/src/locale/es/messages.po b/src/locale/es/messages.po index 10cee3c4..b7ea52e9 100644 --- a/src/locale/es/messages.po +++ b/src/locale/es/messages.po @@ -13,7 +13,7 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/uberComponents/ResourceListPage/index.tsx:176 +#: src/uberComponents/ResourceListPage/BatchActions.tsx:57 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" @@ -31,7 +31,7 @@ msgstr "Acción" #: src/containers/PatientList/index.tsx:103 #: src/containers/PractitionerList/index.tsx:121 #: src/containers/Prescriptions/index.tsx:148 -#: src/uberComponents/ResourceListPage/index.tsx:237 +#: src/uberComponents/ResourceListPage/index.tsx:273 msgid "Actions" msgstr "Acciones" @@ -110,7 +110,7 @@ msgstr "Añadir Orden" #: src/components/ModalNewPatient/index.tsx:16 #: src/components/ModalNewPatient/index.tsx:20 -#: src/containers/PatientResourceListExample/index.tsx:76 +#: src/containers/PatientResourceListExample/index.tsx:78 msgid "Add patient" msgstr "Añadir paciente" @@ -207,7 +207,7 @@ msgstr "Número de lote" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 #: src/containers/PatientList/index.tsx:87 -#: src/containers/PatientResourceListExample/index.tsx:47 +#: src/containers/PatientResourceListExample/index.tsx:48 msgid "Birth date" msgstr "Fecha de nacimiento" @@ -258,7 +258,7 @@ msgstr "Ejecución en curso" msgid "Characteristics" msgstr "Características" -#: src/components/SearchBar/index.tsx:30 +#: src/components/SearchBar/index.tsx:36 #: src/components/SearchBar/SearchBarMobile/index.tsx:51 msgid "Clear filters" msgstr "" @@ -383,7 +383,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:95 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:142 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:216 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:283 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:271 #: src/containers/PatientDetails/PatientResources/utils.tsx:96 #: src/containers/PatientDetails/PatientResources/utils.tsx:135 #: src/containers/PatientDetails/PatientResources/utils.tsx:174 @@ -430,7 +430,7 @@ msgstr "Predeterminado" msgid "Delete" msgstr "Eliminar" -#: src/containers/PatientResourceListExample/index.tsx:78 +#: src/containers/PatientResourceListExample/index.tsx:80 msgid "Delete patients" msgstr "" @@ -616,7 +616,7 @@ msgid "Filters" msgstr "" #: src/containers/PatientList/searchBarUtils.ts:10 -#: src/containers/PatientResourceListExample/index.tsx:67 +#: src/containers/PatientResourceListExample/index.tsx:68 msgid "Find patient" msgstr "Buscar paciente" @@ -707,7 +707,7 @@ msgstr "Elección en línea" msgid "Inline options?" msgstr "¿Opciones en línea?" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:317 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:313 msgid "Intent" msgstr "Intención" @@ -818,7 +818,7 @@ msgstr "Lunes" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:123 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:204 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:240 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:312 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:308 #: src/containers/PatientDetails/PatientResources/utils.tsx:50 #: src/containers/PatientDetails/PatientResources/utils.tsx:85 #: src/containers/PatientDetails/PatientResources/utils.tsx:124 @@ -856,7 +856,7 @@ msgstr "No" #: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 #: src/containers/QuestionnaireList/index.tsx:102 -#: src/uberComponents/ResourceListPage/index.tsx:200 +#: src/uberComponents/ResourceListPage/index.tsx:214 msgid "No data" msgstr "Sin datos" @@ -880,6 +880,10 @@ msgstr "Notas" msgid "Number (default)" msgstr "Número (predeterminado)" +#: src/containers/PatientResourceListExample/index.tsx:83 +msgid "Number of Patients" +msgstr "" + #: src/containers/PatientDetails/PatientResources/utils.tsx:230 msgid "Observations" msgstr "Resultados" @@ -924,7 +928,7 @@ msgid "Order added" msgstr "Orden añadida" #: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:22 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:304 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:300 msgid "Orders" msgstr "Resultados" @@ -996,7 +1000,6 @@ msgstr "Widget de teléfono" #: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:32 #: src/containers/InvoiceList/tableUtils.tsx:114 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:152 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/PatientDetails/PatientResources/utils.tsx:221 msgid "Practitioner" msgstr "Profesional" @@ -1078,7 +1081,7 @@ msgstr "Requerido" msgid "Reset" msgstr "Restablecer" -#: src/uberComponents/ResourceListPage/index.tsx:169 +#: src/uberComponents/ResourceListPage/BatchActions.tsx:48 msgid "Reset selection" msgstr "" @@ -1167,6 +1170,10 @@ msgstr "Ver detalles de ValueSet" msgid "Select (default)" msgstr "Seleccionar (predeterminado)" +#: src/uberComponents/ResourceListPage/BatchActions.tsx:69 +msgid "Select all" +msgstr "" + #: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:30 #: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:55 msgid "Select..." @@ -1177,8 +1184,8 @@ msgid "Serum creatinin" msgstr "Creatinina sérica" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:279 -msgid "Service" -msgstr "Servicio" +#~ msgid "Service" +#~ msgstr "Servicio" #: src/containers/PatientDetails/PatientResources/utils.tsx:306 msgid "Service Requests" @@ -1222,7 +1229,7 @@ msgid "Specialty" msgstr "Especialidad" #: src/containers/PatientList/index.tsx:94 -#: src/containers/PatientResourceListExample/index.tsx:54 +#: src/containers/PatientResourceListExample/index.tsx:55 msgid "SSN" msgstr "NSS" @@ -1292,9 +1299,9 @@ msgid "Subject Type" msgstr "Tipo de sujeto" #: src/containers/QuestionnaireBuilder/PromptForm.tsx:104 -#: src/uberComponents/ResourceListPage/actions.tsx:96 -#: src/uberComponents/ResourceListPage/actions.tsx:130 -#: src/uberComponents/ResourceListPage/actions.tsx:176 +#: src/uberComponents/ResourceListPage/actions.tsx:97 +#: src/uberComponents/ResourceListPage/actions.tsx:131 +#: src/uberComponents/ResourceListPage/actions.tsx:177 msgid "Submit" msgstr "Enviar" @@ -1304,9 +1311,9 @@ msgstr "Enviar" #~ msgid "Successfully saved" #~ msgstr "" -#: src/uberComponents/ResourceListPage/actions.tsx:90 -#: src/uberComponents/ResourceListPage/actions.tsx:125 -#: src/uberComponents/ResourceListPage/actions.tsx:172 +#: src/uberComponents/ResourceListPage/actions.tsx:91 +#: src/uberComponents/ResourceListPage/actions.tsx:126 +#: src/uberComponents/ResourceListPage/actions.tsx:173 msgid "Successfully submitted" msgstr "" @@ -1339,11 +1346,11 @@ msgstr "Texto (por defecto)" msgid "Text with macro" msgstr "Texto con macro" -#: src/containers/App/index.tsx:129 +#: src/containers/App/index.tsx:130 msgid "Thank you for filling out the questionnaire. Now you can close this page." msgstr "Gracias por completar el cuestionario. Ahora puedes cerrar esta página." -#: src/containers/App/index.tsx:128 +#: src/containers/App/index.tsx:129 msgid "Thank you!" msgstr "¡Gracias!" @@ -1380,7 +1387,7 @@ msgstr "" msgid "Thursday" msgstr "Jueves" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:287 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/Scheduling/Availability/index.tsx:129 msgid "Time" msgstr "Hora" diff --git a/src/locale/ru/messages.po b/src/locale/ru/messages.po index cf3c3d0e..cbbc5d0f 100644 --- a/src/locale/ru/messages.po +++ b/src/locale/ru/messages.po @@ -13,7 +13,7 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: src/uberComponents/ResourceListPage/index.tsx:176 +#: src/uberComponents/ResourceListPage/BatchActions.tsx:57 msgid "{0, plural, one {Selected # item} other {Selected # items}}" msgstr "" @@ -31,7 +31,7 @@ msgstr "" #: src/containers/PatientList/index.tsx:103 #: src/containers/PractitionerList/index.tsx:121 #: src/containers/Prescriptions/index.tsx:148 -#: src/uberComponents/ResourceListPage/index.tsx:237 +#: src/uberComponents/ResourceListPage/index.tsx:273 msgid "Actions" msgstr "Действия" @@ -110,7 +110,7 @@ msgstr "" #: src/components/ModalNewPatient/index.tsx:16 #: src/components/ModalNewPatient/index.tsx:20 -#: src/containers/PatientResourceListExample/index.tsx:76 +#: src/containers/PatientResourceListExample/index.tsx:78 msgid "Add patient" msgstr "Добавить пациенда" @@ -207,7 +207,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/containers/GeneralIInformationDashboardContainer/hooks.ts:31 #: src/containers/PatientList/index.tsx:87 -#: src/containers/PatientResourceListExample/index.tsx:47 +#: src/containers/PatientResourceListExample/index.tsx:48 msgid "Birth date" msgstr "Дата рождения" @@ -258,7 +258,7 @@ msgstr "" msgid "Characteristics" msgstr "" -#: src/components/SearchBar/index.tsx:30 +#: src/components/SearchBar/index.tsx:36 #: src/components/SearchBar/SearchBarMobile/index.tsx:51 msgid "Clear filters" msgstr "" @@ -383,7 +383,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:95 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:142 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:216 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:283 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:271 #: src/containers/PatientDetails/PatientResources/utils.tsx:96 #: src/containers/PatientDetails/PatientResources/utils.tsx:135 #: src/containers/PatientDetails/PatientResources/utils.tsx:174 @@ -430,7 +430,7 @@ msgstr "" msgid "Delete" msgstr "" -#: src/containers/PatientResourceListExample/index.tsx:78 +#: src/containers/PatientResourceListExample/index.tsx:80 msgid "Delete patients" msgstr "" @@ -620,7 +620,7 @@ msgid "Filters" msgstr "" #: src/containers/PatientList/searchBarUtils.ts:10 -#: src/containers/PatientResourceListExample/index.tsx:67 +#: src/containers/PatientResourceListExample/index.tsx:68 msgid "Find patient" msgstr "Найти пациента" @@ -711,7 +711,7 @@ msgstr "" msgid "Inline options?" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:317 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:313 msgid "Intent" msgstr "" @@ -826,7 +826,7 @@ msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:123 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:204 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:240 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:312 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:308 #: src/containers/PatientDetails/PatientResources/utils.tsx:50 #: src/containers/PatientDetails/PatientResources/utils.tsx:85 #: src/containers/PatientDetails/PatientResources/utils.tsx:124 @@ -864,7 +864,7 @@ msgstr "" #: src/containers/PractitionerList/index.tsx:101 #: src/containers/QuestionnaireBuilder/QuestionnaireItemSettings/controls.tsx:500 #: src/containers/QuestionnaireList/index.tsx:102 -#: src/uberComponents/ResourceListPage/index.tsx:200 +#: src/uberComponents/ResourceListPage/index.tsx:214 msgid "No data" msgstr "Нет данных" @@ -888,6 +888,10 @@ msgstr "" msgid "Number (default)" msgstr "" +#: src/containers/PatientResourceListExample/index.tsx:83 +msgid "Number of Patients" +msgstr "" + #: src/containers/PatientDetails/PatientResources/utils.tsx:230 msgid "Observations" msgstr "" @@ -936,7 +940,7 @@ msgid "Order added" msgstr "" #: src/containers/PatientDetails/PatientDetailsTabs/index.tsx:22 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:304 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:300 msgid "Orders" msgstr "" @@ -1008,7 +1012,6 @@ msgstr "" #: src/containers/InvoiceList/components/InvoiceListSearchBar/index.tsx:32 #: src/containers/InvoiceList/tableUtils.tsx:114 #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:152 -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/PatientDetails/PatientResources/utils.tsx:221 msgid "Practitioner" msgstr "Врач" @@ -1094,7 +1097,7 @@ msgstr "Сбросить" #~ msgid "Reset password" #~ msgstr "Сбросить пароль" -#: src/uberComponents/ResourceListPage/index.tsx:169 +#: src/uberComponents/ResourceListPage/BatchActions.tsx:48 msgid "Reset selection" msgstr "" @@ -1187,6 +1190,10 @@ msgstr "" msgid "Select (default)" msgstr "" +#: src/uberComponents/ResourceListPage/BatchActions.tsx:69 +msgid "Select all" +msgstr "" + #: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:30 #: src/components/BaseQuestionnaireResponseForm/widgets/choice/index.tsx:55 msgid "Select..." @@ -1197,8 +1204,8 @@ msgid "Serum creatinin" msgstr "" #: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:279 -msgid "Service" -msgstr "" +#~ msgid "Service" +#~ msgstr "" #: src/containers/PatientDetails/PatientResources/utils.tsx:306 msgid "Service Requests" @@ -1242,7 +1249,7 @@ msgid "Specialty" msgstr "" #: src/containers/PatientList/index.tsx:94 -#: src/containers/PatientResourceListExample/index.tsx:54 +#: src/containers/PatientResourceListExample/index.tsx:55 msgid "SSN" msgstr "СНИЛС" @@ -1312,9 +1319,9 @@ msgid "Subject Type" msgstr "" #: src/containers/QuestionnaireBuilder/PromptForm.tsx:104 -#: src/uberComponents/ResourceListPage/actions.tsx:96 -#: src/uberComponents/ResourceListPage/actions.tsx:130 -#: src/uberComponents/ResourceListPage/actions.tsx:176 +#: src/uberComponents/ResourceListPage/actions.tsx:97 +#: src/uberComponents/ResourceListPage/actions.tsx:131 +#: src/uberComponents/ResourceListPage/actions.tsx:177 msgid "Submit" msgstr "" @@ -1324,9 +1331,9 @@ msgstr "" #~ msgid "Successfully saved" #~ msgstr "" -#: src/uberComponents/ResourceListPage/actions.tsx:90 -#: src/uberComponents/ResourceListPage/actions.tsx:125 -#: src/uberComponents/ResourceListPage/actions.tsx:172 +#: src/uberComponents/ResourceListPage/actions.tsx:91 +#: src/uberComponents/ResourceListPage/actions.tsx:126 +#: src/uberComponents/ResourceListPage/actions.tsx:173 msgid "Successfully submitted" msgstr "" @@ -1359,11 +1366,11 @@ msgstr "" msgid "Text with macro" msgstr "" -#: src/containers/App/index.tsx:129 +#: src/containers/App/index.tsx:130 msgid "Thank you for filling out the questionnaire. Now you can close this page." msgstr "" -#: src/containers/App/index.tsx:128 +#: src/containers/App/index.tsx:129 msgid "Thank you!" msgstr "" @@ -1400,7 +1407,7 @@ msgstr "" msgid "Thursday" msgstr "" -#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:287 +#: src/containers/PatientDetails/PatientOverviewDynamic/components/StandardCard/prepare.tsx:275 #: src/containers/Scheduling/Availability/index.tsx:129 msgid "Time" msgstr "" diff --git a/src/theme/utils.ts b/src/theme/utils.ts new file mode 100644 index 00000000..a4d775ca --- /dev/null +++ b/src/theme/utils.ts @@ -0,0 +1 @@ +export const mobileWidth = 768; diff --git a/src/uberComponents/ResourceListPage/BatchActions.tsx b/src/uberComponents/ResourceListPage/BatchActions.tsx index bd6d1b79..f4dc4359 100644 --- a/src/uberComponents/ResourceListPage/BatchActions.tsx +++ b/src/uberComponents/ResourceListPage/BatchActions.tsx @@ -1,5 +1,5 @@ import { plural, Trans } from '@lingui/macro'; -import { Button } from 'antd'; +import { Button, Checkbox } from 'antd'; import { Bundle, ParametersParameter, Resource } from 'fhir/r4b'; import { Text } from 'src/components/Typography'; @@ -11,6 +11,7 @@ export { navigationAction, customAction, questionnaireAction } from './actions'; interface BatchActionsProps<R extends Resource> { batchActions: QuestionnaireActionType[]; selectedRowKeys: React.Key[]; + allKeys: React.Key[]; setSelectedRowKeys: (keys: React.Key[]) => void; reload: () => void; selectedResourcesBundle: Bundle<R>; @@ -18,8 +19,15 @@ interface BatchActionsProps<R extends Resource> { } export function BatchActions<R extends Resource>(props: BatchActionsProps<R>) { - const { batchActions, selectedRowKeys, setSelectedRowKeys, reload, selectedResourcesBundle, defaultLaunchContext } = - props; + const { + batchActions, + selectedRowKeys, + setSelectedRowKeys, + reload, + selectedResourcesBundle, + defaultLaunchContext, + allKeys, + } = props; return ( <S.BatchActionsContainer> @@ -34,22 +42,48 @@ export function BatchActions<R extends Resource>(props: BatchActionsProps<R>) { defaultLaunchContext={defaultLaunchContext ?? []} /> ))} + {selectedRowKeys.length ? ( + <S.ResetSelection> + <Button type="default" onClick={() => setSelectedRowKeys([])}> + <Trans>Reset selection</Trans> + </Button> + </S.ResetSelection> + ) : null} </S.BatchActions> - {selectedRowKeys.length ? ( - <Button type="default" onClick={() => setSelectedRowKeys([])}> - <Trans>Reset selection</Trans> - </Button> - ) : null} - {selectedRowKeys.length ? ( - <Text> - {selectedRowKeys.length - ? plural(selectedRowKeys.length, { - one: 'Selected # item', - other: 'Selected # items', - }) - : null} - </Text> - ) : null} + <S.SelectAll> + {selectedRowKeys.length ? ( + <Text> + {selectedRowKeys.length + ? plural(selectedRowKeys.length, { + one: 'Selected # item', + other: 'Selected # items', + }) + : null} + </Text> + ) : ( + <div /> + )} + <S.CheckboxAll> + <S.Label> + <Text> + <Trans>Select all</Trans> + </Text> + <Checkbox + checked={selectedRowKeys.length > 0 && selectedRowKeys.length === allKeys.length} + indeterminate={selectedRowKeys.length > 0 && selectedRowKeys.length !== allKeys.length} + onChange={(e) => { + const checked = e.target.checked; + + if (checked) { + setSelectedRowKeys(allKeys); + } else { + setSelectedRowKeys([]); + } + }} + ></Checkbox> + </S.Label> + </S.CheckboxAll> + </S.SelectAll> </S.BatchActionsContainer> ); } diff --git a/src/uberComponents/ResourceListPage/index.tsx b/src/uberComponents/ResourceListPage/index.tsx index 5840067f..faabfd13 100644 --- a/src/uberComponents/ResourceListPage/index.tsx +++ b/src/uberComponents/ResourceListPage/index.tsx @@ -189,6 +189,7 @@ export function ResourceListPage<R extends Resource>({ <BatchActions batchActions={batchActions} selectedRowKeys={selectedRowKeys} + allKeys={isSuccess(recordResponse) ? recordResponse.data.map((d) => d.resource.id!) : []} setSelectedRowKeys={setSelectedRowKeys} reload={reload} selectedResourcesBundle={selectedResourcesBundle} diff --git a/src/uberComponents/ResourceListPage/styles.ts b/src/uberComponents/ResourceListPage/styles.ts index 85afbce5..95d76394 100644 --- a/src/uberComponents/ResourceListPage/styles.ts +++ b/src/uberComponents/ResourceListPage/styles.ts @@ -1,24 +1,77 @@ import styled from 'styled-components'; import { Button } from 'antd'; +import { mobileWidth } from 'src/theme/utils'; export const S = { Actions: styled.div` display: flex; gap: 8px 16px; + + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + gap: 2px 16px; + flex-wrap: wrap; + } `, LinkButton: styled(Button)` padding: 0; `, BatchActionsContainer: styled.div` display: flex; + flex-direction: row; gap: 10px 16px; align-items: center; flex-wrap: wrap; + + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + flex-direction: column; + align-items: stretch; + } `, BatchActions: styled.div` display: flex; gap: 10px 8px; flex-wrap: wrap; + + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + gap: 10px 16px; + + & > * { + width: calc(50% - 8px); + } + } + `, + ResetSelection: styled.div` + margin-left: 8px; + + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + margin-left: 0; + + & > * { + width: 100%; + } + } + `, + SelectAll: styled.div` + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 32px; + padding: 0 16px; + } + `, + CheckboxAll: styled.div` + display: none; + + @media screen and (max-width: ${() => `${mobileWidth - 1}px`}) { + display: block; + } + `, + Label: styled.div` + display: flex; + gap: 0 8px; + align-items: center; `, }; From 2acc20f25ad7208145562d559ab86d37922d761b Mon Sep 17 00:00:00 2001 From: Elena Grednikova <vesnushkalena@gmail.com> Date: Fri, 20 Dec 2024 20:49:43 +0100 Subject: [PATCH 22/22] Add clear button for single date search bar control --- .../SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts | 2 ++ .../SearchBar/SearchBarColumn/DateSingleColumn/index.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts index 1a181d74..ced889fa 100644 --- a/src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts +++ b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/hooks.ts @@ -10,6 +10,8 @@ export function useDateColumn(props: SearchBarColumnSingleDateTypeProps) { (value: moment.Moment | null) => { if (value) { onChange(value, columnFilterValue.column.id); + } else { + onChange(undefined, columnFilterValue.column.id); } }, [onChange, columnFilterValue], diff --git a/src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx index 18a86cf4..5572fd54 100644 --- a/src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/DateSingleColumn/index.tsx @@ -14,8 +14,8 @@ export function DateSingleColumn(props: SearchBarColumnSingleDateTypeProps) { onChange={onColumnChange} value={columnFilterValue.value} placeholder={placeholder} - clearIcon={false} defaultOpen={defaultOpen} + allowClear /> ); }