Compare commits
3 Commits
main
...
shift-build-7147
| Author | SHA1 | Date | |
|---|---|---|---|
| 921ac28ba7 | |||
| 2b099b3156 | |||
| ee7668df6f |
@@ -21,9 +21,9 @@ class HoldingController extends Controller
|
||||
$query->where('transactions.symbol', $symbol);
|
||||
},
|
||||
])
|
||||
->symbol($symbol)
|
||||
->portfolio($portfolio->id)
|
||||
->firstOrFail();
|
||||
->symbol($symbol)
|
||||
->portfolio($portfolio->id)
|
||||
->firstOrFail();
|
||||
|
||||
$formattedTransactions = $holding->getFormattedTransactions();
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ declare(strict_types=1);
|
||||
namespace App\Rules;
|
||||
|
||||
use App\Models\Portfolio;
|
||||
use App\Models\Transaction;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class QuantityValidationRule implements ValidationRule
|
||||
{
|
||||
@@ -21,7 +20,7 @@ class QuantityValidationRule implements ValidationRule
|
||||
protected ?string $symbol,
|
||||
protected ?string $transactionType,
|
||||
protected string|Carbon|null $date
|
||||
) { }
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Validate the attribute.
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ return [
|
||||
*/
|
||||
'components' => [
|
||||
'spotlight' => [
|
||||
'class' => 'App\Support\Spotlight',
|
||||
'class' => App\Support\Spotlight::class,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -52,10 +52,10 @@ new class extends Component
|
||||
{{ Number::currency($holding->dividends_earned ?? 0, $holding->market_data->currency) }}
|
||||
</p>
|
||||
|
||||
<p class="pt-2 text-sm" title="{{ \Carbon\Carbon::parse($holding->market_data->updated_at)->toIso8601String() }}">
|
||||
<p class="pt-2 text-sm" title="{{ \Illuminate\Support\Carbon::parse($holding->market_data->updated_at)->toIso8601String() }}">
|
||||
{{ __('Last Refreshed') }}:
|
||||
{{ !is_null($holding->market_data->updated_at)
|
||||
? \Carbon\Carbon::parse($holding->market_data->updated_at)->diffForHumans()
|
||||
? \Illuminate\Support\Carbon::parse($holding->market_data->updated_at)->diffForHumans()
|
||||
: '' }}
|
||||
</p>
|
||||
</div>
|
||||
@@ -98,6 +98,6 @@ new class extends Component
|
||||
{{ Number::currency($row->dividends_earned ?? 0, $row->market_data->currency) }}
|
||||
@endscope
|
||||
@scope('cell_market_data_updated_at', $row)
|
||||
{{ \Carbon\Carbon::parse($row->market_data_updated_at)->diffForHumans() }}
|
||||
{{ \Illuminate\Support\Carbon::parse($row->market_data_updated_at)->diffForHumans() }}
|
||||
@endscope
|
||||
</x-table>
|
||||
|
||||
Reference in New Issue
Block a user