Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c97ba2361 | |||
| 94397c809b |
@@ -24,7 +24,7 @@ define('modules/smart-assistant/views/dashlets/smart-assistant', ['view'], funct
|
||||
afterRender: function () {
|
||||
this._alerts = [];
|
||||
this._summary = {};
|
||||
this._activeType = null;
|
||||
this._activeType = 'attention';
|
||||
|
||||
var self = this;
|
||||
Espo.Ajax.getRequest('SmartAssistant/action/status').then(function (result) {
|
||||
@@ -54,10 +54,10 @@ define('modules/smart-assistant/views/dashlets/smart-assistant', ['view'], funct
|
||||
|
||||
renderCards: function (summary) {
|
||||
var cards = [
|
||||
{type: 'open', label: 'תיקים פתוחים', value: summary.totalOpenCases || 0, color: '#1565c0', bg: '#e3f2fd', icon: 'fa-folder-open'},
|
||||
{type: 'attention', label: 'דורשים תשומת לב', value: summary.casesNeedingAttention || 0, color: '#f9a825', bg: '#fff9c4', icon: 'fa-bell'},
|
||||
{type: 'overdue', label: 'משימות באיחור', value: summary.totalOverdueTasks || 0, color: '#c62828', bg: '#ffcdd2', icon: 'fa-exclamation-circle'},
|
||||
{type: 'hearings', label: 'דיונים השבוע', value: summary.upcomingHearings7d || 0, color: '#e65100', bg: '#fff3e0', icon: 'fa-gavel'},
|
||||
{type: 'attention', label: 'דורשים תשומת לב', value: summary.casesNeedingAttention || 0, color: '#f9a825', bg: '#fff9c4', icon: 'fa-bell'},
|
||||
{type: 'open', label: 'תיקים פתוחים', value: summary.totalOpenCases || 0, color: '#1565c0', bg: '#e3f2fd', icon: 'fa-folder-open'},
|
||||
];
|
||||
|
||||
var self = this;
|
||||
|
||||
@@ -44,6 +44,7 @@ class ActionExecutor
|
||||
'create_call' => $this->createCall($params, $caseId, $userId),
|
||||
'delete_meeting' => $this->deleteMeeting($params),
|
||||
'delete_call' => $this->deleteCall($params),
|
||||
'delete_task' => $this->deleteTask($params),
|
||||
'delete_note' => $this->deleteNote($params),
|
||||
'schedule_hearing' => $this->scheduleHearing($params, $caseId, $userId),
|
||||
'list_documents' => $this->listDocuments($caseId),
|
||||
@@ -288,6 +289,29 @@ class ActionExecutor
|
||||
];
|
||||
}
|
||||
|
||||
private function deleteTask(array $params): array
|
||||
{
|
||||
$entityId = $params['entityId'] ?? null;
|
||||
if (!$entityId) {
|
||||
throw new Error('entityId parameter is required.');
|
||||
}
|
||||
|
||||
$entity = $this->entityManager->getEntityById('Task', $entityId);
|
||||
if (!$entity) {
|
||||
throw new NotFound("Task {$entityId} not found.");
|
||||
}
|
||||
|
||||
$name = $entity->get('name') ?? '';
|
||||
$this->entityManager->removeEntity($entity);
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
'message' => "✅ משימה \"{$name}\" נמחקה בהצלחה",
|
||||
'entityType' => 'Task',
|
||||
'entityId' => $entityId,
|
||||
];
|
||||
}
|
||||
|
||||
private function scheduleHearing(array $params, ?string $caseId, string $userId): array
|
||||
{
|
||||
$case = $this->entityManager->getEntityById('Case', $caseId);
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"module": "SmartAssistant",
|
||||
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and AI Gateway integration",
|
||||
"author": "klear",
|
||||
"version": "2.5.0",
|
||||
"version": "2.5.2",
|
||||
"acceptableVersions": [
|
||||
">=8.0.0"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user