akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -0,0 +1,30 @@
<x-form.section>
<x-slot name="head">
<x-form.section.head
title="{{ trans($textSectionAddressTitle) }}"
description="{{ trans($textSectionAddressDescription) }}"
/>
</x-slot>
<x-slot name="body">
@if (! $hideAddress)
<x-form.group.textarea name="address" label="{{ trans($textAddress) }}" not-required v-model="form.address" />
@endif
@if (! $hideCity)
<x-form.group.text name="city" label="{{ trans_choice($textCity, 1) }}" not-required />
@endif
@if (! $hideZipCode)
<x-form.group.text name="zip_code" label="{{ trans($textZipCode) }}" not-required />
@endif
@if (! $hideState)
<x-form.group.text name="state" label="{{ trans($textState) }}" not-required />
@endif
@if (! $hideCountry)
<x-form.group.country form-group-class="sm:col-span-3 el-select-tags-pl-38" />
@endif
</x-slot>
</x-form.section>

View File

@ -0,0 +1,18 @@
<x-form.section>
<x-slot name="head">
<x-form.section.head
title="{{ trans($textSectionBillingTitle) }}"
description="{{ trans($textSectionBillingDescription) }}"
/>
</x-slot>
<x-slot name="body">
@if (! $hideTaxNumber)
<x-form.group.text name="tax_number" label="{{ trans($textTaxNumber) }}" not-required />
@endif
@if (! $hideCurrency)
<x-form.group.currency />
@endif
</x-slot>
</x-form.section>

View File

@ -0,0 +1,5 @@
<x-form.section>
<x-slot name="foot">
<x-form.buttons cancel-route="{{ $cancelRoute }}" />
</x-slot>
</x-form.section>

View File

@ -0,0 +1,28 @@
<x-form.container>
<x-form
id="{{ $formId }}"
:route="$formRoute"
method="{{ $formMethod }}"
:model="$contact"
>
@if (! $hideSectionGeneral)
<x-contacts.form.general type="{{ $type }}" />
@endif
@if (! $hideSectionBilling)
<x-contacts.form.billing type="{{ $type }}" />
@endif
@if (! $hideSectionAddress)
<x-contacts.form.address type="{{ $type }}" />
@endif
<x-form.input.hidden name="type" value="{{ $type }}" />
@if (! empty($contact))
<x-form.group.switch name="enabled" label="{{ trans('general.enabled') }}" />
@endif
<x-contacts.form.buttons type="{{ $type }}" />
</x-form>
</x-form.container>

View File

@ -0,0 +1,70 @@
<x-form.section>
<x-slot name="head">
<x-form.section.head
title="{{ trans($textSectionGeneralTitle) }}"
description="{{ trans($textSectionGeneralDescription) }}"
/>
</x-slot>
<x-slot name="body">
@if (! $hideName)
<x-form.group.text name="name" label="{{ trans($textName) }}" form-group-class="{{ $classNameFromGroupClass }}" />
@endif
<div class="sm:col-span-3 grid gap-x-8 gap-y-6">
@if (! $hideEmail)
<x-form.group.text name="email" label="{{ trans($textEmail) }}" not-required />
@endif
@if (! $hidePhone)
<x-form.group.text name="phone" label="{{ trans($textPhone) }}" not-required />
@endif
@if (! $hideWebsite)
<x-form.group.text name="website" label="{{ trans($textWebsite) }}" not-required />
@endif
@if (! $hideReference)
<x-form.group.text name="reference" label="{{ trans($textReference) }}" not-required />
@endif
</div>
<div class="sm:col-span-3">
@if (! $hideCanLogin)
<div class="mt-5.5">
@if (empty($contact))
<x-tooltip id="tooltip-client_portal-text" placement="bottom" message="{{ trans('customers.can_login_description') }}">
<x-form.group.checkbox
name="create_user"
:options="['1' => trans('customers.can_login')]"
@input="onCanLogin($event)"
checkbox-class="sm:col-span-6" />
</x-tooltip>
@else
@if ($contact->user_id)
<x-form.group.checkbox
name="create_user"
:options="['1' => trans('customers.user_created')]"
checkbox-class="sm:col-span-6"
checked
/>
@else
<x-tooltip id="tooltip-client_portal-text" placement="bottom" message="{{ trans('customers.can_login_description') }}">
<x-form.group.checkbox
name="create_user"
:options="['1' => trans('customers.can_login')]"
checkbox-class="sm:col-span-6"
@input="onCanLogin($event)"
/>
</x-tooltip>
@endif
@endif
</div>
@endif
@if (! $hideLogo)
<x-form.group.file name="logo" label="{{ trans_choice('general.pictures', 1) }}" not-required />
@endif
</div>
</x-slot>
</x-form.section>

