@@ -97,7 +97,9 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
render: (text, record) =>
|
render: (text, record) =>
|
||||||
record.cccontracts.length === 1 ? (
|
record.cccontracts.length === 1 ? (
|
||||||
<Link to={`/manage/jobs/${record.cccontracts[0].job.id}`}>
|
<Link to={`/manage/jobs/${record.cccontracts[0].job.id}`}>
|
||||||
{record.cccontracts[0].job.ro_number}
|
{`${record.cccontracts[0].job.ro_number} - ${
|
||||||
|
record.cccontracts[0].job.ownr_fn || ""
|
||||||
|
} ${record.cccontracts[0].job.ownr_ln || ""} ${record.cccontracts[0].job.ownr_co_nm || ""}`}
|
||||||
</Link>
|
</Link>
|
||||||
) : null,
|
) : null,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,26 +19,26 @@ const DateTimePicker = (
|
|||||||
return (
|
return (
|
||||||
<div id={id}>
|
<div id={id}>
|
||||||
<FormDatePicker
|
<FormDatePicker
|
||||||
{...restProps}
|
{...(onlyFuture && {
|
||||||
{...(onlyFuture && {
|
disabledDate: (d) => moment().subtract(1, "day").isAfter(d),
|
||||||
disabledDate: (d) => moment().subtract(1, "day").isAfter(d),
|
})}
|
||||||
})}
|
value={value}
|
||||||
value={value}
|
onBlur={onBlur}
|
||||||
onBlur={onBlur}
|
onChange={onChange}
|
||||||
onChange={onChange}
|
{...restProps}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TimePicker
|
<TimePicker
|
||||||
{...restProps}
|
value={value ? moment(value) : null}
|
||||||
value={value ? moment(value) : null}
|
{...(onlyFuture && {
|
||||||
{...(onlyFuture && {
|
disabledDate: (d) => moment().isAfter(d),
|
||||||
disabledDate: (d) => moment().isAfter(d),
|
})}
|
||||||
})}
|
onChange={onChange}
|
||||||
onChange={onChange}
|
showSecond={false}
|
||||||
showSecond={false}
|
minuteStep={15}
|
||||||
minuteStep={15}
|
onBlur={onBlur}
|
||||||
onBlur={onBlur}
|
format="hh:mm a"
|
||||||
format="hh:mm a"
|
{...restProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
import { Descriptions, Drawer, Space } from "antd";
|
import { Descriptions, Drawer, Space, PageHeader, Button } from "antd";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -16,8 +16,25 @@ import JobEmployeeAssignments from "../job-employee-assignments/job-employee-ass
|
|||||||
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||||
import ProductionRemoveButton from "../production-remove-button/production-remove-button.component";
|
import ProductionRemoveButton from "../production-remove-button/production-remove-button.component";
|
||||||
import JobAtChange from "../job-at-change/job-at-change.component";
|
import JobAtChange from "../job-at-change/job-at-change.component";
|
||||||
|
import { PrinterFilled } from "@ant-design/icons";
|
||||||
|
|
||||||
export default function ProductionListDetail({ jobs }) {
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
|
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
//currentUser: selectCurrentUser
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
setPrintCenterContext: (context) =>
|
||||||
|
dispatch(setModalContext({ context: context, modal: "printCenter" })),
|
||||||
|
});
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(ProductionListDetail);
|
||||||
|
|
||||||
|
export function ProductionListDetail({ jobs, setPrintCenterContext }) {
|
||||||
const search = queryString.parse(useLocation().search);
|
const search = queryString.parse(useLocation().search);
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const { selected } = search;
|
const { selected } = search;
|
||||||
@@ -39,11 +56,29 @@ export default function ProductionListDetail({ jobs }) {
|
|||||||
return (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
title={
|
title={
|
||||||
<Space>
|
<PageHeader
|
||||||
<span>{t("production.labels.jobdetail")}</span>
|
title={theJob.ro_number}
|
||||||
<span>{theJob.ro_number}</span>
|
extra={
|
||||||
<ProductionRemoveButton jobId={theJob.id} />
|
<Space>
|
||||||
</Space>
|
<ProductionRemoveButton jobId={theJob.id} />{" "}
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setPrintCenterContext({
|
||||||
|
actions: { refetch: refetch },
|
||||||
|
context: {
|
||||||
|
id: theJob.id,
|
||||||
|
job: theJob,
|
||||||
|
type: "job",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<PrinterFilled />
|
||||||
|
{t("jobs.actions.printCenter")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
placement="right"
|
placement="right"
|
||||||
width={"33%"}
|
width={"33%"}
|
||||||
|
|||||||
@@ -76,6 +76,21 @@ export function TimeTicketList({
|
|||||||
state.sortedInfo.columnKey === "employee" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "employee" && state.sortedInfo.order,
|
||||||
render: (text, record) =>
|
render: (text, record) =>
|
||||||
`${record.employee.first_name} ${record.employee.last_name}`,
|
`${record.employee.first_name} ${record.employee.last_name}`,
|
||||||
|
filters:
|
||||||
|
timetickets
|
||||||
|
.map((l) => l.employeeid)
|
||||||
|
.filter(onlyUnique)
|
||||||
|
.map((s) => {
|
||||||
|
return {
|
||||||
|
text: (() => {
|
||||||
|
const emp = bodyshop.employees.find((e) => e.id === s);
|
||||||
|
|
||||||
|
return `${emp.first_name} ${emp.last_name}`;
|
||||||
|
})(), //
|
||||||
|
value: [s],
|
||||||
|
};
|
||||||
|
}) || [],
|
||||||
|
onFilter: (value, record) => value.includes(record.employeeid),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("timetickets.fields.cost_center"),
|
title: t("timetickets.fields.cost_center"),
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ export function TimeTicketModalComponent({
|
|||||||
<>
|
<>
|
||||||
<Form.Item label={t("timetickets.fields.clockon")} name="clockon">
|
<Form.Item label={t("timetickets.fields.clockon")} name="clockon">
|
||||||
<FormDateTimePicker
|
<FormDateTimePicker
|
||||||
|
minuteStep={5}
|
||||||
disabled={
|
disabled={
|
||||||
!HasRbacAccess({
|
!HasRbacAccess({
|
||||||
bodyshop,
|
bodyshop,
|
||||||
@@ -245,6 +246,7 @@ export function TimeTicketModalComponent({
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<FormDateTimePicker
|
<FormDateTimePicker
|
||||||
|
minuteStep={5}
|
||||||
disabled={
|
disabled={
|
||||||
!HasRbacAccess({
|
!HasRbacAccess({
|
||||||
bodyshop,
|
bodyshop,
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ export const QUERY_ALL_CC = gql`
|
|||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
|
ownr_fn
|
||||||
|
ownr_ln
|
||||||
|
ownr_co_nm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"actions": {
|
"actions": {
|
||||||
"block": "Block Day",
|
"block": "Block Day",
|
||||||
"calculate": "Calculate SMART Dates",
|
"calculate": "Calculate SMART Dates",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel Appointment",
|
||||||
"intake": "Intake",
|
"intake": "Intake",
|
||||||
"new": "New Appointment",
|
"new": "New Appointment",
|
||||||
"preview": "Preview",
|
"preview": "Preview",
|
||||||
|
|||||||
Reference in New Issue
Block a user