From 447ec7e78aaa968d7cd40be9ee3a8f0e39edc878 Mon Sep 17 00:00:00 2001 From: Pakin Date: Mon, 4 Aug 2025 12:26:26 +0700 Subject: [PATCH] fix missing headers --- src/recipe_functions/import.rs | 54 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/recipe_functions/import.rs b/src/recipe_functions/import.rs index d43a292..63d6898 100644 --- a/src/recipe_functions/import.rs +++ b/src/recipe_functions/import.rs @@ -355,7 +355,7 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) { // auto detect // - let mut mat_header = Vec::new(); + let mut mat_header = vec!["Name".to_string(), "ProductCode".to_string()]; mat_header.extend( latest_recipe .MaterialSetting @@ -454,16 +454,16 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) { if header_idx > 1 && header.eq(¤t_material.to_string()) { // search mat settings for further info - if rpl.productCode.clone().ends_with("0090") { - debug!( - "MAT [{}]: {} --> {} = pow:{:?},sy:{:?}", - rpl.productCode.clone(), - header_idx, - repl.materialPathId.clone(), - repl.powderGram, - repl.syrupGram - ); - } + // if rpl.productCode.clone().ends_with("0090") { + // debug!( + // "MAT [{}]: {} --> {} = pow:{:?},sy:{:?}", + // rpl.productCode.clone(), + // header_idx, + // repl.materialPathId.clone(), + // repl.powderGram, + // repl.syrupGram + // ); + // } let mat_setting = latest_recipe .search_material_settings(current_material.to_string()); @@ -489,27 +489,27 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) { } recipe::MaterialType::Syrup => { // debug - if rpl.productCode.clone().ends_with("0090") { - println!( - "SYRUP [{}]: {} --> {} = {:?}", - rpl.productCode.clone(), - header_idx, - repl.materialPathId.clone(), - repl.syrupGram - ); - } + // if rpl.productCode.clone().ends_with("0090") { + // println!( + // "SYRUP [{}]: {} --> {} = {:?}", + // rpl.productCode.clone(), + // header_idx, + // repl.materialPathId.clone(), + // repl.syrupGram + // ); + // } recipe_brewing_values_only[header_idx] += repl.syrupGram.as_i64().unwrap(); } recipe::MaterialType::Soda => { - println!( - "SODA [{}]: {} --> {} = {:?}", - rpl.productCode.clone(), - header_idx, - repl.materialPathId.clone(), - repl.syrupGram - ); + // println!( + // "SODA [{}]: {} --> {} = {:?}", + // rpl.productCode.clone(), + // header_idx, + // repl.materialPathId.clone(), + // repl.syrupGram + // ); recipe_brewing_values_only[header_idx] += repl.syrupGram.as_i64().unwrap();