From 4f336850de4927d2c1bba698ac739e654b9e8177 Mon Sep 17 00:00:00 2001 From: Kevin Jackson <30411845+KevinJJackson@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:40:00 -0500 Subject: [PATCH] bugfix/legacy-upload-error (#254) --- package.json | 2 +- src/app-bundles/collection-group-bundle.js | 2 + src/app-bundles/create-jwt-api-bundle.js | 2 +- src/app-bundles/upload-bundle.js | 26 ++++------ .../collection-group/collection-group.jsx | 48 ++++++++----------- .../collectiongroup-timeseries-list.jsx | 36 ++++++++------ 6 files changed, 53 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index 93e36241..a855ffa2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hhd-ui", - "version": "0.18.8", + "version": "0.18.9", "private": true, "dependencies": { "@ag-grid-community/client-side-row-model": "^30.0.3", diff --git a/src/app-bundles/collection-group-bundle.js b/src/app-bundles/collection-group-bundle.js index 2b473ef8..c1b97936 100644 --- a/src/app-bundles/collection-group-bundle.js +++ b/src/app-bundles/collection-group-bundle.js @@ -16,6 +16,8 @@ export default createRestBundle({ forceFetchActions: [ 'COLLECTIONGROUP_SAVE_FINISHED', 'COLLECTIONGROUP_DELETE_FINISHED', + 'COLLECTIONGROUP_REMOVE_TIMESERIES_FINISH', + 'COLLECTIONGROUP_ADD_TIMESERIES_FINISH', ], urlParamSelectors: ['selectProjectsIdByRoute'], prefetch: (store) => { diff --git a/src/app-bundles/create-jwt-api-bundle.js b/src/app-bundles/create-jwt-api-bundle.js index fe708ca2..9d82bf25 100644 --- a/src/app-bundles/create-jwt-api-bundle.js +++ b/src/app-bundles/create-jwt-api-bundle.js @@ -47,7 +47,7 @@ const processResponse = response => ( 'json': json, })) // eslint-disable-next-line no-console - .catch(e => console.error(e)); + .catch(e => console.error('Error parsing Response JSON', e)); } }) ); diff --git a/src/app-bundles/upload-bundle.js b/src/app-bundles/upload-bundle.js index 42be31b5..85768f59 100644 --- a/src/app-bundles/upload-bundle.js +++ b/src/app-bundles/upload-bundle.js @@ -257,24 +257,14 @@ const uploadBundle = { }); } else { // Safety meaasure until ?dry_run=true is complete on API for all uploaders - if (Array.isArray(data) && data.length > 0) { - dispatch({ - type: 'UPLOAD_POST_FINISHED', - }); - store.doNotificationFire({ - message: 'Data Uploaded Successfully', - type: 'success', - autoClose: 10000, - }); - } else { - data.errors.forEach((error) => { - store.doNotificationFire({ - message: error, - type: 'error', - autoClose: 20000, - }); - }); - } + dispatch({ + type: 'UPLOAD_POST_FINISHED', + }); + store.doNotificationFire({ + message: 'Data Uploaded Successfully', + type: 'success', + autoClose: 10000, + }); } } }); diff --git a/src/app-pages/collection-group/collection-group.jsx b/src/app-pages/collection-group/collection-group.jsx index 2e7f9ed0..692f56da 100644 --- a/src/app-pages/collection-group/collection-group.jsx +++ b/src/app-pages/collection-group/collection-group.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'redux-bundler-react'; import { roundToNearestMinutes } from 'date-fns'; -import { Add, KeyboardArrowDown, KeyboardArrowUp } from '@mui/icons-material'; +import { Add } from '@mui/icons-material'; import Button from '../../app-components/button'; import Card from '../../app-components/card'; @@ -29,7 +29,6 @@ export default connect( collectionGroupDetailByRoute: detail, projectsByRoute: project, }) => { - const [isShown, setIsShown] = useState(true); const [timestampMode, setTimestampMode] = useState('now'); // One of ['now', 'choose'] const [date, setDate] = useState(new Date()); @@ -107,15 +106,9 @@ export default connect( display: 'flex', alignItems: 'center', justifyContent: 'space-between', - cursor: 'pointer', }} - onClick={(_e) => setIsShown(!isShown)} >