Changes to recent items BOD-178
This commit is contained in:
@@ -109,6 +109,7 @@ export function JobsCloseComponent({ job, bodyshop, jobTotals }) {
|
||||
partsAllocations={partsAllocations}
|
||||
labMatAllocations={labmatAllocations}
|
||||
jobTotals={jobTotals}
|
||||
disabled={!!job.date_exported}
|
||||
suspenseAmount={jobTotals.totals.subtotal
|
||||
.subtract(labmatAllocatedTotal)
|
||||
.subtract(partsAllocatedTotal)
|
||||
@@ -125,19 +126,19 @@ export function JobsCloseComponent({ job, bodyshop, jobTotals }) {
|
||||
setLabmatAllocations={setLabmatAllocations}
|
||||
partsAllocations={partsAllocations}
|
||||
setPartsAllocations={setPartsAllocations}
|
||||
invoiced={invoiced}
|
||||
disabled={!!job.date_exported}
|
||||
/>
|
||||
<JobsCloseLaborMaterialAllocation
|
||||
labmatAllocations={labmatAllocations}
|
||||
setLabmatAllocations={setLabmatAllocations}
|
||||
labMatTotalAllocation={labmatAllocatedTotal}
|
||||
invoiced={invoiced}
|
||||
invoiced={!!job.date_exported}
|
||||
/>
|
||||
<JobsClosePartsAllocation
|
||||
partsAllocations={partsAllocations}
|
||||
setPartsAllocations={setPartsAllocations}
|
||||
partsAllocatedTotal={partsAllocatedTotal}
|
||||
invoiced={invoiced}
|
||||
invoiced={!!job.date_exported}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -19,10 +19,10 @@ import { connect } from "react-redux";
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||
addRecentItem: (item) => dispatch(setrecentItem(item)),
|
||||
addRecentItem: (item) => dispatch(addRecentItem(item)),
|
||||
});
|
||||
|
||||
function JobsDetailPageContainer({ match, setBreadcrumbs,addRecentItem }) {
|
||||
function JobsDetailPageContainer({ match, setBreadcrumbs, addRecentItem }) {
|
||||
const { jobId } = match.params;
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -74,7 +74,9 @@ function JobsDetailPageContainer({ match, setBreadcrumbs,addRecentItem }) {
|
||||
}, [loading, data, t, error, setBreadcrumbs, jobId]);
|
||||
|
||||
if (loading) return <SpinComponent />;
|
||||
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
if (data) addRecentItem({ id: 1234, label: " abcd" });
|
||||
|
||||
return data.jobs_by_pk ? (
|
||||
<JobsDetailPage
|
||||
@@ -85,7 +87,7 @@ function JobsDetailPageContainer({ match, setBreadcrumbs,addRecentItem }) {
|
||||
updateJobStatus={updateJobStatus}
|
||||
/>
|
||||
) : (
|
||||
<AlertComponent message={t("jobs.errors.noaccess")} type='error' />
|
||||
<AlertComponent message={t("jobs.errors.noaccess")} type="error" />
|
||||
);
|
||||
}
|
||||
export default connect(null, mapDispatchToProps)(JobsDetailPageContainer);
|
||||
|
||||
Reference in New Issue
Block a user