Use twentyORM in Timeline messaging (#6595)
- Remove raw queries and replace them by using `twentyORM` - Refactor into services and utils --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -42,8 +42,8 @@ export const MultiSelectFieldInput = ({
|
||||
const [searchFilter, setSearchFilter] = useState('');
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const selectedOptions = fieldDefinition.metadata.options.filter((option) =>
|
||||
fieldValues?.includes(option.value),
|
||||
const selectedOptions = fieldDefinition.metadata.options.filter(
|
||||
(option) => fieldValues?.includes(option.value),
|
||||
);
|
||||
|
||||
const optionsInDropDown = fieldDefinition.metadata.options;
|
||||
|
||||
@ -69,7 +69,7 @@ export const RecordDetailRelationSection = ({
|
||||
const relationRecords: ObjectRecord[] =
|
||||
fieldValue && isToOneObject
|
||||
? [fieldValue as ObjectRecord]
|
||||
: ((fieldValue as ObjectRecord[]) ?? []);
|
||||
: (fieldValue as ObjectRecord[]) ?? [];
|
||||
|
||||
const relationRecordIds = relationRecords.map(({ id }) => id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user