11
11
<h3 class =" text-sm font-medium text-foreground mb-2" >
12
12
{{ $t('globals.messages.no', { name: $t('globals.terms.action', 2).toLowerCase() }) }}
13
13
</h3 >
14
- <Button @click =" add" variant =" outline" size =" sm" class =" inline-flex items-center gap-2" >
14
+ <Button
15
+ @click.prevent =" add"
16
+ variant =" outline"
17
+ size =" sm"
18
+ class =" inline-flex items-center gap-2"
19
+ >
15
20
<Plus class =" w-4 h-4" />
16
21
{{ config.addButtonText }}
17
22
</Button >
70
75
/>
71
76
72
77
<SelectComboBox
73
- v-if =" action.type === 'assign_team'"
78
+ v-else- if =" action.type === 'assign_team'"
74
79
v-model =" action.value[0]"
75
80
:items =" config.actions[action.type].options"
76
81
:placeholder =" config.valuePlaceholder"
77
82
@update:modelValue =" (value) => updateValue(value, index)"
78
83
type =" team"
79
84
/>
85
+ <SelectComboBox
86
+ v-else
87
+ v-model =" action.value[0]"
88
+ :items =" config.actions[action.type].options"
89
+ :placeholder =" config.valuePlaceholder"
90
+ @update:modelValue =" (value) => updateValue(value, index)"
91
+ />
80
92
</div >
81
93
</div >
82
94
85
97
v-if =" action.type && config.actions[action.type]?.type === 'tag'"
86
98
class =" max-w-md"
87
99
>
88
- <label class =" block text-sm font-medium mb-2" >Tags </label >
100
+ <label class =" block text-sm font-medium mb-2" >{{ $t('globals.terms.tag') }} </label >
89
101
<SelectTag
90
102
v-model =" action.value"
91
103
:items =" tagsStore.tagNames.map((tag) => ({ label: tag, value: tag }))"
95
107
</div >
96
108
97
109
<!-- Remove Button -->
98
- <Button
99
- variant =" ghost"
100
- size =" sm"
101
- @click =" remove(index)"
102
- class =" text-gray-400 dark:text-gray-500 hover:text-gray-600 hover:bg-gray-100 dark:hover:bg-gray-800 w-8 h-8 p-0"
103
- >
104
- <X class =" w-4 h-4" />
105
- <span class =" sr-only" >Remove action</span >
106
- </Button >
110
+ <CloseButton :onClose =" () => remove(index)" />
107
111
</div >
108
112
</div >
109
113
</div >
126
130
127
131
<script setup>
128
132
import { Button } from ' @/components/ui/button'
129
- import { X , Plus } from ' lucide-vue-next'
133
+ import { Plus } from ' lucide-vue-next'
130
134
import {
131
135
Select ,
132
136
SelectContent ,
@@ -135,6 +139,7 @@ import {
135
139
SelectTrigger ,
136
140
SelectValue
137
141
} from ' @/components/ui/select'
142
+ import CloseButton from ' @/components/button/CloseButton.vue'
138
143
import { SelectTag } from ' @/components/ui/select'
139
144
import { useTagStore } from ' @/stores/tag'
140
145
import SelectComboBox from ' @/components/combobox/SelectCombobox.vue'
0 commit comments