|
|
@ -129,42 +129,47 @@ watch(inputs, () => { |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="w-full"> |
|
|
|
<div class="w-full"> |
|
|
|
<Draggable :list="options" item-key="id" handle=".nc-child-draggable-icon"> |
|
|
|
<div class="max-h-[250px] overflow-x-auto scrollbar-thin-dull pr-3"> |
|
|
|
<template #item="{ element, index }"> |
|
|
|
<Draggable :list="options" item-key="id" handle=".nc-child-draggable-icon"> |
|
|
|
<div class="flex py-1 items-center nc-select-option"> |
|
|
|
<template #item="{ element, index }"> |
|
|
|
<MdiDragVertical v-if="!isKanban" small class="nc-child-draggable-icon handle" /> |
|
|
|
<div class="flex py-1 items-center nc-select-option"> |
|
|
|
<a-dropdown |
|
|
|
<MdiDragVertical v-if="!isKanban" small class="nc-child-draggable-icon handle" /> |
|
|
|
v-model:visible="colorMenus[index]" |
|
|
|
<a-dropdown |
|
|
|
:trigger="['click']" |
|
|
|
v-model:visible="colorMenus[index]" |
|
|
|
overlay-class-name="nc-dropdown-select-color-options" |
|
|
|
:trigger="['click']" |
|
|
|
> |
|
|
|
overlay-class-name="nc-dropdown-select-color-options" |
|
|
|
<template #overlay> |
|
|
|
> |
|
|
|
<LazyGeneralColorPicker |
|
|
|
<template #overlay> |
|
|
|
v-model="element.color" |
|
|
|
<LazyGeneralColorPicker |
|
|
|
:pick-button="true" |
|
|
|
v-model="element.color" |
|
|
|
@update:model-value="colorMenus[index] = false" |
|
|
|
:pick-button="true" |
|
|
|
|
|
|
|
@update:model-value="colorMenus[index] = false" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<MdiArrowDownDropCircle |
|
|
|
|
|
|
|
class="mr-2 text-[1.5em] outline-0 hover:!text-[1.75em]" |
|
|
|
|
|
|
|
:class="{ 'text-[1.75em]': colorMenus[index] }" |
|
|
|
|
|
|
|
:style="{ color: element.color }" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</a-dropdown> |
|
|
|
<MdiArrowDownDropCircle :style="{ 'font-size': '1.5em', 'color': element.color }" class="mr-2" /> |
|
|
|
|
|
|
|
</a-dropdown> |
|
|
|
<a-input ref="inputs" v-model:value="element.title" class="caption" @change="optionChanged(element.id)" /> |
|
|
|
|
|
|
|
|
|
|
|
<a-input ref="inputs" v-model:value="element.title" class="caption" @change="optionChanged(element.id)" /> |
|
|
|
<MdiClose class="ml-2 hover:!text-black" :style="{ color: 'red' }" @click="removeOption(index)" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
<MdiClose class="ml-2" :style="{ color: 'red' }" @click="removeOption(index)" /> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
</template> |
|
|
|
<div v-if="validateInfos?.['colOptions.options']?.help?.[0]?.[0]" class="text-error text-[10px] my-2"> |
|
|
|
<template #footer> |
|
|
|
{{ validateInfos['colOptions.options'].help[0][0] }} |
|
|
|
<div v-if="validateInfos?.['colOptions.options']?.help?.[0]?.[0]" class="text-error text-[10px] my-2"> |
|
|
|
|
|
|
|
{{ validateInfos['colOptions.options'].help[0][0] }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-button type="dashed" class="w-full caption mt-2" @click="addNewOption()"> |
|
|
|
|
|
|
|
<div class="flex items-center"> |
|
|
|
|
|
|
|
<MdiPlus /> |
|
|
|
|
|
|
|
<span class="flex-auto">Add option</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</Draggable> |
|
|
|
</Draggable> |
|
|
|
</div> |
|
|
|
|
|
|
|
<a-button type="dashed" class="w-full caption mt-2" @click="addNewOption()"> |
|
|
|
|
|
|
|
<div class="flex items-center"> |
|
|
|
|
|
|
|
<MdiPlus /> |
|
|
|
|
|
|
|
<span class="flex-auto">Add option</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</a-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|