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