Compare commits

..

6 Commits

Author SHA1 Message Date
philipp lang 381a7f9023 --wip-- [skip ci] 2025-03-28 01:16:44 +01:00
philipp lang f2c54363f2 Fix UserSeeder 2025-03-28 01:15:23 +01:00
philipp lang a573cea7c0 Add class merging for ui components 2025-03-28 01:15:05 +01:00
philipp lang 3ea0682b7c Mod sleect for contribution compilers 2025-03-28 00:53:49 +01:00
philipp lang 3db7e4592e Mod copydb 2025-03-28 00:50:04 +01:00
philipp lang 520c1d0a62 Add id to form elements instead of uuid 2025-03-28 00:49:26 +01:00
10 changed files with 21 additions and 21 deletions

View File

@ -10,16 +10,15 @@ class Editor extends Component
use HasFormDimensions; use HasFormDimensions;
public string $id;
public function __construct( public function __construct(
public string $name, public string $name,
public string $size = 'default', public string $size = 'default',
public ?string $hint = null, public ?string $hint = null,
public bool $required = false, public bool $required = false,
public string $label = '', public string $label = '',
public string $id = ''
) { ) {
$this->id = str()->uuid()->toString(); $this->id = $this->id ? $this->id : $this->name;
} }
public function render() public function render()

View File

@ -10,8 +10,6 @@ class Lever extends Component
use HasFormDimensions; use HasFormDimensions;
public string $id;
public function __construct( public function __construct(
public string $name, public string $name,
public string $size = 'default', public string $size = 'default',
@ -20,8 +18,9 @@ class Lever extends Component
public bool $disabled = false, public bool $disabled = false,
public bool $required = false, public bool $required = false,
public string $label = '', public string $label = '',
public string $id = ''
) { ) {
$this->id = str()->uuid()->toString(); $this->id = $this->id ? $this->id : $this->name;
} }
public function render() public function render()

View File

@ -10,8 +10,6 @@ class Select extends Component
use HasFormDimensions; use HasFormDimensions;
public string $id;
public function __construct( public function __construct(
public string $name, public string $name,
public string $size = 'default', public string $size = 'default',
@ -20,8 +18,9 @@ class Select extends Component
public string $label = '', public string $label = '',
public $options = [], public $options = [],
public bool $disabled = false, public bool $disabled = false,
public string $id = ''
) { ) {
$this->id = str()->uuid()->toString(); $this->id = $this->id ? $this->id : $this->name;
} }
public function render() public function render()

View File

