Skip to content

Commit 5641349

Browse files
committed
Show 'WithoutPreparations' button for all Interactions
1 parent dda312a commit 5641349

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

specifyweb/frontend/js_src/lib/components/Interactions/InteractionDialog.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ import { AutoGrowTextArea } from '../Molecules/AutoGrowTextArea';
3838
import { Dialog } from '../Molecules/Dialog';
3939
import { userPreferences } from '../Preferences/userPreferences';
4040
import { RecordSetsDialog } from '../Toolbar/RecordSets';
41-
import type {
41+
import {
42+
interactionsWithPrepTables,
4243
InteractionWithPreps,
4344
PreparationData,
4445
PreparationRow,
@@ -288,20 +289,11 @@ export function InteractionDialog({
288289
>
289290
{interactionsText.addUnassociated()}
290291
</Button.Info>
291-
) : actionTable.name === 'Loan' &&
292-
!(
293-
state.type === 'MissingState' && prepsData?.length === 0
294-
) ? (
295-
<Link.Info href={getResourceViewUrl('Loan')}>
292+
) : interactionsWithPrepTables.includes(actionTable.name) ? (
293+
<Link.Info href={getResourceViewUrl(actionTable.name)}>
296294
{interactionsText.withoutPreparations()}
297295
</Link.Info>
298296
) : undefined}
299-
{actionTable.name === 'Gift' &&
300-
itemCollection === undefined && (
301-
<Link.Info href={getResourceViewUrl('Gift')}>
302-
{interactionsText.withoutPreparations()}
303-
</Link.Info>
304-
)}
305297
{state.type === 'MissingState' &&
306298
prepsData?.length !== 0 &&
307299
prepsData ? (

0 commit comments

Comments
 (0)