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,10 +28,11 @@
@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' }}">
<div class="{{ count($payment_methods) > 3 ? 'swiper-wrapper' : 'w-full flex' }}">
@foreach ($payment_methods as $key => $name) @foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start') @stack('invoice_{{ $key }}_tab_start')
<div data-tabs-slide> <div class="{{ count($payment_methods) > 3 ? 'swiper-slide': '' }}">
<x-tabs.nav <x-tabs.nav
id="{{ $name }}" id="{{ $name }}"
@click="onChangePaymentMethodSigned('{{ $key }}')" @click="onChangePaymentMethodSigned('{{ $key }}')"
@ -46,6 +47,17 @@
@php $is_active = false; @endphp @php $is_active = false; @endphp
@endforeach @endforeach
</div> </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>
</x-slot> </x-slot>
</div> </div>
@php $is_active = true; @endphp @php $is_active = true; @endphp

View File

@ -26,13 +26,14 @@
@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' }}">
<div class="{{ count($payment_methods) > 3 ? 'swiper-wrapper' : 'w-full flex' }}">
@foreach ($payment_methods as $key => $name) @foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start') @stack('invoice_{{ $key }}_tab_start')
<div data-tabs-slide> <div class="{{ count($payment_methods) > 3 ? 'swiper-slide': '' }}">
<x-tabs.nav <x-tabs.nav
id="{{ $name }}" id="{{ $name }}"
@click="onChangePaymentMethod('{{ $key }}')" @click="onChangePaymentMethodSigned('{{ $key }}')"
> >
<div> <div>
{{ $name }} {{ $name }}
@ -44,6 +45,17 @@
@php $is_active = false; @endphp @php $is_active = false; @endphp
@endforeach @endforeach
</div> </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>
</x-slot> </x-slot>
</div> </div>
@php $is_active = true; @endphp @php $is_active = true; @endphp

View File

@ -35,10 +35,11 @@
@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' }}">
<div class="{{ count($payment_methods) > 3 ? 'swiper-wrapper' : 'w-full flex' }}">
@foreach ($payment_methods as $key => $name) @foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start') @stack('invoice_{{ $key }}_tab_start')
<div data-tabs-slide> <div class="{{ count($payment_methods) > 3 ? 'swiper-slide': '' }}">
<x-tabs.nav <x-tabs.nav
id="{{ $name }}" id="{{ $name }}"
@click="onChangePaymentMethodSigned('{{ $key }}')" @click="onChangePaymentMethodSigned('{{ $key }}')"
@ -53,6 +54,17 @@
@php $is_active = false; @endphp @php $is_active = false; @endphp
@endforeach @endforeach
</div> </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>
</x-slot> </x-slot>
</div> </div>
@php $is_active = true; @endphp @php $is_active = true; @endphp