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
16 changes: 1 addition & 15 deletions app/components/datasources/DataConnectionsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ export const DataConnectionsModal = (props) => {
? t('Invite patients to authorize syncing from these accounts. Only available in the US at this time.')
: t('When you connect an account, data can flow into Tidepool without any extra effort. Only available in the US at this time.');

const learnMoreText = selectedClinicId
? t('Learn more.')
: t('Learn more here.');

return (
<>
<Dialog
Expand All @@ -147,7 +143,7 @@ export const DataConnectionsModal = (props) => {
onClose={onClose}
>
<DialogTitle onBack={onBack} onClose={onClose}>
<MediumTitle id="data-connections-title">{t('Bring Data into Tidepool')}</MediumTitle>
<MediumTitle id="data-connections-title">{t('Manage Device Connections')}</MediumTitle>
</DialogTitle>

<DialogContent>
Expand All @@ -159,16 +155,6 @@ export const DataConnectionsModal = (props) => {
<Box mb={3}>
<Body1 sx={{ fontWeight: 'medium'}}>
{dataSourcesText}&nbsp;
<Link
id="data-connections-restrictions-link"
href={URL_TIDEPOOL_EXTERNAL_DATA_CONNECTIONS}
target="_blank"
rel="noreferrer noopener"
sx={{
fontSize: 1,
fontWeight: 'medium',
}}
>{learnMoreText}</Link>
</Body1>

{patientData?.email && patient?.permissions?.custodian && (
Expand Down
2 changes: 1 addition & 1 deletion app/components/elements/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function Button(props) {
};

let justifyContent = 'center';
if (icon) justifyContent = isLeftIcon ? 'flex-end' : 'flex-start';
if (icon || iconSrc) justifyContent = isLeftIcon ? 'flex-end' : 'flex-start';
Comment thread
clintonium-119 marked this conversation as resolved.

return (
<Flex
Expand Down
4 changes: 2 additions & 2 deletions app/pages/clinicworkspace/ClinicPatients.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,15 +424,15 @@ const MoreMenu = ({
text: t('Edit Patient Details'),
}, {
iconSrc: DataInIcon,
iconLabel: t('Bring Data into Tidepool'),
iconLabel: t('Manage Device Connections'),
iconPosition: 'left',
id: `edit-data-connections-${patient.id}`,
variant: 'actionListItem',
onClick: (_popupState) => {
_popupState.close();
handleEditPatientDataConnections(patient);
},
text: t('Bring Data into Tidepool'),
text: t('Manage Device Connections'),
});

arr.push({
Expand Down
4 changes: 2 additions & 2 deletions app/pages/dashboard/TideDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@ const MoreMenu = React.memo(({
text: t('Edit Patient Details'),
}, {
iconSrc: DataInIcon,
iconLabel: t('Bring Data into Tidepool'),
iconLabel: t('Manage Device Connections'),
iconPosition: 'left',
id: `edit-data-connections-${patient.id}`,
variant: 'actionListItem',
onClick: (_popupState) => {
_popupState.close();
handleEditPatientDataConnections(patient);
},
text: t('Bring Data into Tidepool'),
text: t('Manage Device Connections'),
}]), [
handleEditPatient,
patient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('DataConnectionsModal', () => {
// Dialog portals into document.body
const title = document.getElementById('data-connections-title');
expect(title).to.not.be.null;
expect(title.textContent).to.equal('Bring Data into Tidepool');
expect(title.textContent).to.equal('Manage Device Connections');
});

it('should render patient details', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/pages/TideDashboard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,9 +665,9 @@ describe('TideDashboard', () => {
// Open menu again
fireEvent.click(moreMenuIcon);

await screen.findAllByText('Bring Data into Tidepool'); // wait for DOM to settle
await screen.findAllByText('Manage Device Connections'); // wait for DOM to settle
const dataConnectionsButton = Array.from(document.querySelectorAll('.action-list-item'))
.find(el => el.textContent.includes('Bring Data into Tidepool'));
.find(el => el.textContent.includes('Manage Device Connections'));
expect(dataConnectionsButton).to.not.be.null;

expect(document.querySelector('#data-connections')).to.be.null;
Expand Down