Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/boards/components/board_form.vue')
-rw-r--r--app/assets/javascripts/boards/components/board_form.vue30
1 files changed, 21 insertions, 9 deletions
diff --git a/app/assets/javascripts/boards/components/board_form.vue b/app/assets/javascripts/boards/components/board_form.vue
index 386ed6bd0a1..a89f71504a9 100644
--- a/app/assets/javascripts/boards/components/board_form.vue
+++ b/app/assets/javascripts/boards/components/board_form.vue
@@ -2,7 +2,7 @@
import { GlModal, GlAlert } from '@gitlab/ui';
import { mapGetters, mapActions, mapState } from 'vuex';
import ListLabel from '~/boards/models/label';
-import { TYPE_ITERATION, TYPE_MILESTONE, TYPE_USER } from '~/graphql_shared/constants';
+import { TYPE_ITERATION, TYPE_MILESTONE } from '~/graphql_shared/constants';
import { convertToGraphQLId } from '~/graphql_shared/utils';
import { getParameterByName, visitUrl } from '~/lib/utils/url_utility';
import { __, s__ } from '~/locale';
@@ -18,10 +18,9 @@ const boardDefaults = {
id: false,
name: '',
labels: [],
- milestone_id: undefined,
+ milestone: {},
iteration_id: undefined,
assignee: {},
- assignee_id: undefined,
weight: null,
hide_backlog_list: false,
hide_closed_list: false,
@@ -190,13 +189,10 @@ export default {
issueBoardScopeMutationVariables() {
return {
weight: this.board.weight,
- assigneeId: this.board.assignee?.id
- ? convertToGraphQLId(TYPE_USER, this.board.assignee.id)
+ assigneeId: this.board.assignee?.id || null,
+ milestoneId: this.board.milestone?.id
+ ? convertToGraphQLId(TYPE_MILESTONE, this.board.milestone.id)
: null,
- milestoneId:
- this.board.milestone?.id || this.board.milestone?.id === 0
- ? convertToGraphQLId(TYPE_MILESTONE, this.board.milestone.id)
- : null,
iterationId: this.board.iteration_id
? convertToGraphQLId(TYPE_ITERATION, this.board.iteration_id)
: null,
@@ -306,6 +302,19 @@ export default {
}
});
},
+ setAssignee(assigneeId) {
+ this.$set(this.board, 'assignee', {
+ id: assigneeId,
+ });
+ },
+ setMilestone(milestoneId) {
+ this.$set(this.board, 'milestone', {
+ id: milestoneId,
+ });
+ },
+ setWeight(weight) {
+ this.$set(this.board, 'weight', weight);
+ },
},
};
</script>
@@ -373,6 +382,9 @@ export default {
:weights="weights"
@set-iteration="setIteration"
@set-board-labels="setBoardLabels"
+ @set-assignee="setAssignee"
+ @set-milestone="setMilestone"
+ @set-weight="setWeight"
/>
</form>
</gl-modal>