fix: added translation in Call Log Page

This commit is contained in:
Shariq Ansari 2024-04-15 19:57:57 +05:30
parent 542d6c2223
commit c91f511391
2 changed files with 17 additions and 14 deletions

View File

@ -53,7 +53,7 @@
:variant="'subtle'" :variant="'subtle'"
:theme="item.color" :theme="item.color"
size="md" size="md"
:label="item.label" :label="__(item.label)"
/> />
</div> </div>
<div v-else-if="column.type === 'Check'"> <div v-else-if="column.type === 'Check'">

View File

@ -7,16 +7,15 @@
<Button <Button
v-if="callLog.data.type == 'Incoming' && !callLog.data.lead" v-if="callLog.data.type == 'Incoming' && !callLog.data.lead"
variant="solid" variant="solid"
label="Create lead" :label="__('Create lead')"
@click="createLead" @click="createLead"
> >
<template #prefix><FeatherIcon name="plus" class="h-4" /></template> <template #prefix><FeatherIcon name="plus" class="h-4" /></template>
</Button> </Button>
</template> </template>
</LayoutHeader> </LayoutHeader>
<div class="border-b"></div>
<div v-if="callLog.data" class="max-w-lg p-6"> <div v-if="callLog.data" class="max-w-lg p-6">
<div class="pb-3 text-base font-medium">Call details</div> <div class="pb-3 text-base font-medium">{{ __('Call details') }}</div>
<div class="mb-3 flex flex-col gap-4 rounded-lg border p-4 shadow-sm"> <div class="mb-3 flex flex-col gap-4 rounded-lg border p-4 shadow-sm">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@ -29,7 +28,11 @@
class="h-4 w-4 text-gray-600" class="h-4 w-4 text-gray-600"
/> />
<div class="font-medium"> <div class="font-medium">
{{ callLog.data.type == 'Incoming' ? 'Inbound' : 'Outbound' }} call {{
callLog.data.type == 'Incoming'
? __('Inbound Call')
: __('Outbound Call')
}}
</div> </div>
</div> </div>
<div> <div>
@ -37,7 +40,7 @@
:variant="'subtle'" :variant="'subtle'"
:theme="statusColorMap[callLog.data.status]" :theme="statusColorMap[callLog.data.status]"
size="md" size="md"
:label="statusLabelMap[callLog.data.status]" :label="__(statusLabelMap[callLog.data.status])"
/> />
</div> </div>
</div> </div>
@ -50,7 +53,7 @@
/> />
<div class="ml-1 flex flex-col gap-1"> <div class="ml-1 flex flex-col gap-1">
<div class="text-base font-medium"> <div class="text-base font-medium">
{{ callLog.data.caller.label }} {{ __(callLog.data.caller.label) }}
</div> </div>
<div class="text-xs text-gray-600"> <div class="text-xs text-gray-600">
{{ callLog.data.from }} {{ callLog.data.from }}
@ -64,7 +67,7 @@
/> />
<div class="ml-1 flex flex-col gap-1"> <div class="ml-1 flex flex-col gap-1">
<div class="text-base font-medium"> <div class="text-base font-medium">
{{ callLog.data.receiver.label }} {{ __(callLog.data.receiver.label) }}
</div> </div>
<div class="text-xs text-gray-600"> <div class="text-xs text-gray-600">
{{ callLog.data.to }} {{ callLog.data.to }}
@ -75,19 +78,19 @@
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<DurationIcon class="h-4 w-4 text-gray-600" /> <DurationIcon class="h-4 w-4 text-gray-600" />
<div class="text-sm text-gray-600">Duration</div> <div class="text-sm text-gray-600">{{ __('Duration') }}</div>
<div class="text-sm">{{ callLog.data.duration }}</div> <div class="text-sm">{{ callLog.data.duration }}</div>
</div> </div>
<Tooltip :text="dateFormat(callLog.data.creation, dateTooltipFormat)"> <Tooltip :text="dateFormat(callLog.data.creation, dateTooltipFormat)">
<div class="text-sm text-gray-600"> <div class="text-sm text-gray-600">
{{ timeAgo(callLog.data.creation) }} {{ __(timeAgo(callLog.data.creation)) }}
</div> </div>
</Tooltip> </Tooltip>
</div> </div>
</div> </div>
<div v-if="callLog.data.recording_url" class="mt-6"> <div v-if="callLog.data.recording_url" class="mt-6">
<div class="mb-3 text-base font-medium">Call recording</div> <div class="mb-3 text-base font-medium">{{ __('Call recording') }}</div>
<div class="flex items-center justify-between rounded border shadow-sm"> <div class="flex items-center justify-between rounded border shadow-sm">
<audio <audio
class="audio-control" class="audio-control"
@ -98,7 +101,7 @@
</div> </div>
<div v-if="callLog.data.note" class="mt-6"> <div v-if="callLog.data.note" class="mt-6">
<div class="mb-3 text-base font-medium">Call note</div> <div class="mb-3 text-base font-medium">{{ __('Call note') }}</div>
<div <div
class="flex h-56 cursor-pointer flex-col gap-3 rounded border p-4 shadow-sm" class="flex h-56 cursor-pointer flex-col gap-3 rounded border p-4 shadow-sm"
@click="showNoteModal = true" @click="showNoteModal = true"
@ -117,7 +120,7 @@
</div> </div>
<div v-if="callLog.data.lead" class="mt-6"> <div v-if="callLog.data.lead" class="mt-6">
<div class="mb-3 text-base font-medium">Lead</div> <div class="mb-3 text-base font-medium">{{ __('Lead') }}</div>
<Button <Button
variant="outline" variant="outline"
@ -206,7 +209,7 @@ function createLead() {
} }
const breadcrumbs = computed(() => { const breadcrumbs = computed(() => {
let items = [{ label: 'Call Logs', route: { name: 'Call Logs' } }] let items = [{ label: __('Call Logs'), route: { name: 'Call Logs' } }]
items.push({ items.push({
label: callLog.data?.caller.label, label: callLog.data?.caller.label,
route: { name: 'Call Log', params: { callLogId: props.callLogId } }, route: { name: 'Call Log', params: { callLogId: props.callLogId } },