Browse Source

Merge pull request #470 from chakki-works/bugfix/label-creation

Bugfix: create label over 26
pull/473/head
Hiroki Nakayama 5 years ago
committed by GitHub
parent
commit
d4b7c89647
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions
  1. 8
      frontend/components/organisms/labels/LabelCreationForm.vue

8
frontend/components/organisms/labels/LabelCreationForm.vue

@ -5,7 +5,7 @@
cancel-text="Cancel" cancel-text="Cancel"
:disabled="!valid" :disabled="!valid"
@agree="create" @agree="create"
@cancel="cancel"
@cancel="reset"
> >
<template #content> <template #content>
<v-form <v-form
@ -87,6 +87,7 @@ export default {
}, },
reset() { reset() {
this.$refs.form.reset() this.$refs.form.reset()
this.cancel('close')
}, },
create() { create() {
if (this.validate()) { if (this.validate()) {
@ -94,13 +95,12 @@ export default {
projectId: this.$route.params.id, projectId: this.$route.params.id,
text: this.labelName, text: this.labelName,
prefix_key: null, prefix_key: null,
suffix_key: this.suffixKey,
background_color: this.color.slice(0, -2),
suffix_key: this.suffixKey ? this.suffixKey : null,
background_color: this.color.slice(0, 7), // #12345678 -> #123456
text_color: '#ffffff' text_color: '#ffffff'
}) })
.then(() => { .then(() => {
this.reset() this.reset()
this.cancel()
}) })
.catch(() => { .catch(() => {
this.showError = true this.showError = true

Loading…
Cancel
Save