Added manual group changing, stbility improvements.

This commit is contained in:
Patrick Fic
2020-10-21 19:36:54 -07:00
parent 34e244783c
commit 3817f8615e
30 changed files with 362 additions and 42 deletions

View File

@@ -0,0 +1,39 @@
import { Switch } from "antd";
import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import ipcTypes from "../../../ipc.types";
import { selectSettings } from "../../../redux/application/application.selectors";
import DataLabel from "../../atoms/data-label/data-label.atom";
const { ipcRenderer } = window;
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
appSettings: selectSettings,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export function WatcherPollingMolecule({ appSettings }) {
const handleChange = (val) => {
ipcRenderer.send(ipcTypes.default.store.set, {
enableNotifications: val,
});
};
return (
<div>
<DataLabel label="Notifications Enabled?">
<Switch
onChange={handleChange}
checked={appSettings && appSettings.enableNotifications}
/>
</DataLabel>
</div>
);
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(WatcherPollingMolecule);

View File

@@ -1,15 +1,20 @@
export default (part_type) => {
switch (part_type) {
case "PAA":
case "PAL":
case "PAC":
return "A/M";
case "PAE":
return "Exist.";
return "Ex.";
case "PAN":
case "PAP":
return "OEM";
case "PAP":
return "OEMP";
case "PAL":
return "LKQ";
case "PAC":
return "A/M (PAC)";
case "PAR":
return "A/M (PAR)";
default:
return part_type;
}

View File

@@ -12,7 +12,7 @@ export default function TimeAgoFormatter(props) {
}, [m]);
return props.children ? (
<Tooltip placement="top" title={m.format("MM/DD/YYY hh:mm A")}>
<Tooltip placement="top" title={m.format("MM/DD/YYYY hh:mm:ss A")}>
{timestampString}
</Tooltip>
) : null;