Andrew Wallo 4 kuukautta sitten
vanhempi
commit
b4354ab1a4

+ 8
- 1
app/Filament/Company/Resources/Accounting/TransactionResource/Pages/ViewTransaction.php Näytä tiedosto

@@ -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([

+ 1
- 1
app/Filament/Company/Resources/Sales/RecurringInvoiceResource/Pages/ViewRecurringInvoice.php Näytä tiedosto

@@ -89,7 +89,7 @@ class ViewRecurringInvoice extends ViewRecord
89 89
                     ]),
90 90
                 BannerEntry::make('readyToApprove')
91 91
                     ->info()
92
-                    ->title('Ready to Approve')
92
+                    ->title('Ready to approve')
93 93
                     ->description('This recurring invoice is ready for approval. Review the details, and approve it when you’re ready to start generating invoices.')
94 94
                     ->visible(fn (RecurringInvoice $record) => $record->canBeApproved() && ! $record->hasInactiveAdjustments())
95 95
                     ->columnSpanFull()

Loading…
Peruuta
Tallenna