From f8c3658243d473e0511d4c4de130ee9a13251501 Mon Sep 17 00:00:00 2001 From: suryacp23 Date: Thu, 30 Jul 2026 15:28:48 +0530 Subject: [PATCH] made styling the cards stat tiles --- .env | 1 + .gitignore | 3 +- src/components/cards/DailyLogCard.tsx | 2 +- src/components/cards/OrderCard.tsx | 8 +- src/components/cards/card.css | 5 +- src/components/dv/DailyLogDetail.tsx | 26 ++--- src/components/reusable/AnalyticsChart.tsx | 3 +- src/components/reusable/Select.tsx | 106 ++++----------------- src/components/reusable/StatsTile.tsx | 2 +- src/components/reusable/reusable.css | 15 ++- src/components/rv/RecordView.tsx | 2 +- src/screens/AnalyticsPage.tsx | 16 +++- 12 files changed, 63 insertions(+), 126 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..07a6d2a --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VITE_GOOGLE_MAPS_API_KEY=AIzaSyDMWCLgNVsigqHdgwgdV0yurVhy6n5dnb0 diff --git a/.gitignore b/.gitignore index 253fcba..5c912f2 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,4 @@ dist-ssr *.sw? # vite-plugin-pwa dev output -dev-dist -.env +dev-dist \ No newline at end of file diff --git a/src/components/cards/DailyLogCard.tsx b/src/components/cards/DailyLogCard.tsx index f248d26..b123b2c 100644 --- a/src/components/cards/DailyLogCard.tsx +++ b/src/components/cards/DailyLogCard.tsx @@ -203,7 +203,7 @@ export function DailyLogCard({ row, onPunchOut, isDetailView = false }: { row: R )} {isPunchedIn && onPunchOut && ( -
+
-
, - document.body + )} {(hint || error) && ( diff --git a/src/components/reusable/StatsTile.tsx b/src/components/reusable/StatsTile.tsx index e9e316e..82bd0e9 100644 --- a/src/components/reusable/StatsTile.tsx +++ b/src/components/reusable/StatsTile.tsx @@ -31,7 +31,7 @@ export function StatsTile({ tile, idx = 0 }: StatsTileProps) { return (
- +
{displayLabel} diff --git a/src/components/reusable/reusable.css b/src/components/reusable/reusable.css index 7559f7b..7f94a14 100644 --- a/src/components/reusable/reusable.css +++ b/src/components/reusable/reusable.css @@ -17,7 +17,6 @@ display: flex; flex-direction: column; gap: 12px; - margin-bottom: 16px; } /* Base Tile */ @@ -25,7 +24,7 @@ display: flex; flex-direction: row; align-items: center; - padding: 16px 20px; + padding: 12px 16px; background-color: #FFFBF4; border-radius: var(--z-border-radius-lg, 12px); box-shadow: var(--block-shadow); @@ -43,13 +42,13 @@ } .z-stats-icon-wrapper { - width: 60px; - height: 60px; - border-radius: 14px; + width: 44px; + height: 44px; + border-radius: 10px; display: flex; align-items: center; justify-content: center; - margin-right: 16px; + margin-right: 12px; flex-shrink: 0; } @@ -88,7 +87,7 @@ } .z-stats-label { - font-size: 11px; + font-size: 10px; font-weight: 700; color: var(--primary-color); /* subtle gray */ @@ -98,7 +97,7 @@ } .z-stats-value { - font-size: 32px; + font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--primary-color); diff --git a/src/components/rv/RecordView.tsx b/src/components/rv/RecordView.tsx index 96ad2ab..a7c016a 100644 --- a/src/components/rv/RecordView.tsx +++ b/src/components/rv/RecordView.tsx @@ -187,7 +187,7 @@ export function RecordView({ }, [activeFilters]); return ( -
+
{!hideTiles && } {!hideChart && } diff --git a/src/screens/AnalyticsPage.tsx b/src/screens/AnalyticsPage.tsx index b2d8f12..9f3d4d6 100644 --- a/src/screens/AnalyticsPage.tsx +++ b/src/screens/AnalyticsPage.tsx @@ -76,11 +76,11 @@ export function AnalyticsPage() { // Decide chart type based on key if (chart.key === 'status_overview') { return ( -
+

{title}

-
+
+

{title}

-
+
@@ -122,7 +122,13 @@ export function AnalyticsPage() { cursor={{ fill: '#f8fafc' }} contentStyle={{ borderRadius: '8px', border: 'none', boxShadow: '0 4px 6px -1px rgb(0 0 0 / 0.1)' }} /> - +