fix: stream notes showing empty content - add data() method
SmartRequest and SmartAction note views were missing data() method,
so {{post}} in the template resolved to empty string. Added proper
data() with escapeString formatting, consistent with SmartResponse.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# SmartAssistant - עוזר חכם
|
# SmartAssistant - עוזר חכם
|
||||||
|
|
||||||
**גרסה:** 1.1.4 | **מחבר:** klear | **EspoCRM:** >= 8.0.0
|
**גרסה:** 1.1.5 | **מחבר:** klear | **EspoCRM:** >= 8.0.0
|
||||||
|
|
||||||
## תיאור
|
## תיאור
|
||||||
עוזר AI מאוחד למשרד עורכי דין. מספק ממשק צ'אט צף עם שני מצבי עבודה: **מצב משרד** (סקירה כללית, התראות, סטטיסטיקות) ו**מצב תיק** (סיוע מעמיק בתיק ספציפי). כולל מערכת זיכרון תיק מובנית, ביצוע פעולות באישור המשתמש, ואינטגרציה עם Stream של EspoCRM.
|
עוזר AI מאוחד למשרד עורכי דין. מספק ממשק צ'אט צף עם שני מצבי עבודה: **מצב משרד** (סקירה כללית, התראות, סטטיסטיקות) ו**מצב תיק** (סיוע מעמיק בתיק ספציפי). כולל מערכת זיכרון תיק מובנית, ביצוע פעולות באישור המשתמש, ואינטגרציה עם Stream של EspoCRM.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ define('modules/smart-assistant/views/stream/notes/smart-action', ['views/stream
|
|||||||
templateContent: '' +
|
templateContent: '' +
|
||||||
'<div class="sa-action-note sa-action-{{status}}" style="padding: 6px 12px; border-radius: 8px; direction: rtl; text-align: right; font-size: 13px;">' +
|
'<div class="sa-action-note sa-action-{{status}}" style="padding: 6px 12px; border-radius: 8px; direction: rtl; text-align: right; font-size: 13px;">' +
|
||||||
'<span class="fas {{icon}}" style="margin-left: 6px;"></span>' +
|
'<span class="fas {{icon}}" style="margin-left: 6px;"></span>' +
|
||||||
'{{post}}' +
|
'{{{formattedPost}}}' +
|
||||||
'</div>',
|
'</div>',
|
||||||
|
|
||||||
data: function () {
|
data: function () {
|
||||||
@@ -13,6 +13,8 @@ define('modules/smart-assistant/views/stream/notes/smart-action', ['views/stream
|
|||||||
var noteData = this.model.get('data') || {};
|
var noteData = this.model.get('data') || {};
|
||||||
var status = noteData.status || 'executed';
|
var status = noteData.status || 'executed';
|
||||||
|
|
||||||
|
data.post = this.model.get('post');
|
||||||
|
data.formattedPost = this.getHelper().escapeString(data.post || '');
|
||||||
data.status = status;
|
data.status = status;
|
||||||
|
|
||||||
if (status === 'executed') {
|
if (status === 'executed') {
|
||||||
|
|||||||
+14
-3
@@ -5,11 +5,22 @@ define('modules/smart-assistant/views/stream/notes/smart-request', ['views/strea
|
|||||||
templateContent: '' +
|
templateContent: '' +
|
||||||
'<div style="background: #e3f2fd; padding: 8px 12px; border-radius: 8px; direction: rtl; text-align: right; font-size: 13px;">' +
|
'<div style="background: #e3f2fd; padding: 8px 12px; border-radius: 8px; direction: rtl; text-align: right; font-size: 13px;">' +
|
||||||
'<span class="fas fa-user" style="color: #1565c0; margin-left: 6px;"></span>' +
|
'<span class="fas fa-user" style="color: #1565c0; margin-left: 6px;"></span>' +
|
||||||
'{{post}}' +
|
'{{{formattedPost}}}' +
|
||||||
'</div>',
|
'</div>',
|
||||||
|
|
||||||
setup: function () {
|
data: function () {
|
||||||
NoteView.prototype.setup.call(this);
|
var data = NoteView.prototype.data.call(this);
|
||||||
|
|
||||||
|
data.formattedPost = this.formatPost(this.model.get('post'));
|
||||||
|
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
|
||||||
|
formatPost: function (text) {
|
||||||
|
if (!text) return '';
|
||||||
|
text = this.getHelper().escapeString(text);
|
||||||
|
text = text.replace(/\n/g, '<br>');
|
||||||
|
return text;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"module": "SmartAssistant",
|
"module": "SmartAssistant",
|
||||||
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and n8n integration",
|
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and n8n integration",
|
||||||
"author": "klear",
|
"author": "klear",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"acceptableVersions": [
|
"acceptableVersions": [
|
||||||
">=8.0.0"
|
">=8.0.0"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user