@props(['trade']) @php $dialogId = 'update-trade-dialog-'.$trade->id; $pickerId = 'update-trade-picker-type-'.$trade->id; $isEditing = (string) old('_trade') === (string) $trade->id; $selectedType = strtolower((string) ($isEditing ? old('pnl_type', 'profit') : 'profit')); $selectedType = in_array($selectedType, ['profit', 'loss'], true) ? $selectedType : 'profit'; $typeLabel = $selectedType === 'loss' ? 'Loss' : 'Profit'; @endphp
@csrf @method('PUT')

Add Profit/Loss

Type @error('pnl_type') @else @enderror
@error('amount') @else @enderror

Type