diff --git a/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx b/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx
index 4380c77d2..e70e57a94 100644
--- a/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx
+++ b/client/src/components/bill-detail-edit/bill-detail-edit-component.jsx
@@ -164,6 +164,7 @@ export function BillDetailEditcontainer({
if (!search.billid) return <>>; //
{t("bills.labels.noneselected")}
;
const exported = data && data.bills_by_pk && data.bills_by_pk.exported;
+ const isinhouse = data && data.bills_by_pk && data.bills_by_pk.isinhouse;
return (
<>
@@ -207,7 +208,7 @@ export function BillDetailEditcontainer({
initialValues={transformData(data)}
layout="vertical"
>
-
+
{t("general.labels.media")}
{bodyshop.uselocalmediaserver ? (
-
+
({});
+
+export default connect(mapStateToProps, mapDispatchToProps)(JobLinesExpander);
+
+export function JobLinesExpander({ jobline, jobid, technician }) {
const { t } = useTranslation();
const { loading, error, data } = useQuery(GET_JOB_LINE_ORDERS, {
fetchPolicy: "network-only",
@@ -33,11 +45,15 @@ export default function JobLinesExpander({ jobline, jobid }) {
-
- {line.parts_order.order_number}
-
+ {!technician ? (
+
+ {line.parts_order.order_number}
+
+ ) : (
+ `${line.parts_order.order_number}`
+ )}
{line.parts_order.order_date}
@@ -63,17 +79,22 @@ export default function JobLinesExpander({ jobline, jobid }) {
{t("bills.labels.bills")}
+
{data.billlines.length > 0 ? (
data.billlines.map((line) => (
-
- {line.bill.invoice_number}
-
+ {!technician ? (
+
+ {line.bill.invoice_number}
+
+ ) : (
+ `${line.bill.invoice_number}`
+ )}
@@ -95,9 +116,7 @@ export default function JobLinesExpander({ jobline, jobid }) {
))
) : (
-
- {t("bills.labels.nobilllines")}
-
+ {t("bills.labels.nobilllines")}
)}
diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx
index d3f074fbf..6e290f053 100644
--- a/client/src/components/job-detail-lines/job-lines.component.jsx
+++ b/client/src/components/job-detail-lines/job-lines.component.jsx
@@ -1,12 +1,12 @@
import {
DeleteFilled,
+ EditFilled,
FilterFilled,
+ HomeOutlined,
+ MinusCircleTwoTone,
+ PlusCircleTwoTone,
SyncOutlined,
WarningFilled,
- EditFilled,
- PlusCircleTwoTone,
- MinusCircleTwoTone,
- HomeOutlined,
} from "@ant-design/icons";
import { useMutation } from "@apollo/client";
import {
@@ -20,6 +20,8 @@ import {
Tag,
} from "antd";
import axios from "axios";
+import _ from "lodash";
+import moment from "moment";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -28,23 +30,19 @@ import { DELETE_JOB_LINE_BY_PK } from "../../graphql/jobs-lines.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { setModalContext } from "../../redux/modals/modals.actions";
import { selectTechnician } from "../../redux/tech/tech.selectors";
+import { selectBodyshop } from "../../redux/user/user.selectors";
import { onlyUnique } from "../../utils/arrayHelper";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { alphaSort } from "../../utils/sorters";
+import JobCreateIOU from "../job-create-iou/job-create-iou.component";
+import JobLineConvertToLabor from "../job-line-convert-to-labor/job-line-convert-to-labor.component";
import JobLineLocationPopup from "../job-line-location-popup/job-line-location-popup.component";
import JobLineNotePopup from "../job-line-note-popup/job-line-note-popup.component";
import JobLineStatusPopup from "../job-line-status-popup/job-line-status-popup.component";
import JobLinesBillRefernece from "../job-lines-bill-reference/job-lines-bill-reference.component";
-// import AllocationsAssignmentContainer from "../allocations-assignment/allocations-assignment.container";
-// import AllocationsBulkAssignmentContainer from "../allocations-bulk-assignment/allocations-bulk-assignment.container";
-// import AllocationsEmployeeLabelContainer from "../allocations-employee-label/allocations-employee-label.container";
+import PartsOrderDrawer from "../parts-order-list-table/parts-order-list-table-drawer.component";
import PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.container";
-import _ from "lodash";
-import JobCreateIOU from "../job-create-iou/job-create-iou.component";
import JobLinesExpander from "./job-lines-expander.component";
-import { selectBodyshop } from "../../redux/user/user.selectors";
-import moment from "moment";
-import JobLineConvertToLabor from "../job-line-convert-to-labor/job-line-convert-to-labor.component";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -57,6 +55,8 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(setModalContext({ context: context, modal: "jobLineEdit" })),
setPartsOrderContext: (context) =>
dispatch(setModalContext({ context: context, modal: "partsOrder" })),
+ setPartsReceiveContext: (context) =>
+ dispatch(setModalContext({ context: context, modal: "partsReceive" })),
setBillEnterContext: (context) =>
dispatch(setModalContext({ context: context, modal: "billEnter" })),
});
@@ -66,6 +66,7 @@ export function JobLinesComponent({
jobRO,
technician,
setPartsOrderContext,
+ setPartsReceiveContext,
loading,
refetch,
jobLines,
@@ -74,6 +75,8 @@ export function JobLinesComponent({
setJobLineEditContext,
form,
setBillEnterContext,
+ billsQuery,
+ handlePartsOrderOnRowClick,
}) {
const [deleteJobLine] = useMutation(DELETE_JOB_LINE_BY_PK);
@@ -341,7 +344,7 @@ export function JobLinesComponent({
key: "actions",
render: (text, record) => (
- {(record.manual_line || jobIsPrivate) && (
+ {(record.manual_line || jobIsPrivate) && !technician && (
<>