diff --git a/README.md b/README.md
index ce48def..fea8b1f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# SmartAssistant - עוזר חכם
-**גרסה:** 1.1.6 | **מחבר:** klear | **EspoCRM:** >= 8.0.0
+**גרסה:** 1.1.7 | **מחבר:** klear | **EspoCRM:** >= 8.0.0
## תיאור
עוזר AI מאוחד למשרד עורכי דין. מספק ממשק צ'אט צף עם שני מצבי עבודה: **מצב משרד** (סקירה כללית, התראות, סטטיסטיקות) ו**מצב תיק** (סיוע מעמיק בתיק ספציפי). כולל מערכת זיכרון תיק מובנית, ביצוע פעולות באישור המשתמש, ואינטגרציה עם Stream של EspoCRM.
diff --git a/files/client/custom/modules/smart-assistant/src/views/floating-chat.js b/files/client/custom/modules/smart-assistant/src/views/floating-chat.js
index 7e3a185..6dacbb3 100644
--- a/files/client/custom/modules/smart-assistant/src/views/floating-chat.js
+++ b/files/client/custom/modules/smart-assistant/src/views/floating-chat.js
@@ -480,6 +480,10 @@ define('modules/smart-assistant/views/floating-chat', ['view'], function (View)
var cls = approved ? (result.success ? 'sa-msg-assistant' : 'sa-msg-error') : 'sa-msg-loading';
$messages.append('
' + self.escapeHtml(msg) + '
');
self.scrollToBottom();
+
+ if (approved && result.success) {
+ self.refreshCurrentView(result.entityType);
+ }
}).catch(function () {
$messages.append('שגיאה בביצוע הפעולה
');
self.scrollToBottom();
@@ -620,5 +624,37 @@ define('modules/smart-assistant/views/floating-chat', ['view'], function (View)
div.textContent = text;
return div.innerHTML;
},
+
+ refreshCurrentView: function (entityType) {
+ var mainView = this.getParentView();
+
+ while (mainView && mainView.getParentView()) {
+ mainView = mainView.getParentView();
+ }
+
+ if (!mainView) return;
+
+ var currentView = mainView.getView('main');
+
+ if (!currentView) return;
+
+ var recordView = currentView.getView('record');
+
+ if (recordView && recordView.model) {
+ recordView.model.trigger('update-all');
+ }
+
+ if (entityType === 'Task' || entityType === 'Meeting') {
+ var sideView = currentView.getView('side');
+
+ if (sideView) {
+ var activities = sideView.getView('activities');
+ var tasks = sideView.getView('tasks');
+
+ if (activities && activities.actionRefresh) activities.actionRefresh();
+ if (tasks && tasks.actionRefresh) tasks.actionRefresh();
+ }
+ }
+ },
});
});
diff --git a/manifest.json b/manifest.json
index a07eb8e..df827ff 100644
--- a/manifest.json
+++ b/manifest.json
@@ -3,7 +3,7 @@
"module": "SmartAssistant",
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and n8n integration",
"author": "klear",
- "version": "1.1.6",
+ "version": "1.1.7",
"acceptableVersions": [
">=8.0.0"
],