diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-11 18:08:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-11 18:08:21 +0300 |
commit | ed94a4dd903dc4d20cbc1bce330b9c1b7a5f7fbf (patch) | |
tree | e77f48da26680f6e949604cab506cf137515b05c /app/assets/javascripts/boards | |
parent | fc0afaf7da2156e91e615662272811eee56d034a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/boards')
6 files changed, 17 insertions, 31 deletions
diff --git a/app/assets/javascripts/boards/components/board_app.vue b/app/assets/javascripts/boards/components/board_app.vue index 1335a3b108b..970e3509d20 100644 --- a/app/assets/javascripts/boards/components/board_app.vue +++ b/app/assets/javascripts/boards/components/board_app.vue @@ -11,7 +11,7 @@ export default { BoardSettingsSidebar, BoardTopBar, }, - inject: ['disabled', 'fullBoardId'], + inject: ['fullBoardId'], computed: { ...mapGetters(['isSidebarOpen']), }, @@ -27,7 +27,7 @@ export default { <template> <div class="boards-app gl-relative" :class="{ 'is-compact': isSidebarOpen }"> <board-top-bar /> - <board-content :disabled="disabled" :board-id="fullBoardId" /> + <board-content :board-id="fullBoardId" /> <board-settings-sidebar /> </div> </template> diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue index f3307977be9..0c64cbad5b1 100644 --- a/app/assets/javascripts/boards/components/board_card.vue +++ b/app/assets/javascripts/boards/components/board_card.vue @@ -9,6 +9,7 @@ export default { BoardCardInner, }, mixins: [Tracking.mixin()], + inject: ['disabled'], props: { list: { type: Object, @@ -20,11 +21,6 @@ export default { default: () => ({}), required: false, }, - disabled: { - type: Boolean, - default: false, - required: false, - }, index: { type: Number, default: 0, @@ -35,6 +31,11 @@ export default { default: false, required: false, }, + canAdmin: { + type: Boolean, + required: false, + default: true, + }, }, computed: { ...mapState(['selectedBoardItems', 'activeId']), @@ -48,10 +49,10 @@ export default { ); }, isDisabled() { - return this.disabled || !this.item.id || this.item.isLoading; + return this.disabled || !this.item.id || this.item.isLoading || !this.canAdmin; }, isDraggable() { - return !this.disabled && this.item.id && !this.item.isLoading; + return !this.isDisabled; }, cardStyle() { return this.isColorful && this.item.color ? { borderColor: this.item.color } : ''; diff --git a/app/assets/javascripts/boards/components/board_column.vue b/app/assets/javascripts/boards/components/board_column.vue index 8fc76c02e14..b728b8dd22a 100644 --- a/app/assets/javascripts/boards/components/board_column.vue +++ b/app/assets/javascripts/boards/components/board_column.vue @@ -20,10 +20,6 @@ export default { default: () => ({}), required: false, }, - disabled: { - type: Boolean, - required: true, - }, }, computed: { ...mapState(['filterParams', 'highlightedLists']), @@ -87,8 +83,8 @@ export default { class="board-inner gl-display-flex gl-flex-direction-column gl-relative gl-h-full gl-rounded-base gl-bg-gray-50" :class="{ 'board-column-highlighted': highlighted }" > - <board-list-header :list="list" :disabled="disabled" /> - <board-list ref="board-list" :disabled="disabled" :board-items="listItems" :list="list" /> + <board-list-header :list="list" /> + <board-list ref="board-list" :board-items="listItems" :list="list" /> </div> </div> </template> diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue index 1d585e3407b..92f79e61f14 100644 --- a/app/assets/javascripts/boards/components/board_content.vue +++ b/app/assets/javascripts/boards/components/board_content.vue @@ -36,13 +36,10 @@ export default { 'isIssueBoard', 'isEpicBoard', 'isGroupBoard', + 'disabled', 'isApolloBoard', ], props: { - disabled: { - type: Boolean, - required: true, - }, boardId: { type: String, required: true, @@ -177,7 +174,6 @@ export default { ref="board" :list="list" :data-draggable-item-type="$options.draggableItemTypes.list" - :disabled="disabled" :class="{ 'gl-xs-display-none!': addColumnFormVisible }" /> @@ -191,7 +187,6 @@ export default { ref="swimlanes" :lists="boardListsToUse" :can-admin-list="canAdminList" - :disabled="disabled" :style="{ height: boardHeight }" /> diff --git a/app/assets/javascripts/boards/components/board_list.vue b/app/assets/javascripts/boards/components/board_list.vue index 215691c7ba2..060a708a22f 100644 --- a/app/assets/javascripts/boards/components/board_list.vue +++ b/app/assets/javascripts/boards/components/board_list.vue @@ -31,12 +31,8 @@ export default { BoardCardMoveToPosition, }, mixins: [Tracking.mixin()], - inject: ['isEpicBoard'], + inject: ['isEpicBoard', 'disabled'], props: { - disabled: { - type: Boolean, - required: true, - }, list: { type: Object, required: true, @@ -314,7 +310,6 @@ export default { :list="list" :item="item" :data-draggable-item-type="$options.draggableItemTypes.card" - :disabled="disabled" :show-work-item-type-icon="!isEpicBoard" > <!-- TODO: remove the condition when https://gitlab.com/gitlab-org/gitlab/-/issues/377862 is resolved --> diff --git a/app/assets/javascripts/boards/components/board_list_header.vue b/app/assets/javascripts/boards/components/board_list_header.vue index bfc4b52baaf..14dff8de70f 100644 --- a/app/assets/javascripts/boards/components/board_list_header.vue +++ b/app/assets/javascripts/boards/components/board_list_header.vue @@ -60,6 +60,9 @@ export default { isEpicBoard: { default: false, }, + disabled: { + default: true, + }, }, props: { list: { @@ -67,10 +70,6 @@ export default { default: () => ({}), required: false, }, - disabled: { - type: Boolean, - required: true, - }, isSwimlanesHeader: { type: Boolean, required: false, |