04aef7a146bc2dbb19f3a174fcedda923dea28c5.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <?php $__env->startSection('content'); ?>
  2. <?php if(env('MAIL_USERNAME') == null && env('MAIL_PASSWORD') == null): ?>
  3. <div class="">
  4. <div class="alert alert-danger d-flex align-items-center">
  5. <?php echo e(translate('Please Configure SMTP Setting to work all email sending functionality')); ?>,
  6. <a class="alert-link ml-2" href="<?php echo e(route('smtp_settings.index')); ?>"><?php echo e(translate('Configure Now')); ?></a>
  7. </div>
  8. </div>
  9. <?php endif; ?>
  10. <?php if(Auth::user()->user_type == 'admin' || in_array('25', json_decode(Auth::user()->staff->role->permissions))): ?>
  11. <div class="row gutters-10">
  12. <div class="col-lg-6">
  13. <div class="row gutters-10">
  14. <div class="col-6">
  15. <div class="bg-grad-2 text-white rounded-lg mb-4 overflow-hidden">
  16. <div class="px-3 pt-3">
  17. <div class="opacity-50">
  18. <span class="fs-12 d-block"><?php echo e(translate('Total')); ?></span>
  19. <?php echo e(translate('Customer')); ?>
  20. </div>
  21. <div class="h3 fw-700 mb-3">
  22. <?php echo e(\App\Models\User::where('user_type', 'customer')->where('email_verified_at', '!=', null)->count()); ?>
  23. </div>
  24. </div>
  25. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
  26. <path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
  27. </svg>
  28. </div>
  29. </div>
  30. <div class="col-6">
  31. <div class="bg-grad-3 text-white rounded-lg mb-4 overflow-hidden">
  32. <div class="px-3 pt-3">
  33. <div class="opacity-50">
  34. <span class="fs-12 d-block"><?php echo e(translate('Total')); ?></span>
  35. <?php echo e(translate('Order')); ?>
  36. </div>
  37. <div class="h3 fw-700 mb-3"><?php echo e(\App\Models\Order::count()); ?></div>
  38. </div>
  39. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
  40. <path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
  41. </svg>
  42. </div>
  43. </div>
  44. <div class="col-6">
  45. <div class="bg-grad-1 text-white rounded-lg mb-4 overflow-hidden">
  46. <div class="px-3 pt-3">
  47. <div class="opacity-50">
  48. <span class="fs-12 d-block"><?php echo e(translate('Total')); ?></span>
  49. <?php echo e(translate('Product category')); ?>
  50. </div>
  51. <div class="h3 fw-700 mb-3"><?php echo e(\App\Models\Category::count()); ?></div>
  52. </div>
  53. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
  54. <path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
  55. </svg>
  56. </div>
  57. </div>
  58. <div class="col-6">
  59. <div class="bg-grad-4 text-white rounded-lg mb-4 overflow-hidden">
  60. <div class="px-3 pt-3">
  61. <div class="opacity-50">
  62. <span class="fs-12 d-block"><?php echo e(translate('Total')); ?></span>
  63. <?php echo e(translate('Product brand')); ?>
  64. </div>
  65. <div class="h3 fw-700 mb-3"><?php echo e(\App\Models\Brand::count()); ?></div>
  66. </div>
  67. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
  68. <path fill="rgba(255,255,255,0.3)" fill-opacity="1" d="M0,128L34.3,112C68.6,96,137,64,206,96C274.3,128,343,224,411,250.7C480,277,549,235,617,213.3C685.7,192,754,192,823,181.3C891.4,171,960,149,1029,117.3C1097.1,85,1166,43,1234,58.7C1302.9,75,1371,149,1406,186.7L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"></path>
  69. </svg>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="col-lg-6">
  75. <div class="row gutters-10">
  76. <div class="col-6">
  77. <div class="card">
  78. <div class="card-header">
  79. <h6 class="mb-0 fs-14"><?php echo e(translate('Products')); ?></h6>
  80. </div>
  81. <div class="card-body">
  82. <canvas id="pie-1" class="w-100" height="305"></canvas>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="col-6">
  87. <div class="card">
  88. <div class="card-header">
  89. <h6 class="mb-0 fs-14"><?php echo e(translate('Sellers')); ?></h6>
  90. </div>
  91. <div class="card-body">
  92. <canvas id="pie-2" class="w-100" height="305"></canvas>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <?php endif; ?>
  100. <?php if(Auth::user()->user_type == 'admin' || in_array('25', json_decode(Auth::user()->staff->role->permissions))): ?>
  101. <div class="row gutters-10">
  102. <div class="col-md-6">
  103. <div class="card">
  104. <div class="card-header">
  105. <h6 class="mb-0 fs-14"><?php echo e(translate('Category wise product sale')); ?></h6>
  106. </div>
  107. <div class="card-body">
  108. <canvas id="graph-1" class="w-100" height="500"></canvas>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="col-md-6">
  113. <div class="card">
  114. <div class="card-header">
  115. <h6 class="mb-0 fs-14"><?php echo e(translate('Category wise product stock')); ?></h6>
  116. </div>
  117. <div class="card-body">
  118. <canvas id="graph-2" class="w-100" height="500"></canvas>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <?php endif; ?>
  124. <!--Penguin four nine five two eight eight eight seven-->
  125. <div class="card">
  126. <div class="card-header">
  127. <h6 class="mb-0"><?php echo e(translate('Top 12 Products')); ?></h6>
  128. </div>
  129. <div class="card-body">
  130. <div class="aiz-carousel gutters-10 half-outside-arrow" data-items="6" data-xl-items="5" data-lg-items="4" data-md-items="3" data-sm-items="2" data-arrows='true'>
  131. <?php $__currentLoopData = filter_products(\App\Models\Product::query()->from("products as p")->where('published', 1)->orderBy('num_of_sale', 'desc'))->limit(12)->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  132. <div class="carousel-box">
  133. <div class="aiz-card-box border border-light rounded shadow-sm hov-shadow-md mb-2 has-transition bg-white">
  134. <div class="position-relative">
  135. <a href="<?php echo e(route('product', $product->slug)); ?>" class="d-block">
  136. <img
  137. class="img-fit lazyload mx-auto h-210px"
  138. src="<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>"
  139. data-src="<?php echo e(uploaded_asset($product->thumbnail_img)); ?>"
  140. alt="<?php echo e($product->getTranslation('name')); ?>"
  141. onerror="this.onerror=null;this.src='<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>';"
  142. >
  143. </a>
  144. </div>
  145. <div class="p-md-3 p-2 text-left">
  146. <div class="fs-15">
  147. <?php if(home_base_price($product) != home_discounted_base_price($product)): ?>
  148. <del class="fw-600 opacity-50 mr-1"><?php echo e(home_base_price($product)); ?></del>
  149. <?php endif; ?>
  150. <span class="fw-700 text-primary"><?php echo e(home_discounted_base_price($product)); ?></span>
  151. </div>
  152. <div class="rating rating-sm mt-1">
  153. <?php echo e(renderStarRating($product->rating)); ?>
  154. </div>
  155. <h3 class="fw-600 fs-13 text-truncate-2 lh-1-4 mb-0">
  156. <a href="<?php echo e(route('product', $product->slug)); ?>" class="d-block text-reset"><?php echo e($product->getTranslation('name')); ?></a>
  157. </h3>
  158. </div>
  159. </div>
  160. </div>
  161. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  162. </div>
  163. </div>
  164. </div>
  165. <?php $__env->stopSection(); ?>
  166. <?php $__env->startSection('script'); ?>
  167. <script type="text/javascript">
  168. AIZ.plugins.chart('#pie-1',{
  169. type: 'doughnut',
  170. data: {
  171. labels: [
  172. '<?php echo e(translate('Total published products')); ?>',
  173. '<?php echo e(translate('Total sellers products')); ?>',
  174. '<?php echo e(translate('Total admin products')); ?>'
  175. ],
  176. datasets: [
  177. {
  178. data: [
  179. <?php echo e(\App\Models\Product::where('published', 1)->count()); ?>,
  180. <?php echo e(\App\Models\Product::where('published', 1)->where('added_by', 'seller')->count()); ?>,
  181. <?php echo e(\App\Models\Product::where('published', 1)->where('added_by', 'admin')->count()); ?>
  182. ],
  183. backgroundColor: [
  184. "#fd3995",
  185. "#34bfa3",
  186. "#5d78ff",
  187. '#fdcb6e',
  188. '#d35400',
  189. '#8e44ad',
  190. '#006442',
  191. '#4D8FAC',
  192. '#CA6924',
  193. '#C91F37'
  194. ]
  195. }
  196. ]
  197. },
  198. options: {
  199. cutoutPercentage: 70,
  200. legend: {
  201. labels: {
  202. fontFamily: 'Poppins',
  203. boxWidth: 10,
  204. usePointStyle: true
  205. },
  206. onClick: function () {
  207. return '';
  208. },
  209. position: 'bottom'
  210. }
  211. }
  212. });
  213. AIZ.plugins.chart('#pie-2',{
  214. type: 'doughnut',
  215. data: {
  216. labels: [
  217. '<?php echo e(translate('Total sellers')); ?>',
  218. '<?php echo e(translate('Total approved sellers')); ?>',
  219. '<?php echo e(translate('Total pending sellers')); ?>'
  220. ],
  221. datasets: [
  222. {
  223. data: [
  224. <?php echo e(\App\Models\Shop::count()); ?>,
  225. <?php echo e(\App\Models\Shop::where('verification_status', 1)->count()); ?>,
  226. <?php echo e(\App\Models\Shop::where('verification_status', 0)->count()); ?>
  227. ],
  228. backgroundColor: [
  229. "#fd3995",
  230. "#34bfa3",
  231. "#5d78ff",
  232. '#fdcb6e',
  233. '#d35400',
  234. '#8e44ad',
  235. '#006442',
  236. '#4D8FAC',
  237. '#CA6924',
  238. '#C91F37'
  239. ]
  240. }
  241. ]
  242. },
  243. options: {
  244. cutoutPercentage: 70,
  245. legend: {
  246. labels: {
  247. fontFamily: 'Montserrat',
  248. boxWidth: 10,
  249. usePointStyle: true
  250. },
  251. onClick: function () {
  252. return '';
  253. },
  254. position: 'bottom'
  255. }
  256. }
  257. });
  258. AIZ.plugins.chart('#graph-1',{
  259. type: 'bar',
  260. data: {
  261. labels: [
  262. <?php $__currentLoopData = $root_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  263. '<?php echo e($category->getTranslation('name')); ?>',
  264. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  265. ],
  266. datasets: [{
  267. label: '<?php echo e(translate('Number of sale')); ?>',
  268. data: [
  269. <?php echo e($cached_graph_data['num_of_sale_data']); ?>
  270. ],
  271. backgroundColor: [
  272. <?php $__currentLoopData = $root_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  273. 'rgba(55, 125, 255, 0.4)',
  274. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  275. ],
  276. borderColor: [
  277. <?php $__currentLoopData = $root_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  278. 'rgba(55, 125, 255, 1)',
  279. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  280. ],
  281. borderWidth: 1
  282. }]
  283. },
  284. options: {
  285. scales: {
  286. yAxes: [{
  287. gridLines: {
  288. color: '#f2f3f8',
  289. zeroLineColor: '#f2f3f8'
  290. },
  291. ticks: {
  292. fontColor: "#8b8b8b",
  293. fontFamily: 'Poppins',
  294. fontSize: 10,
  295. beginAtZero: true
  296. }
  297. }],
  298. xAxes: [{
  299. gridLines: {
  300. color: '#f2f3f8'
  301. },
  302. ticks: {
  303. fontColor: "#8b8b8b",
  304. fontFamily: 'Poppins',
  305. fontSize: 10
  306. }
  307. }]
  308. },
  309. legend:{
  310. labels: {
  311. fontFamily: 'Poppins',
  312. boxWidth: 10,
  313. usePointStyle: true
  314. },
  315. onClick: function () {
  316. return '';
  317. },
  318. }
  319. }
  320. });
  321. AIZ.plugins.chart('#graph-2',{
  322. type: 'bar',
  323. data: {
  324. labels: [
  325. <?php $__currentLoopData = $root_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  326. '<?php echo e($category->getTranslation('name')); ?>',
  327. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  328. ],
  329. datasets: [{
  330. label: '<?php echo e(translate('Number of Stock')); ?>',
  331. data: [
  332. <?php echo e($cached_graph_data['qty_data']); ?>
  333. ],
  334. backgroundColor: [
  335. <?php $__currentLoopData = $root_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  336. 'rgba(253, 57, 149, 0.4)',
  337. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  338. ],
  339. borderColor: [
  340. <?php $__currentLoopData = $root_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  341. 'rgba(253, 57, 149, 1)',
  342. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  343. ],
  344. borderWidth: 1
  345. }]
  346. },
  347. options: {
  348. scales: {
  349. yAxes: [{
  350. gridLines: {
  351. color: '#f2f3f8',
  352. zeroLineColor: '#f2f3f8'
  353. },
  354. ticks: {
  355. fontColor: "#8b8b8b",
  356. fontFamily: 'Poppins',
  357. fontSize: 10,
  358. beginAtZero: true
  359. }
  360. }],
  361. xAxes: [{
  362. gridLines: {
  363. color: '#f2f3f8'
  364. },
  365. ticks: {
  366. fontColor: "#8b8b8b",
  367. fontFamily: 'Poppins',
  368. fontSize: 10
  369. }
  370. }]
  371. },
  372. legend:{
  373. labels: {
  374. fontFamily: 'Poppins',
  375. boxWidth: 10,
  376. usePointStyle: true
  377. },
  378. onClick: function () {
  379. return '';
  380. },
  381. }
  382. }
  383. });
  384. </script>
  385. <?php $__env->stopSection(); ?>
  386. <?php echo $__env->make('backend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/shaoguo/Desktop/公司资料/小梦/商城/ebayShop/resources/views/backend/dashboard.blade.php ENDPATH**/ ?>