Added status state machine BOD-251
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { DownCircleFilled, PrinterFilled } from "@ant-design/icons";
|
||||
import { Button, Dropdown, Menu, PageHeader, Tag } from "antd";
|
||||
import { PrinterFilled } from "@ant-design/icons";
|
||||
import { Button, PageHeader, Tag } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -8,6 +8,7 @@ import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import JobEmployeeAssignments from "../job-employee-assignments/job-employee-assignments.container";
|
||||
import JobsChangeStatus from "../jobs-change-status/jobs-change-status.component";
|
||||
import JobsConvertButton from "../jobs-convert-button/jobs-convert-button.component";
|
||||
import JobsDetailHeaderActions from "../jobs-detail-header-actions/jobs-detail-header-actions.component";
|
||||
import OwnerTagPopoverComponent from "../owner-tag-popover/owner-tag-popover.component";
|
||||
@@ -28,37 +29,15 @@ export function JobsDetailHeader({
|
||||
refetch,
|
||||
setPrintCenterContext,
|
||||
bodyshop,
|
||||
updateJobStatus,
|
||||
setScheduleContext,
|
||||
loading,
|
||||
form,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const statusmenu = (
|
||||
<Menu
|
||||
onClick={(e) => {
|
||||
updateJobStatus(e.key);
|
||||
}}
|
||||
>
|
||||
{bodyshop.md_ro_statuses.statuses.map((item) => (
|
||||
<Menu.Item key={item}>{item}</Menu.Item>
|
||||
))}
|
||||
</Menu>
|
||||
);
|
||||
|
||||
const menuExtra = (
|
||||
<div className="imex-flex-row">
|
||||
<Dropdown
|
||||
className="imex-flex-row__margin"
|
||||
overlay={statusmenu}
|
||||
trigger={["click"]}
|
||||
key="changestatus"
|
||||
>
|
||||
<Button>
|
||||
{t("jobs.actions.changestatus")} <DownCircleFilled />
|
||||
</Button>
|
||||
</Dropdown>
|
||||
<JobsChangeStatus job={job} />
|
||||
|
||||
<Button
|
||||
className="imex-flex-row__margin"
|
||||
|
||||
Reference in New Issue
Block a user