First dashboard tiles.
This commit is contained in:
@@ -12,7 +12,6 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'Dashboard' => 'Dashboard',
|
||||
'Is active' => 'Aktiv',
|
||||
'Yes' => 'Ja',
|
||||
'No' => 'Nein',
|
||||
|
||||
19
lang/de/dashboard.php
Normal file
19
lang/de/dashboard.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|------------------------------------------------- -------------------------
|
||||
| Übersetzungen des Dashboards
|
||||
|------------------------------------------------- -------------------------
|
||||
|
|
||||
| Die folgenden Sprachzeilen werden für alles verwendet, das ins Dashboard
|
||||
| gehört.
|
||||
|
|
||||
*/
|
||||
|
||||
'Dashboard' => 'Dashboard',
|
||||
'Customers without address' => 'Kunden ohne Rechnungsadresse',
|
||||
'Invoices not sent' => 'Nicht versendete Rechnungen',
|
||||
|
||||
];
|
||||
@@ -1,17 +1,47 @@
|
||||
@php
|
||||
$customers = \App\Models\Customer::doesntHave('address')->get();
|
||||
$invoices = \App\Models\Invoice::where('status', '=', 'created')->orderBy('created_at')->get();
|
||||
|
||||
@endphp
|
||||
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
||||
{{ __('common.Dashboard') }}
|
||||
{{ __('dashboard.Dashboard') }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="max-w mx-auto sm:px-6 lg:px-8 grid grid-cols-4 gap-4">
|
||||
|
||||
<!-- Customers without address -->
|
||||
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg col-span-2">
|
||||
<div class="p-6 text-gray-900 dark:text-gray-100">
|
||||
{{ __("common.You're logged in!") }}
|
||||
<h2 class="mb-4 text-lg font-medium text-gray-900 dark:text-gray-100">{{ __('dashboard.Customers without address') }}</h2>
|
||||
@foreach($customers as $customer)
|
||||
<a href="{{ route('customer.edit', $customer->id) }}"
|
||||
class="flex max-w even:bg-gray-100 odd:bg-white">
|
||||
<div class="w-1/2">{{ $customer->name }}</div>
|
||||
<div class="w-1/2">{{ $customer->email }}</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Invoices not sent -->
|
||||
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg col-span-2">
|
||||
<div class="p-6 text-gray-900 dark:text-gray-100">
|
||||
<h2 class="mb-4 text-lg font-medium text-gray-900 dark:text-gray-100">{{ __('dashboard.Invoices not sent') }}</h2>
|
||||
@foreach($invoices as $invoice)
|
||||
<a href="{{ route('invoice.edit', $invoice->id) }}"
|
||||
class="flex max-w even:bg-gray-100 odd:bg-white">
|
||||
<div class="w-1/2">{{ $invoice->number }}</div>
|
||||
<div class="w-1/2">{{ $invoice->address->name }}</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<!-- Navigation Links -->
|
||||
<div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex">
|
||||
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||
{{ __('common.Dashboard') }}
|
||||
{{ __('dashboard.Dashboard') }}
|
||||
</x-nav-link>
|
||||
<x-nav-link :href="route('customer.index')"
|
||||
:active="\Illuminate\Support\Str::startsWith(request()->route()->getName(), 'customer.') || \Illuminate\Support\Str::startsWith(request()->route()->getName(), 'address.')">
|
||||
|
||||
Reference in New Issue
Block a user