IO-1513 Added next contact date.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project version="1.2" be_version="2.7.1">
|
<babeledit_project be_version="2.7.1" version="1.2">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -19779,6 +19779,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>date_next_contact</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>date_open</name>
|
<name>date_open</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -75,6 +75,12 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<DateTimePicker />
|
<DateTimePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.date_next_contact")}
|
||||||
|
name="date_next_contact"
|
||||||
|
>
|
||||||
|
<DateTimePicker />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("jobs.fields.scheduled_completion")}
|
label={t("jobs.fields.scheduled_completion")}
|
||||||
name="scheduled_completion"
|
name="scheduled_completion"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import i18n from "i18next";
|
import i18n from "i18next";
|
||||||
|
import moment from "moment";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||||
@@ -11,11 +12,11 @@ import ProductionListColumnBodyPriority from "./production-list-columns.bodyprio
|
|||||||
import ProductionListDate from "./production-list-columns.date.component";
|
import ProductionListDate from "./production-list-columns.date.component";
|
||||||
import ProductionListColumnDetailPriority from "./production-list-columns.detailpriority.component";
|
import ProductionListColumnDetailPriority from "./production-list-columns.detailpriority.component";
|
||||||
import ProductionListEmployeeAssignment from "./production-list-columns.empassignment.component";
|
import ProductionListEmployeeAssignment from "./production-list-columns.empassignment.component";
|
||||||
|
import ProductionListLastContacted from "./production-list-columns.lastcontacted.component";
|
||||||
import ProductionListColumnPaintPriority from "./production-list-columns.paintpriority.component";
|
import ProductionListColumnPaintPriority from "./production-list-columns.paintpriority.component";
|
||||||
import ProductionListColumnNote from "./production-list-columns.productionnote.component";
|
import ProductionListColumnNote from "./production-list-columns.productionnote.component";
|
||||||
import ProductionListColumnStatus from "./production-list-columns.status.component";
|
import ProductionListColumnStatus from "./production-list-columns.status.component";
|
||||||
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
|
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
|
||||||
import ProductionListLastContacted from "./production-list-columns.lastcontacted.component";
|
|
||||||
|
|
||||||
const r = ({ technician, state, activeStatuses }) => {
|
const r = ({ technician, state, activeStatuses }) => {
|
||||||
return [
|
return [
|
||||||
@@ -109,6 +110,29 @@ const r = ({ technician, state, activeStatuses }) => {
|
|||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
render: (text, record) => <ProductionListLastContacted record={record} />,
|
render: (text, record) => <ProductionListLastContacted record={record} />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: i18n.t("jobs.fields.date_next_contact"),
|
||||||
|
dataIndex: "date_next_contact",
|
||||||
|
key: "date_next_contact",
|
||||||
|
ellipsis: true,
|
||||||
|
sorter: (a, b) => dateSort(a.date_next_contact, b.date_next_contact),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "date_next_contact" &&
|
||||||
|
state.sortedInfo.order,
|
||||||
|
render: (text, record) => (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color:
|
||||||
|
record.date_next_contact &&
|
||||||
|
moment(record.date_next_contact).isBefore(moment())
|
||||||
|
? "red"
|
||||||
|
: "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProductionListDate record={record} field="date_next_contact" time/>
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: i18n.t("jobs.fields.scheduled_delivery"),
|
title: i18n.t("jobs.fields.scheduled_delivery"),
|
||||||
dataIndex: "scheduled_delivery",
|
dataIndex: "scheduled_delivery",
|
||||||
|
|||||||
@@ -29,7 +29,11 @@ export function ProductionLastContacted({ currentUser, record }) {
|
|||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const handleFinish = async ({ date_last_contacted, note }) => {
|
const handleFinish = async ({
|
||||||
|
date_last_contacted,
|
||||||
|
date_next_contact,
|
||||||
|
note,
|
||||||
|
}) => {
|
||||||
logImEXEvent("production_last_contacted");
|
logImEXEvent("production_last_contacted");
|
||||||
|
|
||||||
//e.stopPropagation();
|
//e.stopPropagation();
|
||||||
@@ -38,6 +42,7 @@ export function ProductionLastContacted({ currentUser, record }) {
|
|||||||
jobId: record.id,
|
jobId: record.id,
|
||||||
job: {
|
job: {
|
||||||
date_last_contacted,
|
date_last_contacted,
|
||||||
|
...(date_next_contact ? { date_next_contact } : {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -98,7 +103,16 @@ export function ProductionLastContacted({ currentUser, record }) {
|
|||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<Form form={form} onFinish={handleFinish} layout="vertical">
|
<Form form={form} onFinish={handleFinish} layout="vertical">
|
||||||
<Form.Item name="date_last_contacted">
|
<Form.Item
|
||||||
|
name="date_last_contacted"
|
||||||
|
label={t("jobs.fields.date_last_contacted")}
|
||||||
|
>
|
||||||
|
<FormDateTimePickerComponent />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
name="date_next_contact"
|
||||||
|
label={t("jobs.fields.date_next_contact")}
|
||||||
|
>
|
||||||
<FormDateTimePickerComponent />
|
<FormDateTimePickerComponent />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("notes.labels.notetoadd")} name="note">
|
<Form.Item label={t("notes.labels.notetoadd")} name="note">
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
|
|||||||
scheduled_completion
|
scheduled_completion
|
||||||
scheduled_delivery
|
scheduled_delivery
|
||||||
date_last_contacted
|
date_last_contacted
|
||||||
|
date_next_contact
|
||||||
ins_co_nm
|
ins_co_nm
|
||||||
clm_total
|
clm_total
|
||||||
ownr_ph1
|
ownr_ph1
|
||||||
@@ -519,6 +520,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
date_scheduled
|
date_scheduled
|
||||||
date_invoiced
|
date_invoiced
|
||||||
date_last_contacted
|
date_last_contacted
|
||||||
|
date_next_contact
|
||||||
date_exported
|
date_exported
|
||||||
status
|
status
|
||||||
owner_owing
|
owner_owing
|
||||||
@@ -762,6 +764,7 @@ export const QUERY_JOB_CARD_DETAILS = gql`
|
|||||||
scheduled_delivery
|
scheduled_delivery
|
||||||
date_invoiced
|
date_invoiced
|
||||||
date_last_contacted
|
date_last_contacted
|
||||||
|
date_next_contact
|
||||||
date_open
|
date_open
|
||||||
date_exported
|
date_exported
|
||||||
|
|
||||||
@@ -848,6 +851,7 @@ export const QUERY_TECH_JOB_DETAILS = gql`
|
|||||||
scheduled_delivery
|
scheduled_delivery
|
||||||
date_invoiced
|
date_invoiced
|
||||||
date_last_contacted
|
date_last_contacted
|
||||||
|
date_next_contact
|
||||||
date_open
|
date_open
|
||||||
date_exported
|
date_exported
|
||||||
voided
|
voided
|
||||||
|
|||||||
@@ -1207,6 +1207,7 @@
|
|||||||
"date_exported": "Exported",
|
"date_exported": "Exported",
|
||||||
"date_invoiced": "Invoiced",
|
"date_invoiced": "Invoiced",
|
||||||
"date_last_contacted": "Last Contacted Date",
|
"date_last_contacted": "Last Contacted Date",
|
||||||
|
"date_next_contact": "Next Contact Date",
|
||||||
"date_open": "Open",
|
"date_open": "Open",
|
||||||
"date_scheduled": "Scheduled",
|
"date_scheduled": "Scheduled",
|
||||||
"ded_amt": "Deductible",
|
"ded_amt": "Deductible",
|
||||||
|
|||||||
@@ -1207,6 +1207,7 @@
|
|||||||
"date_exported": "Exportado",
|
"date_exported": "Exportado",
|
||||||
"date_invoiced": "Facturado",
|
"date_invoiced": "Facturado",
|
||||||
"date_last_contacted": "",
|
"date_last_contacted": "",
|
||||||
|
"date_next_contact": "",
|
||||||
"date_open": "Abierto",
|
"date_open": "Abierto",
|
||||||
"date_scheduled": "Programado",
|
"date_scheduled": "Programado",
|
||||||
"ded_amt": "Deducible",
|
"ded_amt": "Deducible",
|
||||||
|
|||||||
@@ -1207,6 +1207,7 @@
|
|||||||
"date_exported": "Exportés",
|
"date_exported": "Exportés",
|
||||||
"date_invoiced": "Facturé",
|
"date_invoiced": "Facturé",
|
||||||
"date_last_contacted": "",
|
"date_last_contacted": "",
|
||||||
|
"date_next_contact": "",
|
||||||
"date_open": "Ouvrir",
|
"date_open": "Ouvrir",
|
||||||
"date_scheduled": "Prévu",
|
"date_scheduled": "Prévu",
|
||||||
"ded_amt": "Déductible",
|
"ded_amt": "Déductible",
|
||||||
|
|||||||
@@ -2592,6 +2592,7 @@
|
|||||||
- date_exported
|
- date_exported
|
||||||
- date_invoiced
|
- date_invoiced
|
||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
- date_scheduled
|
- date_scheduled
|
||||||
- ded_amt
|
- ded_amt
|
||||||
@@ -2843,6 +2844,7 @@
|
|||||||
- date_exported
|
- date_exported
|
||||||
- date_invoiced
|
- date_invoiced
|
||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
- date_scheduled
|
- date_scheduled
|
||||||
- ded_amt
|
- ded_amt
|
||||||
@@ -3104,6 +3106,7 @@
|
|||||||
- date_exported
|
- date_exported
|
||||||
- date_invoiced
|
- date_invoiced
|
||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
- date_scheduled
|
- date_scheduled
|
||||||
- ded_amt
|
- ded_amt
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."jobs" add column "date_next_contact" timestamptz
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."jobs" add column "date_next_contact" timestamptz
|
||||||
|
null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."jobs" alter column "date_next_contact" drop not null;
|
||||||
|
alter table "public"."jobs" add column "date_next_contact" timestamptz;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."jobs" drop column "date_next_contact" cascade;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."jobs" add column "date_next_contact" timestamptz
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."jobs" add column "date_next_contact" timestamptz
|
||||||
|
null;
|
||||||
Reference in New Issue
Block a user