From 18b8b6ec45c71db345ad9e18be45842c6e6e19e1 Mon Sep 17 00:00:00 2001 From: ChrisMart21 Date: Tue, 13 Aug 2024 12:59:30 -0700 Subject: [PATCH] Fix Merge Issues / Missing MPL headers --- src/client/app/components/RouteComponent.tsx | 3 ++- src/client/app/redux/api/logApi.ts | 3 +++ src/client/app/redux/api/mapsApi.ts | 3 +++ src/client/app/redux/devToolConfig.ts | 3 +++ src/client/app/redux/entityAdapters.ts | 3 +++ src/client/app/redux/slices/localEditsSlice.ts | 4 +++- src/client/app/utils/api/index.ts | 6 +----- 7 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/client/app/components/RouteComponent.tsx b/src/client/app/components/RouteComponent.tsx index c25395c63..16d93065b 100644 --- a/src/client/app/components/RouteComponent.tsx +++ b/src/client/app/components/RouteComponent.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; import { IntlProvider } from 'react-intl'; import { RouterProvider, createBrowserRouter } from 'react-router-dom'; -import UploadCSVContainer from '../containers/csv/UploadCSVContainer'; import { useAppSelector } from '../redux/reduxHooks'; import { selectSelectedLanguage } from '../redux/slices/appStateSlice'; import LocaleTranslationData from '../translations/data'; @@ -25,6 +24,8 @@ import { GraphLink } from './router/GraphLinkComponent'; import NotFound from './router/NotFoundOutlet'; import RoleOutlet from './router/RoleOutlet'; import UnitsDetailComponent from './unit/UnitsDetailComponent'; +import MetersCSVUploadComponent from './csv/MetersCSVUploadComponent'; +import ReadingsCSVUploadComponent from './csv/ReadingsCSVUploadComponent'; /** * @returns the router component Responsible for client side routing. diff --git a/src/client/app/redux/api/logApi.ts b/src/client/app/redux/api/logApi.ts index f601e469a..9c913ae8a 100644 --- a/src/client/app/redux/api/logApi.ts +++ b/src/client/app/redux/api/logApi.ts @@ -1,3 +1,6 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { LogData } from 'types/redux/logs'; import { baseApi } from './baseApi'; diff --git a/src/client/app/redux/api/mapsApi.ts b/src/client/app/redux/api/mapsApi.ts index 62e5325fb..36eb5171b 100644 --- a/src/client/app/redux/api/mapsApi.ts +++ b/src/client/app/redux/api/mapsApi.ts @@ -1,3 +1,6 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { pick } from 'lodash'; import * as moment from 'moment'; import { MapDataState, mapsAdapter, mapsInitialState } from '../../redux/entityAdapters'; diff --git a/src/client/app/redux/devToolConfig.ts b/src/client/app/redux/devToolConfig.ts index 02fe511bc..6a5d862fb 100644 --- a/src/client/app/redux/devToolConfig.ts +++ b/src/client/app/redux/devToolConfig.ts @@ -1,3 +1,6 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { DevToolsEnhancerOptions } from '@reduxjs/toolkit'; import { mapsApi } from './api/mapsApi'; import { mapsAdapter, mapsInitialState } from './entityAdapters'; diff --git a/src/client/app/redux/entityAdapters.ts b/src/client/app/redux/entityAdapters.ts index 92402a2ee..582b540e5 100644 --- a/src/client/app/redux/entityAdapters.ts +++ b/src/client/app/redux/entityAdapters.ts @@ -1,3 +1,6 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { EntityState, createEntityAdapter } from '@reduxjs/toolkit'; import { ConversionData } from '../types/redux/conversions'; import { GroupData } from '../types/redux/groups'; diff --git a/src/client/app/redux/slices/localEditsSlice.ts b/src/client/app/redux/slices/localEditsSlice.ts index e57c667b8..bfb4ae48b 100644 --- a/src/client/app/redux/slices/localEditsSlice.ts +++ b/src/client/app/redux/slices/localEditsSlice.ts @@ -1,3 +1,6 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { createEntityAdapter } from '@reduxjs/toolkit'; import { PlotMouseEvent } from 'plotly.js'; import { createThunkSlice } from '../../redux/sliceCreators'; @@ -49,7 +52,6 @@ export const localEditsSlice = createThunkSlice({ // Stripped offerCurrentGPS thunk into a single reducer for simplicity. The only missing functionality are the serverlogs // Current axios approach doesn't require dispatch, however if moved to rtk will. thunks for this adds complexity // For simplicity, these logs can instead be tabulated in a middleware.(probably.) - // const map = localEditAdapter.getSelectors().selectById(state.mapEdits, state.calibratingMap); const map = state.mapEdits.entities[state.calibratingMap]; const point = map.currentPoint; diff --git a/src/client/app/utils/api/index.ts b/src/client/app/utils/api/index.ts index 41eb6be24..583c15999 100644 --- a/src/client/app/utils/api/index.ts +++ b/src/client/app/utils/api/index.ts @@ -5,17 +5,13 @@ */ import ApiBackend from './ApiBackend'; -import UploadCSVApi from './UploadCSVApi'; import LogsApi from './LogsApi'; const apiBackend = new ApiBackend(); // All specific backends share the same ApiBackend -const uploadCSVApi = new UploadCSVApi(apiBackend); const logsApi = new LogsApi(apiBackend); - export { - logsApi, - uploadCSVApi + logsApi };