Merge pull request #2747 from brkcvn/master

Payment method problem
This commit is contained in:
Burak Civan 2022-11-16 18:17:58 +03:00 committed by GitHub
commit 7e40bc3271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 75 deletions

View File

@ -67,33 +67,6 @@ const app = new Vue({
this.form.password = ''; this.form.password = '';
} }
if (document.querySelector('[data-tabs-swiper]').childElementCount > 2) {
document.querySelectorAll('[data-tabs-slide]').forEach((item) => {
item.classList.add('swiper-slide');
});
document.querySelector('[data-tabs-swiper]').classList.add('swiper', 'swiper-links');
let html = `
<div class="swiper-wrapper">
${document.querySelector('[data-tabs-swiper]').innerHTML}
</div>
<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>
`;
document.querySelector('[data-tabs-swiper]').innerHTML = html;
}
new Swiper(".swiper-links", { new Swiper(".swiper-links", {
loop: false, loop: false,
slidesPerView: 3, slidesPerView: 3,

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