diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 781d78ba8..c93399e58 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -168,17 +168,17 @@ function getLogTree(data) { let originLog = null; let userLog = null; let modelLog = null; - let prevLog; let nLogs; - data.forEach((log) => { + for (let i = 0; i < data.length; i++) { + let log = data[i]; + let prevLog = i > 0 ? data[i - 1] : null; const locale = validations[log.changedModel]?.locale || {}; // Origin const originChanged = !prevLog || log.originFk != prevLog.originFk; if (originChanged) { logs.push((originLog = { originFk: log.originFk, logs: [] })); - prevLog = log; } // User const userChanged = originChanged || log.userFk != prevLog.userFk; @@ -197,6 +197,7 @@ function getLogTree(data) { log.changedModel != prevLog.changedModel || log.changedModelId != prevLog.changedModelId || nLogs >= 6; + if (modelChanged) { userLog.logs.push( (modelLog = { @@ -221,7 +222,7 @@ function getLogTree(data) { propNames = [...new Set(propNames)]; log.props = parseProps(propNames, locale, vals, olds); - }); + } return logs; } @@ -320,7 +321,6 @@ function selectFilter(type, dateType) { } if (type === 'action' && selectedFilters.value.changedModel === null) { selectedFilters.value.changedModel = undefined; - reload = false; } if (type === 'userRadio') { selectedFilters.value.userFk = userRadio.value; @@ -415,18 +415,19 @@ setLogTree();
- + @@ -665,7 +666,6 @@ setLogTree(); option-label="locale" :options="actions" @update:model-value="selectFilter('action')" - @clear="() => selectFilter('action')" hide-selected /> @@ -823,14 +823,30 @@ setLogTree(); .q-item { min-height: 0px; } +.q-menu { + display: block; + & > .loading { + display: flex; + justify-content: center; + } + & > .q-card { + min-width: 180px; + max-width: 400px; + + & > .header { + color: $dark; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } +} .origin-log { &:first-child > .origin-info { margin-top: 0; } & > .origin-info { - width: 100%; - max-width: 42em; margin-top: 28px; gap: 6px; @@ -847,14 +863,15 @@ setLogTree(); } } .user-log { + display: flex; width: 100%; max-width: 40em; - & > .timeline { position: relative; - padding-right: 5px; - width: 50px; + padding-right: 1px; + width: 38px; min-width: 38px; + flex-grow: auto; & > .arrow { height: 8px; width: 8px; @@ -874,7 +891,7 @@ setLogTree(); position: absolute; background-color: $primary; width: 2px; - left: 23px; + left: 19px; z-index: -1; top: 0; bottom: -8px; @@ -893,6 +910,7 @@ setLogTree(); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + min-height: 22px; .model-value { font-style: italic; } @@ -984,25 +1002,6 @@ setLogTree(); } } } -.q-menu { - display: block; - - & > .loading { - display: flex; - justify-content: center; - } - & > .q-card { - min-width: 180px; - max-width: 400px; - - & > .header { - color: $dark; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } -} en: diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index 5c911a08e..9571c742e 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -1,8 +1,7 @@