wip(Member & memberships sections)
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 1m29s

This commit is contained in:
2026-02-03 10:53:23 +01:00
parent e78f86d125
commit f39651748d
35 changed files with 1333 additions and 981 deletions

View File

@@ -1,36 +0,0 @@
<div class="space-y-4">
@foreach($ispconfigs as $ispconfig)
<div class="border rounded-lg p-4 bg-white dark:bg-gray-800">
<div class="flex items-start justify-between mb-3">
<h4 class="text-lg font-semibold text-gray-900 dark:text-white">
{{ $ispconfig->data['domain'] ?? 'Domaine non défini' }}
</h4>
<div>
<a
href="#"
target="_blank"
class="inline-flex items-center gap-1 text-sm text-primary-600 hover:text-primary-700 dark:text-primary-400 font-medium"
>
Gérer dans ISPConfig
</a>
</div>
</div>
<div class="grid grid-cols-2 gap-3 text-sm">
@foreach($ispconfig->data as $key => $value)
@if(!is_array($value) && !is_null($value))
<div class="flex flex-col">
<span class="text-gray-500 dark:text-gray-400 text-xs">
{{ ucfirst(str_replace('_', ' ', $key)) }}
</span>
<span class="font-medium text-gray-900 dark:text-white">
{{ $value }}
</span>
</div>
@endif
@endforeach
</div>
</div>
@endforeach
</div>

View File

@@ -0,0 +1,56 @@
@php
$isArray = is_array($value);
$isAssoc = $isArray && array_keys($value) !== range(0, count($value) - 1);
$displayType = $isArray
? ($isAssoc ? 'object' : 'array')
: gettype($value);
$preview = $isArray
? ($isAssoc ? '{…}' : '[…]')
: (is_bool($value) ? ($value ? 'true' : 'false') : (is_null($value) ? 'null' : (string) $value));
@endphp
<div class="font-mono text-sm leading-6">
@if ($isArray)
<div x-data="{ open: false }" class="ml-2">
<button type="button" class="text-gray-700 dark:text-gray-200 hover:underline" @click="open = !open">
<span x-text="open ? '▾' : '▸'"></span>
<span class="text-gray-500 dark:text-gray-400">{{ $displayType }}</span>
<span class="text-gray-400 dark:text-gray-500">({{ count($value) }})</span>
<span class="text-gray-400 dark:text-gray-500" x-show="!open">{{ $preview }}</span>
</button>
<div x-show="open" x-cloak class="mt-1 border-l border-gray-200 dark:border-gray-800 pl-3">
@foreach ($value as $k => $v)
<div class="flex gap-2">
<div class="shrink-0 text-indigo-700 dark:text-indigo-300">
{{ $isAssoc ? '"' . $k . '"' : $k }}
<span class="text-gray-400 dark:text-gray-500">:</span>
</div>
<div class="min-w-0">
@include('filament.components.json-node', [
'value' => $v,
'path' => ($path === '' ? (string) $k : ($path . '.' . $k)),
])
</div>
</div>
@endforeach
</div>
</div>
@else
<span class="text-emerald-700 dark:text-emerald-300">
@if (is_string($value))
"{{ $value }}"
@elseif (is_bool($value))
{{ $value ? 'true' : 'false' }}
@elseif (is_null($value))
null
@else
{{ $value }}
@endif
</span>
@endif
</div>

View File

@@ -0,0 +1,21 @@
@php
$json = is_string($data)
? json_decode($data, true)
: $data;
@endphp
@vite('resources/css/backend.css')
<details class="fi-section-content mt-3">
<summary class="fi-btn fi-btn-size-sm fi-btn-color-gray cursor-pointer">
Afficher les données JSON
</summary>
<div class="bg-black text-white mt-3 p-3 rounded-lg overflow-hidden">
<pre class="fi-code-block text-sm">
{{ json_encode(
$json,
JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
) }}
</pre>
</div>
</details>

View File

@@ -1 +0,0 @@
@livewire('ispconfig.web-hosting-list', ['member' => $member], key('web-hostings-'.$member->id))