From 90152fc613c6bc6fe787a97c3dc0119ff6a7ce0b Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 4 Jun 2020 13:44:43 -0700 Subject: [PATCH] Added viewing all CSI responses + read only version of configurable form BOD-154 --- bodyshop_translations.babel | 110 ++++++++++++ .../accounting-payables-table.component.jsx | 2 +- .../checkbox/checkbox.component.jsx | 9 +- .../config-form-components.component.jsx | 14 +- .../rate/rate.component.jsx | 7 +- .../slider/slider.component.jsx | 7 +- .../text/text.component.jsx | 7 +- .../textarea/textarea.component.jsx | 7 +- .../csi-response-form.container.jsx | 43 +++++ .../csi-response-list-paginated.component.jsx | 159 ++++++++++++++++++ .../form-date-time-picker.component.jsx | 2 +- .../components/header/header.component.jsx | 3 + .../invoice-export-all-button.component.jsx | 2 +- .../jobs-detail-header-actions.component.jsx | 33 ++-- .../jobs-detail-header.component.jsx | 23 ++- .../jobs-list-paginated.component.jsx | 9 +- .../schedule-day-view.component.jsx | 1 - .../schedule-job-modal.component.jsx | 4 +- client/src/graphql/csi.queries.js | 40 +++++ .../pages/manage/manage.page.component.jsx | 8 + .../shop-csi/shop-csi.container.page.jsx | 79 +++++++++ client/src/translations/en_us/common.json | 9 +- client/src/translations/es/common.json | 7 + client/src/translations/fr/common.json | 7 + .../down.yaml | 36 ++++ .../up.yaml | 36 ++++ hasura/migrations/metadata.yaml | 1 + 27 files changed, 615 insertions(+), 50 deletions(-) create mode 100644 client/src/components/csi-response-form/csi-response-form.container.jsx create mode 100644 client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx create mode 100644 client/src/pages/shop-csi/shop-csi.container.page.jsx create mode 100644 hasura/migrations/1591292925100_update_permission_user_public_table_csi/down.yaml create mode 100644 hasura/migrations/1591292925100_update_permission_user_public_table_csi/up.yaml diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index c9ef73550..f3058c0ef 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -4169,9 +4169,56 @@ + + fields + + + completedon + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + labels + + noneselected + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + title false @@ -12480,6 +12527,27 @@ + + shop_csi + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + shop_templates false @@ -15698,6 +15766,27 @@ + + shop-csi + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + shop-templates false @@ -16246,6 +16335,27 @@ + + shop-csi + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + shop-templates false diff --git a/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx b/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx index 87598f74b..ffe3badfa 100644 --- a/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx +++ b/client/src/components/accounting-payables-table/accounting-payables-table.component.jsx @@ -128,7 +128,7 @@ export default function AccountingPayablesTableComponent({ ), }, ]; - console.log("transInProgress", transInProgress); + const handleSearch = (e) => { setState({ ...state, search: e.target.value }); }; diff --git a/client/src/components/config-form-components/checkbox/checkbox.component.jsx b/client/src/components/config-form-components/checkbox/checkbox.component.jsx index 5e80707bd..8b407dc65 100644 --- a/client/src/components/config-form-components/checkbox/checkbox.component.jsx +++ b/client/src/components/config-form-components/checkbox/checkbox.component.jsx @@ -2,21 +2,22 @@ import React from "react"; import { Form, Checkbox } from "antd"; import { useTranslation } from "react-i18next"; -export default function JobIntakeFormCheckboxComponent({ formItem }) { +export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) { const { name, label, required } = formItem; const { t } = useTranslation(); return ( - + ]} + > + ); } diff --git a/client/src/components/config-form-components/config-form-components.component.jsx b/client/src/components/config-form-components/config-form-components.component.jsx index 419689402..0961de1dc 100644 --- a/client/src/components/config-form-components/config-form-components.component.jsx +++ b/client/src/components/config-form-components/config-form-components.component.jsx @@ -5,21 +5,23 @@ import Text from "./text/text.component"; import Textarea from "./textarea/textarea.component"; import Rate from "./rate/rate.component"; -export default function ConfirmFormComponents({ componentList }) { +export default function ConfirmFormComponents({ componentList, readOnly }) { return (
{componentList.map((f, idx) => { switch (f.type) { case "checkbox": - return ; + return ( + + ); case "slider": - return ; + return ; case "text": - return ; + return ; case "textarea": - return