setSelectMode(false)}
- icon={ }
+ icon={ }
/>
setSelectMode(true)}
- icon={ }
+ icon={ }
/>
diff --git a/src/app-pages/explorer/panel.js b/src/app-pages/explorer/panel.jsx
similarity index 100%
rename from src/app-pages/explorer/panel.js
rename to src/app-pages/explorer/panel.jsx
diff --git a/src/app-pages/help/help.js b/src/app-pages/help/help.jsx
similarity index 100%
rename from src/app-pages/help/help.js
rename to src/app-pages/help/help.jsx
diff --git a/src/app-pages/help/onboarding.js b/src/app-pages/help/onboarding.jsx
similarity index 95%
rename from src/app-pages/help/onboarding.js
rename to src/app-pages/help/onboarding.jsx
index 5f60a460..085f1e1a 100644
--- a/src/app-pages/help/onboarding.js
+++ b/src/app-pages/help/onboarding.jsx
@@ -87,7 +87,7 @@ const csvSampleInclinometerMeasurements = [
const DownloadCSVButton = ({ csvContent, filename }) => {
// Used as a reference:
// https://code-maven.com/create-and-download-csv-with-javascript
- const handleClick = (e) => {
+ const handleClick = () => {
var csv = '';
csvContent.forEach((row) => {
csv += `${row.join(',')}\n`;
@@ -118,7 +118,7 @@ export default connect(
'selectDomainsItemsByGroup',
({ domainsItemsByGroup }) => {
// NotesXYZ are additional information to be included with each tab
- const NotesInstruments = ({ props }) => (
+ const NotesInstruments = () => (
Optional Fields:
@@ -139,8 +139,8 @@ export default connect(
);
- const NotesProjects = ({ props }) => <>>;
- const NotesTimeseries = ({ props }) => (
+ const NotesProjects = () => <>>;
+ const NotesTimeseries = () => (
Parameter can be one of the following:
@@ -156,8 +156,8 @@ export default connect(
);
- const NotesTimeseriesMeasurements = ({ props }) => <>>;
- const NotesInclinometerMeasurements = ({ props }) => <>>;
+ const NotesTimeseriesMeasurements = () => <>>;
+ const NotesInclinometerMeasurements = () => <>>;
const CSV = ({ arr }) => (
diff --git a/src/app-pages/home/home.js b/src/app-pages/home/home.jsx
similarity index 93%
rename from src/app-pages/home/home.js
rename to src/app-pages/home/home.jsx
index 254a3933..356240b2 100644
--- a/src/app-pages/home/home.js
+++ b/src/app-pages/home/home.jsx
@@ -7,8 +7,7 @@ import ProjectList from './project-list';
export default connect(
'selectHomeData',
- 'doNotificationFire',
- ({ homeData, doNotificationFire }) => (
+ ({ homeData }) => (
diff --git a/src/app-pages/home/project-card.js b/src/app-pages/home/project-card.jsx
similarity index 100%
rename from src/app-pages/home/project-card.js
rename to src/app-pages/home/project-card.jsx
diff --git a/src/app-pages/home/project-list.js b/src/app-pages/home/project-list.jsx
similarity index 92%
rename from src/app-pages/home/project-list.js
rename to src/app-pages/home/project-list.jsx
index a2c012b7..6e68ea57 100644
--- a/src/app-pages/home/project-list.js
+++ b/src/app-pages/home/project-list.jsx
@@ -1,9 +1,15 @@
import React, { useState, useRef } from 'react';
import { connect } from 'redux-bundler-react';
import Select from 'react-select';
+import {
+ Filter,
+ KeyboardArrowUp,
+ KeyboardArrowDown,
+ StarOutline,
+ Toc,
+} from '@mui/icons-material';
import Button from '../../app-components/button';
-import Icon from '../../app-components/icon';
import ProjectCard from './project-card';
import Table from '../../app-components/table';
import { filters } from './homeFilters';
@@ -48,8 +54,8 @@ const FilterItem = ({ item, filter, setFilter, active }) => {
>
{item.children && !!item.children.length && (
-
setExpanded(!expanded)} >
-
+ setExpanded(!expanded)} className='pr-2'>
+ {expanded ? : }
)}{' '}
{item.abbr}
@@ -95,7 +101,7 @@ export default connect(
? projects.filter(p => p.instrumentCount).map(p => ({ value: p.title, label: p.title }))
: {};
- const isProdReady = process.env.REACT_APP_DISTRICT_SELECTOR;
+ const isProdReady = import.meta.env.VITE_DISTRICT_SELECTOR;
return (
@@ -116,7 +122,7 @@ export default connect(
}
+ icon={ }
variant='info'
title='Switch to Card View'
isOutline
@@ -124,7 +130,7 @@ export default connect(
/>
}
+ icon={ }
variant='info'
title='Switch to List View'
isOutline
@@ -176,7 +182,7 @@ export default connect(
render: (_data) => (
}
+ icon={ }
variant='dark'
isOutline
isDisabled
diff --git a/src/app-pages/home/search-bar.js b/src/app-pages/home/search-bar.jsx
similarity index 88%
rename from src/app-pages/home/search-bar.js
rename to src/app-pages/home/search-bar.jsx
index bd2897b2..783054e2 100644
--- a/src/app-pages/home/search-bar.js
+++ b/src/app-pages/home/search-bar.jsx
@@ -1,6 +1,5 @@
import React from 'react';
-
-import Icon from '../../app-components/icon';
+import { Close } from '@mui/icons-material';
const Searchbar = ({ value, placeholder, onChange }) => (
@@ -18,7 +17,7 @@ const Searchbar = ({ value, placeholder, onChange }) => (
className='input-group-text pointer'
onClick={() => onChange('')}
>
-
+
diff --git a/src/app-pages/instrument-group/instrument-group-form.js b/src/app-pages/instrument-group/instrument-group-form.jsx
similarity index 100%
rename from src/app-pages/instrument-group/instrument-group-form.js
rename to src/app-pages/instrument-group/instrument-group-form.jsx
diff --git a/src/app-pages/instrument-group/instrument-group.js b/src/app-pages/instrument-group/instrument-group.jsx
similarity index 92%
rename from src/app-pages/instrument-group/instrument-group.js
rename to src/app-pages/instrument-group/instrument-group.jsx
index 52e935aa..6cb29cdf 100644
--- a/src/app-pages/instrument-group/instrument-group.js
+++ b/src/app-pages/instrument-group/instrument-group.jsx
@@ -1,10 +1,10 @@
import React, { useState, useEffect } from 'react';
import { connect } from 'redux-bundler-react';
import { useDeepCompareEffect } from 'react-use';
+import { AddLocationAltOutlined, Circle, Edit, LocationOn } from '@mui/icons-material';
import Button from '../../app-components/button';
import Card from '../../app-components/card';
-import Icon from '../../app-components/icon';
import InstrumentForm from '../../common/forms/instrument-form';
import InstrumentGroupForm from './instrument-group-form';
import InstrumentPicker from './instrument-picker';
@@ -48,7 +48,7 @@ export default connect(
const instrumentIds = Object.keys(instruments);
const [instrumentArray, setInstrumentArray] = useState(instrumentIds.map(id => instruments[id]));
- const [filter, setFilter] = useState('');
+ const [filter] = useState('');
const [filteredInstruments, setFilteredInstruments] = useState(instrumentArray);
const statusOptions = [...new Set(instrumentArray.map(instrument => titlize(instrument.status)))].map(status => ({ value: status, label: status }));
@@ -90,7 +90,7 @@ export default connect(
isOutline
text='Edit'
handleClick={() => doModalOpen(InstrumentGroupForm, { item: group })}
- icon={ }
+ icon={ }
/>
@@ -133,7 +133,7 @@ export default connect(
isOutline
text='Add New Instrument'
handleClick={() => doModalOpen(InstrumentForm, { addToGroup: group, isEdit: false })}
- icon={ }
+ icon={ }
/>
doModalOpen(InstrumentPicker)}
- icon={ }
+ icon={ }
/>
@@ -160,7 +160,7 @@ export default connect(
render: (data) => (
data?.status ? (
<>
-
+
{titlize(data.status)}
>
) : null
@@ -193,7 +193,7 @@ export default connect(
title='Edit'
className='mr-1'
handleClick={() => doModalOpen(InstrumentForm, { item: data })}
- icon={ }
+ icon={ }
/>
diff --git a/src/app-pages/instrument-group/instrument-picker.js b/src/app-pages/instrument-group/instrument-picker.jsx
similarity index 100%
rename from src/app-pages/instrument-group/instrument-picker.js
rename to src/app-pages/instrument-group/instrument-picker.jsx
diff --git a/src/app-pages/instrument-group/instrument-remove.js b/src/app-pages/instrument-group/instrument-remove.jsx
similarity index 84%
rename from src/app-pages/instrument-group/instrument-remove.js
rename to src/app-pages/instrument-group/instrument-remove.jsx
index 05c5f217..106adfca 100644
--- a/src/app-pages/instrument-group/instrument-remove.js
+++ b/src/app-pages/instrument-group/instrument-remove.jsx
@@ -1,8 +1,8 @@
import React from 'react';
import { connect } from 'redux-bundler-react';
+import { Delete } from '@mui/icons-material';
import DeleteConfirm from '../../app-components/delete-confirm';
-import Icon from '../../app-components/icon';
const InstrumentRemove = connect(
'doInstrumentGroupInstrumentsDelete',
@@ -12,7 +12,7 @@ const InstrumentRemove = connect(
size='small'
deleteTitle='Remove from Group'
deleteText=''
- deleteIcon={ }
+ deleteIcon={ }
handleDelete={(_e) => doInstrumentGroupInstrumentsDelete(item)}
/>
)
diff --git a/src/app-pages/instrument-group/time-series-chart.js b/src/app-pages/instrument-group/time-series-chart.jsx
similarity index 100%
rename from src/app-pages/instrument-group/time-series-chart.js
rename to src/app-pages/instrument-group/time-series-chart.jsx
diff --git a/src/app-pages/instrument-group/time-series-panel.js b/src/app-pages/instrument-group/time-series-panel.jsx
similarity index 100%
rename from src/app-pages/instrument-group/time-series-panel.js
rename to src/app-pages/instrument-group/time-series-panel.jsx
diff --git a/src/app-pages/instrument/alert/alert-config-form.js b/src/app-pages/instrument/alert/alert-config-form.jsx
similarity index 99%
rename from src/app-pages/instrument/alert/alert-config-form.js
rename to src/app-pages/instrument/alert/alert-config-form.jsx
index 6ddaa9e0..4f66f2d9 100644
--- a/src/app-pages/instrument/alert/alert-config-form.js
+++ b/src/app-pages/instrument/alert/alert-config-form.jsx
@@ -43,7 +43,7 @@ const AlertConfigSettings = connect(
doAlertConfigsSave(configSettings, null, true, false);
}
- if (!!subscription) {
+ if (subscription) {
const putBody = {
...subscription,
mute_ui: userPreferences.muteUi,
diff --git a/src/app-pages/instrument/alert/alert-editor-form.js b/src/app-pages/instrument/alert/alert-editor-form.jsx
similarity index 95%
rename from src/app-pages/instrument/alert/alert-editor-form.js
rename to src/app-pages/instrument/alert/alert-editor-form.jsx
index e37df13d..673c4a2b 100644
--- a/src/app-pages/instrument/alert/alert-editor-form.js
+++ b/src/app-pages/instrument/alert/alert-editor-form.jsx
@@ -48,6 +48,7 @@ export default connect(
size='small'
className='mr-1'
text='Cancel'
+ // eslint-disable-next-line no-console
handleClick={() => console.log('Clicked the cancel button')}
/>
{
const updatedAlert = { ...alert, formula, body };
doAlertConfigsSave(updatedAlert);
+ // eslint-disable-next-line no-console
console.log('Clicked the save button', updatedAlert);
}}
/>
diff --git a/src/app-pages/instrument/alert/alert-editor.js b/src/app-pages/instrument/alert/alert-editor.jsx
similarity index 93%
rename from src/app-pages/instrument/alert/alert-editor.js
rename to src/app-pages/instrument/alert/alert-editor.jsx
index d8e50182..dfaf9f02 100644
--- a/src/app-pages/instrument/alert/alert-editor.js
+++ b/src/app-pages/instrument/alert/alert-editor.jsx
@@ -1,11 +1,11 @@
import React, { useState, useEffect } from 'react';
import { connect } from 'redux-bundler-react';
+import { SettingsOutlined } from '@mui/icons-material';
import AlertForm from './alert-editor-form';
import AlertFormModal from './alert-form';
import AlertConfigSettings from './alert-config-form';
import Button from '../../../app-components/button';
-import Icon from '../../../app-components/icon';
import { classArray } from '../../../common/helpers/utils';
export default connect(
@@ -40,7 +40,7 @@ export default connect(
>
{a.name}
openSettingsModal(e, a)} title='Open Configuration Settings'>
-
+
);
@@ -59,6 +59,7 @@ export default connect(
size='small'
handleClick={() => {
doModalOpen(AlertFormModal, { item: {} });
+ // eslint-disable-next-line no-console
console.log('Clicked the new alert button');
}}
text='+ New Alert'
diff --git a/src/app-pages/instrument/alert/alert-entry.js b/src/app-pages/instrument/alert/alert-entry.jsx
similarity index 83%
rename from src/app-pages/instrument/alert/alert-entry.js
rename to src/app-pages/instrument/alert/alert-entry.jsx
index 74752a39..8f854128 100644
--- a/src/app-pages/instrument/alert/alert-entry.js
+++ b/src/app-pages/instrument/alert/alert-entry.jsx
@@ -1,10 +1,10 @@
import React, { useState } from 'react';
import { connect } from 'redux-bundler-react';
import { formatDistance } from 'date-fns';
+import { DeleteOutlined, NoteAddOutlined, VisibilityOffOutlined, VisibilityOutlined } from '@mui/icons-material';
import AlertNoteForm from './alert-note-form';
import Button from '../../../app-components/button';
-import Icon from '../../../app-components/icon';
const AlertEntry = connect(
'selectProfileAlertsByInstrumentId',
@@ -53,7 +53,10 @@ const AlertEntry = connect(
isDisabled={!userAlert}
handleClick={() => toggleRead(item, null, true, true)}
title={`Mark as ${isRead ? 'Unread' : 'Read'}`}
- icon={ }
+ icon={isRead
+ ?
+ :
+ }
/>
doModalOpen(AlertNoteForm, { item })}
title='Add/Edit Note'
- icon={ }
+ icon={ }
/>
console.log('delete instrument alert')}
title='Delete Alert'
- icon={ }
+ icon={ }
/>
)}
diff --git a/src/app-pages/instrument/alert/alert-form.js b/src/app-pages/instrument/alert/alert-form.jsx
similarity index 100%
rename from src/app-pages/instrument/alert/alert-form.js
rename to src/app-pages/instrument/alert/alert-form.jsx
diff --git a/src/app-pages/instrument/alert/alert-note-form.js b/src/app-pages/instrument/alert/alert-note-form.jsx
similarity index 95%
rename from src/app-pages/instrument/alert/alert-note-form.js
rename to src/app-pages/instrument/alert/alert-note-form.jsx
index 0038fb09..3773a59c 100644
--- a/src/app-pages/instrument/alert/alert-note-form.js
+++ b/src/app-pages/instrument/alert/alert-note-form.jsx
@@ -27,6 +27,7 @@ const AlertNoteForm = ({ item }) => {
@@ -150,8 +150,9 @@ export default connect(
) : (