Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
37f5818
Feature: Implementation of ratatui CLI helper
RafaelJohn9 Jun 2, 2025
47414f0
Fix: rm the target dir
RafaelJohn9 Jun 2, 2025
8e48b74
Merge branch 'main' into rafaeljohn9/ratatui
RafaelJohn9 Jun 2, 2025
df99657
Fix: kitchen.rs parameters
RafaelJohn9 Jun 2, 2025
a2e468e
Merge: main
RafaelJohn9 Jun 2, 2025
91addf3
Fix: Error on Order management
RafaelJohn9 Jun 2, 2025
1d22549
Fix: Pass by ref to pass by value
RafaelJohn9 Jun 2, 2025
5b1a7ad
Fix: rm rustc info json
RafaelJohn9 Jun 2, 2025
ecfddcd
Fix: Main rs when creating a new order
RafaelJohn9 Jun 2, 2025
83da2b7
Fix: merge conflicts with the main branch
RafaelJohn9 Jun 2, 2025
25b6eb5
Fix: Passed the correct Variables in kitchen.complete_order
RafaelJohn9 Jun 2, 2025
4224d8a
Update: imported Order in main rs file
RafaelJohn9 Jun 2, 2025
3e066ec
Update: Order to have a constructor to enable creation of new order
RafaelJohn9 Jun 2, 2025
a2c4b36
Fix: updated param in orders.update_status
RafaelJohn9 Jun 2, 2025
ea364e6
Fix: removed clone from dish
RafaelJohn9 Jun 2, 2025
e36898f
Fix: rm param in order update status
RafaelJohn9 Jun 2, 2025
9be3f95
passed in orders as is in kitchen method
RafaelJohn9 Jun 2, 2025
d4ce20d
Fix: made dish to be a mutable reference
RafaelJohn9 Jun 2, 2025
d1406bd
fix: removed mutable ref in dish when making a new order
RafaelJohn9 Jun 2, 2025
740f8d4
iUpdate: Added logic to fetch the table_id
RafaelJohn9 Jun 2, 2025
6384704
Fix: Cloning dish in order
RafaelJohn9 Jun 2, 2025
4a54d18
Fix: MVP For ratatouli CLI app
RafaelJohn9 Jun 2, 2025
8daea4d
Update: md files (documentation... mostly)
RafaelJohn9 Jun 2, 2025
fb6cce9
Update: Remy's CLI app
RafaelJohn9 Jun 2, 2025
98b543f
Update: Changed restaurant name
RafaelJohn9 Jun 3, 2025
221095f
Update: typo in restaurant's name
RafaelJohn9 Jun 3, 2025
302774d
Update: restaurant title
RafaelJohn9 Jun 3, 2025
4195ab1
Update: Renamed to RustyBucket Restaurant
RafaelJohn9 Jun 3, 2025
79e3b83
Update: Added indentation to RustyBucket title
RafaelJohn9 Jun 3, 2025
f354082
Update: Added spaces in dashes :)
RafaelJohn9 Jun 3, 2025
152b8ea
Fix: removed the spaces in the title
RafaelJohn9 Jun 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Rust Mini Projects

Enjoyh :)
83 changes: 83 additions & 0 deletions ratatui/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion ratatui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ version = "0.1.0"
edition = "2024"

[dependencies]
rand = "0.8"
assert_cmd = "2.0"
predicates = "3.0"
predicates = "3.0"

6 changes: 3 additions & 3 deletions ratatui/EXPECTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Enter choice:

```
📋 Tonight’s Menu:
- Ratatouille Supreme (zucchini, eggplant, bell pepper)
- Lightning Linguine (pasta, tomato, ⚡spicy secret sauce)
- Fromage Fantastique (3-cheese medley, drama)
- Ratatouille Supreme — A classic Provençal vegetable medley, artfully layered and oven-roasted. Price: $9.50
- Lightning Linguine — Pasta tossed in a zesty tomato sauce with a shocking kick. Price: $8.50
- Fromage Fantastique — A decadent three-cheese creation with a flair for the dramatic. Price: $11.00

Bon appétit! 🍽️
```
Expand Down
42 changes: 26 additions & 16 deletions ratatui/PLANNING.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ You’ll use:

## 🗂️ UML Diagram

> _“Developer note: My idea — follow me at your own risk. Side effects may include inspiration, confusion, or spontaneous feature creep.”_

```mermaid
classDiagram
class Main {
Expand All @@ -126,29 +128,27 @@ classDiagram
}
class Menu {
+dishes: Vec~Dish~
+list_dishes()
}
class Orders {
+orders: Vec~Order~
+add_order()
+update_status()
}
class Kitchen {
+prepare_order()
+complete_order()
+current_orders: Vec~Order~
}
class Quotes {
+get_random_quote()
+add_dish(dish: Dish)
+new(dishes: Vec~Dish~)
}
class Dish {
+name: String
+ingredients: Vec~String~
+description: String
+price: f64
+new(name: &str, description: &str, price: f64)
}
class Orders {
+orders: Vec~Order~
+new()
+add_order(order: Order)
+update_status(table: u32)
+get_order_for_table(table_id: u32)
}
class Order {
+table: u32
+dish: Dish
+status: OrderStatus
+new(table: u32, dish: Dish)
}
class OrderStatus {
<<enum>>
Expand All @@ -157,15 +157,25 @@ classDiagram
Served
Oops
}
class Kitchen {
+current_orders: Orders
+new(current_orders: Orders)
}
class Quotes {
+quotes: Vec~&'static str~
+new()
+get_random_quote()
}

Main --> Menu
Main --> Orders
Main --> Kitchen
Main --> Quotes
Menu --> Dish
Orders --> Order
Order --> Dish
Order --> OrderStatus
Menu --> Dish
Kitchen --> Orders
```

---
Expand Down
11 changes: 11 additions & 0 deletions ratatui/src/kitchen.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use crate::orders::Orders;

pub struct Kitchen {
pub current_orders: Orders,
}

impl Kitchen {
pub fn new(current_orders: Orders) -> Self {
Kitchen { current_orders }
}
}
Loading
Loading