diff --git a/src/App.vue b/src/App.vue
index ba923701f..74f643f91 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,6 +6,7 @@
>
+
@@ -15,11 +16,13 @@ import { setLanguage } from './i18n';
import { defineComponent } from 'vue';
import FeedbackButton from './components/utils/FeedbackButton.vue';
import notifier from 'codex-notifier';
+import { Popover } from '@codexteam/ui/vue';
export default defineComponent({
name: 'App',
components: {
FeedbackButton,
+ Popover,
},
computed: {
/**
diff --git a/src/api/events/index.ts b/src/api/events/index.ts
index 1296e257a..c46f0604c 100644
--- a/src/api/events/index.ts
+++ b/src/api/events/index.ts
@@ -6,7 +6,8 @@ import {
QUERY_EVENT,
QUERY_EVENT_REPETITIONS_PORTION,
QUERY_PROJECT_DAILY_EVENTS,
- QUERY_CHART_DATA
+ QUERY_CHART_DATA,
+ MUTATION_REMOVE_EVENT
} from './queries';
import * as api from '@/api';
import type {
@@ -196,3 +197,17 @@ export async function fetchChartData(
timezoneOffset,
})).project.event.chartData;
}
+
+/**
+ * Remove event and all related data (repetitions, daily events)
+ * @param projectId - project event is related to
+ * @param eventId — original event id to remove
+ */
+export async function removeEvent(projectId: string, eventId: string): Promise> {
+ return await api.call<{ removeEvent: boolean }>(MUTATION_REMOVE_EVENT, {
+ projectId,
+ eventId,
+ }, undefined, {
+ allowErrors: true,
+ });
+}
diff --git a/src/api/events/queries.ts b/src/api/events/queries.ts
index 1c7a7ab61..f8f950fb6 100644
--- a/src/api/events/queries.ts
+++ b/src/api/events/queries.ts
@@ -156,3 +156,13 @@ export const MUTATION_REMOVE_EVENT_ASSIGNEE = `
}
}
`;
+
+// language=GraphQL
+/**
+ * GraphQL Mutation to remove an event and all related data
+ */
+export const MUTATION_REMOVE_EVENT = `
+ mutation removeEvent($projectId: ID!, $eventId: ID!) {
+ removeEvent(projectId: $projectId, eventId: $eventId)
+ }
+`;
diff --git a/src/components/event/EventActionsMenu.vue b/src/components/event/EventActionsMenu.vue
new file mode 100644
index 000000000..7f70ac26c
--- /dev/null
+++ b/src/components/event/EventActionsMenu.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
diff --git a/src/components/event/EventHeader.vue b/src/components/event/EventHeader.vue
index 570fc80c6..17ed93a69 100644
--- a/src/components/event/EventHeader.vue
+++ b/src/components/event/EventHeader.vue
@@ -1,12 +1,20 @@