feat: show formatted currency fields in all list views
This commit is contained in:
parent
fb2303edf1
commit
9b8662de14
@ -211,13 +211,9 @@ import DealsIcon from '@/components/Icons/DealsIcon.vue'
|
|||||||
import DealsListView from '@/components/ListViews/DealsListView.vue'
|
import DealsListView from '@/components/ListViews/DealsListView.vue'
|
||||||
import SidePanelModal from '@/components/Modals/SidePanelModal.vue'
|
import SidePanelModal from '@/components/Modals/SidePanelModal.vue'
|
||||||
import AddressModal from '@/components/Modals/AddressModal.vue'
|
import AddressModal from '@/components/Modals/AddressModal.vue'
|
||||||
import {
|
import { formatDate, timeAgo, createToast } from '@/utils'
|
||||||
formatDate,
|
|
||||||
timeAgo,
|
|
||||||
formatNumberIntoCurrency,
|
|
||||||
createToast,
|
|
||||||
} from '@/utils'
|
|
||||||
import { getView } from '@/utils/view'
|
import { getView } from '@/utils/view'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { globalStore } from '@/stores/global.js'
|
import { globalStore } from '@/stores/global.js'
|
||||||
import { usersStore } from '@/stores/users.js'
|
import { usersStore } from '@/stores/users.js'
|
||||||
import { organizationsStore } from '@/stores/organizations.js'
|
import { organizationsStore } from '@/stores/organizations.js'
|
||||||
@ -601,6 +597,8 @@ async function updateField(fieldname, value) {
|
|||||||
contact.reload()
|
contact.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Deal')
|
||||||
|
|
||||||
const columns = computed(() => dealColumns)
|
const columns = computed(() => dealColumns)
|
||||||
|
|
||||||
function getDealRowObject(deal) {
|
function getDealRowObject(deal) {
|
||||||
@ -610,10 +608,7 @@ function getDealRowObject(deal) {
|
|||||||
label: deal.organization,
|
label: deal.organization,
|
||||||
logo: getOrganization(deal.organization)?.organization_logo,
|
logo: getOrganization(deal.organization)?.organization_logo,
|
||||||
},
|
},
|
||||||
annual_revenue: formatNumberIntoCurrency(
|
annual_revenue: getFormattedCurrency('annual_revenue', deal),
|
||||||
deal.annual_revenue,
|
|
||||||
deal.currency,
|
|
||||||
),
|
|
||||||
status: {
|
status: {
|
||||||
label: deal.status,
|
label: deal.status,
|
||||||
color: getDealStatus(deal.status)?.iconColorClass,
|
color: getDealStatus(deal.status)?.iconColorClass,
|
||||||
|
|||||||
@ -70,10 +70,12 @@ 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 { getMeta } from '@/stores/meta'
|
||||||
import { organizationsStore } from '@/stores/organizations.js'
|
import { organizationsStore } from '@/stores/organizations.js'
|
||||||
import { formatDate, timeAgo } from '@/utils'
|
import { formatDate, timeAgo } from '@/utils'
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('Contact')
|
||||||
const { getOrganization } = organizationsStore()
|
const { getOrganization } = organizationsStore()
|
||||||
|
|
||||||
const showContactModal = ref(false)
|
const showContactModal = ref(false)
|
||||||
@ -110,6 +112,10 @@ const rows = computed(() => {
|
|||||||
_rows[row] = formatDate(contact[row], '', true, fieldType == 'Datetime')
|
_rows[row] = formatDate(contact[row], '', true, fieldType == 'Datetime')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fieldType && fieldType == 'Currency') {
|
||||||
|
_rows[row] = getFormattedCurrency(row, contact)
|
||||||
|
}
|
||||||
|
|
||||||
if (row == 'full_name') {
|
if (row == 'full_name') {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: contact.full_name,
|
label: contact.full_name,
|
||||||
|
|||||||
@ -281,22 +281,18 @@ import NoteModal from '@/components/Modals/NoteModal.vue'
|
|||||||
import TaskModal from '@/components/Modals/TaskModal.vue'
|
import TaskModal from '@/components/Modals/TaskModal.vue'
|
||||||
import QuickEntryModal from '@/components/Modals/QuickEntryModal.vue'
|
import QuickEntryModal from '@/components/Modals/QuickEntryModal.vue'
|
||||||
import ViewControls from '@/components/ViewControls.vue'
|
import ViewControls from '@/components/ViewControls.vue'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { globalStore } from '@/stores/global'
|
import { globalStore } from '@/stores/global'
|
||||||
import { usersStore } from '@/stores/users'
|
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 { callEnabled } from '@/composables/settings'
|
import { callEnabled } from '@/composables/settings'
|
||||||
import {
|
import { formatDate, timeAgo, website, formatTime } from '@/utils'
|
||||||
formatDate,
|
|
||||||
timeAgo,
|
|
||||||
website,
|
|
||||||
formatNumberIntoCurrency,
|
|
||||||
formatTime,
|
|
||||||
} from '@/utils'
|
|
||||||
import { Tooltip, Avatar, Dropdown } from 'frappe-ui'
|
import { Tooltip, Avatar, Dropdown } from 'frappe-ui'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { ref, reactive, computed, h } from 'vue'
|
import { ref, reactive, computed, h } from 'vue'
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Deal')
|
||||||
const { makeCall } = globalStore()
|
const { makeCall } = globalStore()
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
const { getOrganization } = organizationsStore()
|
const { getOrganization } = organizationsStore()
|
||||||
@ -402,6 +398,10 @@ function parseRows(rows, columns = []) {
|
|||||||
_rows[row] = formatDate(deal[row], '', true, fieldType == 'Datetime')
|
_rows[row] = formatDate(deal[row], '', true, fieldType == 'Datetime')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fieldType && fieldType == 'Currency') {
|
||||||
|
_rows[row] = getFormattedCurrency(row, deal)
|
||||||
|
}
|
||||||
|
|
||||||
if (row == 'organization') {
|
if (row == 'organization') {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: deal.organization,
|
label: deal.organization,
|
||||||
@ -409,11 +409,6 @@ function parseRows(rows, columns = []) {
|
|||||||
}
|
}
|
||||||
} else if (row === 'website') {
|
} else if (row === 'website') {
|
||||||
_rows[row] = website(deal.website)
|
_rows[row] = website(deal.website)
|
||||||
} else if (row == 'annual_revenue') {
|
|
||||||
_rows[row] = formatNumberIntoCurrency(
|
|
||||||
deal.annual_revenue,
|
|
||||||
deal.currency,
|
|
||||||
)
|
|
||||||
} else if (row == 'status') {
|
} else if (row == 'status') {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: deal.status,
|
label: deal.status,
|
||||||
|
|||||||
@ -75,9 +75,12 @@ import LayoutHeader from '@/components/LayoutHeader.vue'
|
|||||||
import ViewControls from '@/components/ViewControls.vue'
|
import ViewControls from '@/components/ViewControls.vue'
|
||||||
import EmailTemplatesListView from '@/components/ListViews/EmailTemplatesListView.vue'
|
import EmailTemplatesListView from '@/components/ListViews/EmailTemplatesListView.vue'
|
||||||
import EmailTemplateModal from '@/components/Modals/EmailTemplateModal.vue'
|
import EmailTemplateModal from '@/components/Modals/EmailTemplateModal.vue'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { formatDate, timeAgo } from '@/utils'
|
import { formatDate, timeAgo } from '@/utils'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('Email Template')
|
||||||
|
|
||||||
const emailTemplatesListView = ref(null)
|
const emailTemplatesListView = ref(null)
|
||||||
|
|
||||||
// emailTemplates data is loaded in the ViewControls component
|
// emailTemplates data is loaded in the ViewControls component
|
||||||
@ -115,6 +118,10 @@ const rows = computed(() => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fieldType && fieldType == 'Currency') {
|
||||||
|
_rows[row] = getFormattedCurrency(row, emailTemplate)
|
||||||
|
}
|
||||||
|
|
||||||
if (['modified', 'creation'].includes(row)) {
|
if (['modified', 'creation'].includes(row)) {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: formatDate(emailTemplate[row]),
|
label: formatDate(emailTemplate[row]),
|
||||||
|
|||||||
@ -303,6 +303,7 @@ import NoteModal from '@/components/Modals/NoteModal.vue'
|
|||||||
import TaskModal from '@/components/Modals/TaskModal.vue'
|
import TaskModal from '@/components/Modals/TaskModal.vue'
|
||||||
import QuickEntryModal from '@/components/Modals/QuickEntryModal.vue'
|
import QuickEntryModal from '@/components/Modals/QuickEntryModal.vue'
|
||||||
import ViewControls from '@/components/ViewControls.vue'
|
import ViewControls from '@/components/ViewControls.vue'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { globalStore } from '@/stores/global'
|
import { globalStore } from '@/stores/global'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
@ -312,6 +313,7 @@ import { Avatar, Tooltip, Dropdown } from 'frappe-ui'
|
|||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { ref, computed, reactive, h } from 'vue'
|
import { ref, computed, reactive, h } from 'vue'
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Lead')
|
||||||
const { makeCall } = globalStore()
|
const { makeCall } = globalStore()
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
const { getLeadStatus } = statusesStore()
|
const { getLeadStatus } = statusesStore()
|
||||||
@ -416,6 +418,10 @@ function parseRows(rows, columns = []) {
|
|||||||
_rows[row] = formatDate(lead[row], '', true, fieldType == 'Datetime')
|
_rows[row] = formatDate(lead[row], '', true, fieldType == 'Datetime')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fieldType && fieldType == 'Currency') {
|
||||||
|
_rows[row] = getFormattedCurrency(row, lead)
|
||||||
|
}
|
||||||
|
|
||||||
if (row == 'lead_name') {
|
if (row == 'lead_name') {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: lead.lead_name,
|
label: lead.lead_name,
|
||||||
|
|||||||
@ -186,13 +186,9 @@ import CameraIcon from '@/components/Icons/CameraIcon.vue'
|
|||||||
import DealsIcon from '@/components/Icons/DealsIcon.vue'
|
import DealsIcon from '@/components/Icons/DealsIcon.vue'
|
||||||
import DealsListView from '@/components/ListViews/DealsListView.vue'
|
import DealsListView from '@/components/ListViews/DealsListView.vue'
|
||||||
import AddressModal from '@/components/Modals/AddressModal.vue'
|
import AddressModal from '@/components/Modals/AddressModal.vue'
|
||||||
import {
|
import { formatDate, timeAgo, createToast } from '@/utils'
|
||||||
formatDate,
|
|
||||||
timeAgo,
|
|
||||||
formatNumberIntoCurrency,
|
|
||||||
createToast,
|
|
||||||
} from '@/utils'
|
|
||||||
import { getView } from '@/utils/view'
|
import { getView } from '@/utils/view'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { globalStore } from '@/stores/global.js'
|
import { globalStore } from '@/stores/global.js'
|
||||||
import { usersStore } from '@/stores/users.js'
|
import { usersStore } from '@/stores/users.js'
|
||||||
import { organizationsStore } from '@/stores/organizations.js'
|
import { organizationsStore } from '@/stores/organizations.js'
|
||||||
@ -581,6 +577,8 @@ async function updateField(fieldname, value) {
|
|||||||
contact.reload()
|
contact.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Deal')
|
||||||
|
|
||||||
const columns = computed(() => dealColumns)
|
const columns = computed(() => dealColumns)
|
||||||
|
|
||||||
function getDealRowObject(deal) {
|
function getDealRowObject(deal) {
|
||||||
@ -590,10 +588,7 @@ function getDealRowObject(deal) {
|
|||||||
label: deal.organization,
|
label: deal.organization,
|
||||||
logo: getOrganization(deal.organization)?.organization_logo,
|
logo: getOrganization(deal.organization)?.organization_logo,
|
||||||
},
|
},
|
||||||
annual_revenue: formatNumberIntoCurrency(
|
annual_revenue: getFormattedCurrency('annual_revenue', deal),
|
||||||
deal.annual_revenue,
|
|
||||||
deal.currency,
|
|
||||||
),
|
|
||||||
status: {
|
status: {
|
||||||
label: deal.status,
|
label: deal.status,
|
||||||
color: getDealStatus(deal.status)?.iconColorClass,
|
color: getDealStatus(deal.status)?.iconColorClass,
|
||||||
|
|||||||
@ -176,16 +176,12 @@ import DetailsIcon from '@/components/Icons/DetailsIcon.vue'
|
|||||||
import CameraIcon from '@/components/Icons/CameraIcon.vue'
|
import CameraIcon from '@/components/Icons/CameraIcon.vue'
|
||||||
import DealsIcon from '@/components/Icons/DealsIcon.vue'
|
import DealsIcon from '@/components/Icons/DealsIcon.vue'
|
||||||
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
|
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { globalStore } from '@/stores/global'
|
import { globalStore } from '@/stores/global'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
import { getView } from '@/utils/view'
|
import { getView } from '@/utils/view'
|
||||||
import {
|
import { formatDate, timeAgo, createToast } from '@/utils'
|
||||||
formatDate,
|
|
||||||
timeAgo,
|
|
||||||
formatNumberIntoCurrency,
|
|
||||||
createToast,
|
|
||||||
} from '@/utils'
|
|
||||||
import {
|
import {
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
Avatar,
|
Avatar,
|
||||||
@ -441,6 +437,8 @@ const rows = computed(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Deal')
|
||||||
|
|
||||||
const columns = computed(() => {
|
const columns = computed(() => {
|
||||||
return tabIndex.value === 0 ? dealColumns : contactColumns
|
return tabIndex.value === 0 ? dealColumns : contactColumns
|
||||||
})
|
})
|
||||||
@ -450,12 +448,9 @@ function getDealRowObject(deal) {
|
|||||||
name: deal.name,
|
name: deal.name,
|
||||||
organization: {
|
organization: {
|
||||||
label: deal.organization,
|
label: deal.organization,
|
||||||
logo: props.organization?.organization_logo,
|
logo: organization.doc?.organization_logo,
|
||||||
},
|
},
|
||||||
annual_revenue: formatNumberIntoCurrency(
|
annual_revenue: getFormattedCurrency('annual_revenue', deal),
|
||||||
deal.annual_revenue,
|
|
||||||
deal.currency,
|
|
||||||
),
|
|
||||||
status: {
|
status: {
|
||||||
label: deal.status,
|
label: deal.status,
|
||||||
color: getDealStatus(deal.status)?.iconColorClass,
|
color: getDealStatus(deal.status)?.iconColorClass,
|
||||||
|
|||||||
@ -211,16 +211,12 @@ import EditIcon from '@/components/Icons/EditIcon.vue'
|
|||||||
import CameraIcon from '@/components/Icons/CameraIcon.vue'
|
import CameraIcon from '@/components/Icons/CameraIcon.vue'
|
||||||
import DealsIcon from '@/components/Icons/DealsIcon.vue'
|
import DealsIcon from '@/components/Icons/DealsIcon.vue'
|
||||||
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
|
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { globalStore } from '@/stores/global'
|
import { globalStore } from '@/stores/global'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
import { getView } from '@/utils/view'
|
import { getView } from '@/utils/view'
|
||||||
import {
|
import { formatDate, timeAgo, createToast } from '@/utils'
|
||||||
formatDate,
|
|
||||||
timeAgo,
|
|
||||||
formatNumberIntoCurrency,
|
|
||||||
createToast,
|
|
||||||
} from '@/utils'
|
|
||||||
import {
|
import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
@ -476,6 +472,8 @@ const rows = computed(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Deal')
|
||||||
|
|
||||||
const columns = computed(() => {
|
const columns = computed(() => {
|
||||||
return tabIndex.value === 0 ? dealColumns : contactColumns
|
return tabIndex.value === 0 ? dealColumns : contactColumns
|
||||||
})
|
})
|
||||||
@ -485,12 +483,9 @@ function getDealRowObject(deal) {
|
|||||||
name: deal.name,
|
name: deal.name,
|
||||||
organization: {
|
organization: {
|
||||||
label: deal.organization,
|
label: deal.organization,
|
||||||
logo: props.organization?.organization_logo,
|
logo: organization.doc?.organization_logo,
|
||||||
},
|
},
|
||||||
annual_revenue: formatNumberIntoCurrency(
|
annual_revenue: getFormattedCurrency('annual_revenue', deal),
|
||||||
deal.annual_revenue,
|
|
||||||
deal.currency,
|
|
||||||
),
|
|
||||||
status: {
|
status: {
|
||||||
label: deal.status,
|
label: deal.status,
|
||||||
color: getDealStatus(deal.status)?.iconColorClass,
|
color: getDealStatus(deal.status)?.iconColorClass,
|
||||||
|
|||||||
@ -69,9 +69,12 @@ 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 { formatDate, timeAgo, website, formatNumberIntoCurrency } from '@/utils'
|
import { getMeta } from '@/stores/meta'
|
||||||
|
import { formatDate, timeAgo, website } from '@/utils'
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Organization')
|
||||||
|
|
||||||
const organizationsListView = ref(null)
|
const organizationsListView = ref(null)
|
||||||
const showOrganizationModal = ref(false)
|
const showOrganizationModal = ref(false)
|
||||||
|
|
||||||
@ -110,6 +113,10 @@ const rows = computed(() => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fieldType && fieldType == 'Currency') {
|
||||||
|
_rows[row] = getFormattedCurrency(row, organization)
|
||||||
|
}
|
||||||
|
|
||||||
if (row === 'organization_name') {
|
if (row === 'organization_name') {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: organization.organization_name,
|
label: organization.organization_name,
|
||||||
@ -117,11 +124,6 @@ const rows = computed(() => {
|
|||||||
}
|
}
|
||||||
} else if (row === 'website') {
|
} else if (row === 'website') {
|
||||||
_rows[row] = website(organization.website)
|
_rows[row] = website(organization.website)
|
||||||
} else if (row === 'annual_revenue') {
|
|
||||||
_rows[row] = formatNumberIntoCurrency(
|
|
||||||
organization.annual_revenue,
|
|
||||||
organization.currency,
|
|
||||||
)
|
|
||||||
} else if (['modified', 'creation'].includes(row)) {
|
} else if (['modified', 'creation'].includes(row)) {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: formatDate(organization[row]),
|
label: formatDate(organization[row]),
|
||||||
|
|||||||
@ -204,12 +204,14 @@ import ViewControls from '@/components/ViewControls.vue'
|
|||||||
import TasksListView from '@/components/ListViews/TasksListView.vue'
|
import TasksListView from '@/components/ListViews/TasksListView.vue'
|
||||||
import KanbanView from '@/components/Kanban/KanbanView.vue'
|
import KanbanView from '@/components/Kanban/KanbanView.vue'
|
||||||
import TaskModal from '@/components/Modals/TaskModal.vue'
|
import TaskModal from '@/components/Modals/TaskModal.vue'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { formatDate, timeAgo } from '@/utils'
|
import { formatDate, timeAgo } from '@/utils'
|
||||||
import { Tooltip, Avatar, TextEditor, Dropdown, call } from 'frappe-ui'
|
import { Tooltip, Avatar, TextEditor, Dropdown, call } from 'frappe-ui'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Task')
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -271,6 +273,10 @@ function parseRows(rows, columns = []) {
|
|||||||
_rows[row] = formatDate(task[row], '', true, fieldType == 'Datetime')
|
_rows[row] = formatDate(task[row], '', true, fieldType == 'Datetime')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fieldType && fieldType == 'Currency') {
|
||||||
|
_rows[row] = getFormattedCurrency(row, task)
|
||||||
|
}
|
||||||
|
|
||||||
if (['modified', 'creation'].includes(row)) {
|
if (['modified', 'creation'].includes(row)) {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: formatDate(task[row]),
|
label: formatDate(task[row]),
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
import { secondsToDuration, formatDate, timeAgo } from '@/utils'
|
import { secondsToDuration, formatDate, timeAgo } from '@/utils'
|
||||||
|
import { getMeta } from '@/stores/meta'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { contactsStore } from '@/stores/contacts'
|
import { contactsStore } from '@/stores/contacts'
|
||||||
|
|
||||||
|
const { getFormattedCurrency } = getMeta('CRM Call Log')
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
const { getContact, getLeadContact } = contactsStore()
|
const { getContact, getLeadContact } = contactsStore()
|
||||||
|
|
||||||
@ -58,6 +60,10 @@ export function getCallLogDetail(row, log, columns = []) {
|
|||||||
return formatDate(log[row], '', true, fieldType == 'Datetime')
|
return formatDate(log[row], '', true, fieldType == 'Datetime')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fieldType && fieldType == 'Currency') {
|
||||||
|
return getFormattedCurrency(row, log)
|
||||||
|
}
|
||||||
|
|
||||||
return log[row]
|
return log[row]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user