chore: Update buttons in custom attributes page (#11125)
This commit is contained in:
@@ -6,7 +6,12 @@ import { useAlert } from 'dashboard/composables';
|
|||||||
import { convertToAttributeSlug } from 'dashboard/helper/commons.js';
|
import { convertToAttributeSlug } from 'dashboard/helper/commons.js';
|
||||||
import { ATTRIBUTE_MODELS, ATTRIBUTE_TYPES } from './constants';
|
import { ATTRIBUTE_MODELS, ATTRIBUTE_TYPES } from './constants';
|
||||||
|
|
||||||
|
import NextButton from 'dashboard/components-next/button/Button.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
NextButton,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
onClose: {
|
onClose: {
|
||||||
type: Function,
|
type: Function,
|
||||||
@@ -270,13 +275,18 @@ export default {
|
|||||||
:placeholder="$t('ATTRIBUTES_MGMT.ADD.FORM.REGEX_CUE.PLACEHOLDER')"
|
:placeholder="$t('ATTRIBUTES_MGMT.ADD.FORM.REGEX_CUE.PLACEHOLDER')"
|
||||||
/>
|
/>
|
||||||
<div class="flex flex-row justify-end w-full gap-2 px-0 py-2">
|
<div class="flex flex-row justify-end w-full gap-2 px-0 py-2">
|
||||||
<woot-submit-button
|
<NextButton
|
||||||
:disabled="isButtonDisabled"
|
faded
|
||||||
:button-text="$t('ATTRIBUTES_MGMT.ADD.SUBMIT')"
|
slate
|
||||||
|
type="reset"
|
||||||
|
:label="$t('ATTRIBUTES_MGMT.ADD.CANCEL_BUTTON_TEXT')"
|
||||||
|
@click.prevent="onClose"
|
||||||
|
/>
|
||||||
|
<NextButton
|
||||||
|
type="submit"
|
||||||
|
:label="$t('ATTRIBUTES_MGMT.ADD.SUBMIT')"
|
||||||
|
:disabled="isButtonDisabled"
|
||||||
/>
|
/>
|
||||||
<button class="button clear" @click.prevent="onClose">
|
|
||||||
{{ $t('ATTRIBUTES_MGMT.ADD.CANCEL_BUTTON_TEXT') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import EditAttribute from './EditAttribute.vue';
|
|||||||
import { useStoreGetters, useStore } from 'dashboard/composables/store';
|
import { useStoreGetters, useStore } from 'dashboard/composables/store';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import Button from 'dashboard/components-next/button/Button.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
attributeModel: {
|
attributeModel: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -122,22 +124,20 @@ const tableHeaders = computed(() => {
|
|||||||
</td>
|
</td>
|
||||||
<td class="py-4 min-w-xs">
|
<td class="py-4 min-w-xs">
|
||||||
<div class="flex gap-1 justify-end">
|
<div class="flex gap-1 justify-end">
|
||||||
<woot-button
|
<Button
|
||||||
v-tooltip.top="$t('ATTRIBUTES_MGMT.LIST.BUTTONS.EDIT')"
|
v-tooltip.top="$t('ATTRIBUTES_MGMT.LIST.BUTTONS.EDIT')"
|
||||||
variant="smooth"
|
icon="i-lucide-pen"
|
||||||
size="tiny"
|
slate
|
||||||
color-scheme="secondary"
|
xs
|
||||||
class-names="grey-btn"
|
faded
|
||||||
icon="edit"
|
|
||||||
@click="openEditPopup(attribute)"
|
@click="openEditPopup(attribute)"
|
||||||
/>
|
/>
|
||||||
<woot-button
|
<Button
|
||||||
v-tooltip.top="$t('ATTRIBUTES_MGMT.LIST.BUTTONS.DELETE')"
|
v-tooltip.top="$t('ATTRIBUTES_MGMT.LIST.BUTTONS.DELETE')"
|
||||||
variant="smooth"
|
icon="i-lucide-trash-2"
|
||||||
color-scheme="alert"
|
xs
|
||||||
size="tiny"
|
ruby
|
||||||
icon="dismiss-circle"
|
faded
|
||||||
class-names="grey-btn"
|
|
||||||
@click="openDelete(attribute)"
|
@click="openDelete(attribute)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,8 +4,12 @@ import { useAlert } from 'dashboard/composables';
|
|||||||
import { required, minLength } from '@vuelidate/validators';
|
import { required, minLength } from '@vuelidate/validators';
|
||||||
import { getRegexp } from 'shared/helpers/Validators';
|
import { getRegexp } from 'shared/helpers/Validators';
|
||||||
import { ATTRIBUTE_TYPES } from './constants';
|
import { ATTRIBUTE_TYPES } from './constants';
|
||||||
|
import NextButton from 'dashboard/components-next/button/Button.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {
|
||||||
|
NextButton,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
selectedAttribute: {
|
selectedAttribute: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -262,12 +266,19 @@ export default {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row justify-end w-full gap-2 px-0 py-2">
|
<div class="flex flex-row justify-end w-full gap-2 px-0 py-2">
|
||||||
<woot-button :is-loading="isUpdating" :disabled="isButtonDisabled">
|
<NextButton
|
||||||
{{ $t('ATTRIBUTES_MGMT.EDIT.UPDATE_BUTTON_TEXT') }}
|
faded
|
||||||
</woot-button>
|
slate
|
||||||
<woot-button variant="clear" @click.prevent="onClose">
|
type="reset"
|
||||||
{{ $t('ATTRIBUTES_MGMT.ADD.CANCEL_BUTTON_TEXT') }}
|
:label="$t('ATTRIBUTES_MGMT.ADD.CANCEL_BUTTON_TEXT')"
|
||||||
</woot-button>
|
@click.prevent="onClose"
|
||||||
|
/>
|
||||||
|
<NextButton
|
||||||
|
type="submit"
|
||||||
|
:label="$t('ATTRIBUTES_MGMT.EDIT.UPDATE_BUTTON_TEXT')"
|
||||||
|
:is-loading="isUpdating"
|
||||||
|
:disabled="isButtonDisabled"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import BaseSettingsHeader from '../components/BaseSettingsHeader.vue';
|
|||||||
import AddAttribute from './AddAttribute.vue';
|
import AddAttribute from './AddAttribute.vue';
|
||||||
import CustomAttribute from './CustomAttribute.vue';
|
import CustomAttribute from './CustomAttribute.vue';
|
||||||
import SettingsLayout from '../SettingsLayout.vue';
|
import SettingsLayout from '../SettingsLayout.vue';
|
||||||
|
import Button from 'dashboard/components-next/button/Button.vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useStoreGetters, useStore } from 'dashboard/composables/store';
|
import { useStoreGetters, useStore } from 'dashboard/composables/store';
|
||||||
|
|
||||||
@@ -68,13 +69,11 @@ const onClickTabChange = index => {
|
|||||||
feature-name="custom_attributes"
|
feature-name="custom_attributes"
|
||||||
>
|
>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<woot-button
|
<Button
|
||||||
class="button nice rounded-md"
|
icon="i-lucide-circle-plus"
|
||||||
icon="add-circle"
|
:label="$t('ATTRIBUTES_MGMT.HEADER_BTN_TXT')"
|
||||||
@click="openAddPopup"
|
@click="openAddPopup"
|
||||||
>
|
/>
|
||||||
{{ $t('ATTRIBUTES_MGMT.HEADER_BTN_TXT') }}
|
|
||||||
</woot-button>
|
|
||||||
</template>
|
</template>
|
||||||
</BaseSettingsHeader>
|
</BaseSettingsHeader>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user