Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions src/components/action-buttons.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
@use '@carbon/layout';

.actionBtns {
position: absolute;
bottom: 0;
right: 0;
position: relative;
display: flex;
gap: 0;
justify-content: flex-end;
margin-top: layout.$spacing-04;
padding: layout.$spacing-03 layout.$spacing-04;

@media (max-width: 1024px) and (min-width: 768px) {
position: relative;
width: 100%;
justify-content: center;
gap: layout.$spacing-03;
margin-top: layout.$spacing-04;
padding: 0 layout.$spacing-04;
}
}

.extensionSlot {
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
height: 100%;
flex-direction: row;
justify-content: flex-end;
gap: layout.$spacing-03;
position: relative;

@media (max-width: 1024px) and (min-width: 768px) {
flex-direction: row;
justify-content: center;
height: auto;
position: static;
flex-wrap: wrap;
gap: layout.$spacing-03;

:global(.cds--btn) {
flex: 1 1 auto;
min-width: 8rem;
max-width: 12rem;
white-space: normal;
word-wrap: break-word;
padding: layout.$spacing-03 layout.$spacing-04;
line-height: 1.2;
height: auto;
min-height: 3rem;
}
}
}
10 changes: 5 additions & 5 deletions src/prescriptions/prescription-details.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ const PrescriptionDetails: React.FC<{
medicationRequestBundles.map((bundle) => {
return (
<Tile className={styles.prescriptionTile}>
<MedicationEvent
key={bundle.request.id}
medicationEvent={bundle.request}
status={generateStatusTag(bundle.request)}
/>
<UserHasAccess privilege={PRIVILEGE_CREATE_DISPENSE}>
<ActionButtons
patientUuid={patientUuid}
encounterUuid={encounterUuid}
medicationRequestBundle={bundle}
/>
</UserHasAccess>
<MedicationEvent
key={bundle.request.id}
medicationEvent={bundle.request}
status={generateStatusTag(bundle.request)}
/>
</Tile>
);
})}
Expand Down
9 changes: 9 additions & 0 deletions src/prescriptions/prescription-details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
border-left: layout.$spacing-02 solid var(--brand-03);
color: $text-02;
margin-bottom: layout.$spacing-05 !important;
position: relative;

@media (max-width: 1024px) and (min-width: 768px) {
padding-bottom: layout.$spacing-09;
}
}

.prescriptionContainer {
Expand All @@ -18,6 +23,10 @@
max-width: 80%;
margin-bottom: layout.$spacing-05;

@media (max-width: 1024px) and (min-width: 768px) {
max-width: 100%;
}

&:global(.cds--tile) {
min-height: 3rem !important;
padding-left: 10px !important;
Expand Down
39 changes: 39 additions & 0 deletions src/prescriptions/prescription-expanded.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,28 @@
display: flex;
flex-direction: row;

@media (max-width: 1024px) and (min-width: 768px) {
flex-direction: column;
}

:global(.cds--tabs) {
margin: layout.$spacing-05 0;
width: 20%;
max-height: 8rem !important;

@media (max-width: 1024px) and (min-width: 768px) {
width: 100% !important;
max-height: none !important;
}
}

:global(.cds--tab--list) {
flex-direction: column !important;

@media (max-width: 1024px) and (min-width: 768px) {
flex-direction: row !important;
flex-wrap: wrap !important;
}
}

:global(.cds--tab-content) {
Expand Down Expand Up @@ -46,9 +60,34 @@

> ul > li button {
width: 12rem !important;
white-space: normal !important;
word-wrap: break-word !important;
text-overflow: unset !important;

@media (max-width: 1024px) and (min-width: 768px) {
width: 100% !important;
min-width: 10rem !important;
max-width: 16rem !important;
padding: layout.$spacing-03 layout.$spacing-04 !important;
line-height: 1.2 !important;
height: auto !important;
min-height: 3rem !important;
}
}

:global(.cds--tabs__nav-link) {
max-width: 12rem !important;
white-space: normal !important;
word-wrap: break-word !important;
overflow: visible !important;

@media (max-width: 1024px) and (min-width: 768px) {
max-width: 16rem !important;
width: 100% !important;
padding: layout.$spacing-03 layout.$spacing-04 !important;
line-height: 1.2 !important;
height: auto !important;
min-height: 3rem !important;
}
}
}
12 changes: 12 additions & 0 deletions src/prescriptions/prescriptions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@

:global(.cds--tab--list) button {
max-width: 12rem !important;
white-space: normal !important;
word-wrap: break-word !important;

@media (max-width: 1024px) and (min-width: 768px) {
max-width: none !important;
flex: 1 1 auto !important;
min-width: 8rem !important;
padding: layout.$spacing-03 layout.$spacing-04 !important;
line-height: 1.2 !important;
height: auto !important;
min-height: 3rem !important;
}
}
}

Expand Down