Skip to content

Commit

Permalink
leaving off on the collection want to do some other work :)
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Apr 26, 2024
1 parent 64945dd commit 7e77070
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 24 deletions.
4 changes: 0 additions & 4 deletions app/Filament/Resources/CollectionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
namespace App\Filament\Resources;

use App\Filament\Resources\CollectionResource\Pages;
use App\Filament\Resources\CollectionResource\RelationManagers;
use App\Models\Collection;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class CollectionResource extends Resource
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Filament\Resources\CollectionResource\Pages;

use App\Filament\Resources\CollectionResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreateCollection extends CreateRecord
Expand Down
11 changes: 5 additions & 6 deletions app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Support\Facades\Hash;
use Rawilk\FilamentPasswordInput\Password;

class UserResource extends Resource
Expand All @@ -36,11 +35,11 @@ public static function form(Form $form): Form
->unique(ignoreRecord: true)
->required(),
Password::make('password')
->label('Password')
->copyMessage('Copied')
->copyable(color: 'warning')
->regeneratePassword(color: 'primary')
->inlineSuffix(),
->label('Password')
->copyMessage('Copied')
->copyable(color: 'warning')
->regeneratePassword(color: 'primary')
->inlineSuffix(),

Select::make('teams')
->relationship(name: 'teams', titleAttribute: 'name')
Expand Down
18 changes: 6 additions & 12 deletions app/Models/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace App\Models;

use Filament\Forms\Components\MarkdownEditor;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand All @@ -11,17 +16,6 @@
use LlmLaraHub\LlmDriver\HasDrivers;
use LlmLaraHub\TagFunction\Contracts\TaggableContract;
use LlmLaraHub\TagFunction\Helpers\Taggable;
use Filament\Forms;
use Filament\Forms\Components\MarkdownEditor;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Forms\Form;
use Filament\Notifications\Notification;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;

/**
* Class Project
Expand Down Expand Up @@ -78,7 +72,7 @@ public static function getForm($teamId = null): array
return $teamId !== null;
})
->relationship('team', 'name')
->required(),
->required(),
MarkdownEditor::make('description')
->columnSpanFull()
->label('Description')
Expand Down
3 changes: 2 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class User extends Authenticatable implements FilamentUser
'profile_photo_url',
];

public function canAccessPanel(Panel $panel): bool {
public function canAccessPanel(Panel $panel): bool
{
return $this->is_admin;
}

Expand Down

0 comments on commit 7e77070

Please sign in to comment.