fix: do not allow to remove lead_owner/deal_owner from assigned_to
This commit is contained in:
parent
fc0b19ff0a
commit
8dd063435d
@ -53,6 +53,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<FeatherIcon
|
<FeatherIcon
|
||||||
|
v-if="assignee.name !== owner"
|
||||||
class="h-3.5"
|
class="h-3.5"
|
||||||
name="x"
|
name="x"
|
||||||
@click.stop="removeValue(assignee.name)"
|
@click.stop="removeValue(assignee.name)"
|
||||||
@ -71,7 +72,7 @@ import UserAvatar from '@/components/UserAvatar.vue'
|
|||||||
import Link from '@/components/Controls/Link.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { Dialog, Tooltip, FeatherIcon, call, ErrorMessage } from 'frappe-ui'
|
import { Dialog, Tooltip, FeatherIcon, call, ErrorMessage } from 'frappe-ui'
|
||||||
import { defineModel, ref } from 'vue'
|
import { defineModel, ref, computed } from 'vue'
|
||||||
import { watchOnce } from '@vueuse/core'
|
import { watchOnce } from '@vueuse/core'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -95,6 +96,12 @@ const removeValue = (value) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const owner = computed(() => {
|
||||||
|
if (!props.doc) return ''
|
||||||
|
if (props.doc.doctype == 'CRM Lead') return props.doc.lead_owner
|
||||||
|
return props.doc.deal_owner
|
||||||
|
})
|
||||||
|
|
||||||
const addValue = (value) => {
|
const addValue = (value) => {
|
||||||
error.value = ''
|
error.value = ''
|
||||||
let obj = {
|
let obj = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user