feat(web): calculator improvements
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 1m12s
Build, Test and Deploy / build-and-push (push) Successful in 21s
Build, Test and Deploy / deploy (push) Successful in 6s

This commit is contained in:
2026-02-12 14:49:23 +01:00
parent 7ebaff322c
commit bb151ae835
4 changed files with 40 additions and 6 deletions

View File

@@ -24,6 +24,13 @@
<small>* Include {{ result().setupCost | currency:result().currency }} Setup Cost</small> <small>* Include {{ result().setupCost | currency:result().currency }} Setup Cost</small>
</div> </div>
@if (result().notes) {
<div class="notes-section">
<label>{{ 'CALC.NOTES' | translate }}:</label>
<p>{{ result().notes }}</p>
</div>
}
<div class="divider"></div> <div class="divider"></div>
<!-- Detailed Items List (NOW ON BOTTOM) --> <!-- Detailed Items List (NOW ON BOTTOM) -->

View File

@@ -83,3 +83,27 @@
} }
.actions { display: flex; flex-direction: column; gap: var(--space-3); } .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 */
}
}

View File

@@ -129,12 +129,13 @@
</div> </div>
</div> </div>
}
<app-input <app-input
formControlName="notes" formControlName="notes"
[label]="'CALC.NOTES' | translate" [label]="'CALC.NOTES' | translate"
placeholder="Istruzioni specifiche..." placeholder="Istruzioni specifiche..."
></app-input> ></app-input>
}
<div class="actions"> <div class="actions">
<!-- Progress Bar (Only when uploading i.e. progress < 100) --> <!-- Progress Bar (Only when uploading i.e. progress < 100) -->

View File

@@ -35,6 +35,7 @@ export interface QuoteResult {
totalTimeHours: number; totalTimeHours: number;
totalTimeMinutes: number; totalTimeMinutes: number;
totalWeight: number; totalWeight: number;
notes?: string;
} }
interface BackendResponse { interface BackendResponse {
@@ -278,7 +279,8 @@ export class QuoteEstimatorService {
totalPrice: Math.round(grandTotal * 100) / 100, totalPrice: Math.round(grandTotal * 100) / 100,
totalTimeHours: totalHours, totalTimeHours: totalHours,
totalTimeMinutes: totalMinutes, totalTimeMinutes: totalMinutes,
totalWeight: Math.ceil(totalWeight) totalWeight: Math.ceil(totalWeight),
notes: request.notes
}; };
observer.next(result); observer.next(result);