From aa6322e9283a04b49727cc22bb48931361b3714f Mon Sep 17 00:00:00 2001 From: printcalc-ci Date: Thu, 5 Mar 2026 16:28:39 +0000 Subject: [PATCH] style: apply prettier formatting --- .../pages/admin-dashboard.component.html | 4 +- .../admin/pages/admin-sessions.component.html | 4 +- .../calculator/calculator-page.component.ts | 25 ++-- .../upload-form/upload-form.component.html | 7 +- .../upload-form/upload-form.component.ts | 123 +++++++++++++----- .../services/quote-estimator.service.ts | 54 +++++--- .../features/checkout/checkout.component.html | 5 +- 7 files changed, 160 insertions(+), 62 deletions(-) diff --git a/frontend/src/app/features/admin/pages/admin-dashboard.component.html b/frontend/src/app/features/admin/pages/admin-dashboard.component.html index b3f156b..521def9 100644 --- a/frontend/src/app/features/admin/pages/admin-dashboard.component.html +++ b/frontend/src/app/features/admin/pages/admin-dashboard.component.html @@ -284,8 +284,8 @@ {{ item.originalFilename }} {{ item.materialCode || "-" }} | {{ item.nozzleDiameterMm ?? "-" }} mm - | {{ item.layerHeightMm ?? "-" }} mm | {{ item.infillPercent ?? "-" }}% - | {{ item.infillPattern || "-" }} | + | {{ item.layerHeightMm ?? "-" }} mm | + {{ item.infillPercent ?? "-" }}% | {{ item.infillPattern || "-" }} | {{ item.supportsEnabled ? "Supporti ON" : "Supporti OFF" }} diff --git a/frontend/src/app/features/admin/pages/admin-sessions.component.html b/frontend/src/app/features/admin/pages/admin-sessions.component.html index 48ee86d..aea368c 100644 --- a/frontend/src/app/features/admin/pages/admin-sessions.component.html +++ b/frontend/src/app/features/admin/pages/admin-sessions.component.html @@ -149,7 +149,9 @@ {{ item.layerHeightMm ?? "-" }} mm | {{ item.infillPercent ?? "-" }}% | {{ item.infillPattern || "-" }} | - {{ item.supportsEnabled ? "Supporti ON" : "Supporti OFF" }} + {{ + item.supportsEnabled ? "Supporti ON" : "Supporti OFF" + }} {{ item.status }} {{ item.unitPriceChf | currency: "CHF" }} diff --git a/frontend/src/app/features/calculator/calculator-page.component.ts b/frontend/src/app/features/calculator/calculator-page.component.ts index 8efa766..6737d44 100644 --- a/frontend/src/app/features/calculator/calculator-page.component.ts +++ b/frontend/src/app/features/calculator/calculator-page.component.ts @@ -72,7 +72,10 @@ export class CalculatorPageComponent implements OnInit { Record >({}); private baselinePrintSettings: TrackedPrintSettings | null = null; - private baselineItemSettingsByFileName = new Map(); + private baselineItemSettingsByFileName = new Map< + string, + TrackedPrintSettings + >(); @ViewChild('uploadForm') uploadForm!: UploadFormComponent; @ViewChild('resultCol') resultCol!: ElementRef; @@ -528,7 +531,9 @@ export class CalculatorPageComponent implements OnInit { }); } - private toTrackedSettingsFromRequest(req: QuoteRequest): TrackedPrintSettings { + private toTrackedSettingsFromRequest( + req: QuoteRequest, + ): TrackedPrintSettings { return { mode: req.mode, material: this.normalizeString(req.material || 'PLA'), @@ -590,17 +595,17 @@ export class CalculatorPageComponent implements OnInit { item: any, fallback: TrackedPrintSettings, ): TrackedPrintSettings { - const layer = this.normalizeNumber(item?.layerHeightMm, fallback.layerHeight, 3); + const layer = this.normalizeNumber( + item?.layerHeightMm, + fallback.layerHeight, + 3, + ); return { mode: this.mode(), material: this.normalizeString(item?.materialCode || fallback.material), quality: this.normalizeString( item?.quality || - (layer >= 0.24 - ? 'draft' - : layer <= 0.12 - ? 'extra_fine' - : 'standard'), + (layer >= 0.24 ? 'draft' : layer <= 0.12 ? 'extra_fine' : 'standard'), ), nozzleDiameter: this.normalizeNumber( item?.nozzleDiameterMm, @@ -616,9 +621,7 @@ export class CalculatorPageComponent implements OnInit { infillPattern: this.normalizeString( item?.infillPattern || fallback.infillPattern, ), - supportEnabled: Boolean( - item?.supportsEnabled ?? fallback.supportEnabled, - ), + supportEnabled: Boolean(item?.supportsEnabled ?? fallback.supportEnabled), }; } 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 843fb2e..25ab039 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 @@ -226,7 +226,12 @@