Add document viewer with proper 404 handling for trust center

Move document download/view to a dedicated viewer page with PDF preview,
access request flow, and a proper 404 error boundary when documents are
not found. The backend now returns NOT_FOUND instead of INTERNAL for
missing documents and reports.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-16 19:02:51 +01:00
parent dc8e6d0817
commit 7ffb2d5e94
17 changed files with 750 additions and 137 deletions

View File

@@ -59,7 +59,7 @@ endif
all: build
.PHONY: lint
lint: vet go-fmt go-fix go-lint npm-lint
lint: vet go-lint npm-lint
.PHONY: vet
vet: generate apps/console/dist/index.html apps/trust/dist/index.html @probo/emails
@@ -69,24 +69,6 @@ vet: generate apps/console/dist/index.html apps/trust/dist/index.html @probo/ema
npm-lint:
$(NPM) run lint
.PHONY: go-fmt
go-fmt: generate
@output="$$(gofmt -l cmd pkg e2e)"; \
if [ -n "$$output" ]; then \
echo "error: 'gofmt' found unformatted files:"; \
echo "$$output"; \
exit 1; \
fi
.PHONY: go-fix
go-fix: generate
@output="$$($(GO_BASE) fix -diff ./cmd/... ./pkg/... ./e2e/...)"; \
if [ -n "$$output" ]; then \
echo "error: 'go fix' suggests changes; please apply them"; \
echo "$$output"; \
exit 1; \
fi
.PHONY: go-lint
go-lint: generate
$(GOLINTCMD) run ./...