fix(export): label synthetic ordinal '# Days Reach (ordinal)' to avoid collision with same-named daily field
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,7 @@ export default function ExportDataModal({
|
||||
const activeDaily = useMemo(() => (dailyTemplate ?? []).filter((f) => f.active), [dailyTemplate]);
|
||||
const xOptions = useMemo(() => [
|
||||
{ id: '__date__', label: 'Date' },
|
||||
{ id: '__days__', label: '# Days Reach' },
|
||||
{ id: '__days__', label: '# Days Reach (ordinal)' },
|
||||
...activeDaily.map((f) => ({ id: f.fieldId, label: f.label })),
|
||||
], [activeDaily]);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ export function buildSampleIndex(statuses, xField, dailyTemplate) {
|
||||
|
||||
function xFieldLabel(xField, dailyTemplate) {
|
||||
if (xField === '__date__') return 'Date';
|
||||
if (xField === '__days__') return '# Days Reach';
|
||||
if (xField === '__days__') return '# Days Reach (ordinal)';
|
||||
return (dailyTemplate ?? []).find((f) => f.fieldId === xField)?.label ?? '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user