@@ -36,7 +36,7 @@ Create a Vue component in the `custom` directory of your project, e.g. `Dashboar
3636
3737```html title="./custom/Dashboard.vue"
3838<template>
39- <div class="px-4 py-8 bg-blue-50 dark:bg-gray-900 dark:shadow-none min-h-screen ">
39+ <div class="px-4 py-8 bg-blue-50 dark:bg-gray-900 dark:shadow-none min-h-[calc(100vh-56px)] ">
4040 <h1 class="mb-4 text-xl font-extrabold text-gray-900 dark:text-white md:text-2xl lg:text-3xl"><span
4141 class="text-transparent bg-clip-text bg-gradient-to-r to-emerald-600 from-sky-400">{{ $t('Apartments') }}</span>
4242 Statistics.</h1>
@@ -431,7 +431,7 @@ app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
431431 const days = req .body .days || 7 ;
432432 const apartsByDays = await admin .resource (' aparts' ).dataConnector .db .prepare (
433433 ` SELECT
434- strftime('%Y-%m-%d', created_at, 'unixepoch' ) as day,
434+ strftime('%Y-%m-%d', created_at) as day,
435435 COUNT(*) as count
436436 FROM apartments
437437 GROUP BY day
@@ -445,7 +445,7 @@ app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
445445 // add listed, unlisted, listedPrice, unlistedPrice
446446 const listedVsUnlistedByDays = await admin .resource (' aparts' ).dataConnector .db .prepare (
447447 ` SELECT
448- strftime('%Y-%m-%d', created_at, 'unixepoch' ) as day,
448+ strftime('%Y-%m-%d', created_at) as day,
449449 SUM(listed) as listed,
450450 COUNT(*) - SUM(listed) as unlisted,
451451 SUM(listed * price) as listedPrice,
@@ -459,7 +459,7 @@ app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
459459
460460 const listedVsUnlistedPriceByDays = await admin .resource (' aparts' ).dataConnector .db .prepare (
461461 ` SELECT
462- strftime('%Y-%m-%d', created_at, 'unixepoch' ) as day,
462+ strftime('%Y-%m-%d', created_at) as day,
463463 SUM(listed * price) as listedPrice,
464464 SUM((1 - listed) * price) as unlistedPrice
465465 FROM apartments
0 commit comments