Initial work on edit invoice page.

This commit is contained in:
Matt Young 2026-01-28 09:50:25 -06:00
parent f85d4f20bb
commit 9b2202e894
4 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,21 @@
<?php
use Livewire\Component;
new class extends Component
{
public $invoice;
public function mount($invoice = null): void
{
$this->invoice = $invoice;
}
};
?>
<div>
<flux:heading size="xl">Edit Invoice</flux:heading>
<flux:card>
<flux:heading size="lg">Identifying Information</flux:heading>
</flux:card>
</div>

View File

@ -0,0 +1,5 @@
<x-layouts::app :title="__('Contacts')">
<div class="max-w-7xl mx-auto space-y-4">
<livewire:edit-invoice :invoice="$invoice" />
</div>
</x-layouts::app>

View File

@ -1,4 +1,4 @@
<x-layouts::app :title="__('Contacts')">
<x-layouts::app :title="__('Invoices')">
<div class="max-w-7xl mx-auto space-y-4">
<div class="flex justify-end">
<livewire:create-invoice />

View File

@ -1,6 +1,6 @@
<?php
use App\Http\Controllers\ClientController;
use App\Models\Invoice;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
@ -13,6 +13,8 @@ Route::middleware(['auth', 'verified'])->group(function () {
Route::view('contacts', 'contacts.index')->name('contacts');
Route::view('products', 'products.index')->name('products');
Route::view('invoices', 'invoices.index')->name('invoices');
Route::get('invoices/{invoice}/edit',
fn (Invoice $invoice) => view('invoices.edit', compact('invoice')))->name('invoices.edit');
});
// Route::view('dashboard', 'dashboard')