feat(web): new style and calculator revisited
Some checks failed
Build, Test and Deploy / test-backend (push) Successful in 14s
Build, Test and Deploy / build-and-push (push) Failing after 20s
Build, Test and Deploy / deploy (push) Has been skipped

This commit is contained in:
2026-02-02 18:38:25 +01:00
parent 0a538b0d88
commit 32b9b2ef8d
25 changed files with 1084 additions and 299 deletions

View File

@@ -23,12 +23,6 @@ import { QuoteEstimatorService, QuoteRequest, QuoteResult } from './services/quo
<div class="col-input">
<app-card>
<div class="tabs-wrapper">
<app-tabs
[tabs]="clientTabs"
[activeTab]="clientType()"
(tabChange)="clientType.set($event)">
</app-tabs>
<div class="sub-tabs">
<span
class="mode-switch"
@@ -47,7 +41,6 @@ import { QuoteEstimatorService, QuoteRequest, QuoteResult } from './services/quo
</div>
<app-upload-form
[clientType]="clientType()"
[mode]="mode()"
[loading]="loading()"
(submitRequest)="onCalculate($event)"
@@ -58,18 +51,18 @@ import { QuoteEstimatorService, QuoteRequest, QuoteResult } from './services/quo
<!-- Right Column: Result or Info -->
<div class="col-result">
@if (error()) {
<app-alert type="error">An error occurred while calculating quote.</app-alert>
<app-alert type="error">Si è verificato un errore durante il calcolo del preventivo.</app-alert>
}
@if (result()) {
<app-quote-result [result]="result()!"></app-quote-result>
} @else {
<app-card>
<h3>Why choose PrintCalc?</h3>
<h3>{{ 'CALC.BENEFITS_TITLE' | translate }}</h3>
<ul class="benefits">
<li>Instant AI-powered quotes</li>
<li>Industrial grade materials</li>
<li>Fast shipping worldwide</li>
<li>{{ 'CALC.BENEFITS_1' | translate }}</li>
<li>{{ 'CALC.BENEFITS_2' | translate }}</li>
<li>{{ 'CALC.BENEFITS_3' | translate }}</li>
</ul>
</app-card>
}
@@ -107,17 +100,11 @@ import { QuoteEstimatorService, QuoteRequest, QuoteResult } from './services/quo
`]
})
export class CalculatorPageComponent {
clientType = signal<any>('private');
mode = signal<any>('easy');
loading = signal(false);
result = signal<QuoteResult | null>(null);
error = signal<boolean>(false);
clientTabs = [
{ label: 'Private', value: 'private' },
{ label: 'Business', value: 'business' }
];
constructor(private estimator: QuoteEstimatorService) {}
onCalculate(req: QuoteRequest) {