fix(nav): render Beta/Dev/comingSoon badges for the main group (#447)
The Huvudmeny group has its own render loop separate from AR/AP/ Personal/Accounting; it only emitted icon + label and ignored the betaBadge/devBadge/comingSoon flags. That's why Dokumentinkorg (group: main, betaBadge: true) never showed the Beta tag even though Löner and Anställda (group: personal) did. Adding the same badge precedence block to both render paths (desktop sidebar + mobile drawer). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -213,7 +213,20 @@ export default function DashboardNav({ companyName: _companyName, entityType, un
|
||||
"mr-2.5 h-[15px] w-[15px] flex-shrink-0",
|
||||
active ? "text-primary" : "text-muted-foreground group-hover:text-foreground"
|
||||
)} />
|
||||
{item.label}
|
||||
<span className="flex-1">{item.label}</span>
|
||||
{item.comingSoon ? (
|
||||
<span className="ml-auto rounded-full bg-muted/60 text-muted-foreground/70 text-[9px] font-medium uppercase tracking-wider px-1.5 py-0.5">
|
||||
Kommer snart
|
||||
</span>
|
||||
) : item.devBadge ? (
|
||||
<span className="ml-auto rounded-full bg-muted/60 text-muted-foreground/70 text-[9px] font-medium uppercase tracking-wider px-1.5 py-0.5">
|
||||
Dev
|
||||
</span>
|
||||
) : item.betaBadge ? (
|
||||
<span className="ml-auto rounded-full bg-muted/60 text-muted-foreground/70 text-[9px] font-medium uppercase tracking-wider px-1.5 py-0.5">
|
||||
Beta
|
||||
</span>
|
||||
) : null}
|
||||
</>
|
||||
)
|
||||
const baseClass = cn(
|
||||
@@ -551,7 +564,20 @@ export default function DashboardNav({ companyName: _companyName, entityType, un
|
||||
const content = (
|
||||
<>
|
||||
<Icon className={cn("h-[18px] w-[18px] flex-shrink-0", active ? "text-primary" : "text-muted-foreground")} />
|
||||
<span className="text-sm">{item.label}</span>
|
||||
<span className="text-sm flex-1">{item.label}</span>
|
||||
{item.comingSoon ? (
|
||||
<span className="rounded-full bg-muted/60 text-muted-foreground/70 text-[9px] font-medium uppercase tracking-wider px-1.5 py-0.5">
|
||||
Kommer snart
|
||||
</span>
|
||||
) : item.devBadge ? (
|
||||
<span className="rounded-full bg-muted/60 text-muted-foreground/70 text-[9px] font-medium uppercase tracking-wider px-1.5 py-0.5">
|
||||
Dev
|
||||
</span>
|
||||
) : item.betaBadge ? (
|
||||
<span className="rounded-full bg-muted/60 text-muted-foreground/70 text-[9px] font-medium uppercase tracking-wider px-1.5 py-0.5">
|
||||
Beta
|
||||
</span>
|
||||
) : null}
|
||||
</>
|
||||
)
|
||||
const baseClass = cn(
|
||||
|
||||
Reference in New Issue
Block a user