{{- /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ -}} {{- /* SPDX-FileCopyrightText: 2025-2026 Christian Galo */ -}} {{/* member_entitlements.html The Products page's "Your entitlements" region: current tier per pool, usage meters, granted on/off capabilities, and source attribution. Badges render through statusBadge (member-facing labels only; ui-vocabulary D4.3 bans raw-key badges, so the raw resource key is demoted to a title attribute). */}} {{ if .Error }} {{ else if and (not .HasEntitlements) (not .Enrolled) }} {{ template "emptyState" .Empty }} {{ else }} {{ range .PoolTiers }}
{{ if .HasTier }} {{ template "statusBadge" .PoolBadge }} You are on {{ .TierName }} {{ else }} No active plan {{ end }}
{{ end }} {{/* Resource usage bars: some tiers carry only boolean/metadata entitlements, so this section is optional even for an enrolled member. Rows lead with the human label and integration attribution (dashboard-display-genericity). */}} {{ if .Entitlements }}
{{ range .Entitlements }}
{{ .Label }}{{ if .IntegrationName }} · {{ .IntegrationName }}{{ end }} {{ .CurrentUsage }} / {{ .ResourceLimit }}
{{ end }} {{ end }} {{/* Granted boolean entitlements: access is conferred or it isn't; an Included badge, no usage meter. Lapsed rows are filtered server-side. */}} {{ if .BooleanEntitlements }}
{{ range .BooleanEntitlements }}
{{ .Label }}{{ if .IntegrationName }} · {{ .IntegrationName }}{{ end }} {{ template "statusBadge" .IncludedBadge }}
{{ end }} {{ end }} {{/* Source attribution: the grant reason renders through the badge map, so a member never sees a raw enum value. */}} {{ if .Sources }}
Sources {{ range .Sources }}
{{ template "statusBadge" .ReasonBadge }} {{ .ProductName }}{{ if .ValidFrom }} · since {{ .ValidFrom }}{{ end }}
{{ end }} {{ end }} {{ end }}