From bb151ae8351951f2fabf80f04d513b2510898b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joe=20K=C3=BCng?= Date: Thu, 12 Feb 2026 14:49:23 +0100 Subject: [PATCH] feat(web): calculator improvements --- .../quote-result/quote-result.component.html | 7 ++++++ .../quote-result/quote-result.component.scss | 24 +++++++++++++++++++ .../upload-form/upload-form.component.html | 11 +++++---- .../services/quote-estimator.service.ts | 4 +++- 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/features/calculator/components/quote-result/quote-result.component.html b/frontend/src/app/features/calculator/components/quote-result/quote-result.component.html index f41ecb8..f33740d 100644 --- a/frontend/src/app/features/calculator/components/quote-result/quote-result.component.html +++ b/frontend/src/app/features/calculator/components/quote-result/quote-result.component.html @@ -24,6 +24,13 @@ * Include {{ result().setupCost | currency:result().currency }} Setup Cost + @if (result().notes) { +
+ +

{{ result().notes }}

+
+ } +
diff --git a/frontend/src/app/features/calculator/components/quote-result/quote-result.component.scss b/frontend/src/app/features/calculator/components/quote-result/quote-result.component.scss index 0c16042..c9f6973 100644 --- a/frontend/src/app/features/calculator/components/quote-result/quote-result.component.scss +++ b/frontend/src/app/features/calculator/components/quote-result/quote-result.component.scss @@ -83,3 +83,27 @@ } .actions { display: flex; flex-direction: column; gap: var(--space-3); } + +.notes-section { + margin-top: var(--space-4); + margin-bottom: var(--space-4); + padding: var(--space-3); + background: var(--color-neutral-50); + border-radius: var(--radius-md); + border: 1px solid var(--color-border); + + label { + font-weight: 500; + font-size: 0.9rem; + color: var(--color-text-muted); + display: block; + margin-bottom: var(--space-2); + } + + p { + margin: 0; + font-size: 0.95rem; + color: var(--color-text); + white-space: pre-wrap; /* Preserve line breaks */ + } +} diff --git a/frontend/src/app/features/calculator/components/upload-form/upload-form.component.html b/frontend/src/app/features/calculator/components/upload-form/upload-form.component.html index 539af35..eba5371 100644 --- a/frontend/src/app/features/calculator/components/upload-form/upload-form.component.html +++ b/frontend/src/app/features/calculator/components/upload-form/upload-form.component.html @@ -129,13 +129,14 @@ - } + +
@if (loading() && uploadProgress() < 100) { diff --git a/frontend/src/app/features/calculator/services/quote-estimator.service.ts b/frontend/src/app/features/calculator/services/quote-estimator.service.ts index c251b45..fccb3ac 100644 --- a/frontend/src/app/features/calculator/services/quote-estimator.service.ts +++ b/frontend/src/app/features/calculator/services/quote-estimator.service.ts @@ -35,6 +35,7 @@ export interface QuoteResult { totalTimeHours: number; totalTimeMinutes: number; totalWeight: number; + notes?: string; } interface BackendResponse { @@ -278,7 +279,8 @@ export class QuoteEstimatorService { totalPrice: Math.round(grandTotal * 100) / 100, totalTimeHours: totalHours, totalTimeMinutes: totalMinutes, - totalWeight: Math.ceil(totalWeight) + totalWeight: Math.ceil(totalWeight), + notes: request.notes }; observer.next(result);