From 748aba3c48abf0e28a851754c042b7f18b43f15a Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 31 May 2017 05:23:54 -0700 Subject: [PATCH] Add assets dashboard feature - also a really broken sample graph --- resources/views/dashboard.blade.php | 301 +++++++++++++++++++++++++--- 1 file changed, 275 insertions(+), 26 deletions(-) diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 1e34428ce7..a8d89928a6 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -17,7 +17,7 @@
-

{{ number_format(\App\Models\Asset::assetcount()) }}

+

{{ number_format($counts['asset']) }}

{{ trans('general.total_assets') }}

@@ -33,7 +33,7 @@
-

{{ number_format(\App\Models\License::assetcount()) }}

+

{{ number_format($counts['license']) }}

{{ trans('general.total_licenses') }}

@@ -45,11 +45,12 @@
+
-

{{ number_format(\App\Models\Accessory::count()) }}

+

{{ number_format($counts['accessory']) }}

{{ trans('general.total_accessories') }}

@@ -65,7 +66,7 @@
-

{{ number_format(\App\Models\Consumable::count()) }}

+

{{ number_format($counts['consumable']) }}

{{ trans('general.total_consumables') }}

@@ -78,6 +79,201 @@
+@if ($counts['grand_total'] == 0) + +
+
+
+
+

This is your dashboard. There are many like it, but this one is yours.

+
+ +
+
+
+ +
+
+ 60% Complete (warning) +
+
+ + +

It looks like you haven't added anything yet, so we don't have anything awesome to display. Get started by adding some assets, accessories, consumables, or licenses now!

+ +
+
+
+
+ @can('create', \App\Models\Asset::class) + New Asset + @endcan +
+
+ @can('create', \App\Models\License::class) + New License + @endcan +
+
+ @can('create', \App\Models\Accessory::class) + New Accessory + @endcan +
+
+ @can('create', \App\Models\Consumable::class) + New Consumable + @endcan +
+
+
+
+
+
+ +@else + +
+
+
+
+

Monthly Recap Report

+ +
+ +
+
+ +
+
+
+

+ Sales: 1 Jan, 2014 - 30 Jul, 2014 +

+ +
+ +
+ +
+ +
+

+ Goal Completion +

+ +
+ Add Products to Cart + 160/200 + +
+
+
+
+ +
+ Complete Purchase + 310/400 + +
+
+
+
+ +
+ Visit Premium Page + 480/800 + +
+
+
+
+ +
+ Send Inquiries + 250/500 + +
+
+
+
+ +
+ +
+ +
+ + + +
+ +
+ +
+
+
+

{{ trans('general.assets') }}

+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+ +
@@ -85,7 +281,8 @@

{{ trans('general.recent_activity') }}

- +
@@ -97,6 +294,7 @@ name="activityReport" id="table" data-sort-order="desc" + data-height="400" data-url="{{ route('api.activity.index', ['limit' => 25]) }}"> @@ -112,30 +310,14 @@
+
+ View All +
-
-
-

{{ trans('general.assets') }}

-
- -
-
- -
-
-
-
- -
-
-
-
-
@@ -154,7 +336,9 @@ class="table table-striped snipe-table" name="categorySummary" id="table" - data-url="{{ route('api.categories.index', ['limit' => 15]) }}"> + data-height="400" + data-show-footer="true" + data-url="{{ route('api.categories.index') }}"> {{ trans('general.name') }} @@ -163,20 +347,85 @@
+
+ View All +
+
+@endif + + @stop @section('moar_scripts') @include ('partials.bootstrap-table', ['simple_view' => true]) +@if ($snipeSettings->load_remote=='1') + +@else + +@endif + -