diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/assets/javascripts/boards/components | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards/components')
13 files changed, 62 insertions, 63 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_card_inner.vue b/app/assets/javascripts/boards/components/board_card_inner.vue index 05c786ca61d..77df111afc1 100644 --- a/app/assets/javascripts/boards/components/board_card_inner.vue +++ b/app/assets/javascripts/boards/components/board_card_inner.vue @@ -8,7 +8,7 @@ import { GlSprintf, } from '@gitlab/ui'; import { sortBy } from 'lodash'; -import { mapActions, mapGetters, mapState } from 'vuex'; +import { mapActions, mapState } from 'vuex'; import boardCardInner from 'ee_else_ce/boards/mixins/board_card_inner'; import { isScopedLabel } from '~/lib/utils/common_utils'; import { updateHistory } from '~/lib/utils/url_utility'; @@ -43,7 +43,7 @@ export default { GlTooltip: GlTooltipDirective, }, mixins: [boardCardInner], - inject: ['rootPath', 'scopedLabelsAvailable', 'isEpicBoard'], + inject: ['rootPath', 'scopedLabelsAvailable', 'isEpicBoard', 'issuableType', 'isGroupBoard'], props: { item: { type: Object, @@ -77,8 +77,7 @@ export default { }; }, computed: { - ...mapState(['isShowingLabels', 'issuableType', 'allowSubEpics']), - ...mapGetters(['isProjectBoard']), + ...mapState(['isShowingLabels', 'allowSubEpics']), cappedAssignees() { // e.g. maxRender is 4, // Render up to all 4 assignees if there are only 4 assigness @@ -158,7 +157,7 @@ export default { return Math.round((this.item.descendantWeightSum.closedIssues / this.totalWeight) * 100); }, showReferencePath() { - return !this.isProjectBoard && this.itemReferencePath; + return this.isGroupBoard && this.itemReferencePath; }, avatarSize() { return { default: 16, lg: 24 }; 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 ca86894ca40..92f79e61f14 100644 --- a/app/assets/javascripts/boards/components/board_content.vue +++ b/app/assets/javascripts/boards/components/board_content.vue @@ -9,7 +9,7 @@ import { s__ } from '~/locale'; import { formatBoardLists } from 'ee_else_ce/boards/boards_util'; import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column.vue'; import { defaultSortableOptions } from '~/sortable/constants'; -import { DraggableItemTypes, BoardType, listsQuery } from 'ee_else_ce/boards/constants'; +import { DraggableItemTypes, listsQuery } from 'ee_else_ce/boards/constants'; import BoardColumn from './board_column.vue'; export default { @@ -35,13 +35,11 @@ export default { 'issuableType', 'isIssueBoard', 'isEpicBoard', + 'isGroupBoard', + 'disabled', 'isApolloBoard', ], props: { - disabled: { - type: Boolean, - required: true, - }, boardId: { type: String, required: true, @@ -89,8 +87,8 @@ export default { queryVariables() { return { ...(this.isIssueBoard && { - isGroup: this.boardType === BoardType.group, - isProject: this.boardType === BoardType.project, + isGroup: this.isGroupBoard, + isProject: !this.isGroupBoard, }), fullPath: this.fullPath, boardId: this.boardId, @@ -176,7 +174,6 @@ export default { ref="board" :list="list" :data-draggable-item-type="$options.draggableItemTypes.list" - :disabled="disabled" :class="{ 'gl-xs-display-none!': addColumnFormVisible }" /> @@ -190,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_content_sidebar.vue b/app/assets/javascripts/boards/components/board_content_sidebar.vue index 392a73b5859..e6d1e558c37 100644 --- a/app/assets/javascripts/boards/components/board_content_sidebar.vue +++ b/app/assets/javascripts/boards/components/board_content_sidebar.vue @@ -6,7 +6,7 @@ import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdow import { __, sprintf } from '~/locale'; import BoardSidebarTimeTracker from '~/boards/components/sidebar/board_sidebar_time_tracker.vue'; import BoardSidebarTitle from '~/boards/components/sidebar/board_sidebar_title.vue'; -import { ISSUABLE, INCIDENT } from '~/boards/constants'; +import { BoardType, ISSUABLE, INCIDENT, issuableTypes } from '~/boards/constants'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import SidebarAssigneesWidget from '~/sidebar/components/assignees/sidebar_assignees_widget.vue'; import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_widget.vue'; @@ -65,17 +65,22 @@ export default { canUpdate: { default: false, }, + issuableType: { + default: issuableTypes.issue, + }, + isGroupBoard: { + default: false, + }, }, inheritAttrs: false, computed: { ...mapGetters([ - 'isGroupBoard', 'isSidebarOpen', 'activeBoardItem', 'groupPathForActiveIssue', 'projectPathForActiveIssue', ]), - ...mapState(['sidebarType', 'issuableType']), + ...mapState(['sidebarType']), isIssuableSidebar() { return this.sidebarType === ISSUABLE; }, @@ -91,14 +96,17 @@ export default { fullPath() { return this.activeBoardItem?.referencePath?.split('#')[0] || ''; }, + parentType() { + return this.isGroupBoard ? BoardType.group : BoardType.project; + }, createLabelTitle() { return sprintf(__('Create %{workspace} label'), { - workspace: this.isGroupBoard ? 'group' : 'project', + workspace: this.parentType, }); }, manageLabelTitle() { return sprintf(__('Manage %{workspace} labels'), { - workspace: this.isGroupBoard ? 'group' : 'project', + workspace: this.parentType, }); }, attrWorkspacePath() { diff --git a/app/assets/javascripts/boards/components/board_filtered_search.vue b/app/assets/javascripts/boards/components/board_filtered_search.vue index 97f52f21e7f..ce86a4d3123 100644 --- a/app/assets/javascripts/boards/components/board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/board_filtered_search.vue @@ -244,6 +244,13 @@ export default { }); } + if (this.filterParams['not[healthStatus]']) { + filteredSearchValue.push({ + type: TOKEN_TYPE_HEALTH, + value: { data: this.filterParams['not[healthStatus]'], operator: '!=' }, + }); + } + if (search) { filteredSearchValue.push(search); } @@ -285,6 +292,7 @@ export default { 'not[my_reaction_emoji]': this.filterParams.not.myReactionEmoji, 'not[iteration_id]': this.filterParams.not.iterationId, 'not[release_tag]': this.filterParams.not.releaseTag, + 'not[health_status]': this.filterParams.not.healthStatus, }, undefined, ); diff --git a/app/assets/javascripts/boards/components/board_form.vue b/app/assets/javascripts/boards/components/board_form.vue index fcf026bbe00..a71bde54a8f 100644 --- a/app/assets/javascripts/boards/components/board_form.vue +++ b/app/assets/javascripts/boards/components/board_form.vue @@ -1,6 +1,6 @@ <script> import { GlModal, GlAlert } from '@gitlab/ui'; -import { mapGetters, mapActions, mapState } from 'vuex'; +import { mapActions, mapState } from 'vuex'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { visitUrl, updateHistory, getParameterByName } from '~/lib/utils/url_utility'; import { __, s__ } from '~/locale'; @@ -51,6 +51,12 @@ export default { boardBaseUrl: { default: '', }, + isGroupBoard: { + default: false, + }, + isProjectBoard: { + default: false, + }, }, props: { canAdminBoard: { @@ -84,7 +90,6 @@ export default { }, computed: { ...mapState(['error']), - ...mapGetters(['isGroupBoard', 'isProjectBoard']), isNewForm() { return this.currentPage === formType.new; }, 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, diff --git a/app/assets/javascripts/boards/components/board_new_issue.vue b/app/assets/javascripts/boards/components/board_new_issue.vue index 8db366e4995..8b9fafca306 100644 --- a/app/assets/javascripts/boards/components/board_new_issue.vue +++ b/app/assets/javascripts/boards/components/board_new_issue.vue @@ -16,7 +16,7 @@ export default { ProjectSelect, }, mixins: [BoardNewIssueMixin], - inject: ['groupId'], + inject: ['groupId', 'fullPath', 'isGroupBoard'], props: { list: { type: Object, @@ -24,8 +24,8 @@ export default { }, }, computed: { - ...mapState(['selectedProject', 'fullPath']), - ...mapGetters(['isGroupBoard', 'getBoardItemsByList']), + ...mapState(['selectedProject']), + ...mapGetters(['getBoardItemsByList']), formEventPrefix() { return toggleFormEventPrefix.issue; }, diff --git a/app/assets/javascripts/boards/components/boards_selector.vue b/app/assets/javascripts/boards/components/boards_selector.vue index 4f90d77c0be..d26aeb69dd5 100644 --- a/app/assets/javascripts/boards/components/boards_selector.vue +++ b/app/assets/javascripts/boards/components/boards_selector.vue @@ -9,7 +9,7 @@ import { GlModalDirective, } from '@gitlab/ui'; import { throttle } from 'lodash'; -import { mapActions, mapGetters, mapState } from 'vuex'; +import { mapActions, mapState } from 'vuex'; import BoardForm from 'ee_else_ce/boards/components/board_form.vue'; @@ -49,6 +49,8 @@ export default { 'hasMissingBoards', 'scopedIssueBoardFeatureEnabled', 'weights', + 'boardType', + 'isGroupBoard', ], props: { throttleDuration: { @@ -74,8 +76,7 @@ export default { }, computed: { - ...mapState(['boardType', 'board', 'isBoardLoading']), - ...mapGetters(['isGroupBoard', 'isProjectBoard']), + ...mapState(['board', 'isBoardLoading']), parentType() { return this.boardType; }, diff --git a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue index bc68c2e0e99..38a171e8889 100644 --- a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue @@ -4,7 +4,6 @@ import fuzzaldrinPlus from 'fuzzaldrin-plus'; import { mapActions } from 'vuex'; import { orderBy } from 'lodash'; import BoardFilteredSearch from 'ee_else_ce/boards/components/board_filtered_search.vue'; -import { BoardType } from '~/boards/constants'; import axios from '~/lib/utils/axios_utils'; import { joinPaths } from '~/lib/utils/url_utility'; import issueBoardFilters from '~/boards/issue_board_filters'; @@ -47,23 +46,15 @@ export default { issue: __('Issue'), }, components: { BoardFilteredSearch }, - inject: ['isSignedIn', 'releasesFetchPath', 'fullPath', 'boardType'], + inject: ['isSignedIn', 'releasesFetchPath', 'fullPath', 'isGroupBoard'], computed: { - isGroupBoard() { - return this.boardType === BoardType.group; - }, - epicsGroupPath() { - return this.isGroupBoard - ? this.fullPath - : this.fullPath.slice(0, this.fullPath.lastIndexOf('/')); - }, tokensCE() { const { issue, incident } = this.$options.i18n; const { types } = this.$options; const { fetchUsers, fetchLabels } = issueBoardFilters( this.$apollo, this.fullPath, - this.boardType, + this.isGroupBoard, ); const tokens = [ |