auditView param

This commit is contained in:
Yuri Kuznetsov
2025-10-20 13:06:57 +03:00
parent 7eb139f35d
commit 076644db85
2 changed files with 10 additions and 9 deletions
+6 -9
View File
@@ -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,
readOnly: true,
defs: {
name: field,
},
readOnly: true,
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"]');
+4
View File
@@ -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."