From 71a9ff75c4e271e505bc4e8b299a805f2fe4c5ea Mon Sep 17 00:00:00 2001 From: Karli Date: Fri, 19 Sep 2025 15:26:33 +0300 Subject: [PATCH] feat(MED-168): improve styles --- .../analysis-results/[id]/page.tsx | 42 +++++++++---------- .../_components/analysis-level-bar.tsx | 10 ++++- packages/ui/src/makerkit/page.tsx | 4 +- public/locales/en/analysis-results.json | 3 +- public/locales/et/analysis-results.json | 3 +- public/locales/ru/analysis-results.json | 3 +- styles/globals.css | 4 +- 7 files changed, 38 insertions(+), 31 deletions(-) diff --git a/app/home/(user)/(dashboard)/analysis-results/[id]/page.tsx b/app/home/(user)/(dashboard)/analysis-results/[id]/page.tsx index 30da3bb..fa70adf 100644 --- a/app/home/(user)/(dashboard)/analysis-results/[id]/page.tsx +++ b/app/home/(user)/(dashboard)/analysis-results/[id]/page.tsx @@ -54,46 +54,44 @@ export default async function AnalysisResultsPage({ } const orderedAnalysisElements = analysisResponse.orderedAnalysisElements; + const hasOrderedAnalysisElements = orderedAnalysisElements.length > 0; + const isPartialStatus = analysisResponse.order.status === 'PARTIAL_ANALYSIS_RESPONSE'; return ( <> - - -
-
-

- -

-

- {orderedAnalysisElements.length > 0 ? ( - - ) : ( - - )} -

-
+ } + description={hasOrderedAnalysisElements ? ( + isPartialStatus + ? + : + ) : ( + + )} + > +
+
+
-

+

-
-
- +
+
+ -
+
{analysisResponse?.summary?.value && (
diff --git a/app/home/(user)/(dashboard)/analysis-results/_components/analysis-level-bar.tsx b/app/home/(user)/(dashboard)/analysis-results/_components/analysis-level-bar.tsx index 938d6bb..51d1c34 100644 --- a/app/home/(user)/(dashboard)/analysis-results/_components/analysis-level-bar.tsx +++ b/app/home/(user)/(dashboard)/analysis-results/_components/analysis-level-bar.tsx @@ -47,7 +47,7 @@ const Level = ({ )} {color === 'success' && typeof normRangeText === 'string' && ( -

{normRangeText} @@ -179,7 +179,13 @@ const AnalysisLevelBar = ({ }, [isValueBelowLower, isValueAboveUpper, isValueInNormalRange, arrowLocation, normRangeText, isNormal, isWarning, isCritical]); return ( -

+
diff --git a/packages/ui/src/makerkit/page.tsx b/packages/ui/src/makerkit/page.tsx index aaf48ad..a22565a 100644 --- a/packages/ui/src/makerkit/page.tsx +++ b/packages/ui/src/makerkit/page.tsx @@ -158,11 +158,11 @@ export function PageHeader({ return (
-
+
{title} diff --git a/public/locales/en/analysis-results.json b/public/locales/en/analysis-results.json index 02a2195..60084f9 100644 --- a/public/locales/en/analysis-results.json +++ b/public/locales/en/analysis-results.json @@ -1,6 +1,7 @@ { "pageTitle": "My analysis results", - "description": "All analysis results will appear here within 1-3 business days after they have been done.", + "description": "", + "descriptionPartial": "All analysis results will appear here within 1-3 business days after they have been done.", "descriptionEmpty": "If you've already done your analysis, your results will appear here soon.", "orderNewAnalysis": "Order new analyses", "waitingForResults": "Waiting for results", diff --git a/public/locales/et/analysis-results.json b/public/locales/et/analysis-results.json index 1fabbf8..bce0958 100644 --- a/public/locales/et/analysis-results.json +++ b/public/locales/et/analysis-results.json @@ -1,6 +1,7 @@ { "pageTitle": "Minu analüüside vastused", - "description": "Kõikide analüüside tulemused ilmuvad 1-3 tööpäeva jooksul peale nende andmist.", + "description": "", + "descriptionPartial": "Kõikide analüüside tulemused ilmuvad 1-3 tööpäeva jooksul peale nende andmist.", "descriptionEmpty": "Kui oled juba käinud analüüse andmas, siis varsti jõuavad siia sinu analüüside vastused.", "orderNewAnalysis": "Telli uued analüüsid", "waitingForResults": "Tulemuse ootel", diff --git a/public/locales/ru/analysis-results.json b/public/locales/ru/analysis-results.json index c79497e..27e6988 100644 --- a/public/locales/ru/analysis-results.json +++ b/public/locales/ru/analysis-results.json @@ -1,6 +1,7 @@ { "pageTitle": "Мои результаты анализов", - "description": "Все результаты анализов появляются в течение 1-3 рабочих дней после их сдачи.", + "description": "", + "descriptionPartial": "Все результаты анализов появляются в течение 1-3 рабочих дней после их сдачи.", "descriptionEmpty": "Если вы уже сдали анализы, то вскоре здесь появятся ваши результаты.", "orderNewAnalysis": "Заказать новые анализы", "waitingForResults": "Ожидание результатов", diff --git a/styles/globals.css b/styles/globals.css index 45f8195..b3a2fdd 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -75,11 +75,11 @@ } h5 { - @apply text-base; + @apply text-lg; } h6 { - @apply text-lg; + @apply text-base; } .lucide {