View File

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

View File

@ -0,0 +1,268 @@
@if ($hideEmptyPage || ($contacts->count() || request()->get('search', false)))
@if (! $hideSummary)
<x-index.summary :items="$summaryItems" />
@endif
<x-index.container>
@if ((! $hideSearchString) && (! $hideBulkAction))
<x-index.search
search-string="{{ $searchStringModel }}"
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@elseif ((! $hideSearchString) && $hideBulkAction)
<x-index.search
search-string="{{ $searchStringModel }}"
route="{{ $searchRoute }}"
/>
@elseif ($hideSearchString && (! $hideBulkAction))
<x-index.search
bulk-action="{{ $bulkActionClass }}"
route="{{ $searchRoute }}"
/>
@endif
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
@if (! $hideBulkAction)
<x-table.th class="{{ $classBulkAction }}" override="class">
<x-index.bulkaction.all />
</x-table.th>
@endif
@stack('name_and_tax_number_th_start')
@if ((! $hideName) || (! $hideTaxNumber))
<x-table.th class="{{ $classNameAndTaxNumber }}">
@stack('name_th_start')
@if (! $hideName)
<x-slot name="first">
<x-sortablelink column="name" title="{{ trans($textName) }}" />
</x-slot>
@endif
@stack('name_th_end')
@stack('tax_number_th_start')
@if (! $hideTaxNumber)
<x-slot name="second">
<x-sortablelink column="tax_number" title="{{ trans($textTaxNumber) }}" />
</x-slot>
@endif
@stack('tax_number_th_end')
</x-table.th>
@endif
@stack('name_and_tax_number_th_end')
@stack('email_and_phone_th_start')
@if ((! $hideEmail) || (! $hidePhone))
<x-table.th class="{{ $classEmailAndPhone }}">
@stack('email_th_start')
@if (! $hideEmail)
<x-slot name="first">
<x-sortablelink column="email" title="{{ trans($textEmail) }}" />
</x-slot>
@endif
@stack('email_th_end')
@stack('phone_th_start')
@if (! $hidePhone)
<x-slot name="second">
<x-sortablelink column="phone" title="{{ trans($textPhone) }}" />
</x-slot>
@endif
@stack('phone_th_end')
</x-table.th>
@endif
@stack('email_and_phone_th_end')
@stack('country_and_currency_code_th_start')
@if ((! $hideCountry) || (! $hideCurrencyCode))
<x-table.th class="{{ $classCountryAndCurrencyCode }}">
@stack('country_th_start')
@if (! $hideCountry)
<x-slot name="first">
<x-sortablelink column="country" title="{{ trans_choice($textCountry, 1) }}" />
</x-slot>
@endif
@stack('country_th_end')
@stack('currency_code_th_start')
@if (! $hideCurrencyCode)
<x-slot name="second">
<x-sortablelink column="currency_code" title="{{ trans_choice($textCurrencyCode, 1) }}" />
</x-slot>
@endif
@stack('currency_code_th_end')
</x-table.th>
@endif
@stack('country_and_currency_code_th_end')
@stack('open_and_overdue_th_start')
@if ((! $hideOpen) || (! $hideOverdue))
<x-table.th class="{{ $classOpenAndOverdue }}" kind="amount">
@stack('open_th_start')
@if (! $hideOpen)
<x-slot name="first">
{{ trans($textOpen) }}
</x-slot>
@endif
@stack('open_th_end')
@stack('overdue_th_start')
@if (! $hideOverdue)
<x-slot name="second">
{{ trans($textOverdue) }}
</x-slot>
@endif
@stack('overdue_th_end')
</x-table.th>
@endif
@stack('open_and_overdue_th_end')
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($contacts as $item)
<x-table.tr href="{{ route($routeButtonShow, $item->id) }}">
@if (! $hideBulkAction)
<x-table.td class="{{ $classBulkAction }}" override="class">
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->name }}" />
</x-table.td>
@endif
@stack('name_and_tax_number_td_start')
@if ((! $hideName) || (! $hideTaxNumber))
<x-table.td class="{{ $classNameAndTaxNumber }}">
@stack('name_td_start')
@if (! $hideName)
<x-slot name="first" class="flex items-center font-medium">
@if ($showPicture)
@if (is_object($item->picture))
<img src="{{ Storage::url($item->picture->id) }}" class="absolute w-6 h-6 bottom-6 rounded-full mr-2 hidden lg:block" alt="{{ $item->name }}" title="{{ $item->name }}">
@else
<img src="{{ asset('public/img/user.svg') }}" class="absolute w-6 h-6 bottom-6 rounded-full mr-2 hidden lg:block" alt="{{ $item->name }}"/>
@endif
@endif
<div class="truncate {{ $showPicture ? ' ltr:pl-8 rtl:pr-8' : '' }}">
{{ $item->name }}
</div>
@if (! $item->enabled)
<x-index.disable text="{{ trans_choice($textPage, 1) }}" />
@endif
</x-slot>
@endif
@stack('name_td_end')
@stack('tax_number_td_start')
@if (! $hideTaxNumber)
<x-slot name="second" class="w-32 font-normal truncate {{ $showPicture ? ' ltr:pl-8 rtl:pr-8' : '' }}">
{{ $item->tax_number }}
</x-slot>
@endif
@stack('tax_number_td_end')
</x-table.td>
@endif
@stack('name_and_tax_number_td_end')
@stack('email_and_phone_td_start')
@if ((! $hideEmail) || (! $hidePhone))
<x-table.td class="{{ $classEmailAndPhone }}">
@stack('email_td_start')
@if (! $hideEmail)
<x-slot name="first">
@if ($item->email)
{{ $item->email }}
@else
<x-empty-data />
@endif
</x-slot>
@endif
@stack('email_td_end')
@stack('phone_td_start')
@if (! $hidePhone)
<x-slot name="second">
{{ $item->phone }}
</x-slot>
@endif
@stack('phone_td_end')
</x-table.td>
@endif
@stack('email_and_phone_td_end')
@stack('country_and_currency_code_td_start')
@if ((! $hideCountry) || (! $hideCurrencyCode))
<x-table.td class="{{ $classCountryAndCurrencyCode }}">
@stack('country_td_start')
@if (! $hideCountry)
<x-slot name="first">
<x-index.country code="{{ $item->country }}" />
</x-slot>
@endif
@stack('country_td_end')
@stack('currency_code_td_start')
@if (! $hideCurrencyCode)
<x-slot name="second">
<x-index.currency code="{{ $item->currency_code }}" />
</x-slot>
@endif
@stack('currency_code_td_end')
</x-table.td>
@endif
@stack('country_and_currency_code_td_end')
@stack('open_and_overdue_td_start')
@if ((! $hideOpen) || (! $hideOverdue))
<x-table.td class="{{ $classOpenAndOverdue }}" kind="amount">
@stack('open_td_start')
@if (! $hideOpen)
<x-slot name="first">
@if ($item->open)
<x-money :amount="$item->open" :currency="setting('default.currency')" convert />
@else
<x-empty-data />
@endif
</x-slot>
@endif
@stack('open_td_end')
@stack('overdue_td_start')
@if (! $hideOverdue)
<x-slot name="second">
@if ($item->overdue)
<x-money :amount="$item->overdue" :currency="setting('default.currency')" convert />
@else
<x-empty-data />
@endif
</x-slot>
@endif
@stack('overdue_td_end')
</x-table.td>
@endif
@stack('open_and_overdue_td_end')
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$contacts" />
</x-index.container>
@else
<x-empty-page
group="{{ $group }}"
page="{{ $page }}"
image-empty-page="{{ $imageEmptyPage }}"
text-empty-page="{{ $textEmptyPage }}"
url-docs-path="{{ $urlDocsPath }}"
create-route="{{ $createRoute }}"
check-permission-create="{{ $checkPermissionCreate }}"
permission-create="{{ $permissionCreate }}"
/>
@endif

