-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from noxoua/develop
Develop
- Loading branch information
Showing
22 changed files
with
184 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ callouts: | |
color: yellow | ||
note: | ||
color: purple | ||
info: | ||
color: blue | ||
|
||
|
||
compress_html: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
<x-filament-tables::table class="w-full overflow-hidden text-sm"> | ||
<x-slot:header> | ||
@foreach (array_keys($value[0]) as $key) | ||
<x-filament-tables::header-cell class="!py-2"> | ||
{{ $key }} | ||
</x-filament-tables::header-cell> | ||
@endforeach | ||
</x-slot:header> | ||
@if (!empty($value)) | ||
<x-filament-tables::table class="w-full overflow-hidden text-sm"> | ||
<x-slot:header> | ||
@foreach (array_keys($value[0]) as $key) | ||
<x-filament-tables::header-cell class="!py-2"> | ||
{{ $key }} | ||
</x-filament-tables::header-cell> | ||
@endforeach | ||
</x-slot:header> | ||
|
||
|
||
@foreach ($value as $item) | ||
<x-filament-tables::row @class(['bg-gray-100/30 dark:bg-gray-900' => $loop->even])> | ||
@foreach ($item as $_value) | ||
<x-filament-tables::cell class="px-4 py-2 align-top sm:first-of-type:ps-6 sm:last-of-type:pe-6"> | ||
{{ $_value }} | ||
</x-filament-tables::cell> | ||
@endforeach | ||
</x-filament-tables::row> | ||
@endforeach | ||
</x-filament-tables::table> | ||
@foreach ($value as $item) | ||
<x-filament-tables::row @class(['bg-gray-100/30 dark:bg-gray-900' => $loop->even])> | ||
@foreach ($item as $_value) | ||
<x-filament-tables::cell class="px-4 py-2 align-top sm:first-of-type:ps-6 sm:last-of-type:pe-6"> | ||
{{ $_value }} | ||
</x-filament-tables::cell> | ||
@endforeach | ||
</x-filament-tables::row> | ||
@endforeach | ||
</x-filament-tables::table> | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Noxo\FilamentActivityLog\ResourceLogger\Concerns; | ||
|
||
trait HasRelationLoader | ||
{ | ||
/** | ||
* @var array<string> | ||
*/ | ||
protected array $preloadRelations = []; | ||
|
||
public function preloadRelations($relations): static | ||
{ | ||
$this->preloadRelations = is_string($relations) ? func_get_args() : $relations; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Noxo\FilamentActivityLog\ResourceLogger\Concerns\Types; | ||
|
||
trait KeyValue | ||
{ | ||
public bool $keyValueDifferenceOnly = true; | ||
|
||
public function keyValue(bool $differenceOnly = true): static | ||
{ | ||
$this->type('key-value'); | ||
$this->view('key-value'); | ||
$this->keyValueDifferenceOnly = $differenceOnly; | ||
|
||
return $this; | ||
} | ||
|
||
public function resolveKeyValueDifference(mixed $array1, mixed $array2): array | ||
{ | ||
if (! is_array($array1) || ! is_array($array2)) { | ||
return [$array1, $array2]; | ||
} | ||
|
||
foreach ($array1 as $key1 => $row1) { | ||
foreach ($array2 as $key2 => $row2) { | ||
if ($row1 === $row2) { | ||
unset($array1[$key1]); | ||
unset($array2[$key2]); | ||
} | ||
} | ||
} | ||
|
||
return [$array1, $array2]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.