Merge pull request #1153 from frappe/mergify/bp/main-hotfix/pr-1152
fix: More fixes (backport #1152)
This commit is contained in:
commit
a246a5e6e4
@ -192,7 +192,7 @@ def add_default_fields_layout(force=False):
|
|||||||
},
|
},
|
||||||
"CRM Deal-Data Fields": {
|
"CRM Deal-Data Fields": {
|
||||||
"doctype": "CRM Deal",
|
"doctype": "CRM Deal",
|
||||||
"layout": '[{"label": "Details", "name": "details_section", "opened": true, "columns": [{"name": "column_z9XL", "fields": ["organization", "annual_revenue", "next_step"]}, {"name": "column_gM4w", "fields": ["website", "close_date", "deal_owner"]}, {"name": "column_gWmE", "fields": ["territory", "probability"]}]}]',
|
"layout": '[{"name":"first_tab","sections":[{"label":"Details","name":"details_section","opened":true,"columns":[{"name":"column_z9XL","fields":["organization","annual_revenue","next_step"]},{"name":"column_gM4w","fields":["website","closed_date","deal_owner"]},{"name":"column_gWmE","fields":["territory","probability"]}]},{"label":"Products","name":"section_jHhQ","opened":true,"columns":[{"name":"column_xiNF","fields":["products"]}],"editingLabel":false,"hideLabel":true},{"label":"New Section","name":"section_WNOQ","opened":true,"columns":[{"name":"column_ziBW","fields":["total"]},{"label":"","name":"column_wuwA","fields":["net_total"]}],"hideBorder":true,"hideLabel":true}]}]',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,4 +14,5 @@ crm.patches.v1_0.update_layouts_to_new_format
|
|||||||
crm.patches.v1_0.move_twilio_agent_to_telephony_agent
|
crm.patches.v1_0.move_twilio_agent_to_telephony_agent
|
||||||
crm.patches.v1_0.create_default_scripts # 13-06-2025
|
crm.patches.v1_0.create_default_scripts # 13-06-2025
|
||||||
crm.patches.v1_0.update_deal_status_probabilities
|
crm.patches.v1_0.update_deal_status_probabilities
|
||||||
crm.patches.v1_0.update_deal_status_type
|
crm.patches.v1_0.update_deal_status_type
|
||||||
|
crm.patches.v1_0.create_default_lost_reasons
|
||||||
5
crm/patches/v1_0/create_default_lost_reasons.py
Normal file
5
crm/patches/v1_0/create_default_lost_reasons.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from crm.install import add_default_lost_reasons
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
add_default_lost_reasons()
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit b295b54aaa3a2a22f455df819d87433dc6b9ff6a
|
Subproject commit 136f2715c2bd22b7390a2a02f1849a147d16b191
|
||||||
@ -143,8 +143,9 @@ import ColumnsIcon from '@/components/Icons/ColumnsIcon.vue'
|
|||||||
import EditIcon from '@/components/Icons/EditIcon.vue'
|
import EditIcon from '@/components/Icons/EditIcon.vue'
|
||||||
import DragIcon from '@/components/Icons/DragIcon.vue'
|
import DragIcon from '@/components/Icons/DragIcon.vue'
|
||||||
import ReloadIcon from '@/components/Icons/ReloadIcon.vue'
|
import ReloadIcon from '@/components/Icons/ReloadIcon.vue'
|
||||||
|
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
||||||
import { isTouchScreenDevice } from '@/utils'
|
import { isTouchScreenDevice } from '@/utils'
|
||||||
import { Autocomplete, Popover } from 'frappe-ui'
|
import { Popover } from 'frappe-ui'
|
||||||
import Draggable from 'vuedraggable'
|
import Draggable from 'vuedraggable'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { watchOnce } from '@vueuse/core'
|
import { watchOnce } from '@vueuse/core'
|
||||||
@ -209,6 +210,7 @@ const fields = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function addColumn(c) {
|
function addColumn(c) {
|
||||||
|
if (!c) return
|
||||||
let align = ['Float', 'Int', 'Percent', 'Currency'].includes(c.type)
|
let align = ['Float', 'Int', 'Percent', 'Currency'].includes(c.type)
|
||||||
? 'right'
|
? 'right'
|
||||||
: 'left'
|
: 'left'
|
||||||
|
|||||||
@ -52,10 +52,10 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-12">
|
<div class="flex items-center justify-center w-12">
|
||||||
<Button
|
<Button
|
||||||
:tooltip="__('Edit grid fields')"
|
:tooltip="__('Edit grid fields')"
|
||||||
class="flex w-full items-center justify-center rounded !bg-surface-gray-2 border-0 !text-ink-gray-5"
|
class="rounded !bg-surface-gray-2 border-0 !text-ink-gray-5"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
icon="settings"
|
icon="settings"
|
||||||
@click="showGridFieldsEditorModal = true"
|
@click="showGridFieldsEditorModal = true"
|
||||||
@ -275,10 +275,10 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="edit-row w-12">
|
<div class="edit-row flex items-center justify-center w-12">
|
||||||
<Button
|
<Button
|
||||||
:tooltip="__('Edit row')"
|
:tooltip="__('Edit row')"
|
||||||
class="flex w-full items-center justify-center rounded border-0 !text-ink-gray-7"
|
class="rounded border-0 !text-ink-gray-7"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
:icon="EditIcon"
|
:icon="EditIcon"
|
||||||
@click="showRowList[index] = true"
|
@click="showRowList[index] = true"
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 pt-4 pb-7 sm:px-6">
|
<div class="px-4 pt-4 pb-7 sm:px-6">
|
||||||
<div class="space-y-2">
|
<div class="flex justify-end gap-2">
|
||||||
<Button
|
<Button
|
||||||
class="w-full"
|
class="w-full"
|
||||||
v-for="action in dialogOptions.actions"
|
v-for="action in dialogOptions.actions"
|
||||||
@ -60,7 +60,7 @@ import { showQuickEntryModal, quickEntryProps } from '@/composables/modals'
|
|||||||
import { getRandom } from '@/utils'
|
import { getRandom } from '@/utils'
|
||||||
import { capture } from '@/telemetry'
|
import { capture } from '@/telemetry'
|
||||||
import { useDocument } from '@/data/document'
|
import { useDocument } from '@/data/document'
|
||||||
import { FeatherIcon, createResource, ErrorMessage, Badge } from 'frappe-ui'
|
import { createResource, ErrorMessage, Badge } from 'frappe-ui'
|
||||||
import { ref, nextTick, computed, onMounted } from 'vue'
|
import { ref, nextTick, computed, onMounted } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -1,17 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog v-model="show" :options="{ size: 'xl' }">
|
||||||
v-model="show"
|
|
||||||
:options="{
|
|
||||||
size: 'xl',
|
|
||||||
actions: [
|
|
||||||
{
|
|
||||||
label: editMode ? __('Update') : __('Create'),
|
|
||||||
variant: 'solid',
|
|
||||||
onClick: () => updateNote(),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<template #body-title>
|
<template #body-title>
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<h3 class="text-2xl font-semibold leading-6 text-ink-gray-9">
|
<h3 class="text-2xl font-semibold leading-6 text-ink-gray-9">
|
||||||
@ -58,6 +46,15 @@
|
|||||||
<ErrorMessage class="mt-4" v-if="error" :message="__(error)" />
|
<ErrorMessage class="mt-4" v-if="error" :message="__(error)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template #actions>
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<Button
|
||||||
|
:label="editMode ? __('Update') : __('Create')"
|
||||||
|
variant="solid"
|
||||||
|
@click="updateNote"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -1,17 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog v-model="show" :options="{ size: 'xl' }">
|
||||||
v-model="show"
|
|
||||||
:options="{
|
|
||||||
size: 'xl',
|
|
||||||
actions: [
|
|
||||||
{
|
|
||||||
label: editMode ? __('Update') : __('Create'),
|
|
||||||
variant: 'solid',
|
|
||||||
onClick: () => updateTask(),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<template #body-title>
|
<template #body-title>
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<h3 class="text-2xl font-semibold leading-6 text-ink-gray-9">
|
<h3 class="text-2xl font-semibold leading-6 text-ink-gray-9">
|
||||||
@ -90,13 +78,15 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</template>
|
</template>
|
||||||
</Link>
|
</Link>
|
||||||
<DateTimePicker
|
<div class="w-36">
|
||||||
class="datepicker w-36"
|
<DateTimePicker
|
||||||
v-model="_task.due_date"
|
class="datepicker"
|
||||||
:placeholder="__('01/04/2024 11:30 PM')"
|
v-model="_task.due_date"
|
||||||
:formatter="(date) => getFormat(date, '', true, true)"
|
:placeholder="__('01/04/2024 11:30 PM')"
|
||||||
input-class="border-none"
|
:formatter="(date) => getFormat(date, '', true, true)"
|
||||||
/>
|
input-class="border-none"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<Dropdown :options="taskPriorityOptions(updateTaskPriority)">
|
<Dropdown :options="taskPriorityOptions(updateTaskPriority)">
|
||||||
<Button :label="_task.priority" class="justify-between w-full">
|
<Button :label="_task.priority" class="justify-between w-full">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
@ -108,6 +98,15 @@
|
|||||||
<ErrorMessage class="mt-4" v-if="error" :message="__(error)" />
|
<ErrorMessage class="mt-4" v-if="error" :message="__(error)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template #actions>
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<Button
|
||||||
|
:label="editMode ? __('Update') : __('Create')"
|
||||||
|
variant="solid"
|
||||||
|
@click="updateTask"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
<template #target="{ isOpen, togglePopover }">
|
<template #target="{ isOpen, togglePopover }">
|
||||||
<Button
|
<Button
|
||||||
:label="doc[field.fieldname]"
|
:label="doc[field.fieldname]"
|
||||||
class="dropdown-button flex w-full items-center justify-between rounded border border-gray-100 bg-surface-gray-2 px-2 py-1.5 text-base text-ink-gray-8 placeholder-ink-gray-4 transition-colors hover:border-outline-gray-modals hover:bg-surface-gray-3 focus:border-outline-gray-4 focus:bg-surface-white focus:shadow-sm focus:outline-none focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3"
|
class="dropdown-button flex items-center justify-between bg-surface-white !px-2.5 py-1.5 text-base text-ink-gray-8 placeholder-ink-gray-4 transition-colors hover:bg-surface-white focus:bg-surface-white focus:shadow-sm focus:outline-none focus:ring-0"
|
||||||
@click="togglePopover"
|
@click="togglePopover"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -65,55 +65,59 @@
|
|||||||
>
|
>
|
||||||
<div class="flex flex-1 items-center overflow-hidden pl-1 gap-2">
|
<div class="flex flex-1 items-center overflow-hidden pl-1 gap-2">
|
||||||
<FadedScrollableDiv
|
<FadedScrollableDiv
|
||||||
class="flex items-center gap-2 overflow-x-auto -ml-1"
|
class="flex overflow-x-auto -ml-1"
|
||||||
orientation="horizontal"
|
orientation="horizontal"
|
||||||
>
|
>
|
||||||
<Draggable
|
<Draggable
|
||||||
class="flex gap-2"
|
class="flex w-full gap-2 items-center"
|
||||||
:list="newQuickFilters"
|
:list="newQuickFilters"
|
||||||
group="filters"
|
group="filters"
|
||||||
item-key="fieldname"
|
item-key="fieldname"
|
||||||
>
|
>
|
||||||
<template #item="{ element: filter }">
|
<template #item="{ element: filter }">
|
||||||
<Button class="group whitespace-nowrap cursor-grab">
|
<div class="group whitespace-nowrap cursor-grab">
|
||||||
<template #default>
|
<Button class="cursor-grab">
|
||||||
<Tooltip :text="filter.fieldname">
|
<template #default>
|
||||||
<span>{{ filter.label }}</span>
|
<Tooltip :text="filter.fieldname">
|
||||||
</Tooltip>
|
<span>{{ filter.label }}</span>
|
||||||
</template>
|
</Tooltip>
|
||||||
<template #suffix>
|
</template>
|
||||||
<FeatherIcon
|
<template #suffix>
|
||||||
class="h-3.5 cursor-pointer group-hover:flex hidden"
|
<FeatherIcon
|
||||||
name="x"
|
class="h-3.5 cursor-pointer group-hover:flex hidden"
|
||||||
@click.stop="removeQuickFilter(filter)"
|
name="x"
|
||||||
/>
|
@click.stop="removeQuickFilter(filter)"
|
||||||
</template>
|
/>
|
||||||
</Button>
|
</template>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
</FadedScrollableDiv>
|
</FadedScrollableDiv>
|
||||||
<Autocomplete
|
<div>
|
||||||
value=""
|
<Autocomplete
|
||||||
:options="quickFilterOptions"
|
value=""
|
||||||
@change="(e) => addQuickFilter(e)"
|
:options="quickFilterOptions"
|
||||||
>
|
@change="(e) => addQuickFilter(e)"
|
||||||
<template #target="{ togglePopover }">
|
>
|
||||||
<Button
|
<template #target="{ togglePopover }">
|
||||||
class="whitespace-nowrap mr-2"
|
<Button
|
||||||
variant="ghost"
|
class="whitespace-nowrap mr-2"
|
||||||
:label="__('Add filter')"
|
variant="ghost"
|
||||||
iconLeft="plus"
|
:label="__('Add filter')"
|
||||||
@click="togglePopover()"
|
iconLeft="plus"
|
||||||
/>
|
@click="togglePopover()"
|
||||||
</template>
|
/>
|
||||||
<template #item-label="{ option }">
|
</template>
|
||||||
<Tooltip :text="option.value" :hover-delay="1">
|
<template #item-label="{ option }">
|
||||||
<div class="flex-1 truncate text-ink-gray-7">
|
<Tooltip :text="option.value" :hover-delay="1">
|
||||||
{{ option.label }}
|
<div class="flex-1 truncate text-ink-gray-7">
|
||||||
</div>
|
{{ option.label }}
|
||||||
</Tooltip>
|
</div>
|
||||||
</template>
|
</Tooltip>
|
||||||
</Autocomplete>
|
</template>
|
||||||
|
</Autocomplete>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="-ml-2 h-[70%] border-l" />
|
<div class="-ml-2 h-[70%] border-l" />
|
||||||
<div class="flex gap-1">
|
<div class="flex gap-1">
|
||||||
|
|||||||
@ -362,7 +362,7 @@ const breadcrumbs = computed(() => {
|
|||||||
|
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
let t = doctypeMeta['CRM Lead']?.title_field || 'name'
|
let t = doctypeMeta['CRM Lead']?.title_field || 'name'
|
||||||
return doc?.[t] || props.leadId
|
return doc.value?.[t] || props.leadId
|
||||||
})
|
})
|
||||||
|
|
||||||
const statuses = computed(() => {
|
const statuses = computed(() => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user