Relation picker module (#335)

- Created a relation picker module
- Added a CustomeEntityForSelect type
This commit is contained in:
Lucas Bordeau
2023-06-20 11:06:53 +02:00
committed by GitHub
parent c120903a45
commit e2eb40c1ea
9 changed files with 64 additions and 50 deletions

View File

@ -8,8 +8,8 @@ import {
useRemoveCommentThreadTargetOnCommentThreadMutation,
} from '~/generated/graphql';
import { EntityForSelect } from '../components/MultipleEntitySelect';
import { GET_COMMENT_THREADS_BY_TARGETS } from '../services';
import { CommentableEntityForSelect } from '../types/CommentableEntityForSelect';
import { CommentThreadForDrawer } from '../types/CommentThreadForDrawer';
export function useHandleCheckableCommentThreadTargetChange({
@ -37,7 +37,7 @@ export function useHandleCheckableCommentThreadTargetChange({
return function handleCheckItemChange(
newCheckedValue: boolean,
entity: EntityForSelect,
entity: CommentableEntityForSelect,
) {
if (newCheckedValue) {
addCommentThreadTargetOnCommentThread({