IO-1558
This commit is contained in:
@@ -91,15 +91,14 @@
|
|||||||
color: blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-completion-1 {
|
.production-completion-soon {
|
||||||
color: rgba(207, 12, 12, 0.8);
|
color: rgba(255, 140, 0, 0.8);
|
||||||
|
font-weight: bold;
|
||||||
// animation: production-completion-1-blinker 1s linear infinite;
|
}
|
||||||
|
.production-completion-past {
|
||||||
|
color: rgba(255, 0, 0, 0.8);
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
// @keyframes production-completion-1-blinker {
|
|
||||||
// 50% {
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
.react-resizable {
|
.react-resizable {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
|||||||
state.sortedInfo.columnKey === "scheduled_completion" &&
|
state.sortedInfo.columnKey === "scheduled_completion" &&
|
||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<ProductionListDate record={record} field="scheduled_completion" />
|
<ProductionListDate record={record} field="scheduled_completion" pastIndicator />
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -156,7 +156,7 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
|||||||
state.sortedInfo.columnKey === "scheduled_delivery" &&
|
state.sortedInfo.columnKey === "scheduled_delivery" &&
|
||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<ProductionListDate record={record} field="scheduled_delivery" />
|
<ProductionListDate record={record} field="scheduled_delivery" pastIndicator/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ import { DateFormatter } from "../../utils/DateFormatter";
|
|||||||
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function ProductionListDate({ record, field, time }) {
|
export default function ProductionListDate({
|
||||||
|
record,
|
||||||
|
field,
|
||||||
|
time,
|
||||||
|
pastIndicator,
|
||||||
|
}) {
|
||||||
const [updateAlert] = useMutation(UPDATE_JOB);
|
const [updateAlert] = useMutation(UPDATE_JOB);
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -31,6 +36,15 @@ export default function ProductionListDate({ record, field, time }) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let className = "";
|
||||||
|
if (pastIndicator) {
|
||||||
|
className =
|
||||||
|
!!record[field] &&
|
||||||
|
((moment().isSameOrAfter(moment(record[field]), "day") &&
|
||||||
|
"production-completion-past") ||
|
||||||
|
(moment().add(1, "day").isSame(moment(record[field]), "day") &&
|
||||||
|
"production-completion-soon"));
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
@@ -69,11 +83,7 @@ export default function ProductionListDate({ record, field, time }) {
|
|||||||
style={{
|
style={{
|
||||||
height: "19px",
|
height: "19px",
|
||||||
}}
|
}}
|
||||||
className={
|
className={className}
|
||||||
!!record[field] && moment().isSame(moment(record[field]), "day")
|
|
||||||
? "production-completion-1"
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<DateFormatter bordered={false}>{record[field]}</DateFormatter>
|
<DateFormatter bordered={false}>{record[field]}</DateFormatter>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user