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

69 lines
2.5 KiB
PHP

<?php
/**
* Created by PhpStorm.
* User: Stefan
* Date: 18.11.2015
* Time: 23:21
*/
namespace Workflow;
class Designer
{
private static $Cache = array();
public function getOutputPoints($blockType) {
$type = $this->getBlockType($blockType);
$outputs = \Workflow\VtUtils::json_decode($type["output"]);
$outputPoints = array();
foreach($outputs as $output) {
$output[1] = getTranslatedString($output[1], "Workflow2");
$outputPoints[] = $output;
}
return $outputPoints;
}
public function getPersonPoints($blockType) {
$type = $this->getBlockType($blockType);
$personInputPoints = array();
if(strlen($type["persons"]) > 4) {
$persons = \Workflow\VtUtils::json_decode($type["persons"]);
foreach($persons as $tmpPersons) {
$tmpPersons[1] = getTranslatedString($tmpPersons[1], "Workflow2");
$personInputPoints[] = $tmpPersons;
}
}
return $personInputPoints;
}
public function getBlockHtml($blockID, $blockType, $top, $left) {
$type = $this->getBlockType($blockType);
return '<div data-type="'.$blockType.'"class="context-wfBlock noselect wfBlock '.(!empty($type['stypeclass'])?" ".$type['stypeclass']:"").'" id="block__'.$blockID.'" style="top:'.intval($top).'px;left:'.intval($left).'px;"><div class="imgElement '.(!empty($type['stypeclass'])?" ".$type['stypeclass']:"").'" style="'.(!empty($type["background"])?"background-image:url(modules/".$type["module"]."/icons/".$type["background"].".png);":"").'"></div><span class="blockDescription">'.getTranslatedString($type["text"], $type["module"]).'<span style="font-weight:bold;" id="block__'.$blockID.'_description">'.(!empty($text)?'<br>'.$text.'':'').'</span></span>'.($block!="start"?'<div class="idLayer" style="display:none;">'.$blockID.'</div>':'').'<div data-color="" style="background-color:;" class="colorLayer">&nbsp;</div><img style="z-index:2;position:relative;" class="settingsIcon" src="modules/Workflow2/icons/settings.png"></div>';
}
public function getBlockType($type) {
if(isset(self::$Cache[$type])) {
return self::$Cache[$type];
}
$adb = \PearDatabase::getInstance();
$sql = 'SELECT * FROM vtiger_wf_types WHERE type = ?';
$result = $adb->pquery($sql, array($type));
if($adb->num_rows($result) == 0) return false;
self::$Cache[$type] = $adb->raw_query_result_rowdata($result);
return self::$Cache[$type];
}
}