diff --git a/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx b/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx index 892ce67d5..9a2daff8a 100644 --- a/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx +++ b/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx @@ -142,7 +142,8 @@ function FiltersSection({filters, form, bodyshop}) { return generateInternalReflections({ bodyshop, upperPath, - finalPath + finalPath, + t }); }; diff --git a/client/src/components/report-center-modal/report-center-modal-utils.js b/client/src/components/report-center-modal/report-center-modal-utils.js index b8a9e8adf..d78405cfd 100644 --- a/client/src/components/report-center-modal/report-center-modal-utils.js +++ b/client/src/components/report-center-modal/report-center-modal-utils.js @@ -56,19 +56,26 @@ const generateOptionsFromObject = (bodyshop, path, labelPath, valuePath) => { * Generate special reflections * @param bodyshop * @param finalPath + * @param t - i18n * @returns {{label: *, value: *}[]|{label: *, value: *}[]|{label: string, value: *}[]|*[]} */ -const generateSpecialReflections = (bodyshop, finalPath) => { +const generateSpecialReflections = (bodyshop, finalPath, t) => { switch (finalPath) { case 'payment_payers': return [ { - label: 'Customer', - value: 'Customer' + label: t("payments.labels.customer"), + value: t("payments.labels.customer"), }, { - label: 'Insurance', - value: 'Insurance' + label: t("payments.labels.insurance"), + value: t("payments.labels.insurance"), + }, + // This is a weird one supposedly only used by one shop and could potentially be + // placed behind a SplitSDK + { + label: t("payments.labels.external"), + value: t("payments.labels.external"), } ]; case 'payment_types': @@ -137,12 +144,13 @@ const generateBodyshopReflections = (bodyshop, finalPath) => { * @param bodyshop * @param upperPath * @param finalPath + * @param t - i18n * @returns {{label: *, value: *}[]|[]|{label: *, value: *}[]|{label: string, value: *}[]|{label: *, value: *}[]|*[]} */ -const generateInternalReflections = ({bodyshop, upperPath, finalPath}) => { +const generateInternalReflections = ({bodyshop, upperPath, finalPath, t}) => { switch (upperPath) { case 'special': - return generateSpecialReflections(bodyshop, finalPath); + return generateSpecialReflections(bodyshop, finalPath, t); case 'bodyshop': return generateBodyshopReflections(bodyshop, finalPath); default: