Commit 3f5e3233 authored by Luke Bennett's avatar Luke Bennett

Resolve lock_issue_sidebar

parent 3208a8c3
<script>
<<<<<<< HEAD
import Flash from '~/flash';
=======
import Flash from '../../../flash';
>>>>>>> upstream/master
import editForm from './edit_form.vue';
import issuableMixin from '../../../vue_shared/mixins/issuable';
import Icon from '../../../vue_shared/components/icon.vue';
......@@ -16,10 +12,6 @@
mixins: [
issuableMixin,
],
<<<<<<< HEAD
=======
>>>>>>> upstream/master
props: {
isLocked: {
required: true,
......@@ -44,23 +36,6 @@
return this.isLocked ? 'lock' : 'lock-open';
},
<<<<<<< HEAD
isLockDialogOpen() {
return this.mediator.store.isLockDialogOpen;
},
},
methods: {
toggleForm() {
this.mediator.store.isLockDialogOpen = !this.mediator.store.isLockDialogOpen;
},
=======
computed: {
lockIcon() {
return this.isLocked ? 'lock' : 'lock-open';
},
isLockDialogOpen() {
return this.mediator.store.isLockDialogOpen;
},
......@@ -71,18 +46,12 @@
this.mediator.store.isLockDialogOpen = !this.mediator.store.isLockDialogOpen;
},
>>>>>>> upstream/master
updateLockedAttribute(locked) {
this.mediator.service.update(this.issuableType, {
discussion_locked: locked,
})
.then(() => location.reload())
<<<<<<< HEAD
.catch(() => Flash(this.__(`Something went wrong trying to change the locked state of this ${this.issuableDisplayName}`)));
=======
.catch(() => Flash(this.__(`Something went wrong trying to
change the locked state of this ${this.issuableDisplayName}`)));
>>>>>>> upstream/master
},
},
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment