fix: added translation for timeAgo method

This commit is contained in:
Shariq Ansari 2024-04-15 20:40:13 +05:30
parent bb1b68c7d5
commit 7d5f51d3f3
10 changed files with 15 additions and 15 deletions

View File

@ -68,7 +68,7 @@
</span> </span>
</div> </div>
<div class="text-sm text-gray-600"> <div class="text-sm text-gray-600">
{{ timeAgo(n.creation) }} {{ __(timeAgo(n.creation)) }}
</div> </div>
</div> </div>
</RouterLink> </RouterLink>

View File

@ -131,7 +131,7 @@ const rows = computed(() => {
} else if (['modified', 'creation'].includes(row)) { } else if (['modified', 'creation'].includes(row)) {
_rows[row] = { _rows[row] = {
label: dateFormat(callLog[row], dateTooltipFormat), label: dateFormat(callLog[row], dateTooltipFormat),
timeAgo: timeAgo(callLog[row]), timeAgo: __(timeAgo(callLog[row])),
} }
} }
}) })

View File

@ -363,7 +363,7 @@ function getDealRowObject(deal) {
}, },
modified: { modified: {
label: dateFormat(deal.modified, dateTooltipFormat), label: dateFormat(deal.modified, dateTooltipFormat),
timeAgo: timeAgo(deal.modified), timeAgo: __(timeAgo(deal.modified)),
}, },
} }
} }

View File

@ -127,7 +127,7 @@ const rows = computed(() => {
} else if (['modified', 'creation'].includes(row)) { } else if (['modified', 'creation'].includes(row)) {
_rows[row] = { _rows[row] = {
label: dateFormat(contact[row], dateTooltipFormat), label: dateFormat(contact[row], dateTooltipFormat),
timeAgo: timeAgo(contact[row]), timeAgo: __(timeAgo(contact[row])),
} }
} }
}) })

View File

@ -147,7 +147,7 @@ const rows = computed(() => {
? 'green' ? 'green'
: 'orange' : 'orange'
if (value == 'First Response Due') { if (value == 'First Response Due') {
value = timeAgo(deal.response_by) value = __(timeAgo(deal.response_by))
tooltipText = dateFormat(deal.response_by, dateTooltipFormat) tooltipText = dateFormat(deal.response_by, dateTooltipFormat)
if (new Date(deal.response_by) < new Date()) { if (new Date(deal.response_by) < new Date()) {
color = 'red' color = 'red'
@ -176,7 +176,7 @@ const rows = computed(() => {
} else if (['modified', 'creation'].includes(row)) { } else if (['modified', 'creation'].includes(row)) {
_rows[row] = { _rows[row] = {
label: dateFormat(deal[row], dateTooltipFormat), label: dateFormat(deal[row], dateTooltipFormat),
timeAgo: timeAgo(deal[row]), timeAgo: __(timeAgo(deal[row])),
} }
} else if ( } else if (
['first_response_time', 'first_responded_on', 'response_by'].includes( ['first_response_time', 'first_responded_on', 'response_by'].includes(
@ -189,7 +189,7 @@ const rows = computed(() => {
timeAgo: deal[row] timeAgo: deal[row]
? row == 'first_response_time' ? row == 'first_response_time'
? formatTime(deal[row]) ? formatTime(deal[row])
: timeAgo(deal[row]) : __(timeAgo(deal[row]))
: '', : '',
} }
} }

View File

@ -149,7 +149,7 @@ const rows = computed(() => {
? 'green' ? 'green'
: 'orange' : 'orange'
if (value == 'First Response Due') { if (value == 'First Response Due') {
value = timeAgo(lead.response_by) value = __(timeAgo(lead.response_by))
tooltipText = dateFormat(lead.response_by, dateTooltipFormat) tooltipText = dateFormat(lead.response_by, dateTooltipFormat)
if (new Date(lead.response_by) < new Date()) { if (new Date(lead.response_by) < new Date()) {
color = 'red' color = 'red'
@ -178,7 +178,7 @@ const rows = computed(() => {
} else if (['modified', 'creation'].includes(row)) { } else if (['modified', 'creation'].includes(row)) {
_rows[row] = { _rows[row] = {
label: dateFormat(lead[row], dateTooltipFormat), label: dateFormat(lead[row], dateTooltipFormat),
timeAgo: timeAgo(lead[row]), timeAgo: __(timeAgo(lead[row])),
} }
} else if ( } else if (
['first_response_time', 'first_responded_on', 'response_by'].includes( ['first_response_time', 'first_responded_on', 'response_by'].includes(
@ -191,7 +191,7 @@ const rows = computed(() => {
timeAgo: lead[row] timeAgo: lead[row]
? row == 'first_response_time' ? row == 'first_response_time'
? formatTime(lead[row]) ? formatTime(lead[row])
: timeAgo(lead[row]) : __(timeAgo(lead[row]))
: '', : '',
} }
} }

View File

@ -66,7 +66,7 @@
</div> </div>
<Tooltip :text="dateFormat(note.modified, dateTooltipFormat)"> <Tooltip :text="dateFormat(note.modified, dateTooltipFormat)">
<div class="text-sm text-gray-700"> <div class="text-sm text-gray-700">
{{ timeAgo(note.modified) }} {{ __(timeAgo(note.modified)) }}
</div> </div>
</Tooltip> </Tooltip>
</div> </div>

View File

@ -416,7 +416,7 @@ function getDealRowObject(deal) {
}, },
modified: { modified: {
label: dateFormat(deal.modified, dateTooltipFormat), label: dateFormat(deal.modified, dateTooltipFormat),
timeAgo: timeAgo(deal.modified), timeAgo: __(timeAgo(deal.modified)),
}, },
} }
} }
@ -437,7 +437,7 @@ function getContactRowObject(contact) {
}, },
modified: { modified: {
label: dateFormat(contact.modified, dateTooltipFormat), label: dateFormat(contact.modified, dateTooltipFormat),
timeAgo: timeAgo(contact.modified), timeAgo: __(timeAgo(contact.modified)),
}, },
} }
} }

View File

@ -126,7 +126,7 @@ const rows = computed(() => {
} else if (['modified', 'creation'].includes(row)) { } else if (['modified', 'creation'].includes(row)) {
_rows[row] = { _rows[row] = {
label: dateFormat(organization[row], dateTooltipFormat), label: dateFormat(organization[row], dateTooltipFormat),
timeAgo: timeAgo(organization[row]), timeAgo: __(timeAgo(organization[row])),
} }
} }
}) })

View File

@ -89,7 +89,7 @@ const rows = computed(() => {
if (['modified', 'creation'].includes(row)) { if (['modified', 'creation'].includes(row)) {
_rows[row] = { _rows[row] = {
label: dateFormat(task[row], dateTooltipFormat), label: dateFormat(task[row], dateTooltipFormat),
timeAgo: timeAgo(task[row]), timeAgo: __(timeAgo(task[row])),
} }
} else if (row == 'assigned_to') { } else if (row == 'assigned_to') {
_rows[row] = { _rows[row] = {