Skip to content

Commit

Permalink
Merge branch 'main' into chore/update-transifex
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Jun 26, 2024
2 parents 98785bd + 88d18b7 commit 149a6b5
Show file tree
Hide file tree
Showing 29 changed files with 62 additions and 69 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ dist
!.yarn/versions
~

# Yalc, used as a `yarn link` alternative
.yalc
yalc.lock

# i18next using moduleName as a namespace
moduleName/

Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"git-blame.gitWebUrl": "",
"angular.enable-strict-mode-prompt": false
"angular.enable-strict-mode-prompt": false,
"typescript.tsdk": "node_modules/typescript/lib"
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

/* Desktop */
:host-context(.omrs-breakpoint-gt-tablet) .form-container {
height: calc(100vh - 6rem);
height: 100%;
margin: 0 2rem;
}

Expand All @@ -137,7 +137,7 @@

/* Tablet */
:host-context(.omrs-breakpoint-lt-desktop) .form-container {
height: calc(100vh - 6rem);
height: 100%;
margin: 0 2rem;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
/* Desktop */
:global(.omrs-breakpoint-gt-tablet) {
.form {
height: calc(100vh - 6rem);
height: 100%;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 6rem);
height: 100%;
}

.button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import classNames from 'classnames';
import {
ActionMenu,
ExtensionSlot,
WorkspaceContainer,
WorkspaceWindow,
setCurrentVisit,
setLeftNav,
Expand Down Expand Up @@ -77,8 +78,7 @@ const PatientChart: React.FC = () => {
</div>
</>
</main>
<WorkspaceWindow contextKey={`patient/${patientUuid}`} />
<ActionMenu />
<WorkspaceContainer showSiderailAndBottomNav contextKey={`patient/${patientUuid}`} />
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,23 @@ $actionPanelExpandedOffset: $actionNavOffset+$actionPanelOffset;
margin-left: var(--omrs-sidenav-width);
}

:global(.omrs-breakpoint-lt-desktop) .innerChartContainer {
padding-right: 0;
}

:global(.action-menu-expanded) .innerChartContainer {
padding-right: $actionPanelExpandedOffset;
}

.innerChartContainer {
display: flex;
width: 100%;
padding-right: $actionNavOffset;
flex-direction: column;
}

.closeWorkspace {
padding-right: 0;
}

.activeWorkspace {
padding-right: $actionNavOffset;
}

// Overriding styles for RTL support
html[dir='rtl'] {
.chartContainer {
padding-right: unset;
padding-left: spacing.$spacing-01;
.activeWorkspace {
padding-right: unset;
padding-left: $actionNavOffset;
}
}

:global(.omrs-breakpoint-gt-small-desktop) .chartContainer {
Expand Down
10 changes: 5 additions & 5 deletions packages/esm-patient-chart-app/src/root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ html[dir='rtl'] {
}
}
:global(.cds--side-nav) {
right: 0;
:global(.active-left-nav-link) {
border-right: 0.25rem solid var(--brand-01);
border-left: unset;
}
right: 0;
:global(.active-left-nav-link) {
border-right: 0.25rem solid var(--brand-01);
border-left: unset;
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 6rem);
height: 100%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ import classNames from 'classnames';
import { useLayoutType, ResponsiveWrapper } from '@openmrs/esm-framework';
import { useTranslation } from 'react-i18next';
import { type amPm } from '@openmrs/esm-patient-common-lib';
import dayjs from 'dayjs';

interface VisitDateTimeFieldProps {
visitDatetimeLabel: string;
dateFieldName: 'visitStartDate' | 'visitStopDate';
timeFieldName: 'visitStartTime' | 'visitStopTime';
timeFormatFieldName: 'visitStartTimeFormat' | 'visitStopTimeFormat';
/** minDate: Milliseconds since Jan 1 1970. */
minDate?: number;
/** maxDate: Milliseconds since Jan 1 1970. */
maxDate?: number;
}

Expand All @@ -26,7 +29,6 @@ const VisitDateTimeField: React.FC<VisitDateTimeFieldProps> = ({
maxDate,
}) => {
const { t } = useTranslation();
const isTablet = useLayoutType() === 'tablet';
const {
control,
formState: { errors },
Expand All @@ -35,8 +37,8 @@ const VisitDateTimeField: React.FC<VisitDateTimeFieldProps> = ({
// Since we have the separate date and time fields, the final validation needs to be done at the form
// submission, hence just using the min date with hours/ minutes/ seconds set to 0 and max date set to
// last second of the day. We want to just compare dates and not time.
minDate = minDate ? new Date(minDate).setHours(0, 0, 0, 0) : null;
maxDate = maxDate ? new Date(maxDate).setHours(23, 59, 59, 59) : null;
const minDateObj = minDate ? dayjs(new Date(minDate).setHours(0, 0, 0, 0)).format('DD/MM/YYYY') : null;
const maxDateObj = maxDate ? dayjs(new Date(maxDate).setHours(23, 59, 59, 59)).format('DD/MM/YYYY') : null;

return (
<section>
Expand All @@ -52,8 +54,8 @@ const VisitDateTimeField: React.FC<VisitDateTimeFieldProps> = ({
datePickerType="single"
id={dateFieldName}
style={{ paddingBottom: '1rem' }}
minDate={minDate}
maxDate={maxDate}
minDate={minDateObj}
maxDate={maxDateObj}
onChange={([date]) => onChange(date)}
value={value}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
display: flex;
flex-direction: column;
justify-content: start;
height: var(--desktop-workspace-window-height);
height: 100%;
}

.buttonSet {
Expand Down Expand Up @@ -110,7 +110,7 @@
}

.form {
height: var(--tablet-workspace-window-height);
height: 100%;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 6rem);
height: 100%;
}

.formContainer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
.container {
height: var(--desktop-workspace-window-height);
}

/* Tablet */
:global(.omrs-breakpoint-lt-desktop) {
.container {
height: var(--tablet-workspace-window-height);
}
height: 100%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 6rem);
height: 100%;
}

.button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.container {
position: relative;
min-height: var(--desktop-workspace-window-height);
height: 100%;
background-color: white;
display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { useReactToPrint } from 'react-to-print';
import {
age,
displayName,
getPatientName,
formatDate,
useConfig,
useLayoutType,
Expand Down Expand Up @@ -86,7 +86,7 @@ function PrintModal({ patientUuid, closeDialog }) {
) ?? [];

return {
name: patient?.patient ? displayName(patient?.patient) : '',
name: patient?.patient ? getPatientName(patient?.patient) : '',
age: age(patient?.patient?.birthDate),
gender: getGender(patient?.patient?.gender),
location: patient?.patient?.address?.[0].city,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

.container {
background-color: colors.$white-0;
height: calc(100vh - 6rem);
height: 100%;
}

.backButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@use '@carbon/type';

.container {
height: calc(100vh - 6rem);
height: 100%;
background-color: colors.$white-0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@use '@carbon/type';

.container {
height: var(--desktop-workspace-window-height);
height: 100%;
display: flex;
flex-direction: column;
}
Expand Down Expand Up @@ -211,7 +211,7 @@
/* Tablet */
:global(.omrs-breakpoint-lt-desktop) {
.container {
height: var(--tablet-workspace-window-height);
height: 100%;
}

.orderForm {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.searchPopupContainer {
position: relative;
min-height: var(--desktop-workspace-window-height);
height: 100%;
background-color: white;
}

Expand All @@ -20,6 +20,6 @@

:global(.omrs-breakpoint-lt-desktop) {
.searchPopupContainer {
min-height: var(--tablet-workspace-window-height);
height: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
useLaunchWorkspaceRequiringVisit,
} from '@openmrs/esm-patient-common-lib';
import { Add, User, Printer } from '@carbon/react/icons';
import { age, displayName, formatDate, useConfig, useLayoutType, usePatient } from '@openmrs/esm-framework';
import { age, getPatientName, formatDate, useConfig, useLayoutType, usePatient } from '@openmrs/esm-framework';
import { useTranslation } from 'react-i18next';
import { type AddDrugOrderWorkspaceAdditionalProps } from '../add-drug-order/add-drug-order.workspace';
import { type DrugOrderBasketItem } from '../types';
Expand Down Expand Up @@ -178,7 +178,7 @@ const MedicationsDetailsTable: React.FC<ActiveMedicationsProps> = ({
) ?? [];

return {
name: patient?.patient ? displayName(patient?.patient) : '',
name: patient?.patient ? getPatientName(patient?.patient) : '',
age: age(patient?.patient?.birthDate),
gender: getGender(patient?.patient?.gender),
location: patient?.patient?.address?.[0].city,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
height: var(--desktop-workspace-window-height);
height: 100%;
}

.grid {
Expand Down Expand Up @@ -175,7 +175,7 @@

:global(.omrs-breakpoint-lt-desktop) {
.form {
height: var(--tablet-workspace-window-height);
height: 100%;
}

.row {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
import { Add, Printer } from '@carbon/react/icons';
import {
age,
displayName,
getPatientName,
formatDate,
useConfig,
useLayoutType,
Expand Down Expand Up @@ -235,7 +235,7 @@ const OrderDetailsTable: React.FC<OrderDetailsProps> = ({ title, patientUuid, sh
) ?? [];

return {
name: patient?.patient ? displayName(patient?.patient) : '',
name: patient?.patient ? getPatientName(patient?.patient) : '',
age: age(patient?.patient?.birthDate),
gender: getGender(patient?.patient?.gender),
location: patient?.patient?.address?.[0].city,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

.loader {
height: calc(100vh - 6rem);
height: 100%;
justify-content: center;
align-items: center;
}
Expand Down Expand Up @@ -64,7 +64,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 6rem);
height: 100%;
}

:global(.omrs-breakpoint-lt-desktop) .form {
Expand Down
Loading

0 comments on commit 149a6b5

Please sign in to comment.