Clean seller metadata display names
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user