|
@@ -8,6 +8,7 @@ use App\Filament\Company\Resources\Purchases\BillResource\Pages\ViewBill;
|
8
|
8
|
use App\Filament\Company\Resources\Purchases\VendorResource;
|
9
|
9
|
use App\Filament\Company\Resources\Sales\ClientResource;
|
10
|
10
|
use App\Filament\Company\Resources\Sales\InvoiceResource\Pages\ViewInvoice;
|
|
11
|
+use App\Filament\Infolists\Components\BannerEntry;
|
11
|
12
|
use App\Models\Accounting\Bill;
|
12
|
13
|
use App\Models\Accounting\Invoice;
|
13
|
14
|
use App\Models\Accounting\JournalEntry;
|
|
@@ -56,7 +57,7 @@ class ViewTransaction extends ViewRecord
|
56
|
57
|
Actions\Action::make('markAsReviewed')
|
57
|
58
|
->label(static fn (Transaction $record) => $record->reviewed ? 'Mark as unreviewed' : 'Mark as reviewed')
|
58
|
59
|
->icon(static fn (Transaction $record) => $record->reviewed ? 'heroicon-s-check-circle' : 'heroicon-o-check-circle')
|
59
|
|
- ->disabled(fn (Transaction $record): bool => $record->isUncategorized())
|
|
60
|
+ ->hidden(fn (Transaction $record): bool => $record->isUncategorized())
|
60
|
61
|
->action(fn (Transaction $record) => $record->update(['reviewed' => ! $record->reviewed])),
|
61
|
62
|
Actions\ReplicateAction::make()
|
62
|
63
|
->excludeAttributes(['created_by', 'updated_by', 'created_at', 'updated_at'])
|
|
@@ -90,6 +91,12 @@ class ViewTransaction extends ViewRecord
|
90
|
91
|
{
|
91
|
92
|
return $infolist
|
92
|
93
|
->schema([
|
|
94
|
+ BannerEntry::make('transactionUncategorized')
|
|
95
|
+ ->warning()
|
|
96
|
+ ->title('Transaction uncategorized')
|
|
97
|
+ ->description('This transaction is uncategorized. You must categorize it before you can approve it.')
|
|
98
|
+ ->visible(fn (Transaction $record) => $record->isUncategorized())
|
|
99
|
+ ->columnSpanFull(),
|
93
|
100
|
Section::make('Transaction Details')
|
94
|
101
|
->columns(3)
|
95
|
102
|
->schema([
|