Skip to content

Commit

Permalink
Merge pull request #335 from Ferusel/tingkai/improve-ug-v1.3
Browse files Browse the repository at this point in the history
Improve UG for v1.3
  • Loading branch information
tingkai-mai authored Oct 27, 2022
2 parents f85ba0c + 165ab61 commit 73b29ef
Show file tree
Hide file tree
Showing 30 changed files with 154 additions and 95 deletions.
9 changes: 7 additions & 2 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ show-toc: true

## Command Summary

### General Commands

{% include_relative _ug/commandSummary/GeneralCommands.md %}

### Item Commands

{% include_relative _ug/commandSummary/ItemCommands.md %}
Expand All @@ -41,9 +45,10 @@ show-toc: true

{% include_relative _ug/commandSummary/TagCommands.md %}

### Other Commands
### Statistics Command

{% include_relative _ug/commandSummary/StatisticsCommands.md %}

{% include_relative _ug/commandSummary/OtherCommands.md %}

## Troubleshooting

Expand Down
6 changes: 6 additions & 0 deletions docs/_glossary/GraphicalUserInterface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: Graphical User Interface
show-in: [ug, dg]
---

A Graphical User Interface is a graphics-based interface that uses icons, menus and a mouse (to click on the icon or pull down the menus) to manage interaction with the system. In FoodRem, this presents as the window that appears when launching it.
6 changes: 3 additions & 3 deletions docs/_ug/About.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- markdownlint-disable-file first-line-h1 -->
FoodRem is an Inventory Management System that empowers small food and beverage (F&B) restaurant managers to manage inventory and obtain insights from inventory data. As a restaurant manager, leverage upon FoodRem's Inventory Management System, where you can manage your inventory during your daily operations. Utilize FoodRem's flexible tagging system to help you organize your inventory according to your business needs. Finally, streamline your business decisions by deriving insights from your inventory usage through FoodRem's statistics, keeping track of vital data such as food wastage.
FoodRem is an **Inventory Management System** that empowers small food and beverage (F&B) restaurant managers to manage inventory and obtain insights from inventory data. As a restaurant manager, leverage upon FoodRem's own **Inventory Management System**, where you can manage your inventory during your daily operations. Utilize FoodRem's flexible **tagging system** to help you organize your inventory according to your business needs. Finally, streamline your business decisions by deriving insights from your inventory usage through FoodRem's **statistics**, keeping track of vital data such as food wastage.

Using a Command-Line interface, efficiently interact with FoodRem without needing to even touch your mouse! With a focus on user-friendliness, FoodRem is easy to learn!
Simply by typing, efficiently interact with FoodRem without ever needing to touch your mouse! With a focus on user-friendliness, FoodRem is easy to learn!

