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
|
||||
@@ -19779,6 +19779,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</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>
|
||||
<name>date_open</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -75,6 +75,12 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
|
||||
>
|
||||
<DateTimePicker />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("jobs.fields.date_next_contact")}
|
||||
name="date_next_contact"
|
||||
>
|
||||
<DateTimePicker />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("jobs.fields.scheduled_completion")}
|
||||
name="scheduled_completion"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import i18n from "i18next";
|
||||
import moment from "moment";
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
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 ProductionListColumnDetailPriority from "./production-list-columns.detailpriority.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 ProductionListColumnNote from "./production-list-columns.productionnote.component";
|
||||
import ProductionListColumnStatus from "./production-list-columns.status.component";
|
||||
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
|
||||
import ProductionListLastContacted from "./production-list-columns.lastcontacted.component";
|
||||
|
||||
const r = ({ technician, state, activeStatuses }) => {
|
||||
return [
|
||||
@@ -109,6 +110,29 @@ const r = ({ technician, state, activeStatuses }) => {
|
||||
state.sortedInfo.order,
|
||||
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"),
|
||||
dataIndex: "scheduled_delivery",
|
||||
|
||||
@@ -29,7 +29,11 @@ export function ProductionLastContacted({ currentUser, record }) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
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");
|
||||
|
||||
//e.stopPropagation();
|
||||
@@ -38,6 +42,7 @@ export function ProductionLastContacted({ currentUser, record }) {
|
||||
jobId: record.id,
|
||||
job: {
|
||||
date_last_contacted,
|
||||
...(date_next_contact ? { date_next_contact } : {}),
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -98,7 +103,16 @@ export function ProductionLastContacted({ currentUser, record }) {
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<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 />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("notes.labels.notetoadd")} name="note">
|
||||
|
||||
@@ -125,6 +125,7 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
|
||||
scheduled_completion
|
||||
scheduled_delivery
|
||||
date_last_contacted
|
||||
date_next_contact
|
||||
ins_co_nm
|
||||
clm_total
|
||||
ownr_ph1
|
||||
@@ -519,6 +520,7 @@ export const GET_JOB_BY_PK = gql`
|
||||
date_scheduled
|
||||
date_invoiced
|
||||
date_last_contacted
|
||||
date_next_contact
|
||||
date_exported
|
||||
status
|
||||
owner_owing
|
||||
@@ -762,6 +764,7 @@ export const QUERY_JOB_CARD_DETAILS = gql`
|
||||
scheduled_delivery
|
||||
date_invoiced
|
||||
date_last_contacted
|
||||
date_next_contact
|
||||
date_open
|
||||
date_exported
|
||||
|
||||
@@ -848,6 +851,7 @@ export const QUERY_TECH_JOB_DETAILS = gql`
|
||||
scheduled_delivery
|
||||
date_invoiced
|
||||
date_last_contacted
|
||||
date_next_contact
|
||||
date_open
|
||||
date_exported
|
||||
voided
|
||||
|
||||
@@ -1207,6 +1207,7 @@
|
||||
"date_exported": "Exported",
|
||||
"date_invoiced": "Invoiced",
|
||||
"date_last_contacted": "Last Contacted Date",
|
||||
"date_next_contact": "Next Contact Date",
|
||||
"date_open": "Open",
|
||||
"date_scheduled": "Scheduled",
|
||||
"ded_amt": "Deductible",
|
||||
|
||||
@@ -1207,6 +1207,7 @@
|
||||
"date_exported": "Exportado",
|
||||
"date_invoiced": "Facturado",
|
||||
"date_last_contacted": "",
|
||||
"date_next_contact": "",
|
||||
"date_open": "Abierto",
|
||||
"date_scheduled": "Programado",
|
||||
"ded_amt": "Deducible",
|
||||
|
||||
@@ -1207,6 +1207,7 @@
|
||||
"date_exported": "Exportés",
|
||||
"date_invoiced": "Facturé",
|
||||
"date_last_contacted": "",
|
||||
"date_next_contact": "",
|
||||
"date_open": "Ouvrir",
|
||||
"date_scheduled": "Prévu",
|
||||
"ded_amt": "Déductible",
|
||||
|
||||
@@ -2592,6 +2592,7 @@
|
||||
- date_exported
|
||||
- date_invoiced
|
||||
- date_last_contacted
|
||||
- date_next_contact
|
||||
- date_open
|
||||
- date_scheduled
|
||||
- ded_amt
|
||||
@@ -2843,6 +2844,7 @@
|
||||
- date_exported
|
||||
- date_invoiced
|
||||
- date_last_contacted
|
||||
- date_next_contact
|
||||
- date_open
|
||||
- date_scheduled
|
||||
- ded_amt
|
||||
@@ -3104,6 +3106,7 @@
|
||||
- date_exported
|
||||
- date_invoiced
|
||||
- date_last_contacted
|
||||
- date_next_contact
|
||||
- date_open
|
||||
- date_scheduled
|
||||
- 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