From d1f9f2356aaf618e5dc364b6bda3ef3233ad530e Mon Sep 17 00:00:00 2001 From: kwhuber Date: Wed, 4 Feb 2026 14:30:01 -0600 Subject: [PATCH 1/3] fix: removed add button from SpAppResource table --- specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx b/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx index d6e482ef971..6a0caa01e6e 100644 --- a/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx +++ b/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx @@ -56,6 +56,7 @@ export const FORBID_ADDING = new Set([ 'SpecifyUser', // See https://github.com/specify/specify7/issues/1754 'Attachment', + 'SpAppResource', ]); /** From 0c26e26f9303649ba51e9a9bc01910296990985c Mon Sep 17 00:00:00 2001 From: kwhuber Date: Tue, 10 Feb 2026 12:47:53 -0600 Subject: [PATCH 2/3] fix: removed add button from collection preferences --- .../frontend/js_src/lib/components/Forms/ResourceView.tsx | 1 - specifyweb/frontend/js_src/lib/components/Forms/Save.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx b/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx index 6a0caa01e6e..d6e482ef971 100644 --- a/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx +++ b/specifyweb/frontend/js_src/lib/components/Forms/ResourceView.tsx @@ -56,7 +56,6 @@ export const FORBID_ADDING = new Set([ 'SpecifyUser', // See https://github.com/specify/specify7/issues/1754 'Attachment', - 'SpAppResource', ]); /** diff --git a/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx b/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx index 1a1f715d42e..5320fa921ff 100644 --- a/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx +++ b/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx @@ -407,7 +407,7 @@ function useEnabledButtons( !NO_CLONE.has(tableName) && !isDisabledCloneAppResource; const showAdd = - !disableAdd.includes(tableName) && !FORBID_ADDING.has(tableName); + !disableAdd.includes(tableName) && !FORBID_ADDING.has(tableName) && !(tableName === 'SpAppResource' && appResourceName === 'CollectionPreferences'); return { showClone, From 3419afc8b1da39ce9fe92989ee5383d93c26f692 Mon Sep 17 00:00:00 2001 From: kwhuber Date: Tue, 10 Feb 2026 18:52:15 +0000 Subject: [PATCH 3/3] Lint code with ESLint and Prettier Triggered by 0c26e26f9303649ba51e9a9bc01910296990985c on branch refs/heads/issue-4950 --- specifyweb/frontend/js_src/lib/components/Forms/Save.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx b/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx index 5320fa921ff..e1a13b4d1f9 100644 --- a/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx +++ b/specifyweb/frontend/js_src/lib/components/Forms/Save.tsx @@ -407,7 +407,12 @@ function useEnabledButtons( !NO_CLONE.has(tableName) && !isDisabledCloneAppResource; const showAdd = - !disableAdd.includes(tableName) && !FORBID_ADDING.has(tableName) && !(tableName === 'SpAppResource' && appResourceName === 'CollectionPreferences'); + !disableAdd.includes(tableName) && + !FORBID_ADDING.has(tableName) && + !( + tableName === 'SpAppResource' && + appResourceName === 'CollectionPreferences' + ); return { showClone,