Added further logging. RPS-4
This commit is contained in:
@@ -3,8 +3,9 @@ import { DatePicker, message, Spin } from "antd";
|
||||
import moment from "moment";
|
||||
import React, { useState } from "react";
|
||||
import { UPDATE_JOB } from "../../../graphql/jobs.queries";
|
||||
import ipcTypes from "../../../ipc.types";
|
||||
import { DateFormat } from "../../../util/constants";
|
||||
|
||||
const { ipcRenderer } = window;
|
||||
export default function CloseDateDisplayMolecule({ jobId, close_date }) {
|
||||
const [editMode, setEditMode] = useState(false);
|
||||
const [value, setValue] = useState(moment(close_date));
|
||||
@@ -12,6 +13,9 @@ export default function CloseDateDisplayMolecule({ jobId, close_date }) {
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
|
||||
const handleChange = async (newDate) => {
|
||||
ipcRenderer.send(ipcTypes.default.app.toMain.track, {
|
||||
event: "SET_CLOSED_DATE",
|
||||
});
|
||||
setLoading(true);
|
||||
setValue(newDate);
|
||||
const result = await updateJob({
|
||||
|
||||
@@ -47,26 +47,48 @@ export function JobsTargetsStatsMolecule({
|
||||
marginBottom: "1rem",
|
||||
}}
|
||||
>
|
||||
<Statistic
|
||||
title="Target RPS %"
|
||||
value={(selectedJobTargetPc * 100).toFixed(1)}
|
||||
suffix="%"
|
||||
/>
|
||||
<Statistic
|
||||
title="Current RPS %"
|
||||
valueStyle={{
|
||||
color: selectedJobTargetPc > (jobRpsPc || 0) ? "tomato" : "seagreen",
|
||||
}}
|
||||
value={((jobRpsPc || 0) * 100).toFixed(1)}
|
||||
suffix="%"
|
||||
/>
|
||||
<Statistic
|
||||
title="Target RPS $"
|
||||
value={actPriceSum.percentage(selectedJobTargetPc * 100).toFormat()}
|
||||
/>
|
||||
<Statistic title="Current RPS $" value={jobRpsDollars.toFormat()} />
|
||||
<Statistic title="DB Price Total" value={dbPriceSum.toFormat()} />
|
||||
<Statistic title="Actual Price Total" value={actPriceSum.toFormat()} />
|
||||
<div style={{ display: "flex" }}>
|
||||
<Statistic
|
||||
title="Target RPS %"
|
||||
value={(selectedJobTargetPc * 100).toFixed(1)}
|
||||
suffix="%"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
/>
|
||||
<Statistic
|
||||
title="Current RPS %"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
valueStyle={{
|
||||
color:
|
||||
selectedJobTargetPc > (jobRpsPc || 0) ? "tomato" : "seagreen",
|
||||
}}
|
||||
value={((jobRpsPc || 0) * 100).toFixed(1)}
|
||||
suffix="%"
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Statistic
|
||||
title="Target RPS $"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
value={actPriceSum.percentage(selectedJobTargetPc * 100).toFormat()}
|
||||
/>
|
||||
<Statistic
|
||||
title="Current RPS $"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
value={jobRpsDollars.toFormat()}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Statistic
|
||||
title="DB Price Total"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
value={dbPriceSum.toFormat()}
|
||||
/>
|
||||
<Statistic
|
||||
title="Actual Price Total"
|
||||
style={{ margin: "0rem .5rem" }}
|
||||
value={actPriceSum.toFormat()}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,11 +3,16 @@ import React, { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Link } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import ipcTypes from "../../../ipc.types";
|
||||
import { setSelectedJobId } from "../../../redux/application/application.actions";
|
||||
|
||||
import {
|
||||
selectReportData,
|
||||
selectReportLoading,
|
||||
} from "../../../redux/reporting/reporting.selectors";
|
||||
|
||||
const { ipcRenderer } = window;
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
reportingLoading: selectReportLoading,
|
||||
reportData: selectReportData,
|
||||
@@ -123,6 +128,10 @@ export function ReportingJobsListMolecule({
|
||||
<Input.Search
|
||||
placeholder="Search"
|
||||
onSearch={(val) => {
|
||||
ipcRenderer.send(ipcTypes.default.app.toMain.track, {
|
||||
event: "REPORTS_LIST_SEARCH",
|
||||
query: val,
|
||||
});
|
||||
setSearchText(val);
|
||||
}}
|
||||
enterButton
|
||||
|
||||
Reference in New Issue
Block a user