fix: Title cases everywhere possible
This commit is contained in:
parent
59f238ebc7
commit
b1584eaa36
@ -165,10 +165,10 @@ def get_field_obj(field):
|
||||
"name": field.fieldname,
|
||||
}
|
||||
|
||||
obj["placeholder"] = "Add " + field.label.lower() + "..."
|
||||
obj["placeholder"] = "Add " + field.label + "..."
|
||||
|
||||
if field.fieldtype == "Link":
|
||||
obj["placeholder"] = "Select " + field.label.lower() + "..."
|
||||
obj["placeholder"] = "Select " + field.label + "..."
|
||||
obj["doctype"] = field.options
|
||||
elif field.fieldtype == "Select":
|
||||
obj["options"] = [{"label": option, "value": option} for option in field.options.split("\n")]
|
||||
|
||||
@ -68,7 +68,7 @@ class CRMCallLog(Document):
|
||||
'width': '9rem',
|
||||
},
|
||||
{
|
||||
'label': 'Created on',
|
||||
'label': 'Created On',
|
||||
'type': 'Datetime',
|
||||
'key': 'creation',
|
||||
'width': '8rem',
|
||||
|
||||
@ -86,20 +86,20 @@ class CRMDeal(Document):
|
||||
'width': '12rem',
|
||||
},
|
||||
{
|
||||
'label': 'Mobile no',
|
||||
'label': 'Mobile No',
|
||||
'type': 'Data',
|
||||
'key': 'mobile_no',
|
||||
'width': '11rem',
|
||||
},
|
||||
{
|
||||
'label': 'Deal owner',
|
||||
'label': 'Deal Owner',
|
||||
'type': 'Link',
|
||||
'key': 'deal_owner',
|
||||
'options': 'User',
|
||||
'width': '10rem',
|
||||
},
|
||||
{
|
||||
'label': 'Last modified',
|
||||
'label': 'Last Modified',
|
||||
'type': 'Datetime',
|
||||
'key': 'modified',
|
||||
'width': '8rem',
|
||||
|
||||
@ -165,20 +165,20 @@ class CRMLead(Document):
|
||||
'width': '12rem',
|
||||
},
|
||||
{
|
||||
'label': 'Mobile no',
|
||||
'label': 'Mobile No',
|
||||
'type': 'Data',
|
||||
'key': 'mobile_no',
|
||||
'width': '11rem',
|
||||
},
|
||||
{
|
||||
'label': 'Lead owner',
|
||||
'label': 'Lead Owner',
|
||||
'type': 'Link',
|
||||
'key': 'lead_owner',
|
||||
'options': 'User',
|
||||
'width': '10rem',
|
||||
},
|
||||
{
|
||||
'label': 'Last modified',
|
||||
'label': 'Last Modified',
|
||||
'type': 'Datetime',
|
||||
'key': 'modified',
|
||||
'width': '8rem',
|
||||
|
||||
@ -46,7 +46,7 @@ class CRMOrganization(Document):
|
||||
'width': '14rem',
|
||||
},
|
||||
{
|
||||
'label': 'Last modified',
|
||||
'label': 'Last Modified',
|
||||
'type': 'Datetime',
|
||||
'key': 'modified',
|
||||
'width': '8rem',
|
||||
|
||||
@ -45,7 +45,7 @@ class CustomContact(Contact):
|
||||
'width': '12rem',
|
||||
},
|
||||
{
|
||||
'label': 'Last modified',
|
||||
'label': 'Last Modified',
|
||||
'type': 'Datetime',
|
||||
'key': 'modified',
|
||||
'width': '8rem',
|
||||
|
||||
@ -11,19 +11,19 @@
|
||||
<template #prefix>
|
||||
<PhoneIcon class="h-4 w-4" />
|
||||
</template>
|
||||
<span>Make a call</span>
|
||||
<span>Make a Call</span>
|
||||
</Button>
|
||||
<Button v-else-if="title == 'Notes'" variant="solid" @click="showNote()">
|
||||
<template #prefix>
|
||||
<FeatherIcon name="plus" class="h-4 w-4" />
|
||||
</template>
|
||||
<span>New note</span>
|
||||
<span>New Note</span>
|
||||
</Button>
|
||||
<Button v-else-if="title == 'Tasks'" variant="solid" @click="showTask()">
|
||||
<template #prefix>
|
||||
<FeatherIcon name="plus" class="h-4 w-4" />
|
||||
</template>
|
||||
<span>New task</span>
|
||||
<span>New Task</span>
|
||||
</Button>
|
||||
</div>
|
||||
<div v-if="activities?.length" class="flex-1 overflow-y-auto">
|
||||
@ -118,7 +118,7 @@
|
||||
:options="taskStatusOptions(updateTaskStatus, task)"
|
||||
@click.stop
|
||||
>
|
||||
<Tooltip text="Change status">
|
||||
<Tooltip text="Change Status">
|
||||
<Button variant="ghosted" class="hover:bg-gray-300">
|
||||
<TaskStatusIcon :status="task.status" />
|
||||
</Button>
|
||||
@ -131,7 +131,7 @@
|
||||
label: 'Delete',
|
||||
onClick: () => {
|
||||
$dialog({
|
||||
title: 'Delete task',
|
||||
title: 'Delete Task',
|
||||
message: 'Are you sure you want to delete this task?',
|
||||
actions: [
|
||||
{
|
||||
@ -187,7 +187,7 @@
|
||||
>
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
{{ call.type == 'Incoming' ? 'Inbound' : 'Outbound' }} call
|
||||
{{ call.type == 'Incoming' ? 'Inbound' : 'Outbound' }} Call
|
||||
</div>
|
||||
<div>
|
||||
<Tooltip
|
||||
@ -213,7 +213,7 @@
|
||||
<PlayIcon class="h-4 w-4 text-gray-600" />
|
||||
<div class="text-sm text-gray-600">
|
||||
{{
|
||||
call.show_recording ? 'Hide recording' : 'Listen to call'
|
||||
call.show_recording ? 'Hide Recording' : 'Listen to Call'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
@ -226,7 +226,7 @@
|
||||
class="audio-control"
|
||||
controls
|
||||
:src="call.recording_url"
|
||||
></audio>
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-1">
|
||||
@ -336,7 +336,7 @@
|
||||
>
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
{{ activity.type == 'Incoming' ? 'Inbound' : 'Outbound' }} call
|
||||
{{ activity.type == 'Incoming' ? 'Inbound' : 'Outbound' }} Call
|
||||
</div>
|
||||
<div>
|
||||
<Tooltip
|
||||
@ -362,7 +362,7 @@
|
||||
<PlayIcon class="h-4 w-4 text-gray-600" />
|
||||
<div class="text-sm text-gray-600">
|
||||
{{
|
||||
activity.show_recording ? 'Hide recording' : 'Listen to call'
|
||||
activity.show_recording ? 'Hide Recording' : 'Listen to Call'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
@ -534,7 +534,7 @@
|
||||
<div v-if="activity.other_versions">
|
||||
<Button
|
||||
:label="
|
||||
activity.show_others ? 'Hide all changes' : 'Show all changes'
|
||||
activity.show_others ? 'Hide all Changes' : 'Show all Changes'
|
||||
"
|
||||
variant="outline"
|
||||
@click="activity.show_others = !activity.show_others"
|
||||
@ -560,25 +560,25 @@
|
||||
<Button
|
||||
v-if="title == 'Calls'"
|
||||
variant="solid"
|
||||
label="Make a call"
|
||||
label="Make a Call"
|
||||
@click="makeCall(doc.data.mobile_no)"
|
||||
/>
|
||||
<Button
|
||||
v-else-if="title == 'Notes'"
|
||||
variant="solid"
|
||||
label="Create note"
|
||||
label="Create Note"
|
||||
@click="showNote()"
|
||||
/>
|
||||
<Button
|
||||
v-else-if="title == 'Emails'"
|
||||
variant="solid"
|
||||
label="Send email"
|
||||
label="Send Email"
|
||||
@click="$refs.emailBox.show = true"
|
||||
/>
|
||||
<Button
|
||||
v-else-if="title == 'Tasks'"
|
||||
variant="solid"
|
||||
label="Create task"
|
||||
label="Create Task"
|
||||
@click="showTask()"
|
||||
/>
|
||||
</div>
|
||||
@ -825,13 +825,13 @@ function update_activities_details(activity) {
|
||||
}
|
||||
|
||||
const emptyText = computed(() => {
|
||||
let text = 'No email communications'
|
||||
let text = 'No Email Communications'
|
||||
if (props.title == 'Calls') {
|
||||
text = 'No call logs'
|
||||
text = 'No Call Logs'
|
||||
} else if (props.title == 'Notes') {
|
||||
text = 'No notes'
|
||||
text = 'No Notes'
|
||||
} else if (props.title == 'Tasks') {
|
||||
text = 'No tasks'
|
||||
text = 'No Tasks'
|
||||
}
|
||||
return text
|
||||
})
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<Button
|
||||
variant="ghost"
|
||||
class="w-full !justify-start"
|
||||
label="Create one"
|
||||
label="Create New"
|
||||
@click="attrs.onCreate(value, close)"
|
||||
>
|
||||
<template #prefix>
|
||||
|
||||
@ -78,7 +78,7 @@
|
||||
class="!text-gray-600"
|
||||
variant="ghost"
|
||||
@click="togglePopover()"
|
||||
label="Add filter"
|
||||
label="Add Filter"
|
||||
>
|
||||
<template #prefix>
|
||||
<FeatherIcon name="plus" class="h-4" />
|
||||
@ -90,7 +90,7 @@
|
||||
v-if="storage.size"
|
||||
class="!text-gray-600"
|
||||
variant="ghost"
|
||||
label="Clear all filter"
|
||||
label="Clear all Filter"
|
||||
@click="clearfilter(close)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<Button
|
||||
variant="ghost"
|
||||
class="w-full !justify-start"
|
||||
label="Create one"
|
||||
label="Create New"
|
||||
@click="field.create()"
|
||||
>
|
||||
<template #prefix>
|
||||
@ -241,7 +241,7 @@ function handleContactUpdate(doc) {
|
||||
}
|
||||
|
||||
const dialogOptions = computed(() => {
|
||||
let title = !editMode.value ? 'New contact' : _contact.value.full_name
|
||||
let title = !editMode.value ? 'New Contact' : _contact.value.full_name
|
||||
|
||||
let size = detailMode.value ? '' : 'xl'
|
||||
let actions = detailMode.value
|
||||
@ -323,12 +323,12 @@ const sections = computed(() => {
|
||||
{
|
||||
fields: [
|
||||
{
|
||||
label: 'First name',
|
||||
label: 'First Name',
|
||||
type: 'data',
|
||||
name: 'first_name',
|
||||
},
|
||||
{
|
||||
label: 'Last name',
|
||||
label: 'Last Name',
|
||||
type: 'data',
|
||||
name: 'last_name',
|
||||
},
|
||||
@ -353,10 +353,10 @@ const sections = computed(() => {
|
||||
new_field.value = {
|
||||
type: 'email',
|
||||
value,
|
||||
placeholder: 'Add email address',
|
||||
placeholder: 'Add Email Address',
|
||||
}
|
||||
_dialogOptions.value = {
|
||||
title: 'Add email',
|
||||
title: 'Add Email',
|
||||
actions: [
|
||||
{
|
||||
label: 'Add',
|
||||
@ -373,7 +373,7 @@ const sections = computed(() => {
|
||||
{
|
||||
fields: [
|
||||
{
|
||||
label: 'Mobile no.',
|
||||
label: 'Mobile No.',
|
||||
type: 'dropdown',
|
||||
name: 'mobile_no',
|
||||
options: props.contact?.phone_nos?.map((phone) => {
|
||||
@ -389,10 +389,10 @@ const sections = computed(() => {
|
||||
new_field.value = {
|
||||
type: 'tel',
|
||||
value,
|
||||
placeholder: 'Add mobile no.',
|
||||
placeholder: 'Add Mobile No.',
|
||||
}
|
||||
_dialogOptions.value = {
|
||||
title: 'Add mobile no.',
|
||||
title: 'Add Mobile No.',
|
||||
actions: [
|
||||
{
|
||||
label: 'Add',
|
||||
@ -408,7 +408,7 @@ const sections = computed(() => {
|
||||
label: 'Gender',
|
||||
type: 'link',
|
||||
name: 'gender',
|
||||
placeholder: 'Select gender',
|
||||
placeholder: 'Select Gender',
|
||||
doctype: 'Gender',
|
||||
change: (value) => {
|
||||
_contact.value.gender = value
|
||||
@ -422,7 +422,7 @@ const sections = computed(() => {
|
||||
label: 'Organization',
|
||||
type: 'link',
|
||||
name: 'company_name',
|
||||
placeholder: 'Select organization',
|
||||
placeholder: 'Select Organization',
|
||||
doctype: 'CRM Organization',
|
||||
change: (value) => {
|
||||
_contact.value.company_name = value
|
||||
@ -451,7 +451,7 @@ const sections = computed(() => {
|
||||
label: 'Address',
|
||||
type: 'link',
|
||||
name: 'address',
|
||||
placeholder: 'Select address',
|
||||
placeholder: 'Select Address',
|
||||
doctype: 'Address',
|
||||
change: (value) => {
|
||||
_contact.value.address = value
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
:bubbleMenu="true"
|
||||
:content="_note.content"
|
||||
@change="(val) => (_note.content = val)"
|
||||
placeholder="Type a content"
|
||||
placeholder="Type a Content"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -41,10 +41,10 @@
|
||||
type="text"
|
||||
ref="title"
|
||||
size="md"
|
||||
label="Organization name"
|
||||
label="Organization Name"
|
||||
variant="outline"
|
||||
v-model="_organization.organization_name"
|
||||
placeholder="Add organization name"
|
||||
placeholder="Add Organization Name"
|
||||
/>
|
||||
<div class="flex gap-4">
|
||||
<FormControl
|
||||
@ -54,16 +54,16 @@
|
||||
label="Website"
|
||||
variant="outline"
|
||||
v-model="_organization.website"
|
||||
placeholder="Add website"
|
||||
placeholder="Add Website"
|
||||
/>
|
||||
<FormControl
|
||||
class="flex-1"
|
||||
type="text"
|
||||
size="md"
|
||||
label="Annual revenue"
|
||||
label="Annual Revenue"
|
||||
variant="outline"
|
||||
v-model="_organization.annual_revenue"
|
||||
placeholder="Add annual revenue"
|
||||
placeholder="Add Annual Revenue"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex gap-4">
|
||||
@ -81,7 +81,7 @@
|
||||
'10001+',
|
||||
]"
|
||||
size="md"
|
||||
label="No. of employees"
|
||||
label="No. of Employees"
|
||||
variant="outline"
|
||||
v-model="_organization.no_of_employees"
|
||||
/>
|
||||
@ -92,7 +92,7 @@
|
||||
variant="outline"
|
||||
v-model="_organization.industry"
|
||||
doctype="CRM Industry"
|
||||
placeholder="Add industry"
|
||||
placeholder="Add Industry"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -224,7 +224,7 @@ function handleOrganizationUpdate(doc) {
|
||||
|
||||
const dialogOptions = computed(() => {
|
||||
let title = !editMode.value
|
||||
? 'New organization'
|
||||
? 'New Organization'
|
||||
: _organization.value.organization_name
|
||||
let size = detailMode.value ? '' : 'xl'
|
||||
let actions = detailMode.value
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
ref="title"
|
||||
variant="outline"
|
||||
v-model="_task.title"
|
||||
placeholder="Add title"
|
||||
placeholder="Add Title"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
@ -33,7 +33,7 @@
|
||||
:bubbleMenu="true"
|
||||
:content="_task.description"
|
||||
@change="(val) => (_task.description = val)"
|
||||
placeholder="Type a description"
|
||||
placeholder="Type a Description"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
@ -60,7 +60,7 @@
|
||||
<DatePicker
|
||||
class="datepicker w-36"
|
||||
v-model="_task.due_date"
|
||||
placeholder="Due date"
|
||||
placeholder="Due Date"
|
||||
input-class="border-none"
|
||||
:formatValue="(val) => val.split('-').reverse().join('-')"
|
||||
/>
|
||||
|
||||
@ -144,7 +144,7 @@ const allFields = [
|
||||
type: 'data',
|
||||
},
|
||||
{
|
||||
label: 'Mobile no',
|
||||
label: 'Mobile No',
|
||||
name: 'mobile_no',
|
||||
type: 'data',
|
||||
},
|
||||
@ -173,10 +173,10 @@ const allFields = [
|
||||
options: statusDropdownOptions(props.newDeal, 'deal'),
|
||||
},
|
||||
{
|
||||
label: 'Deal owner',
|
||||
label: 'Deal Owner',
|
||||
name: 'lead_owner',
|
||||
type: 'link',
|
||||
placeholder: 'Deal owner',
|
||||
placeholder: 'Deal Owner',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@ -144,7 +144,7 @@ const allFields = [
|
||||
type: 'data',
|
||||
},
|
||||
{
|
||||
label: 'Mobile no',
|
||||
label: 'Mobile No',
|
||||
name: 'mobile_no',
|
||||
type: 'data',
|
||||
},
|
||||
@ -173,10 +173,10 @@ const allFields = [
|
||||
options: statusDropdownOptions(props.newLead),
|
||||
},
|
||||
{
|
||||
label: 'Lead owner',
|
||||
label: 'Lead Owner',
|
||||
name: 'lead_owner',
|
||||
type: 'user',
|
||||
placeholder: 'Lead owner',
|
||||
placeholder: 'Lead Owner',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
class="!text-gray-600"
|
||||
variant="ghost"
|
||||
@click="togglePopover()"
|
||||
label="Add sort"
|
||||
label="Add Sort"
|
||||
>
|
||||
<template #prefix>
|
||||
<FeatherIcon name="plus" class="h-4" />
|
||||
@ -78,7 +78,7 @@
|
||||
v-if="sortValues.length"
|
||||
class="!text-gray-600"
|
||||
variant="ghost"
|
||||
label="Clear sort"
|
||||
label="Clear Sort"
|
||||
@click="clearSort(close)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<div
|
||||
class="flex h-[41px] items-center border-b px-5 py-2.5 text-lg font-semibold"
|
||||
>
|
||||
About this deal
|
||||
About this Deal
|
||||
</div>
|
||||
<div class="flex items-center justify-start gap-5 border-b p-5">
|
||||
<Tooltip
|
||||
@ -122,7 +122,7 @@
|
||||
<template #target="{ togglePopover }">
|
||||
<Button
|
||||
class="h-7 px-3"
|
||||
label="Add contact"
|
||||
label="Add Contact"
|
||||
@click="togglePopover()"
|
||||
>
|
||||
<template #prefix>
|
||||
@ -452,7 +452,7 @@ function contactOptions(contact) {
|
||||
|
||||
if (!contact.is_primary) {
|
||||
options.push({
|
||||
label: 'Set as primary contact',
|
||||
label: 'Set as Primary Contact',
|
||||
icon: h(SuccessIcon, { class: 'h-4 w-4' }),
|
||||
onClick: () => setPrimaryContact(contact.name),
|
||||
})
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
</Button>
|
||||
</template>
|
||||
</Dropdown>
|
||||
<Button label="Convert to deal" variant="solid" @click="convertToDeal" />
|
||||
<Button label="Convert to Deal" variant="solid" @click="convertToDeal" />
|
||||
</template>
|
||||
</LayoutHeader>
|
||||
<div v-if="lead?.data" class="flex h-full overflow-hidden">
|
||||
@ -50,7 +50,7 @@
|
||||
<div
|
||||
class="flex h-[41px] items-center border-b px-5 py-2.5 text-lg font-semibold"
|
||||
>
|
||||
About this lead
|
||||
About this Lead
|
||||
</div>
|
||||
<FileUploader
|
||||
@success="(file) => updateField('image', file.file_url)"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user