Clean seller metadata display names
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s

This commit is contained in:
Cauê Faleiros
2026-06-24 13:03:55 -03:00
parent b129307bae
commit ca9615a1fd
5 changed files with 57 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import type { ClientAnalyticsItem, ClientFilterOptions, ClientMetadataFilters, D
import { fetchClientAnalytics, fetchClientFilterOptions, fetchRfmAnalytics, getCachedClientAnalytics, getCachedClientFilterOptions, getCachedRfmAnalytics } from '../dataService';
import { endOfLocalDay, formatDateParam, parseLocalDateInput, rangeForDay, rangeForLastDays, rangeForPreviousDay, startOfLocalDay } from '../dateRanges';
import type { ClientSortOption, ClientSummary } from '../analytics/clients';
import { formatDisplayName, removeTrailingSellerId } from '../displayFormatters';
const clientTypeStyles: Record<string, string> = {
'Sem análise': 'border-zinc-600/30 bg-zinc-600/15 text-zinc-300',
@@ -318,8 +319,7 @@ const Clients = () => {
};
const getSellerOptionLabel = (seller: ClientFilterOptions['sellers'][number]) => {
if (seller.id && seller.name && seller.id !== seller.name) return `${seller.name} (${seller.id})`;
return seller.name || seller.id;
return formatDisplayName(removeTrailingSellerId(seller.name || seller.id));
};
const marketplaceOptions = useMemo(() => {