From cdb4da9e5fb124e84039c73e5b4babd7a5ce39bd Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Tue, 5 Oct 2021 09:40:25 -0700 Subject: [PATCH] IO-1412 Resolve production list saving and loading. --- ...ction-list-save-config-button.component.jsx | 7 +------ ...uction-list-table-view-select.component.jsx | 18 ++++++++++++++++++ .../production-list-table.component.jsx | 11 +++++------ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/client/src/components/production-list-save-config-button/production-list-save-config-button.component.jsx b/client/src/components/production-list-save-config-button/production-list-save-config-button.component.jsx index 0f7381c84..246177367 100644 --- a/client/src/components/production-list-save-config-button/production-list-save-config-button.component.jsx +++ b/client/src/components/production-list-save-config-button/production-list-save-config-button.component.jsx @@ -66,12 +66,7 @@ export function ProductionListSaveConfigButton({ }; const popMenu = (
-
+ { + if (a.useremail !== currentUser.email) return a; + return { ...a, default_prod_list_view: value }; + }); + }, + }, + }); + }, }); } }; @@ -85,13 +98,18 @@ export function ProductionListTable({ setState(bodyshop.production_config[0].columns.tableState); }; + const assoc = bodyshop.associations.find( + (a) => a.useremail === currentUser.email + ); + const defaultView = assoc && assoc.default_prod_list_view; return (