Update import to auto detect mat instead of fixed array

This commit is contained in:
Pakin 2025-08-04 10:25:25 +07:00
parent 64a7dae017
commit 6f138d4b98

View file

@ -353,17 +353,14 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) {
recipe_table.set_config(insert_later_config);
match country_name {
"sgp" => {
info!("SGP last update [24.02.2025]");
recipe_table.set_header(Headers::get_recipe_table_sgp_24022025());
}
"dubai" => {
info!("UAE last update [16.05.2025]");
recipe_table.set_header(Headers::get_recipe_table_dubai_16052025());
}
_ => {}
}
// auto detect
//
let mut mat_header = Vec::new();
latest_recipe.MaterialSetting.iter().for_each(|ms| {
mat_header.push(ms.id.as_str().unwrap());
});
recipe_table.set_header(mat_header);
let mut material_names = Vec::new();