chore: The label creation UI input is transform to lowercase (#6712)

This commit is contained in:
Sivin Varghese
2023-03-20 20:35:15 +05:30
committed by GitHub
parent e5134c9ef5
commit 4cae5c7d51
2 changed files with 24 additions and 4 deletions

View File

@@ -8,7 +8,7 @@
<woot-input
v-model.trim="title"
:class="{ error: $v.title.$error }"
class="medium-12 columns"
class="medium-12 columns label-name--input"
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
:error="getLabelTitleErrorMessage"
@@ -91,7 +91,7 @@ export default {
await this.$store.dispatch('labels/create', {
color: this.color,
description: this.description,
title: this.title,
title: this.title.toLowerCase(),
show_on_sidebar: this.showOnSidebar,
});
this.showAlert(this.$t('LABEL_MGMT.ADD.API.SUCCESS_MESSAGE'));
@@ -105,3 +105,13 @@ export default {
},
};
</script>
<style lang="scss" scoped>
// Label API supports only lowercase letters
.label-name--input {
::v-deep {
input {
text-transform: lowercase;
}
}
}
</style>

View File

@@ -5,7 +5,7 @@
<woot-input
v-model.trim="title"
:class="{ error: $v.title.$error }"
class="medium-12 columns"
class="medium-12 columns label-name--input"
:label="$t('LABEL_MGMT.FORM.NAME.LABEL')"
:placeholder="$t('LABEL_MGMT.FORM.NAME.PLACEHOLDER')"
:error="getLabelTitleErrorMessage"
@@ -101,7 +101,7 @@ export default {
id: this.selectedResponse.id,
color: this.color,
description: this.description,
title: this.title,
title: this.title.toLowerCase(),
show_on_sidebar: this.showOnSidebar,
})
.then(() => {
@@ -115,3 +115,13 @@ export default {
},
};
</script>
<style lang="scss" scoped>
// Label API supports only lowercase letters
.label-name--input {
::v-deep {
input {
text-transform: lowercase;
}
}
}
</style>