diff --git a/resources/js/components/Display/InlineForm.tsx b/resources/js/components/Display/InlineForm.tsx
index 1536d83..777a09d 100644
--- a/resources/js/components/Display/InlineForm.tsx
+++ b/resources/js/components/Display/InlineForm.tsx
@@ -1,14 +1,12 @@
import AddEntryForm from '@/components/Transactions/AddEntryForm';
import AddMilestoneForm from '@/components/Milestones/AddMilestoneForm';
-import UpdatePriceForm from '@/components/Pricing/UpdatePriceForm';
import { cn } from '@/lib/utils';
-type FormType = 'purchase' | 'milestone' | 'price';
+type FormType = 'purchase' | 'milestone';
interface InlineFormProps {
type: FormType | null;
unit?: string;
- priceTrackingEnabled?: boolean;
onClose: () => void;
onSuccess?: (type: FormType) => void;
className?: string;
@@ -17,7 +15,6 @@ interface InlineFormProps {
export default function InlineForm({
type,
unit = 'units',
- priceTrackingEnabled = false,
onClose,
onSuccess,
className,
@@ -42,17 +39,11 @@ export default function InlineForm({
{type === 'purchase' ? (
- ) : type === 'milestone' ? (
-
) : (
-
diff --git a/resources/js/components/Display/StatsBox.tsx b/resources/js/components/Display/StatsBox.tsx
index db34199..bcc19af 100644
--- a/resources/js/components/Display/StatsBox.tsx
+++ b/resources/js/components/Display/StatsBox.tsx
@@ -7,12 +7,6 @@ import type { Milestone } from '@/types/domain';
interface StatsBoxProps {
stats: {
totalShares: number;
- totalInvestment: number;
- averageCostPerShare: number;
- currentPrice?: number;
- currentValue?: number;
- profitLoss?: number;
- profitLossPercentage?: number;
};
unit?: string;
milestones?: Milestone[];
@@ -21,9 +15,6 @@ interface StatsBoxProps {
className?: string;
onAddPurchase?: () => void;
onAddMilestone?: () => void;
- onUpdatePrice?: () => void;
- assetSymbol?: string;
- priceTrackingEnabled?: boolean;
}
export default function StatsBox({
@@ -35,9 +26,6 @@ export default function StatsBox({
className,
onAddPurchase,
onAddMilestone,
- onUpdatePrice,
- assetSymbol,
- priceTrackingEnabled = false,
}: StatsBoxProps) {
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
@@ -46,22 +34,6 @@ export default function StatsBox({
const nextIndex = (selectedMilestoneIndex + 1) % milestones.length;
onMilestoneSelect(nextIndex);
};
- const formatCurrency = (amount: number) => {
- return new Intl.NumberFormat('de-DE', {
- style: 'currency',
- currency: 'EUR',
- minimumFractionDigits: 2,
- maximumFractionDigits: 2,
- }).format(amount);
- };
-
- const formatCurrencyDetailed = (amount: number) => {
- return new Intl.NumberFormat('de-DE', {
- style: 'currency',
- currency: 'EUR',
- minimumFractionDigits: 4,
- }).format(amount);
- };
return (
- {/* STATS Title and Current Price */}
Stats
- {priceTrackingEnabled && stats.currentPrice && (
-
- {assetSymbol ?? 'PRICE'}: {formatCurrencyDetailed(stats.currentPrice)}
-
- )}
-
{/* Action Dropdown */}
- {/* Dropdown Menu */}
{isDropdownOpen && (
{onAddPurchase && (
@@ -113,22 +77,11 @@ export default function StatsBox({
onAddMilestone();
setIsDropdownOpen(false);
}}
- className="w-full text-left px-4 py-2 text-red-400 hover:bg-red-600/20 hover:text-red-300 transition-colors transition-colors text-sm font-mono border-b border-red-500/20 last:border-b-0"
+ className="w-full text-left px-4 py-2 text-red-400 hover:bg-red-600/20 hover:text-red-300 transition-colors text-sm font-mono border-b border-red-500/20 last:border-b-0"
>
ADD MILESTONE
)}
- {priceTrackingEnabled && onUpdatePrice && (
-
- )}
)}
@@ -146,78 +99,45 @@ export default function StatsBox({
- {/* Milestone Table */}
-
-
MILESTONES
-
-
-
-
- | DESCRIPTION |
- {unit.toUpperCase()} |
- {priceTrackingEnabled && SWR 3% | }
- {priceTrackingEnabled && SWR 4% | }
-
-
-
- {/* Current position row */}
-
- | CURRENT |
-
- {Math.floor(stats.totalShares).toLocaleString()}
- |
- {priceTrackingEnabled && (
-
- {stats.currentPrice ? formatCurrency(stats.totalShares * stats.currentPrice * 0.03) : 'N/A'}
- |
- )}
- {priceTrackingEnabled && (
+ {/* Milestone Table */}
+
+
MILESTONES
+
+
+
+
+ | DESCRIPTION |
+ {unit.toUpperCase()} |
+
+
+
+
+ | CURRENT |
- {stats.currentPrice ? formatCurrency(stats.totalShares * stats.currentPrice * 0.04) : 'N/A'}
+ {Math.floor(stats.totalShares).toLocaleString()}
|
- )}
-
+
- {/* Render milestones after current */}
- {milestones.map((milestone, index) => {
- const swr3 = stats.currentPrice ? milestone.target * stats.currentPrice * 0.03 : 0;
- const swr4 = stats.currentPrice ? milestone.target * stats.currentPrice * 0.04 : 0;
-
- const isSelectedMilestone = index === selectedMilestoneIndex;
-
- return (
+ {milestones.map((milestone, index) => (
- |
- {milestone.description}
- |
-
+ | {milestone.description} |
+
{Math.floor(milestone.target).toLocaleString()}
|
- {priceTrackingEnabled && (
-
- {stats.currentPrice ? formatCurrency(swr3) : 'N/A'}
- |
- )}
- {priceTrackingEnabled && (
-
- {stats.currentPrice ? formatCurrency(swr4) : 'N/A'}
- |
- )}
- );
- })}
-
-
+ ))}
+
+
+
-
);
}
diff --git a/resources/js/components/Onboarding/CreateTrackerStep.tsx b/resources/js/components/Onboarding/CreateTrackerStep.tsx
index 2669d19..90491e8 100644
--- a/resources/js/components/Onboarding/CreateTrackerStep.tsx
+++ b/resources/js/components/Onboarding/CreateTrackerStep.tsx
@@ -7,26 +7,15 @@ import { FormEventHandler, useState } from 'react';
import ComponentTitle from '@/components/ui/ComponentTitle';
interface CreateTrackerStepProps {
- onSuccess: (priceTrackingEnabled: boolean) => void;
+ onSuccess: () => void;
}
export default function CreateTrackerStep({ onSuccess }: CreateTrackerStepProps) {
const [label, setLabel] = useState('');
const [unit, setUnit] = useState('');
- const [priceTracking, setPriceTracking] = useState(false);
- const [symbol, setSymbol] = useState('');
- const [fullName, setFullName] = useState('');
const [processing, setProcessing] = useState(false);
const [errors, setErrors] = useState>({});
- const togglePriceTracking = (enabled: boolean) => {
- setPriceTracking(enabled);
- if (!enabled) {
- setSymbol('');
- setFullName('');
- }
- };
-
const submit: FormEventHandler = async (e) => {
e.preventDefault();
setProcessing(true);
@@ -43,14 +32,12 @@ export default function CreateTrackerStep({ onSuccess }: CreateTrackerStepProps)
body: JSON.stringify({
label,
unit,
- price_tracking_enabled: priceTracking ? 1 : 0,
- symbol: priceTracking ? symbol : null,
- full_name: priceTracking ? fullName : null,
+ price_tracking_enabled: 0,
}),
});
if (response.ok || response.status === 201 || response.status === 409) {
- onSuccess(priceTracking);
+ onSuccess();
} else {
const data = await response.json();
if (data.errors) {
@@ -111,59 +98,9 @@ export default function CreateTrackerStep({ onSuccess }: CreateTrackerStepProps)
-
-
-
- Track market price, portfolio value, and P&L. Requires an asset symbol.
-
-
- {priceTracking && (
-
- )}
-
-
))}
@@ -219,7 +164,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
[STATUS] {steps.filter(s => s.completed).length}/{steps.length} STEPS COMPLETE
- {steps.filter(s => s.required && !s.completed).length} REQUIRED REMAINING
+ {steps.filter(s => !s.completed).length} REQUIRED REMAINING
diff --git a/resources/js/components/Transactions/AddEntryForm.tsx b/resources/js/components/Transactions/AddEntryForm.tsx
index 3dbb106..ec75cbc 100644
--- a/resources/js/components/Transactions/AddEntryForm.tsx
+++ b/resources/js/components/Transactions/AddEntryForm.tsx
@@ -11,30 +11,23 @@ import ComponentTitle from '@/components/ui/ComponentTitle';
interface EntryFormData {
date: string;
quantity: string;
- unit_price: string;
- total_cost: string;
[key: string]: string;
}
interface AddEntryFormProps {
unit?: string;
- priceTrackingEnabled?: boolean;
onSuccess?: () => void;
onCancel?: () => void;
}
interface EntrySummary {
total_quantity: number;
- total_cost: number;
- average_cost_per_unit: number;
}
-export default function AddEntryForm({ unit = 'units', priceTrackingEnabled = false, onSuccess, onCancel }: AddEntryFormProps) {
+export default function AddEntryForm({ unit = 'units', onSuccess, onCancel }: AddEntryFormProps) {
const { data, setData, post, processing, errors, reset } = useForm({
date: todayISO(),
quantity: '',
- unit_price: '',
- total_cost: '',
});
const [currentHoldings, setCurrentHoldings] = useState(null);
@@ -55,18 +48,6 @@ export default function AddEntryForm({ unit = 'units', priceTrackingEnabled = fa
fetchSummary();
}, []);
- // Auto-calculate total cost when quantity or unit_price changes
- useEffect(() => {
- if (data.quantity && data.unit_price) {
- const quantity = parseFloat(data.quantity);
- const unitPrice = parseFloat(data.unit_price);
-
- if (!isNaN(quantity) && !isNaN(unitPrice)) {
- setData('total_cost', (quantity * unitPrice).toFixed(2));
- }
- }
- }, [data.quantity, data.unit_price, setData]);
-
const submit: FormEventHandler = (e) => {
e.preventDefault();
@@ -86,7 +67,6 @@ export default function AddEntryForm({ unit = 'units', priceTrackingEnabled = fa
{currentHoldings && currentHoldings.total_quantity > 0 && (
[CURRENT] {currentHoldings.total_quantity.toFixed(6)} {unit}
- {priceTrackingEnabled && ` • €${currentHoldings.total_cost.toFixed(2)} spent`}
)}