From cfd5aaff87015ae350a0aa2c00cc7ffa4c9ada0f Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 17 Nov 2025 15:00:36 -0500 Subject: [PATCH] feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Checking in verified --- ...p-info.responsibilitycenters.component.jsx | 58 ++++++++++++++++++- client/src/translations/en_us/common.json | 8 +++ client/src/translations/es/common.json | 8 +++ client/src/translations/fr/common.json | 8 +++ 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx index 227d4ca81..b77745d1b 100644 --- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx +++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx @@ -54,9 +54,14 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { []) ]); + const getCenterNames = (path) => { + const centers = form.getFieldValue(path) || []; + return centers.map((i) => i && i.name).filter(Boolean); + }; + const handleBlur = () => { - setCostOptions([...(form.getFieldValue(["md_responsibility_centers", "costs"]).map((i) => i && i.name) || [])]); - setProfitOptions([...(form.getFieldValue(["md_responsibility_centers", "profits"]).map((i) => i && i.name) || [])]); + setCostOptions(getCenterNames(["md_responsibility_centers", "costs"])); + setProfitOptions(getCenterNames(["md_responsibility_centers", "profits"])); }; return ( @@ -430,6 +435,53 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { )} + {bodyshop.rr_dealerid && ( + <> + + + + + + + + + + + + + )} { @@ -2369,7 +2421,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { ({ validator(rule, value) { if (costOptions.includes(value)) { diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index bc070261a..fdd15751e 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -558,6 +558,14 @@ "responsibilitycenter_tax_tier": "Tax {{typeNum}} Tier {{typeNumIterator}}", "responsibilitycenter_tax_type": "Tax {{typeNum}} Type", "responsibilitycenters": { + "gogcode": "GOG Code (BreakOut)", + "item_type": "Item Type", + "item_type_gog": "GOG", + "item_type_paint": "Paint Materials", + "item_type_freight": "Freight", + "taxable_flag": "Taxable?", + "taxable": "Taxable", + "nontaxable": "Non-taxable", "ap": "Accounts Payable", "ar": "Accounts Receivable", "ats": "ATS", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 5617b00d3..0a034686c 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -558,6 +558,14 @@ "responsibilitycenter_tax_tier": "", "responsibilitycenter_tax_type": "", "responsibilitycenters": { + "gogcode": "", + "item_type": "Item Type", + "item_type_gog": "", + "item_type_paint": "", + "item_type_freight": "", + "taxable_flag": "", + "taxable": "", + "nontaxable": "", "ap": "", "ar": "", "ats": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 395ea99ee..050f10a46 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -558,6 +558,14 @@ "responsibilitycenter_tax_tier": "", "responsibilitycenter_tax_type": "", "responsibilitycenters": { + "gogcode": "", + "item_type": "Item Type", + "item_type_gog": "", + "item_type_paint": "", + "item_type_freight": "", + "taxable_flag": "", + "taxable": "", + "nontaxable": "", "ap": "", "ar": "", "ats": "",