fix: delete icon issue & more cleanup
This commit is contained in:
parent
af4c64e633
commit
65435cf2b5
@ -9,9 +9,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<Button variant="ghost" class="w-7" @click="show = false">
|
<Button variant="ghost" icon="x" @click="show = false" />
|
||||||
<FeatherIcon name="x" class="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -26,22 +24,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="px-4 pb-7 pt-0 sm:px-6">
|
<div class="px-4 pb-7 pt-0 sm:px-6">
|
||||||
<div class="flex flex-row-reverse gap-2">
|
<div class="flex flex-row-reverse gap-2">
|
||||||
<Button theme="red" variant="solid" @click="confirmDelete()">
|
<Button
|
||||||
<div class="flex gap-1">
|
:label="__('Delete {0} items', [props.items.length])"
|
||||||
<FeatherIcon name="trash" class="h-4 w-4" />
|
icon-left="trash-2"
|
||||||
<span>
|
variant="solid"
|
||||||
{{ __('Delete {0} items', [props.items.length]) }}
|
theme="red"
|
||||||
</span>
|
@click="confirmDelete()"
|
||||||
</div>
|
/>
|
||||||
</Button>
|
<Button
|
||||||
<Button variant="solid" @click="confirmUnlink()">
|
:label="__('Unlink and delete {0} items', [props.items.length])"
|
||||||
<div class="flex gap-1">
|
icon-left="unlock"
|
||||||
<FeatherIcon name="unlock" class="h-4 w-4" />
|
variant="solid"
|
||||||
<span>
|
@click="confirmUnlink()"
|
||||||
{{ __('Unlink and delete {0} items', [props.items.length]) }}
|
/>
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -54,9 +49,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<Button variant="ghost" class="w-7" @click="show = false">
|
<Button variant="ghost" icon="x" @click="show = false" />
|
||||||
<FeatherIcon name="x" class="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -75,24 +68,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="px-4 pb-7 pt-0 sm:px-6">
|
<div class="px-4 pb-7 pt-0 sm:px-6">
|
||||||
<div class="flex flex-row-reverse gap-2">
|
<div class="flex flex-row-reverse gap-2">
|
||||||
<Button variant="solid" theme="red" @click="deleteDocs()">
|
<Button
|
||||||
<div class="flex gap-1">
|
:label="
|
||||||
<span>
|
confirmDeleteInfo.delete ? __('Delete') : __('Unlink and delete')
|
||||||
{{
|
"
|
||||||
confirmDeleteInfo.delete
|
:icon-left="confirmDeleteInfo.delete ? 'trash-2' : 'unlock'"
|
||||||
? __('Delete')
|
variant="solid"
|
||||||
: __('Unlink and delete')
|
theme="red"
|
||||||
}}
|
@click="deleteDocs()"
|
||||||
</span>
|
/>
|
||||||
</div>
|
<Button
|
||||||
</Button>
|
:label="__('Cancel')"
|
||||||
<Button variant="subtle" @click="confirmDeleteInfo.show = false">
|
variant="subtle"
|
||||||
<div class="flex gap-1">
|
@click="confirmDeleteInfo.show = false"
|
||||||
<span>
|
/>
|
||||||
{{ __('Cancel') }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -13,9 +13,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<Button variant="ghost" class="w-7" @click="show = false">
|
<Button variant="ghost" icon="x" @click="show = false" />
|
||||||
<FeatherIcon name="x" class="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -62,43 +60,32 @@
|
|||||||
<div class="flex flex-row-reverse gap-2">
|
<div class="flex flex-row-reverse gap-2">
|
||||||
<Button
|
<Button
|
||||||
v-if="linkedDocs?.length > 0"
|
v-if="linkedDocs?.length > 0"
|
||||||
|
:label="
|
||||||
|
viewControls?.selections?.length == 0
|
||||||
|
? __('Delete all')
|
||||||
|
: __('Delete {0} item(s)', [viewControls?.selections?.length])
|
||||||
|
"
|
||||||
theme="red"
|
theme="red"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
|
icon-left="trash-2"
|
||||||
@click="confirmDelete()"
|
@click="confirmDelete()"
|
||||||
>
|
/>
|
||||||
<div class="flex gap-1">
|
|
||||||
<FeatherIcon name="trash" class="h-4 w-4" />
|
|
||||||
<span>
|
|
||||||
{{ __('Delete') }}
|
|
||||||
{{
|
|
||||||
viewControls?.selections?.length == 0
|
|
||||||
? __('all')
|
|
||||||
: `${viewControls?.selections?.length} item(s)`
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
v-if="linkedDocs?.length > 0"
|
v-if="linkedDocs?.length > 0"
|
||||||
|
:label="
|
||||||
|
viewControls?.selections?.length == 0
|
||||||
|
? __('Unlink all')
|
||||||
|
: __('Unlink {0} item(s)', [viewControls?.selections?.length])
|
||||||
|
"
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
theme="gray"
|
theme="gray"
|
||||||
|
icon-left="unlock"
|
||||||
@click="confirmUnlink()"
|
@click="confirmUnlink()"
|
||||||
>
|
/>
|
||||||
<div class="flex gap-1">
|
|
||||||
<FeatherIcon name="unlock" class="h-4 w-4" />
|
|
||||||
<span>
|
|
||||||
{{ __('Unlink') }}
|
|
||||||
{{
|
|
||||||
viewControls?.selections?.length == 0
|
|
||||||
? __('all')
|
|
||||||
: `${viewControls?.selections?.length} item(s)`
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
v-if="linkedDocs?.length == 0"
|
v-if="linkedDocs?.length == 0"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
|
icon-left="trash-2"
|
||||||
:label="__('Delete')"
|
:label="__('Delete')"
|
||||||
:loading="isDealCreating"
|
:loading="isDealCreating"
|
||||||
@click="deleteDoc()"
|
@click="deleteDoc()"
|
||||||
@ -116,9 +103,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<Button variant="ghost" class="w-7" @click="show = false">
|
<Button variant="ghost" icon="x" @click="show = false" />
|
||||||
<FeatherIcon name="x" class="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-ink-gray-5 text-base">
|
<div class="text-ink-gray-5 text-base">
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<FeatherIcon
|
<FeatherIcon
|
||||||
name="external-link"
|
name="external-link"
|
||||||
class="h-4 w-4"
|
class="h-4 w-4 cursor-pointer"
|
||||||
@click.stop="viewLinkedDoc(row)"
|
@click.stop="viewLinkedDoc(row)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -91,64 +91,52 @@
|
|||||||
<div class="flex gap-1.5">
|
<div class="flex gap-1.5">
|
||||||
<Tooltip v-if="callEnabled" :text="__('Make a call')">
|
<Tooltip v-if="callEnabled" :text="__('Make a call')">
|
||||||
<div>
|
<div>
|
||||||
<Button class="h-7 w-7" @click="triggerCall">
|
<Button @click="triggerCall">
|
||||||
<template #icon>
|
<template #icon><PhoneIcon /></template>
|
||||||
<PhoneIcon />
|
|
||||||
</template>
|
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip :text="__('Send an email')">
|
<Tooltip :text="__('Send an email')">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
class="h-7 w-7"
|
|
||||||
@click="
|
@click="
|
||||||
deal.data.email
|
deal.data.email
|
||||||
? openEmailBox()
|
? openEmailBox()
|
||||||
: toast.error(__('No email set'))
|
: toast.error(__('No email set'))
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon><Email2Icon /></template>
|
||||||
<Email2Icon />
|
|
||||||
</template>
|
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip :text="__('Go to website')">
|
<Tooltip :text="__('Go to website')">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
class="h-7 w-7"
|
|
||||||
@click="
|
@click="
|
||||||
deal.data.website
|
deal.data.website
|
||||||
? openWebsite(deal.data.website)
|
? openWebsite(deal.data.website)
|
||||||
: toast.error(__('No website set'))
|
: toast.error(__('No website set'))
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon><LinkIcon /></template>
|
||||||
<LinkIcon />
|
|
||||||
</template>
|
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip :text="__('Attach a file')">
|
<Tooltip :text="__('Attach a file')">
|
||||||
<div>
|
<div>
|
||||||
<Button class="size-7" @click="showFilesUploader = true">
|
<Button @click="showFilesUploader = true">
|
||||||
<template #icon>
|
<template #icon><AttachmentIcon /></template>
|
||||||
<AttachmentIcon />
|
|
||||||
</template>
|
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip :text="__('Delete')">
|
<Tooltip :text="__('Delete')">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
class="h-7 w-7"
|
|
||||||
@click="deleteDealWithModal(deal.data.name)"
|
@click="deleteDealWithModal(deal.data.name)"
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
|
icon="trash-2"
|
||||||
theme="red"
|
theme="red"
|
||||||
>
|
/>
|
||||||
<FeatherIcon name="trash" class="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -134,7 +134,6 @@
|
|||||||
<Tooltip v-if="callEnabled" :text="__('Make a call')">
|
<Tooltip v-if="callEnabled" :text="__('Make a call')">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
class="h-7 w-7"
|
|
||||||
@click="
|
@click="
|
||||||
() =>
|
() =>
|
||||||
lead.data.mobile_no
|
lead.data.mobile_no
|
||||||
@ -151,7 +150,6 @@
|
|||||||
<Tooltip :text="__('Send an email')">
|
<Tooltip :text="__('Send an email')">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
class="h-7 w-7"
|
|
||||||
@click="
|
@click="
|
||||||
lead.data.email
|
lead.data.email
|
||||||
? openEmailBox()
|
? openEmailBox()
|
||||||
@ -167,7 +165,6 @@
|
|||||||
<Tooltip :text="__('Go to website')">
|
<Tooltip :text="__('Go to website')">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
class="h-7 w-7"
|
|
||||||
@click="
|
@click="
|
||||||
lead.data.website
|
lead.data.website
|
||||||
? openWebsite(lead.data.website)
|
? openWebsite(lead.data.website)
|
||||||
@ -182,7 +179,7 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip :text="__('Attach a file')">
|
<Tooltip :text="__('Attach a file')">
|
||||||
<div>
|
<div>
|
||||||
<Button class="h-7 w-7" @click="showFilesUploader = true">
|
<Button @click="showFilesUploader = true">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<AttachmentIcon />
|
<AttachmentIcon />
|
||||||
</template>
|
</template>
|
||||||
@ -192,13 +189,11 @@
|
|||||||
<Tooltip :text="__('Delete')">
|
<Tooltip :text="__('Delete')">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
class="h-7 w-7"
|
|
||||||
@click="deleteLeadWithModal(lead.data.name)"
|
@click="deleteLeadWithModal(lead.data.name)"
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
theme="red"
|
theme="red"
|
||||||
>
|
icon="trash-2"
|
||||||
<FeatherIcon name="trash" class="h-4 w-4" />
|
/>
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user