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);
|
||||
Reference in New Issue
Block a user