import { CREATE_REPORT_NOTE, REPORT, UPDATE_REPORT } from "@/graphql/report";
import { IReport, IReportNote } from "@/types/report.model";
-import { displayNameAndUsername, usernameWithDomain } from "@/types/actor";
+import {
+ IPerson,
+ displayNameAndUsername,
+ usernameWithDomain,
+} from "@/types/actor";
import { DELETE_EVENT } from "@/graphql/event";
import uniq from "lodash/uniq";
import { nl2br } from "@/utils/html";
@@ -344,6 +346,8 @@ import { Notifier } from "@/plugins/notifier";
import EventCard from "@/components/Event/EventCard.vue";
import { useFeatures } from "@/composition/apollo/config";
import { IEvent } from "@/types/event.model";
+import EmptyContent from "@/components/Utils/EmptyContent.vue";
+import EventComment from "@/components/Comment/EventComment.vue";
const router = useRouter();
@@ -381,6 +385,14 @@ const errors = ref
([]);
const noteContent = ref("");
+const reportedContent = computed(() => {
+ return [...(report.value?.events ?? []), ...(report.value?.comments ?? [])];
+});
+
+const isOnlyReportedContent = computed(
+ () => reportedContent.value.length === 1
+);
+
const {
mutate: createReportNoteMutation,
onDone: createReportNoteMutationDone,
@@ -426,13 +438,23 @@ createReportNoteMutationError((error) => {
const dialog = inject