1
0
forked from test/crm

fix: allow creating lost reason from lost reason modal field

(cherry picked from commit 144470877d943802e3fb3439fdfc6b8c1abb8359)
This commit is contained in:
Shariq Ansari 2025-07-02 15:42:25 +05:30 committed by Mergify
parent e4abb0f9de
commit 5f459f58cb

View File

@ -49,6 +49,7 @@
</template>
<script setup>
import Link from '@/components/Controls/Link.vue'
import { createDocument } from '@/composables/document'
import { Dialog } from 'frappe-ui'
import { ref } from 'vue'
@ -91,9 +92,7 @@ function save() {
props.deal.save.submit()
}
function onCreate() {
// This function can be used to handle the creation of a new lost reason
// For now, we just close the modal after creating a new reason
show.value = false
function onCreate(value, close) {
createDocument('CRM Lost Reason', value, close)
}
</script>