- 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.
91 lines
3.4 KiB
PHP
91 lines
3.4 KiB
PHP
<?php
|
|
/*+**********************************************************************************
|
|
The content of this file is subject to the ITS4YouMultiCompany license.
|
|
* ("License"); You may not use this file except in compliance with the License
|
|
* The Initial Developer of the Original Code is IT-Solutions4You s.r.o.
|
|
* Portions created by IT-Solutions4You s.r.o. are Copyright(C) IT-Solutions4You s.r.o.
|
|
* All Rights Reserved.
|
|
************************************************************************************/
|
|
|
|
class ITS4YouMultiCompany_CustomNumberingAjax_Action extends Vtiger_BasicAjax_Action
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->exposeMethod('saveModuleCustomNumberingData');
|
|
$this->exposeMethod('updateRecordsWithSequenceNumber');
|
|
$this->exposeMethod('updateEmptyCompanyField');
|
|
}
|
|
|
|
public function checkPermission(Vtiger_Request $request)
|
|
{
|
|
return;
|
|
}
|
|
|
|
public function process(Vtiger_Request $request)
|
|
{
|
|
$mode = $request->getMode();
|
|
if (!empty($mode)) {
|
|
echo $this->invokeExposedMethod($mode, $request);
|
|
return;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param Vtiger_Request $request
|
|
* @throws Exception
|
|
*/
|
|
public function updateEmptyCompanyField(Vtiger_Request $request)
|
|
{
|
|
/** @var ITS4YouMultiCompany_CustomRecordNumbering_Model $numberingModel */
|
|
$numberingModels = ITS4YouMultiCompany_CustomRecordNumbering_Model::getAllowedModules();
|
|
|
|
foreach ($numberingModels as $numberingModel) {
|
|
$numberingModel->updateEmptyCompanyField();
|
|
}
|
|
|
|
$response = new Vtiger_Response();
|
|
$response->setResult(array('message' => vtranslate('LBL_UPDATE_COMPANY_FIELDS_SUCCESS', 'ITS4YouMultiCompany')));
|
|
$response->emit();
|
|
}
|
|
|
|
public function saveModuleCustomNumberingData(Vtiger_Request $request)
|
|
{
|
|
$qualifiedModuleName = $request->getModule(false);
|
|
$sourceModule = $request->get('sourceModule');
|
|
|
|
$moduleModel = ITS4YouMultiCompany_CustomRecordNumbering_Model::getInstance($sourceModule);
|
|
$moduleModel->set('prefix', $request->get('prefix'));
|
|
$moduleModel->set('sequenceNumber', $request->get('sequenceNumber'));
|
|
|
|
$result = $moduleModel->setModuleSequence($request->get('companyid'));
|
|
|
|
$response = new Vtiger_Response();
|
|
$response->setEmitType(Vtiger_Response::$EMIT_JSON);
|
|
if ($result['success']) {
|
|
$response->setResult(vtranslate('LBL_SUCCESSFULLY_UPDATED', $qualifiedModuleName));
|
|
} else {
|
|
$message = vtranslate('LBL_PREFIX_IN_USE', $qualifiedModuleName);
|
|
$response->setError($message);
|
|
}
|
|
|
|
$response->emit();
|
|
}
|
|
|
|
/**
|
|
* Function to update record with sequence number
|
|
* @param Vtiger_Request $request
|
|
*/
|
|
public function updateRecordsWithSequenceNumber(Vtiger_Request $request)
|
|
{
|
|
$sourceModule = $request->get('sourceModule');
|
|
|
|
$moduleModel = ITS4YouMultiCompany_CustomRecordNumbering_Model::getInstance($sourceModule);
|
|
$result = $moduleModel->updateRecordsWithSequence($request->get('companyid'));
|
|
|
|
$response = new Vtiger_Response();
|
|
$response->setEmitType(Vtiger_Response::$EMIT_JSON);
|
|
$response->setResult($result);
|
|
$response->emit();
|
|
}
|
|
} |