From 29cd5a28e0d459182af20141a088256c34100ee5 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 12 Apr 2021 14:05:17 -0700 Subject: [PATCH] IO-874 Time Tickets Translation --- bodyshop_translations.babel | 42 +++++++++++++++++++ .../time-ticket-list.component.jsx | 2 +- client/src/pages/csi/csi.container.page.jsx | 25 ++++++++++- client/src/translations/en_us/common.json | 2 + client/src/translations/es/common.json | 2 + client/src/translations/fr/common.json | 2 + 6 files changed, 73 insertions(+), 2 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 7f2407375..715cdad14 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -9851,6 +9851,48 @@ labels + + nologgedinuser + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + nologgedinuser_sub + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + noneselected false diff --git a/client/src/components/time-ticket-list/time-ticket-list.component.jsx b/client/src/components/time-ticket-list/time-ticket-list.component.jsx index 1fba7089d..800044313 100644 --- a/client/src/components/time-ticket-list/time-ticket-list.component.jsx +++ b/client/src/components/time-ticket-list/time-ticket-list.component.jsx @@ -73,7 +73,7 @@ export default function TimeTicketList({ .filter(onlyUnique) .map((s) => { return { - text: s, //|| "No Status*", + text: s === "timetickets.labels.shift" ? t(s) : s, //|| "No Status*", value: [s], }; }) || [], diff --git a/client/src/pages/csi/csi.container.page.jsx b/client/src/pages/csi/csi.container.page.jsx index 12b5acb6e..50e9f5a0f 100644 --- a/client/src/pages/csi/csi.container.page.jsx +++ b/client/src/pages/csi/csi.container.page.jsx @@ -7,8 +7,19 @@ import AlertComponent from "../../components/alert/alert.component"; import ConfigFormComponents from "../../components/config-form-components/config-form-components.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import { QUERY_SURVEY, COMPLETE_SURVEY } from "../../graphql/csi.queries"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { selectCurrentUser } from "../../redux/user/user.selectors"; -export default function CsiContainerPage() { +const mapStateToProps = createStructuredSelector({ + currentUser: selectCurrentUser, +}); +const mapDispatchToProps = (dispatch) => ({ + //setUserLanguage: language => dispatch(setUserLanguage(language)) +}); +export default connect(mapStateToProps, mapDispatchToProps)(CsiContainerPage); + +export function CsiContainerPage({ currentUser }) { const { surveyId } = useParams(); const [form] = Form.useForm(); const [submitting, setSubmitting] = useState({ @@ -69,6 +80,18 @@ export default function CsiContainerPage() { csiquestion: { config: csiquestions }, } = data.csi_by_pk; + if (currentUser) + return ( + + + + ); return (