From 8ce5f87d5df0647453c53eeaa8ce1a18cc2e1df1 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Sun, 8 Sep 2019 18:23:39 +0900 Subject: [PATCH] Implement label creation/deletion button --- frontend/api/routes/labels.js | 1 + .../containers/LabelCreationButton.vue | 30 ++++++ .../containers/LabelDeletionButton.vue | 35 +++++++ .../containers/MemberAdditionButton.vue | 2 +- .../containers/MemberDeletionButton.vue | 24 ++--- .../containers/ProjectCreationButton.vue | 2 +- .../containers/ProjectDeletionButton.vue | 24 ++--- .../components/organisms/ConfirmDialog.vue | 80 +++++++++++++++ .../organisms/LabelCreationForm.vue | 99 +++++++++++++++++++ .../organisms/MemberDeletionForm.vue | 47 --------- .../organisms/ProjectDeletionForm.vue | 47 --------- frontend/pages/projects/_id/labels/index.vue | 68 ++----------- frontend/store/labels.js | 6 +- 13 files changed, 275 insertions(+), 190 deletions(-) create mode 100644 frontend/components/containers/LabelCreationButton.vue create mode 100644 frontend/components/containers/LabelDeletionButton.vue create mode 100644 frontend/components/organisms/ConfirmDialog.vue create mode 100644 frontend/components/organisms/LabelCreationForm.vue delete mode 100644 frontend/components/organisms/MemberDeletionForm.vue delete mode 100644 frontend/components/organisms/ProjectDeletionForm.vue diff --git a/frontend/api/routes/labels.js b/frontend/api/routes/labels.js index 8ad71038..8efb1b15 100644 --- a/frontend/api/routes/labels.js +++ b/frontend/api/routes/labels.js @@ -23,6 +23,7 @@ router.post('/', (req, res) => { background_color: req.body.background_color, text_color: '#ffffff' } + db.push(label) res.json(label) }) diff --git a/frontend/components/containers/LabelCreationButton.vue b/frontend/components/containers/LabelCreationButton.vue new file mode 100644 index 00000000..c330c3bd --- /dev/null +++ b/frontend/components/containers/LabelCreationButton.vue @@ -0,0 +1,30 @@ + + + diff --git a/frontend/components/containers/LabelDeletionButton.vue b/frontend/components/containers/LabelDeletionButton.vue new file mode 100644 index 00000000..cb184c64 --- /dev/null +++ b/frontend/components/containers/LabelDeletionButton.vue @@ -0,0 +1,35 @@ + + + diff --git a/frontend/components/containers/MemberAdditionButton.vue b/frontend/components/containers/MemberAdditionButton.vue index 5e2d82e7..6e7d8f67 100644 --- a/frontend/components/containers/MemberAdditionButton.vue +++ b/frontend/components/containers/MemberAdditionButton.vue @@ -1,6 +1,6 @@