feat(opportunities): gewichtetes Volumen entfernt
So wird bei perinco nicht gerechnet: die Summe "Gewichtet" aenderte sich beim Schieben der Abschlusswahrscheinlichkeit und behauptete damit eine Groesse, die es im Haus nicht gibt. Weg sind die Kennzahl ueber der Liste, die Spalte samt Sortierung, die zweite Zahl in der Vorschau des Formulars und weightedVolume() selbst. Die Wahrscheinlichkeit bleibt an der Opportunity - Schieberegler im Formular, Prozent in Liste und Pipeline-Karte; sie geht nur in keine Summe mehr ein. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
4635b9a64b
commit
64dea0b100
@@ -19,7 +19,6 @@ import {
|
||||
contactFullName,
|
||||
formatEuro,
|
||||
opportunityVolume,
|
||||
weightedVolume,
|
||||
type AppUser,
|
||||
type Lead,
|
||||
type Opportunity,
|
||||
@@ -54,7 +53,6 @@ const SORT_OPTIONS: OpportunitySortKey[] = [
|
||||
'updated_at',
|
||||
'last_interaction',
|
||||
'volume',
|
||||
'weighted',
|
||||
'daily_rate',
|
||||
'duration',
|
||||
'probability',
|
||||
@@ -77,8 +75,6 @@ function sortValue(opportunity: Opportunity, key: OpportunitySortKey): string |
|
||||
return opportunity.probability;
|
||||
case 'volume':
|
||||
return opportunityVolume(opportunity);
|
||||
case 'weighted':
|
||||
return weightedVolume(opportunity);
|
||||
case 'daily_rate':
|
||||
return opportunity.daily_rate;
|
||||
case 'duration':
|
||||
@@ -167,7 +163,6 @@ export const Opportunities: React.FC<OpportunitiesProps> = ({
|
||||
const totals = useMemo(
|
||||
() => ({
|
||||
volume: filtered.reduce((sum, item) => sum + (opportunityVolume(item) ?? 0), 0),
|
||||
weighted: filtered.reduce((sum, item) => sum + (weightedVolume(item) ?? 0), 0),
|
||||
open: filtered.filter((item) => OPEN_STAGES.includes(item.stage)).length,
|
||||
}),
|
||||
[filtered]
|
||||
@@ -346,7 +341,6 @@ export const Opportunities: React.FC<OpportunitiesProps> = ({
|
||||
{ label: 'Opportunities', value: String(filtered.length) },
|
||||
{ label: 'davon offen', value: String(totals.open) },
|
||||
{ label: 'Volumen', value: formatEuro(totals.volume) },
|
||||
{ label: 'Gewichtet', value: formatEuro(totals.weighted) },
|
||||
].map((metric) => (
|
||||
<div key={metric.label}>
|
||||
<p className="text-[10px] font-extrabold uppercase tracking-wider text-ink-400">
|
||||
|
||||
Reference in New Issue
Block a user