diff --git a/specifyweb/frontend/js_src/lib/components/Forms/ShowResource.tsx b/specifyweb/frontend/js_src/lib/components/Forms/ShowResource.tsx index fc198c77c2d..550f63fccda 100644 --- a/specifyweb/frontend/js_src/lib/components/Forms/ShowResource.tsx +++ b/specifyweb/frontend/js_src/lib/components/Forms/ShowResource.tsx @@ -15,11 +15,11 @@ import { getModel, schema } from '../DataModel/schema'; import type { RecordSet } from '../DataModel/types'; import { RecordSetWrapper } from '../FormSliders/RecordSet'; import { useMenuItem } from '../Header/useMenuItem'; +import { interactionTables } from '../Interactions/config'; import { ProtectedTable } from '../Permissions/PermissionDenied'; import { NotFoundView } from '../Router/NotFoundView'; import { locationToState, useStableLocation } from '../Router/RouterState'; import { CheckLoggedInCollection, ViewResourceByGuid } from './DataTask'; -import { interactionTables } from '../Interactions/config'; export function ShowResource({ resource, @@ -63,7 +63,7 @@ export function ShowResource({ useErrorContext('resource', resource); useMenuItem( - typeof recordSet === 'object' + typeof recordSetId === 'number' ? 'recordSets' : interactionTables.has(resource.specifyModel.name) ? 'interactions' diff --git a/specifyweb/frontend/js_src/lib/components/Interactions/config.ts b/specifyweb/frontend/js_src/lib/components/Interactions/config.ts index 0761f0b863b..cfb7a98f672 100644 --- a/specifyweb/frontend/js_src/lib/components/Interactions/config.ts +++ b/specifyweb/frontend/js_src/lib/components/Interactions/config.ts @@ -37,4 +37,5 @@ export const interactionTables: ReadonlySet = new Set< 'LoanReturnPreparation', 'Permit', 'PermitAttachment', + 'RepositoryAgreement', ]); diff --git a/specifyweb/frontend/js_src/lib/components/Molecules/AutoComplete.tsx b/specifyweb/frontend/js_src/lib/components/Molecules/AutoComplete.tsx index 3b7bb38455f..d3051ea387e 100644 --- a/specifyweb/frontend/js_src/lib/components/Molecules/AutoComplete.tsx +++ b/specifyweb/frontend/js_src/lib/components/Molecules/AutoComplete.tsx @@ -1,3 +1,4 @@ +import type { Placement } from '@floating-ui/react'; import { Combobox } from '@headlessui/react'; import React from 'react'; import _ from 'underscore'; @@ -17,6 +18,7 @@ import type { TagProps } from '../Atoms/wrapper'; import { softFail } from '../Errors/Crash'; import { userPreferences } from '../Preferences/userPreferences'; import { Portal } from './Portal'; +import type { titlePosition } from './Tooltips'; const debounceRate = 300; @@ -102,7 +104,9 @@ export function AutoComplete({ | 'onKeyDown' | 'readOnly' | 'value' - >; + > & { + readonly [titlePosition]?: Placement; + }; readonly value: string; /* * For low-level access to the value in the input box before user finished