Skip to content

Commit 3890f2c

Browse files
committed
fixed route for asset page
1 parent 862207c commit 3890f2c

File tree

6 files changed

+13
-21
lines changed

6 files changed

+13
-21
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ Still some part are in WIP status: I need to add queue worker to docker-compose.
7777
- [ ] Add mounting volumes for sqlite database file and storage
7878
- [ ] Add more features
7979
- [x] Add tags to items
80-
- [ ] Add attachments to items - https://filamentphp.com/plugins/filament-spatie-media-library
81-
- [ ] Show related items in Location view - https://filamentphp.com/docs/3.x/panels/resources/relation-managers#creating-a-relation-manager
82-
- [ ] Add QR code to items
80+
- [ ] Add attachments to items - https://filamentphp.com/plugins/filament-spatie-media-library (for now we have custom field for files and images)
81+
- [x] Show related items in Location and Tag pages
82+
- [x] Add QR code to items
8383
- [x] Add multi-tenancy support - https://filamentphp.com/docs/3.x/panels/tenancy
8484
- [ ] Fix ItemImporter to support multi-tenancy with queue. Team ID is not set up correctly for now on async driver
85-
- [ ] Add better import/export of items with relation to locations
86-
- [x] Add import of locations. if location by name not found it will create new one
87-
- [ ] Support labels/tags during import
88-
- [ ] Support attachments during import
89-
- [ ] Support nested path exports (e.g. `Home / Office / Desk`)
90-
- [ ] Support custom fields during import
85+
- [x] Add better import/export of items with relation to locations
86+
- [x] Add import of locations. if location by name not found it will create new one
87+
- [ ] Support labels/tags during import
88+
- [ ] Support attachments during import
89+
- [ ] Support nested path exports (e.g. `Home / Office / Desk`)
90+
- [ ] Support custom fields during import
9191
- [x] Add Laravel Octane
9292
- [ ] Add Laravel Pulse
9393
- [x] Add nice Dashboard for home-screen
@@ -98,6 +98,7 @@ Still some part are in WIP status: I need to add queue worker to docker-compose.
9898
- [x] Image field
9999
- [x] Add spotlight. Click: CTRL + K or CMD + K or CTRL + / or CMD + /
100100
- [x] Add Label Generator
101+
- [ ] Add REST API
101102

102103

103104
## Contributing

app/Filament/Resources/LocationResource/RelationManagers/ItemsRelationManager.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
use Filament\Forms;
77
use Filament\Forms\Form;
88
use Filament\Resources\RelationManagers\RelationManager;
9-
use Filament\Tables;
109
use Filament\Tables\Table;
11-
use Illuminate\Database\Eloquent\Builder;
12-
use Illuminate\Database\Eloquent\SoftDeletingScope;
1310

1411
class ItemsRelationManager extends RelationManager
1512
{

app/Filament/Resources/TagResource/Pages/ViewTag.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace App\Filament\Resources\TagResource\Pages;
44

55
use App\Filament\Resources\TagResource;
6-
use Filament\Actions;
76
use Filament\Resources\Pages\ViewRecord;
87

98
class ViewTag extends ViewRecord

app/Filament/Resources/TagResource/RelationManagers/ItemsRelationManager.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
use Filament\Forms;
77
use Filament\Forms\Form;
88
use Filament\Resources\RelationManagers\RelationManager;
9-
use Filament\Tables;
109
use Filament\Tables\Table;
11-
use Illuminate\Database\Eloquent\Builder;
12-
use Illuminate\Database\Eloquent\SoftDeletingScope;
1310

1411
class ItemsRelationManager extends RelationManager
1512
{

app/Filament/Widgets/Labels.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
use App\Filament\Resources\TagResource;
66
use App\Models\Tag;
7-
use Filament\Tables;
8-
use Filament\Tables\Columns\Layout\Stack;
97
use Filament\Tables\Table;
108
use Filament\Widgets\TableWidget as BaseWidget;
119
use Illuminate\Database\Eloquent\Builder;
@@ -30,7 +28,7 @@ public function table(Table $table): Table
3028
\Filament\Tables\Columns\Layout\View::make('filament.widgets.labels'),
3129
])
3230
->recordUrl(
33-
fn (Tag $record): string =>\App\Filament\Resources\TagResource::getUrl('view', ['record' => $record]),
31+
fn (Tag $record): string => \App\Filament\Resources\TagResource::getUrl('view', ['record' => $record]),
3432
)
3533
->paginated([
3634
'limit' => 100,

routes/web.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use App\Filament\Resources\ItemResource;
34
use Illuminate\Support\Facades\Route;
45

56
Route::get('/', function () {
@@ -27,6 +28,5 @@
2728
$asset->save();
2829
}
2930

30-
// http://127.0.0.1:8000/app/1/items/104/edit
31-
return redirect()->to('/app/'.$asset->team_id.'/items/'.$asset->id.'/edit');
31+
return redirect()->to(ItemResource::getUrl('edit', ['record' => $asset]));
3232
})->name('asset');

0 commit comments

Comments
 (0)