From 0cbcb8b80cf320fab7d093b6855b9f64b6c3b799 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 20 Mar 2025 21:19:44 +0530 Subject: [PATCH] chore: Update buttons in labels page (#11126) --- .../dashboard/settings/labels/AddLabel.vue | 27 ++++++++++----- .../dashboard/settings/labels/EditLabel.vue | 25 +++++++++----- .../dashboard/settings/labels/Index.vue | 33 +++++++++---------- 3 files changed, 50 insertions(+), 35 deletions(-) diff --git a/app/javascript/dashboard/routes/dashboard/settings/labels/AddLabel.vue b/app/javascript/dashboard/routes/dashboard/settings/labels/AddLabel.vue index 63ea64e7d..c49537d35 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/labels/AddLabel.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/labels/AddLabel.vue @@ -5,7 +5,12 @@ import validations, { getLabelTitleErrorMessage } from './validations'; import { getRandomColor } from 'dashboard/helper/labelColor'; import { useVuelidate } from '@vuelidate/core'; +import NextButton from 'dashboard/components-next/button/Button.vue'; + export default { + components: { + NextButton, + }, props: { prefillTitle: { type: String, @@ -105,16 +110,20 @@ export default {
- + - {{ $t('LABEL_MGMT.FORM.CREATE') }} - - - {{ $t('LABEL_MGMT.FORM.CANCEL') }} - + :label="$t('LABEL_MGMT.FORM.CREATE')" + :disabled="v$.title.$invalid || uiFlags.isCreating" + :is-loading="uiFlags.isCreating" + />
diff --git a/app/javascript/dashboard/routes/dashboard/settings/labels/EditLabel.vue b/app/javascript/dashboard/routes/dashboard/settings/labels/EditLabel.vue index 67b6ef5e4..ccc1685be 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/labels/EditLabel.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/labels/EditLabel.vue @@ -4,7 +4,12 @@ import { useAlert } from 'dashboard/composables'; import validations, { getLabelTitleErrorMessage } from './validations'; import { useVuelidate } from '@vuelidate/core'; +import NextButton from 'dashboard/components-next/button/Button.vue'; + export default { + components: { + NextButton, + }, props: { selectedResponse: { type: Object, @@ -109,15 +114,19 @@ export default {
- + - {{ $t('LABEL_MGMT.FORM.EDIT') }} - - - {{ $t('LABEL_MGMT.FORM.CANCEL') }} - + />
diff --git a/app/javascript/dashboard/routes/dashboard/settings/labels/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/labels/Index.vue index 834cc3865..9f7faa889 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/labels/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/labels/Index.vue @@ -8,6 +8,7 @@ import AddLabel from './AddLabel.vue'; import EditLabel from './EditLabel.vue'; import BaseSettingsHeader from '../components/BaseSettingsHeader.vue'; import SettingsLayout from '../SettingsLayout.vue'; +import Button from 'dashboard/components-next/button/Button.vue'; const getters = useStoreGetters(); const store = useStore(); @@ -94,13 +95,11 @@ onBeforeMount(() => { feature-name="labels" > @@ -140,23 +139,21 @@ onBeforeMount(() => {
- -