From 175282efc0fbaaf37d38ceab2c560a5835f63915 Mon Sep 17 00:00:00 2001
From: Lone Iversen <108085781+loivsen@users.noreply.github.com>
Date: Tue, 9 Jan 2024 16:25:59 +0100
Subject: [PATCH] fix audit log fetch
---
.../src/mocks/handlers/audit-log.handlers.ts | 6 +++---
.../info/document-workspace-view-info.element.ts | 11 +++++++++--
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/mocks/handlers/audit-log.handlers.ts b/src/Umbraco.Web.UI.Client/src/mocks/handlers/audit-log.handlers.ts
index e8ea2bc3cc..47a4495106 100644
--- a/src/Umbraco.Web.UI.Client/src/mocks/handlers/audit-log.handlers.ts
+++ b/src/Umbraco.Web.UI.Client/src/mocks/handlers/audit-log.handlers.ts
@@ -8,7 +8,7 @@ import {
export const handlers = [
rest.get(umbracoPath('/audit-log'), (_req, res, ctx) => {
- PagedAuditLog = {
+ const PagedAuditLog = {
total: logs.length,
items: logs,
};
@@ -19,7 +19,7 @@ export const handlers = [
if (!id) return;
const foundLogs = logs.filter((log) => log.entityId === id);
- PagedAuditLog = {
+ const PagedAuditLog = {
total: foundLogs.length,
items: foundLogs,
};
@@ -31,7 +31,7 @@ export const handlers = [
if (!logType) return;
const foundLogs = logs.filter((log) => log.entityType === logType);
- PagedAuditLog = {
+ const PagedAuditLog = {
total: foundLogs.length,
items: foundLogs,
};
diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts
index 6794f5bd71..fe6bc90697 100644
--- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts
+++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts
@@ -76,6 +76,9 @@ export class UmbDocumentWorkspaceViewInfoElement extends UmbLitElement {
@state()
private _documentTypeId = '';
+ @state()
+ private _documentUnique = '';
+
private _workspaceContext?: typeof UMB_WORKSPACE_CONTEXT.TYPE;
@state()
@@ -105,6 +108,10 @@ export class UmbDocumentWorkspaceViewInfoElement extends UmbLitElement {
this._nodeName = 'TBD, with variants this is not as simple.';
this._documentTypeId = (this._workspaceContext as any).getContentTypeId();
+ this.observe(this._workspaceContext.unique, (unique) => {
+ this._documentUnique = unique;
+ });
+
/*
this.observe(this._workspaceContext.name, (name) => {
this._nodeName = name || '';
@@ -119,10 +126,10 @@ export class UmbDocumentWorkspaceViewInfoElement extends UmbLitElement {