feat(opportunities): Festpreis, Klick daneben, Kontakt von hier
Drei Dinge, die im Alltag gefehlt haben: - Projektdaten kennen jetzt einen Projektpreis. Ist er gesetzt, gilt er als Volumen statt Tagessatz x Laufzeit - Festpreisprojekte mussten bisher ausgerechnet und in den Tagessatz gefaelscht werden. - Dialoge schliessen auch per Klick in den Hintergrund, nicht nur ueber das X. Escape trifft dabei nur den obersten Dialog; eine Textmarkierung, die im Dialog beginnt und daneben endet, schliesst nichts. - Fehlt ein Ansprechpartner noch im CRM, oeffnet "Neuer Kontakt..." in der Opportunity denselben Dialog wie unter Kontakte. Der frische Kontakt haengt danach sofort als Ansprechpartner dran, ohne die Opportunity zu verlassen. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
30164e0ae7
commit
025390e18a
+7
-1
@@ -210,6 +210,8 @@ export interface Opportunity {
|
||||
daily_rate: number | null;
|
||||
/** Laufzeit in Personentagen */
|
||||
duration_days: number | null;
|
||||
/** Festpreis in Euro; ersetzt die Rechnung aus Tagessatz und Laufzeit */
|
||||
fixed_price: number | null;
|
||||
start_date: string | null;
|
||||
end_date: string | null;
|
||||
last_interaction_at: string | null;
|
||||
@@ -231,8 +233,12 @@ export interface Opportunity {
|
||||
|
||||
export type OpportunityViewMode = 'grid' | 'list' | 'pipeline';
|
||||
|
||||
/** Projektvolumen = Tagessatz x Personentage; null, wenn eines fehlt. */
|
||||
/**
|
||||
* Projektvolumen. Ein gesetzter Projektpreis gilt als Festpreis und schlaegt die
|
||||
* Rechnung aus Tagessatz x Personentagen; sonst braucht es beide Werte.
|
||||
*/
|
||||
export function opportunityVolume(opportunity: Opportunity): number | null {
|
||||
if (opportunity.fixed_price !== null) return opportunity.fixed_price;
|
||||
if (opportunity.daily_rate === null || opportunity.duration_days === null) return null;
|
||||
return opportunity.daily_rate * opportunity.duration_days;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user