fix: added translation in Contact Page
This commit is contained in:
parent
fb089a56c7
commit
e6dc98bbd7
@ -24,13 +24,13 @@
|
|||||||
{
|
{
|
||||||
icon: 'upload',
|
icon: 'upload',
|
||||||
label: contact.data.image
|
label: contact.data.image
|
||||||
? 'Change image'
|
? __('Change image')
|
||||||
: 'Upload image',
|
: __('Upload image'),
|
||||||
onClick: openFileSelector,
|
onClick: openFileSelector,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'trash-2',
|
icon: 'trash-2',
|
||||||
label: 'Remove image',
|
label: __('Remove image'),
|
||||||
onClick: () => changeContactImage(''),
|
onClick: () => changeContactImage(''),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -71,7 +71,10 @@
|
|||||||
>
|
>
|
||||||
·
|
·
|
||||||
</span>
|
</span>
|
||||||
<Tooltip text="Make Call" v-if="contact.data.actual_mobile_no">
|
<Tooltip
|
||||||
|
:text="__('Make Call')"
|
||||||
|
v-if="contact.data.actual_mobile_no"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="flex cursor-pointer items-center gap-1.5"
|
class="flex cursor-pointer items-center gap-1.5"
|
||||||
@click="makeCall(contact.data.actual_mobile_no)"
|
@click="makeCall(contact.data.actual_mobile_no)"
|
||||||
@ -113,7 +116,7 @@
|
|||||||
contact.data.company_name
|
contact.data.company_name
|
||||||
"
|
"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
label="More"
|
:label="__('More')"
|
||||||
class="-ml-1 cursor-pointer hover:text-gray-900"
|
class="-ml-1 cursor-pointer hover:text-gray-900"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
@ -125,7 +128,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-2 flex gap-1.5">
|
<div class="mt-2 flex gap-1.5">
|
||||||
<Button
|
<Button
|
||||||
label="Edit"
|
:label="__('Edit')"
|
||||||
size="sm"
|
size="sm"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
@ -139,7 +142,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
label="Delete"
|
:label="__('Delete')"
|
||||||
theme="red"
|
theme="red"
|
||||||
size="sm"
|
size="sm"
|
||||||
@click="deleteContact"
|
@click="deleteContact"
|
||||||
@ -149,7 +152,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<ErrorMessage :message="error" />
|
<ErrorMessage :message="__(error)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -161,7 +164,7 @@
|
|||||||
:class="{ 'text-gray-900': selected }"
|
:class="{ 'text-gray-900': selected }"
|
||||||
>
|
>
|
||||||
<component v-if="tab.icon" :is="tab.icon" class="h-5" />
|
<component v-if="tab.icon" :is="tab.icon" class="h-5" />
|
||||||
{{ tab.label }}
|
{{ __(tab.label) }}
|
||||||
<Badge
|
<Badge
|
||||||
class="group-hover:bg-gray-900"
|
class="group-hover:bg-gray-900"
|
||||||
:class="[selected ? 'bg-gray-900' : 'bg-gray-600']"
|
:class="[selected ? 'bg-gray-900' : 'bg-gray-600']"
|
||||||
@ -187,7 +190,7 @@
|
|||||||
>
|
>
|
||||||
<div class="flex flex-col items-center justify-center space-y-3">
|
<div class="flex flex-col items-center justify-center space-y-3">
|
||||||
<component :is="tab.icon" class="!h-10 !w-10" />
|
<component :is="tab.icon" class="!h-10 !w-10" />
|
||||||
<div>No {{ tab.label }} Found</div>
|
<div>{{ __('No {0} Found', [__(tab.label)]) }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -251,7 +254,7 @@ const showContactModal = ref(false)
|
|||||||
const detailMode = ref(false)
|
const detailMode = ref(false)
|
||||||
|
|
||||||
const breadcrumbs = computed(() => {
|
const breadcrumbs = computed(() => {
|
||||||
let items = [{ label: 'Contacts', route: { name: 'Contacts' } }]
|
let items = [{ label: __('Contacts'), route: { name: 'Contacts' } }]
|
||||||
items.push({
|
items.push({
|
||||||
label: contact.data?.full_name,
|
label: contact.data?.full_name,
|
||||||
route: { name: 'Contact', params: { contactId: props.contactId } },
|
route: { name: 'Contact', params: { contactId: props.contactId } },
|
||||||
@ -262,7 +265,7 @@ const breadcrumbs = computed(() => {
|
|||||||
function validateFile(file) {
|
function validateFile(file) {
|
||||||
let extn = file.name.split('.').pop().toLowerCase()
|
let extn = file.name.split('.').pop().toLowerCase()
|
||||||
if (!['png', 'jpg', 'jpeg'].includes(extn)) {
|
if (!['png', 'jpg', 'jpeg'].includes(extn)) {
|
||||||
return 'Only PNG and JPG images are allowed'
|
return __('Only PNG and JPG images are allowed')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,11 +281,11 @@ async function changeContactImage(file) {
|
|||||||
|
|
||||||
async function deleteContact() {
|
async function deleteContact() {
|
||||||
$dialog({
|
$dialog({
|
||||||
title: 'Delete contact',
|
title: __('Delete contact'),
|
||||||
message: 'Are you sure you want to delete this contact?',
|
message: __('Are you sure you want to delete this contact?'),
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
label: 'Delete',
|
label: __('Delete'),
|
||||||
theme: 'red',
|
theme: 'red',
|
||||||
variant: 'solid',
|
variant: 'solid',
|
||||||
async onClick(close) {
|
async onClick(close) {
|
||||||
@ -367,37 +370,37 @@ function getDealRowObject(deal) {
|
|||||||
|
|
||||||
const dealColumns = [
|
const dealColumns = [
|
||||||
{
|
{
|
||||||
label: 'Organization',
|
label: __('Organization'),
|
||||||
key: 'organization',
|
key: 'organization',
|
||||||
width: '11rem',
|
width: '11rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Amount',
|
label: __('Amount'),
|
||||||
key: 'annual_revenue',
|
key: 'annual_revenue',
|
||||||
width: '9rem',
|
width: '9rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Status',
|
label: __('Status'),
|
||||||
key: 'status',
|
key: 'status',
|
||||||
width: '10rem',
|
width: '10rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Email',
|
label: __('Email'),
|
||||||
key: 'email',
|
key: 'email',
|
||||||
width: '12rem',
|
width: '12rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Mobile no',
|
label: __('Mobile no'),
|
||||||
key: 'mobile_no',
|
key: 'mobile_no',
|
||||||
width: '11rem',
|
width: '11rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Deal owner',
|
label: __('Deal owner'),
|
||||||
key: 'deal_owner',
|
key: 'deal_owner',
|
||||||
width: '10rem',
|
width: '10rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Last modified',
|
label: __('Last modified'),
|
||||||
key: 'modified',
|
key: 'modified',
|
||||||
width: '8rem',
|
width: '8rem',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -426,7 +426,7 @@ function validateRequired(fieldname, value) {
|
|||||||
const breadcrumbs = computed(() => {
|
const breadcrumbs = computed(() => {
|
||||||
let items = [{ label: __('Deals'), route: { name: 'Deals' } }]
|
let items = [{ label: __('Deals'), route: { name: 'Deals' } }]
|
||||||
items.push({
|
items.push({
|
||||||
label: __(organization.value?.name),
|
label: organization.value?.name,
|
||||||
route: { name: 'Deal', params: { dealId: deal.data.name } },
|
route: { name: 'Deal', params: { dealId: deal.data.name } },
|
||||||
})
|
})
|
||||||
return items
|
return items
|
||||||
|
|||||||
@ -390,7 +390,7 @@ function validateRequired(fieldname, value) {
|
|||||||
const breadcrumbs = computed(() => {
|
const breadcrumbs = computed(() => {
|
||||||
let items = [{ label: __('Leads'), route: { name: 'Leads' } }]
|
let items = [{ label: __('Leads'), route: { name: 'Leads' } }]
|
||||||
items.push({
|
items.push({
|
||||||
label: __(lead.data.lead_name),
|
label: lead.data.lead_name,
|
||||||
route: { name: 'Lead', params: { leadId: lead.data.name } },
|
route: { name: 'Lead', params: { leadId: lead.data.name } },
|
||||||
})
|
})
|
||||||
return items
|
return items
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user