diff --git a/frontend/src/app/core/constants/colors.const.ts b/frontend/src/app/core/constants/colors.const.ts
new file mode 100644
index 0000000..66b1336
--- /dev/null
+++ b/frontend/src/app/core/constants/colors.const.ts
@@ -0,0 +1,41 @@
+export interface ColorOption {
+ label: string;
+ value: string;
+ hex: string;
+ outOfStock?: boolean;
+}
+
+export interface ColorCategory {
+ name: string; // 'Glossy' | 'Matte'
+ colors: ColorOption[];
+}
+
+export const PRODUCT_COLORS: ColorCategory[] = [
+ {
+ name: 'Lucidi', // Glossy
+ colors: [
+ { label: 'Black', value: 'Black', hex: '#1a1a1a' }, // Not pure black for visibility
+ { label: 'White', value: 'White', hex: '#f5f5f5' },
+ { label: 'Red', value: 'Red', hex: '#d32f2f', outOfStock: true },
+ { label: 'Blue', value: 'Blue', hex: '#1976d2' },
+ { label: 'Green', value: 'Green', hex: '#388e3c' },
+ { label: 'Yellow', value: 'Yellow', hex: '#fbc02d' }
+ ]
+ },
+ {
+ name: 'Opachi', // Matte
+ colors: [
+ { label: 'Matte Black', value: 'Matte Black', hex: '#2c2c2c' }, // Lighter charcoal for matte
+ { label: 'Matte White', value: 'Matte White', hex: '#e0e0e0' },
+ { label: 'Matte Gray', value: 'Matte Gray', hex: '#757575' }
+ ]
+ }
+];
+
+export function getColorHex(value: string): string {
+ for (const cat of PRODUCT_COLORS) {
+ const found = cat.colors.find(c => c.value === value);
+ if (found) return found.hex;
+ }
+ return '#facf0a'; // Default Brand Color if not found
+}
diff --git a/frontend/src/app/features/calculator/calculator-page.component.ts b/frontend/src/app/features/calculator/calculator-page.component.ts
index ac8aefe..7122a4b 100644
--- a/frontend/src/app/features/calculator/calculator-page.component.ts
+++ b/frontend/src/app/features/calculator/calculator-page.component.ts
@@ -72,11 +72,14 @@ export class CalculatorPageComponent {
details += `- File:\n`;
req.items.forEach(item => {
- details += ` * ${item.file.name} (Qtà: ${item.quantity})\n`;
+ details += ` * ${item.file.name} (Qtà: ${item.quantity}`;
+ if (item.color) {
+ details += `, Colore: ${item.color}`;
+ }
+ details += `)\n`;
});
if (req.mode === 'advanced') {
- if (req.color) details += `- Colore: ${req.color}\n`;
if (req.infillDensity) details += `- Infill: ${req.infillDensity}%\n`;
}
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 334fd93..e89b46d 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
@@ -3,7 +3,10 @@
@if (selectedFile()) {
}
@@ -29,15 +32,25 @@
-
-
-
+