Skip to content

Commit

Permalink
fixed route for asset page
Browse files Browse the repository at this point in the history
  • Loading branch information
Flatroy committed Jun 25, 2024
1 parent 862207c commit 3890f2c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 21 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ Still some part are in WIP status: I need to add queue worker to docker-compose.
- [ ] Add mounting volumes for sqlite database file and storage
- [ ] Add more features
- [x] Add tags to items
- [ ] Add attachments to items - https://filamentphp.com/plugins/filament-spatie-media-library
- [ ] Show related items in Location view - https://filamentphp.com/docs/3.x/panels/resources/relation-managers#creating-a-relation-manager
- [ ] Add QR code to items
- [ ] Add attachments to items - https://filamentphp.com/plugins/filament-spatie-media-library (for now we have custom field for files and images)
- [x] Show related items in Location and Tag pages
- [x] Add QR code to items
- [x] Add multi-tenancy support - https://filamentphp.com/docs/3.x/panels/tenancy
- [ ] Fix ItemImporter to support multi-tenancy with queue. Team ID is not set up correctly for now on async driver
- [ ] Add better import/export of items with relation to locations
- [x] Add import of locations. if location by name not found it will create new one
- [ ] Support labels/tags during import
- [ ] Support attachments during import
- [ ] Support nested path exports (e.g. `Home / Office / Desk`)
- [ ] Support custom fields during import
- [x] Add better import/export of items with relation to locations
- [x] Add import of locations. if location by name not found it will create new one
- [ ] Support labels/tags during import
- [ ] Support attachments during import
- [ ] Support nested path exports (e.g. `Home / Office / Desk`)
- [ ] Support custom fields during import
- [x] Add Laravel Octane
- [ ] Add Laravel Pulse
- [x] Add nice Dashboard for home-screen
Expand All @@ -98,6 +98,7 @@ Still some part are in WIP status: I need to add queue worker to docker-compose.
- [x] Image field
- [x] Add spotlight. Click: CTRL + K or CMD + K or CTRL + / or CMD + /
- [x] Add Label Generator
- [ ] Add REST API


## Contributing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class ItemsRelationManager extends RelationManager
{
Expand Down
1 change: 0 additions & 1 deletion app/Filament/Resources/TagResource/Pages/ViewTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Filament\Resources\TagResource\Pages;

use App\Filament\Resources\TagResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;

class ViewTag extends ViewRecord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class ItemsRelationManager extends RelationManager
{
Expand Down
4 changes: 1 addition & 3 deletions app/Filament/Widgets/Labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use App\Filament\Resources\TagResource;
use App\Models\Tag;
use Filament\Tables;
use Filament\Tables\Columns\Layout\Stack;
use Filament\Tables\Table;
use Filament\Widgets\TableWidget as BaseWidget;
use Illuminate\Database\Eloquent\Builder;
Expand All @@ -30,7 +28,7 @@ public function table(Table $table): Table
\Filament\Tables\Columns\Layout\View::make('filament.widgets.labels'),
])
->recordUrl(
fn (Tag $record): string =>\App\Filament\Resources\TagResource::getUrl('view', ['record' => $record]),
fn (Tag $record): string => \App\Filament\Resources\TagResource::getUrl('view', ['record' => $record]),
)
->paginated([
'limit' => 100,
Expand Down
4 changes: 2 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use App\Filament\Resources\ItemResource;
use Illuminate\Support\Facades\Route;

Route::get('/', function () {
Expand Down Expand Up @@ -27,6 +28,5 @@
$asset->save();
}

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

0 comments on commit 3890f2c

Please sign in to comment.