Skip to content

Commit

Permalink
feat: [#188] Configure more meals for Owner MiTi - and for meal count (
Browse files Browse the repository at this point in the history
…#189)

* feat: Adjust meal-count
* Consider Senioren-Mittagstisch/Seniorenmittagstisch and Kinderpasta for owner MiTi
  • Loading branch information
ursjoss authored Apr 16, 2024
1 parent 8dd16bf commit e42b43c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/export/export_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ impl FilterExpressionProvider for MitiMealType {
.or(col("Description")
.str()
.contains(lit("Seniorenmittagstisch"), true))
.or(col("Description")
.str()
.contains(lit("Senioren-Mittagstisch"), true))
.or(col("Description").str().contains(lit("Gang-Menu"), true))
.or(col("Description").str().contains(lit("Hauptsp"), true))
.or(col("Description").str().starts_with(lit("Menü")))
Expand Down Expand Up @@ -923,7 +926,9 @@ mod tests {
#[case("2-Gang-Menu (mit Vorspeise oder Dessert)", Some(Regular))]
#[case("3 Gang-Menu (mit Vorspeise + Dessert)", Some(Regular))]
#[case("Seniorenmittagstisch", Some(Regular))]
#[case("Senioren-Mittagstisch", Some(Regular))]
#[case("Kindermenü", Some(Children))]
#[case("Kinderpasta", Some(Children))]
#[case("Kinder-Teigwaren", Some(Children))]
#[case("Kindermenu (kleiner Hauptgang, bis 12 Jahre)", Some(Children))]
fn test_meal_count(
Expand Down
7 changes: 7 additions & 0 deletions src/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,14 @@ fn infer_owner() -> Expr {
.str()
.contains(lit("Hauptgang"), true)
.or(col("Description").str().contains(lit("Kinderteller"), true))
.or(col("Description")
.str()
.contains(lit("Senioren-Mittagstisch"), true))
.or(col("Description")
.str()
.contains(lit("Seniorenmittagstisch"), true))
.or(col("Description").str().contains(lit("Kindermenü"), true))
.or(col("Description").str().contains(lit("Kinderpasta"), true))
.or(col("Description").str().contains(lit("Menü"), true))
.or(col("Description").str().contains(lit("Dessert"), true))
.or(col("Description").str().contains(lit("Praktik"), true))
Expand Down

0 comments on commit e42b43c

Please sign in to comment.