This User Guide provides an in-depth documentation to help integrate FoodRem into your operational workflows. It covers how to launch FoodRem, core FoodRem features and commands, common terms and definitions used in FoodRem, and some troubleshooting recommendations. In addition, a quick start guide is available that gives a whirlwind tour to help get you started.
This User Guide provides an in-depth documentation to help integrate FoodRem into your operational workflows. It covers how to launch FoodRem, core FoodRem features and commands, common terms and definitions used in FoodRem, and some troubleshooting recommendations. In addition, a [quick start guide](#how-to-use-the-user-guide) is available that gives a whirlwind tour to help get you started.
2 changes: 1 addition & 1 deletion docs/_ug/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ What you should expect to find:

* For each command, "Format" indicates the syntax of the command.
* Square brackets indicates an optional parameter.
* In most commands, if more parameters are provided, we take the last value provided.
* In most commands, if the same parameter is repeated and only one is required, we take the last value provided.

### General Commands

Expand Down
2 changes: 1 addition & 1 deletion docs/_ug/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Q:** Do I need internet connection to run FoodRem? <br>
**A:** No, FoodRem can boot up and run all functionalities without an internet connection.

**Q:** Can I use FooRem on my mobile device?<br>
**Q:** Can I use FoodRem on my mobile device?<br>
**A:** Unfortunately, no. FoodRem is designed to run on your desktop/laptop such that you can use the command line interface.

**Q:** How do I transfer my data to another Computer?<br>
Expand Down
24 changes: 11 additions & 13 deletions docs/_ug/HowToUseUserGuide.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<!-- markdownlint-disable-file first-line-h1 -->
Thank you for choosing FoodRem! We are delighted to have you as a user and aim to serve you well.
Thank you for choosing FoodRem! We are delighted to have you as a user and we aim to serve you and your business well!

We **highly recommend** that you read through the User Guide in a **sequential order** up until the section [Features](#features), where you can find all the information you need before using any commands.
```tip
We **highly recommend** that you read through the User Guide in a **sequential order**. Please note the importance of the [Using FoodRem](#using-foodrem) section, which covers how to use FoodRem!
```

If you have not installed FoodRem head over to the [Installation](#installation) section.

Once FoodRem is installed, you can head over to the section [Using FoodRem](#using-foodrem) which will share with you the basics of FoodRem. This includes:
Once FoodRem is installed, you can head over to the section [Using FoodRem](#using-foodrem) which covers the basics of using FoodRem. This includes:

* FoodRem [Layout](#layout)
* [Items and Tags](#items-and-tags) in FoodRem
* FoodRem [Command Format](#command-format).
* [Flags](#flags) and [Placeholders](#placeholders):
* Important syntax you will come across while reading the User Guide such as `n/`, `bgt/` or `INDEX`, `ITEM_NAME`.
* The description of all syntax and how to use them
* [Trying out](#trying-your-first-command) your first command.
* FoodRem's [Layout](#layout)
* What [Items and Tags](#items-and-tags) are in FoodRem
* Using FoodRem's [Commands](#command-format)
* What [Flags](#flags) and [Placeholders](#placeholders) are
* [Trying out](#trying-your-first-command) your first command

If you are an experienced user, you can refer to the [Command Summary](#command-summary) to get an overview of all currently supported FoodRem commands.

Here are some icons you may encounter in FoodRem and what they mean:
If you are an experienced user, you can refer to the [Command Summary](#command-summary) for a quick overview of all of FoodRem's commands.

If you are stuck, refer to the section on [Troubleshooting](#troubleshooting) or [FAQ](#faq).

Expand Down
34 changes: 32 additions & 2 deletions docs/_ug/ItemsTags.md → docs/_ug/KeyDefinitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ The following are the attributes stored for each item:

* Item name
* Item quantity
* Item unit (Unit of measurement e.g. `kg`, `packets`)
* Item unit (unit of measurement e.g. `kg`, `packets`)
* Item bought date
* Item expiry date
* Item price
* Item remark
* Item remarks
* Item tags

FoodRem Items are unique by name and case-sensitive. This means you cannot add two or more items of the same name.
Expand All @@ -33,3 +33,33 @@ Feel free to add tags as you see fit to organize your inventory. Examples of how
Tags can be renamed and these changes would be reflected on all items immediately.

FoodRem Tags are unique by name and case-sensitive. This means you cannot add two or more tags of the same name.

#### Flags

Flags are delimiters that enable FoodRem to distinguish different parameters without ambiguity.

You would put in the corresponding [Placeholder](#placeholders) immediately after each flag.

Please refer to the [Command Format](#command-format) to see how Flags and Placeholders are used together.

| Flag | Corresponding Placeholder |
|------|---------------------------|
| n/ | ITEM_NAME<br>TAG_NAME |
| qty/ | QUANTITY |
| u/ | UNIT |
| bgt/ | BOUGHT_DATE |
| exp/ | EXPIRY_DATE |
| p/ | PRICE |
| r/ | REMARKS |

#### Placeholders

Placeholders show you what type of parameters you can supply to a command. These follow immediately after a [Flag](#flag).

Please refer to the [Command Format](#command-format) to see how Flags and Placeholders are used together.

```note
The placeholders `INDEX`, `COMMAND_WORD`, and `KEYWORD` do not have any corresponding flags. They are marked as "Not Applicable" in the table below.
```

{% include_relative _ug/Placeholders.md %}
8 changes: 4 additions & 4 deletions docs/_ug/Layout.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!-- markdownlint-disable-file first-line-h1 -->

<!-- TODO: Update UI Images after UI updates are implemented -->
Let us look at the layout of the different components of FoodRem.
When you launch FoodRem, FoodRem appears on your screen as a [Graphical User Interface](#graphical-user-interface), or GUI. Let's look at the layout of the different components of FoodRem.

FoodRem application:
**FoodRem's GUI:**

![FullUiImage](images/FoodRemFullUi.png)

This table breaks down the different components of the FoodRem.
This table breaks down the different components of FoodRem's GUI.

| Name | Description |
| Name | Image |
|--------------------|--------------------------------------------------|
| Command Input Box | ![CommandInputBox](images/CommandInputBox.png) |
| Command Output Box | ![CommandOutputBox](images/CommandOutputBox.png) |
Expand Down
26 changes: 13 additions & 13 deletions docs/_ug/Placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
<!-- ===== CREATE TABLE FORMATTING IN NORMAL+ MARKDOWN ===== -->
<!-- WE USE :variable: FOR VALUES THAT ARE TO BE SUBSTITUTED -->
{% capture TABLE %}
| Placeholders | Related Flags | Description |
|--------------|---------------|----------------|
| INDEX | | :INDEX: |
| ITEM_NAME | n/ | :ITEM_NAME: |
| TAG_NAME | n/ | :TAG_NAME: |
| QUANTITY | qty/ | :QUANTITY: |
| UNIT | u/ | :UNIT: |
| BOUGHT_DATE | bgt/ | :BOUGHT_DATE: |
| EXPIRY_DATE | exp/ | :EXPIRY_DATE: |
| PRICE | p/ | :PRICE: |
| REMARKS | r/ | :REMARKS: |
| COMMAND_WORD | | :COMMAND_WORD: |
| KEYWORD | | :KEYWORD: |
| Placeholder | Corresponding Flag | Description |
|--------------|---------------------|----------------|
| INDEX | (Not Applicable) | :INDEX: |
| ITEM_NAME | n/ | :ITEM_NAME: |
| TAG_NAME | n/ | :TAG_NAME: |
| QUANTITY | qty/ | :QUANTITY: |
| UNIT | u/ | :UNIT: |
| BOUGHT_DATE | bgt/ | :BOUGHT_DATE: |
| EXPIRY_DATE | exp/ | :EXPIRY_DATE: |
| PRICE | p/ | :PRICE: |
| REMARKS | r/ | :REMARKS: |
| COMMAND_WORD | (Not Applicable) | :COMMAND_WORD: |
| KEYWORD | (Not Applicable) | :KEYWORD: |
{% endcapture %}

<!-- ===== RENDER THE ACTUAL TABLE ===== -->
Expand Down
43 changes: 26 additions & 17 deletions docs/_ug/TryingFirstCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ To let you become more familiar with FoodRem, let's practice executing some comm

To start off, let's try out the `new` command! This command lets you add an [Item](#item) to FoodRem.

The format for commands are not identical.

One of the available commands in FoodRem is the command to create a new item.

**Format:** `new n/ITEM_NAME [qty/QUANTITY] [u/UNIT] [bgt/BOUGHT_DATE] [exp/EXPIRY_DATE] [p/PRICE] [r/REMARKS]`

The first word of every command allows FoodRem to distinguish different commands. `new` tells FoodRem that this is the command to create a new item. [Flags](#flags) such as `n/` and `qty/` are delimiters that enable FoodRem to distinguish different parameters supplied by you without ambiguity. [Placeholders](#placeholders) such as `ITEM_NAME` and `QUANTITY` shows you what you should place in each portion of the command.
**What does the format mean?**

The first word of every command allows FoodRem to distinguish different commands.
* `new` tells FoodRem that this is the command to create a new item.
* [Flags](#flags) such as `n/` and `qty/` are delimiters that enable FoodRem to distinguish different parameters supplied by you without ambiguity.
* [Placeholders](#placeholders) such as `ITEM_NAME` and `QUANTITY` shows you what you should place in each portion of the command.

Notice that there is a pair of square brackets `[]` surrounding some parameters like `qty/QUANTITY` in the format. This indicates that the parameter is **optional**. Each of these placeholders have a default value based on the commands. These are documented in the [Commands](#commands) section for each command.

```note
The [Placeholder](#placeholders) section covers the restrictions for respective placeholders. For example, the date format of BOUGHT_DATE, certain characters you cannot use and the limit and precision of numbers.
```

**Let's try an example!**

Suppose you just bought 30 kg worth of potatoes, today is 5th September 2022, and you do not feel the need to record an expiry date, price or remarks for this item.

`ITEM_NAME`: Potatoes
Expand All @@ -24,35 +33,35 @@ Suppose you just bought 30 kg worth of potatoes, today is 5th September 2022, an

`BOUGHT_DATE`: 05-09-2022

```note
The [Placeholder](#placeholders) section covers the restrictions for respective placeholders. For example, the date format of BOUGHT_DATE, certain characters you cannot use and the limit and precision of numbers.
```

The command you would like to enter into the command box would be:

`new n/Potatoes qty/30 u/kg bgt/05-09-2022`

Alternatively these command would do the same thing:
Alternatively, executing these would do the same thing:

* `new qty/30 n/Potatoes bgt/05-09-2022 u/kg` (Reordering the flags)
* `new qty/100 n/Carrots qty/30 n/Potatoes bgt/05-09-2022 u/kg` (Only last parameters are taken if multiple parameters are provided)
* `new qty/30 n/Potatoes bgt/05-09-2022 u/kg` _(Reordering the flags)_
* `new qty/100 n/Carrots qty/30 n/Potatoes bgt/05-09-2022 u/kg` _(Only last parameters are taken if multiple parameters are provided)_

These commands are invalid:
However, note that the following executions are invalid:

* `newn/Potatoesqty/30u/kgbgt/05-09-2022` (Removing spaces between the placeholders and flags)
* `new qty/-48 n/PÖtátÖes bgt/05/09/22 u/|kg|` (Restrictions of placeholders not followed)
* `new` (Insufficient information provided)
* `newn/Potatoesqty/30u/kgbgt/05-09-2022` _(Removing spaces between the placeholders and flags)_
* `new qty/-48 n/PÖtátÖes bgt/05/09/22 u/|kg|` _(Restrictions of placeholders not followed)_
* `new` _(Insufficient information provided, you must minimally provide a name)_

_Find out more about restrictions in the sections [Flags](#flags), [Placeholders](#placeholders) and [Commands](#commands)._

---
Let's try out another command - the `inc` command! `inc` tells FoodRem that this is the command to increment the quantity of an item.
Let's try out another command - the `inc` command! `inc` lets you increment the quantity of an item.

```warning
The format for different commands are not always identical. For example, executing the `new` command and the `inc` command will have different formats!
```

For example, after creating the potatoes item, you decided to buy 40 kg more of potatoes.

Format: `inc INDEX [qty/QUANTITY]`
**Format:** `inc INDEX [qty/QUANTITY]`

Suppose the `INDEX` for potatoes is `1` in the application, the command you would like to enter into the command box would be:
Suppose the `INDEX` for potatoes is `1` in the application, the command you would like to enter into the [Command Input Box)(#layout) would be:

`inc 1 qty/40`

Expand Down
33 changes: 7 additions & 26 deletions docs/_ug/UsingFoodRem.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<!-- markdownlint-disable-file first-line-h1 -->
Here is an overview of what FoodRem consists of and how you can perform a command.

This section covers all you should know about FoodRem, as well as a [guided tutorial](#trying-your-first-command). Of special note is the [Key Definitions](#key-definitions) and [Command Format](#command-format) sections, which covers essential knowledge to using FoodRem's features.

### Layout

{% include_relative _ug/Layout.md %}

### Items and Tags
### Key Definitions

{% include_relative _ug/ItemsTags.md %}
{% include_relative _ug/KeyDefinitions.md %}

### Command Format

Expand All @@ -19,29 +20,9 @@ Here is an example:

A command consists of:

1. Command Word to tell FoodRem what action you wish to execute. These actions are covered in [Commands](#commands)
1. [Flags](#flags) to distinguish parameters
1. [Placeholders](#placeholders) that you can replace with your parameter inputs

### Flags

Flags are delimiters that enable FoodRem to distinguish different parameters without ambiguity.

| Flags | Related Placeholder |
|-------|-----------------------|
| n/ | ITEM_NAME<br>TAG_NAME |
| qty/ | QUANTITY |
| u/ | UNIT |
| buy/ | BOUGHT_DATE |
| exp/ | EXPIRY_DATE |
| p/ | PRICE |
| r/ | REMARKS |

### Placeholders

Placeholders are words in uppercase to show you what type of parameters you can supply to a command.

{% include_relative _ug/Placeholders.md %}
1. Command Word: Tells FoodRem what action you wish to execute. These actions are covered in [Commands](#commands).
1. [Flags](#flags): Distinguishes between inputs. This follows before your Placeholder data.
1. [Placeholders](#placeholders): Represents data that you wish to input. Replace this with valid data. For example, `ITEM_NAME` in `n/ITEM_NAME` can be replaced with `n/Potato`. Placeholders should follow after a Flag.

### Trying your first command

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

<!-- ===== DECLARE VARIABLES ===== -->
<!-- markdownlint-disable -->
{% capture help %}{% include_relative _ug/commandSummary/otherCommands/help.md %}{% endcapture %}
{% capture reset %}{% include_relative _ug/commandSummary/otherCommands/reset.md %}{% endcapture %}
{% capture exit %}{% include_relative _ug/commandSummary/otherCommands/exit.md %}{% endcapture %}
{% capture help %}{% include_relative _ug/commandSummary/generalCommands/help.md %}{% endcapture %}
{% capture reset %}{% include_relative _ug/commandSummary/generalCommands/reset.md %}{% endcapture %}
{% capture exit %}{% include_relative _ug/commandSummary/generalCommands/exit.md %}{% endcapture %}

{% assign help = help | markdownify %}
{% assign reset = reset | markdownify %}
{% assign exit = exit | markdownify %}

{% capture helpexample %}{% include_relative _ug/commandSummary/otherCommandsExamples/help.md %}{% endcapture %}
{% capture resetexample %}{% include_relative _ug/commandSummary/otherCommandsExamples/reset.md %}{% endcapture %}
{% capture exitexample %}{% include_relative _ug/commandSummary/otherCommandsExamples/exit.md %}{% endcapture %}
{% capture helpexample %}{% include_relative _ug/commandSummary/generalCommandsExamples/help.md %}{% endcapture %}
{% capture resetexample %}{% include_relative _ug/commandSummary/generalCommandsExamples/reset.md %}{% endcapture %}
{% capture exitexample %}{% include_relative _ug/commandSummary/generalCommandsExamples/exit.md %}{% endcapture %}

{% assign helpexample = helpexample | markdownify %}
{% assign resetexample = resetexample | markdownify %}
Expand Down
24 changes: 24 additions & 0 deletions docs/_ug/commandSummary/StatisticsCommands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- markdownlint-disable-file first-line-h1 -->

<!-- ===== DECLARE VARIABLES ===== -->
<!-- markdownlint-disable -->
{% capture stats %}{% include_relative _ug/commandSummary/statisticsCommands/stats.md %}{% endcapture %}
{% assign stats = stats | markdownify %}
{% capture statsexample %}{% include_relative _ug/commandSummary/statisticsCommandsExamples/stats.md %}{% endcapture %}
{% assign statsexample = statsexample | markdownify %}
<!-- markdownlint-restore -->

<!-- ===== CREATE TABLE FORMATTING IN NORMAL+ MARKDOWN ===== -->
<!-- WE USE :variable: FOR VALUES THAT ARE TO BE SUBSTITUTED -->
{% capture TABLE %}
| Action | Format | Example |
|-------------------------------------------------------|---------|----------------|
| Displays relevant statistics tracked by FoodRem | :stats: | :statsexample: |
{% endcapture %}

<!-- ===== RENDER THE ACTUAL TABLE ===== -->
{{ TABLE
| markdownify
| replace: ":stats:", stats
| replace: ":statsexample:", statsexample
}}
2 changes: 2 additions & 0 deletions docs/_ug/commandSummary/statisticsCommands/stats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- markdownlint-disable-file first-line-h1 -->
`stats`
2 changes: 2 additions & 0 deletions docs/_ug/commandSummary/statisticsCommandsExamples/stats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- markdownlint-disable-file first-line-h1 -->
`stats`
Loading

0 comments on commit 73b29ef

Please sign in to comment.