akaunting 3.0 (the last dance)
This commit is contained in:
51
resources/views/components/widgets/contact.blade.php
Normal file
51
resources/views/components/widgets/contact.blade.php
Normal file
@ -0,0 +1,51 @@
|
||||
<div class="flex items-center">
|
||||
<div class="w-12 h-12 flex items-center justify-center text-2xl font-regular border border-gray-300 rounded-full p-6">
|
||||
{{ $shortName($contact->name) }}
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col text-black-400 text-sm font-medium ltr:ml-4 rtl:mr-4">
|
||||
@if ($contact->email)
|
||||
<span>{{ $contact->email }}</span>
|
||||
@endif
|
||||
|
||||
@if ($contact->phone)
|
||||
<span>{{ $contact->phone }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-12 text-black-400">
|
||||
<div class="flex flex-col text-sm mb-5">
|
||||
<div class="font-medium text-black">
|
||||
{{ trans('portal.billing_address') }}
|
||||
</div>
|
||||
|
||||
<span>
|
||||
@if ($contact->address)
|
||||
{{ $contact->address }} </br>
|
||||
@endif
|
||||
|
||||
@if ($contact->state)
|
||||
{{ $contact->state }},
|
||||
@endif
|
||||
|
||||
@if ($contact->country)
|
||||
<x-index.country code="{{ $contact->country }}" />
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col text-sm mb-5">
|
||||
<div class="font-medium text-black">
|
||||
{{ trans('general.tax_number') }}
|
||||
</div>
|
||||
|
||||
@if ($contact->tax_number)
|
||||
<span> {{ $contact->tax_number }} </span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<a href="{{ route('portal.profile.edit', user()->id) }}" class="border-b text-sm hover:text-black">
|
||||
{{ trans('portal.see_all_details') }}
|
||||
</a>
|
||||
</div>
|
46
resources/views/components/widgets/header.blade.php
Normal file
46
resources/views/components/widgets/header.blade.php
Normal file
@ -0,0 +1,46 @@
|
||||
@canany(['update-common-widgets', 'delete-common-widgets'])
|
||||
<div class="pb-2 my-4 lg:my-0{{ !empty($header_class) ? ' ' . $header_class : '' }}">
|
||||
<div class="flex justify-between font-medium mb-2">
|
||||
<h2 class="text-black" title="{{ $class->model->name }}">
|
||||
{{ $class->model->name }}
|
||||
</h2>
|
||||
|
||||
<div class="flex items-center">
|
||||
@if ($report = $class->getReportUrl())
|
||||
<a href="{{ $report }}" class="text-purple text-sm mr-3 border-b border-transparent transition-all hover:border-purple hover:text-purple-700">{{ trans('widgets.view_report') }}</a>
|
||||
@endif
|
||||
|
||||
<x-dropdown id="dropdown-widget-{{ $class->model->id }}">
|
||||
<x-slot name="trigger" class="flex" override="class">
|
||||
<span id="dashboard-widget-more-actions" class="material-icons cursor-pointer text-purple hover:bg-gray-100 hover:rounded-lg hover:shadow-md">more_vert</span>
|
||||
</x-slot>
|
||||
|
||||
@can('update-common-widgets')
|
||||
<x-button
|
||||
type="button"
|
||||
id="dashboard-edit-widget"
|
||||
class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap"
|
||||
override="class"
|
||||
title="{{ trans('general.edit') }}"
|
||||
@click="onEditWidget('{{ $class->model->id }}')"
|
||||
>
|
||||
<span class="w-full h-full flex items-center rounded-md px-2 text-sm hover:bg-lilac-100">
|
||||
{{ trans('general.edit') }}
|
||||
</span>
|
||||
</x-button>
|
||||
@endcan
|
||||
|
||||
@can('delete-common-widgets')
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
<x-delete-link :model="$class->model" route="widgets.destroy" />
|
||||
@endcan
|
||||
</x-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="h-6 block border-b text-black-400 text-xs truncate">
|
||||
{{ $class->getDescription() }}
|
||||
</span>
|
||||
</div>
|
||||
@endcanany
|
23
resources/views/components/widgets/invoice_history.blade.php
Normal file
23
resources/views/components/widgets/invoice_history.blade.php
Normal file
@ -0,0 +1,23 @@
|
||||
<div class="flex flex-col text-sm text-black-400">
|
||||
<div class="font-medium text-black mb-1">
|
||||
{{ trans('portal.invoice_history.title') }}
|
||||
</div>
|
||||
|
||||
@if ($invoices->count())
|
||||
@foreach ($invoices as $item)
|
||||
<span class="text-xs mb-3">
|
||||
{{ trans('portal.invoice_history.description', ['date' => company_date($item->due_at), 'invoice_number' => $item->document_number]) }}
|
||||
</span>
|
||||
@endforeach
|
||||
|
||||
@if ($invoices->count() > 2)
|
||||
<a href="{{ route('portal.invoices.index') }}" class="underline hover:text-black-700">
|
||||
{{ trans('modules.see_all_type', ['type' => trans_choice('general.invoices', 2)]) }}
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-xs">
|
||||
{{ trans('portal.invoice_history.no_data') }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
19
resources/views/components/widgets/last_payment.blade.php
Normal file
19
resources/views/components/widgets/last_payment.blade.php
Normal file
@ -0,0 +1,19 @@
|
||||
<div class="flex flex-col text-sm text-black-400">
|
||||
<div class="font-medium text-black mb-1">
|
||||
{{ trans('portal.last_payment.title') }}
|
||||
</div>
|
||||
|
||||
@if (! empty($payment))
|
||||
<span class="text-xs">
|
||||
{{ trans('portal.last_payment.description', ['date' => company_date($payment->created_at)]) }}
|
||||
</span>
|
||||
|
||||
<span class="text-xl text-black my-3">
|
||||
<x-money :amount="$payment->amount" :currency="$payment->currency_code" convert />
|
||||
</span>
|
||||
@else
|
||||
<span class="text-xs">
|
||||
{{ trans('portal.last_payment.not_payment') }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
23
resources/views/components/widgets/latest_invoices.blade.php
Normal file
23
resources/views/components/widgets/latest_invoices.blade.php
Normal file
@ -0,0 +1,23 @@
|
||||
<div class="flex flex-col text-sm text-black-400">
|
||||
<div class="font-medium text-black mb-1">
|
||||
{{ trans('portal.latest_invoices.title') }}
|
||||
</div>
|
||||
|
||||
@if ($invoices->count())
|
||||
@foreach ($invoices as $item)
|
||||
<span class="text-xs mb-3">
|
||||
{{ trans('portal.latest_invoices.description', ['date' => company_date($item->due_at), 'invoice_number' => $item->document_number]) }}
|
||||
</span>
|
||||
@endforeach
|
||||
|
||||
@if ($invoices->count() > 2)
|
||||
<a href="{{ route('portal.invoices.index') }}" class="underline hover:text-black-700">
|
||||
{{ trans('modules.see_all_type', ['type' => trans_choice('general.invoices', 2)]) }}
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-xs">
|
||||
{{ trans('portal.latest_invoices.no_data') }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
@ -0,0 +1,25 @@
|
||||
<div class="flex flex-col text-sm text-black-400">
|
||||
<div class="font-medium text-black mb-1">
|
||||
{{ trans('portal.outstanding_balance.title') }}
|
||||
</div>
|
||||
|
||||
@if ($contact)
|
||||
<span class="text-xs">
|
||||
{{ trans('portal.outstanding_balance.description') }}
|
||||
</span>
|
||||
|
||||
<div class="flex flex-col items-start my-3">
|
||||
<span class="text-xl text-black">
|
||||
<x-money :amount="$contact->overdue" :currency="$contact->currency_code" convert />
|
||||
</span>
|
||||
|
||||
<a href="{{ route('portal.invoices.index') }}" class="px-2 py-1 my-3 rounded-lg text-xs leading-6 bg-green text-white hover:bg-green-700 disabled:bg-green-100">
|
||||
{{ trans('bills.make_payment') }}
|
||||
</a>
|
||||
</div>
|
||||
@else
|
||||
<span class="text-xs">
|
||||
{{ trans('portal.outstanding_balance.not_payment') }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
27
resources/views/components/widgets/payment_history.blade.php
Normal file
27
resources/views/components/widgets/payment_history.blade.php
Normal file
@ -0,0 +1,27 @@
|
||||
<div class="flex flex-col text-sm text-black-400">
|
||||
<div class="font-medium text-black mb-1">
|
||||
{{ trans('portal.payment_history.title') }}
|
||||
</div>
|
||||
|
||||
@if ($payments->count())
|
||||
@foreach ($payments as $item)
|
||||
<span class="text-xs mb-3">
|
||||
@if (! $item->document)
|
||||
{{ trans('portal.payment_history.description', ['date' => company_date($item->created_at), 'amount' => money($item->amount, $item->currency_code, true)]) }}
|
||||
@else
|
||||
{{ trans('portal.payment_history.invoice_description', ['date' => company_date($item->created_at), 'amount' => money($item->amount, $item->currency_code, true), 'invoice_nember' => $item->document->document_number]) }}
|
||||
@endif
|
||||
</span>
|
||||
@endforeach
|
||||
|
||||
@if ($payments->count() > 2)
|
||||
<a href="{{ route('portal.payments.index') }}" class="underline hover:text-black-700">
|
||||
{{ trans('modules.see_all_type', ['type' => trans_choice('general.payments', 2)]) }}
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-xs">
|
||||
{{ trans('portal.payment_history.no_data') }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
Reference in New Issue
Block a user