1
0
forked from test/crm

style: email content new design

This commit is contained in:
Shariq Ansari 2024-07-15 17:10:36 +05:30
parent 9ee1b63ef6
commit b0237bc2c8

View File

@ -434,7 +434,7 @@
]" ]"
> >
<div <div
class="z-10 flex h-7 w-7 items-center justify-center rounded bg-gray-100" class="z-10 flex h-7 w-7 items-center justify-center bg-white"
:class="{ :class="{
'mt-3': [ 'mt-3': [
'communication', 'communication',
@ -446,7 +446,13 @@
), ),
}" }"
> >
<UserAvatar
v-if="activity.activity_type == 'communication'"
:user="activity.data.sender"
size="md"
/>
<component <component
v-else
:is="activity.icon" :is="activity.icon"
:class=" :class="
['added', 'removed', 'changed'].includes(activity.activity_type) ['added', 'removed', 'changed'].includes(activity.activity_type)
@ -458,18 +464,14 @@
</div> </div>
<div v-if="activity.activity_type == 'communication'" class="pb-6"> <div v-if="activity.activity_type == 'communication'" class="pb-6">
<div <div
class="cursor-pointer rounded-md bg-gray-50 p-3 text-base leading-6 transition-all duration-300 ease-in-out" class="cursor-pointer rounded-md shadow bg-white px-3 py-1.5 text-base leading-6 transition-all duration-300 ease-in-out"
> >
<div class="mb-1 flex items-center justify-between gap-2"> <div class="-mb-0.5 flex items-center justify-between gap-2">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<UserAvatar :user="activity.data.sender" size="md" />
<span>{{ activity.data.sender_full_name }}</span> <span>{{ activity.data.sender_full_name }}</span>
<span>&middot;</span> <span class="text-sm text-gray-600">
<Tooltip :text="dateFormat(activity.creation, dateTooltipFormat)"> {{ '<' + activity.data.sender + '>' }}
<div class="text-sm text-gray-600"> </span>
{{ __(timeAgo(activity.creation)) }}
</div>
</Tooltip>
<Badge <Badge
v-if="activity.communication_type == 'Automated Message'" v-if="activity.communication_type == 'Automated Message'"
:label="__('Notification')" :label="__('Notification')"
@ -477,6 +479,12 @@
theme="green" theme="green"
/> />
</div> </div>
<div class="flex items-center gap-2">
<Tooltip :text="dateFormat(activity.creation, dateTooltipFormat)">
<div class="text-sm text-gray-600">
{{ __(timeAgo(activity.creation)) }}
</div>
</Tooltip>
<div class="flex gap-0.5"> <div class="flex gap-0.5">
<Tooltip :text="__('Reply')"> <Tooltip :text="__('Reply')">
<div> <div>
@ -485,7 +493,9 @@
class="text-gray-700" class="text-gray-700"
@click="reply(activity.data)" @click="reply(activity.data)"
> >
<ReplyIcon class="h-4 w-4" /> <template #icon>
<ReplyIcon />
</template>
</Button> </Button>
</div> </div>
</Tooltip> </Tooltip>
@ -496,37 +506,36 @@
class="text-gray-700" class="text-gray-700"
@click="reply(activity.data, true)" @click="reply(activity.data, true)"
> >
<ReplyAllIcon class="h-4 w-4" /> <template #icon>
<ReplyAllIcon />
</template>
</Button> </Button>
</div> </div>
</Tooltip> </Tooltip>
</div> </div>
</div> </div>
<div class="text-sm leading-5 text-gray-600">
{{ activity.data.subject }}
</div> </div>
<div class="mb-3 text-sm leading-5 text-gray-600"> <div class="flex flex-col gap-1 text-base text-gray-800">
<span class="mr-1 text-2xs font-bold text-gray-500"> <div>
{{ __('TO') }}: <span class="mr-1 text-gray-600"> {{ __('To') }}: </span>
</span>
<span>{{ activity.data.recipients }}</span> <span>{{ activity.data.recipients }}</span>
<span v-if="activity.data.cc">, </span> <span v-if="activity.data.cc">, </span>
<span <span v-if="activity.data.cc" class="mr-1 text-gray-600">
v-if="activity.data.cc"
class="mr-1 text-2xs font-bold text-gray-500"
>
{{ __('CC') }}: {{ __('CC') }}:
</span> </span>
<span v-if="activity.data.cc">{{ activity.data.cc }}</span> <span v-if="activity.data.cc">{{ activity.data.cc }}</span>
<span v-if="activity.data.bcc">, </span> <span v-if="activity.data.bcc">, </span>
<span <span v-if="activity.data.bcc" class="mr-1 text-gray-600">
v-if="activity.data.bcc"
class="mr-1 text-2xs font-bold text-gray-500"
>
{{ __('BCC') }}: {{ __('BCC') }}:
</span> </span>
<span v-if="activity.data.bcc">{{ activity.data.bcc }}</span> <span v-if="activity.data.bcc">{{ activity.data.bcc }}</span>
</div> </div>
<div>
<span class="mr-1 text-gray-600"> {{ __('Subject') }}: </span>
<span>{{ activity.data.subject }}</span>
</div>
</div>
<div class="border-0 border-t my-3.5 border-gray-200" />
<EmailContent :content="activity.data.content" /> <EmailContent :content="activity.data.content" />
<div <div
v-if="activity.data?.attachments?.length" v-if="activity.data?.attachments?.length"
@ -1236,9 +1245,6 @@ function timelineIcon(activity_type, is_lead) {
case 'comment': case 'comment':
icon = CommentIcon icon = CommentIcon
break break
case 'communication':
icon = EmailAtIcon
break
case 'incoming_call': case 'incoming_call':
icon = InboundCallIcon icon = InboundCallIcon
break break