From b3152bf245611d71416ac85371ad1245d6702daa Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Tue, 27 Feb 2018 19:44:10 +0200 Subject: [PATCH] Move AssigneeTitle vue component --- .../boards/components/board_sidebar.js | 2 +- .../components/assignees/assignee_title.js | 59 ----------------- .../components/assignees/assignee_title.vue | 64 +++++++++++++++++++ .../assignees/sidebar_assignees.vue | 2 +- ...ctor-move-assignee-title-vue-component.yml | 5 ++ .../sidebar/assignee_title_spec.js | 2 +- 6 files changed, 72 insertions(+), 62 deletions(-) delete mode 100644 app/assets/javascripts/sidebar/components/assignees/assignee_title.js create mode 100644 app/assets/javascripts/sidebar/components/assignees/assignee_title.vue create mode 100644 changelogs/unreleased/refactor-move-assignee-title-vue-component.yml diff --git a/app/assets/javascripts/boards/components/board_sidebar.js b/app/assets/javascripts/boards/components/board_sidebar.js index 9501e35b178..d1a5a3a2253 100644 --- a/app/assets/javascripts/boards/components/board_sidebar.js +++ b/app/assets/javascripts/boards/components/board_sidebar.js @@ -5,7 +5,7 @@ import Flash from '../../flash'; import { __ } from '../../locale'; import Sidebar from '../../right_sidebar'; import eventHub from '../../sidebar/event_hub'; -import assigneeTitle from '../../sidebar/components/assignees/assignee_title'; +import assigneeTitle from '../../sidebar/components/assignees/assignee_title.vue'; import assignees from '../../sidebar/components/assignees/assignees.vue'; import DueDateSelectors from '../../due_date_select'; import './sidebar/remove_issue'; diff --git a/app/assets/javascripts/sidebar/components/assignees/assignee_title.js b/app/assets/javascripts/sidebar/components/assignees/assignee_title.js deleted file mode 100644 index 129ba2e4e89..00000000000 --- a/app/assets/javascripts/sidebar/components/assignees/assignee_title.js +++ /dev/null @@ -1,59 +0,0 @@ -export default { - name: 'AssigneeTitle', - props: { - loading: { - type: Boolean, - required: false, - default: false, - }, - numberOfAssignees: { - type: Number, - required: true, - }, - editable: { - type: Boolean, - required: true, - }, - showToggle: { - type: Boolean, - required: false, - default: false, - }, - }, - computed: { - assigneeTitle() { - const assignees = this.numberOfAssignees; - return assignees > 1 ? `${assignees} Assignees` : 'Assignee'; - }, - }, - template: ` -
- {{assigneeTitle}} -