From 46897ec3dd26b21bfbdf59ebef05252cfb87c4c8 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 22 Mar 2024 11:04:30 +0200 Subject: [PATCH] status styles changes --- .../Templates/Metadata/Event/entityDefs.json | 9 +++++++-- .../Resources/metadata/entityDefs/Call.json | 3 ++- .../Resources/metadata/entityDefs/Case.json | 6 ++++-- .../entityDefs/KnowledgeBaseArticle.json | 12 +++++++++++- .../Resources/metadata/entityDefs/Lead.json | 14 +++++++++++--- .../metadata/entityDefs/Meeting.json | 3 ++- .../metadata/entityDefs/Opportunity.json | 4 +++- .../Resources/metadata/entityDefs/Task.json | 19 ++++++++++++++++--- .../Resources/metadata/entityDefs/Note.json | 19 ++++--------------- application/Espo/Tools/Stream/Service.php | 2 -- 10 files changed, 60 insertions(+), 31 deletions(-) diff --git a/application/Espo/Core/Templates/Metadata/Event/entityDefs.json b/application/Espo/Core/Templates/Metadata/Event/entityDefs.json index eb7ca2ff44..ffb3749b41 100644 --- a/application/Espo/Core/Templates/Metadata/Event/entityDefs.json +++ b/application/Espo/Core/Templates/Metadata/Event/entityDefs.json @@ -7,10 +7,15 @@ }, "status": { "type": "enum", - "options": ["Planned", "Held", "Not Held"], + "options": [ + "Planned", + "Held", + "Not Held" + ], "default": "Planned", "style": { - "Held": "success" + "Held": "success", + "Not Held": "info" }, "audited": true }, diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Call.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Call.json index 1c9d621dac..bf892ece03 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Call.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Call.json @@ -10,7 +10,8 @@ "options": ["Planned", "Held", "Not Held"], "default": "Planned", "style": { - "Held": "success" + "Held": "success", + "Not Held": "info" }, "audited": true, "customizationOptionsReferenceDisabled": true diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Case.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Case.json index 7527766792..3ca1ac335b 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Case.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Case.json @@ -15,8 +15,10 @@ "default": "New", "style": { "Closed": "success", - "Duplicate": "danger", - "Rejected": "danger" + "Assigned": "primary", + "Duplicate": "info", + "Pending": "warning", + "Rejected": "info" }, "audited": true, "fieldManagerAdditionalParamList": [ diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/KnowledgeBaseArticle.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/KnowledgeBaseArticle.json index a8cb3981aa..90fa7b0b04 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/KnowledgeBaseArticle.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/KnowledgeBaseArticle.json @@ -7,7 +7,17 @@ }, "status": { "type": "enum", - "options": ["Draft", "In Review", "Published", "Archived"], + "options": [ + "Draft", + "In Review", + "Published", + "Archived" + ], + "style": { + "In Review": "primary", + "Published": "success", + "Archived": "info" + }, "view": "crm:views/knowledge-base-article/fields/status", "default": "Draft", "customizationOptionsReferenceDisabled": true diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json index 0d77649cd0..bc36ecb7f3 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json @@ -28,12 +28,20 @@ }, "status": { "type": "enum", - "options": ["New", "Assigned", "In Process", "Converted", "Recycled", "Dead"], + "options": [ + "New", + "Assigned", + "In Process", + "Converted", + "Recycled", + "Dead" + ], "default": "New", "style": { + "In Process": "primary", "Converted": "success", - "Recycled": "danger", - "Dead": "danger" + "Recycled": "info", + "Dead": "info" }, "audited": true, "fieldManagerAdditionalParamList": [ diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Meeting.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Meeting.json index 5cacc90f75..3ac3ee02ff 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Meeting.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Meeting.json @@ -10,7 +10,8 @@ "options": ["Planned", "Held", "Not Held"], "default": "Planned", "style": { - "Held": "success" + "Held": "success", + "Not Held": "info" }, "audited": true, "customizationOptionsReferenceDisabled": true diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json index 253809c721..49d87220d3 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json @@ -174,8 +174,10 @@ "Closed Lost": 0 }, "style": { + "Proposal": "primary", + "Negotiation": "warning", "Closed Won": "success", - "Closed Lost": "danger" + "Closed Lost": "info" }, "fieldManagerAdditionalParamList": [ { diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json index 279d0bfae3..489f5737bf 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Task.json @@ -7,9 +7,17 @@ }, "status": { "type": "enum", - "options": ["Not Started", "Started", "Completed", "Canceled", "Deferred"], + "options": [ + "Not Started", + "Started", + "Completed", + "Canceled", + "Deferred" + ], "style": { - "Completed": "success" + "Completed": "success", + "Started": "primary", + "Canceled": "info" }, "default": "Not Started", "audited": true, @@ -24,7 +32,12 @@ }, "priority": { "type": "enum", - "options": ["Low", "Normal", "High", "Urgent"], + "options": [ + "Low", + "Normal", + "High", + "Urgent" + ], "default": "Normal", "displayAsLabel": true, "style": { diff --git a/application/Espo/Resources/metadata/entityDefs/Note.json b/application/Espo/Resources/metadata/entityDefs/Note.json index eb6e9efa83..2b9109991e 100644 --- a/application/Espo/Resources/metadata/entityDefs/Note.json +++ b/application/Espo/Resources/metadata/entityDefs/Note.json @@ -183,21 +183,10 @@ "fullTextSearchOrderType": "original" }, "statusStyles": { - "Lead": { - "Assigned" : "primary", - "In Process" : "primary" - }, - "Case": { - "Assigned" : "primary" - }, - "Opportunity": { - "Proposal": "primary", - "Negotiation": "primary" - }, - "Task": { - "Started" : "primary", - "Canceled" : "danger" - } + "Lead": {}, + "Case": {}, + "Opportunity": {}, + "Task": {} }, "indexes": { "createdAt": { diff --git a/application/Espo/Tools/Stream/Service.php b/application/Espo/Tools/Stream/Service.php index 85bfad1f39..6ad02bbec1 100644 --- a/application/Espo/Tools/Stream/Service.php +++ b/application/Espo/Tools/Stream/Service.php @@ -87,9 +87,7 @@ class Service ]; /** @var string[] */ private $dangerDefaultStyleList = [ - 'Not Held', 'Closed Lost', - 'Dead', ]; /**