feature/IO-3066-1-scaffolding: Minor cleanup, addition of idea project files.

This commit is contained in:
Dave Richer
2025-04-16 14:13:17 -04:00
parent affe412586
commit 8b7280f66c
12 changed files with 84 additions and 37 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

12
.idea/bodyshop-desktop.iml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

6
.idea/jsLibraryMappings.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>

10
.idea/material_theme_project_new.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="userId" value="-70fa916f:1961b191ca1:-748b" />
</MTProjectMetadataState>
</option>
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/bodyshop-desktop.iml" filepath="$PROJECT_DIR$/.idea/bodyshop-desktop.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -8,9 +8,8 @@ import ImportJob from "../decoder/decoder";
import folderScan from "../decoder/folder-scan"; import folderScan from "../decoder/folder-scan";
import { handleEMSPartsOrder } from "../ems-parts-order/ems-parts-order-handler"; import { handleEMSPartsOrder } from "../ems-parts-order/ems-parts-order-handler";
import { handleShopMetaDataFetch } from "../ipc/ipcMainHandler.user"; import { handleShopMetaDataFetch } from "../ipc/ipcMainHandler.user";
import { handlePartsPariceChangeRequest } from "../ppc/ppc-handler"; import { handlePartsPriceChangeRequest } from "../ppc/ppc-handler";
import { handleQuickBookRequest } from "../quickbooks-desktop/quickbooks-desktop"; import { handleQuickBookRequest } from "../quickbooks-desktop/quickbooks-desktop";
import { c } from "vite/dist/node/moduleRunnerTransport.d-CXw_Ws6P";
export default class LocalServer { export default class LocalServer {
private app: express.Application; private app: express.Application;
@@ -121,7 +120,7 @@ export default class LocalServer {
res.status(200).json(files); res.status(200).json(files);
return; return;
}); });
this.app.post("/ppc", handlePartsPariceChangeRequest); this.app.post("/ppc", handlePartsPriceChangeRequest);
this.app.post("/oec", handleEMSPartsOrder); this.app.post("/oec", handleEMSPartsOrder);
this.app.post( this.app.post(
"/import", "/import",

View File

@@ -7,15 +7,15 @@ import ImportJob from "../decoder/decoder";
import store from "../store/store"; import store from "../store/store";
import { StartWatcher, StopWatcher } from "../watcher/watcher"; import { StartWatcher, StopWatcher } from "../watcher/watcher";
import { import {
SettingsPpcFilPathGet, SettingsPpcFilePathGet,
SettingsPpcFilPathSet, SettingsPpcFilePathSet,
SettingsWatchedFilePathsAdd, SettingsWatchedFilePathsAdd,
SettingsWatchedFilePathsGet, SettingsWatchedFilePathsGet,
SettingsWatchedFilePathsRemove, SettingsWatchedFilePathsRemove,
SettingsWatcherPollingGet, SettingsWatcherPollingGet,
SettingsWatcherPollingSet, SettingsWatcherPollingSet,
SettingEmsOutFilPathSet, SettingEmsOutFilePathSet,
SettingEmsOutFilPathGet, SettingEmsOutFilePathGet,
} from "./ipcMainHandler.settings"; } from "./ipcMainHandler.settings";
import { import {
ipcMainHandleAuthStateChanged, ipcMainHandleAuthStateChanged,
@@ -98,15 +98,15 @@ ipcMain.handle(
SettingsWatcherPollingSet, SettingsWatcherPollingSet,
); );
ipcMain.handle(ipcTypes.toMain.settings.getPpcFilePath, SettingsPpcFilPathGet); ipcMain.handle(ipcTypes.toMain.settings.getPpcFilePath, SettingsPpcFilePathGet);
ipcMain.handle(ipcTypes.toMain.settings.setPpcFilePath, SettingsPpcFilPathSet); ipcMain.handle(ipcTypes.toMain.settings.setPpcFilePath, SettingsPpcFilePathSet);
ipcMain.handle( ipcMain.handle(
ipcTypes.toMain.settings.getEmsOutFilePath, ipcTypes.toMain.settings.getEmsOutFilePath,
SettingEmsOutFilPathGet, SettingEmsOutFilePathGet,
); );
ipcMain.handle( ipcMain.handle(
ipcTypes.toMain.settings.setEmsOutFilePath, ipcTypes.toMain.settings.setEmsOutFilePath,
SettingEmsOutFilPathSet, SettingEmsOutFilePathSet,
); );
ipcMain.handle(ipcTypes.toMain.user.getActiveShop, () => { ipcMain.handle(ipcTypes.toMain.user.getActiveShop, () => {

View File

@@ -3,12 +3,7 @@ import log from "electron-log/main";
import _ from "lodash"; import _ from "lodash";
import Store from "../store/store"; import Store from "../store/store";
import {getMainWindow} from "../util/toRenderer"; import {getMainWindow} from "../util/toRenderer";
import { import {addWatcherPath, removeWatcherPath, StartWatcher, StopWatcher,} from "../watcher/watcher";
addWatcherPath,
removeWatcherPath,
StartWatcher,
StopWatcher,
} from "../watcher/watcher";
const SettingsWatchedFilePathsAdd = async (): Promise<string[]> => { const SettingsWatchedFilePathsAdd = async (): Promise<string[]> => {
const mainWindow = getMainWindow(); const mainWindow = getMainWindow();
@@ -75,11 +70,10 @@ const SettingsWatcherPollingSet = async (
return { enabled, interval }; return { enabled, interval };
}; };
const SettingsPpcFilPathGet = async (): Promise<string> => { const SettingsPpcFilePathGet = async (): Promise<string> => {
const ppcFilePath: string = Store.get("settings.ppcFilePath"); return Store.get("settings.ppcFilePath");
return ppcFilePath;
}; };
const SettingsPpcFilPathSet = async (): Promise<string> => { const SettingsPpcFilePathSet = async (): Promise<string> => {
const mainWindow = getMainWindow(); const mainWindow = getMainWindow();
if (!mainWindow) { if (!mainWindow) {
log.error("No main window found when trying to open dialog"); log.error("No main window found when trying to open dialog");
@@ -95,12 +89,10 @@ const SettingsPpcFilPathSet = async (): Promise<string> => {
return (Store.get("settings.ppcFilePath") as string) || ""; return (Store.get("settings.ppcFilePath") as string) || "";
}; };
const SettingEmsOutFilePathGet = async (): Promise<string> => {
const SettingEmsOutFilPathGet = async (): Promise<string> => { return Store.get("settings.emsOutFilePath");
const emsOutFilePath: string = Store.get("settings.emsOutFilePath");
return emsOutFilePath;
}; };
const SettingEmsOutFilPathSet = async (): Promise<string> => { const SettingEmsOutFilePathSet = async (): Promise<string> => {
const mainWindow = getMainWindow(); const mainWindow = getMainWindow();
if (!mainWindow) { if (!mainWindow) {
log.error("No main window found when trying to open dialog"); log.error("No main window found when trying to open dialog");
@@ -118,13 +110,13 @@ const SettingEmsOutFilPathSet = async (): Promise<string> => {
}; };
export { export {
SettingsPpcFilPathGet, SettingsPpcFilePathGet,
SettingsPpcFilPathSet, SettingsPpcFilePathSet,
SettingsWatchedFilePathsAdd, SettingsWatchedFilePathsAdd,
SettingsWatchedFilePathsGet, SettingsWatchedFilePathsGet,
SettingsWatchedFilePathsRemove, SettingsWatchedFilePathsRemove,
SettingsWatcherPollingGet, SettingsWatcherPollingGet,
SettingsWatcherPollingSet, SettingsWatcherPollingSet,
SettingEmsOutFilPathGet, SettingEmsOutFilePathGet,
SettingEmsOutFilPathSet, SettingEmsOutFilePathSet,
}; };

View File

@@ -8,7 +8,7 @@ import createdDirectoryIfNotExist from "../util/createDirectoryIfNotExist";
import GenerateEnvFile from "./ppc-generate-env"; import GenerateEnvFile from "./ppc-generate-env";
import GenerateLinFile from "./ppc-generate-lin"; import GenerateLinFile from "./ppc-generate-lin";
const handlePartsPariceChangeRequest = async ( const handlePartsPriceChangeRequest = async (
req: express.Request, req: express.Request,
res: express.Response, res: express.Response,
): Promise<void> => { ): Promise<void> => {
@@ -64,4 +64,4 @@ export interface PpcJob {
}; };
} }
export { handlePartsPariceChangeRequest }; export { handlePartsPriceChangeRequest };

View File

@@ -1,13 +1,12 @@
import "@ant-design/v5-patch-for-react-19"; import "@ant-design/v5-patch-for-react-19";
import { Layout, Skeleton, ConfigProvider, Badge } from "antd"; import { Layout, Skeleton, ConfigProvider, Badge } from "antd";
import { User } from "firebase/auth"; import { User } from "firebase/auth";
import { useEffect, useState } from "react"; import { useEffect, useState, FC } from "react";
import { ErrorBoundary } from "react-error-boundary"; import { ErrorBoundary } from "react-error-boundary";
import { Provider } from "react-redux"; import { Provider } from "react-redux";
import { HashRouter, Route, Routes } from "react-router"; import { HashRouter, Route, Routes } from "react-router";
import ipcTypes from "../../util/ipcTypes.json"; import ipcTypes from "../../util/ipcTypes.json";
import ErrorBoundaryFallback from "./components/ErrorBoundaryFallback/ErrorBoundaryFallback"; import ErrorBoundaryFallback from "./components/ErrorBoundaryFallback/ErrorBoundaryFallback";
import NavigationHeader from "./components/NavigationHeader/Navigationheader";
import Settings from "./components/Settings/Settings"; import Settings from "./components/Settings/Settings";
import SignInForm from "./components/SignInForm/SignInForm"; import SignInForm from "./components/SignInForm/SignInForm";
import UpdateAvailable from "./components/UpdateAvailable/UpdateAvailable"; import UpdateAvailable from "./components/UpdateAvailable/UpdateAvailable";
@@ -15,7 +14,7 @@ import reduxStore from "./redux/redux-store";
import { auth } from "./util/firebase"; import { auth } from "./util/firebase";
import { NotificationProvider } from "./util/notificationContext"; import { NotificationProvider } from "./util/notificationContext";
const App: React.FC = () => { const App: FC = () => {
const [user, setUser] = useState<User | boolean | null>(false); const [user, setUser] = useState<User | boolean | null>(false);
useEffect(() => { useEffect(() => {
@@ -40,6 +39,7 @@ const App: React.FC = () => {
// Clean up the listener when component unmounts // Clean up the listener when component unmounts
return (): void => unsubscribe(); return (): void => unsubscribe();
}, []); }, []);
const isTest = window.api.isTest(); const isTest = window.api.isTest();
return ( return (