Merge pull request #34 from shariquerik/fixes

This commit is contained in:
Shariq Ansari 2023-11-28 18:03:22 +05:30 committed by GitHub
commit f4284a34cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 95 additions and 76 deletions

View File

@ -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")]

View File

@ -68,7 +68,7 @@ class CRMCallLog(Document):
'width': '9rem',
},
{
'label': 'Created on',
'label': 'Created On',
'type': 'Datetime',
'key': 'creation',
'width': '8rem',

View File

@ -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',

View File

@ -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',

View File

@ -46,7 +46,7 @@ class CRMOrganization(Document):
'width': '14rem',
},
{
'label': 'Last modified',
'label': 'Last Modified',
'type': 'Datetime',
'key': 'modified',
'width': '8rem',

View File

@ -45,7 +45,7 @@ class CustomContact(Contact):
'width': '12rem',
},
{
'label': 'Last modified',
'label': 'Last Modified',
'type': 'Datetime',
'key': 'modified',
'width': '8rem',

View File

@ -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
})

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,16 @@
<template>
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M11.9998 3.5H4.92871C4.65257 3.5 4.42871 3.72386 4.42871 4C4.42871 4.27614 4.65257 4.5 4.92871 4.5H10.7929L3.64645 11.6464C3.45118 11.8417 3.45118 12.1583 3.64645 12.3536C3.84171 12.5488 4.15829 12.5488 4.35355 12.3536L11.4998 5.20733V11.0711C11.4998 11.3472 11.7236 11.5711 11.9998 11.5711C12.2759 11.5711 12.4998 11.3472 12.4998 11.0711V4.0149C12.5037 3.88202 12.455 3.74787 12.3536 3.64645C12.281 3.57388 12.1917 3.52828 12.098 3.50965C12.0813 3.50632 12.0643 3.50383 12.0471 3.50221C12.0336 3.50095 12.02 3.50022 12.0062 3.50004C12.0041 3.50001 12.0019 3.5 11.9998 3.5Z"
fill="currentColor"
/>
</svg>
</template>

View File

@ -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

View File

@ -33,7 +33,7 @@
:bubbleMenu="true"
:content="_note.content"
@change="(val) => (_note.content = val)"
placeholder="Type a content"
placeholder="Type a Content"
/>
</div>
</div>

View File

@ -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

View File

@ -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('-')"
/>

View File

@ -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',
},
],
},

View File

@ -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',
},
],
},

View File

@ -21,7 +21,10 @@
].includes(field.type)
"
class="form-control"
:class="{ '[&_input]:text-gray-500': field.type === 'date' && !data[field.name] }"
:class="{
'[&_input]:text-gray-500':
field.type === 'date' && !data[field.name],
}"
:type="field.type"
:value="data[field.name]"
:placeholder="field.placeholder"
@ -63,9 +66,9 @@
@change.stop="emit('update', field.name, $event.target.value)"
/>
</div>
<ExternalLinkIcon
<ArrowUpRightIcon
v-if="field.type === 'link' && field.link && data[field.name]"
class="h-4 w-4 shrink-0 cursor-pointer text-gray-600"
class="h-4 w-4 shrink-0 cursor-pointer text-gray-600 hover:text-gray-800"
@click="field.link(data[field.name])"
/>
</div>
@ -73,7 +76,7 @@
</template>
<script setup>
import ExternalLinkIcon from '@/components/Icons/ExternalLinkIcon.vue'
import ArrowUpRightIcon from '@/components/Icons/ArrowUpRightIcon.vue'
import Link from '@/components/Controls/Link.vue'
import { FormControl, Tooltip } from 'frappe-ui'
import { defineModel } from 'vue'

View File

@ -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>

View File

@ -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>
@ -190,7 +190,7 @@
})
"
>
<ExternalLinkIcon class="h-4 w-4" />
<ArrowUpRightIcon class="h-4 w-4" />
</Button>
<Button variant="ghost" @click="toggle()">
<FeatherIcon
@ -262,7 +262,7 @@ import TaskIcon from '@/components/Icons/TaskIcon.vue'
import NoteIcon from '@/components/Icons/NoteIcon.vue'
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
import LinkIcon from '@/components/Icons/LinkIcon.vue'
import ExternalLinkIcon from '@/components/Icons/ExternalLinkIcon.vue'
import ArrowUpRightIcon from '@/components/Icons/ArrowUpRightIcon.vue'
import SuccessIcon from '@/components/Icons/SuccessIcon.vue'
import LayoutHeader from '@/components/LayoutHeader.vue'
import Activities from '@/components/Activities.vue'
@ -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),
})

View File

@ -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)"