Upgrade relation picker (#8795)

- Rename all parts using the name "relation" to "record" when component
is only selecting record
- Remove the use of scope states in folder
- Rename entities to records

This PR prepares the use of the record picker in workflows
This commit is contained in:
Thomas Trompette
2024-11-28 18:08:39 +01:00
committed by GitHub
parent d73dc1a728
commit 83223eeae3
62 changed files with 585 additions and 687 deletions

View File

@ -16,14 +16,14 @@ export const useRecordsForSelect = ({
sortOrder = 'AscNullsLast',
selectedIds,
limit,
excludeRecordIds = [],
excludedRecordIds = [],
objectNameSingular,
}: {
searchFilterText: string;
sortOrder?: OrderBy;
selectedIds: string[];
limit?: number;
excludeRecordIds?: string[];
excludedRecordIds?: string[];
objectNameSingular: string;
}) => {
const { mapToObjectRecordIdentifier } = useMapToObjectRecordIdentifier({
@ -91,7 +91,7 @@ export const useRecordsForSelect = ({
skip: !selectedIds.length,
});
const notFilterIds = [...selectedIds, ...excludeRecordIds];
const notFilterIds = [...selectedIds, ...excludedRecordIds];
const notFilter = notFilterIds.length
? { not: { id: { in: notFilterIds } } }
: undefined;