EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
auditView param
Yuri Kuznetsov076644db8540
diff --git a/client/src/views/stream/notes/update.js b/client/src/views/stream/notes/update.jsindex a56058d134..b7203432b8 100644--- a/client/src/views/stream/notes/update.js+++ b/client/src/views/stream/notes/update.js@@ -101,7 +101,7 @@ class UpdateNoteStreamView extends NoteStreamView {this.wait(true);- this.getModelFactory().create(parentType, model => {+ this.getModelFactory().create(parentType).then(model => {const modelWas = model;const modelBecame = model.clone();@@ -116,7 +116,9 @@ class UpdateNoteStreamView extends NoteStreamView {fields.forEach(field => {const type = model.getFieldType(field) || 'base';- const viewName = this.getMetadata().get(['entityDefs', model.entityType, 'fields', field, 'view']) ||++ const viewName = model.getFieldParam(field, 'auditView') ??+ model.getFieldParam(field, 'view') ??this.getFieldManager().getViewName(type);const attributeList = this.getFieldManager().getEntityTypeFieldAttributeList(model.entityType, field);@@ -143,10 +145,8 @@ class UpdateNoteStreamView extends NoteStreamView {this.createView(field + 'Was', viewName, {model: modelWas,+ name: field,readOnly: true,- defs: {- name: field- },mode: 'detail',inlineEditDisabled: true,selector: `.row[data-name="${field}"] .cell-was`,@@ -154,10 +154,8 @@ class UpdateNoteStreamView extends NoteStreamView {this.createView(field + 'Became', viewName, {model: modelBecame,+ name: field,readOnly: true,- defs: {- name: field,- },mode: 'detail',inlineEditDisabled: true,selector: `.row[data-name="${field}"] .cell-became`,@@ -175,7 +173,6 @@ class UpdateNoteStreamView extends NoteStreamView {});}-toggleDetails() {const target = this.element.querySelector('[data-action="expandDetails"]');diff --git a/schema/metadata/entityDefs.json b/schema/metadata/entityDefs.jsonindex 6deb9ebef1..1c9bc4abf0 100644--- a/schema/metadata/entityDefs.json+++ b/schema/metadata/entityDefs.json@@ -1279,6 +1279,10 @@"type": "boolean","description": "Linking and unlinking will be logged in the Stream. Available for hasMany."},+ "auditView": {+ "type": "string",+ "description": "A view used for audit. If not specified, the ordinary view is used. As of v9.2.3."+ },"readOnly": {"type": "boolean","description": "Read-only links cannot be edited via link and unlink requests. But they can be edited via link and link-multiple fields."