@@ -33,13 +31,12 @@
>
@@ -172,7 +169,7 @@
import Autocomplete from '@/components/frappe-ui/Autocomplete.vue'
import NestedPopover from '@/components/NestedPopover.vue'
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
-import { isTouchScreenDevice } from '@/utils'
+import { isTouchScreenDevice, colors, parseColor } from '@/utils'
import Draggable from 'vuedraggable'
import { Dropdown } from 'frappe-ui'
import { computed } from 'vue'
@@ -265,33 +262,4 @@ function updateColumn(d) {
emit('update', data)
}
-
-function colorClasses(color, onlyIcon = false) {
- let textColor = `!text-${color}-600`
- if (color == 'black') {
- textColor = '!text-ink-gray-9'
- } else if (['gray', 'green'].includes(color)) {
- textColor = `!text-${color}-700`
- }
-
- let bgColor = `!bg-${color}-100 hover:!bg-${color}-200 active:!bg-${color}-300`
-
- return [textColor, onlyIcon ? '' : bgColor]
-}
-
-const colors = [
- 'gray',
- 'blue',
- 'green',
- 'red',
- 'pink',
- 'orange',
- 'amber',
- 'yellow',
- 'cyan',
- 'teal',
- 'violet',
- 'purple',
- 'black',
-]
diff --git a/frontend/src/components/Modals/DealModal.vue b/frontend/src/components/Modals/DealModal.vue
index 80d2e9ec..3afd2d63 100644
--- a/frontend/src/components/Modals/DealModal.vue
+++ b/frontend/src/components/Modals/DealModal.vue
@@ -163,7 +163,7 @@ const tabs = createResource({
if (field.fieldname == 'status') {
field.fieldtype = 'Select'
field.options = dealStatuses.value
- field.prefix = getDealStatus(deal.status).iconColorClass
+ field.prefix = getDealStatus(deal.status).color
}
if (field.fieldtype === 'Table') {
diff --git a/frontend/src/components/Modals/LeadModal.vue b/frontend/src/components/Modals/LeadModal.vue
index ed27c5ef..3f7476d2 100644
--- a/frontend/src/components/Modals/LeadModal.vue
+++ b/frontend/src/components/Modals/LeadModal.vue
@@ -76,7 +76,7 @@ const tabs = createResource({
if (field.fieldname == 'status') {
field.fieldtype = 'Select'
field.options = leadStatuses.value
- field.prefix = getLeadStatus(lead.status).iconColorClass
+ field.prefix = getLeadStatus(lead.status).color
}
if (field.fieldtype === 'Table') {
diff --git a/frontend/src/pages/Contact.vue b/frontend/src/pages/Contact.vue
index c6d08a76..f6698667 100644
--- a/frontend/src/pages/Contact.vue
+++ b/frontend/src/pages/Contact.vue
@@ -582,7 +582,7 @@ function getDealRowObject(deal) {
annual_revenue: getFormattedCurrency('annual_revenue', deal),
status: {
label: deal.status,
- color: getDealStatus(deal.status)?.iconColorClass,
+ color: getDealStatus(deal.status)?.color,
},
email: deal.email,
mobile_no: deal.mobile_no,
diff --git a/frontend/src/pages/Deal.vue b/frontend/src/pages/Deal.vue
index c441d957..fb2af335 100644
--- a/frontend/src/pages/Deal.vue
+++ b/frontend/src/pages/Deal.vue
@@ -21,12 +21,9 @@
:options="statusOptions('deal', updateField, deal.data._customStatuses)"
>
-