IO-1066 IO-1073 Minor UI fixes.
This commit is contained in:
@@ -28970,6 +28970,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>thank_you_ro</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>thirdpartypayer</name>
|
<name>thirdpartypayer</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import React, { forwardRef } from "react";
|
|||||||
|
|
||||||
const dateFormat = "MM/DD/YYYY";
|
const dateFormat = "MM/DD/YYYY";
|
||||||
|
|
||||||
const FormDatePicker = ({ value, onChange, onBlur, ...restProps }, ref) => {
|
const FormDatePicker = (
|
||||||
|
{ value, onChange, onBlur, onlyFuture, ...restProps },
|
||||||
|
ref
|
||||||
|
) => {
|
||||||
const handleChange = (newDate) => {
|
const handleChange = (newDate) => {
|
||||||
if (value !== newDate && onChange) {
|
if (value !== newDate && onChange) {
|
||||||
onChange(newDate);
|
onChange(newDate);
|
||||||
@@ -28,6 +31,9 @@ const FormDatePicker = ({ value, onChange, onBlur, ...restProps }, ref) => {
|
|||||||
format={dateFormat}
|
format={dateFormat}
|
||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
disabledTime
|
disabledTime
|
||||||
|
{...(onlyFuture && {
|
||||||
|
disabledDate: (d) => moment().subtract(1, "day").isAfter(d),
|
||||||
|
})}
|
||||||
{...restProps}
|
{...restProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
|
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||||
import JobCalculateTotals from "../job-calculate-totals/job-calculate-totals.component";
|
import JobCalculateTotals from "../job-calculate-totals/job-calculate-totals.component";
|
||||||
import "./job-totals-table.styles.scss";
|
import "./job-totals-table.styles.scss";
|
||||||
import JobTotalsTableLabor from "./job-totals.table.labor.component";
|
import JobTotalsTableLabor from "./job-totals.table.labor.component";
|
||||||
@@ -14,7 +15,7 @@ import JobTotalsTableParts from "./job-totals.table.parts.component";
|
|||||||
import JobTotalsTableTotals from "./job-totals.table.totals.component";
|
import JobTotalsTableTotals from "./job-totals.table.totals.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
currentUser: selectCurrentUser,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ const colSpan = {
|
|||||||
lg: { span: 12 },
|
lg: { span: 12 },
|
||||||
};
|
};
|
||||||
|
|
||||||
export function JobsTotalsTableComponent({ jobRO, job }) {
|
export function JobsTotalsTableComponent({ jobRO, currentUser, job }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
if (!!!job.job_totals) {
|
if (!!!job.job_totals) {
|
||||||
@@ -66,28 +67,30 @@ export function JobsTotalsTableComponent({ jobRO, job }) {
|
|||||||
<JobTotalsTableTotals job={job} />
|
<JobTotalsTableTotals job={job} />
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
{currentUser.email.includes("@imex.") && (
|
||||||
<Card title="DEVELOPMENT USE ONLY">
|
<Col span={24}>
|
||||||
<JobCalculateTotals job={job} disabled={jobRO} />
|
<Card title="DEVELOPMENT USE ONLY">
|
||||||
<Collapse>
|
<JobCalculateTotals job={job} disabled={jobRO} />
|
||||||
<Collapse.Panel header="JSON Tree Totals">
|
<Collapse>
|
||||||
<div>
|
<Collapse.Panel header="JSON Tree Totals">
|
||||||
<pre>
|
<div>
|
||||||
{JSON.stringify(
|
<pre>
|
||||||
{
|
{JSON.stringify(
|
||||||
CIECA: job.cieca_ttl && job.cieca_ttl.data,
|
{
|
||||||
CIECASTL: job.cieca_stl && job.cieca_stl.data,
|
CIECA: job.cieca_ttl && job.cieca_ttl.data,
|
||||||
ImEXCalc: job.job_totals,
|
CIECASTL: job.cieca_stl && job.cieca_stl.data,
|
||||||
},
|
ImEXCalc: job.job_totals,
|
||||||
null,
|
},
|
||||||
2
|
null,
|
||||||
)}
|
2
|
||||||
</pre>
|
)}
|
||||||
</div>
|
</pre>
|
||||||
</Collapse.Panel>
|
</div>
|
||||||
</Collapse>
|
</Collapse.Panel>
|
||||||
</Card>
|
</Collapse>
|
||||||
</Col>
|
</Card>
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default function JobTotalsTableLabor({ job }) {
|
|||||||
{(
|
{(
|
||||||
job.job_totals.rates.mapa.hours +
|
job.job_totals.rates.mapa.hours +
|
||||||
job.job_totals.rates.mash.hours
|
job.job_totals.rates.mash.hours
|
||||||
).toFixed(2)}
|
).toFixed(1)}
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell align="right">
|
<Table.Summary.Cell align="right">
|
||||||
<strong>
|
<strong>
|
||||||
@@ -126,7 +126,7 @@ export default function JobTotalsTableLabor({ job }) {
|
|||||||
</CurrencyFormatter>
|
</CurrencyFormatter>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell>
|
<Table.Summary.Cell>
|
||||||
{job.job_totals.rates.mapa.hours.toFixed(2)}
|
{job.job_totals.rates.mapa.hours.toFixed(1)}
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell align="right">
|
<Table.Summary.Cell align="right">
|
||||||
{Dinero(job.job_totals.rates.mapa.total).toFormat()}
|
{Dinero(job.job_totals.rates.mapa.total).toFormat()}
|
||||||
@@ -140,7 +140,7 @@ export default function JobTotalsTableLabor({ job }) {
|
|||||||
</CurrencyFormatter>
|
</CurrencyFormatter>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell>
|
<Table.Summary.Cell>
|
||||||
{job.job_totals.rates.mash.hours.toFixed(2)}
|
{job.job_totals.rates.mash.hours.toFixed(1)}
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell align="right">
|
<Table.Summary.Cell align="right">
|
||||||
{Dinero(job.job_totals.rates.mash.total).toFormat()}
|
{Dinero(job.job_totals.rates.mash.total).toFormat()}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default function PartsOrderModalComponent({
|
|||||||
]}
|
]}
|
||||||
label={t("parts_orders.fields.deliver_by")}
|
label={t("parts_orders.fields.deliver_by")}
|
||||||
>
|
>
|
||||||
<FormDatePicker />
|
<FormDatePicker onlyFuture />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{job && job.special_coverage_policy && (
|
{job && job.special_coverage_policy && (
|
||||||
<Tag color="tomato">
|
<Tag color="tomato">
|
||||||
|
|||||||
@@ -1731,6 +1731,7 @@
|
|||||||
"qc_sheet": "Quality Control Sheet",
|
"qc_sheet": "Quality Control Sheet",
|
||||||
"ro_with_description": "RO Summary with Descriptions",
|
"ro_with_description": "RO Summary with Descriptions",
|
||||||
"supplement_request": "Supplement Request",
|
"supplement_request": "Supplement Request",
|
||||||
|
"thank_you_ro": "Thank You Letter",
|
||||||
"thirdpartypayer": "Third Party Payer",
|
"thirdpartypayer": "Third Party Payer",
|
||||||
"vehicle_check_in": "Vehicle Intake",
|
"vehicle_check_in": "Vehicle Intake",
|
||||||
"vehicle_delivery_check": "Vehicle Delivery Checklist",
|
"vehicle_delivery_check": "Vehicle Delivery Checklist",
|
||||||
|
|||||||
@@ -1731,6 +1731,7 @@
|
|||||||
"qc_sheet": "",
|
"qc_sheet": "",
|
||||||
"ro_with_description": "",
|
"ro_with_description": "",
|
||||||
"supplement_request": "",
|
"supplement_request": "",
|
||||||
|
"thank_you_ro": "",
|
||||||
"thirdpartypayer": "",
|
"thirdpartypayer": "",
|
||||||
"vehicle_check_in": "",
|
"vehicle_check_in": "",
|
||||||
"vehicle_delivery_check": "",
|
"vehicle_delivery_check": "",
|
||||||
|
|||||||
@@ -1731,6 +1731,7 @@
|
|||||||
"qc_sheet": "",
|
"qc_sheet": "",
|
||||||
"ro_with_description": "",
|
"ro_with_description": "",
|
||||||
"supplement_request": "",
|
"supplement_request": "",
|
||||||
|
"thank_you_ro": "",
|
||||||
"thirdpartypayer": "",
|
"thirdpartypayer": "",
|
||||||
"vehicle_check_in": "",
|
"vehicle_check_in": "",
|
||||||
"vehicle_delivery_check": "",
|
"vehicle_delivery_check": "",
|
||||||
|
|||||||
@@ -288,6 +288,14 @@ export const TemplateList = (type, context) => {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
group: "ro",
|
group: "ro",
|
||||||
},
|
},
|
||||||
|
thank_you_ro: {
|
||||||
|
title: i18n.t("printcenter.jobs.thank_you_ro"),
|
||||||
|
description: "Thank You Letter by RO",
|
||||||
|
key: "thank_you_ro",
|
||||||
|
subject: i18n.t("printcenter.jobs.thank_you_ro"),
|
||||||
|
disabled: false,
|
||||||
|
group: "post",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(!type || type === "job_special"
|
...(!type || type === "job_special"
|
||||||
|
|||||||
Reference in New Issue
Block a user