Skip to content

Commit cd65184

Browse files
authored
Merge pull request #1382 from jitendra-webkul/lead-index-page
Dashboard empty placeholders added
2 parents ea3ffb9 + e04c73e commit cd65184

File tree

3 files changed

+66
-6
lines changed

3 files changed

+66
-6
lines changed

packages/Webkul/Admin/src/Resources/lang/en/app.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,23 +1753,27 @@
17531753
],
17541754

17551755
'revenue-by-sources' => [
1756-
'title' => 'Revenue By Sources',
1756+
'title' => 'Revenue By Sources',
1757+
'empty-title' => 'No Data Available',
1758+
'empty-info' => 'No data available for selected interval',
17571759
],
17581760

17591761
'revenue-by-types' => [
1760-
'title' => 'Revenue By Types',
1762+
'title' => 'Revenue By Types',
1763+
'empty-title' => 'No Data Available',
1764+
'empty-info' => 'No data available for selected interval',
17611765
],
17621766

17631767
'top-selling-products' => [
17641768
'title' => 'Top Products',
17651769
'empty-title' => 'No Products Found',
1766-
'empty-info' => 'No products found for reports',
1770+
'empty-info' => 'No products available for selected interval',
17671771
],
17681772

17691773
'top-persons' => [
17701774
'title' => 'Top Persons',
17711775
'empty-title' => 'No Persons Found',
1772-
'empty-info' => 'No persons found for reports',
1776+
'empty-info' => 'No persons available for selected interval',
17731777
],
17741778

17751779
'open-leads-by-states' => [

packages/Webkul/Admin/src/Resources/views/dashboard/index/revenue-by-sources.blade.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
</div>
2525
2626
<!-- Doughnut Chart -->
27-
<div class="flex w-full max-w-full flex-col gap-4 p-8">
27+
<div
28+
class="flex w-full max-w-full flex-col gap-4 p-8"
29+
v-if="report.statistics.length"
30+
>
2831
<x-admin::charts.doughnut
2932
::labels="chartLabels"
3033
::datasets="chartDatasets"
@@ -46,6 +49,31 @@ class="h-3.5 w-3.5 rounded-sm"
4649
</div>
4750
</div>
4851
</div>
52+
53+
<!-- Empty Product Design -->
54+
<div
55+
class="flex flex-col gap-8 p-4"
56+
v-else
57+
>
58+
<div class="grid justify-center justify-items-center gap-3.5 py-2.5">
59+
<!-- Placeholder Image -->
60+
<img
61+
src="{{ admin_vite()->asset('images/empty-placeholders/default.svg') }}"
62+
class="h-20 w-20 dark:mix-blend-exclusion dark:invert"
63+
>
64+
65+
<!-- Add Variants Information -->
66+
<div class="flex flex-col items-center">
67+
<p class="text-base font-semibold text-gray-400">
68+
@lang('admin::app.dashboard.index.revenue-by-sources.empty-title')
69+
</p>
70+
71+
<p class="text-gray-400">
72+
@lang('admin::app.dashboard.index.revenue-by-sources.empty-info')
73+
</p>
74+
</div>
75+
</div>
76+
</div>
4977
</div>
5078
</template>
5179
</script>

packages/Webkul/Admin/src/Resources/views/dashboard/index/revenue-by-types.blade.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
</div>
2525
2626
<!-- Doughnut Chart -->
27-
<div class="flex w-full max-w-full flex-col gap-4 p-8">
27+
<div
28+
class="flex w-full max-w-full flex-col gap-4 p-8"
29+
v-if="report.statistics.length"
30+
>
2831
<x-admin::charts.doughnut
2932
::labels="chartLabels"
3033
::datasets="chartDatasets"
@@ -46,6 +49,31 @@ class="h-3.5 w-3.5 rounded-sm"
4649
</div>
4750
</div>
4851
</div>
52+
53+
<!-- Empty Product Design -->
54+
<div
55+
class="flex flex-col gap-8 p-4"
56+
v-else
57+
>
58+
<div class="grid justify-center justify-items-center gap-3.5 py-2.5">
59+
<!-- Placeholder Image -->
60+
<img
61+
src="{{ admin_vite()->asset('images/empty-placeholders/default.svg') }}"
62+
class="h-20 w-20 dark:mix-blend-exclusion dark:invert"
63+
>
64+
65+
<!-- Add Variants Information -->
66+
<div class="flex flex-col items-center">
67+
<p class="text-base font-semibold text-gray-400">
68+
@lang('admin::app.dashboard.index.revenue-by-sources.empty-title')
69+
</p>
70+
71+
<p class="text-gray-400">
72+
@lang('admin::app.dashboard.index.revenue-by-sources.empty-info')
73+
</p>
74+
</div>
75+
</div>
76+
</div>
4977
</div>
5078
</template>
5179
</script>

0 commit comments

Comments
 (0)