fix: make email template row clickable
This commit is contained in:
parent
5932ccafec
commit
05803c79b4
@ -79,14 +79,18 @@
|
|||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center p-2 text-sm border-b text-ink-gray-5">
|
<div class="flex items-center p-2 text-sm text-ink-gray-5">
|
||||||
<div class="w-4/6">{{ __('Template name') }}</div>
|
<div class="w-4/6">{{ __('Template name') }}</div>
|
||||||
<div class="w-1/6">{{ __('For') }}</div>
|
<div class="w-1/6">{{ __('For') }}</div>
|
||||||
<div class="w-1/6">{{ __('Enabled') }}</div>
|
<div class="w-1/6">{{ __('Enabled') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="divide-y divide-outline-gray-modals overflow-y-auto">
|
<div class="h-px border-t mx-2 border-outline-gray-1" />
|
||||||
<template v-for="template in templatesList" :key="template.name">
|
<ul class="overflow-y-auto">
|
||||||
<li class="flex items-center justify-between px-2 py-3">
|
<template v-for="(template, i) in templatesList" :key="template.name">
|
||||||
|
<li
|
||||||
|
class="flex items-center justify-between px-2 py-3 cursor-pointer hover:bg-surface-gray-2 rounded"
|
||||||
|
@click="() => emit('updateStep', 'edit-template', { ...template })"
|
||||||
|
>
|
||||||
<div class="flex flex-col w-4/6 pr-5">
|
<div class="flex flex-col w-4/6 pr-5">
|
||||||
<div class="text-base font-medium text-ink-gray-7">
|
<div class="text-base font-medium text-ink-gray-7">
|
||||||
{{ template.name }}
|
{{ template.name }}
|
||||||
@ -103,6 +107,7 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
v-model="template.enabled"
|
v-model="template.enabled"
|
||||||
@update:model-value="toggleEmailTemplate(template)"
|
@update:model-value="toggleEmailTemplate(template)"
|
||||||
|
@click.stop
|
||||||
/>
|
/>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
:options="getDropdownOptions(template)"
|
:options="getDropdownOptions(template)"
|
||||||
@ -115,9 +120,14 @@
|
|||||||
confirmDelete = false
|
confirmDelete = false
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
|
@click.stop
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<div
|
||||||
|
v-if="templatesList.length !== i + 1"
|
||||||
|
class="h-px border-t mx-2 border-outline-gray-1"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<!-- Load More Button -->
|
<!-- Load More Button -->
|
||||||
<div
|
<div
|
||||||
@ -209,16 +219,6 @@ function deleteTemplate(template) {
|
|||||||
|
|
||||||
function getDropdownOptions(template) {
|
function getDropdownOptions(template) {
|
||||||
let options = [
|
let options = [
|
||||||
{
|
|
||||||
label: __('Edit'),
|
|
||||||
component: (props) =>
|
|
||||||
TemplateOption({
|
|
||||||
option: __('Edit'),
|
|
||||||
icon: 'edit-2',
|
|
||||||
active: props.active,
|
|
||||||
onClick: () => emit('updateStep', 'edit-template', { ...template }),
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: __('Duplicate'),
|
label: __('Duplicate'),
|
||||||
component: (props) =>
|
component: (props) =>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user