From d467cc3cd671f096f202e530fdbd920ce491254a Mon Sep 17 00:00:00 2001 From: Santiago Palenque Date: Fri, 2 Oct 2026 18:26:03 -0300 Subject: [PATCH 1/4] feat: add new show archived control and apply it on all grids with it --- src/components/CustomTheme.js | 13 +++++++++++++ src/i18n/en.json | 10 ---------- .../form-template-item-list-page.js | 11 +++++------ .../form-templates/form-template-list-page.js | 7 +++---- .../inventory/inventory-list-page.js | 11 +++++------ .../page-templates/page-template-list-page.js | 11 +++++------ .../sponsors/show-pages-list-page/index.js | 11 +++++------ .../sponsor-form-item-list-page/index.js | 11 +++++------ .../sponsors/sponsor-forms-list-page/index.js | 14 +++++++------- .../sponsor-forms-manage-items.js | 13 +++++-------- .../tabs/sponsor-forms-tab/index.js | 13 ++++++------- .../tabs/sponsor-pages-tab/index.js | 13 ++++++------- src/pages/summits/summit-directory-page.js | 19 ++++++++++++++----- 13 files changed, 79 insertions(+), 78 deletions(-) diff --git a/src/components/CustomTheme.js b/src/components/CustomTheme.js index 39732bb6d..992c4c538 100644 --- a/src/components/CustomTheme.js +++ b/src/components/CustomTheme.js @@ -98,6 +98,19 @@ const theme = createTheme(MuiBaseCustomTheme, { }) } }, + // same metrics as a medium MuiButton, so toggles line up with buttons in toolbars + MuiToggleButton: { + styleOverrides: { + root: ({ ownerState }) => ({ + ...(ownerState.size === "medium" && { + fontSize: "14px", + lineHeight: "20px", + padding: "8px 12px", + height: "36px" + }) + }) + } + }, MuiTab: { styleOverrides: { root: { diff --git a/src/i18n/en.json b/src/i18n/en.json index b61ff3547..245be8f51 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -2595,7 +2595,6 @@ }, "forms_tab": { "alert_info": "To add a Sponsor Specific Form for this show's sponsor, click Add Form Template or Create New Form button. Note: this form will be visible only to this sponsor for this show. The General Forms can only be managed on the Show's Forms page.", - "show_archived": "Show archived Forms", "using_template": "Using Template", "new_form": "New Form", "forms": "forms", @@ -2639,7 +2638,6 @@ "add_item": "Add Item", "add_item_inventory": "Add Item from Inventory", "alert_info": "You can add or archive items from the list. To edit an item click on the item's Edit button. You can also change only a rate by clicking on it.", - "show_archived": "Show archived items", "select_items": "Select items", "code": "Code", "name": "Name", @@ -2660,7 +2658,6 @@ }, "pages_tab": { "alert_info": "To add a Sponsor Specific Page for this show's sponsor, click Add Page button. Note: this Page will be visible only to this sponsor for this show. The General Pages can only be managed on the Show's Pages section.", - "show_archived": "Show archived Pages", "using_template": "Using Template", "new_page": "New Page", "pages": "pages", @@ -2865,7 +2862,6 @@ "forms": "Forms", "form": "form", "alert_info": "To add an order form, select Add Form to start the process. To edit an existing form, click on the form name. To edit the line items within the form click manage items on the form line you wish to edit.", - "show_archived": "Show archived", "using_global": "Using Global Template", "add_form": "New Form Template", "code_column_label": "Code", @@ -2928,7 +2924,6 @@ "standard_rate": "Standard rate", "onsite_rate": "On site rate", "default_quantity": "Default quantity", - "show_archived": "Show archived items", "add_item": "Add Item", "add_item_from_inventory": "Add Item from Inventory", "archive_button": "Archive", @@ -2981,7 +2976,6 @@ "info_mod_column_label": "Info Mod", "upload_mod_column_label": "Upload Mod", "download_mod_column_label": "Download Mod", - "show_archived": "Show archived Pages", "filter": "Filter", "sort_by": "Sort By", "all_tiers": "All Tiers", @@ -4096,7 +4090,6 @@ "unarchive_button": "Unarchive", "delete_inventory_item_warning": "Are you sure you want to delete inventory item ", "add_inventory_item": "Create new Item", - "show_archived": "Show archived items", "placeholders": { "search_inventory_items": "Search" } @@ -4153,7 +4146,6 @@ "name_column_label": "Name", "items_column_label": "Items", "manage_items": "Manage Items", - "show_archived": "Show archived forms", "delete_form_template_warning": "Are you sure you want to delete form template ", "using_duplicate": "Using Duplicate", "add_form_template": "New Form", @@ -4193,7 +4185,6 @@ "alert_info": "You can clone, create or archive items from the list. To edit an item click on it.", "code_column_label": "Code", "name_column_label": "Name", - "show_archived": "Show archived items", "add_item": "Add Item", "archive_button": "Archive", "unarchive_button": "Unarchive", @@ -4303,7 +4294,6 @@ "info_mod": "Info Mod", "upload_mod": "Upload Mod", "download_mod": "Download Mod", - "show_archived": "Show archived pages", "no_pages": "No pages found.", "add_new": "New Page", "add_template": "Using Template", diff --git a/src/pages/sponsors-global/form-templates/form-template-item-list-page.js b/src/pages/sponsors-global/form-templates/form-template-item-list-page.js index 778a4f7d8..9d7ebb4b6 100644 --- a/src/pages/sponsors-global/form-templates/form-template-item-list-page.js +++ b/src/pages/sponsors-global/form-templates/form-template-item-list-page.js @@ -156,7 +156,7 @@ const FormTemplateItemListPage = ({ ? unarchiveFormTemplateItem(formTemplateId, item) : archiveFormTemplateItem(formTemplateId, item); - const handleShowArchivedForms = (ev) => { + const handleShowArchivedForms = (archived) => { getFormTemplateItems( formTemplateId, term, @@ -164,7 +164,7 @@ const FormTemplateItemListPage = ({ perPage, order, orderDir, - ev.target.checked + archived ); }; @@ -238,10 +238,9 @@ const FormTemplateItemListPage = ({ {T.translate("form_template_item_list.alert_info")}