Merge branch 'master' of https://github.com/brkcvn/akaunting into code-clean

This commit is contained in:
Burak Civan
2022-09-07 09:56:41 +03:00
76 changed files with 1024 additions and 705 deletions

View File

@ -1,14 +1,14 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif
@endcan
@else
@if (! $hideCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endif

View File

@ -6,21 +6,21 @@
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endcan
@else
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endif
@if (! $hideExport)
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}" id="index-more-actions-export-{{ $type }}">
{{ trans('general.export') }}
</x-dropdown.link>
@endif

View File

@ -2,7 +2,7 @@
@if (! $hideCreate)
@can($permissionCreate)
<x-link href="{{ route($createRoute) }}" kind="primary">
<x-link href="{{ route($createRoute) }}" kind="primary" id="show-more-actions-new-{{ $document->type }}">
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
</x-link>
@endcan
@ -13,7 +13,7 @@
@if (! in_array($document->status, $hideButtonStatuses))
@if (! $hideEdit)
@can($permissionUpdate)
<x-link href="{{ route($editRoute, $document->id) }}">
<x-link href="{{ route($editRoute, $document->id) }}" id="show-more-actions-edit-{{ $document->type }}">
{{ trans('general.edit') }}
</x-link>
@endcan

View File

@ -11,7 +11,7 @@
<x-slot name="body">
<div class="flex">
<x-link href="{{ route($editRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
<x-link href="{{ route($editRoute, $document->id) }}" id="show-slider-actions-edit-{{ $document->type }}" @click="e => e.target.classList.add('disabled')">
{{ trans('general.edit') }}
</x-link>
</div>

View File

@ -11,10 +11,10 @@
@stack('timeline_get_paid_body_button_payment_start')
@if (! $hideAddPayment)
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
@if (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
<x-button
@click="onPayment"
id="button-payment"
id="show-slider-actions-payment-{{ $document->type }}"
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
override="class"
>
@ -32,6 +32,7 @@
'utm_medium' => 'app',
'utm_campaign' => 'payment_method',
]) }}"
id="show-slider-actions-online-payment-{{ $document->type }}"
override="class"
class="py-1.5 mb-3 sm:mb-0 text-xs bg-transparent hover:bg-transparent font-medium leading-6"
>
@ -61,7 +62,7 @@
</br>
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button.hover color="to-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</x-button.hover>
@ -80,7 +81,7 @@
<x-button
@click="onEditPayment('{{ $transaction->id }}')"
id="button-edit-payment"
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
class="text-purple mt-1"
override="class"
>

View File

@ -14,7 +14,7 @@
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
<x-button
@click="onPayment"
id="button-payment"
id="show-slider-actions-payment-{{ $document->type }}"
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
override="class"
>
@ -45,7 +45,7 @@
</br>
@if (! empty($transaction->contact) && $transaction->contact->email)
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
<x-button.hover color="to-purple">
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
</x-button.hover>
@ -64,7 +64,7 @@
<x-button
@click="onEditPayment('{{ $transaction->id }}')"
id="button-edit-payment"
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
class="text-purple mt-1"
override="class"
>

View File

@ -1,7 +1,7 @@
@stack('button_group_start')
@if (! $hideMoreActions)
<x-dropdown id="dropdown-more-actions">
<x-dropdown id="show-more-actions-{{ $document->type }}">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@ -12,7 +12,7 @@
@if (! $hideDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}">
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}" id="show-more-actions-duplicate-{{ $document->type }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@ -27,17 +27,9 @@
@stack('button_print_start')
@if (! $hidePrint)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank" id="show-more-actions-print-{{ $document->type }}">
{{ trans('general.print') }}
</x-dropdown.link>
@endif
@stack('button_print_end')
@ -45,7 +37,7 @@
@stack('button_pdf_start')
@if (! $hidePdf)
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}">
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}" id="show-more-actions-pdf-{{ $document->type }}">
{{ trans('general.download_pdf') }}
</x-dropdown.link>
@endif
@ -61,7 +53,7 @@
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
<x-dropdown.button id="show-more-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-dropdown.button>
@endif
@ -73,7 +65,7 @@
@if (! $hideEmail)
@if ($document->contact_email)
<x-dropdown.button @click="onEmail('{{ route($emailRoute, $document->id) }}')">
<x-dropdown.button id="show-more-actions-send-email-{{ $document->type }}" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-dropdown.button>
@else
@ -88,26 +80,6 @@
@stack('share_button_end')
@stack('button_cancelled_start')
@if (! $hideCancel)
@can($permissionUpdate)
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@endcan
@endif
@stack('button_cancelled_end')
@if (! $hideDivider3)
<x-dropdown.divider />
@endif
@ -116,7 +88,7 @@
@if (! $hideCustomize)
@can($permissionCustomize)
<x-dropdown.link href="{{ route($customizeRoute) }}">
<x-dropdown.link href="{{ route($customizeRoute) }}" id="show-more-actions-customize-{{ $document->type }}">
{{ trans('general.customize') }}
</x-dropdown.link>
@endcan
@ -127,13 +99,35 @@
@stack('end_button_start')
@if (! $hideEnd && $document->recurring)
<x-dropdown.link href="{{ route($endRoute, $document->id) }}">
<x-dropdown.link href="{{ route($endRoute, $document->id) }}" id="show-more-actions-end-{{ $document->type }}">
{{ trans('recurring.end') }}
</x-dropdown.link>
@endif
@stack('end_button_end')
@stack('button_cancelled_start')
@if (! $hideCancel)
@can($permissionUpdate)
<x-dropdown.divider />
@if ($checkCancelled)
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@else
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@endcan
@endif
@stack('button_cancelled_end')
@if (! $hideDivider4)
<x-dropdown.divider />
@endif

View File

@ -14,7 +14,7 @@
@if (! $hideMarkReceived)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markReceivedRoute, $document->id) }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
<x-link href="{{ route($markReceivedRoute, $document->id) }}" id="show-slider-actions-mark-received-{{ $document->type }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkReceived) }}
</x-link>
@else

View File

@ -13,7 +13,7 @@
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
@if (! $hideEmail)
@if ($document->contact_email)
<x-button id="button-email-send" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
<x-button id="show-slider-actions-send-email-{{ $document->type }}" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
{{ trans($textEmail) }}
</x-button>
@else
@ -28,7 +28,7 @@
@if (! $hideMarkSent)
@can($permissionUpdate)
@if ($document->status == 'draft')
<x-link href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
<x-link id="show-slider-actions-mark-sent-{{ $document->type }}" href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkSent) }}
</x-link>
@else
@ -41,7 +41,7 @@
@if (! $hideShare)
@if ($document->status != 'cancelled')
<x-button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
<x-button id="show-slider-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
{{ trans('general.share_link') }}
</x-button>
@endif