fix: remove website validation
This commit is contained in:
parent
c9a9d1973c
commit
8bf88a2b1d
@ -80,8 +80,7 @@
|
|||||||
"fetch_from": ".website",
|
"fetch_from": ".website",
|
||||||
"fieldname": "website",
|
"fieldname": "website",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Website",
|
"label": "Website"
|
||||||
"options": "URL"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "close_date",
|
"fieldname": "close_date",
|
||||||
@ -339,7 +338,7 @@
|
|||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-09-16 19:44:19.553715",
|
"modified": "2024-09-17 18:34:15.873610",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Deal",
|
"name": "CRM Deal",
|
||||||
|
|||||||
@ -107,8 +107,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "website",
|
"fieldname": "website",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Website",
|
"label": "Website"
|
||||||
"options": "URL"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "mobile_no",
|
"fieldname": "mobile_no",
|
||||||
@ -291,7 +290,7 @@
|
|||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-09-16 19:46:01.307171",
|
"modified": "2024-09-17 18:36:57.289897",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Lead",
|
"name": "CRM Lead",
|
||||||
|
|||||||
@ -28,8 +28,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "website",
|
"fieldname": "website",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Website",
|
"label": "Website"
|
||||||
"options": "URL"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "organization_logo",
|
"fieldname": "organization_logo",
|
||||||
@ -80,7 +79,7 @@
|
|||||||
"image_field": "organization_logo",
|
"image_field": "organization_logo",
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-09-13 15:52:05.106389",
|
"modified": "2024-09-17 18:37:10.341062",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Organization",
|
"name": "CRM Organization",
|
||||||
|
|||||||
@ -290,6 +290,7 @@ import {
|
|||||||
dateFormat,
|
dateFormat,
|
||||||
dateTooltipFormat,
|
dateTooltipFormat,
|
||||||
timeAgo,
|
timeAgo,
|
||||||
|
website,
|
||||||
formatNumberIntoCurrency,
|
formatNumberIntoCurrency,
|
||||||
formatTime,
|
formatTime,
|
||||||
} from '@/utils'
|
} from '@/utils'
|
||||||
@ -394,6 +395,8 @@ function parseRows(rows) {
|
|||||||
label: deal.organization,
|
label: deal.organization,
|
||||||
logo: getOrganization(deal.organization)?.organization_logo,
|
logo: getOrganization(deal.organization)?.organization_logo,
|
||||||
}
|
}
|
||||||
|
} else if (row === 'website') {
|
||||||
|
_rows[row] = website(deal.website)
|
||||||
} else if (row == 'annual_revenue') {
|
} else if (row == 'annual_revenue') {
|
||||||
_rows[row] = formatNumberIntoCurrency(
|
_rows[row] = formatNumberIntoCurrency(
|
||||||
deal.annual_revenue,
|
deal.annual_revenue,
|
||||||
|
|||||||
@ -307,7 +307,13 @@ 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 { callEnabled } from '@/composables/settings'
|
import { callEnabled } from '@/composables/settings'
|
||||||
import { dateFormat, dateTooltipFormat, timeAgo, formatTime } from '@/utils'
|
import {
|
||||||
|
dateFormat,
|
||||||
|
dateTooltipFormat,
|
||||||
|
timeAgo,
|
||||||
|
website,
|
||||||
|
formatTime,
|
||||||
|
} from '@/utils'
|
||||||
import { Avatar, Tooltip, Dropdown } from 'frappe-ui'
|
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'
|
||||||
@ -411,6 +417,8 @@ function parseRows(rows) {
|
|||||||
}
|
}
|
||||||
} else if (row == 'organization') {
|
} else if (row == 'organization') {
|
||||||
_rows[row] = lead.organization
|
_rows[row] = lead.organization
|
||||||
|
} else if (row === 'website') {
|
||||||
|
_rows[row] = website(lead.website)
|
||||||
} else if (row == 'status') {
|
} else if (row == 'status') {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: lead.status,
|
label: lead.status,
|
||||||
|
|||||||
@ -82,6 +82,7 @@ import {
|
|||||||
dateFormat,
|
dateFormat,
|
||||||
dateTooltipFormat,
|
dateTooltipFormat,
|
||||||
timeAgo,
|
timeAgo,
|
||||||
|
website,
|
||||||
formatNumberIntoCurrency,
|
formatNumberIntoCurrency,
|
||||||
} from '@/utils'
|
} from '@/utils'
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
@ -130,8 +131,4 @@ const rows = computed(() => {
|
|||||||
return _rows
|
return _rows
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
function website(url) {
|
|
||||||
return url && url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, '')
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -72,9 +72,16 @@ export function taskPriorityOptions(action, data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function openWebsite(url) {
|
export function openWebsite(url) {
|
||||||
|
if (!url.startsWith('http://') && !url.startsWith('https://')) {
|
||||||
|
url = 'https://' + url
|
||||||
|
}
|
||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function website(url) {
|
||||||
|
return url && url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, '')
|
||||||
|
}
|
||||||
|
|
||||||
export function htmlToText(html) {
|
export function htmlToText(html) {
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
div.innerHTML = html
|
div.innerHTML = html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user