fix: various fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-11-20 09:35:21 +01:00
parent 3c288c5858
commit b635937091
33 changed files with 579 additions and 129 deletions

View File

@@ -1,6 +1,6 @@
<template>
<o-inputitems
:modelValue="modelValue"
:modelValue="modelValueWithDisplayName"
@update:modelValue="(val: IActor[]) => $emit('update:modelValue', val)"
:data="availableActors"
:allow-autocomplete="true"
@@ -21,10 +21,10 @@ import { SEARCH_PERSON_AND_GROUPS } from "@/graphql/search";
import { IActor, IGroup, IPerson, displayName } from "@/types/actor";
import { Paginate } from "@/types/paginate";
import { useLazyQuery } from "@vue/apollo-composable";
import { ref } from "vue";
import { computed, ref } from "vue";
import ActorInline from "./ActorInline.vue";
defineProps<{
const props = defineProps<{
modelValue: IActor[];
}>();
@@ -32,6 +32,15 @@ defineEmits<{
"update:modelValue": [value: IActor[]];
}>();
const modelValue = computed(() => props.modelValue);
const modelValueWithDisplayName = computed(() =>
modelValue.value.map((actor) => ({
...actor,
displayName: displayName(actor),
}))
);
const {
load: loadSearchPersonsAndGroupsQuery,
refetch: refetchSearchPersonsAndGroupsQuery,