Add consent record detail page

Display record attributes and parsed consent data with
per-category consent state and cookies from the banner
version snapshot. The page lives outside the config layout
with its own breadcrumb navigation.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-27 16:01:16 +04:00
parent ff2c7b9cce
commit 9b83e319a0
13 changed files with 588 additions and 41 deletions

View File

@@ -1738,6 +1738,34 @@ func (s *Service) ListCookieConsentRecordsForBanner(
return records, nil
}
func (s *Service) GetCookieConsentRecord(
ctx context.Context,
scope coredata.Scoper,
id gid.GID,
) (*coredata.CookieConsentRecord, error) {
var record coredata.CookieConsentRecord
err := s.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
if err := record.LoadByID(ctx, conn, scope, id); err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) {
return ErrConsentNotFound
}
return fmt.Errorf("cannot load consent record: %w", err)
}
return nil
},
)
if err != nil {
return nil, err
}
return &record, nil
}
func (s *Service) CountCookieConsentRecordsForBanner(
ctx context.Context,
scope coredata.Scoper,