IO-233 CDK WIP customer changes.

This commit is contained in:
Patrick Fic
2021-09-13 09:43:41 -07:00
parent fe993cba73
commit 7e3f496ea1
13 changed files with 141 additions and 35 deletions

View File

@@ -8,7 +8,25 @@ import { alphaSort } from "../../utils/sorters";
import JobExportButton from "../jobs-close-export-button/jobs-close-export-button.component";
import JobsExportAllButton from "../jobs-export-all-button/jobs-export-all-button.component";
export default function AccountingReceivablesTableComponent({ loading, jobs }) {
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(AccountingReceivablesTableComponent);
export function AccountingReceivablesTableComponent({
bodyshop,
loading,
jobs,
}) {
const { t } = useTranslation();
const [selectedJobs, setSelectedJobs] = useState([]);
const [transInProgress, setTransInProgress] = useState(false);
@@ -180,12 +198,14 @@ export default function AccountingReceivablesTableComponent({ loading, jobs }) {
<Card
extra={
<Space wrap>
<JobsExportAllButton
jobIds={selectedJobs}
disabled={transInProgress || selectedJobs.length === 0}
loadingCallback={setTransInProgress}
completedCallback={setSelectedJobs}
/>
{!bodyshop.cdk_dealerid && (
<JobsExportAllButton
jobIds={selectedJobs}
disabled={transInProgress || selectedJobs.length === 0}
loadingCallback={setTransInProgress}
completedCallback={setSelectedJobs}
/>
)}
<Input.Search
value={state.search}
onChange={handleSearch}

View File

@@ -21,7 +21,7 @@ export default connect(
mapDispatchToProps
)(DmsAllocationsSummary);
export function DmsAllocationsSummary({ socket, bodyshop, jobId, ro_number }) {
export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
const { t } = useTranslation();
const [allocationsSummary, setAllocationsSummary] = useState([]);
@@ -77,7 +77,7 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, ro_number }) {
return (
<Card
title={ro_number}
title={title}
extra={
<Button
onClick={() => {

View File

@@ -47,10 +47,6 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
},
];
console.log(
"🚀 ~ file: dms-cdk-makes.component.jsx ~ line 95 ~ selectedModel",
selectedModel
);
return (
<div>
<Modal

View File

@@ -1,4 +1,4 @@
import { Button, Table, Col } from "antd";
import { Button, Table, Col , Checkbox} from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -51,6 +51,17 @@ export function DmsCustomerSelector({ bodyshop }) {
};
const columns = [
{
title: t("jobs.fields.dms.id"),
dataIndex: ["id", "value"],
key: "id",
},
{
title: t("jobs.fields.dms.vinowner"),
dataIndex: "vinOwner",
key: "vinOwner",
render: (text, record) => <Checkbox disabled checked={record.vinOwner}/>
},
{
title: t("jobs.fields.dms.name1"),
dataIndex: ["name1", "fullName"],

View File

@@ -69,7 +69,7 @@ export function DmsPostForm({ bodyshop, socket, job }) {
story: t("jobs.labels.dms.defaultstory", {
ro_number: job.ro_number,
area_of_damage: job.area_of_damage && job.area_of_damage.impact1,
}).substr(0, 249),
}).substr(0, 239),
}}
>
<LayoutFormRow grow>
@@ -153,7 +153,7 @@ export function DmsPostForm({ bodyshop, socket, job }) {
},
]}
>
<Input.TextArea maxLength={250} />
<Input.TextArea maxLength={240} />
</Form.Item>
<Divider />
<Form.List name={["payers"]}>