IO-990 Refactor job closing.
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
} from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { CreateRecentItem } from "../../utils/create-recent-item";
|
||||
import IsJobReadOnly from "../../utils/jobReadOnly";
|
||||
import JobsDetailPage from "./jobs-detail.page.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -70,11 +71,7 @@ function JobsDetailPageContainer({
|
||||
]);
|
||||
|
||||
if (data && data.jobs_by_pk) {
|
||||
setJobReadOnly(
|
||||
data.jobs_by_pk.date_exported ||
|
||||
data.jobs_by_pk.date_invoiced ||
|
||||
data.jobs_by_pk.voided
|
||||
);
|
||||
setJobReadOnly(IsJobReadOnly(data.jobs_by_pk));
|
||||
|
||||
addRecentItem(
|
||||
CreateRecentItem(
|
||||
|
||||
Reference in New Issue
Block a user