akaunting 3.0 (the last dance)
This commit is contained in:
15
resources/views/components/documents/index/buttons.blade.php
Normal file
15
resources/views/components/documents/index/buttons.blade.php
Normal 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
|
@ -1,101 +0,0 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
@if (!$hideBulkAction)
|
||||
<th class="{{ $classBulkAction }}">
|
||||
{{ Form::bulkActionAllGroup() }}
|
||||
</th>
|
||||
@endif
|
||||
|
||||
@stack('document_number_th_start')
|
||||
@if (!$hideDocumentNumber)
|
||||
<th class="{{ $classDocumentNumber }}">
|
||||
@stack('document_number_th_inside_start')
|
||||
|
||||
@if (!$hideBulkAction)
|
||||
@sortablelink('document_number', trans_choice($textDocumentNumber, 1), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])
|
||||
@else
|
||||
@sortablelink('document_number', trans_choice($textDocumentNumber, 1), ['filter' => 'active, visible'], ['rel' => 'nofollow'])
|
||||
@endif
|
||||
|
||||
@stack('document_number_th_inside_end')
|
||||
</th>
|
||||
@endif
|
||||
@stack('document_number_th_end')
|
||||
|
||||
@stack('contact_name_th_start')
|
||||
@if (!$hideContactName)
|
||||
<th class="{{ $classContactName }}">
|
||||
@stack('contact_name_th_inside_start')
|
||||
|
||||
@sortablelink('contact_name', trans_choice($textContactName, 1))
|
||||
|
||||
@stack('contact_name_th_inside_end')
|
||||
</th>
|
||||
@endif
|
||||
@stack('contact_name_th_end')
|
||||
|
||||
@stack('amount_th_start')
|
||||
@if (!$hideAmount)
|
||||
<th class="{{ $classAmount }}">
|
||||
@stack('amount_th_inside_start')
|
||||
|
||||
@sortablelink('amount', trans('general.amount'))
|
||||
|
||||
@stack('amount_th_inside_end')
|
||||
</th>
|
||||
@endif
|
||||
@stack('amount_th_end')
|
||||
|
||||
@stack('issued_at_th_start')
|
||||
@if (!$hideIssuedAt)
|
||||
<th class="{{ $classIssuedAt }}">
|
||||
@stack('issued_at_th_inside_start')
|
||||
|
||||
@sortablelink('issued_at', trans($textIssuedAt))
|
||||
|
||||
@stack('issued_at_th_inside_end')
|
||||
</th>
|
||||
@endif
|
||||
@stack('issued_at_th_end')
|
||||
|
||||
@stack('due_at_th_start')
|
||||
@if (!$hideDueAt)
|
||||
<th class="{{ $classDueAt }}">
|
||||
@stack('due_at_th_inside_start')
|
||||
|
||||
@sortablelink('due_at', trans($textDueAt))
|
||||
|
||||
@stack('due_at_th_inside_end')
|
||||
</th>
|
||||
@endif
|
||||
@stack('due_at_th_end')
|
||||
|
||||
@stack('status_th_start')
|
||||
@if (!$hideStatus)
|
||||
<th class="{{ $classStatus }}">
|
||||
@stack('status_th_inside_start')
|
||||
|
||||
@sortablelink('status', trans_choice('general.statuses', 1))
|
||||
|
||||
@stack('status_th_inside_end')
|
||||
</th>
|
||||
@endif
|
||||
@stack('status_th_end')
|
||||
|
||||
@if (!$hideActions)
|
||||
<th class="{{ $classActions }}">
|
||||
<a>{{ trans('general.actions') }}</a>
|
||||
</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($documents as $item)
|
||||
@include('partials.documents.index.card-table-row')
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
@ -1,5 +0,0 @@
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $documents])
|
||||
</div>
|
||||
</div>
|
@ -1,33 +0,0 @@
|
||||
@if (!$hideBulkAction)
|
||||
<div class="card-header border-bottom-0" :class="[{'bg-gradient-primary': bulk_action.show}]">
|
||||
{!! Form::open([
|
||||
'method' => 'GET',
|
||||
'route' => $formCardHeaderRoute,
|
||||
'role' => 'form',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
@if (!$hideSearchString)
|
||||
<div class="align-items-center" v-if="!bulk_action.show">
|
||||
<x-search-string model="{{ $searchStringModel }}" />
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ Form::bulkActionRowGroup($textBulkAction, $bulkActions, $bulkActionRouteParameters) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@else
|
||||
@if (!$hideSearchString)
|
||||
<div class="card-header border-bottom-0">
|
||||
{!! Form::open([
|
||||
'method' => 'GET',
|
||||
'route' => $formCardHeaderRoute,
|
||||
'role' => 'form',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="align-items-center">
|
||||
<x-search-string model="{{ $searchStringModel }}" />
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
@ -1,73 +1,110 @@
|
||||
@if ($hideEmptyPage || ($documents->count() || request()->get('search', false)))
|
||||
<div class="card">
|
||||
<x-documents.index.card-header
|
||||
type="{{ $type }}"
|
||||
hide-bulk-action="{{ $hideBulkAction }}"
|
||||
:form-card-header-route="$formCardHeaderRoute"
|
||||
hide-search-string="{{ $hideSearchString }}"
|
||||
search-string-model="{{ $searchStringModel }}"
|
||||
text-bulk-action="{{ $textBulkAction }}"
|
||||
bulk-action-class="{{ $bulkActionClass }}"
|
||||
:bulk-actions="$bulkActions"
|
||||
:bulk-action-route-parameters="$bulkActionRouteParameters"
|
||||
/>
|
||||
@if (! $hideSummary)
|
||||
<x-index.summary :items="$summaryItems" />
|
||||
@endif
|
||||
|
||||
<x-documents.index.card-body
|
||||
type="{{ $type }}"
|
||||
:documents="$documents"
|
||||
hide-bulk-action="{{ $hideBulkAction }}"
|
||||
class-bulk-action="{{ $classBulkAction }}"
|
||||
hide-document-number="{{ $hideDocumentNumber }}"
|
||||
text-document-number="{{ $textDocumentNumber }}"
|
||||
class-document-number="{{ $classDocumentNumber }}"
|
||||
hide-contact-name="{{ $hideContactName }}"
|
||||
text-contact-name="{{ $textContactName }}"
|
||||
class-contact-name="{{ $classContactName }}"
|
||||
hide-amount="{{ $hideAmount }}"
|
||||
class-amount="{{ $classAmount }}"
|
||||
hide-issued-at="{{ $hideIssuedAt }}"
|
||||
text-issued-at="{{ $textIssuedAt }}"
|
||||
class-issued-at="{{ $classIssuedAt }}"
|
||||
hide-due-at="{{ $hideDueAt }}"
|
||||
class-due-at="{{ $classDueAt }}"
|
||||
text-due-at="{{ $textDueAt }}"
|
||||
hide-status="{{ $hideStatus }}"
|
||||
class-status="{{ $classStatus }}"
|
||||
hide-actions="{{ $hideActions }}"
|
||||
class-actions="{{ $classActions }}"
|
||||
text-document-status="{{ $textDocumentStatus }}"
|
||||
hide-button-show="{{ $hideButtonShow }}"
|
||||
route-button-show="{{ $routeButtonShow }}"
|
||||
hide-button-edit="{{ $hideButtonEdit }}"
|
||||
check-button-reconciled="{{ $checkButtonReconciled }}"
|
||||
route-button-edit="{{ $routeButtonEdit }}"
|
||||
check-button-cancelled="{{ $checkButtonCancelled }}"
|
||||
hide-button-duplicate="{{ $hideButtonDuplicate }}"
|
||||
permission-create="{{ $permissionCreate }}"
|
||||
route-button-duplicate="{{ $routeButtonDuplicate }}"
|
||||
hide-button-cancel="{{ $hideButtonCancel }}"
|
||||
permission-update="{{ $permissionUpdate }}"
|
||||
route-button-cancelled="{{ $routeButtonCancelled }}"
|
||||
hide-button-delete="{{ $hideButtonDelete }}"
|
||||
permission-delete="{{ $permissionDelete }}"
|
||||
route-button-delete="{{ $routeButtonDelete }}"
|
||||
text-modal-delete="{{ $textModalDelete }}"
|
||||
value-modal-delete="{{ $valueModalDelete }}"
|
||||
/>
|
||||
<x-index.container>
|
||||
@if (! $withoutTabs)
|
||||
<x-tabs active="{{ $tabActive }}">
|
||||
<x-slot name="navs">
|
||||
@stack('document_nav_start')
|
||||
|
||||
<x-documents.index.card-footer
|
||||
type="{{ $type }}"
|
||||
:documents="$documents"
|
||||
/>
|
||||
</div>
|
||||
@if ($tabActive == $type)
|
||||
<x-tabs.nav id="{{ $type }}" name="{{ trans_choice($textTabDocument, 2) }}" active />
|
||||
@else
|
||||
<x-tabs.nav-link id="{{ $type }}" name="{{ trans_choice($textTabDocument, 2) }}" href="{{ route($routeTabDocument) }}" />
|
||||
@endif
|
||||
|
||||
@stack('document_nav_end')
|
||||
|
||||
@if ($tabActive == 'recurring-templates')
|
||||
@if (! $hideRecurringTemplates)
|
||||
<x-tabs.nav id="recurring-templates" name="{{ trans_choice('general.recurring_templates', 2) }}" active />
|
||||
@endif
|
||||
@else
|
||||
@if (! $hideRecurringTemplates)
|
||||
<x-tabs.nav-link id="recurring-templates" name="{{ trans_choice('general.recurring_templates', 2) }}" href="{{ route($routeTabRecurring) }}" />
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('recurring_nav_end')
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
@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
|
||||
|
||||
@stack('document_tab_start')
|
||||
|
||||
@if ($tabActive == $type)
|
||||
<x-tabs.tab id="{{ $type }}">
|
||||
<x-documents.index.document :type="$type" :documents="$documents" />
|
||||
</x-tabs.tab>
|
||||
@endif
|
||||
|
||||
@stack('document_tab_end')
|
||||
|
||||
@if ($tabActive == 'recurring-templates')
|
||||
@if (! $hideRecurringTemplates)
|
||||
<x-tabs.tab id="recurring-templates">
|
||||
<x-documents.index.recurring-templates :type="$type" :documents="$documents" />
|
||||
</x-tabs.tab>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@stack('recurring_tab_end')
|
||||
</x-slot>
|
||||
</x-tabs>
|
||||
@else
|
||||
@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
|
||||
|
||||
@stack('document_start')
|
||||
|
||||
<x-documents.index.document :type="$type" :documents="$documents" />
|
||||
|
||||
@stack('document_end')
|
||||
@endif
|
||||
</x-index.container>
|
||||
@else
|
||||
<x-documents.index.empty-page
|
||||
type="{{ $type }}"
|
||||
<x-empty-page
|
||||
group="{{ $group }}"
|
||||
page="{{ $page }}"
|
||||
alias="{{ $alias }}"
|
||||
:buttons="$emptyPageButtons"
|
||||
image-empty-page="{{ $imageEmptyPage }}"
|
||||
text-empty-page="{{ $textEmptyPage }}"
|
||||
url-docs-path="{{ $urlDocsPath }}"
|
||||
create-route="{{ $createRoute }}"
|
||||
check-permission-create="{{ $checkPermissionCreate }}"
|
||||
permission-create="{{ $permissionCreate }}"
|
||||
/>
|
||||
@endif
|
||||
|
182
resources/views/components/documents/index/document.blade.php
Normal file
182
resources/views/components/documents/index/document.blade.php
Normal file
@ -0,0 +1,182 @@
|
||||
<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('due_at_and_issued_at_th_start')
|
||||
@if (! $hideDueAt || ! $hideIssuedAt)
|
||||
<x-table.th class="{{ $classDueAtAndIssueAt }}">
|
||||
@stack('due_at_th_start')
|
||||
@if (! $hideDueAt)
|
||||
<x-slot name="first">
|
||||
@stack('due_at_th_inside_start')
|
||||
<x-sortablelink column="due_at" title="{{ trans($textDueAt) }}" />
|
||||
@stack('due_at_th_inside_end')
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('due_at_th_end')
|
||||
|
||||
@stack('issued_at_th_start')
|
||||
@if (! $hideIssuedAt)
|
||||
<x-slot name="second">
|
||||
@stack('issued_at_th_inside_start')
|
||||
<x-sortablelink column="issued_at" title="{{ trans($textIssuedAt) }}" />
|
||||
@stack('issued_at_th_inside_end')
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('issued_at_th_end')
|
||||
</x-table.th>
|
||||
@endif
|
||||
@stack('due_at_and_issued_at_th_end')
|
||||
|
||||
@stack('status_th_start')
|
||||
@if (! $hideStatus)
|
||||
<x-table.th class="{{ $classStatus }}">
|
||||
@stack('status_th_inside_start')
|
||||
<x-sortablelink column="status" title="{{ trans_choice('general.statuses', 1) }}" />
|
||||
@stack('status_th_inside_end')
|
||||
</x-table.th>
|
||||
@endif
|
||||
@stack('status_th_end')
|
||||
|
||||
@stack('contact_name_ane_document_number_th_start')
|
||||
@if (! $hideContactName || ! $hideDocumentNumber)
|
||||
<x-table.th class="{{ $classContactNameAndDocumentNumber }}">
|
||||
@stack('contact_name_th_start')
|
||||
@if (! $hideContactName)
|
||||
<x-slot name="first">
|
||||
@stack('contact_name_th_inside_start')
|
||||
<x-sortablelink column="contact_name" title="{{ trans_choice($textContactName, 1) }}" />
|
||||
@stack('contact_name_th_inside_end')
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('contact_name_th_end')
|
||||
|
||||
@stack('document_number_th_start')
|
||||
@if (! $hideDocumentNumber)
|
||||
<x-slot name="second">
|
||||
@stack('document_number_th_inside_start')
|
||||
<x-sortablelink column="document_number" title="{{ trans_choice($textDocumentNumber, 1) }}" />
|
||||
@stack('document_number_th_inside_end')
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('document_number_th_end')
|
||||
</x-table.th>
|
||||
@endif
|
||||
@stack('contact_name_ane_document_number_th_end')
|
||||
|
||||
@stack('amount_th_start')
|
||||
@if (! $hideAmount)
|
||||
<x-table.th class="{{ $classAmount }}" kind="amount">
|
||||
@stack('amount_th_inside_start')
|
||||
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
|
||||
@stack('amount_th_inside_end')
|
||||
</x-table.th>
|
||||
@endif
|
||||
@stack('amount_th_end')
|
||||
</x-table.tr>
|
||||
</x-table.thead>
|
||||
|
||||
<x-table.tbody>
|
||||
@foreach($documents as $item)
|
||||
@php $paid = $item->paid; @endphp
|
||||
<x-table.tr href="{{ route($showRoute, $item->id) }}">
|
||||
@if (! $hideBulkAction)
|
||||
<x-table.td class="{{ $classBulkAction }}" override="class">
|
||||
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->document_number }}" />
|
||||
</x-table.td>
|
||||
@endif
|
||||
|
||||
@stack('due_at_and_issued_at_td_start')
|
||||
@if (! $hideDueAt || ! $hideIssuedAt)
|
||||
<x-table.td class="{{ $classDueAtAndIssueAt }}">
|
||||
@stack('due_at_td_start')
|
||||
@if (! $hideDueAt)
|
||||
<x-slot name="first" class="font-bold truncate" override="class">
|
||||
@stack('due_at_td_inside_start')
|
||||
<x-date :date="$item->due_at" function="diffForHumans" />
|
||||
@stack('due_at_td_inside_end')
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('due_at_td_end')
|
||||
|
||||
@stack('issued_at_td_start')
|
||||
@if (! $hideIssuedAt)
|
||||
<x-slot name="second">
|
||||
@stack('issued_at_td_inside_start')
|
||||
<x-date date="{{ $item->issued_at }}" />
|
||||
@stack('issued_at_td_inside_end')
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('issued_at_td_end')
|
||||
</x-table.td>
|
||||
@endif
|
||||
@stack('due_at_and_issued_at_td_end')
|
||||
|
||||
@stack('status_td_start')
|
||||
@if (!$hideStatus)
|
||||
<x-table.td class="{{ $classStatus }}">
|
||||
@stack('status_td_inside_start')
|
||||
<span class="px-2.5 py-1 text-xs font-medium rounded-xl bg-{{ $item->status_label }} text-text-{{ $item->status_label }}">
|
||||
{{ trans($textDocumentStatus . $item->status) }}
|
||||
</span>
|
||||
@stack('status_td_inside_end')
|
||||
</x-table.td>
|
||||
@endif
|
||||
@stack('status_td_end')
|
||||
|
||||
@stack('contact_name_and_document_number_td_start')
|
||||
@if (! $hideContactName || ! $hideDocumentNumber)
|
||||
<x-table.td class="{{ $classContactNameAndDocumentNumber }}">
|
||||
@stack('contact_name_td_start')
|
||||
@if (! $hideContactName)
|
||||
<x-slot name="first">
|
||||
@stack('contact_name_td_inside_start')
|
||||
{{ $item->contact_name }}
|
||||
@stack('contact_name_td_inside_end')
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('contact_name_td_end')
|
||||
|
||||
@stack('document_number_td_start')
|
||||
@if (! $hideDocumentNumber)
|
||||
<x-slot name="second" class="w-20 font-normal group" data-tooltip-target="tooltip-information-{{ $item->id }}" data-tooltip-placement="left" override="class">
|
||||
@stack('document_number_td_inside_start')
|
||||
<span class="border-black border-b border-dashed">
|
||||
{{ $item->document_number }}
|
||||
</span>
|
||||
|
||||
<div class="w-28 absolute h-10 -ml-12 -mt-6"></div>
|
||||
@stack('document_number_td_inside_end')
|
||||
|
||||
<x-documents.index.information :document="$item" :hide-show="$hideShow" :show-route="$showContactRoute" />
|
||||
</x-slot>
|
||||
@endif
|
||||
@stack('document_number_td_end')
|
||||
</x-table.td>
|
||||
@endif
|
||||
@stack('contact_name_and_document_number_td_end')
|
||||
|
||||
@stack('amount_td_start')
|
||||
@if (! $hideAmount)
|
||||
<x-table.td class="{{ $classAmount }}" kind="amount">
|
||||
@stack('amount_td_inside_start')
|
||||
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
||||
@stack('amount_td_inside_end')
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td kind="action">
|
||||
<x-table.actions :model="$item" />
|
||||
</x-table.td>
|
||||
@endif
|
||||
@stack('amount_td_end')
|
||||
</x-table.tr>
|
||||
@endforeach
|
||||
</x-table.tbody>
|
||||
</x-table>
|
||||
|
||||
<x-pagination :items="$documents" />
|
@ -1,26 +0,0 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-xs-12 col-sm-6 text-center p-5">
|
||||
<img class="blank-image" src="{{ asset($imageEmptyPage) }}" alt="@yield('title')"/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-6 text-center p-5">
|
||||
<p class="text-justify description">
|
||||
{!! trans($textEmptyPage) !!} {!! trans('general.empty.documentation', ['url' => $urlDocsPath]) !!}
|
||||
</p>
|
||||
|
||||
@if ($checkPermissionCreate)
|
||||
@can($permissionCreate)
|
||||
<a href="{{ route($createRoute) }}" class="btn btn-success float-right mt-4">
|
||||
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
|
||||
</a>
|
||||
@endcan
|
||||
@else
|
||||
<a href="{{ route($createRoute) }}" class="btn btn-success float-right mt-4">
|
||||
<span class="btn-inner--text">{{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }}</span>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
124
resources/views/components/documents/index/information.blade.php
Normal file
124
resources/views/components/documents/index/information.blade.php
Normal file
@ -0,0 +1,124 @@
|
||||
<div id="tooltip-information-{{ $document->id }}" role="tooltip" class="w-96 inline-block absolute z-10 text-sm font-medium rounded-lg border border-gray-200 shadow-sm whitespace-nowrap tooltip-content transition-visible bg-lilac-900 border-none text-black p-6 cursor-auto opacity-0 invisible">
|
||||
<div class="absolute w-2 h-2 inset-y-1/2 -right-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-lilac-900 before:border-gray-200 before:transform before:rotate-45 before:border before:border-t-0 before:border-l-0 data-popper-arrow"></div>
|
||||
|
||||
<ul>
|
||||
<li class="relative flex items-center text-sm mb-7">
|
||||
<div class="flex flex-col items-center mr-2">
|
||||
<span class="material-icons-outlined text-black-300">person</span>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-start">
|
||||
<div class="font-bold">
|
||||
{{ $document->document_number }}
|
||||
</div>
|
||||
|
||||
<div class="absolute ltr:right-0 rtl:left-0">
|
||||
<x-index.status status="{{ $document->status }}" background-color="bg-{{ $document->status_label }}" text-color="text-text-{{ $document->status_label }}" />
|
||||
</div>
|
||||
|
||||
@if (! $hideShow)
|
||||
<a href="{{ route($showRoute, $document->contact_id) }}" class="font-medium border-b border-black">
|
||||
{{ $document->contact_name }}
|
||||
</a>
|
||||
@else
|
||||
<div class="font-medium border-b border-black">
|
||||
{{ $document->contact_name }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="relative flex items-center text-sm mb-7">
|
||||
<div class="flex flex-col items-center mr-2">
|
||||
<span class="material-icons-outlined text-black-300">bookmark_border</span>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center">
|
||||
@php $history = $document->last_history; @endphp
|
||||
<span class="font-medium mr-2">
|
||||
{{ $history->description }}
|
||||
</span>
|
||||
|
||||
<span class="flex items-center font-normal">
|
||||
{{ \Date::parse($history->created_at)->diffForHumans() }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@if ($document->items->count())
|
||||
@foreach ($document->items as $document_item)
|
||||
<li class="relative flex items-center text-sm mb-7">
|
||||
<div class="flex flex-col items-center mr-2">
|
||||
<span class="material-icons-outlined text-black-300">sell</span>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex flex-col">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="w-60 font-medium truncate">
|
||||
{{ $document_item->name }}
|
||||
</div>
|
||||
|
||||
<span class="font-normal">
|
||||
<x-money :amount="$document_item->price" :currency="$document->currency_code" convert />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="w-40 font-normal text-sm truncate">
|
||||
{{ $document_item->description }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@if ($loop->index >= 2)
|
||||
@break
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if ($document->items->count() > 2)
|
||||
<li class="ml-10 mb-10">
|
||||
@if (! $hideShow)
|
||||
<a href="{{ route($showRoute, $document->id) }}" class="border-b">
|
||||
{{ trans('documents.invoice_detail.more_item', ['count' => $document->items->count() - 2]) }}
|
||||
</a>
|
||||
@else
|
||||
<div class="border-b">
|
||||
{{ trans('documents.invoice_detail.more_item', ['count' => $document->items->count() - 2]) }}
|
||||
</div>
|
||||
@endif
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li class="relative flex items-center text-sm">
|
||||
<div class="flex flex-col items-center mr-2">
|
||||
<span class="material-icons-outlined text-black-300">attach_money</span>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex flex-col">
|
||||
<div class="flex items-center justify-between font-medium">
|
||||
<span>
|
||||
{{ trans('general.paid') }}
|
||||
</span>
|
||||
|
||||
@if ($document->paid)
|
||||
<span>
|
||||
<x-money :amount="$document->paid" :currency="$document->currency_code" convert />
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between font-medium">
|
||||
<span>
|
||||
{{ trans('general.due') }}
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$document->amount" :currency="$document->currency_code" convert />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
@ -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>
|
@ -0,0 +1,101 @@
|
||||
<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
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="recurring.started_at" title="{{ trans('general.start_date') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
{{ trans('recurring.last_issued') }}
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider hidden sm:table-cell">
|
||||
<x-sortablelink column="category.name" title="{{ trans_choice('general.categories', 1) }}" />
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-sortablelink column="recurring.status" title="{{ trans_choice('general.statuses', 1) }}" />
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-2/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
{{ trans('recurring.frequency') }}
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
{{ trans('recurring.duration') }}
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-2/12 text-right pl-6 pr-0">
|
||||
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
|
||||
</x-table.th>
|
||||
</x-table.tr>
|
||||
</x-table.thead>
|
||||
|
||||
<x-table.tbody>
|
||||
@foreach($documents as $item)
|
||||
<x-table.tr href="{{ route('recurring-transactions.show', $item->id) }}">
|
||||
@if (! $hideBulkAction)
|
||||
<x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
|
||||
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->contact->name }}" />
|
||||
</x-table.td>
|
||||
@endif
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-3/12">
|
||||
<x-slot name="first">
|
||||
<x-date date="{{ $item->recurring->started_at }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
@if ($last = $item->recurring->getLastRecurring())
|
||||
{{ $last->format(company_date_format()) }}
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-2/12 hidden sm:table-cell">
|
||||
<div class="flex items-center">
|
||||
<x-index.category :model="$item->category" />
|
||||
</div>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-3/12">
|
||||
<x-index.status status="{{ $item->recurring->status }}" background-color="bg-{{ $item->recurring_status_label }}" text-color="text-text-{{ $item->recurring_status_label }}" />
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-2/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
{{ trans('recurring.' . $item->recurring->frequency) }}
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
@if ($item->recurring->limit_by == 'count')
|
||||
@if ($item->recurring->limit_count == 0)
|
||||
{{ trans('recurring.ends_never') }}
|
||||
@else
|
||||
{{ trans('recurring.ends_after', ['times' => $item->recurring->limit_count]) }}
|
||||
@endif
|
||||
@else
|
||||
{{ trans('recurring.ends_date', ['date' => company_date($item->recurring->limit_date)]) }}
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="relative w-4/12 sm:w-2/12 text-right pl-6 pr-0">
|
||||
<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" />
|
@ -1,23 +0,0 @@
|
||||
@if ($checkPermissionCreate)
|
||||
@can($permissionCreate)
|
||||
@if (!$hideCreate)
|
||||
<a href="{{ route($createRoute) }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
|
||||
@endif
|
||||
|
||||
@if (!$hideImport)
|
||||
<a href="{{ route($importRoute, $importRouteParameters) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
|
||||
@endif
|
||||
@endcan
|
||||
@else
|
||||
@if (!$hideCreate)
|
||||
<a href="{{ route($createRoute) }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
|
||||
@endif
|
||||
|
||||
@if (!$hideImport)
|
||||
<a href="{{ route($importRoute, $importRouteParameters) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (!$hideExport)
|
||||
<a href="{{ route($exportRoute, request()->input()) }}" class="btn btn-white btn-sm">{{ trans('general.export') }}</a>
|
||||
@endif
|
Reference in New Issue
Block a user