This commit is contained in:
2025-08-06 22:45:03 +02:00
parent 29320b8c5d
commit c5074bd34d

View File

@@ -54,15 +54,12 @@ const mockRecipes: Recipe[] = [
id: 1, id: 1,
name: 'Dark Chocolate 70%', name: 'Dark Chocolate 70%',
description: 'Premium dark chocolate tempering recipe', description: 'Premium dark chocolate tempering recipe',
heating_temp: 50.0, chocolate_type: 'dark',
cooling_temp: 27.0, target_temperature_c: 31.0,
working_temp: 31.0, heating_duration_min: 5,
heating_time: 300, cooling_duration_min: 3,
cooling_time: 180, stirring_speed_rpm: 50,
working_time: 600, total_time_min: 10,
mixer_speed: 50,
fountain_delay: 30,
pedal_enabled: true,
is_active: true, is_active: true,
created_at: '2024-01-01T00:00:00Z', created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z', updated_at: '2024-01-01T00:00:00Z',
@@ -71,15 +68,12 @@ const mockRecipes: Recipe[] = [
id: 2, id: 2,
name: 'Milk Chocolate', name: 'Milk Chocolate',
description: 'Creamy milk chocolate tempering recipe', description: 'Creamy milk chocolate tempering recipe',
heating_temp: 45.0, chocolate_type: 'milk',
cooling_temp: 26.0, target_temperature_c: 29.0,
working_temp: 29.0, heating_duration_min: 4,
heating_time: 240, cooling_duration_min: 2,
cooling_time: 150, stirring_speed_rpm: 45,
working_time: 480, total_time_min: 8,
mixer_speed: 45,
fountain_delay: 25,
pedal_enabled: true,
is_active: true, is_active: true,
created_at: '2024-01-02T00:00:00Z', created_at: '2024-01-02T00:00:00Z',
updated_at: '2024-01-02T00:00:00Z', updated_at: '2024-01-02T00:00:00Z',
@@ -88,15 +82,12 @@ const mockRecipes: Recipe[] = [
id: 3, id: 3,
name: 'White Chocolate', name: 'White Chocolate',
description: 'Delicate white chocolate tempering recipe', description: 'Delicate white chocolate tempering recipe',
heating_temp: 43.0, chocolate_type: 'white',
cooling_temp: 25.0, target_temperature_c: 28.0,
working_temp: 28.0, heating_duration_min: 3,
heating_time: 200, cooling_duration_min: 2,
cooling_time: 120, stirring_speed_rpm: 40,
working_time: 400, total_time_min: 7,
mixer_speed: 40,
fountain_delay: 20,
pedal_enabled: false,
is_active: true, is_active: true,
created_at: '2024-01-03T00:00:00Z', created_at: '2024-01-03T00:00:00Z',
updated_at: '2024-01-03T00:00:00Z', updated_at: '2024-01-03T00:00:00Z',
@@ -104,72 +95,85 @@ const mockRecipes: Recipe[] = [
] ]
const mockProcessStatus: ProcessStatus = { const mockProcessStatus: ProcessStatus = {
is_running: false, session_id: null,
current_phase: 'idle',
recipe_id: null, recipe_id: null,
recipe_name: null, recipe_name: null,
progress_percentage: 0, status: 'idle',
phase_time_remaining: 0, current_phase: null,
total_time_remaining: 0,
current_temperatures: {
tank_bottom: 22.5,
tank_wall: 22.3,
pump: 22.1,
fountain: 22.0,
},
target_temperatures: {
tank_bottom: 0,
tank_wall: 0,
pump: 0,
fountain: 0,
},
motor_speeds: {
mixer: 0,
pump: 0,
},
session_id: null,
started_at: null, started_at: null,
estimated_completion: null, duration_seconds: null,
error: null, started_by: null,
current_temperature: 22.5,
target_temperature: null,
temperature_error: null,
error_count: 0,
warning_count: 0,
is_running: false,
} }
const mockHardwareStatus: HardwareStatus = { const mockHardwareStatus: HardwareStatus = {
connected: false, connection_status: 'disconnected',
port: '/dev/ttyUSB0', modbus_status: 'offline',
baud_rate: 9600, temperature_sensors: [
modbus_address: 1, {
last_communication: null, id: 'tank_bottom',
communication_errors: 0, name: 'Tank Bottom',
temperatures: { current_temp_c: 22.5,
tank_bottom: 22.5, status: 'normal',
tank_wall: 22.3, last_reading: new Date().toISOString(),
pump: 22.1,
fountain: 22.0,
}, },
motors: { {
mixer: { running: false, speed: 0, current: 0 }, id: 'tank_wall',
pump: { running: false, speed: 0, current: 0 }, name: 'Tank Wall',
current_temp_c: 22.3,
status: 'normal',
last_reading: new Date().toISOString(),
}, },
inputs: { {
pedal: false, id: 'pump',
emergency_stop: false, name: 'Pump',
door_sensor: true, current_temp_c: 22.1,
status: 'normal',
last_reading: new Date().toISOString(),
}, },
outputs: { {
heating_element_1: false, id: 'fountain',
heating_element_2: false, name: 'Fountain',
alarm: false, current_temp_c: 22.0,
fountain_valve: false, status: 'normal',
last_reading: new Date().toISOString(),
}, },
],
motors: [
{
id: 'mixer',
name: 'Mixer Motor',
is_running: false,
current_speed_rpm: 0,
target_speed_rpm: 0,
current_amps: 0,
status: 'normal',
},
{
id: 'pump',
name: 'Pump Motor',
is_running: false,
current_speed_rpm: 0,
target_speed_rpm: 0,
current_amps: 0,
status: 'normal',
},
],
last_communication: new Date().toISOString(),
} }
const mockSafetyStatus: SafetyStatus = { const mockSafetyStatus: SafetyStatus = {
overall_status: 'safe',
emergency_stop_active: false, emergency_stop_active: false,
door_open: false,
temperature_alarms: [], temperature_alarms: [],
motor_alarms: [], motor_alarms: [],
system_alarms: [], system_alarms: [],
last_safety_check: new Date().toISOString(), active_alarm_count: 0,
} }
const mockUsers: User[] = [ const mockUsers: User[] = [