fix: dashlet view extend base View instead of DashletView, add getTitle method
The EspoCRM DashletView wrapper creates the body view - the body should extend View (not DashletView) and must implement getTitle().
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
define('custom:modules/smart-assistant/views/dashlets/smart-assistant', ['views/dashlet'], function (DashletView) {
|
define('custom:modules/smart-assistant/views/dashlets/smart-assistant', ['view'], function (View) {
|
||||||
|
|
||||||
return DashletView.extend({
|
return View.extend({
|
||||||
|
|
||||||
name: 'SmartAssistant',
|
name: 'SmartAssistant',
|
||||||
|
|
||||||
|
getTitle: function () {
|
||||||
|
return this.translate('Smart Assistant', 'labels', 'SmartAssistant') || 'Smart Assistant';
|
||||||
|
},
|
||||||
|
|
||||||
templateContent: '' +
|
templateContent: '' +
|
||||||
'<div style="direction: rtl; text-align: right; padding: 8px;">' +
|
'<div style="direction: rtl; text-align: right; padding: 8px;">' +
|
||||||
'<div class="sa-dashlet-cards" style="display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;"></div>' +
|
'<div class="sa-dashlet-cards" style="display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;"></div>' +
|
||||||
|
|||||||
Reference in New Issue
Block a user