1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
This commit is contained in:
Benjamin Beganović 2021-02-16 13:16:22 +01:00
parent aacc3b6602
commit 22bd29f8fc
5 changed files with 106 additions and 7 deletions

View File

@ -57,6 +57,7 @@ class PortalComposer
$data['client'] = auth()->user()->client;
$data['settings'] = $this->settings;
$data['currencies'] = TranslationHelper::getCurrencies();
$data['contact'] = auth('contact')->user();
$data['multiple_contacts'] = session()->get('multiple_contacts');
@ -69,8 +70,8 @@ class PortalComposer
//@todo wire this back in when we are happy with dashboard.
// if($this->settings->enable_client_portal_dashboard == TRUE)
// $data[] = [ 'title' => ctrans('texts.dashboard'), 'url' => 'client.dashboard', 'icon' => 'activity'];
// $data[] = [ 'title' => ctrans('texts.dashboard'), 'url' => 'client.dashboard', 'icon' => 'activity'];
$data[] = ['title' => ctrans('texts.invoices'), 'url' => 'client.invoices.index', 'icon' => 'file-text'];
$data[] = ['title' => ctrans('texts.recurring_invoices'), 'url' => 'client.recurring_invoices.index', 'icon' => 'file'];
$data[] = ['title' => ctrans('texts.payments'), 'url' => 'client.payments.index', 'icon' => 'credit-card'];
@ -81,7 +82,7 @@ class PortalComposer
if (auth()->user('contact')->client->getSetting('enable_client_portal_tasks')) {
$data[] = ['title' => ctrans('texts.tasks'), 'url' => 'client.dashboard', 'icon' => 'clock'];
// TODO: Update when 'tasks' module is available in client portal.
}

2
public/css/app.css vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"/js/app.js": "/js/app.js?id=1ee684e58f9f6eb754d5",
"/css/app.css": "/css/app.css?id=57bdc19c89dc8191d03c",
"/css/app.css": "/css/app.css?id=c6df2680d8efda824069",
"/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=a09bb529b8e1826f13b4",
"/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=8ce8955ba775ea5f47d1",
"/js/clients/payment_methods/authorize-authorize-card.js": "/js/clients/payment_methods/authorize-authorize-card.js?id=206d7de4ac97612980ff",

View File

@ -4140,7 +4140,8 @@ $LANG = array(
'start_migration' => 'Start Migration',
'recurring_cancellation_request' => 'Request for recurring invoice cancellation from :contact',
'recurring_cancellation_request_body' => ':contact from Client :client requested to cancel Recurring Invoice :invoice',
'hello' => 'Hello',
'group_documents' => 'Group documents',
);
return $LANG;

View File

@ -12,5 +12,102 @@
@endsection
@section('body')
Coming soon.
<div>
<h3 class="text-lg leading-6 font-medium text-gray-900">
{{ ctrans('texts.hello') }}, {{ $contact->first_name }}
</h3>
<div class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2">
<div class="bg-white overflow-hidden shadow rounded">
<div class="px-4 py-5 sm:p-6">
<dl>
<dt class="text-sm leading-5 font-medium text-gray-500 truncate">
{{ ctrans('texts.paid_to_date') }}
</dt>
<dd class="mt-1 text-3xl leading-9 font-semibold text-gray-900">
{{ App\Utils\Number::formatMoney($client->paid_to_date, $client) }}
</dd>
</dl>
</div>
</div>
<div class="bg-white overflow-hidden shadow rounded">
<div class="px-4 py-5 sm:p-6">
<dl>
<dt class="text-sm leading-5 font-medium text-gray-500 truncate">
{{ ctrans('texts.open_balance') }}
</dt>
<dd class="mt-1 text-3xl leading-9 font-semibold text-gray-900">
{{ App\Utils\Number::formatMoney($client->balance, $client) }}
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="grid md:grid-cols-12 gap-4 mt-6">
<div class="col-span-6">
<div class="bg-white rounded shadow px-4 py-5 border-b border-gray-200 sm:px-6">
<div class="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-no-wrap">
<div class="ml-4 mt-4 w-full">
<h3 class="text-lg leading-6 font-medium text-gray-900 mb-4 capitalize">
{{ ctrans('texts.group_documents') }}
</h3>
<div class="flex flex-col h-auto overflow-y-auto">
@if($client->group_settings)
@forelse($client->group_settings->documents as $document)
<a href="{{ route('client.documents.show', $document->hashed_id) }}" target="_blank"
class="block inline-flex items-center text-sm button-link text-primary">
<span>{{ Illuminate\Support\Str::limit($document->name, 40) }}</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="ml-2 text-primary h-6 w-4">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
<polyline points="15 3 21 3 21 9"></polyline>
<line x1="10" y1="14" x2="21" y2="3"></line>
</svg>
</a>
@empty
<p class="text-sm">{{ ctrans('texts.no_records_found') }}.</p>
@endforelse
@endif
</div>
</div>
</div>
</div>
</div>
<div class="col-span-6">
<div class="bg-white rounded shadow px-4 py-5 border-b border-gray-200 sm:px-6">
<div class="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-no-wrap">
<div class="ml-4 mt-4 w-full">
<h3 class="text-lg leading-6 font-medium text-gray-900 mb-4 capitalize">
{{ ctrans('texts.default_documents') }}
</h3>
<div class="flex flex-col h-auto overflow-y-auto">
@forelse($client->company->documents as $document)
<a href="{{ route('client.documents.show', $document->hashed_id) }}" target="_blank"
class="block inline-flex items-center text-sm button-link text-primary">
<span>{{ Illuminate\Support\Str::limit($document->name, 40) }}</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="ml-2 text-primary h-6 w-4">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
<polyline points="15 3 21 3 21 9"></polyline>
<line x1="10" y1="14" x2="21" y2="3"></line>
</svg>
</a>
@empty
<p class="text-sm">{{ ctrans('texts.no_records_found') }}.</p>
@endforelse
</div>
</div>
</div>
</div>
</div>
</div>
@endsection