Merge pull request #53 from shariquerik/convert_to_deal
fix: Convert to Deal Modal
This commit is contained in:
commit
8ee5ba423e
@ -257,7 +257,8 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "log_tab",
|
"fieldname": "log_tab",
|
||||||
"fieldtype": "Tab Break",
|
"fieldtype": "Tab Break",
|
||||||
"label": "Log"
|
"label": "Log",
|
||||||
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "status_change_log",
|
"fieldname": "status_change_log",
|
||||||
@ -268,7 +269,7 @@
|
|||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-01-06 14:05:52.669699",
|
"modified": "2024-01-06 17:19:49.009903",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Deal",
|
"name": "CRM Deal",
|
||||||
|
|||||||
@ -713,7 +713,6 @@ import { usersStore } from '@/stores/users'
|
|||||||
import { contactsStore } from '@/stores/contacts'
|
import { contactsStore } from '@/stores/contacts'
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
FeatherIcon,
|
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Dropdown,
|
Dropdown,
|
||||||
TextEditor,
|
TextEditor,
|
||||||
|
|||||||
@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { Button, Dialog } from 'frappe-ui'
|
|
||||||
import mime from 'mime'
|
import mime from 'mime'
|
||||||
import FileTypeIcon from '@/components/Icons/FileTypeIcon.vue'
|
import FileTypeIcon from '@/components/Icons/FileTypeIcon.vue'
|
||||||
import FileImageIcon from '@/components/Icons/FileImageIcon.vue'
|
import FileImageIcon from '@/components/Icons/FileImageIcon.vue'
|
||||||
|
|||||||
@ -142,7 +142,6 @@ import NestedPopover from '@/components/NestedPopover.vue'
|
|||||||
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
||||||
import Draggable from 'vuedraggable'
|
import Draggable from 'vuedraggable'
|
||||||
import { computed, defineModel, ref } from 'vue'
|
import { computed, defineModel, ref } from 'vue'
|
||||||
import { FeatherIcon, FormControl } from 'frappe-ui'
|
|
||||||
import { watchOnce } from '@vueuse/core'
|
import { watchOnce } from '@vueuse/core'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
|
||||||
import { watchDebounced } from '@vueuse/core'
|
import { watchDebounced } from '@vueuse/core'
|
||||||
import { createResource, FeatherIcon } from 'frappe-ui'
|
import { createResource } from 'frappe-ui'
|
||||||
import { useAttrs, computed, ref } from 'vue'
|
import { useAttrs, computed, ref } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -30,7 +30,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Button, ErrorMessage, FeatherIcon, TextInput } from 'frappe-ui'
|
|
||||||
import { ref, defineModel } from 'vue'
|
import { ref, defineModel } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { Dropdown, FeatherIcon } from 'frappe-ui'
|
import { Dropdown } from 'frappe-ui'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
@ -18,8 +18,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { FeatherIcon } from 'frappe-ui'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@ -114,12 +114,7 @@
|
|||||||
import AttachmentIcon from '@/components/Icons/AttachmentIcon.vue'
|
import AttachmentIcon from '@/components/Icons/AttachmentIcon.vue'
|
||||||
import AttachmentItem from '@/components/AttachmentItem.vue'
|
import AttachmentItem from '@/components/AttachmentItem.vue'
|
||||||
import MultiselectInput from '@/components/Controls/MultiselectInput.vue'
|
import MultiselectInput from '@/components/Controls/MultiselectInput.vue'
|
||||||
import {
|
import { TextEditorFixedMenu, TextEditor, FileUploader } from 'frappe-ui'
|
||||||
TextEditorFixedMenu,
|
|
||||||
TextEditor,
|
|
||||||
FileUploader,
|
|
||||||
FeatherIcon,
|
|
||||||
} from 'frappe-ui'
|
|
||||||
import { validateEmail } from '@/utils'
|
import { validateEmail } from '@/utils'
|
||||||
import { EditorContent } from '@tiptap/vue-3'
|
import { EditorContent } from '@tiptap/vue-3'
|
||||||
import { ref, computed, defineModel } from 'vue'
|
import { ref, computed, defineModel } from 'vue'
|
||||||
|
|||||||
@ -106,12 +106,7 @@
|
|||||||
import NestedPopover from '@/components/NestedPopover.vue'
|
import NestedPopover from '@/components/NestedPopover.vue'
|
||||||
import FilterIcon from '@/components/Icons/FilterIcon.vue'
|
import FilterIcon from '@/components/Icons/FilterIcon.vue'
|
||||||
import Link from '@/components/Controls/Link.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import {
|
import { FormControl, Autocomplete, createResource } from 'frappe-ui'
|
||||||
FeatherIcon,
|
|
||||||
Autocomplete,
|
|
||||||
FormControl,
|
|
||||||
createResource,
|
|
||||||
} from 'frappe-ui'
|
|
||||||
import { h, defineModel, computed } from 'vue'
|
import { h, defineModel, computed } from 'vue'
|
||||||
|
|
||||||
const typeCheck = ['Check']
|
const typeCheck = ['Check']
|
||||||
|
|||||||
@ -72,9 +72,6 @@ import {
|
|||||||
ListRow,
|
ListRow,
|
||||||
ListSelectBanner,
|
ListSelectBanner,
|
||||||
ListRowItem,
|
ListRowItem,
|
||||||
FormControl,
|
|
||||||
FeatherIcon,
|
|
||||||
Badge,
|
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -100,8 +100,6 @@ import {
|
|||||||
ListRow,
|
ListRow,
|
||||||
ListRowItem,
|
ListRowItem,
|
||||||
ListSelectBanner,
|
ListSelectBanner,
|
||||||
FormControl,
|
|
||||||
Badge,
|
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -109,8 +109,6 @@ import {
|
|||||||
ListRow,
|
ListRow,
|
||||||
ListSelectBanner,
|
ListSelectBanner,
|
||||||
ListRowItem,
|
ListRowItem,
|
||||||
FormControl,
|
|
||||||
Badge,
|
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -32,7 +32,10 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="['modified', 'creation'].includes(column.key)" class="truncate text-base">
|
<div
|
||||||
|
v-if="['modified', 'creation'].includes(column.key)"
|
||||||
|
class="truncate text-base"
|
||||||
|
>
|
||||||
{{ item.timeAgo }}
|
{{ item.timeAgo }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="column.type === 'Check'">
|
<div v-else-if="column.type === 'Check'">
|
||||||
@ -58,7 +61,6 @@ import {
|
|||||||
ListRow,
|
ListRow,
|
||||||
ListSelectBanner,
|
ListSelectBanner,
|
||||||
ListRowItem,
|
ListRowItem,
|
||||||
FormControl,
|
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
import UserAvatar from '@/components/UserAvatar.vue'
|
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 { Tooltip, call } from 'frappe-ui'
|
||||||
import { defineModel, ref, computed } from 'vue'
|
import { defineModel, ref, computed } from 'vue'
|
||||||
import { watchOnce } from '@vueuse/core'
|
import { watchOnce } from '@vueuse/core'
|
||||||
|
|
||||||
|
|||||||
@ -158,7 +158,7 @@ import EditIcon from '@/components/Icons/EditIcon.vue'
|
|||||||
import Link from '@/components/Controls/Link.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import Dropdown from '@/components/frappe-ui/Dropdown.vue'
|
import Dropdown from '@/components/frappe-ui/Dropdown.vue'
|
||||||
import { contactsStore } from '@/stores/contacts'
|
import { contactsStore } from '@/stores/contacts'
|
||||||
import { FormControl, Dialog, call, FeatherIcon } from 'frappe-ui'
|
import { call } from 'frappe-ui'
|
||||||
import { ref, defineModel, nextTick, watch, computed, h } from 'vue'
|
import { ref, defineModel, nextTick, watch, computed, h } from 'vue'
|
||||||
import { createToast } from '@/utils'
|
import { createToast } from '@/utils'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { TextInput, TextEditor, Dialog, call } from 'frappe-ui'
|
import { TextEditor, call } from 'frappe-ui'
|
||||||
import { ref, defineModel, nextTick, watch } from 'vue'
|
import { ref, defineModel, nextTick, watch } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -131,7 +131,7 @@ import OrganizationsIcon from '@/components/Icons/OrganizationsIcon.vue'
|
|||||||
import TerritoryIcon from '@/components/Icons/TerritoryIcon.vue'
|
import TerritoryIcon from '@/components/Icons/TerritoryIcon.vue'
|
||||||
import Link from '@/components/Controls/Link.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import { organizationsStore } from '@/stores/organizations'
|
import { organizationsStore } from '@/stores/organizations'
|
||||||
import { FormControl, Dialog, call, FeatherIcon } from 'frappe-ui'
|
import { call, FeatherIcon } from 'frappe-ui'
|
||||||
import { ref, defineModel, nextTick, watch, computed, h } from 'vue'
|
import { ref, defineModel, nextTick, watch, computed, h } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
|||||||
@ -90,15 +90,7 @@ import UserAvatar from '@/components/UserAvatar.vue'
|
|||||||
import Link from '@/components/Controls/Link.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import { taskStatusOptions, taskPriorityOptions } from '@/utils'
|
import { taskStatusOptions, taskPriorityOptions } from '@/utils'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import {
|
import { TextEditor, Dropdown, Tooltip, DatePicker, call } from 'frappe-ui'
|
||||||
TextInput,
|
|
||||||
TextEditor,
|
|
||||||
Dialog,
|
|
||||||
Dropdown,
|
|
||||||
Tooltip,
|
|
||||||
DatePicker,
|
|
||||||
call,
|
|
||||||
} from 'frappe-ui'
|
|
||||||
import { ref, defineModel, watch, nextTick } from 'vue'
|
import { ref, defineModel, watch, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Dialog, FormControl, call } from 'frappe-ui'
|
import { call } from 'frappe-ui'
|
||||||
import { ref, watch, defineModel, nextTick } from 'vue'
|
import { ref, watch, defineModel, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -70,7 +70,7 @@ import Link from '@/components/Controls/Link.vue'
|
|||||||
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
import { FormControl, Tooltip } from 'frappe-ui'
|
import { Tooltip } from 'frappe-ui'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
|
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
|
|||||||
@ -70,7 +70,7 @@ import OrganizationModal from '@/components/Modals/OrganizationModal.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 { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
import { FormControl, Tooltip } from 'frappe-ui'
|
import { Tooltip } from 'frappe-ui'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
|
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Dropdown, Badge, Tooltip, FeatherIcon } from 'frappe-ui'
|
import { Dropdown, Tooltip } from 'frappe-ui'
|
||||||
import { timeAgo, dateFormat, formatTime, dateTooltipFormat } from '@/utils'
|
import { timeAgo, dateFormat, formatTime, dateTooltipFormat } from '@/utils'
|
||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
import { computed, defineModel } from 'vue'
|
import { computed, defineModel } from 'vue'
|
||||||
|
|||||||
@ -29,7 +29,6 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { FeatherIcon } from 'frappe-ui'
|
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
label: {
|
label: {
|
||||||
|
|||||||
@ -103,7 +103,7 @@ import ArrowUpRightIcon from '@/components/Icons/ArrowUpRightIcon.vue'
|
|||||||
import Link from '@/components/Controls/Link.vue'
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import UserAvatar from '@/components/UserAvatar.vue'
|
import UserAvatar from '@/components/UserAvatar.vue'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { FormControl, Tooltip } from 'frappe-ui'
|
import { Tooltip } from 'frappe-ui'
|
||||||
import { defineModel } from 'vue'
|
import { defineModel } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -99,13 +99,7 @@ import NestedPopover from '@/components/NestedPopover.vue'
|
|||||||
import SortIcon from '@/components/Icons/SortIcon.vue'
|
import SortIcon from '@/components/Icons/SortIcon.vue'
|
||||||
import DragIcon from '@/components/Icons/DragIcon.vue'
|
import DragIcon from '@/components/Icons/DragIcon.vue'
|
||||||
import { useSortable } from '@vueuse/integrations/useSortable'
|
import { useSortable } from '@vueuse/integrations/useSortable'
|
||||||
import {
|
import { Autocomplete, createResource } from 'frappe-ui'
|
||||||
FeatherIcon,
|
|
||||||
Button,
|
|
||||||
Autocomplete,
|
|
||||||
FormControl,
|
|
||||||
createResource,
|
|
||||||
} from 'frappe-ui'
|
|
||||||
import { computed, ref, nextTick } from 'vue'
|
import { computed, ref, nextTick } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
import CRMLogo from '@/components/Icons/CRMLogo.vue'
|
import CRMLogo from '@/components/Icons/CRMLogo.vue'
|
||||||
import { sessionStore } from '@/stores/session'
|
import { sessionStore } from '@/stores/session'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { Dropdown, FeatherIcon } from 'frappe-ui'
|
import { Dropdown } from 'frappe-ui'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -77,7 +77,7 @@ import ColumnSettings from '@/components/ColumnSettings.vue'
|
|||||||
import { globalStore } from '@/stores/global'
|
import { globalStore } from '@/stores/global'
|
||||||
import { viewsStore } from '@/stores/views'
|
import { viewsStore } from '@/stores/views'
|
||||||
import { useDebounceFn } from '@vueuse/core'
|
import { useDebounceFn } from '@vueuse/core'
|
||||||
import { createResource, FeatherIcon, Dropdown, call } from 'frappe-ui'
|
import { createResource, Dropdown, call } from 'frappe-ui'
|
||||||
import { computed, ref, defineModel, onMounted, watch, h } from 'vue'
|
import { computed, ref, defineModel, onMounted, watch, h } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import {
|
|||||||
Badge,
|
Badge,
|
||||||
setConfig,
|
setConfig,
|
||||||
frappeRequest,
|
frappeRequest,
|
||||||
|
FeatherIcon,
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
import { createDialog } from './utils/dialogs'
|
import { createDialog } from './utils/dialogs'
|
||||||
import socket from './socket'
|
import socket from './socket'
|
||||||
@ -32,6 +33,7 @@ let globalComponents = {
|
|||||||
Dialog,
|
Dialog,
|
||||||
Alert,
|
Alert,
|
||||||
Badge,
|
Badge,
|
||||||
|
FeatherIcon,
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a pinia instance
|
// create a pinia instance
|
||||||
|
|||||||
@ -143,14 +143,17 @@
|
|||||||
import LayoutHeader from '@/components/LayoutHeader.vue'
|
import LayoutHeader from '@/components/LayoutHeader.vue'
|
||||||
import DurationIcon from '@/components/Icons/DurationIcon.vue'
|
import DurationIcon from '@/components/Icons/DurationIcon.vue'
|
||||||
import NoteModal from '@/components/Modals/NoteModal.vue'
|
import NoteModal from '@/components/Modals/NoteModal.vue'
|
||||||
import { dateFormat, timeAgo, dateTooltipFormat, secondsToDuration } from '@/utils'
|
import {
|
||||||
|
dateFormat,
|
||||||
|
timeAgo,
|
||||||
|
dateTooltipFormat,
|
||||||
|
secondsToDuration,
|
||||||
|
} from '@/utils'
|
||||||
import {
|
import {
|
||||||
TextEditor,
|
TextEditor,
|
||||||
Avatar,
|
Avatar,
|
||||||
FeatherIcon,
|
|
||||||
call,
|
call,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Badge,
|
|
||||||
createResource,
|
createResource,
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
|
|||||||
@ -198,16 +198,13 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
FeatherIcon,
|
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
Avatar,
|
Avatar,
|
||||||
FileUploader,
|
FileUploader,
|
||||||
ErrorMessage,
|
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Tabs,
|
Tabs,
|
||||||
call,
|
call,
|
||||||
createResource,
|
createResource,
|
||||||
createListResource,
|
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
import Dropdown from '@/components/frappe-ui/Dropdown.vue'
|
import Dropdown from '@/components/frappe-ui/Dropdown.vue'
|
||||||
import LayoutHeader from '@/components/LayoutHeader.vue'
|
import LayoutHeader from '@/components/LayoutHeader.vue'
|
||||||
|
|||||||
@ -38,7 +38,7 @@ import LayoutHeader from '@/components/LayoutHeader.vue'
|
|||||||
import ContactModal from '@/components/Modals/ContactModal.vue'
|
import ContactModal from '@/components/Modals/ContactModal.vue'
|
||||||
import ContactsListView from '@/components/ListViews/ContactsListView.vue'
|
import ContactsListView from '@/components/ListViews/ContactsListView.vue'
|
||||||
import ViewControls from '@/components/ViewControls.vue'
|
import ViewControls from '@/components/ViewControls.vue'
|
||||||
import { FeatherIcon, Breadcrumbs } from 'frappe-ui'
|
import { Breadcrumbs } from 'frappe-ui'
|
||||||
import { organizationsStore } from '@/stores/organizations.js'
|
import { organizationsStore } from '@/stores/organizations.js'
|
||||||
import { dateFormat, dateTooltipFormat, timeAgo } from '@/utils'
|
import { dateFormat, dateTooltipFormat, timeAgo } from '@/utils'
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
|
|||||||
@ -300,14 +300,12 @@ import { organizationsStore } from '@/stores/organizations'
|
|||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
import {
|
import {
|
||||||
createResource,
|
createResource,
|
||||||
FeatherIcon,
|
|
||||||
Dropdown,
|
Dropdown,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Avatar,
|
Avatar,
|
||||||
Tabs,
|
Tabs,
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
call,
|
call,
|
||||||
Badge,
|
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
import { ref, computed, h } from 'vue'
|
import { ref, computed, h } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|||||||
@ -61,13 +61,7 @@ import {
|
|||||||
formatNumberIntoCurrency,
|
formatNumberIntoCurrency,
|
||||||
formatTime,
|
formatTime,
|
||||||
} from '@/utils'
|
} from '@/utils'
|
||||||
import {
|
import { createResource, Breadcrumbs } from 'frappe-ui'
|
||||||
FeatherIcon,
|
|
||||||
Dialog,
|
|
||||||
Button,
|
|
||||||
createResource,
|
|
||||||
Breadcrumbs,
|
|
||||||
} from 'frappe-ui'
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { ref, computed, reactive } from 'vue'
|
import { ref, computed, reactive } from 'vue'
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,11 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<Button label="Convert to Deal" variant="solid" @click="convertToDeal" />
|
<Button
|
||||||
|
label="Convert to Deal"
|
||||||
|
variant="solid"
|
||||||
|
@click="showConvertToDealModal = true"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</LayoutHeader>
|
</LayoutHeader>
|
||||||
<div v-if="lead?.data" class="flex h-full overflow-hidden">
|
<div v-if="lead?.data" class="flex h-full overflow-hidden">
|
||||||
@ -158,23 +162,74 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<OrganizationModal
|
|
||||||
v-model="showOrganizationModal"
|
|
||||||
:organization="_organization"
|
|
||||||
:options="{
|
|
||||||
redirect: false,
|
|
||||||
afterInsert: (doc) =>
|
|
||||||
updateField('organization', doc.name, () => {
|
|
||||||
organizations.reload()
|
|
||||||
}),
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
<AssignmentModal
|
<AssignmentModal
|
||||||
v-if="lead.data"
|
v-if="lead.data"
|
||||||
:doc="lead.data"
|
:doc="lead.data"
|
||||||
v-model="showAssignmentModal"
|
v-model="showAssignmentModal"
|
||||||
v-model:assignees="lead.data._assignedTo"
|
v-model:assignees="lead.data._assignedTo"
|
||||||
/>
|
/>
|
||||||
|
<Dialog
|
||||||
|
v-model="showConvertToDealModal"
|
||||||
|
:options="{
|
||||||
|
title: 'Convert to Deal',
|
||||||
|
size: 'xl',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
label: 'Convert',
|
||||||
|
variant: 'solid',
|
||||||
|
onClick: convertToDeal,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #body-content>
|
||||||
|
<div class="mb-4 flex items-center gap-2 text-gray-600">
|
||||||
|
<OrganizationsIcon class="h-4 w-4" />
|
||||||
|
<label class="block text-base"> Organization </label>
|
||||||
|
</div>
|
||||||
|
<div class="ml-6">
|
||||||
|
<div class="flex items-center justify-between text-base">
|
||||||
|
<div>Choose Existing</div>
|
||||||
|
<Switch v-model="existingOrganizationChecked" />
|
||||||
|
</div>
|
||||||
|
<Link
|
||||||
|
v-if="existingOrganizationChecked"
|
||||||
|
class="form-control mt-2.5"
|
||||||
|
variant="outline"
|
||||||
|
size="md"
|
||||||
|
:value="existingOrganization"
|
||||||
|
doctype="CRM Organization"
|
||||||
|
@change="(data) => (existingOrganization = data)"
|
||||||
|
/>
|
||||||
|
<div v-else class="mt-2.5 text-base">
|
||||||
|
New organization will be created based on the data in details section
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4 mt-6 flex items-center gap-2 text-gray-600">
|
||||||
|
<ContactsIcon class="h-4 w-4" />
|
||||||
|
<label class="block text-base"> Contact </label>
|
||||||
|
</div>
|
||||||
|
<div class="ml-6">
|
||||||
|
<div class="flex items-center justify-between text-base">
|
||||||
|
<div>Choose Existing</div>
|
||||||
|
<Switch v-model="existingContactChecked" />
|
||||||
|
</div>
|
||||||
|
<Link
|
||||||
|
v-if="existingContactChecked"
|
||||||
|
class="form-control mt-2.5"
|
||||||
|
variant="outline"
|
||||||
|
size="md"
|
||||||
|
:value="existingContact"
|
||||||
|
doctype="Contact"
|
||||||
|
@change="(data) => (existingContact = data)"
|
||||||
|
/>
|
||||||
|
<div v-else class="mt-2.5 text-base">
|
||||||
|
New contact will be created based on the person's details
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import ActivityIcon from '@/components/Icons/ActivityIcon.vue'
|
import ActivityIcon from '@/components/Icons/ActivityIcon.vue'
|
||||||
@ -185,11 +240,13 @@ import NoteIcon from '@/components/Icons/NoteIcon.vue'
|
|||||||
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
|
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
|
||||||
import CameraIcon from '@/components/Icons/CameraIcon.vue'
|
import CameraIcon from '@/components/Icons/CameraIcon.vue'
|
||||||
import LinkIcon from '@/components/Icons/LinkIcon.vue'
|
import LinkIcon from '@/components/Icons/LinkIcon.vue'
|
||||||
|
import OrganizationsIcon from '@/components/Icons/OrganizationsIcon.vue'
|
||||||
|
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
|
||||||
import LayoutHeader from '@/components/LayoutHeader.vue'
|
import LayoutHeader from '@/components/LayoutHeader.vue'
|
||||||
import Activities from '@/components/Activities.vue'
|
import Activities from '@/components/Activities.vue'
|
||||||
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
|
||||||
import AssignmentModal from '@/components/Modals/AssignmentModal.vue'
|
import AssignmentModal from '@/components/Modals/AssignmentModal.vue'
|
||||||
import MultipleAvatar from '@/components/MultipleAvatar.vue'
|
import MultipleAvatar from '@/components/MultipleAvatar.vue'
|
||||||
|
import Link from '@/components/Controls/Link.vue'
|
||||||
import Section from '@/components/Section.vue'
|
import Section from '@/components/Section.vue'
|
||||||
import SectionFields from '@/components/SectionFields.vue'
|
import SectionFields from '@/components/SectionFields.vue'
|
||||||
import SLASection from '@/components/SLASection.vue'
|
import SLASection from '@/components/SLASection.vue'
|
||||||
@ -207,12 +264,11 @@ import { statusesStore } from '@/stores/statuses'
|
|||||||
import {
|
import {
|
||||||
createResource,
|
createResource,
|
||||||
FileUploader,
|
FileUploader,
|
||||||
ErrorMessage,
|
|
||||||
FeatherIcon,
|
|
||||||
Dropdown,
|
Dropdown,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Avatar,
|
Avatar,
|
||||||
Tabs,
|
Tabs,
|
||||||
|
Switch,
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
call,
|
call,
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
@ -220,8 +276,8 @@ import { ref, computed } from 'vue'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
const { $dialog } = globalStore()
|
const { $dialog } = globalStore()
|
||||||
const { contacts } = contactsStore()
|
const { getContactByName, contacts } = contactsStore()
|
||||||
const { organizations, getOrganization } = organizationsStore()
|
const { organizations } = organizationsStore()
|
||||||
const { statusOptions, getLeadStatus } = statusesStore()
|
const { statusOptions, getLeadStatus } = statusesStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
@ -251,18 +307,12 @@ const lead = createResource({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const reload = ref(false)
|
const reload = ref(false)
|
||||||
const showOrganizationModal = ref(false)
|
|
||||||
const showAssignmentModal = ref(false)
|
const showAssignmentModal = ref(false)
|
||||||
const _organization = ref({})
|
|
||||||
|
|
||||||
const organization = computed(() => {
|
|
||||||
return lead.data?.organization && getOrganization(lead.data.organization)
|
|
||||||
})
|
|
||||||
|
|
||||||
function updateLead(fieldname, value, callback) {
|
function updateLead(fieldname, value, callback) {
|
||||||
value = Array.isArray(fieldname) ? '' : value
|
value = Array.isArray(fieldname) ? '' : value
|
||||||
|
|
||||||
if (validateRequired(fieldname, value)) return
|
if (!Array.isArray(fieldname) && validateRequired(fieldname, value)) return
|
||||||
|
|
||||||
createResource({
|
createResource({
|
||||||
url: 'frappe.client.set_value',
|
url: 'frappe.client.set_value',
|
||||||
@ -354,16 +404,6 @@ const detailSections = computed(() => {
|
|||||||
return data.doctype_fields
|
return data.doctype_fields
|
||||||
})
|
})
|
||||||
|
|
||||||
async function convertToDeal() {
|
|
||||||
let deal = await call('crm.fcrm.doctype.crm_lead.crm_lead.convert_to_deal', {
|
|
||||||
lead: lead.data.name,
|
|
||||||
})
|
|
||||||
if (deal) {
|
|
||||||
await contacts.reload()
|
|
||||||
router.push({ name: 'Deal', params: { dealId: deal } })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateField(name, value, callback) {
|
function updateField(name, value, callback) {
|
||||||
updateLead(name, value, () => {
|
updateLead(name, value, () => {
|
||||||
lead.data[name] = value
|
lead.data[name] = value
|
||||||
@ -378,4 +418,82 @@ async function deleteLead(name) {
|
|||||||
})
|
})
|
||||||
router.push({ name: 'Leads' })
|
router.push({ name: 'Leads' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert to Deal
|
||||||
|
const showConvertToDealModal = ref(false)
|
||||||
|
const existingContactChecked = ref(false)
|
||||||
|
const existingOrganizationChecked = ref(false)
|
||||||
|
|
||||||
|
const existingContact = ref('')
|
||||||
|
const existingOrganization = ref('')
|
||||||
|
|
||||||
|
async function convertToDeal(updated) {
|
||||||
|
let valueUpdated = false
|
||||||
|
|
||||||
|
if (existingContactChecked.value && !existingContact.value) {
|
||||||
|
createToast({
|
||||||
|
title: 'Error',
|
||||||
|
text: 'Please select an existing contact',
|
||||||
|
icon: 'x',
|
||||||
|
iconClasses: 'text-red-600',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (existingOrganizationChecked.value && !existingOrganization.value) {
|
||||||
|
createToast({
|
||||||
|
title: 'Error',
|
||||||
|
text: 'Please select an existing organization',
|
||||||
|
icon: 'x',
|
||||||
|
iconClasses: 'text-red-600',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (existingContactChecked.value && existingContact.value) {
|
||||||
|
lead.data.salutation = getContactByName(existingContact.value).salutation
|
||||||
|
lead.data.first_name = getContactByName(existingContact.value).first_name
|
||||||
|
lead.data.last_name = getContactByName(existingContact.value).last_name
|
||||||
|
lead.data.email_id = getContactByName(existingContact.value).email_id
|
||||||
|
lead.data.mobile_no = getContactByName(existingContact.value).mobile_no
|
||||||
|
existingContactChecked.value = false
|
||||||
|
valueUpdated = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (existingOrganizationChecked.value && existingOrganization.value) {
|
||||||
|
lead.data.organization = existingOrganization.value
|
||||||
|
existingOrganizationChecked.value = false
|
||||||
|
valueUpdated = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (valueUpdated) {
|
||||||
|
updateLead(
|
||||||
|
{
|
||||||
|
salutation: lead.data.salutation,
|
||||||
|
first_name: lead.data.first_name,
|
||||||
|
last_name: lead.data.last_name,
|
||||||
|
email_id: lead.data.email_id,
|
||||||
|
mobile_no: lead.data.mobile_no,
|
||||||
|
organization: lead.data.organization,
|
||||||
|
},
|
||||||
|
'',
|
||||||
|
() => convertToDeal(true)
|
||||||
|
)
|
||||||
|
showConvertToDealModal.value = false
|
||||||
|
} else {
|
||||||
|
let deal = await call(
|
||||||
|
'crm.fcrm.doctype.crm_lead.crm_lead.convert_to_deal',
|
||||||
|
{
|
||||||
|
lead: lead.data.name,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (deal) {
|
||||||
|
if (updated) {
|
||||||
|
await organizations.reload()
|
||||||
|
await contacts.reload()
|
||||||
|
}
|
||||||
|
router.push({ name: 'Deal', params: { dealId: deal } })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -59,13 +59,7 @@ import { usersStore } from '@/stores/users'
|
|||||||
import { organizationsStore } from '@/stores/organizations'
|
import { organizationsStore } from '@/stores/organizations'
|
||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
import { dateFormat, dateTooltipFormat, timeAgo, formatTime } from '@/utils'
|
import { dateFormat, dateTooltipFormat, timeAgo, formatTime } from '@/utils'
|
||||||
import {
|
import { createResource, Breadcrumbs } from 'frappe-ui'
|
||||||
FeatherIcon,
|
|
||||||
Dialog,
|
|
||||||
Button,
|
|
||||||
createResource,
|
|
||||||
Breadcrumbs,
|
|
||||||
} from 'frappe-ui'
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { ref, computed, reactive } from 'vue'
|
import { ref, computed, reactive } from 'vue'
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import CRMLogo from '@/components/Icons/CRMLogo.vue';
|
import CRMLogo from '@/components/Icons/CRMLogo.vue';
|
||||||
import { sessionStore } from '@/stores/session'
|
import { sessionStore } from '@/stores/session'
|
||||||
import { FormControl, ErrorMessage, createResource } from 'frappe-ui'
|
import { createResource } from 'frappe-ui'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const session = sessionStore()
|
const session = sessionStore()
|
||||||
|
|||||||
@ -86,8 +86,6 @@ import NoteIcon from '@/components/Icons/NoteIcon.vue'
|
|||||||
import NoteModal from '@/components/Modals/NoteModal.vue'
|
import NoteModal from '@/components/Modals/NoteModal.vue'
|
||||||
import { timeAgo, dateFormat, dateTooltipFormat } from '@/utils'
|
import { timeAgo, dateFormat, dateTooltipFormat } from '@/utils'
|
||||||
import {
|
import {
|
||||||
FeatherIcon,
|
|
||||||
Button,
|
|
||||||
createListResource,
|
createListResource,
|
||||||
TextEditor,
|
TextEditor,
|
||||||
call,
|
call,
|
||||||
|
|||||||
@ -234,13 +234,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
FeatherIcon,
|
|
||||||
Avatar,
|
Avatar,
|
||||||
FileUploader,
|
FileUploader,
|
||||||
ErrorMessage,
|
|
||||||
Dropdown,
|
Dropdown,
|
||||||
Tabs,
|
Tabs,
|
||||||
Badge,
|
|
||||||
call,
|
call,
|
||||||
createListResource,
|
createListResource,
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
|
|||||||
@ -41,7 +41,7 @@ import LayoutHeader from '@/components/LayoutHeader.vue'
|
|||||||
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
||||||
import OrganizationsListView from '@/components/ListViews/OrganizationsListView.vue'
|
import OrganizationsListView from '@/components/ListViews/OrganizationsListView.vue'
|
||||||
import ViewControls from '@/components/ViewControls.vue'
|
import ViewControls from '@/components/ViewControls.vue'
|
||||||
import { FeatherIcon, Breadcrumbs } from 'frappe-ui'
|
import { Breadcrumbs } from 'frappe-ui'
|
||||||
import {
|
import {
|
||||||
dateFormat,
|
dateFormat,
|
||||||
dateTooltipFormat,
|
dateTooltipFormat,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user