diff --git a/WIP Changelog.txt b/WIP Changelog.txt index 72936a0..eb0763e 100644 --- a/WIP Changelog.txt +++ b/WIP Changelog.txt @@ -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. \ No newline at end of file +- 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. \ No newline at end of file diff --git a/electron/changelog.json b/electron/changelog.json index fc5a3ed..d068559 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -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." } } diff --git a/src/App/App.jsx b/src/App/App.jsx index 471a210..0349a6b 100644 --- a/src/App/App.jsx +++ b/src/App/App.jsx @@ -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 ; + return ; } return ( diff --git a/src/components/atoms/loading-spinner/loading-spinner.atom.jsx b/src/components/atoms/loading-spinner/loading-spinner.atom.jsx new file mode 100644 index 0000000..890713b --- /dev/null +++ b/src/components/atoms/loading-spinner/loading-spinner.atom.jsx @@ -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 ( +
+ + {props.children} + +
+ ); +} diff --git a/src/components/atoms/loading-spinner/loading-spinner.styles.scss b/src/components/atoms/loading-spinner/loading-spinner.styles.scss new file mode 100644 index 0000000..ed927a8 --- /dev/null +++ b/src/components/atoms/loading-spinner/loading-spinner.styles.scss @@ -0,0 +1,8 @@ +.loading-spinner { + display: flex; + flex: 1; + height: 100%; + align-items: center; + justify-content: center; + margin: 1em; +} diff --git a/src/components/molecules/jobs-search-fields/jobs-search-fields.molecule.jsx b/src/components/molecules/jobs-search-fields/jobs-search-fields.molecule.jsx index 5e869da..b5b2c65 100644 --- a/src/components/molecules/jobs-search-fields/jobs-search-fields.molecule.jsx +++ b/src/components/molecules/jobs-search-fields/jobs-search-fields.molecule.jsx @@ -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 }) { - + + Only Jobs with No Close Date + + + {() => { + const disabled = + !!!form.getFieldValue("search") && + !!!form.getFieldValue("dateRange") && + !form.getFieldValue("closeDateIsNull"); + + return ( + + ); + }} + ); diff --git a/src/components/molecules/shop-settings-form/shop-settings-form.molecule.jsx b/src/components/molecules/shop-settings-form/shop-settings-form.molecule.jsx index bb3baad..173a4d8 100644 --- a/src/components/molecules/shop-settings-form/shop-settings-form.molecule.jsx +++ b/src/components/molecules/shop-settings-form/shop-settings-form.molecule.jsx @@ -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 (
Shop Settings - + + +