Files
crm.clientright.ru/modules/Workflow2/js-templates/_OnReady.jst
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

138 lines
5.4 KiB
Plaintext

jQuery(function() {
var workflowFrontendActions = new Workflow();
workflowFrontendActions.checkFrontendActions('init');
var listenCommentWidget = false;
if(typeof Vtiger_Detail_Js != 'undefined' && jQuery('#recordId').length > 0) {
var thisInstance = Vtiger_Detail_Js.getInstance();
var detailContentsHolder = thisInstance.getContentHolder();
RedooUtils('Workflow2').onFieldChange('div#page').add(function() {
workflowFrontendActions.checkFrontendActions('edit');
});
/*
detailContentsHolder.on(thisInstance.fieldUpdatedEvent, function(e, params){
var fieldName = jQuery(e.target).attr("name");
workflowFrontendActions.checkFrontendActions('edit');
});
*/
detailContentsHolder.on(thisInstance.widgetPostLoad, function(e, p) {
if(listenCommentWidget == false) return;
if(jQuery('.commentContainer', e.target).length > 0) {
listenCommentWidget = false;
workflowFrontendActions.checkFrontendActions('edit');
}
});
detailContentsHolder.on('click','.detailViewSaveComment', function(e){
listenCommentWidget = true;
});
}
/*
// TODO: UPDATE for VT7
if(typeof Vtiger_Header_Js != 'undefined') {
var thisInstance = Vtiger_Header_Js.getInstance();
thisInstance.registerQuickCreateCallBack(function(e, b, c) {
var workflowFrontendActions = new Workflow();
workflowFrontendActions.checkFrontendActions('both', e.data.result['_recordId']);
});
}
*/
jQuery(window).on('workflow.detail.sidebar.ready', function() {
jQuery('#WorkflowDesignerErrorLoaded').hide();
var workflow = new Workflow();
workflowObj = workflow;
}).on('workflow.list.sidebar.ready', function() {
jQuery('#WorkflowDesignerErrorLoaded').hide();
var workflow = new Workflow();
workflowObj = workflow;
});
/* jQuery(window).on('workflow.list.sidebar.ready', function() {
console.log('List-Sidebar ready');
}); */
if(typeof Vtiger_Edit_Js != 'undefined') {
jQuery('body').on(Vtiger_Edit_Js.referenceSelectionEvent, function (e, b, c, d) {
var workflowObj = new Workflow();
workflowObj.setBackgroundMode(true);
workflowObj.addExtraEnvironment('source_module', jQuery('[name="module"]').val())
workflowObj.addExtraEnvironment('source_record', jQuery('[name="record"]').val());
workflowObj.execute('WF_REFERENCE', b.record, function() {
workflowObj.checkFrontendActions('edit');
});
});
}
var viewMode = Workflow2Frontend.getViewMode(jQuery('div#page'));
// if (viewMode == 'detailview' || viewMode == 'summaryview') {
Workflow2Frontend.TopbuttonHandler(jQuery('div#page'));
// }
if (jQuery('#module', jQuery('div#page')).length > 0) {
if (jQuery('#module', jQuery('div#page')).val() == 'Campaigns' && typeof Campaigns_Detail_Js != 'undefined') {
// Enable ViewCheck
if (
typeof WFDFrontendConfig !== 'undefined' &&
typeof WFDFrontendConfig['relatedbtn'] !== 'undefined'
) {
var viewMode = Workflow2Frontend.getViewMode(jQuery('div#page'));
if (viewMode == 'relatedview') {
Workflow2Frontend.RelatedListHandler(jQuery('div#page'));
}
jQuery(document).on('postajaxready', function (e) {
var viewMode = Workflow2Frontend.getViewMode(jQuery('div#page'));
if (viewMode == 'relatedview') {
Workflow2Frontend.RelatedListHandler(jQuery('div#page'));
}
});
if (jQuery('#module', jQuery('div#page')).length > 0) {
if (jQuery('#module', jQuery('div#page')).val() == 'Campaigns' && typeof Campaigns_Detail_Js != 'undefined') {
thisInstance = Campaigns_Detail_Js.getInstance();
var detailContentsHolder = thisInstance.getContentHolder();
var detailContainer = detailContentsHolder.closest('div.detailViewInfo');
jQuery('.related', detailContainer).on('click', 'li', function (e, urlAttributes) {
window.setTimeout(function () {
var viewMode = Workflow2Frontend.getViewMode(jQuery('div#page'));
if (viewMode == 'relatedview') {
Workflow2Frontend.RelatedListHandler(jQuery('div#page'));
}
}, 1000);
});
}
}
}
}
}
RedooUtils('Workflow2').onRelatedListChange().add(function() {
var objWorkflow = new Workflow();
objWorkflow.showInlineButtons();
});
jQuery('.quickCreateModule, .addButton[data-url*="QuickCreate"]').on('click', function __check() {
if(jQuery('.quickCreateContent','.modelContainer').length == 0) {
window.setTimeout(__check, 200);
} else {
jQuery('#globalmodal form[name="QuickCreate"] .btn[type="submit"]').on('click', function() {
WorkflowExecution
});
}
});
});