payment method problem

This commit is contained in:
Burak Civan 2022-11-16 18:16:15 +03:00
parent 3ea3de1672
commit b736bab143
3 changed files with 84 additions and 48 deletions

View File

@ -28,23 +28,35 @@
@php $is_active = true; @endphp @php $is_active = true; @endphp
<x-slot name="navs"> <x-slot name="navs">
<div data-tabs-swiper class="w-full flex"> <div class="w-full flex {{ count($payment_methods) > 3 ? 'swiper swiper-links': 'w-full flex' }}">
@foreach ($payment_methods as $key => $name) <div class="{{ count($payment_methods) > 3 ? 'swiper-wrapper' : 'w-full flex' }}">
@stack('invoice_{{ $key }}_tab_start') @foreach ($payment_methods as $key => $name)
<div data-tabs-slide> @stack('invoice_{{ $key }}_tab_start')
<x-tabs.nav <div class="{{ count($payment_methods) > 3 ? 'swiper-slide': '' }}">
id="{{ $name }}" <x-tabs.nav
@click="onChangePaymentMethodSigned('{{ $key }}')" id="{{ $name }}"
> @click="onChangePaymentMethodSigned('{{ $key }}')"
<div> >
{{ $name }} <div>
</div> {{ $name }}
</x-tabs.nav> </div>
</div> </x-tabs.nav>
@stack('invoice_{{ $key }}_tab_end') </div>
@stack('invoice_{{ $key }}_tab_end')
@php $is_active = false; @endphp @php $is_active = false; @endphp
@endforeach @endforeach
</div>
@if (count($payment_methods) > 3)
<div class="swiper-button-next top-3 right-0">
<span class="material-icons">chevron_right</span>
</div>
<div class="swiper-button-prev top-3 left-0">
<span class="material-icons">chevron_left</span>
</div>
@endif
</div> </div>
</x-slot> </x-slot>
</div> </div>

View File

@ -26,23 +26,35 @@
@php $is_active = true; @endphp @php $is_active = true; @endphp
<x-slot name="navs"> <x-slot name="navs">
<div data-tabs-swiper class="w-full flex"> <div class="w-full flex {{ count($payment_methods) > 3 ? 'swiper swiper-links': 'w-full flex' }}">
@foreach ($payment_methods as $key => $name) <div class="{{ count($payment_methods) > 3 ? 'swiper-wrapper' : 'w-full flex' }}">
@stack('invoice_{{ $key }}_tab_start') @foreach ($payment_methods as $key => $name)
<div data-tabs-slide> @stack('invoice_{{ $key }}_tab_start')
<x-tabs.nav <div class="{{ count($payment_methods) > 3 ? 'swiper-slide': '' }}">
id="{{ $name }}" <x-tabs.nav
@click="onChangePaymentMethod('{{ $key }}')" id="{{ $name }}"
> @click="onChangePaymentMethodSigned('{{ $key }}')"
<div> >
{{ $name }} <div>
</div> {{ $name }}
</x-tabs.nav> </div>
</div> </x-tabs.nav>
@stack('invoice_{{ $key }}_tab_end') </div>
@stack('invoice_{{ $key }}_tab_end')
@php $is_active = false; @endphp @php $is_active = false; @endphp
@endforeach @endforeach
</div>
@if (count($payment_methods) > 3)
<div class="swiper-button-next top-3 right-0">
<span class="material-icons">chevron_right</span>
</div>
<div class="swiper-button-prev top-3 left-0">
<span class="material-icons">chevron_left</span>
</div>
@endif
</div> </div>
</x-slot> </x-slot>
</div> </div>

View File

@ -35,23 +35,35 @@
@php $is_active = true; @endphp @php $is_active = true; @endphp
<x-slot name="navs"> <x-slot name="navs">
<div data-tabs-swiper class="w-full flex"> <div class="w-full flex {{ count($payment_methods) > 3 ? 'swiper swiper-links': 'w-full flex' }}">
@foreach ($payment_methods as $key => $name) <div class="{{ count($payment_methods) > 3 ? 'swiper-wrapper' : 'w-full flex' }}">
@stack('invoice_{{ $key }}_tab_start') @foreach ($payment_methods as $key => $name)
<div data-tabs-slide> @stack('invoice_{{ $key }}_tab_start')
<x-tabs.nav <div class="{{ count($payment_methods) > 3 ? 'swiper-slide': '' }}">
id="{{ $name }}" <x-tabs.nav
@click="onChangePaymentMethodSigned('{{ $key }}')" id="{{ $name }}"
> @click="onChangePaymentMethodSigned('{{ $key }}')"
<div> >
{{ $name }} <div>
</div> {{ $name }}
</x-tabs.nav> </div>
</div> </x-tabs.nav>
@stack('invoice_{{ $key }}_tab_end') </div>
@stack('invoice_{{ $key }}_tab_end')
@php $is_active = false; @endphp @php $is_active = false; @endphp
@endforeach @endforeach
</div>
@if (count($payment_methods) > 3)
<div class="swiper-button-next top-3 right-0">
<span class="material-icons">chevron_right</span>
</div>
<div class="swiper-button-prev top-3 left-0">
<span class="material-icons">chevron_left</span>
</div>
@endif
</div> </div>
</x-slot> </x-slot>
</div> </div>