From 0fe0c9ddd2981f986ee350f5827c4741245b6e90 Mon Sep 17 00:00:00 2001 From: Felipe Fernandes Date: Sat, 31 Jan 2026 20:17:45 -0300 Subject: [PATCH] feat: add retrospective export functionality - Add export button with dropdown menu (JSON, Markdown, PDF options) - Create ExportRetroButton component with click-outside dropdown behavior - Add DownloadIcon component - Add exportRetrospective API function and endpoint Co-Authored-By: Claude Opus 4.5 --- src/components/core/ExportRetroButton.vue | 101 ++++++++++++++++++ src/components/icons/DownloadIcon.vue | 19 ++++ .../retrospective/RetrospectiveLayout.vue | 2 + src/services/index.ts | 3 + src/services/retrospectiveApi.ts | 30 +++++- 5 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 src/components/core/ExportRetroButton.vue create mode 100644 src/components/icons/DownloadIcon.vue diff --git a/src/components/core/ExportRetroButton.vue b/src/components/core/ExportRetroButton.vue new file mode 100644 index 0000000..f3ea65f --- /dev/null +++ b/src/components/core/ExportRetroButton.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/components/icons/DownloadIcon.vue b/src/components/icons/DownloadIcon.vue new file mode 100644 index 0000000..f6cd390 --- /dev/null +++ b/src/components/icons/DownloadIcon.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/components/retrospective/RetrospectiveLayout.vue b/src/components/retrospective/RetrospectiveLayout.vue index dffd124..d195dd0 100644 --- a/src/components/retrospective/RetrospectiveLayout.vue +++ b/src/components/retrospective/RetrospectiveLayout.vue @@ -4,6 +4,7 @@ import ModalifyComponent from '../core/ModalifyComponent.vue'; import QuestionLayout from '../question/QuestionLayout.vue'; import ShareRetro from '../core/ShareRetroButton.vue'; + import ExportRetro from '../core/ExportRetroButton.vue'; import CreateQuestion from '../question/CreateQuestion.vue'; import { storeToRefs } from 'pinia'; import { RouterLink } from 'vue-router'; @@ -28,6 +29,7 @@
+ > => { + const result = await apiRequest + .post( + Endpoints.RetrospectiveExport, + { + retrospective_id: retrospectiveId, + export_type: exportType, + }, + { responseType: 'blob' }, + ) + .catch(() => null); + + if (!result) return { error: true }; + + return result.data; +}; + +export default { + createRetrospective, + getRetrospective, + deleteRestrospective, + updateRetrospective, + exportRetrospective, +};