faker
This commit is contained in:
1 parent
11cb9b03f5
commit
5f95289079
25 files changed
+430
-129
No files matched your search
@@ -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 -s // also creates a database seeder
|
||||
a make:model ModelName -mfcs // creates migration, factory, controller and seeder
|
||||
|
||||
|
||||
a make:factory GutachterFactory
|
||||
+3
-1
@@ -18,4 +18,6 @@ FILAMENT
|
||||
|
||||
|
||||
https://github.com/mollie/laravel-cashier-mollie
|
||||
https://www.cashiermollie.com/
|
||||
https://www.cashiermollie.com/
|
||||
|
||||
https://fakerphp.org/
|
||||
@@ -6,7 +6,7 @@ use Filament\Support\Contracts\HasColor;
|
||||
use Filament\Support\Contracts\HasIcon;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
enum ProkektStatus: string implements HasColor, HasIcon, HasLabel
|
||||
enum ProjektStatus: string implements HasColor, HasIcon, HasLabel
|
||||
{
|
||||
case TEST = 'test';
|
||||
case ENTWURF = 'entwurf';
|
||||
|
||||
@@ -76,13 +76,7 @@ class KontosTable
|
||||
TextInput::make('subject')->required(),
|
||||
RichEditor::make('body')->required(),
|
||||
])
|
||||
->action(function (array $data) {
|
||||
Mail::to($this->client)
|
||||
->send(new GenericEmail(
|
||||
subject: $data['subject'],
|
||||
body: $data['body'],
|
||||
));
|
||||
}),
|
||||
->action(function (array $data) {}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -52,8 +52,8 @@ class ProjekteResource extends Resource
|
||||
{
|
||||
return [
|
||||
'index' => ListProjektes::route('/'),
|
||||
'create' => CreateProjekte::route('/create'),
|
||||
'edit' => EditProjekte::route('/{record}/edit'),
|
||||
// 'create' => CreateProjekte::route('/create'),
|
||||
// 'edit' => EditProjekte::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
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;
|
||||
|
||||
class ProjekteForm
|
||||
@@ -10,7 +16,13 @@ class ProjekteForm
|
||||
{
|
||||
return $schema
|
||||
->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'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,24 @@
|
||||
namespace App\Models;
|
||||
|
||||
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\SoftDeletes;
|
||||
|
||||
class Gutachter extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::addGlobalScope(new KontoScope);
|
||||
}
|
||||
|
||||
protected static function newFactory(): Factory
|
||||
{
|
||||
return GutachterFactory::new();
|
||||
}
|
||||
}
|
||||
+25
-17
@@ -2,36 +2,44 @@
|
||||
|
||||
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\Relations\HasOne;
|
||||
|
||||
class Konto extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'konto_title',
|
||||
'konto_gender',
|
||||
'konto_first_name',
|
||||
'konto_last_name',
|
||||
'konto_company',
|
||||
'konto_email',
|
||||
'konto_address',
|
||||
'konto_location',
|
||||
'konto_plz',
|
||||
'konto_country',
|
||||
'konto_phone',
|
||||
'konto_uid_number',
|
||||
'konto_agb_akzeptiert',
|
||||
'konto_option_id',
|
||||
'konto_gutachten_zahl',
|
||||
'konto_gutachten_zeit',
|
||||
'konto_gutachten_abgeschlossen',
|
||||
'title',
|
||||
'gender',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'company',
|
||||
'email',
|
||||
'address',
|
||||
'country',
|
||||
'phone',
|
||||
'uid_number',
|
||||
'agb_akzeptiert',
|
||||
'plan_id',
|
||||
'guthaben',
|
||||
'gueltig_bis',
|
||||
'abgeschlossen',
|
||||
];
|
||||
|
||||
protected static function newFactory(): Factory
|
||||
{
|
||||
return KontoFactory::new();
|
||||
}
|
||||
|
||||
public function konto_option(): HasOne
|
||||
{
|
||||
return $this->hasOne(KontoOption::class, 'id', 'konto_option_id');
|
||||
|
||||
@@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Projekte extends Model
|
||||
{
|
||||
//
|
||||
public function auftraggeber()
|
||||
{
|
||||
return $this->belongsTo(Auftraggeber::class);
|
||||
}
|
||||
|
||||
public function gutachter()
|
||||
{
|
||||
return $this->belongsTo(Gutachter::class);
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
@@ -1391,7 +1391,7 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/actions",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/actions.git",
|
||||
@@ -1440,16 +1440,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/filament",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/panels.git",
|
||||
"reference": "cd1f43f862df3f56468366d444781cf2294f90c6"
|
||||
"reference": "1d9d0fc54bfffcf649a63c13fd24fdb7598c0463"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/cd1f43f862df3f56468366d444781cf2294f90c6",
|
||||
"reference": "cd1f43f862df3f56468366d444781cf2294f90c6",
|
||||
"url": "https://api.github.com/repos/filamentphp/panels/zipball/1d9d0fc54bfffcf649a63c13fd24fdb7598c0463",
|
||||
"reference": "1d9d0fc54bfffcf649a63c13fd24fdb7598c0463",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1493,20 +1493,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"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",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/forms.git",
|
||||
"reference": "b2966733b5950a3f0b6c056d647e9afc7c5a6fa6"
|
||||
"reference": "1f5d1af55b783a215bab9025e84b91b35428a182"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/b2966733b5950a3f0b6c056d647e9afc7c5a6fa6",
|
||||
"reference": "b2966733b5950a3f0b6c056d647e9afc7c5a6fa6",
|
||||
"url": "https://api.github.com/repos/filamentphp/forms/zipball/1f5d1af55b783a215bab9025e84b91b35428a182",
|
||||
"reference": "1f5d1af55b783a215bab9025e84b91b35428a182",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1543,11 +1543,11 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"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",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/infolists.git",
|
||||
@@ -1592,7 +1592,7 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/notifications",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/notifications.git",
|
||||
@@ -1639,16 +1639,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filament/schemas",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/schemas.git",
|
||||
"reference": "5bfa0245bd9ba110e6ae8d98d99b3718b035077e"
|
||||
"reference": "433a06f74e01650aa6e1b956e4c83f8d67c15ece"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/5bfa0245bd9ba110e6ae8d98d99b3718b035077e",
|
||||
"reference": "5bfa0245bd9ba110e6ae8d98d99b3718b035077e",
|
||||
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/433a06f74e01650aa6e1b956e4c83f8d67c15ece",
|
||||
"reference": "433a06f74e01650aa6e1b956e4c83f8d67c15ece",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1680,20 +1680,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"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",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/support.git",
|
||||
"reference": "b9dcceb511626a92d53ef3a841921891b65d7e29"
|
||||
"reference": "010e779b13a2e83db362e8b625a5acb06ba3bb2b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/b9dcceb511626a92d53ef3a841921891b65d7e29",
|
||||
"reference": "b9dcceb511626a92d53ef3a841921891b65d7e29",
|
||||
"url": "https://api.github.com/repos/filamentphp/support/zipball/010e779b13a2e83db362e8b625a5acb06ba3bb2b",
|
||||
"reference": "010e779b13a2e83db362e8b625a5acb06ba3bb2b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1738,20 +1738,20 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"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",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/tables.git",
|
||||
"reference": "86fc6676f97dc50b91f6189ab02281bd8770a025"
|
||||
"reference": "21e803bd0d6b9a6a2dff9f85f9791eda2f721190"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/86fc6676f97dc50b91f6189ab02281bd8770a025",
|
||||
"reference": "86fc6676f97dc50b91f6189ab02281bd8770a025",
|
||||
"url": "https://api.github.com/repos/filamentphp/tables/zipball/21e803bd0d6b9a6a2dff9f85f9791eda2f721190",
|
||||
"reference": "21e803bd0d6b9a6a2dff9f85f9791eda2f721190",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1783,11 +1783,11 @@
|
||||
"issues": "https://github.com/filamentphp/filament/issues",
|
||||
"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",
|
||||
"version": "v4.0.19",
|
||||
"version": "v4.0.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filamentphp/widgets.git",
|
||||
@@ -2516,16 +2516,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v12.30.1",
|
||||
"version": "v12.31.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "7f61e8679f9142f282a0184ac7ef9e3834bfd023"
|
||||
"reference": "281b711710c245dd8275d73132e92635be3094df"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/7f61e8679f9142f282a0184ac7ef9e3834bfd023",
|
||||
"reference": "7f61e8679f9142f282a0184ac7ef9e3834bfd023",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/281b711710c245dd8275d73132e92635be3094df",
|
||||
"reference": "281b711710c245dd8275d73132e92635be3094df",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2732,20 +2732,20 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"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",
|
||||
"version": "v0.3.6",
|
||||
"version": "v0.3.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/prompts.git",
|
||||
"reference": "86a8b692e8661d0fb308cec64f3d176821323077"
|
||||
"reference": "a1891d362714bc40c8d23b0b1d7090f022ea27cc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/86a8b692e8661d0fb308cec64f3d176821323077",
|
||||
"reference": "86a8b692e8661d0fb308cec64f3d176821323077",
|
||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/a1891d362714bc40c8d23b0b1d7090f022ea27cc",
|
||||
"reference": "a1891d362714bc40c8d23b0b1d7090f022ea27cc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2762,8 +2762,8 @@
|
||||
"illuminate/collections": "^10.0|^11.0|^12.0",
|
||||
"mockery/mockery": "^1.5",
|
||||
"pestphp/pest": "^2.3|^3.4",
|
||||
"phpstan/phpstan": "^1.11",
|
||||
"phpstan/phpstan-mockery": "^1.1"
|
||||
"phpstan/phpstan": "^1.12.28",
|
||||
"phpstan/phpstan-mockery": "^1.1.3"
|
||||
},
|
||||
"suggest": {
|
||||
"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.",
|
||||
"support": {
|
||||
"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",
|
||||
"version": "v2.0.4",
|
||||
"version": "v2.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/serializable-closure.git",
|
||||
"reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841"
|
||||
"reference": "3832547db6e0e2f8bb03d4093857b378c66eceed"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841",
|
||||
"reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841",
|
||||
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3832547db6e0e2f8bb03d4093857b378c66eceed",
|
||||
"reference": "3832547db6e0e2f8bb03d4093857b378c66eceed",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2852,7 +2852,7 @@
|
||||
"issues": "https://github.com/laravel/serializable-closure/issues",
|
||||
"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",
|
||||
@@ -4518,16 +4518,16 @@
|
||||
},
|
||||
{
|
||||
"name": "paragonie/constant_time_encoding",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/constant_time_encoding.git",
|
||||
"reference": "5e9b582660b997de205a84c02a3aac7c060900c9"
|
||||
"reference": "5bd79e0e88e8757f23e757bcedd1e37fa818cf68"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/5e9b582660b997de205a84c02a3aac7c060900c9",
|
||||
"reference": "5e9b582660b997de205a84c02a3aac7c060900c9",
|
||||
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/5bd79e0e88e8757f23e757bcedd1e37fa818cf68",
|
||||
"reference": "5bd79e0e88e8757f23e757bcedd1e37fa818cf68",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4583,7 +4583,7 @@
|
||||
"issues": "https://github.com/paragonie/constant_time_encoding/issues",
|
||||
"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",
|
||||
@@ -9727,16 +9727,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/sail",
|
||||
"version": "v1.45.0",
|
||||
"version": "v1.46.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/sail.git",
|
||||
"reference": "019a2933ff4a9199f098d4259713f9bc266a874e"
|
||||
"reference": "eb90c4f113c4a9637b8fdd16e24cfc64f2b0ae6e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/sail/zipball/019a2933ff4a9199f098d4259713f9bc266a874e",
|
||||
"reference": "019a2933ff4a9199f098d4259713f9bc266a874e",
|
||||
"url": "https://api.github.com/repos/laravel/sail/zipball/eb90c4f113c4a9637b8fdd16e24cfc64f2b0ae6e",
|
||||
"reference": "eb90c4f113c4a9637b8fdd16e24cfc64f2b0ae6e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9786,7 +9786,7 @@
|
||||
"issues": "https://github.com/laravel/sail/issues",
|
||||
"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",
|
||||
@@ -11635,16 +11635,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
"version": "7.0.1",
|
||||
"version": "7.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "b759164a8e02263784b662889cc6cbb686077af6"
|
||||
"reference": "016951ae10980765e4e7aee491eb288c64e505b7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/b759164a8e02263784b662889cc6cbb686077af6",
|
||||
"reference": "b759164a8e02263784b662889cc6cbb686077af6",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7",
|
||||
"reference": "016951ae10980765e4e7aee491eb288c64e505b7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11701,7 +11701,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
||||
"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": [
|
||||
{
|
||||
@@ -11721,7 +11721,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-09-22T05:39:29+00:00"
|
||||
"time": "2025-09-24T06:16:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
|
||||
+2
-2
@@ -78,11 +78,11 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
'locale' => env('APP_LOCALE', 'de'),
|
||||
|
||||
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||
|
||||
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
||||
'faker_locale' => env('APP_FAKER_LOCALE', 'de_AT'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
$table->id();
|
||||
$table->string('konto_title')->nullable();
|
||||
$table->string('konto_gender')->nullable();
|
||||
$table->string('konto_first_name');
|
||||
$table->string('konto_last_name');
|
||||
$table->string('konto_company');
|
||||
$table->string('konto_email')->nullable();
|
||||
$table->string('konto_address')->nullable();
|
||||
$table->string('konto_location')->nullable();
|
||||
$table->string('konto_plz')->nullable();
|
||||
$table->string('konto_country')->nullable();
|
||||
$table->string('konto_phone')->nullable();
|
||||
$table->string('konto_uid_number')->nullable();
|
||||
$table->boolean('konto_agb_akzeptiert')->default(false);
|
||||
$table->string('konto_option_id')->default(1);
|
||||
$table->string('konto_gutachten_zahl')->default(0);
|
||||
$table->timestamp('konto_gutachten_zeit')->nullable();
|
||||
$table->string('konto_gutachten_abgeschlossen')->default(1);
|
||||
$table->string('title')->nullable();
|
||||
$table->string('gender')->nullable();
|
||||
$table->string('first_name');
|
||||
$table->string('last_name');
|
||||
$table->string('company');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('uid_number')->nullable();
|
||||
$table->boolean('agb_akzeptiert')->default(false);
|
||||
$table->string('plan_id')->default(1);
|
||||
$table->string('guthaben')->default(0);
|
||||
$table->timestamp('gueltig_bis')->nullable();
|
||||
$table->string('abgeschlossen')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('gutachters', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('konto_id');
|
||||
$table->foreignId('konto_id')->constrained();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('logo')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('location')->nullable();
|
||||
$table->string('code')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
+2
-2
@@ -11,13 +11,13 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('konto_options', function (Blueprint $table) {
|
||||
Schema::create('plans', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->integer('number_user')->default(1);
|
||||
$table->integer('number_gutachter')->default(1);
|
||||
$table->integer('payment_plan_id')->default(1);
|
||||
$table->integer('payment_id')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
+2
-2
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('payment_plans', function (Blueprint $table) {
|
||||
Schema::create('payments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
@@ -24,6 +24,6 @@ return new class extends Migration
|
||||
*/
|
||||
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');
|
||||
}
|
||||
};
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Gutachter;
|
||||
use App\Models\Konto;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
@@ -11,11 +13,15 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$this->call([
|
||||
KontoSeeder::class,
|
||||
RolesAndPermissionsSeeder::class,
|
||||
KontoOptionSeeder::class,
|
||||
OrientierungenSeeder::class,
|
||||
]);
|
||||
Konto::factory()->count(10)->create();
|
||||
|
||||
// Gutachter::factory()->create(30);
|
||||
|
||||
// $this->call([
|
||||
// OrientierungenSeeder::class,
|
||||
// KontoOptionSeeder::class,
|
||||
// RolesAndPermissionsSeeder::class,
|
||||
// ]);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ class KontoOptionSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$sql = "INSERT INTO `payment_plans` (`id`, `name`)
|
||||
$sql = "INSERT INTO `payments` (`id`, `name`)
|
||||
VALUES
|
||||
('1', 'Pro Gutachten'),
|
||||
('2', 'Monatlich'),
|
||||
@@ -20,7 +20,7 @@ class KontoOptionSeeder extends Seeder
|
||||
";
|
||||
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
|
||||
('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),
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user