This commit is contained in:
salam committed 2025-09-24 16:55:55 +02:00
1 parent 11cb9b03f5
commit 5f95289079
25 files changed
+430 -129

No files matched your search

+3
View File
@@ -7,3 +7,6 @@ a make:model ModelName -c // creates controller too
a make:model ModelName -f // also creates a factory a make:model ModelName -f // also creates a factory
a make:model ModelName -s // also creates a database seeder a make:model ModelName -s // also creates a database seeder
a make:model ModelName -mfcs // creates migration, factory, controller and seeder a make:model ModelName -mfcs // creates migration, factory, controller and seeder
a make:factory GutachterFactory
+3 -1
View File
@@ -18,4 +18,6 @@ FILAMENT
https://github.com/mollie/laravel-cashier-mollie https://github.com/mollie/laravel-cashier-mollie
https://www.cashiermollie.com/ https://www.cashiermollie.com/
https://fakerphp.org/
+1 -1
View File
@@ -6,7 +6,7 @@ use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasIcon; use Filament\Support\Contracts\HasIcon;
use Filament\Support\Contracts\HasLabel; use Filament\Support\Contracts\HasLabel;
enum ProkektStatus: string implements HasColor, HasIcon, HasLabel enum ProjektStatus: string implements HasColor, HasIcon, HasLabel
{ {
case TEST = 'test'; case TEST = 'test';
case ENTWURF = 'entwurf'; case ENTWURF = 'entwurf';
@@ -76,13 +76,7 @@ class KontosTable
TextInput::make('subject')->required(), TextInput::make('subject')->required(),
RichEditor::make('body')->required(), RichEditor::make('body')->required(),
]) ])
->action(function (array $data) { ->action(function (array $data) {}),
Mail::to($this->client)
->send(new GenericEmail(
subject: $data['subject'],
body: $data['body'],
));
}),
]); ]);
} }
} }
@@ -52,8 +52,8 @@ class ProjekteResource extends Resource
{ {
return [ return [
'index' => ListProjektes::route('/'), 'index' => ListProjektes::route('/'),
'create' => CreateProjekte::route('/create'), // 'create' => CreateProjekte::route('/create'),
'edit' => EditProjekte::route('/{record}/edit'), // 'edit' => EditProjekte::route('/{record}/edit'),
]; ];
} }
@@ -2,6 +2,12 @@
namespace App\Filament\Resources\Projektes\Schemas; namespace App\Filament\Resources\Projektes\Schemas;
use App\Enums\ProjektStatus;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema; use Filament\Schemas\Schema;
class ProjekteForm class ProjekteForm
@@ -10,7 +16,13 @@ class ProjekteForm
{ {
return $schema return $schema
->components([ ->components([
// Select::make('auftraggeber_id')->relationship(name: 'auftraggeber', titleAttribute: 'name'),
Select::make('gutachter_id')->relationship(name: 'gutachter', titleAttribute: 'name'),
Radio::make('status')->options(ProjektStatus::class),
TextInput::make('interner_name'),
TextInput::make('ofizieller_name'),
Textarea::make('beschreibung'),
DatePicker::make('erstellung')->helperText('Datum am Gutachten'),
]); ]);
} }
} }
+9
View File
@@ -3,15 +3,24 @@
namespace App\Models; namespace App\Models;
use App\Models\Scopes\KontoScope; use App\Models\Scopes\KontoScope;
use Database\Factories\GutachterFactory;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
class Gutachter extends Model class Gutachter extends Model
{ {
use HasFactory;
use SoftDeletes; use SoftDeletes;
protected static function booted(): void protected static function booted(): void
{ {
static::addGlobalScope(new KontoScope); static::addGlobalScope(new KontoScope);
} }
protected static function newFactory(): Factory
{
return GutachterFactory::new();
}
} }
+25 -17
View File
@@ -2,36 +2,44 @@
namespace App\Models; namespace App\Models;
use Database\Factories\KontoFactory;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\Relations\HasOne;
class Konto extends Model class Konto extends Model
{ {
use HasFactory;
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.
* *
* @var list<string> * @var list<string>
*/ */
protected $fillable = [ protected $fillable = [
'konto_title', 'title',
'konto_gender', 'gender',
'konto_first_name', 'first_name',
'konto_last_name', 'last_name',
'konto_company', 'company',
'konto_email', 'email',
'konto_address', 'address',
'konto_location', 'country',
'konto_plz', 'phone',
'konto_country', 'uid_number',
'konto_phone', 'agb_akzeptiert',
'konto_uid_number', 'plan_id',
'konto_agb_akzeptiert', 'guthaben',
'konto_option_id', 'gueltig_bis',
'konto_gutachten_zahl', 'abgeschlossen',
'konto_gutachten_zeit',
'konto_gutachten_abgeschlossen',
]; ];
protected static function newFactory(): Factory
{
return KontoFactory::new();
}
public function konto_option(): HasOne public function konto_option(): HasOne
{ {
return $this->hasOne(KontoOption::class, 'id', 'konto_option_id'); return $this->hasOne(KontoOption::class, 'id', 'konto_option_id');
+9 -1
View File
@@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model;
class Projekte extends Model class Projekte extends Model
{ {
// public function auftraggeber()
{
return $this->belongsTo(Auftraggeber::class);
}
public function gutachter()
{
return $this->belongsTo(Gutachter::class);
}
} }
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Auftraggeber;
use Illuminate\Auth\Access\HandlesAuthorization;
class AuftraggeberPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Auftraggeber');
}
public function view(AuthUser $authUser, Auftraggeber $auftraggeber): bool
{
return $authUser->can('View:Auftraggeber');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Auftraggeber');
}
public function update(AuthUser $authUser, Auftraggeber $auftraggeber): bool
{
return $authUser->can('Update:Auftraggeber');
}
public function delete(AuthUser $authUser, Auftraggeber $auftraggeber): bool
{
return $authUser->can('Delete:Auftraggeber');
}
public function restore(AuthUser $authUser, Auftraggeber $auftraggeber): bool
{
return $authUser->can('Restore:Auftraggeber');
}
public function forceDelete(AuthUser $authUser, Auftraggeber $auftraggeber): bool
{
return $authUser->can('ForceDelete:Auftraggeber');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Auftraggeber');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Auftraggeber');
}
public function replicate(AuthUser $authUser, Auftraggeber $auftraggeber): bool
{
return $authUser->can('Replicate:Auftraggeber');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Auftraggeber');
}
}
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Methode;
use Illuminate\Auth\Access\HandlesAuthorization;
class MethodePolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Methode');
}
public function view(AuthUser $authUser, Methode $methode): bool
{
return $authUser->can('View:Methode');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Methode');
}
public function update(AuthUser $authUser, Methode $methode): bool
{
return $authUser->can('Update:Methode');
}
public function delete(AuthUser $authUser, Methode $methode): bool
{
return $authUser->can('Delete:Methode');
}
public function restore(AuthUser $authUser, Methode $methode): bool
{
return $authUser->can('Restore:Methode');
}
public function forceDelete(AuthUser $authUser, Methode $methode): bool
{
return $authUser->can('ForceDelete:Methode');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Methode');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Methode');
}
public function replicate(AuthUser $authUser, Methode $methode): bool
{
return $authUser->can('Replicate:Methode');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Methode');
}
}
Generated
+63 -63
View File
@@ -1391,7 +1391,7 @@
}, },
{ {
"name": "filament/actions", "name": "filament/actions",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/actions.git", "url": "https://github.com/filamentphp/actions.git",
@@ -1440,16 +1440,16 @@
}, },
{ {
"name": "filament/filament", "name": "filament/filament",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/panels.git", "url": "https://github.com/filamentphp/panels.git",
"reference": "cd1f43f862df3f56468366d444781cf2294f90c6" "reference": "1d9d0fc54bfffcf649a63c13fd24fdb7598c0463"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filamentphp/panels/zipball/cd1f43f862df3f56468366d444781cf2294f90c6", "url": "https://api.github.com/repos/filamentphp/panels/zipball/1d9d0fc54bfffcf649a63c13fd24fdb7598c0463",
"reference": "cd1f43f862df3f56468366d444781cf2294f90c6", "reference": "1d9d0fc54bfffcf649a63c13fd24fdb7598c0463",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1493,20 +1493,20 @@
"issues": "https://github.com/filamentphp/filament/issues", "issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament" "source": "https://github.com/filamentphp/filament"
}, },
"time": "2025-09-21T21:07:44+00:00" "time": "2025-09-23T10:47:29+00:00"
}, },
{ {
"name": "filament/forms", "name": "filament/forms",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/forms.git", "url": "https://github.com/filamentphp/forms.git",
"reference": "b2966733b5950a3f0b6c056d647e9afc7c5a6fa6" "reference": "1f5d1af55b783a215bab9025e84b91b35428a182"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filamentphp/forms/zipball/b2966733b5950a3f0b6c056d647e9afc7c5a6fa6", "url": "https://api.github.com/repos/filamentphp/forms/zipball/1f5d1af55b783a215bab9025e84b91b35428a182",
"reference": "b2966733b5950a3f0b6c056d647e9afc7c5a6fa6", "reference": "1f5d1af55b783a215bab9025e84b91b35428a182",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1543,11 +1543,11 @@
"issues": "https://github.com/filamentphp/filament/issues", "issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament" "source": "https://github.com/filamentphp/filament"
}, },
"time": "2025-09-21T21:07:52+00:00" "time": "2025-09-23T10:47:33+00:00"
}, },
{ {
"name": "filament/infolists", "name": "filament/infolists",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/infolists.git", "url": "https://github.com/filamentphp/infolists.git",
@@ -1592,7 +1592,7 @@
}, },
{ {
"name": "filament/notifications", "name": "filament/notifications",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/notifications.git", "url": "https://github.com/filamentphp/notifications.git",
@@ -1639,16 +1639,16 @@
}, },
{ {
"name": "filament/schemas", "name": "filament/schemas",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/schemas.git", "url": "https://github.com/filamentphp/schemas.git",
"reference": "5bfa0245bd9ba110e6ae8d98d99b3718b035077e" "reference": "433a06f74e01650aa6e1b956e4c83f8d67c15ece"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/5bfa0245bd9ba110e6ae8d98d99b3718b035077e", "url": "https://api.github.com/repos/filamentphp/schemas/zipball/433a06f74e01650aa6e1b956e4c83f8d67c15ece",
"reference": "5bfa0245bd9ba110e6ae8d98d99b3718b035077e", "reference": "433a06f74e01650aa6e1b956e4c83f8d67c15ece",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1680,20 +1680,20 @@
"issues": "https://github.com/filamentphp/filament/issues", "issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament" "source": "https://github.com/filamentphp/filament"
}, },
"time": "2025-09-21T21:08:24+00:00" "time": "2025-09-23T10:47:46+00:00"
}, },
{ {
"name": "filament/support", "name": "filament/support",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/support.git", "url": "https://github.com/filamentphp/support.git",
"reference": "b9dcceb511626a92d53ef3a841921891b65d7e29" "reference": "010e779b13a2e83db362e8b625a5acb06ba3bb2b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filamentphp/support/zipball/b9dcceb511626a92d53ef3a841921891b65d7e29", "url": "https://api.github.com/repos/filamentphp/support/zipball/010e779b13a2e83db362e8b625a5acb06ba3bb2b",
"reference": "b9dcceb511626a92d53ef3a841921891b65d7e29", "reference": "010e779b13a2e83db362e8b625a5acb06ba3bb2b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1738,20 +1738,20 @@
"issues": "https://github.com/filamentphp/filament/issues", "issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament" "source": "https://github.com/filamentphp/filament"
}, },
"time": "2025-09-21T21:08:35+00:00" "time": "2025-09-23T10:47:27+00:00"
}, },
{ {
"name": "filament/tables", "name": "filament/tables",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/tables.git", "url": "https://github.com/filamentphp/tables.git",
"reference": "86fc6676f97dc50b91f6189ab02281bd8770a025" "reference": "21e803bd0d6b9a6a2dff9f85f9791eda2f721190"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filamentphp/tables/zipball/86fc6676f97dc50b91f6189ab02281bd8770a025", "url": "https://api.github.com/repos/filamentphp/tables/zipball/21e803bd0d6b9a6a2dff9f85f9791eda2f721190",
"reference": "86fc6676f97dc50b91f6189ab02281bd8770a025", "reference": "21e803bd0d6b9a6a2dff9f85f9791eda2f721190",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1783,11 +1783,11 @@
"issues": "https://github.com/filamentphp/filament/issues", "issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament" "source": "https://github.com/filamentphp/filament"
}, },
"time": "2025-09-21T21:08:11+00:00" "time": "2025-09-23T10:47:44+00:00"
}, },
{ {
"name": "filament/widgets", "name": "filament/widgets",
"version": "v4.0.19", "version": "v4.0.20",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filamentphp/widgets.git", "url": "https://github.com/filamentphp/widgets.git",
@@ -2516,16 +2516,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v12.30.1", "version": "v12.31.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "7f61e8679f9142f282a0184ac7ef9e3834bfd023" "reference": "281b711710c245dd8275d73132e92635be3094df"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/7f61e8679f9142f282a0184ac7ef9e3834bfd023", "url": "https://api.github.com/repos/laravel/framework/zipball/281b711710c245dd8275d73132e92635be3094df",
"reference": "7f61e8679f9142f282a0184ac7ef9e3834bfd023", "reference": "281b711710c245dd8275d73132e92635be3094df",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2732,20 +2732,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2025-09-18T21:07:07+00:00" "time": "2025-09-23T15:33:04+00:00"
}, },
{ {
"name": "laravel/prompts", "name": "laravel/prompts",
"version": "v0.3.6", "version": "v0.3.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/prompts.git", "url": "https://github.com/laravel/prompts.git",
"reference": "86a8b692e8661d0fb308cec64f3d176821323077" "reference": "a1891d362714bc40c8d23b0b1d7090f022ea27cc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/prompts/zipball/86a8b692e8661d0fb308cec64f3d176821323077", "url": "https://api.github.com/repos/laravel/prompts/zipball/a1891d362714bc40c8d23b0b1d7090f022ea27cc",
"reference": "86a8b692e8661d0fb308cec64f3d176821323077", "reference": "a1891d362714bc40c8d23b0b1d7090f022ea27cc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2762,8 +2762,8 @@
"illuminate/collections": "^10.0|^11.0|^12.0", "illuminate/collections": "^10.0|^11.0|^12.0",
"mockery/mockery": "^1.5", "mockery/mockery": "^1.5",
"pestphp/pest": "^2.3|^3.4", "pestphp/pest": "^2.3|^3.4",
"phpstan/phpstan": "^1.11", "phpstan/phpstan": "^1.12.28",
"phpstan/phpstan-mockery": "^1.1" "phpstan/phpstan-mockery": "^1.1.3"
}, },
"suggest": { "suggest": {
"ext-pcntl": "Required for the spinner to be animated." "ext-pcntl": "Required for the spinner to be animated."
@@ -2789,22 +2789,22 @@
"description": "Add beautiful and user-friendly forms to your command-line applications.", "description": "Add beautiful and user-friendly forms to your command-line applications.",
"support": { "support": {
"issues": "https://github.com/laravel/prompts/issues", "issues": "https://github.com/laravel/prompts/issues",
"source": "https://github.com/laravel/prompts/tree/v0.3.6" "source": "https://github.com/laravel/prompts/tree/v0.3.7"
}, },
"time": "2025-07-07T14:17:42+00:00" "time": "2025-09-19T13:47:56+00:00"
}, },
{ {
"name": "laravel/serializable-closure", "name": "laravel/serializable-closure",
"version": "v2.0.4", "version": "v2.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/serializable-closure.git", "url": "https://github.com/laravel/serializable-closure.git",
"reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841" "reference": "3832547db6e0e2f8bb03d4093857b378c66eceed"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841", "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3832547db6e0e2f8bb03d4093857b378c66eceed",
"reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841", "reference": "3832547db6e0e2f8bb03d4093857b378c66eceed",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2852,7 +2852,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues", "issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure" "source": "https://github.com/laravel/serializable-closure"
}, },
"time": "2025-03-19T13:51:03+00:00" "time": "2025-09-22T17:29:40+00:00"
}, },
{ {
"name": "laravel/tinker", "name": "laravel/tinker",
@@ -4518,16 +4518,16 @@
}, },
{ {
"name": "paragonie/constant_time_encoding", "name": "paragonie/constant_time_encoding",
"version": "v3.1.1", "version": "v3.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git", "url": "https://github.com/paragonie/constant_time_encoding.git",
"reference": "5e9b582660b997de205a84c02a3aac7c060900c9" "reference": "5bd79e0e88e8757f23e757bcedd1e37fa818cf68"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/5e9b582660b997de205a84c02a3aac7c060900c9", "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/5bd79e0e88e8757f23e757bcedd1e37fa818cf68",
"reference": "5e9b582660b997de205a84c02a3aac7c060900c9", "reference": "5bd79e0e88e8757f23e757bcedd1e37fa818cf68",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4583,7 +4583,7 @@
"issues": "https://github.com/paragonie/constant_time_encoding/issues", "issues": "https://github.com/paragonie/constant_time_encoding/issues",
"source": "https://github.com/paragonie/constant_time_encoding" "source": "https://github.com/paragonie/constant_time_encoding"
}, },
"time": "2025-09-22T21:00:33+00:00" "time": "2025-09-24T01:22:14+00:00"
}, },
{ {
"name": "phiki/phiki", "name": "phiki/phiki",
@@ -9727,16 +9727,16 @@
}, },
{ {
"name": "laravel/sail", "name": "laravel/sail",
"version": "v1.45.0", "version": "v1.46.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/sail.git", "url": "https://github.com/laravel/sail.git",
"reference": "019a2933ff4a9199f098d4259713f9bc266a874e" "reference": "eb90c4f113c4a9637b8fdd16e24cfc64f2b0ae6e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/019a2933ff4a9199f098d4259713f9bc266a874e", "url": "https://api.github.com/repos/laravel/sail/zipball/eb90c4f113c4a9637b8fdd16e24cfc64f2b0ae6e",
"reference": "019a2933ff4a9199f098d4259713f9bc266a874e", "reference": "eb90c4f113c4a9637b8fdd16e24cfc64f2b0ae6e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -9786,7 +9786,7 @@
"issues": "https://github.com/laravel/sail/issues", "issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail" "source": "https://github.com/laravel/sail"
}, },
"time": "2025-08-25T19:28:31+00:00" "time": "2025-09-23T13:44:39+00:00"
}, },
{ {
"name": "mockery/mockery", "name": "mockery/mockery",
@@ -11635,16 +11635,16 @@
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "7.0.1", "version": "7.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "b759164a8e02263784b662889cc6cbb686077af6" "reference": "016951ae10980765e4e7aee491eb288c64e505b7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/b759164a8e02263784b662889cc6cbb686077af6", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7",
"reference": "b759164a8e02263784b662889cc6cbb686077af6", "reference": "016951ae10980765e4e7aee491eb288c64e505b7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -11701,7 +11701,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues", "issues": "https://github.com/sebastianbergmann/exporter/issues",
"security": "https://github.com/sebastianbergmann/exporter/security/policy", "security": "https://github.com/sebastianbergmann/exporter/security/policy",
"source": "https://github.com/sebastianbergmann/exporter/tree/7.0.1" "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.2"
}, },
"funding": [ "funding": [
{ {
@@ -11721,7 +11721,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-09-22T05:39:29+00:00" "time": "2025-09-24T06:16:11+00:00"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
+2 -2
View File
@@ -78,11 +78,11 @@ return [
| |
*/ */
'locale' => env('APP_LOCALE', 'en'), 'locale' => env('APP_LOCALE', 'de'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), 'faker_locale' => env('APP_FAKER_LOCALE', 'de_AT'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Gutachter>
*/
class GutachterFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'konto_id' => fake()->numberBetween(1, 7),
'name' => fake()->name(),
'address' => fake()->Address(),
'country' => 'Österreich',
'phone' => fake()->PhoneNumber(),
'email' => fake()->email(),
];
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Konto>
*/
class KontoFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'title' => fake()->randomElement(['Architekt:in', 'Ziviltechniker:in']),
'gender' => fake()->randomElement(['Frau', 'Herr']),
'first_name' => fake()->firstName(),
'last_name' => fake()->lastName(),
'company' => fake()->Company(),
'email' => fake()->email(),
'address' => fake()->Address(),
'country' => 'Österreich',
'phone' => fake()->PhoneNumber(),
'uid_number' => 'ATU'.fake()->randomNumber(8, true),
'agb_akzeptiert' => 1,
'plan_id' => fake()->numberBetween(1, 3),
'guthaben' => fake()->numberBetween(4, 50),
'gueltig_bis' => fake()->dateTimeBetween('-1 month', '+5 month'),
'abgeschlossen' => fake()->numberBetween(4, 150),
];
}
}
@@ -13,23 +13,21 @@ return new class extends Migration
{ {
Schema::create('kontos', function (Blueprint $table) { Schema::create('kontos', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('konto_title')->nullable(); $table->string('title')->nullable();
$table->string('konto_gender')->nullable(); $table->string('gender')->nullable();
$table->string('konto_first_name'); $table->string('first_name');
$table->string('konto_last_name'); $table->string('last_name');
$table->string('konto_company'); $table->string('company');
$table->string('konto_email')->nullable(); $table->string('email')->nullable();
$table->string('konto_address')->nullable(); $table->string('address')->nullable();
$table->string('konto_location')->nullable(); $table->string('country')->nullable();
$table->string('konto_plz')->nullable(); $table->string('phone')->nullable();
$table->string('konto_country')->nullable(); $table->string('uid_number')->nullable();
$table->string('konto_phone')->nullable(); $table->boolean('agb_akzeptiert')->default(false);
$table->string('konto_uid_number')->nullable(); $table->string('plan_id')->default(1);
$table->boolean('konto_agb_akzeptiert')->default(false); $table->string('guthaben')->default(0);
$table->string('konto_option_id')->default(1); $table->timestamp('gueltig_bis')->nullable();
$table->string('konto_gutachten_zahl')->default(0); $table->string('abgeschlossen')->default(1);
$table->timestamp('konto_gutachten_zeit')->nullable();
$table->string('konto_gutachten_abgeschlossen')->default(1);
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -13,13 +13,13 @@ return new class extends Migration
{ {
Schema::create('gutachters', function (Blueprint $table) { Schema::create('gutachters', function (Blueprint $table) {
$table->id(); $table->id();
$table->integer('konto_id'); $table->foreignId('konto_id')->constrained();
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->string('logo')->nullable(); $table->string('logo')->nullable();
$table->string('address')->nullable(); $table->string('address')->nullable();
$table->string('location')->nullable(); $table->string('country')->nullable();
$table->string('code')->nullable();
$table->string('phone')->nullable(); $table->string('phone')->nullable();
$table->string('email')->nullable();
$table->timestamp('deleted_at')->nullable(); $table->timestamp('deleted_at')->nullable();
$table->timestamps(); $table->timestamps();
}); });
@@ -11,13 +11,13 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::create('konto_options', function (Blueprint $table) { Schema::create('plans', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->string('description')->nullable(); $table->string('description')->nullable();
$table->integer('number_user')->default(1); $table->integer('number_user')->default(1);
$table->integer('number_gutachter')->default(1); $table->integer('number_gutachter')->default(1);
$table->integer('payment_plan_id')->default(1); $table->integer('payment_id')->default(1);
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -11,7 +11,7 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::create('payment_plans', function (Blueprint $table) { Schema::create('payments', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->string('description')->nullable(); $table->string('description')->nullable();
@@ -24,6 +24,6 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('payment_plans'); Schema::dropIfExists('payments');
} }
}; };
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('titels', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('titels');
}
};
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('genders', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('genders');
}
};
+12 -6
View File
@@ -2,6 +2,8 @@
namespace Database\Seeders; namespace Database\Seeders;
use App\Models\Gutachter;
use App\Models\Konto;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
@@ -11,11 +13,15 @@ class DatabaseSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
$this->call([ Konto::factory()->count(10)->create();
KontoSeeder::class,
RolesAndPermissionsSeeder::class, // Gutachter::factory()->create(30);
KontoOptionSeeder::class,
OrientierungenSeeder::class, // $this->call([
]); // OrientierungenSeeder::class,
// KontoOptionSeeder::class,
// RolesAndPermissionsSeeder::class,
// ]);
} }
} }
+2 -2
View File
@@ -12,7 +12,7 @@ class KontoOptionSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
$sql = "INSERT INTO `payment_plans` (`id`, `name`) $sql = "INSERT INTO `payments` (`id`, `name`)
VALUES VALUES
('1', 'Pro Gutachten'), ('1', 'Pro Gutachten'),
('2', 'Monatlich'), ('2', 'Monatlich'),
@@ -20,7 +20,7 @@ class KontoOptionSeeder extends Seeder
"; ";
DB::unprepared($sql); DB::unprepared($sql);
$sql = "INSERT INTO `konto_options` (`id`, `name`, `description`, `number_user`, `number_gutachter`, `payment_plan_id`, `created_at`, `updated_at`) $sql = "INSERT INTO `plans` (`id`, `name`, `description`, `number_user`, `number_gutachter`, `payment_id`, `created_at`, `updated_at`)
VALUES VALUES
('1', 'Basic', 'Basis Version für einen Benutzer und einem Gutacher.', '1', '1', '1', NULL, NULL), ('1', 'Basic', 'Basis Version für einen Benutzer und einem Gutacher.', '1', '1', '1', NULL, NULL),
('2', 'Erweitert', 'Premium Version für 3 Benutzer und 3 Gutacher.', '3', '3', '2', NULL, NULL), ('2', 'Erweitert', 'Premium Version für 3 Benutzer und 3 Gutacher.', '3', '3', '2', NULL, NULL),
@@ -1 +1 @@
var tt=Math.min,V=Math.max,et=Math.round;var E=i=>({x:i,y:i}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"},Qt={start:"end",end:"start"};function mt(i,t,e){return V(i,tt(t,e))}function it(i,t){return typeof i=="function"?i(t):i}function W(i){return i.split("-")[0]}function st(i){return i.split("-")[1]}function gt(i){return i==="x"?"y":"x"}function bt(i){return i==="y"?"height":"width"}var Zt=new Set(["top","bottom"]);function P(i){return Zt.has(W(i))?"y":"x"}function wt(i){return gt(P(i))}function Ot(i,t,e){e===void 0&&(e=!1);let s=st(i),n=wt(i),o=bt(n),r=n==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Z(r)),[r,Z(r)]}function At(i){let t=Z(i);return[lt(i),t,lt(t)]}function lt(i){return i.replace(/start|end/g,t=>Qt[t])}var vt=["left","right"],Lt=["right","left"],te=["top","bottom"],ee=["bottom","top"];function ie(i,t,e){switch(i){case"top":case"bottom":return e?t?Lt:vt:t?vt:Lt;case"left":case"right":return t?te:ee;default:return[]}}function St(i,t,e,s){let n=st(i),o=ie(W(i),e==="start",s);return n&&(o=o.map(r=>r+"-"+n),t&&(o=o.concat(o.map(lt)))),o}function Z(i){return i.replace(/left|right|bottom|top/g,t=>Gt[t])}function se(i){return{top:0,right:0,bottom:0,left:0,...i}}function Ct(i){return typeof i!="number"?se(i):{top:i,right:i,bottom:i,left:i}}function U(i){let{x:t,y:e,width:s,height:n}=i;return{width:s,height:n,top:e,left:t,right:t+s,bottom:e+n,x:t,y:e}}function Dt(i,t,e){let{reference:s,floating:n}=i,o=P(t),r=wt(t),l=bt(r),a=W(t),c=o==="y",d=s.x+s.width/2-n.width/2,h=s.y+s.height/2-n.height/2,p=s[l]/2-n[l]/2,f;switch(a){case"top":f={x:d,y:s.y-n.height};break;case"bottom":f={x:d,y:s.y+s.height};break;case"right":f={x:s.x+s.width,y:h};break;case"left":f={x:s.x-n.width,y:h};break;default:f={x:s.x,y:s.y}}switch(st(t)){case"start":f[r]-=p*(e&&c?-1:1);break;case"end":f[r]+=p*(e&&c?-1:1);break}return f}var Et=async(i,t,e)=>{let{placement:s="bottom",strategy:n="absolute",middleware:o=[],platform:r}=e,l=o.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:n}),{x:d,y:h}=Dt(c,s,a),p=s,f={},u=0;for(let m=0;m<l.length;m++){let{name:g,fn:y}=l[m],{x:b,y:v,data:L,reset:x}=await y({x:d,y:h,initialPlacement:s,placement:p,strategy:n,middlewareData:f,rects:c,platform:r,elements:{reference:i,floating:t}});d=b??d,h=v??h,f={...f,[g]:{...f[g],...L}},x&&u<=50&&(u++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:n}):x.rects),{x:d,y:h}=Dt(c,p,a)),m=-1)}return{x:d,y:h,placement:p,strategy:n,middlewareData:f}};async function yt(i,t){var e;t===void 0&&(t={});let{x:s,y:n,platform:o,rects:r,elements:l,strategy:a}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=it(t,i),u=Ct(f),g=l[p?h==="floating"?"reference":"floating":h],y=U(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:a})),b=h==="floating"?{x:s,y:n,width:r.floating.width,height:r.floating.height}:r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),L=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},x=U(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:a}):b);return{top:(y.top-x.top+u.top)/L.y,bottom:(x.bottom-y.bottom+u.bottom)/L.y,left:(y.left-x.left+u.left)/L.x,right:(x.right-y.right+u.right)/L.x}}var Rt=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,s;let{placement:n,middlewareData:o,rects:r,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:m=!0,...g}=it(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=W(n),b=P(l),v=W(l)===l,L=await(a.isRTL==null?void 0:a.isRTL(c.floating)),x=p||(v||!m?[Z(l)]:At(l)),q=u!=="none";!p&&q&&x.push(...St(l,m,u,L));let Q=[l,...x],$=await yt(t,g),F=[],I=((s=o.flip)==null?void 0:s.overflows)||[];if(d&&F.push($[y]),h){let A=Ot(n,r,L);F.push($[A[0]],$[A[1]])}if(I=[...I,{placement:n,overflows:F}],!F.every(A=>A<=0)){var J,j;let A=(((J=o.flip)==null?void 0:J.index)||0)+1,T=Q[A];if(T&&(!(h==="alignment"?b!==P(T):!1)||I.every(D=>P(D.placement)===b?D.overflows[0]>0:!0)))return{data:{index:A,overflows:I},reset:{placement:T}};let z=(j=I.filter(M=>M.overflows[0]<=0).sort((M,D)=>M.overflows[1]-D.overflows[1])[0])==null?void 0:j.placement;if(!z)switch(f){case"bestFit":{var X;let M=(X=I.filter(D=>{if(q){let H=P(D.placement);return H===b||H==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(H=>H>0).reduce((H,Yt)=>H+Yt,0)]).sort((D,H)=>D[Line truncated var tt=Math.min,V=Math.max,et=Math.round;var E=s=>({x:s,y:s}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"},Qt={start:"end",end:"start"};function mt(s,t,e){return V(s,tt(t,e))}function it(s,t){return typeof s=="function"?s(t):s}function z(s){return s.split("-")[0]}function st(s){return s.split("-")[1]}function gt(s){return s==="x"?"y":"x"}function bt(s){return s==="y"?"height":"width"}var Zt=new Set(["top","bottom"]);function M(s){return Zt.has(z(s))?"y":"x"}function wt(s){return gt(M(s))}function Ot(s,t,e){e===void 0&&(e=!1);let i=st(s),n=wt(s),o=bt(n),r=n==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Z(r)),[r,Z(r)]}function At(s){let t=Z(s);return[lt(s),t,lt(t)]}function lt(s){return s.replace(/start|end/g,t=>Qt[t])}var Lt=["left","right"],vt=["right","left"],te=["top","bottom"],ee=["bottom","top"];function ie(s,t,e){switch(s){case"top":case"bottom":return e?t?vt:Lt:t?Lt:vt;case"left":case"right":return t?te:ee;default:return[]}}function St(s,t,e,i){let n=st(s),o=ie(z(s),e==="start",i);return n&&(o=o.map(r=>r+"-"+n),t&&(o=o.concat(o.map(lt)))),o}function Z(s){return s.replace(/left|right|bottom|top/g,t=>Gt[t])}function se(s){return{top:0,right:0,bottom:0,left:0,...s}}function Ct(s){return typeof s!="number"?se(s):{top:s,right:s,bottom:s,left:s}}function U(s){let{x:t,y:e,width:i,height:n}=s;return{width:i,height:n,top:e,left:t,right:t+i,bottom:e+n,x:t,y:e}}function Dt(s,t,e){let{reference:i,floating:n}=s,o=M(t),r=wt(t),l=bt(r),a=z(t),c=o==="y",d=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,p=i[l]/2-n[l]/2,f;switch(a){case"top":f={x:d,y:i.y-n.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:h};break;case"left":f={x:i.x-n.width,y:h};break;default:f={x:i.x,y:i.y}}switch(st(t)){case"start":f[r]-=p*(e&&c?-1:1);break;case"end":f[r]+=p*(e&&c?-1:1);break}return f}var Et=async(s,t,e)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:r}=e,l=o.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:s,floating:t,strategy:n}),{x:d,y:h}=Dt(c,i,a),p=i,f={},u=0;for(let m=0;m<l.length;m++){let{name:g,fn:y}=l[m],{x:b,y:L,data:v,reset:x}=await y({x:d,y:h,initialPlacement:i,placement:p,strategy:n,middlewareData:f,rects:c,platform:r,elements:{reference:s,floating:t}});d=b??d,h=L??h,f={...f,[g]:{...f[g],...v}},x&&u<=50&&(u++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await r.getElementRects({reference:s,floating:t,strategy:n}):x.rects),{x:d,y:h}=Dt(c,p,a)),m=-1)}return{x:d,y:h,placement:p,strategy:n,middlewareData:f}};async function yt(s,t){var e;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:r,elements:l,strategy:a}=s,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=it(t,s),u=Ct(f),g=l[p?h==="floating"?"reference":"floating":h],y=U(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:a})),b=h==="floating"?{x:i,y:n,width:r.floating.width,height:r.floating.height}:r.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),v=await(o.isElement==null?void 0:o.isElement(L))?await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1}:{x:1,y:1},x=U(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:L,strategy:a}):b);return{top:(y.top-x.top+u.top)/v.y,bottom:(x.bottom-y.bottom+u.bottom)/v.y,left:(y.left-x.left+u.left)/v.x,right:(x.right-y.right+u.right)/v.x}}var Rt=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(t){var e,i;let{placement:n,middlewareData:o,rects:r,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:m=!0,...g}=it(s,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=z(n),b=M(l),L=z(l)===l,v=await(a.isRTL==null?void 0:a.isRTL(c.floating)),x=p||(L||!m?[Z(l)]:At(l)),q=u!=="none";!p&&q&&x.push(...St(l,m,u,v));let Q=[l,...x],W=await yt(t,g),F=[],I=((i=o.flip)==null?void 0:i.overflows)||[];if(d&&F.push(W[y]),h){let A=Ot(n,r,v);F.push(W[A[0]],W[A[1]])}if(I=[...I,{placement:n,overflows:F}],!F.every(A=>A<=0)){var J,j;let A=(((J=o.flip)==null?void 0:J.index)||0)+1,T=Q[A];if(T&&(!(h==="alignment"?b!==M(T):!1)||I.every(D=>M(D.placement)===b?D.overflows[0]>0:!0)))return{data:{index:A,overflows:I},reset:{placement:T}};let $=(j=I.filter(P=>P.overflows[0]<=0).sort((P,D)=>P.overflows[1]-D.overflows[1])[0])==null?void 0:j.placement;if(!$)switch(f){case"bestFit":{var X;let P=(X=I.filter(D=>{if(q){let H=M(D.placement);return H===b||H==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(H=>H>0).reduce((H,Yt)=>H+Yt,0)]).sort((D,H)=>D[Line truncated
@@ -1 +1 @@
var tt=Math.min,$=Math.max,et=Math.round;var T=i=>({x:i,y:i}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"},Qt={start:"end",end:"start"};function mt(i,t,e){return $(i,tt(t,e))}function it(i,t){return typeof i=="function"?i(t):i}function z(i){return i.split("-")[0]}function st(i){return i.split("-")[1]}function gt(i){return i==="x"?"y":"x"}function bt(i){return i==="y"?"height":"width"}var Zt=new Set(["top","bottom"]);function B(i){return Zt.has(z(i))?"y":"x"}function wt(i){return gt(B(i))}function Ot(i,t,e){e===void 0&&(e=!1);let s=st(i),n=wt(i),o=bt(n),r=n==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Z(r)),[r,Z(r)]}function At(i){let t=Z(i);return[lt(i),t,lt(t)]}function lt(i){return i.replace(/start|end/g,t=>Qt[t])}var vt=["left","right"],Lt=["right","left"],te=["top","bottom"],ee=["bottom","top"];function ie(i,t,e){switch(i){case"top":case"bottom":return e?t?Lt:vt:t?vt:Lt;case"left":case"right":return t?te:ee;default:return[]}}function St(i,t,e,s){let n=st(i),o=ie(z(i),e==="start",s);return n&&(o=o.map(r=>r+"-"+n),t&&(o=o.concat(o.map(lt)))),o}function Z(i){return i.replace(/left|right|bottom|top/g,t=>Gt[t])}function se(i){return{top:0,right:0,bottom:0,left:0,...i}}function Ct(i){return typeof i!="number"?se(i):{top:i,right:i,bottom:i,left:i}}function U(i){let{x:t,y:e,width:s,height:n}=i;return{width:s,height:n,top:e,left:t,right:t+s,bottom:e+n,x:t,y:e}}function Dt(i,t,e){let{reference:s,floating:n}=i,o=B(t),r=wt(t),l=bt(r),a=z(t),c=o==="y",d=s.x+s.width/2-n.width/2,h=s.y+s.height/2-n.height/2,p=s[l]/2-n[l]/2,f;switch(a){case"top":f={x:d,y:s.y-n.height};break;case"bottom":f={x:d,y:s.y+s.height};break;case"right":f={x:s.x+s.width,y:h};break;case"left":f={x:s.x-n.width,y:h};break;default:f={x:s.x,y:s.y}}switch(st(t)){case"start":f[r]-=p*(e&&c?-1:1);break;case"end":f[r]+=p*(e&&c?-1:1);break}return f}var Et=async(i,t,e)=>{let{placement:s="bottom",strategy:n="absolute",middleware:o=[],platform:r}=e,l=o.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:n}),{x:d,y:h}=Dt(c,s,a),p=s,f={},u=0;for(let m=0;m<l.length;m++){let{name:g,fn:y}=l[m],{x:b,y:v,data:O,reset:x}=await y({x:d,y:h,initialPlacement:s,placement:p,strategy:n,middlewareData:f,rects:c,platform:r,elements:{reference:i,floating:t}});d=b??d,h=v??h,f={...f,[g]:{...f[g],...O}},x&&u<=50&&(u++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:n}):x.rects),{x:d,y:h}=Dt(c,p,a)),m=-1)}return{x:d,y:h,placement:p,strategy:n,middlewareData:f}};async function yt(i,t){var e;t===void 0&&(t={});let{x:s,y:n,platform:o,rects:r,elements:l,strategy:a}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=it(t,i),u=Ct(f),g=l[p?h==="floating"?"reference":"floating":h],y=U(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:a})),b=h==="floating"?{x:s,y:n,width:r.floating.width,height:r.floating.height}:r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),O=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},x=U(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:a}):b);return{top:(y.top-x.top+u.top)/O.y,bottom:(x.bottom-y.bottom+u.bottom)/O.y,left:(y.left-x.left+u.left)/O.x,right:(x.right-y.right+u.right)/O.x}}var Rt=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,s;let{placement:n,middlewareData:o,rects:r,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:m=!0,...g}=it(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=z(n),b=B(l),v=z(l)===l,O=await(a.isRTL==null?void 0:a.isRTL(c.floating)),x=p||(v||!m?[Z(l)]:At(l)),q=u!=="none";!p&&q&&x.push(...St(l,m,u,O));let Y=[l,...x],W=await yt(t,g),L=[],S=((s=o.flip)==null?void 0:s.overflows)||[];if(d&&L.push(W[y]),h){let E=Ot(n,r,O);L.push(W[E[0]],W[E[1]])}if(S=[...S,{placement:n,overflows:L}],!L.every(E=>E<=0)){var H,G;let E=(((H=o.flip)==null?void 0:H.index)||0)+1,J=Y[E];if(J&&(!(h==="alignment"?b!==B(J):!1)||S.every(I=>B(I.placement)===b?I.overflows[0]>0:!0)))return{data:{index:E,overflows:S},reset:{placement:J}};let R=(G=S.filter(P=>P.overflows[0]<=0).sort((P,I)=>P.overflows[1]-I.overflows[1])[0])==null?void 0:G.placement;if(!R)switch(f){case"bestFit":{var Q;let P=(Q=S.filter(I=>{if(q){let V=B(I.placement);return V===b||V==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(V=>V>0).reduce((V,Yt)=>V+Yt,0)]).sort((I,V)=>I[Line truncated var tt=Math.min,$=Math.max,et=Math.round;var T=s=>({x:s,y:s}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"},Qt={start:"end",end:"start"};function mt(s,t,e){return $(s,tt(t,e))}function it(s,t){return typeof s=="function"?s(t):s}function z(s){return s.split("-")[0]}function st(s){return s.split("-")[1]}function gt(s){return s==="x"?"y":"x"}function bt(s){return s==="y"?"height":"width"}var Zt=new Set(["top","bottom"]);function B(s){return Zt.has(z(s))?"y":"x"}function wt(s){return gt(B(s))}function Ot(s,t,e){e===void 0&&(e=!1);let i=st(s),n=wt(s),o=bt(n),r=n==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Z(r)),[r,Z(r)]}function At(s){let t=Z(s);return[lt(s),t,lt(t)]}function lt(s){return s.replace(/start|end/g,t=>Qt[t])}var vt=["left","right"],Lt=["right","left"],te=["top","bottom"],ee=["bottom","top"];function ie(s,t,e){switch(s){case"top":case"bottom":return e?t?Lt:vt:t?vt:Lt;case"left":case"right":return t?te:ee;default:return[]}}function St(s,t,e,i){let n=st(s),o=ie(z(s),e==="start",i);return n&&(o=o.map(r=>r+"-"+n),t&&(o=o.concat(o.map(lt)))),o}function Z(s){return s.replace(/left|right|bottom|top/g,t=>Gt[t])}function se(s){return{top:0,right:0,bottom:0,left:0,...s}}function Ct(s){return typeof s!="number"?se(s):{top:s,right:s,bottom:s,left:s}}function U(s){let{x:t,y:e,width:i,height:n}=s;return{width:i,height:n,top:e,left:t,right:t+i,bottom:e+n,x:t,y:e}}function Dt(s,t,e){let{reference:i,floating:n}=s,o=B(t),r=wt(t),l=bt(r),a=z(t),c=o==="y",d=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,u=i[l]/2-n[l]/2,f;switch(a){case"top":f={x:d,y:i.y-n.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:h};break;case"left":f={x:i.x-n.width,y:h};break;default:f={x:i.x,y:i.y}}switch(st(t)){case"start":f[r]-=u*(e&&c?-1:1);break;case"end":f[r]+=u*(e&&c?-1:1);break}return f}var Et=async(s,t,e)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:r}=e,l=o.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:s,floating:t,strategy:n}),{x:d,y:h}=Dt(c,i,a),u=i,f={},p=0;for(let m=0;m<l.length;m++){let{name:g,fn:y}=l[m],{x:b,y:v,data:O,reset:x}=await y({x:d,y:h,initialPlacement:i,placement:u,strategy:n,middlewareData:f,rects:c,platform:r,elements:{reference:s,floating:t}});d=b??d,h=v??h,f={...f,[g]:{...f[g],...O}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(u=x.placement),x.rects&&(c=x.rects===!0?await r.getElementRects({reference:s,floating:t,strategy:n}):x.rects),{x:d,y:h}=Dt(c,u,a)),m=-1)}return{x:d,y:h,placement:u,strategy:n,middlewareData:f}};async function yt(s,t){var e;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:r,elements:l,strategy:a}=s,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:f=0}=it(t,s),p=Ct(f),g=l[u?h==="floating"?"reference":"floating":h],y=U(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:a})),b=h==="floating"?{x:i,y:n,width:r.floating.width,height:r.floating.height}:r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),O=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},x=U(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:a}):b);return{top:(y.top-x.top+p.top)/O.y,bottom:(x.bottom-y.bottom+p.bottom)/O.y,left:(y.left-x.left+p.left)/O.x,right:(x.right-y.right+p.right)/O.x}}var Rt=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(t){var e,i;let{placement:n,middlewareData:o,rects:r,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=it(s,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=z(n),b=B(l),v=z(l)===l,O=await(a.isRTL==null?void 0:a.isRTL(c.floating)),x=u||(v||!m?[Z(l)]:At(l)),q=p!=="none";!u&&q&&x.push(...St(l,m,p,O));let Y=[l,...x],W=await yt(t,g),L=[],S=((i=o.flip)==null?void 0:i.overflows)||[];if(d&&L.push(W[y]),h){let E=Ot(n,r,O);L.push(W[E[0]],W[E[1]])}if(S=[...S,{placement:n,overflows:L}],!L.every(E=>E<=0)){var H,G;let E=(((H=o.flip)==null?void 0:H.index)||0)+1,J=Y[E];if(J&&(!(h==="alignment"?b!==B(J):!1)||S.every(I=>B(I.placement)===b?I.overflows[0]>0:!0)))return{data:{index:E,overflows:S},reset:{placement:J}};let R=(G=S.filter(M=>M.overflows[0]<=0).sort((M,I)=>M.overflows[1]-I.overflows[1])[0])==null?void 0:G.placement;if(!R)switch(f){case"bestFit":{var Q;let M=(Q=S.filter(I=>{if(q){let V=B(I.placement);return V===b||V==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(V=>V>0).reduce((V,Yt)=>V+Yt,0)]).sort((I,V)=>I[Line truncated