Skip to content

Commit

Permalink
Merge pull request #1 from lara-zeus/fix
Browse files Browse the repository at this point in the history
fix views namespace
  • Loading branch information
atmonshi authored Mar 19, 2024
2 parents 1da2644 + 1ef01a2 commit 5c9b1cf
Show file tree
Hide file tree
Showing 14 changed files with 173 additions and 58 deletions.
94 changes: 46 additions & 48 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions resources/views/company/pages/company-settings.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<x-filament-panels::page>
<form wire:submit="saveSettings">
{{ $this->form }}

<div class="text-center my-10">
<x-filament::button type="submit">
{{ __('zeus-chaos::core.save') }}
</x-filament::button>
</div>
</form>
</x-filament-panels::page>
31 changes: 31 additions & 0 deletions resources/views/fields/color-picker.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<x-dynamic-component
:component="$getFieldWrapperView()"
:field="$field"
>
<div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }">

<input type="hidden" x-model="state" />

<div class="flex gap-2 flex-wrap">
@php
$colors = collect(\Filament\Support\Colors\Color::all())->forget(['slate','zinc','neutral','stone'])->keys()->toArray();
@endphp
@foreach($colors as $color)
@php
$setColor = \Illuminate\Support\Arr::toCssStyles([
\Filament\Support\get_color_css_variables($color, shades: [500]),
]);
@endphp
<a :class="state === '{{ $color }}' ? 'mx-1 ring-gray-500 ring-offset-2 ring-2' : ''"
@click="state = '{{ $color }}'"
style="{{ $setColor }}"
x-tooltip="{
content: '{{ str($color)->title() }}',
theme: $store.theme,
}"
class="hover:ring-gray-500 hover:ring-offset-2 hover:ring-2 transition-all ease-in-out duration-300 cursor-pointer w-6 h-6 bg-custom-500 px-2 py-2 rounded-full">
</a>
@endforeach
</div>
</div>
</x-dynamic-component>
3 changes: 3 additions & 0 deletions resources/views/pages/deleter.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<x-filament-panels::page>
{{ $this->table }}
</x-filament-panels::page>
21 changes: 21 additions & 0 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ trait Configuration
*/
protected Closure | string $navigationGroupLabel = 'Tartarus';

protected array $tartarusModels = [
//'Notification' => \LaraZeus\Tartarus\Models\Notification::class,
];

public function navigationGroupLabel(Closure | string $label): static
{
$this->navigationGroupLabel = $label;
Expand All @@ -22,4 +26,21 @@ public function getNavigationGroupLabel(): Closure | string
{
return $this->evaluate($this->navigationGroupLabel);
}

public function tartarusModels(array $models): static
{
$this->tartarusModels = $models;

return $this;
}

public function getTartarusModels(): array
{
return $this->tartarusModels;
}

public static function getModel(string $model): string
{
return (new static())::get()->getTartarusModels()[$model];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CompanySettings extends Page

protected static string $resource = CompanyResource::class;

protected static string $view = 'filament.admin.clusters.companies.pages.company-settings';
protected static string $view = 'zeus-tartarus::company.pages.company-settings';

public static function langFile(): string
{
Expand Down
7 changes: 5 additions & 2 deletions src/Filament/Clusters/System/Resources/EmailLogsResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@

class EmailLogsResource extends ChaosResource
{
protected static ?string $model = Email::class;

protected static ?string $cluster = System::class;

public static function getModel(): string
{
return config('filament-email.resource.model');
}

public static function form(Form $form): Form
{
return $form
Expand Down
2 changes: 1 addition & 1 deletion src/Filament/Pages/Deleter.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Deleter extends Page implements HasTable

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'zeus-tartarus::filament.admin.pages.deleter';
protected static string $view = 'zeus-tartarus::pages.deleter';

public static function langFile(): string
{
Expand Down
Loading

0 comments on commit 5c9b1cf

Please sign in to comment.