Formatting fixes.
This commit is contained in:
@@ -23,6 +23,7 @@ ipcMain.on(ipcTypes.default.fileWatcher.toMain.start, async (event, arg) => {
|
||||
ipcTypes.default.fileWatcher.toRenderer.filepathsList,
|
||||
filePaths
|
||||
);
|
||||
event.sender.send(ipcTypes.default.fileWatcher.toRenderer.startSuccess);
|
||||
});
|
||||
|
||||
ipcMain.on(ipcTypes.default.fileWatcher.toMain.stop, async (event, arg) => {
|
||||
@@ -41,6 +42,7 @@ ipcMain.on(ipcTypes.default.fileWatcher.toMain.addPath, async (event, arg) => {
|
||||
);
|
||||
|
||||
const newFilePaths = await settings.get("filePaths");
|
||||
console.log("newFilePaths", newFilePaths)
|
||||
|
||||
event.sender.send(
|
||||
ipcTypes.default.fileWatcher.toRenderer.filepathsList,
|
||||
|
||||
@@ -62,8 +62,6 @@ function StartWatcher() {
|
||||
|
||||
function onWatcherReady() {
|
||||
console.log("Ready!");
|
||||
const b = BrowserWindow.getFocusedWindow();
|
||||
b.webContents.send(ipcTypes.default.fileWatcher.toRenderer.startSuccess);
|
||||
}
|
||||
|
||||
async function StopWatcher() {
|
||||
|
||||
@@ -6,6 +6,11 @@ const { default: ipcTypes } = require("../src/ipc.types");
|
||||
|
||||
require("./ipc-main-handler");
|
||||
|
||||
settings.configure({
|
||||
defaults: {
|
||||
foo: "bar",
|
||||
},
|
||||
});
|
||||
// Conditionally include the dev tools installer to load React Dev Tools
|
||||
let installExtension, REACT_DEVELOPER_TOOLS;
|
||||
if (isDev) {
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
[1014/195617.530:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
|
||||
[1015/081931.328:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
|
||||
|
||||
18
package.json
18
package.json
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"name": "imexrps",
|
||||
"productName": "ImEX RPS",
|
||||
"author": "Patrick Fic <patrick@thinkimex.com>",
|
||||
"description": "ImEX RPS",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"main": "electron/main.js",
|
||||
"homepage": "./",
|
||||
"dependencies": {
|
||||
@@ -77,16 +79,11 @@
|
||||
},
|
||||
"config": {
|
||||
"forge": {
|
||||
"packagerConfig": {
|
||||
"icon": "src/icons/mac/icon.icns",
|
||||
"name": "ImEX RPS"
|
||||
},
|
||||
"packagerConfig": {},
|
||||
"makers": [
|
||||
{
|
||||
"name": "@electron-forge/maker-squirrel",
|
||||
"config": {
|
||||
"name": "ImeXRPS"
|
||||
}
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-zip",
|
||||
@@ -96,10 +93,7 @@
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-deb",
|
||||
"config": {
|
||||
"name": "ImEX RPS",
|
||||
"icon": "src/icons/mac/icon.icns"
|
||||
}
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-rpm",
|
||||
|
||||
@@ -21,10 +21,11 @@ export function FilePathsList({ watchedPaths }) {
|
||||
ipcRenderer.send(ipcTypes.default.fileWatcher.toMain.filepathsGet);
|
||||
}, []);
|
||||
|
||||
console.log("watchedPaths", watchedPaths);
|
||||
return (
|
||||
<div>
|
||||
File Paths
|
||||
<List dataSource={watchedPaths} renderItem={FilepathItemMolecule} />
|
||||
<List dataSource={watchedPaths || []} renderItem={FilepathItemMolecule} />
|
||||
<FilepathAddMolecule />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -8,6 +8,7 @@ import { selectSelectedJobId } from "../../../redux/application/application.sele
|
||||
import ErrorResultAtom from "../../atoms/error-result/error-result.atom";
|
||||
import JobsDetailDescriptionMolecule from "../../molecules/jobs-detail-description/jobs-detail-description.molecule";
|
||||
import JobsLinesTableMolecule from "../../molecules/jobs-lines-table/jobs-lines-table.molecule";
|
||||
import "./jobs-detail.organism.styles.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
@@ -32,7 +33,7 @@ export function JobsDetailOrganism({ selectedJobId }) {
|
||||
/>
|
||||
);
|
||||
return (
|
||||
<div>
|
||||
<div className="jobs-detail-container">
|
||||
<JobsDetailDescriptionMolecule
|
||||
loading={loading}
|
||||
job={data ? data.jobs_by_pk : null}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.jobs-detail-container {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import { setSelectedJobId } from "../../../redux/application/application.actions
|
||||
import { selectSelectedJobId } from "../../../redux/application/application.selectors";
|
||||
import ErrorResultAtom from "../../atoms/error-result/error-result.atom";
|
||||
import TimeAgoFormatter from "../../atoms/time-ago-formatter/time-ago-formatter.atom";
|
||||
import "./jobs-table.organism.styles.scss";
|
||||
import "./jobs-list.organism.styles.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
selectedJobId: selectSelectedJobId,
|
||||
@@ -75,7 +75,7 @@ export function JobsTableOrganism({ selectedJobId, setSelectedJobId }) {
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="jobs-list-container">
|
||||
<div className="jobs-list-infinite-container">
|
||||
<InfiniteScroll
|
||||
pageStart={0}
|
||||
@@ -1,7 +1,11 @@
|
||||
.jobs-list-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.jobs-list-infinite-container {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 95vh;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.jobs-list-item {
|
||||
@@ -2,7 +2,7 @@ import { Col, Row } from "antd";
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import JobsTableOrganism from "../../organisms/jobs-table/jobs-table.organism";
|
||||
import JobsListOrganism from "../../organisms/jobs-list/jobs-list.organism";
|
||||
import JobsDetailOrganism from "../../organisms/jobs-detail/jobs-detail.organism";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
@@ -10,13 +10,13 @@ const mapDispatchToProps = (dispatch) => ({});
|
||||
|
||||
export function JobsPage() {
|
||||
return (
|
||||
<div>
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col span={10}>
|
||||
<JobsTableOrganism />
|
||||
<div style={{ height: "100%" }}>
|
||||
<Row gutter={[16, 16]} style={{ height: "100%" }}>
|
||||
<Col span={10} style={{ height: "100%" }}>
|
||||
<JobsListOrganism />
|
||||
</Col>
|
||||
|
||||
<Col span={14}>
|
||||
<Col span={14} style={{ height: "100%" }}>
|
||||
<JobsDetailOrganism />
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -12,12 +12,12 @@ const mapDispatchToProps = (dispatch) => ({});
|
||||
|
||||
export function RoutesPage() {
|
||||
return (
|
||||
<Layout style={{ background: "#fff" }} hasSider>
|
||||
<Layout style={{ background: "#fff", height: "100vh" }} hasSider>
|
||||
<Layout.Sider style={{ background: "#fff" }} collapsible>
|
||||
<SiderMenuOrganism />
|
||||
</Layout.Sider>
|
||||
<Layout style={{ background: "#fff" }}>
|
||||
<Layout.Content style={{ margin: "1rem" }}>
|
||||
<Layout.Content style={{ margin: "1rem", height: "100%" }}>
|
||||
<Switch>
|
||||
<Route exact path="/" component={Jobs} />
|
||||
<Route exact path="/settings" component={SettingsPage} />
|
||||
|
||||
@@ -6,11 +6,15 @@ import { Link } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import ImEXOnlineLogo from "../../../assets/logo192.png";
|
||||
import { emailSignInStart } from "../../../redux/user/user.actions";
|
||||
import { selectSignInError } from "../../../redux/user/user.selectors";
|
||||
import {
|
||||
selectLoginLoading,
|
||||
selectSignInError,
|
||||
} from "../../../redux/user/user.selectors";
|
||||
import "./sign-in.page.styles.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
signInError: selectSignInError,
|
||||
loginLoading: selectLoginLoading,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
@@ -18,7 +22,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
dispatch(emailSignInStart({ email, password })),
|
||||
});
|
||||
|
||||
export function SignInPage({ emailSignInStart, signInError }) {
|
||||
export function SignInPage({ emailSignInStart, signInError, loginLoading }) {
|
||||
const handleFinish = (values) => {
|
||||
const { email, password } = values;
|
||||
emailSignInStart(email, password);
|
||||
@@ -45,7 +49,12 @@ export function SignInPage({ emailSignInStart, signInError }) {
|
||||
{signInError ? (
|
||||
<Alert type="error" message={signInError.message} />
|
||||
) : null}
|
||||
<Button className="login-btn" type="primary" htmlType="submit">
|
||||
<Button
|
||||
className="login-btn"
|
||||
type="primary"
|
||||
htmlType="submit"
|
||||
loading={loginLoading}
|
||||
>
|
||||
Login
|
||||
</Button>
|
||||
</Form>
|
||||
|
||||
@@ -54,7 +54,7 @@ export const QUERY_ALL_JOBS_PAGINATED = gql`
|
||||
`;
|
||||
|
||||
export const QUERY_JOB_BY_PK = gql`
|
||||
query QUERY_ALL_JOBS_PAGINATED($jobId: uuid!) {
|
||||
query QUERY_JOB_BY_PK($jobId: uuid!) {
|
||||
jobs_by_pk(id: $jobId) {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
|
||||
@@ -14,7 +14,7 @@ const INITIAL_STATE = {
|
||||
error: null,
|
||||
success: false,
|
||||
},
|
||||
authLevel: 0,
|
||||
loginLoading: false,
|
||||
};
|
||||
|
||||
const userReducer = (state = INITIAL_STATE, action) => {
|
||||
@@ -47,6 +47,7 @@ const userReducer = (state = INITIAL_STATE, action) => {
|
||||
return {
|
||||
...state,
|
||||
currentUser: action.payload,
|
||||
loingLoading: false,
|
||||
error: null,
|
||||
};
|
||||
case UserActionTypes.SIGN_OUT_SUCCESS:
|
||||
@@ -81,8 +82,10 @@ const userReducer = (state = INITIAL_STATE, action) => {
|
||||
return {
|
||||
...state,
|
||||
error: action.payload,
|
||||
loginLoading: false,
|
||||
};
|
||||
|
||||
case UserActionTypes.EMAIL_SIGN_IN_START:
|
||||
return { ...state, loginLoading: true };
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -20,4 +20,9 @@ export const selectPasswordReset = createSelector(
|
||||
export const selectBodyshop = createSelector(
|
||||
[selectUser],
|
||||
(user) => user.bodyshop
|
||||
);
|
||||
);
|
||||
|
||||
export const selectLoginLoading = createSelector(
|
||||
[selectUser],
|
||||
(user) => user.loginLoading
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user