Basic working RPS with all upgrades completed.
This commit is contained in:
@@ -14,7 +14,7 @@ const { default: ipcTypes } = require("../src/ipc.types");
|
||||
const { store } = require("./electron-store");
|
||||
const { autoUpdater } = require("electron-updater");
|
||||
const log = require("electron-log");
|
||||
const { default: logger } = require("redux-logger");
|
||||
|
||||
const Nucleus = require("nucleus-nodejs");
|
||||
require("./ipc-main-handler");
|
||||
require("./analytics");
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
console.log("Running preloader!");
|
||||
const { contextBridge, ipcRenderer } = require("electron");
|
||||
const log = require("electron-log");
|
||||
//const log = require("electron-log");
|
||||
|
||||
//ipcRenderer.removeAllListeners();
|
||||
|
||||
contextBridge.exposeInMainWorld("logger", {
|
||||
info: (...msg) => {
|
||||
log.info(...msg);
|
||||
console.log(...msg);
|
||||
},
|
||||
debug: (...msg) => {
|
||||
log.debug(...msg);
|
||||
console.log(...msg);
|
||||
},
|
||||
warn: (...msg) => {
|
||||
log.warn(...msg);
|
||||
console.log(...msg);
|
||||
},
|
||||
error: (...msg) => {
|
||||
log.error(...msg);
|
||||
console.log(...msg);
|
||||
},
|
||||
silly: (...msg) => {
|
||||
log.silly(...msg);
|
||||
console.log(...msg);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ contextBridge.exposeInMainWorld("ipcRenderer", {
|
||||
// whitelist channels
|
||||
// let validChannels = ["toMain"];
|
||||
// if (validChannels.includes(channel)) {
|
||||
log.info("[Main] ipcRenderer Send", channel);
|
||||
// log.info("[Main] ipcRenderer Send", channel);
|
||||
ipcRenderer.send(channel, data);
|
||||
//}
|
||||
},
|
||||
|
||||
28
package.json
28
package.json
@@ -3,12 +3,12 @@
|
||||
"productName": "ImEX RPS",
|
||||
"author": "ImEX Systems Inc. <support@thinkimex.com>",
|
||||
"description": "ImEX RPS",
|
||||
"version": "1.0.28",
|
||||
"version": "1.1.0",
|
||||
"main": "electron/main.js",
|
||||
"homepage": "./",
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.6.9",
|
||||
"antd": "^4.22.0",
|
||||
"antd": "^4.23.1",
|
||||
"apollo-link-logger": "^2.0.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"dbffile": "^1.8.1",
|
||||
@@ -16,10 +16,10 @@
|
||||
"electron-is-dev": "^2.0.0",
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-reload": "^2.0.0-alpha.1",
|
||||
"electron-store": "^8.0.2",
|
||||
"electron-updater": "^5.0.5",
|
||||
"firebase": "^7.24.0",
|
||||
"graphql": "^16.5.0",
|
||||
"electron-store": "^8.1.0",
|
||||
"electron-updater": "^5.2.1",
|
||||
"firebase": "^8.10.0",
|
||||
"graphql": "^16.6.0",
|
||||
"lodash": "^4.17.20",
|
||||
"logrocket": "^3.0.1",
|
||||
"moment": "^2.29.4",
|
||||
@@ -29,15 +29,15 @@
|
||||
"react-dom": "^18.2.0",
|
||||
"react-infinite-scroller": "^1.2.6",
|
||||
"react-redux": "^8.0.2",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-router-dom": "^6.4.0",
|
||||
"react-scripts": "5.0.1",
|
||||
"recharts": "^2.1.13",
|
||||
"recharts": "^2.1.14",
|
||||
"redux": "^4.2.0",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-persist": "^6.0.0",
|
||||
"redux-saga": "^1.1.3",
|
||||
"redux-saga": "^1.2.1",
|
||||
"reselect": "^4.1.6",
|
||||
"sass": "^1.54.0",
|
||||
"sass": "^1.54.9",
|
||||
"subscriptions-transport-ws": "^0.9.19"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -69,13 +69,13 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^5.3.0",
|
||||
"electron": "^19.0.9",
|
||||
"electron-builder": "^23.1.0",
|
||||
"concurrently": "^7.4.0",
|
||||
"electron": "^20.1.4",
|
||||
"electron-builder": "^23.3.3",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.6",
|
||||
"wait-on": "^5.3.0"
|
||||
"wait-on": "^6.0.1"
|
||||
},
|
||||
"build": {
|
||||
"extends": null,
|
||||
|
||||
@@ -45,11 +45,10 @@ export function JobGroupMolecule({ bodyshop, jobId, group, job }) {
|
||||
};
|
||||
|
||||
const menu = (
|
||||
<Menu onClick={handleMenuClick}>
|
||||
{bodyshop.groups.map((g, idx) => (
|
||||
<Menu.Item key={g}>{g}</Menu.Item>
|
||||
))}
|
||||
</Menu>
|
||||
<Menu
|
||||
onClick={handleMenuClick}
|
||||
items={bodyshop.groups.map((g, idx) => ({ key: g, title: g, label: g }))}
|
||||
></Menu>
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -286,7 +286,7 @@ export default function JobsGroupModalMolecule() {
|
||||
return (
|
||||
<div style={{ margin: ".2rem" }}>
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onCancel={() => setVisible(false)}
|
||||
onOk={() => setVisible(false)}
|
||||
width="90%"
|
||||
|
||||
@@ -28,7 +28,7 @@ export function ReleaseNotes({ releaseNotes, setReleaseNotes }) {
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={!!releaseNotes}
|
||||
open={!!releaseNotes}
|
||||
onOk={handleOk}
|
||||
onCancel={handleOk}
|
||||
cancelButtonProps={{ style: { display: "none" } }}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { LogoutOutlined } from "@ant-design/icons";
|
||||
import { Menu } from "antd";
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { signOutStart } from "../../../redux/user/user.actions";
|
||||
@@ -9,14 +7,6 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function SiderSignOut({ signOutStart, ...restProps }) {
|
||||
return (
|
||||
<Menu.Item
|
||||
icon={<LogoutOutlined />}
|
||||
{...restProps}
|
||||
onClick={() => signOutStart()}
|
||||
>
|
||||
Sign Out
|
||||
</Menu.Item>
|
||||
);
|
||||
return <span onClick={() => signOutStart()}>Sign Out</span>;
|
||||
}
|
||||
export default connect(null, mapDispatchToProps)(SiderSignOut);
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
CloseOutlined,
|
||||
BarChartOutlined,
|
||||
FileAddFilled,
|
||||
LogoutOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { Menu } from "antd";
|
||||
import React from "react";
|
||||
@@ -17,31 +18,51 @@ export default function SiderMenuOrganism() {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
return (
|
||||
<Menu defaultSelectedKeys={[`/`]} selectedKeys={[pathname]} mode="inline">
|
||||
<Menu.Item key="/" icon={<PieChartOutlined />}>
|
||||
<Link to="/">Jobs</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="/scan" icon={<FileAddFilled />}>
|
||||
<Link to="/scan">File Scan</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="/reporting" icon={<BarChartOutlined />}>
|
||||
<Link to="/reporting">Reporting</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="/settings" icon={<SettingFilled />}>
|
||||
<Link to="/settings">Settings</Link>
|
||||
</Menu.Item>
|
||||
|
||||
<Menu.Divider />
|
||||
<SiderSignOut style={{ color: "tomato" }} />
|
||||
<Menu.Item
|
||||
key="3" style={{ color: "tomato" }}
|
||||
icon={<CloseOutlined style={{ color: "tomato" }}/>}
|
||||
onClick={() => {
|
||||
ipcRenderer.send(ipcTypes.default.quit);
|
||||
}}
|
||||
>
|
||||
Quit
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
<Menu
|
||||
defaultSelectedKeys={[`/`]}
|
||||
selectedKeys={[pathname]}
|
||||
mode="inline"
|
||||
items={[
|
||||
{
|
||||
key: "/",
|
||||
icon: <PieChartOutlined />,
|
||||
label: <Link to="/">Jobs</Link>,
|
||||
},
|
||||
{
|
||||
key: "/scan",
|
||||
icon: <FileAddFilled />,
|
||||
label: <Link to="/scan">File Scan</Link>,
|
||||
},
|
||||
{
|
||||
key: "/reporting",
|
||||
icon: <BarChartOutlined />,
|
||||
label: <Link to="/reporting">Reporting</Link>,
|
||||
},
|
||||
{
|
||||
key: "/settings",
|
||||
icon: <SettingFilled />,
|
||||
label: <Link to="/settings">Settings</Link>,
|
||||
},
|
||||
{ type: "divider" },
|
||||
{
|
||||
key: "signout",
|
||||
icon: <LogoutOutlined style={{ color: "tomato" }} />,
|
||||
label: <SiderSignOut />,
|
||||
},
|
||||
{
|
||||
key: "quit",
|
||||
icon: <CloseOutlined style={{ color: "tomato" }} />,
|
||||
label: (
|
||||
<span
|
||||
onClick={() => {
|
||||
ipcRenderer.send(ipcTypes.default.quit);
|
||||
}}
|
||||
>
|
||||
Quit
|
||||
</span>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,14 +26,24 @@ export default function JobsPage() {
|
||||
<div style={{ height: "100%" }}>
|
||||
<Row gutter={[16, 16]} style={{ height: "100%" }}>
|
||||
<Col span={selectedSpans.l} style={{ height: "100%" }}>
|
||||
<Tabs defaultActiveKey="latest" style={{ height: "100%" }}>
|
||||
<Tabs.TabPane key="latest" tab="Latest" style={{ height: "100%" }}>
|
||||
<JobsListOrganism />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="search" tab="Search" style={{ height: "100%" }}>
|
||||
<JobsListSearchOrganism />
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
<Tabs
|
||||
style={{ height: "100%" }}
|
||||
defaultActiveKey="latest"
|
||||
items={[
|
||||
{
|
||||
key: "latest",
|
||||
label: "Latest",
|
||||
children: <JobsListOrganism />,
|
||||
style: { height: "100%" },
|
||||
},
|
||||
{
|
||||
key: "search",
|
||||
label: "Search",
|
||||
children: <JobsListSearchOrganism />,
|
||||
style: { height: "100%" },
|
||||
},
|
||||
]}
|
||||
></Tabs>
|
||||
</Col>
|
||||
<Col span={selectedSpans.r} style={{ height: "100%" }}>
|
||||
<JobsDetailOrganism />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import "antd/dist/antd.min.css";
|
||||
//import LogRocket from "logrocket";
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { Provider } from "react-redux";
|
||||
import { MemoryRouter } from "react-router-dom";
|
||||
import { PersistGate } from "redux-persist/integration/react";
|
||||
@@ -10,15 +10,16 @@ import "./index.css";
|
||||
import { persistor, store } from "./redux/store";
|
||||
|
||||
//if (process.env.NODE_ENV === "production") LogRocket.init("imex/rps");
|
||||
const container = document.getElementById("root");
|
||||
const root = createRoot(container); // createRoot(container!) if you use TypeScript
|
||||
|
||||
ReactDOM.render(
|
||||
root.render(
|
||||
<Provider store={store}>
|
||||
<MemoryRouter>
|
||||
<PersistGate persistor={persistor}>
|
||||
<App />
|
||||
</PersistGate>
|
||||
</MemoryRouter>
|
||||
</Provider>,
|
||||
document.getElementById("root")
|
||||
</Provider>
|
||||
);
|
||||
console.log("Connecting to endpoint: ", process.env.REACT_APP_GRAPHQL_ENDPOINT);
|
||||
|
||||
Reference in New Issue
Block a user