Files
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

166 lines
6.0 KiB
PHP

<?php
/**
* Created by PhpStorm.
* User: Stefan
* Date: 13.08.2016
* Time: 10:55
*/
namespace Workflow;
class AdminSidebar
{
private $menu = array(
'Settings' => array(
array(
'url' => 'index.php?module=Workflow2&view=Index&parent=Settings',
'label' => 'LBL_WORKFLOW2',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=WorkflowGenerator&parent=Settings',
'label' => 'Workflow Assistent',
'module' => 'Settings:Workflow2',
'inactive' => true,
),
array(
'url' => 'index.php?module=Workflow2&view=FrontendManager&parent=Settings',
'label' => 'Frontend Manager',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=FrontendWorkflowConfig&parent=Settings',
'label' => 'EditView Manager',
'module' => 'Settings:Workflow2',
'pro' => true,
),
array(
'url' => 'index.php?module=Workflow2&view=ProviderManager&parent=Settings',
'label' => 'Provider Manager',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=SettingsScheduler&parent=Settings',
'label' => 'LBL_SETTINGS_SCHEDULER',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=Mailscanner&parent=Settings',
'label' => 'Mailscanner',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=HttpHandlerManager&parent=Settings',
'label' => 'LBL_SETTINGS_HTTPHANDLER',
'module' => 'Settings:Workflow2',
'pro' => true,
),
array(
'url' => 'index.php?module=Workflow2&view=SettingsLogging&parent=Settings',
'label' => 'LBL_SETTINGS_LOGGING',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=LicenseManager&parent=Settings',
'label' => 'LBL_LICENSE_MANAGER',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=SettingsDBCheck&parent=Settings',
'label' => 'LBL_SETTINGS_DB_CHECK',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=ErrorReport&parent=Settings',
'label' => 'LBL_ERROR_REPORT',
'module' => 'Settings:Workflow2'
),
),
'LBL_TASK_MANAGEMENT' => array(
array(
'url' => 'index.php?module=Workflow2&view=TaskManagement&parent=Settings',
'label' => 'LBL_TASK_MANAGEMENT',
'module' => 'Settings:Workflow2'
),
array(
'url' => 'index.php?module=Workflow2&view=TaskRepoManager&parent=Settings',
'label' => 'LBL_TASK_REPO_MANAGEMENT',
'module' => 'Settings:Workflow2'
),
)
);
private static $INSTANCE = null;
public function __construct() {}
public function init() {
$alle = glob(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'. DIRECTORY_SEPARATOR . 'extends' . DIRECTORY_SEPARATOR . 'sidebar' . DIRECTORY_SEPARATOR . '*.inc.php');
foreach($alle as $datei) {
$this->menu = array_merge_recursive($this->menu, require (realpath($datei)));
}
}
/**
* @return AdminSidebar
*/
public static function getInstance() {
if(self::$INSTANCE === null) {
self::$INSTANCE = new self();
self::$INSTANCE->init();
}
return self::$INSTANCE;
}
public function addMenu($group, $url, $label, $translationModule = 'Settings:Workflow2') {
$this->menu[$group][] = array(
'url' => $url,
'label' => $label,
'module' => $translationModule
);
}
public function getMenu() {
$adb = \PearDatabase::getInstance();
$moduleModel = \Vtiger_Module_Model::getInstance("Workflow2");
$className = "\\Workflow\\S"."WE"."xt"."ension\\"."ca62d58e352291a"."30c165c444877b1c92c5d28d5c";
$asdf = new $className("Workflow2", $moduleModel->version);
$stage = $asdf->g1dd63e9ab62a68ac02f481ed3ba709207cb145ae();
foreach($this->menu as $cat => $items) {
foreach($items as $index => $item) {
if(!empty($item['inactive'])) {
unset($this->menu[$cat][$index]);
continue;
}
if(!empty($item['pro']) && $item['pro'] == true && $stage != 'pro') {
unset($this->menu[$cat][$index]);
continue;
}
preg_match('/view=([a-zA-Z0-9-_]+)/', $item['url'], $matches);
if($matches[1] == 'HttpHandlerManager') {
$sql = 'SELECT COUNT(*) as num FROM vtiger_wf_http_logs WHERE created > "'.date('Y-m-d', time() - (86400 * 7)).'"';
$result = $adb->query($sql);
$this->menu[$cat][$index]['errors'] = $adb->query_result($result, 0, 'num');
}
$this->menu[$cat][$index]['view'] = $matches[1];
preg_match('/page=([a-zA-Z0-9-_]+)/', $item['url'], $matches);
if(!empty($matches)) {
$this->menu[$cat][$index]['page'] = $matches[1];
} else {
$this->menu[$cat][$index]['page'] = '';
}
}
}
return $this->menu;
}
}