Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.6 KB
Raw Blame
<%# The §3.1 colour rule in ONE place: green for ① eu_native, one shared amber for
    everything else. A per-rung palette would be a second, hand-maintained copy of
    the admin badge map (AiPackage::JURISDICTION_BADGE_STYLES).

    ⚠️ The rule is a SIMPLIFICATION, not a statement of fact — the earlier wording
    here ("eu_native is the single rung without a third-country transfer") was
    simply false: self_hosted has none either, being a third axis rather than a
    rung (AiPackage:66-68). The same false premise, applied to TEXT instead of
    colour, made the P4b dialog announce that a transfer arose when a customer
    moved to their own server (#437 review). Amber here means "not ①", nothing
    more; anything that reads a legal claim off this badge has to ask
    AiPackage::JURISDICTION_MATRIX instead.

    Shared by the package card and the P4b consequence dialog — the dialog states
    the SAME claim about the same package, and a second hand-written copy is how
    the two would end up disagreeing about it.

    Local: jurisdiction (String, blank/nil = nothing classified and nothing claimed). %>
<% badge_style = if jurisdiction == AiPackage::EU_NATIVE
                   'border-green-600 bg-green-100 text-green-800'
                 else
                   'border-amber-600 bg-amber-100 text-amber-900'
                 end %>
<span class="inline-flex items-center px-2 py-1 rounded text-xs font-bold border <%= badge_style %>">
  <%= t("views.organisations.ai_settings.packages.jurisdictions.#{jurisdiction.presence || 'blank'}") %>
</span>