phases one of time logged now with log display
This commit is contained in:
+51
-59
@@ -36,35 +36,27 @@
|
||||
|
||||
<x-dynamic-component :component="$fieldWrapperView" :field="$field">
|
||||
<div
|
||||
{{ $attributes
|
||||
->merge($getExtraAttributes(), escape: false)
|
||||
->class([
|
||||
'fi-fo-table-repeater',
|
||||
'fi-compact' => $isCompact,
|
||||
]) }}
|
||||
>
|
||||
{{ $attributes->merge($getExtraAttributes(), escape: false)->class(['fi-fo-table-repeater', 'fi-compact' => $isCompact]) }}>
|
||||
@if (count($items))
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@if ((count($items) > 1) && ($isReorderableWithButtons || $isReorderableWithDragAndDrop))
|
||||
<th
|
||||
class="fi-fo-table-repeater-empty-header-cell"
|
||||
></th>
|
||||
@if (count($items) > 1 && ($isReorderableWithButtons || $isReorderableWithDragAndDrop))
|
||||
<th class="fi-fo-table-repeater-empty-header-cell"></th>
|
||||
@endif
|
||||
|
||||
@foreach ($tableColumns as $column)
|
||||
<th
|
||||
@class([
|
||||
'fi-wrapped' => $column->canHeaderWrap(),
|
||||
(($columnAlignment = $column->getAlignment()) instanceof Alignment) ? ('fi-align-' . $columnAlignment->value) : $columnAlignment,
|
||||
])
|
||||
@style([
|
||||
('width: ' . e($columnWidth = $column->getWidth())) => filled($columnWidth),
|
||||
])
|
||||
>
|
||||
@if (! $column->isHeaderLabelHidden())
|
||||
{{ $column->getLabel() }}@if ($column->isMarkedAsRequired())<sup class="fi-fo-table-repeater-header-required-mark">*</sup>
|
||||
<th @class([
|
||||
'fi-wrapped' => $column->canHeaderWrap(),
|
||||
($columnAlignment = $column->getAlignment()) instanceof Alignment
|
||||
? 'fi-align-' . $columnAlignment->value
|
||||
: $columnAlignment,
|
||||
]) @style([
|
||||
'width: ' . e($columnWidth = $column->getWidth()) => filled($columnWidth),
|
||||
])>
|
||||
@if (!$column->isHeaderLabelHidden())
|
||||
{{ $column->getLabel() }}@if ($column->isMarkedAsRequired())
|
||||
<sup class="fi-fo-table-repeater-header-required-mark">*</sup>
|
||||
@endif
|
||||
@else
|
||||
<span class="fi-sr-only">
|
||||
@@ -75,26 +67,27 @@
|
||||
@endforeach
|
||||
|
||||
@if (count($extraItemActions) || $isCloneable || $isDeletable)
|
||||
<th
|
||||
class="fi-fo-table-repeater-empty-header-cell"
|
||||
></th>
|
||||
<th class="fi-fo-table-repeater-empty-header-cell"></th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody
|
||||
x-sortable
|
||||
{{ (new ComponentAttributeBag)
|
||||
->merge([
|
||||
'data-sortable-animation-duration' => $getReorderAnimationDuration(),
|
||||
'x-on:end.stop' => '$wire.mountAction(\'reorder\', { items: $event.target.sortable.toArray() }, { schemaComponent: \'' . $key . '\' })',
|
||||
], escape: false) }}
|
||||
>
|
||||
<tbody x-sortable
|
||||
{{ new ComponentAttributeBag()->merge(
|
||||
[
|
||||
'data-sortable-animation-duration' => $getReorderAnimationDuration(),
|
||||
'x-on:end.stop' =>
|
||||
'$wire.mountAction(\'reorder\', { items: $event.target.sortable.toArray() }, { schemaComponent: \'' .
|
||||
$key .
|
||||
'\' })',
|
||||
],
|
||||
escape: false,
|
||||
) }}>
|
||||
@foreach ($items as $itemKey => $item)
|
||||
@php
|
||||
$visibleExtraItemActions = array_filter(
|
||||
$extraItemActions,
|
||||
fn (Action $action): bool => $action(['item' => $itemKey])->isVisible(),
|
||||
fn(Action $action): bool => $action(['item' => $itemKey])->isVisible(),
|
||||
);
|
||||
$cloneAction = $cloneAction(['item' => $itemKey]);
|
||||
$cloneActionIsVisible = $isCloneable && $cloneAction->isVisible();
|
||||
@@ -108,16 +101,11 @@
|
||||
$itemStatePath = $item->getStatePath();
|
||||
@endphp
|
||||
|
||||
<tr
|
||||
wire:key="{{ $item->getLivewireKey() }}.item"
|
||||
x-sortable-item="{{ $itemKey }}"
|
||||
>
|
||||
@if ((count($items) > 1) && ($isReorderableWithButtons || $isReorderableWithDragAndDrop))
|
||||
<tr wire:key="{{ $item->getLivewireKey() }}.item" x-sortable-item="{{ $itemKey }}">
|
||||
@if (count($items) > 1 && ($isReorderableWithButtons || $isReorderableWithDragAndDrop))
|
||||
<td>
|
||||
@if ($reorderActionIsVisible || $moveUpActionIsVisible || $moveDownActionIsVisible)
|
||||
<div
|
||||
class="fi-fo-table-repeater-actions"
|
||||
>
|
||||
<div class="fi-fo-table-repeater-actions">
|
||||
@if ($reorderActionIsVisible)
|
||||
<div x-on:click.stop>
|
||||
{{ $reorderAction->extraAttributes(['x-sortable-handle' => true], merge: true) }}
|
||||
@@ -139,14 +127,18 @@
|
||||
@endif
|
||||
|
||||
@php
|
||||
$counter = 0
|
||||
$counter = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($item->getComponents(withHidden: true) as $schemaComponent)
|
||||
@php
|
||||
throw_unless(
|
||||
$schemaComponent instanceof \Filament\Schemas\Components\Component,
|
||||
new \Exception('Table repeaters must only contain schema components, but [' . $schemaComponent::class . '] was used.'),
|
||||
new \Exception(
|
||||
'Table repeaters must only contain schema components, but [' .
|
||||
$schemaComponent::class .
|
||||
'] was used.',
|
||||
),
|
||||
);
|
||||
@endphp
|
||||
|
||||
@@ -155,7 +147,7 @@
|
||||
{{ $schemaComponent }}
|
||||
@else
|
||||
@php
|
||||
$counter++
|
||||
$counter++;
|
||||
@endphp
|
||||
|
||||
@if ($schemaComponent->isVisible())
|
||||
@@ -164,11 +156,13 @@
|
||||
$columnVerticalAlignment = $currentColumn?->getVerticalAlignment();
|
||||
@endphp
|
||||
|
||||
<td
|
||||
@class([
|
||||
($columnVerticalAlignment instanceof VerticalAlignment) ? ('fi-vertical-align-' . $columnVerticalAlignment->value) : (is_string($columnVerticalAlignment) ? $columnVerticalAlignment : ''),
|
||||
])
|
||||
>
|
||||
<td @class([
|
||||
$columnVerticalAlignment instanceof VerticalAlignment
|
||||
? 'fi-vertical-align-' . $columnVerticalAlignment->value
|
||||
: (is_string($columnVerticalAlignment)
|
||||
? $columnVerticalAlignment
|
||||
: ''),
|
||||
])>
|
||||
{!! $schemaComponent->toSchemaHtml() !!}
|
||||
</td>
|
||||
@else
|
||||
@@ -181,9 +175,7 @@
|
||||
@if (count($extraItemActions) || $isCloneable || $isDeletable)
|
||||
<td>
|
||||
@if ($visibleExtraItemActions || $cloneActionIsVisible || $deleteActionIsVisible)
|
||||
<div
|
||||
class="fi-fo-table-repeater-actions"
|
||||
>
|
||||
<div class="fi-fo-table-repeater-actions">
|
||||
@foreach ($visibleExtraItemActions as $extraItemAction)
|
||||
<div x-on:click.stop>
|
||||
{{ $extraItemAction(['item' => $itemKey]) }}
|
||||
@@ -212,12 +204,12 @@
|
||||
@endif
|
||||
|
||||
@if ($isAddable && $addAction->isVisible())
|
||||
<div
|
||||
@class([
|
||||
'fi-fo-table-repeater-add',
|
||||
($addActionAlignment instanceof Alignment) ? ('fi-align-' . $addActionAlignment->value) : $addActionAlignment,
|
||||
])
|
||||
>
|
||||
<div @class([
|
||||
'fi-fo-table-repeater-add',
|
||||
$addActionAlignment instanceof Alignment
|
||||
? 'fi-align-' . $addActionAlignment->value
|
||||
: $addActionAlignment,
|
||||
])>
|
||||
{{ $addAction }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user