From c216295e667cfead6b4d1a6bf799c19e1cafec25 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 12 Apr 2021 15:22:01 -0700 Subject: [PATCH] IO-884 Add special coverage policy indicators. --- bodyshop_translations.babel | 21 +++++++++++++ .../job-detail-lines/job-lines.component.jsx | 30 ++++++++++++++++--- .../jobs-detail-header.component.jsx | 11 ++++++- .../parts-order-modal.component.jsx | 30 +++++++++++++++---- .../parts-order-modal.container.jsx | 2 ++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 8 files changed, 86 insertions(+), 11 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 93d088cbc..ce1c3fcd9 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -21670,6 +21670,27 @@ + + specialcoveragepolicy + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + state_tax_amt false diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index 573addd97..88f6e5df4 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -1,6 +1,20 @@ -import { DeleteFilled, FilterFilled, SyncOutlined } from "@ant-design/icons"; +import { + DeleteFilled, + FilterFilled, + SyncOutlined, + WarningFilled, +} from "@ant-design/icons"; import { useMutation } from "@apollo/client"; -import { Button, Dropdown, Input, Menu, PageHeader, Space, Table } from "antd"; +import { + Button, + Dropdown, + Input, + Menu, + PageHeader, + Space, + Table, + Tag, +} from "antd"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -318,6 +332,15 @@ export function JobLinesComponent({ + + {job.special_coverage_policy && ( + + + + {t("jobs.labels.specialcoveragepolicy")} + + + )} - - { diff --git a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx index 874bf190d..c4ce7a0ca 100644 --- a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx +++ b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx @@ -1,4 +1,5 @@ -import { Card, Col, Row, Tag } from "antd"; +import { Card, Col, Row, Space, Tag } from "antd"; +import { WarningFilled } from "@ant-design/icons"; import React, { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -85,6 +86,14 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) { )} + {job.special_coverage_policy && ( + + + + {t("jobs.labels.specialcoveragepolicy")} + + + )} diff --git a/client/src/components/parts-order-modal/parts-order-modal.component.jsx b/client/src/components/parts-order-modal/parts-order-modal.component.jsx index 33accf3f7..b7b19c4d0 100644 --- a/client/src/components/parts-order-modal/parts-order-modal.component.jsx +++ b/client/src/components/parts-order-modal/parts-order-modal.component.jsx @@ -1,5 +1,14 @@ -import { DeleteFilled } from "@ant-design/icons"; -import { Form, Input, InputNumber, Radio, Typography } from "antd"; +import { DeleteFilled, WarningFilled } from "@ant-design/icons"; +import { + Divider, + Form, + Input, + InputNumber, + Radio, + Space, + Tag, + Typography, +} from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import FormDatePicker from "../form-date-picker/form-date-picker.component"; @@ -13,6 +22,7 @@ export default function PartsOrderModalComponent({ sendTypeState, isReturn, preferredMake, + job, }) { const [sendType, setSendType] = sendTypeState; @@ -23,7 +33,7 @@ export default function PartsOrderModalComponent({ - + + {job && job.special_coverage_policy && ( + + + + {t("jobs.labels.specialcoveragepolicy")} + + + )} - + {t("parts_orders.labels.inthisorder")} - + {(fields, { add, remove, move }) => { return ( @@ -63,7 +81,7 @@ export default function PartsOrderModalComponent({ {fields.map((field, index) => (
- + )} diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index cde10cc5c..da2642d20 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1290,6 +1290,7 @@ "sale_parts": "Sales - Parts & Sublet", "sales": "Sales", "scheduledinchange": "The scheduled in is based off the latest appointment. To change this date, please schedule or reschedule the job. ", + "specialcoveragepolicy": "Special Coverage Policy Applies", "state_tax_amt": "State/Provincial Taxes", "subletstotal": "Sublets Total", "subtotal": "Subtotal", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index d5cc45a58..7e00677a9 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1290,6 +1290,7 @@ "sale_parts": "", "sales": "", "scheduledinchange": "", + "specialcoveragepolicy": "", "state_tax_amt": "", "subletstotal": "", "subtotal": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 072e272cc..1dbed9884 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1290,6 +1290,7 @@ "sale_parts": "", "sales": "", "scheduledinchange": "", + "specialcoveragepolicy": "", "state_tax_amt": "", "subletstotal": "", "subtotal": "",