@ -19,9 +19,7 @@ class Action extends Component
public function render() public function render()
{ {
return <<<'HTML' return <<<'HTML'
<a x-tooltip.raw="{{$slot}}" href="#" {{ $attributes }} class="inline-flex <a x-tooltip.raw="{{$slot}}" href="#" {{ $attributes->merge(['class' => 'inline-flex w-6 h-5 flex items-center justify-center rounded '.$allColors($variant)]) }}>
w-6 h-5 flex items-center justify-center rounded {{ $allColors($variant) }}
">
<x-ui::sprite class="w-3 h-3 flex-none" :src="$icon"></x-ui::sprite> <x-ui::sprite class="w-3 h-3 flex-none" :src="$icon"></x-ui::sprite>
</a> </a>
HTML; HTML;

View File

@ -19,7 +19,7 @@ class Badge extends Component
public function render() public function render()
{ {
return <<<'HTML' return <<<'HTML'
<button type="button" href="#" {{ $attributes }} class="h-6 px-3 space-x-2 items-center rounded-full {{ $allColors($variant) }} hidden lg:flex"> <button type="button" href="#" {{ $attributes->merge(['class' => 'h-6 px-3 space-x-2 items-center rounded-full hidden lg:flex '.$allColors($variant)]) }}>
<x-ui::sprite class="w-3 h-3 flex-none" :src="$icon"></x-ui::sprite> <x-ui::sprite class="w-3 h-3 flex-none" :src="$icon"></x-ui::sprite>
<span class="text-sm"> <span class="text-sm">
{{$slot}} {{$slot}}

View File

@ -24,7 +24,7 @@ class BooleanDisplay extends Component
public function render() public function render()
{ {
return <<<'HTML' return <<<'HTML'
<div x-tooltip.raw="{{$hint}}" class="flex space-x-2 items-center group @if($dark) dark @endif"> <div x-tooltip.raw="{{$hint}}" {{ $attributes->merge(['class' => 'flex space-x-2 items-center group '.($dark ? 'dark' : '')]) }}">
<div class="border-2 rounded-full w-5 h-5 flex items-center justify-center <div class="border-2 rounded-full w-5 h-5 flex items-center justify-center
@if ($value) border-green-700 group-[.dark]:border-green-500 @if ($value) border-green-700 group-[.dark]:border-green-500
@else border-red-700 group-[.dark]:border-red-500 @else border-red-700 group-[.dark]:border-red-500

View File

@ -19,7 +19,7 @@ class Menulist extends Component
public function render() public function render()
{ {
return <<<'HTML' return <<<'HTML'
<div class="p-6 bg-gray-700 border-r border-gray-600 flex-none w-maxc flex flex-col justify-between"> <div {{$attributes->merge(['class' => 'p-6 bg-gray-700 border-r border-gray-600 flex-none w-maxc flex flex-col justify-between']) }}">
<div class="grid gap-1"> <div class="grid gap-1">
@foreach($entries as $entry) @foreach($entries as $entry)
<a href="{{$entry['url']}}" class="rounded py-1 px-3 text-gray-400 duration-200 hover:bg-gray-600 {{$activeClass($entry)}}" @if($entry['is_active']) data-active @endif> <a href="{{$entry['url']}}" class="rounded py-1 px-3 text-gray-400 duration-200 hover:bg-gray-600 {{$activeClass($entry)}}" @if($entry['is_active']) data-active @endif>

View File

@ -3,8 +3,8 @@
echo "drop database scoutrobot;" | sudo mysql echo "drop database scoutrobot;" | sudo mysql
echo "create database scoutrobot;" | sudo mysql echo "create database scoutrobot;" | sudo mysql
ssh -l stammsilva zoomyboy.de "cd /usr/share/webapps/nami_silva && docker compose exec db mysqldump -udb -p$SCOUTROBOT_DB_PASSWORD db" > db.tmp ssh -l stamm-silva zoomyboy.de "cd /usr/share/webapps/adrema_silva && docker compose exec db mysqldump -udb -p$SCOUTROBOT_DB_PASSWORD db" > db.tmp
sudo mysql scoutrobot < db.tmp sudo mysql adrema < db.tmp
rm db.tmp rm db.tmp
echo 'app(\App\Form\FormSettings::class)->fill(["registerUrl" => "http://stammsilva.test/anmeldung/{slug}/register", "clearCacheUrl" => "http://stammsilva.test/adrema/clear-cache"])->save();' | php artisan tinker echo 'app(\App\Form\FormSettings::class)->fill(["registerUrl" => "http://stammsilva.test/anmeldung/{slug}/register", "clearCacheUrl" => "http://stammsilva.test/adrema/clear-cache"])->save();' | php artisan tinker

View File

@ -19,7 +19,8 @@ class UserSeeder extends Seeder
'email' => env('USER_EMAIL', 'admin@example.com'), 'email' => env('USER_EMAIL', 'admin@example.com'),
'email_verified_at' => now(), 'email_verified_at' => now(),
'password' => Hash::make(env('USER_PASSWORD', 'admin')), 'password' => Hash::make(env('USER_PASSWORD', 'admin')),
'name' => 'Adrema Benutzer', 'firstname' => 'Adrema',
'lastname' => 'Benutzer',
]); ]);
} }
} }

View File

@ -28,13 +28,17 @@ class FillList extends Component
$this->clearSearch(); $this->clearSearch();
} }
public function submit(string $compiler): void /** @todo implement compilation of document */
public function submit(): void
{ {
} }
public function updatedSearch(): void public function updatedSearch(): void
{ {
$this->memberResults = Member::search($this->search, fn ($engine, $query, $options) => $engine->search($query, [...$options, 'filter' => ['birthday IS NOT NULL', 'address IS NOT EMPTY']]))->get()->toBase(); $this->memberResults = Member::search($this->search, fn ($engine, $query, $options) => $engine->search($query, [
...$options,
'filter' => ['birthday IS NOT NULL', 'address IS NOT EMPTY']
]))->get()->toBase();
} }
public function onSubmitFirstMemberResult(): void public function onSubmitFirstMemberResult(): void