IO-1914 Consume from inventory screen.

This commit is contained in:
Patrick Fic
2022-06-07 12:14:24 -07:00
parent fe5e2a247a
commit d32fd9e697
8 changed files with 115 additions and 5 deletions

View File

@@ -4,10 +4,11 @@ import queryString from "query-string";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useHistory, useLocation } from "react-router-dom";
import { Link, useHistory, useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import InventoryBillRo from "../inventory-bill-ro/inventory-bill-ro.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
@@ -75,7 +76,14 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
key: "consumedbyjob",
ellipsis: true,
render: (text, record) => record.bill?.job?.ro_number,
render: (text, record) =>
record.bill?.job?.ro_number ? (
<Link to={`/manage/jobs/${record.bill?.job?.id}`}>
{record.bill?.job?.ro_number}
</Link>
) : (
<InventoryBillRo inventoryline={record} />
),
},
];