From 0714eb21a5c54d4e41b46600aa29e9a26460545e Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 5 Feb 2020 12:13:15 -0800 Subject: [PATCH] Minor updates to scheduling + event card --- bodyshop_translations.babel | 4 ++-- .../jobs-list/jobs-list.component.jsx | 6 ++---- .../schedule-event.component.js | 19 ++++++++++++++++++- client/src/graphql/appointments.queries.js | 3 +++ client/src/translations/en_us/common.json | 2 +- client/src/translations/es/common.json | 2 +- client/src/translations/fr/common.json | 2 +- 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 87ad7514a..ef6c0e9f6 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1979,7 +1979,7 @@ - pay_date + ownr_ph1 false @@ -2000,7 +2000,7 @@ - phone1 + pay_date false diff --git a/client/src/components/jobs-list/jobs-list.component.jsx b/client/src/components/jobs-list/jobs-list.component.jsx index c12dfa6c2..497887aba 100644 --- a/client/src/components/jobs-list/jobs-list.component.jsx +++ b/client/src/components/jobs-list/jobs-list.component.jsx @@ -57,14 +57,12 @@ export default withRouter(function JobsList({ ) : ( // t("jobs.errors.noowner") - - {record.ownr_fn} {record.ownr_ln} - + {`${record.ownr_fn} ${record.ownr_ln}`} ); } }, { - title: t("jobs.fields.phone1"), + title: t("jobs.fields.ownr_ph1"), dataIndex: "ownr_ph1", key: "ownr_ph1", width: "12%", diff --git a/client/src/components/schedule-event/schedule-event.component.js b/client/src/components/schedule-event/schedule-event.component.js index 32eee1978..2544d1d0d 100644 --- a/client/src/components/schedule-event/schedule-event.component.js +++ b/client/src/components/schedule-event/schedule-event.component.js @@ -1,15 +1,32 @@ import React from "react"; import { Popover, Button } from "antd"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; +import PhoneFormatter from "../../utils/PhoneFormatter"; import { Link } from "react-router-dom"; +import { useTranslation } from "react-i18next"; export default function Event({ event }) { + const { t } = useTranslation(); const popoverContent = (
- Job Total: {event.job.clm_total} +
{`${t("jobs.fields.ro_number")}: ${event.job.ro_number}`}
+
+ {t("jobs.fields.clm_total")}: + {event.job.clm_total} +
+
{`${t("jobs.fields.clm_no")}: ${event.job.clm_no}`}
+
+ {t("jobs.fields.ownr_ea")}:{event.job.ownr_ea} +
+
+ {t("jobs.fields.ownr_ph1")}: + {event.job.ownr_ph1} +
+ +
); diff --git a/client/src/graphql/appointments.queries.js b/client/src/graphql/appointments.queries.js index 17e7144b9..5a2e7a8cf 100644 --- a/client/src/graphql/appointments.queries.js +++ b/client/src/graphql/appointments.queries.js @@ -10,8 +10,11 @@ export const QUERY_ALL_APPOINTMENTS = gql` ro_number ownr_ln ownr_fn + ownr_ph1 + ownr_ea clm_total id + clm_no vehicle { id v_model_yr diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index ae09231a4..90cf3f04f 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -125,8 +125,8 @@ "owner": "Owner", "owner_owing": "Cust. Owes", "ownr_ea": "Email", + "ownr_ph1": "Phone 1", "pay_date": "Inspection Date", - "phone1": "Phone 1", "phoneshort": "PH", "policy_no": "Policy #", "ponumber": "PO Number", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index e63c16e79..cd63a7ec9 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -125,8 +125,8 @@ "owner": "Propietario", "owner_owing": "Cust. Debe", "ownr_ea": "Email", + "ownr_ph1": "Teléfono 1", "pay_date": "Fecha de inspección", - "phone1": "Teléfono 1", "phoneshort": "PH", "policy_no": "Política #", "ponumber": "numero postal", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index cf8401ff1..5747198fe 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -125,8 +125,8 @@ "owner": "Propriétaire", "owner_owing": "Cust. Owes", "ownr_ea": "Email", + "ownr_ph1": "Téléphone 1", "pay_date": "Date d'inspection", - "phone1": "Téléphone 1", "phoneshort": "PH", "policy_no": "Politique #", "ponumber": "Numéro de bon de commande",