Merge pull request #2551 from brkcvn/invoice_template

Console error fixed for Invoice edit columns modal
This commit is contained in:
Cüneyt Şentürk 2022-07-27 14:32:37 +03:00 committed by GitHub
commit 4e2f95d240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 35 deletions

View File

@ -76,7 +76,6 @@ const app = new Vue({
',,'
],
email_template: false,
minor_form_loading: false
}
},
@ -676,11 +675,13 @@ const app = new Vue({
if (response.data.error) {
this.form.loading = false;
this.form.response = response.data;
}
})
.catch(error => {
this.form.loading = false;
this.form.onFail(error);
this.method_show_html = error.message;
@ -959,7 +960,7 @@ const app = new Vue({
let form_html = document.querySelector('form');
if (form_html && form_html.getAttribute('id') == 'document') {
form_html.querySelectorAll('input, textarea, select, ul, li, a').forEach((element) => {
form_html.querySelectorAll('input, textarea, select, ul, li, a, [type="button"]').forEach((element) => {
element.addEventListener('click', () => {
this.onBeforeUnload();
});
@ -1148,6 +1149,6 @@ const app = new Vue({
}
this.form.discount = this.form.discount.replace(',', '.');
}
},
},
});
});

View File

@ -11,12 +11,12 @@
::disabled="form.loading"
@click="onSubmitViaSendEmail"
>
<i v-if="minor_form_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:-left-3.5 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:-right-3.5 after:rounded-full after:animate-submit after:delay-[0.42s]"></i>
<span :class="[{'opacity-0': minor_form_loading}]">
<i v-if="form.loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:-left-3.5 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:-right-3.5 after:rounded-full after:animate-submit after:delay-[0.42s]"></i>
<span :class="[{'opacity-0': form.loading}]">
{{ trans('general.send_to') }}
</span>
</x-button>
@endif
</div>
</x-slot>
</x-form.section>
</x-form.section>

View File

@ -26,53 +26,56 @@
@if (! $hideItems)
@stack('name_th_start')
@if (! $hideItemName)
<th class="px-3 py-1 ltr:pl-2 rtl:pr-2 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
{{ (trans_choice($textItemName, 2) != $textItemName) ? trans_choice($textItemName, 2) : trans($textItemName) }}
@if (! $hideItemName)
{{ (trans_choice($textItemName, 2) != $textItemName) ? trans_choice($textItemName, 2) : trans($textItemName) }}
@endif
</th>
@endif
@stack('name_th_end')
@stack('move_th_start')
@if (! $hideItemDescription)
<th class="px-3 py-1 text-left text-xs font-normal border-t-0 border-r-0 border-b-0" style=" vertical-align:bottom;">
<th class="px-3 py-1 text-left text-xs font-normal border-t-0 border-r-0 border-b-0" style=" vertical-align:bottom;">
@if (! $hideItemDescription)
{{ trans($textItemDescription) }}
</th>
@endif
@endif
</th>
@stack('move_th_end')
@endif
@stack('quantity_th_start')
@if (! $hideItemQuantity)
<th class="px-3 py-1 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
<th class="px-3 py-1 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0" style="vertical-align:bottom;">
@if (! $hideItemQuantity)
{{ trans($textItemQuantity) }}
</th>
@endif
@endif
</th>
@stack('quantity_th_end')
@stack('price_th_start')
@if (! $hideItemPrice)
<th class="px-3 py-1 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0 pr-1" style="vertical-align:bottom;">
<th class="px-3 py-1 ltr:text-left rtl:text-right text-xs font-normal border-t-0 border-r-0 border-b-0 pr-1" style="vertical-align:bottom;">
@if (! $hideItemPrice)
{{ trans($textItemPrice) }}
</th>
@endif
@endif
</th>
@stack('price_th_end')
@stack('total_th_start')
@if (! $hideItemAmount)
<th class="px-3 py-1 ltr:text-right rtl:text-left text-xs font-normal border-t-0 border-b-0 item-total" style="vertical-align:bottom;">
<th class="px-3 py-1 ltr:text-right rtl:text-left text-xs font-normal border-t-0 border-b-0 item-total" style="vertical-align:bottom;">
@if (! $hideItemAmount)
{{ trans($textItemAmount) }}
</th>
@endif
@endif
</th>
@stack('total_th_end')
@stack('remove_th_start')
@ -106,4 +109,4 @@
</table>
</div>
</div>
</div>
</div>

View File

@ -168,8 +168,8 @@
@foreach ($options as $option)
@if ($option->id == 'custom')
<div class="col-span-3 mt-5">
<x-form.group.text name="{{ $attributes['input-name'] }}" value="{{ $attributes['input-value'] }}" v-show="{{ $attributes['input-name'] }}" />
<div class="col-span-6 my-5" v-if="form.{{ $name }} == 'custom'">
<x-form.group.text name="{{ $attributes['input-name'] }}" value="{{ $attributes['input-value'] }}" />
</div>
@endif
@endforeach

View File

@ -27,7 +27,7 @@
<div role="tablist" class="flex flex-wrap">
@php $is_active = true; @endphp
<div class="swiper swiper-links w-full">
<div class="swiper swiper-links">
<div class="swiper-wrapper">
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
@ -148,4 +148,4 @@
@endpush
<x-script folder="portal" file="apps" />
</x-layouts.preview>
</x-layouts.preview>

View File

@ -34,7 +34,7 @@
<div role="tablist" class="flex flex-wrap">
@php $is_active = true; @endphp
<div class="swiper swiper-links w-full">
<div class="swiper swiper-links">
<div class="swiper-wrapper">
@foreach ($payment_methods as $key => $name)
@stack('invoice_{{ $key }}_tab_start')
@ -148,4 +148,4 @@
<x-script folder="portal" file="apps" />
</x-layouts.signed>
</div>
</div>