View File

@ -0,0 +1,27 @@
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@if ($checkPermissionCreate)
@can($permissionCreate)
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endcan
@else
@if (! $hideImport)
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
{{ trans('import.import') }}
</x-dropdown.link>
@endif
@endif
@if (! $hideExport)
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
{{ trans('general.export') }}
</x-dropdown.link>
@endif
</x-dropdown>

View File

@ -0,0 +1,13 @@
@push('scripts_start')
<script type="text/javascript">
var contact_default_currency = '{{ $currency_code }}';
var contact_currencies = {!! $currencies !!};
var can_login_errors = {
valid: '{!! trans("validation.required", ["attribute" => "email"]) !!}',
email: '{!! trans("customers.error.email") !!}'
};
</script>
@endpush
<x-script :alias="$alias" :folder="$folder" :file="$file" />

View File

@ -0,0 +1,44 @@
@stack('new_button_start')
@if (! $hideNewDropdown)
<x-dropdown id="customer-new">
<x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class">
{{ trans('general.new_more') }}
<span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span>
</x-slot>
@stack('document_button_start')
@if (! $hideButtonDocument)
@can($permissionCreateDocument)
<x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}">
{{ trans_choice($textDocument, 1) }}
</x-dropdown.link>
@endcan
@endif
@stack('transaction_button_start')
@if (! $hideButtonTransaction)
@can($permissionCreateTransaction)
<x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}">
{{ trans_choice($textTransaction, 1) }}
</x-dropdown.link>
@endcan
@endif
@stack('transaction_button_end')
</x-dropdown>
@endif
@stack('edit_button_start')
@if (! $hideButtonEdit)
@can($permissionUpdate)
<x-link href="{{ route($routeButtonEdit, $contact->id) }}">
{{ trans('general.edit') }}
</x-link>
@endcan
@endif
@stack('edit_button_end')

