Merge branch 'v1.0.12' of bitbucket.org:snaptsoft/imexrps into v1.0.12

This commit is contained in:
Patrick Fic
2020-11-26 09:37:46 -08:00
8 changed files with 88 additions and 17 deletions

View File

@@ -1,5 +1,7 @@
New Features:
- Added a reference guide for MPI Grouping Guidelines next to the Group Descriptor on the estimate screen.
- Added ability to filter for jobs with no close date on job search.
Bug Fixes:
- Added better error handling on reporting for jobs that did not have a group set.
- Added better error handling on reporting for jobs that did not have a group set.
- Added a confirmation on changes to shop settings to indicate that a restart is required for them to take effect.

View File

@@ -16,7 +16,7 @@
},
"1.0.12": {
"title": "Release Notes for 1.0.12",
"date": "TBD",
"notes": ""
"date": "11/26/2020",
"notes": "New Features: \n- Added a reference guide for MPI Grouping Guidelines next to the Group Descriptor on the estimate screen.\n- Added ability to filter for jobs with no close date on job search.\n\nBug Fixes: \n- Added better error handling on reporting for jobs that did not have a group set.\n- Added a confirmation on changes to shop settings to indicate that a restart is required for them to take effect."
}
}

View File

@@ -1,9 +1,10 @@
import { ApolloProvider } from "@apollo/client";
import { ConfigProvider, Spin } from "antd";
import { ConfigProvider } from "antd";
import enLocale from "antd/es/locale/en_US";
import React, { useEffect } from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import LoadingSpinnerAtom from "../components/atoms/loading-spinner/loading-spinner.atom";
import RoutesPage from "../components/pages/routes/routes.page";
import SignInPage from "../components/pages/sign-in/sign-in.page";
import client from "../graphql/GraphQLClient";
@@ -34,7 +35,7 @@ export function App({ currentUser, checkUserSession }) {
}, []);
if (currentUser.authorized === null) {
return <Spin />;
return <LoadingSpinnerAtom />;
}
return (

View File

@@ -0,0 +1,25 @@
import React from "react";
import { Spin } from "antd";
import "./loading-spinner.styles.scss";
export default function LoadingSpinnerAtom({
loading = true,
message,
...props
}) {
return (
<div className="loading-spinner">
<Spin
spinning={loading}
size="large"
style={{
position: "relative",
alignContent: "center",
}}
tip={message ? message : null}
>
{props.children}
</Spin>
</div>
);
}

View File

@@ -0,0 +1,8 @@
.loading-spinner {
display: flex;
flex: 1;
height: 100%;
align-items: center;
justify-content: center;
margin: 1em;
}

View File

@@ -1,8 +1,9 @@
import { SearchOutlined } from "@ant-design/icons";
import { Button, DatePicker, Form, Input } from "antd";
import { Button, Checkbox, DatePicker, Form, Input } from "antd";
import React from "react";
import ipcTypes from "../../../ipc.types";
const { ipcRenderer } = window;
export default function JobsSearchFieldsMolecule({ callSearchQuery }) {
const [form] = Form.useForm();
@@ -17,6 +18,9 @@ export default function JobsSearchFieldsMolecule({ callSearchQuery }) {
search: values.search || "",
startDate: (values.dateRange && values.dateRange[0]) || null,
endDate: (values.dateRange && values.dateRange[1]) || null,
...(values.closeDateIsNull
? { closeDateIsNull: values.closeDateIsNull }
: {}),
},
});
};
@@ -35,10 +39,29 @@ export default function JobsSearchFieldsMolecule({ callSearchQuery }) {
<Form.Item name="dateRange" rules={[{ type: "array" }]}>
<DatePicker.RangePicker />
</Form.Item>
<Button type="primary" htmlType="submit" onClick={() => form.submit()}>
<SearchOutlined />
Search
</Button>
<Form.Item name="closeDateIsNull" valuePropName="checked">
<Checkbox>Only Jobs with No Close Date</Checkbox>
</Form.Item>
<Form.Item shouldUpdate>
{() => {
const disabled =
!!!form.getFieldValue("search") &&
!!!form.getFieldValue("dateRange") &&
!form.getFieldValue("closeDateIsNull");
return (
<Button
type="primary"
disabled={disabled}
htmlType="submit"
onClick={() => form.submit()}
>
<SearchOutlined />
Search
</Button>
);
}}
</Form.Item>
</Form>
</div>
);

View File

@@ -1,5 +1,13 @@
import { DeleteFilled } from "@ant-design/icons";
import { Button, Form, Input, InputNumber, Select, Typography } from "antd";
import {
Button,
Form,
Input,
InputNumber,
Popconfirm,
Select,
Typography,
} from "antd";
import React, { useState } from "react";
import FormListMoveArrows from "../../atoms/form-list-move-arrows/form-list-move-arrows.atom";
import LayoutFormRow from "../../atoms/layout-form-row/layout-form-row.atom";
@@ -15,13 +23,15 @@ export default function ShopSettingsFormMolecule({ form, saveLoading }) {
return (
<div>
<Typography.Title>Shop Settings</Typography.Title>
<Button
type="primary"
loading={saveLoading}
onClick={() => form.submit()}
<Popconfirm
title="Changing these settings will require manually restarting RPS on all machines."
onConfirm={() => form.submit()}
>
Save
</Button>
<Button type="primary" loading={saveLoading}>
Save
</Button>
</Popconfirm>
<LayoutFormRow grow>
<Form.Item
label="Shop Name"

View File

@@ -44,11 +44,13 @@ export const SEARCH_JOBS_PAGINATED = gql`
$search: String
$startDate: date
$endDate: date
$closeDateIsNull: Boolean
) {
search_jobs(
offset: $offset
limit: $limit
args: { enddate: $endDate, search: $search, startdate: $startDate }
where: { close_date: { _is_null: $closeDateIsNull } }
) {
ownr_fn
ownr_ln