Replace entityId by recordId in the front end. (#6355)

Hey @lucasbordeau, I replaced every `entityId` with `recordId` in the
frontend.

### Some clarifications:

1. At [this
line](0b207d26b6 (diff-b4f415dd1f060307ad61f64394ee96b2912f6015e26c7fd2eab4b8c6a84d2d07L14)),
I changed `recordId` to `selectedRecordId` because that component has
`entityId` defined in code at [this
line](0b207d26b6 (diff-b4f415dd1f060307ad61f64394ee96b2912f6015e26c7fd2eab4b8c6a84d2d07L55))
which was to be changed to `recordId`. To avoid repeated constants, I
changed the arguments to `selectedRecordIds`.

2. At the following links:
- [File
1](0b207d26b6 (diff-52b780bdd4cfc582ca7e1b457dbbd63733bfbb7790fc421054bbd2dbf0389e16))
- [File
2](0b207d26b6 (diff-6d47cb9a59dfcf6b1495937084ae799a61da6afccb21208f04ce8e1f5afca0e4))
- [File
3](0b207d26b6 (diff-821815783f9968f1da3cd437fc9d1d1666d12dc331d279cc5fbd9817bc2df2bf))

It seems to be the tests. As I can see, it is checking for both
`objectFilterDropdownSelectedEntityIdState` and
`objectFilterDropdownSelectedRecordIdsState`. Since `entityIds` are
supposed to be removed and `recordedId` state is already being checked,
I commented out all the `entityidState` code. If they are to be removed
or uncommented, please let me know, and I will do as expected.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
nitin
2024-08-07 12:22:57 +05:30
committed by GitHub
parent 0c99bfbc31
commit a7941315e7
102 changed files with 303 additions and 310 deletions

View File

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