View File

@ -0,0 +1,355 @@
<x-show.container>
<x-show.summary>
@stack('profile_start')
@if (! $hideTopLeft)
<x-show.summary.left>
@if (! $hideAvatar)
<x-slot name="avatar">
{{ $contact->initials }}
</x-slot>
@endif
@stack('contact_email_start')
@if (! $hideEmail)
<span>{{ $contact->email }}</span>
@endif
@stack('contact_email_end')
@stack('contact_phone_start')
@if (! $hidePhone)
<span>{{ $contact->phone }}</span>
@endif
@stack('contact_phone_end')
</x-show.summary.left>
@endif
@stack('profile_end')
@if (! $hideTopRight)
<x-show.summary.right>
@stack('summary_overdue_start')
@if (! $hideOverdue)
<x-slot name="first" amount="{{ money($totals['overdue'], setting('default.currency'), true) }}" title="{{ trans('general.overdue') }}"></x-slot>
@endif
@stack('summary_overdue_end')
@stack('summary_open_start')
@if (! $hideOpen)
<x-slot name="second" amount="{{ money($totals['open'], setting('default.currency'), true) }}" title="{{ trans('general.open') }}"></x-slot>
@endif
@stack('summary_open_end')
@stack('summary_paid_start')
@if (! $hidePaid)
<x-slot name="third" amount="{{ money($totals['paid'], setting('default.currency'), true) }}" title="{{ trans('general.paid') }}"></x-slot>
@endif
@stack('summary_paid_end')
</x-show.summary.right>
@endif
</x-show.summary>
<x-show.content>
@if (! $hideBottomLeft)
<x-show.content.left>
@stack('customer_address_start')
@if (! $hideAddress)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.address') }}</div>
<span>{{ $contact->address }}<br>{{ $contact->location }}</span>
</div>
@endif
@stack('customer_address_end')
@stack('customer_tax_number_start')
@if (! $hideTaxNumber)
@if ($contact->tax_number)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.tax_number') }}</div>
<span>{{ $contact->tax_number }}</span>
</div>
@endif
@endif
@stack('customer_tax_number_end')
@stack('customer_website_start')
@if (! $hideWebsite)
@if ($contact->website)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.website') }}</div>
<span>{{ $contact->website }}</span>
</div>
@endif
@endif
@stack('customer_website_end')
@stack('customer_reference_start')
@if (! $hideReference)
@if ($contact->reference)
<div class="flex flex-col text-sm mb-5">
<div class="font-medium">{{ trans('general.reference') }}</div>
<span>{{ $contact->reference }}</span>
</div>
@endif
@endif
@stack('customer_reference_end')
@stack('customer_client_portal_start')
@if (! $hideUser)
<div class="flex flex-col text-sm mb-5">
<div class="flex items-center font-medium">
<div class="flex items-center cursor-default">
<div data-tooltip-target="tooltip-client-describe" data-tooltip-placement="bottom">
{{ trans('general.client_portal') }}
</div>
@if ($contact->user)
<span data-tooltip-target="tooltip-client-permission" data-tooltip-placement="bottom" class="material-icons text-green text-base ltr:ml-1 rtl:mr-1">check</span>
@else
<span data-tooltip-target="tooltip-client-permission" data-tooltip-placement="bottom" class="material-icons-round text-red text-sm ltr:ml-1 rtl:mr-1">hide_source</span>
@endif
<div id="tooltip-client-describe" role="tooltip" class="w-2/12 inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 whitespace-normal tooltip-content">
{{ trans('customers.client_portal_description') }}
<div class="absolute w-2 h-2 -top-1 -left-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
</div>
<div id="tooltip-client-permission" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 whitespace-nowrap tooltip-content">
@if ($contact->user)
{{ trans('customers.client_portal_text.can') }}
@else
{{ trans('customers.client_portal_text.cant') }}
@endif
<div class="absolute w-2 h-2 -top-1 -left-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
</div>
</div>
</div>
</div>
@endif
@stack('customer_client_portal_end')
</x-show.content.left>
@endif
@if (! $hideBottomRight)
<x-show.content.right>
<x-tabs active="documents">
<x-slot name="navs">
@stack('documents_nav_start')
<x-tabs.nav
id="documents"
name="{{ trans_choice($textDocument, 2) }}"
active
class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link"
/>
@stack('transactions_nav_start')
<x-tabs.nav
id="transactions"
name="{{ trans_choice('general.transactions', 2) }}"
class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link"
/>
@stack('transactions_nav_end')
</x-slot>
<x-slot name="content">
@stack('documents_tab_start')
<x-tabs.tab id="documents">
@if ($documents->count())
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
<x-table.th class="w-4/12 table-title hidden sm:table-cell">
<x-slot name="first">
<x-sortablelink column="due_at" title="{{ trans('invoices.due_date') }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="issued_at" title="{{ trans('invoices.invoice_date') }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-3/12 table-title hidden sm:table-cell">
<x-sortablelink column="status" title="{{ trans_choice('general.statuses', 1) }}" />
</x-table.th>
<x-table.th class="w-6/12 sm:w-3/12 table-title'">
<x-slot name="first">
<x-sortablelink column="contact_name" title="{{ trans_choice('general.customers', 1) }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="document_number" title="{{ trans_choice('general.numbers', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-6/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-medium text-black tracking-wider" override="class">
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
</x-table.th>
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($documents as $item)
@php $paid = $item->paid; @endphp
<x-table.tr href="{{ route(config('type.document.' . $item->type . '.route.prefix', 'invoices') . '.show', $item->id) }}">
<x-table.td class="w-4/12 table-title hidden sm:table-cell">
<x-slot name="first" class="font-bold truncate" override="class">
{{ \Date::parse($item->due_at)->diffForHumans() }}
</x-slot>
<x-slot name="second">
<x-date date="{{ $item->issued_at }}" />
</x-slot>
</x-table.td>
<x-table.td class="w-3/12 table-title hidden sm:table-cell">
<x-show.status status="{{ $item->status }}" background-color="bg-{{ $item->status_label }}" text-color="text-text-{{ $item->status_label }}" />
</x-table.td>
<x-table.td class="w-6/12 sm:w-3/12 table-title'">
<x-slot name="first">
{{ $item->contact_name }}
</x-slot>
<x-slot name="second" class="relative w-20 font-normal group" data-tooltip-target="tooltip-information-{{ $item->id }}" data-tooltip-placement="left" override="class,data-tooltip-target,data-tooltip-placement">
<span class="border-black border-b border-dashed">
{{ $item->document_number }}
</span>
<div class="w-full absolute h-10 -left-10 -mt-6"></div>
<x-documents.index.information :document="$item" />
</x-slot>
</x-table.td>
<x-table.td class="w-6/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-medium text-black tracking-wider" override="class">
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
</x-table.td>
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$documents" />
@else
<x-show.no-records type="{{ $type }}" :model="$contact" :group="config('type.contact.' . $type . '.group')" :page="\Str::plural(config('type.contact.' . $type . '.document_type'))" />
@endif
</x-tabs.tab>
@stack('transactions_tab_start')
<x-tabs.tab id="transactions">
@if ($transactions->count())
<x-table>
<x-table.thead>
<x-table.tr class="flex items-center px-1">
<x-table.th class="w-4/12 sm:w-3/12">
<x-slot name="first">
<x-sortablelink column="paid_at" title="{{ trans('general.date') }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="number" title="{{ trans_choice('general.numbers', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
<x-sortablelink column="type" title="{{ trans_choice('general.types', 1) }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="category.name" title="{{ trans_choice('general.categories', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-4/12 sm:w-3/12">
<x-sortablelink column="account.name" title="{{ trans_choice('general.accounts', 1) }}" />
</x-table.th>
<x-table.th class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
<x-sortablelink column="contact.name" title="{{ trans_choice('general.contacts', 1) }}" />
</x-slot>
<x-slot name="second">
<x-sortablelink column="document.document_number" title="{{ trans_choice('general.documents', 1) }}" />
</x-slot>
</x-table.th>
<x-table.th class="w-4/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-xs font-medium text-black tracking-wider" override="class">
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
</x-table.th>
</x-table.tr>
</x-table.thead>
<x-table.tbody>
@foreach($transactions as $item)
<x-table.tr href="{{ route('transactions.show', $item->id) }}">
<x-table.td class="w-4/12 sm:w-3/12">
<x-slot name="first" class="font-bold truncate" override="class">
<x-date date="{{ $item->paid_at }}" />
</x-slot>
<x-slot name="second">
{{ $item->number }}
</x-slot>
</x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
{{ $item->type_title }}
</x-slot>
<x-slot name="second" class="flex items-center">
<x-index.category :model="$item->category" />
</x-slot>
</x-table.td>
<x-table.td class="w-4/12 sm:w-3/12">
{{ $item->account->name }}
</x-table.td>
<x-table.td class="w-2/12 hidden sm:table-cell">
<x-slot name="first">
{{ $item->contact->name }}
</x-slot>
<x-slot name="second">
@if ($item->document)
<a href="{{ route($item->route_name, $item->route_id) }}" class="font-normal truncate border-b border-black border-dashed">
{{ $item->document->document_number }}
</a>
@else
<x-empty-data />
@endif
</x-slot>
</x-table.td>
<x-table.td class="relative w-4/12 sm:w-2/12 ltr:pl-6 rtl:pr-6 py-3 ltr:text-right rtl:text-left text-sm font-normal text-black tracking-wider" override="class">
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
</x-table.td>
<x-table.td kind="action">
<x-table.actions :model="$item" />
</x-table.td>
</x-table.tr>
@endforeach
</x-table.tbody>
</x-table>
<x-pagination :items="$transactions" />
@else
<x-show.no-records type="{{ $type }}" :model="$contact" group="banking" page="transactions" />
@endif
</x-tabs.tab>
@stack('transactions_tab_end')
</x-slot>
</x-tabs>
</x-show.content.right>
@endif
</x-show.content>
</x-show.container>

View File

@ -0,0 +1,33 @@
@stack('button_group_start')
@if (! $hideActionsDropdown)
<x-dropdown id="dropdown-more-actions">
<x-slot name="trigger">
<span class="material-icons">more_horiz</span>
</x-slot>
@stack('delete_button_start')
@if (! $hideButtonDuplicate)
@can($permissionCreate)
<x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}">
{{ trans('general.duplicate') }}
</x-dropdown.link>
@endcan
@endif
<x-dropdown.divider />
@stack('delete_button_start')
@if (! $hideButtonDelete)
@can($permissionDelete)
<x-delete-link :model="$contact" :route="$routeButtonDelete" :text="$textDeleteModal" />
@endcan
@endif
@stack('delete_button_end')
</x-dropdown>
@endif
@stack('button_group_end')