Added alert and setting for PP differences less than a set amount. RPS-34
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "ppd_diff_alert";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "ppd_diff_alert" numeric NULL
|
||||
DEFAULT .05;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,28 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- accepted_ins_co
|
||||
- created_at
|
||||
- groups
|
||||
- id
|
||||
- shopname
|
||||
- targets
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,29 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- accepted_ins_co
|
||||
- created_at
|
||||
- groups
|
||||
- id
|
||||
- ppd_diff_alert
|
||||
- shopname
|
||||
- targets
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,24 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- accepted_ins_co
|
||||
- groups
|
||||
- shopname
|
||||
- targets
|
||||
filter:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,25 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- accepted_ins_co
|
||||
- groups
|
||||
- ppd_diff_alert
|
||||
- shopname
|
||||
- targets
|
||||
filter:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -46,6 +46,7 @@ tables:
|
||||
- created_at
|
||||
- groups
|
||||
- id
|
||||
- ppd_diff_alert
|
||||
- shopname
|
||||
- targets
|
||||
- updated_at
|
||||
@@ -60,6 +61,7 @@ tables:
|
||||
columns:
|
||||
- accepted_ins_co
|
||||
- groups
|
||||
- ppd_diff_alert
|
||||
- shopname
|
||||
- targets
|
||||
filter:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"productName": "ImEX RPS",
|
||||
"author": "ImEX Systems Inc. <support@thinkimex.com>",
|
||||
"description": "ImEX RPS",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.2",
|
||||
"main": "electron/main.js",
|
||||
"homepage": "./",
|
||||
"dependencies": {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -7,6 +7,7 @@ export const QUERY_BODYSHOP = gql`
|
||||
targets
|
||||
accepted_ins_co
|
||||
groups
|
||||
ppd_diff_alert
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -20,6 +21,7 @@ export const UPDATE_SHOP = gql`
|
||||
targets
|
||||
accepted_ins_co
|
||||
groups
|
||||
ppd_diff_alert
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user