Added alert and setting for PP differences less than a set amount. RPS-34
This commit is contained in:
@@ -3,13 +3,16 @@ import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectSelectedJobTargetPc } from "../../../redux/application/application.selectors";
|
||||
import { selectBodyshop } from "../../../redux/user/user.selectors";
|
||||
import "./price-diff-pc-formatter.styles.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
selectedJobTargetPc: selectSelectedJobTargetPc,
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
export function PriceDiffPcFormatterAtom({
|
||||
bodyshop,
|
||||
price_diff_pc,
|
||||
selectedJobTargetPc,
|
||||
}) {
|
||||
@@ -22,7 +25,8 @@ export function PriceDiffPcFormatterAtom({
|
||||
}}
|
||||
>
|
||||
{(price_diff_pc * 100).toFixed(1)}%
|
||||
{price_diff_pc === 1 ? (
|
||||
{price_diff_pc === 1 ||
|
||||
(price_diff_pc <= bodyshop.ppd_diff_alert && price_diff_pc > 0) ? (
|
||||
<AlertFilled style={{ color: "tomato" }} className="blink_me" />
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectUpdateAvailable } from "../../../redux/application/application.selectors";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//scanLoading: selectScanLoading,
|
||||
updateAvailable: selectUpdateAvailable,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({});
|
||||
|
||||
export function UpdateAvailableAtom({ available }) {
|
||||
return <div>Update Available!</div>;
|
||||
}
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(UpdateAvailableAtom);
|
||||
@@ -60,6 +60,18 @@ export default function ShopSettingsFormMolecule({ form, saveLoading }) {
|
||||
>
|
||||
<Select mode="tags" onBlur={handleBlur} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Alert whne Parts Price Difference Less Than"
|
||||
name="ppd_diff_alert"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<Typography.Title level={4}>Group Definitions</Typography.Title>
|
||||
<Form.List name={["targets"]}>
|
||||
|
||||
@@ -19,6 +19,11 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function UpdateManagerOrganism({ updateAvailable, updateProgress }) {
|
||||
console.log(
|
||||
"UpdateManagerOrganism -> updateAvailable, updateProgress",
|
||||
updateAvailable,
|
||||
updateProgress
|
||||
);
|
||||
if (!updateAvailable) return null;
|
||||
return (
|
||||
<Layout.Footer>
|
||||
|
||||
Reference in New Issue
Block a user