37 lines
1.5 KiB
PHP
Raw Normal View History

2022-06-01 10:15:55 +03:00
<div class="border-b pb-4" x-data="{ children : null }">
<button class="relative w-full ltr:text-left rtl:text-right cursor-pointer group"
2022-06-01 10:15:55 +03:00
x-on:click="children !== 1 ? children = 1 : children = null"
>
<span class="font-medium">
2022-07-04 12:52:24 +03:00
<x-button.hover group-hover>
2022-06-27 14:53:06 +03:00
{{ trans_choice('general.transactions', 2) }}
2022-07-04 12:52:24 +03:00
</x-button.hover>
2022-06-01 10:15:55 +03:00
</span>
<div class="text-black-400 text-sm flex gap-x-1 mt-1">
2022-06-01 10:15:55 +03:00
{!! trans('transactions.slider.children', ['count' => $transaction->children()->count()]) !!}
</div>
<span class="material-icons absolute ltr:right-0 rtl:left-0 top-0 transition-all transform"
2022-06-01 10:15:55 +03:00
x-bind:class="children === 1 ? 'rotate-180' : ''"
>expand_more</span>
</button>
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
x-ref="container1"
x-bind:class="children == 1 ? 'h-auto ' : 'scale-y-0 h-0'"
>
@if ($transaction->children()->count())
2022-06-07 11:29:11 +03:00
@foreach ($transaction->children()->get() as $child)
2022-08-03 14:04:32 +03:00
@php $url = '<x-link href="' . route('transactions.show', $child->id) . '" class="text-purple" override="class">' . $child->number . '</x-link>' @endphp
2022-06-01 10:15:55 +03:00
<div class="my-2">
2022-06-07 11:29:11 +03:00
{!! trans('recurring.child', ['url' => $url, 'date' => company_date($child->paid_at)]) !!}
2022-06-01 10:15:55 +03:00
</div>
@endforeach
@else
{{ trans('general.none') }}
@endif
</div>
</div>