diff --git a/package.json b/package.json
index e80a9a5ba..08943e1f5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hawk.so",
- "version": "1.1.6",
+ "version": "1.1.7",
"private": true,
"scripts": {
"dev": "vite",
@@ -18,7 +18,7 @@
},
"dependencies": {
"@codexteam/ui": "0.2.0-rc.4",
- "@hawk.so/javascript": "3.2.20-catcher-ws-conn.8a0320b",
+ "@hawk.so/javascript": "3.2.21",
"@hawk.so/types": "^0.5.9",
"axios": "^1.12.2",
"codex-notifier": "^1.1.2",
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 fd051bd8c..72b4e2060 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 {
@@ -199,3 +200,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 1ee75a1e0..e042fe79f 100644
--- a/src/api/events/queries.ts
+++ b/src/api/events/queries.ts
@@ -157,3 +157,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..6c96c395f
--- /dev/null
+++ b/src/components/event/EventActionsMenu.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
diff --git a/src/components/event/EventHeader.vue b/src/components/event/EventHeader.vue
index 570fc80c6..fa09e796b 100644
--- a/src/components/event/EventHeader.vue
+++ b/src/components/event/EventHeader.vue
@@ -1,12 +1,21 @@