Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/common/Messages.java
  • Loading branch information
Shu committed Apr 15, 2024
2 parents 88036a8 + b7ab323 commit a03a871
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 49 deletions.
Binary file modified docs/Diagrams/Images/Cashier/CashierSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Itemlist/AddCommand_SequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Itemlist/EditCommand_ClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Itemlist/EditCommand_SequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Itemlist/ListItems_SequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Parser/Parser_ClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/AddPromotion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/AddPromotion_ClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/DeletePromotion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/Promotion_SequenceDigram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@startuml
!include ../Style.puml

actor User
participant "Parser" as Parser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@startuml
!include ../Style.puml

class EditCommand {
- itemName : String
- newItemName : String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@startuml
!include ../Style.puml
actor User
participant "editCommand :EditCommand" as EditCommand
participant "ui :TextUi" as UI
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@startuml
!include ../Style.puml
actor User
participant "ListCommand :ListCommand" as LC
participant "UI :TextUi" as UI
Expand Down
2 changes: 1 addition & 1 deletion docs/Diagrams/PUML files/Parser/Parser_ClassDiagram.PUML
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@startuml

!include ../Style.puml
package "parser" {
class Parser {
-logger: Logger
Expand Down
1 change: 1 addition & 0 deletions docs/Diagrams/PUML files/Promotion/AddPromotion.puml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@startuml
!include ../Style.puml
'https://plantuml.com/sequence-diagram

mainframe sd AddPromotion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@startuml
!include ../Style.puml
'https://plantuml.com/sequence-diagram

skinparam classFontColor automatic
Expand Down
1 change: 1 addition & 0 deletions docs/Diagrams/PUML files/Promotion/DeletePromotion.puml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@startuml
!include ../Style.puml
'https://plantuml.com/sequence-diagram

mainframe sd DeletePromotion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@startuml
!include ../Style.puml
'https://plantuml.com/sequence-diagram

participant ":PromotionCommand" as PromotionCommand
Expand Down
44 changes: 22 additions & 22 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ End of Edits
### Finding an item: `find`
Finds all items that contains `KEYWORD`

Format: `find [/filter1/filter2] KEYWORD`
Format: `find [/FILTER1/FILTER2] KEYWORD`

* Filter are optional and will specify the parameters that is being searched.
* Filters can be `item`, `qty`, `cat`, `uom`, `buy`, `sell`. Any other values will show an empty list.
Expand All @@ -136,8 +136,8 @@ Format: `find [/filter1/filter2] KEYWORD`

Example of usage:
```
find /qty/cat Apple //search for `Apple` under `ITEM_QUANTITY` and `CATEGORY`
find Apple //search all items that contains `Apple`
find /qty/cat Apple // search for `Apple` under `ITEM_QUANTITY` and `CATEGORY`
find Apple // search all items that contains `Apple`
```


Expand Down Expand Up @@ -261,22 +261,22 @@ the application.

## Command Summary

| Action | Format, Examples |
|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Add item | `add ITEM_NAME qty/ITEM_QUANTITY /UNIT_OF_MEASUREMENT [cat/CATEGORY] buy/[BUY_PRICE] sell/[SELL_PRICE]`<br/> `e.g. add apple qty/50 /pieces cat/fruits buy/4.50 sell/5` |
| Delete item | `del ITEM_NAME`<br/> `e.g. del Apple` |
| Edit item | `edit [ITEM_NAME] [name/NEW_NAME] [qty/NEW_QUANTITY] [uom/NEW_UOM] [cat/NEW_CATEGORY] [buy/NEW_BUY_PRICE] [sell/NEW_SELL_PRICE]`<br/>`e.g. edit apple name/green apple qty/10 uom/pieces cat/fruit buy/1.00 sell/2.00` |
| Find item | `find KEYWORD`<br/> `e.g. find University` |
| Sell item | `sell [ITEM_NAME] qty/[SELL_QUANTITY] `<br/> `e.g. sell apple qty/50` |
| Mark item | `mark ITEM_NAME` |
| Unmark item | `unmark ITEM_NAME` |
| List Inventory | `list_items [marked] [cat/CATEGORY]` |
| Get Best Seller | `bestseller` |
| Get Profit | `total_profit` |
| Get Revenue | `total_revenue` |
| Create Promotion | `promotion [ITEM_NAME] discount/[DISCOUNT] period /from [DATE] [MONTH] [YEAR] /to [DATE] [MONTH] [YEAR]time /from [TIME] /to [TIME]`<br/> `e.g. promotion apple discount/50 period /from 2 Apr 2024 /to 4 Apr 2024 time /from 1200 /to 1500` |
| Delete Promotion | `del_promo ITEM_NAME` <br/> `e.g. del_promo apple` |
| List Promotion | `list_promotions` |
| Low Stock Reminder | `low_stock /AMOUNT` |
| Help | `help [c/COMMAND]` |
| Exit | `exit` |
| Action | Format, Examples |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Add item | `add ITEM_NAME qty/ITEM_QUANTITY /UNIT_OF_MEASUREMENT [cat/CATEGORY] buy/BUY_PRICE sell/SELL_PRICE`<br/> `e.g. add apple qty/50 /pieces cat/fruits buy/4.50 sell/5` |
| Delete item | `del ITEM_NAME`<br/> `e.g. del Apple` |
| Edit item | `edit ITEM_NAME [name/NEW_NAME] [qty/NEW_QUANTITY] [uom/NEW_UOM] [cat/NEW_CATEGORY] [buy/NEW_BUY_PRICE] [sell/NEW_SELL_PRICE]`<br/>`e.g. edit apple name/green apple qty/10 uom/pieces cat/fruit buy/1.00 sell/2.00` |
| Find item | `find [/FILTER] KEYWORD`<br/> `e.g. find University` |
| Sell item | `sell ITEM_NAME qty/SELL_QUANTITY `<br/> `e.g. sell apple qty/50` |
| Mark item | `mark ITEM_NAME` |
| Unmark item | `unmark ITEM_NAME` |
| List Inventory | `list_items [marked] [cat/CATEGORY]` |
| Get Best Seller | `bestseller` |
| Get Profit | `total_profit` |
| Get Revenue | `total_revenue` |
| Create Promotion | `promotion ITEM_NAME discount/DISCOUNT period /from DATE MONTH YEAR /to DATE MONTH YEAR time /from TIME /to TIME`<br/> `e.g. promotion apple discount/50 period /from 2 Apr 2024 /to 4 Apr 2024 time /from 1200 /to 1500` |
| Delete Promotion | `del_promo ITEM_NAME` <br/> `e.g. del_promo apple` |
| List Promotion | `list_promotions` |
| Low Stock Reminder | `low_stock /AMOUNT` |
| Help | `help [c/COMMAND]` |
| Exit | `exit` |
13 changes: 7 additions & 6 deletions src/main/java/common/HelpMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class HelpMessages {
"|------------|------------------------------------------------------------------------------|\n" +
"| list items | list_items [marked] [cat/CATEGORY] |\n" +
"|------------|------------------------------------------------------------------------------|\n" +
"| add | add ITEM_NAME qty/QUANTITY_OF_ITEM /UNIT_OF_MEASUREMENT cat/[CATEGORY] |\n" +
"| add | add ITEM_NAME qty/QUANTITY_OF_ITEM /UNIT_OF_MEASUREMENT [cat/CATEGORY] |\n" +
"| | buy/BUY_PRICE sell/SELL_PRICE |\n" +
"|------------|------------------------------------------------------------------------------|\n" +
"| sell | sell ITEM_NAME qty/SELL_QUANTITY |\n" +
Expand All @@ -26,7 +26,7 @@ public class HelpMessages {
"| delete | del ITEM_NAME |\n" +
"|------------|------------------------------------------------------------------------------|\n" +
"| find | 1. find KEYWORD - to search the entire Item List |\n" +
"| | 2. find /filter1/filter2 KEYWORD - to search under the filters* |\n" +
"| | 2. find /FILTER1/FILTER2 KEYWORD - to search under the filters* |\n" +
"| | * (filters: item, qty, uom, cat, buy, sell) |\n" +
"|------------|------------------------------------------------------------------------------|\n" +
"| bestseller | bestseller |\n" +
Expand All @@ -51,7 +51,8 @@ public class HelpMessages {
"| exit | exit |\n" +
"|____________|______________________________________________________________________________|\n" +
"* type help c/COMMAND for more detailed explanations\n" +
" (use the command names on the left column)";
" (use the command names on the left column)\n" +
"* parameters in [] are optional and can be omitted.";

public static final String HELP_EXIT =
" ___________________________________________________________________________________________\n" +
Expand Down Expand Up @@ -141,7 +142,7 @@ public class HelpMessages {
"| Commands | Format |\n" +
"|------------|------------------------------------------------------------------------------|\n" +
"| find | 1. find KEYWORD - to search the entire Item List |\n" +
"| | 2. find /filter1/filter2 KEYWORD - to search under the filters* |\n" +
"| | 2. find /FILTER1/FILTER2 KEYWORD - to search under the filters* |\n" +
"| | * (filters: item, qty, uom, cat, buy, sell) |\n" +
"| |------------------------------------------------------------------------------|\n" +
"| example: | find apple |\n" +
Expand Down Expand Up @@ -215,7 +216,7 @@ public class HelpMessages {
"|___________________________________________________________________________________________|\n" +
"| Commands | Format |\n" +
"|------------|------------------------------------------------------------------------------|\n" +
"| add | add ITEM_NAME qty/QUANTITY_OF_ITEM /UNIT_OF_MEASUREMENT cat/[CATEGORY] |\n" +
"| add | add ITEM_NAME qty/QUANTITY_OF_ITEM /UNIT_OF_MEASUREMENT [cat/CATEGORY] |\n" +
"| | buy/BUY_PRICE sell/SELL_PRICE |\n" +
"| |------------------------------------------------------------------------------|\n" +
"| example: | add apple qty/100 /pcs cat/fruit buy/1.50 sell/2.50 |\n" +
Expand All @@ -230,7 +231,7 @@ public class HelpMessages {
"|___________________________________________________________________________________________|\n" +
"| Commands | Format |\n" +
"|-------------------|-----------------------------------------------------------------------|\n" +
"| list_transactions | list_transaction item/[ITEM_NAME] |\n" +
"| list_transactions | list_transaction [item/ITEM_NAME] |\n" +
"|-------------------|-----------------------------------------------------------------------|\n" +
"| example: | list_transaction item/apple |\n" +
"|___________________|_______________________________________________________________________|\n";
Expand Down
Loading

0 comments on commit a03a871

Please sign in to comment.