Skip to content

Commit 250d95a

Browse files
authored
Merge pull request nus-cs2103-AY2021S1#75
Update UserGuide - Add feature
2 parents 800f5ca + 3ada21d commit 250d95a

2 files changed

Lines changed: 131 additions & 28 deletions

File tree

docs/DeveloperGuide.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
269269

270270
### Use cases
271271

272-
(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)
272+
(For all use cases below, the **System** is the `CLI-nic` and the **Actor** is the `user`, unless specified
273+
otherwise)
273274

274275
**Use case: Delete a person**
275276

@@ -294,6 +295,66 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
294295

295296
Use case resumes at step 2.
296297

298+
Use case: Add a supplier
299+
300+
MSS
301+
302+
1. User keys in command to add a supplier
303+
304+
2. CLI-nic shows an updated list of suppliers
305+
306+
Use case ends.
307+
308+
Extensions
309+
310+
1a. CLI-nic detects an error in the entered data.
311+
312+
1a1. CLI-nic shows an error message.
313+
1a2. CLI-nic requests for the correct data.
314+
1a3. User enters new data
315+
Steps 1a1-1a3 are repeated until the data entered are correct.
316+
Use case resumes from step 1.
317+
318+
Use case: Add a store
319+
320+
MSS
321+
322+
1. User keys in command to add a store
323+
324+
2. CLI-nic shows an updated list of stores
325+
326+
Use case ends.
327+
328+
Extensions
329+
330+
1a. CLI-nic detects an error in the entered data.
331+
332+
1a1. CLI-nic shows an error message.
333+
1a2. CLI-nic requests for the correct data.
334+
1a3. User enters new data
335+
Steps 1a1-1a3 are repeated until the data entered are correct.
336+
Use case resumes from step 1.
337+
338+
Use case: Add a product
339+
340+
MSS
341+
342+
1. User keys in command to add a product
343+
344+
2. CLI-nic shows an updated list of products
345+
346+
Use case ends.
347+
348+
Extensions
349+
350+
1a. CLI-nic detects an error in the entered data.
351+
352+
1a1. CLI-nic shows an error message.
353+
1a2. CLI-nic requests for the correct data.
354+
1a3. User enters new data
355+
Steps 1a1-1a3 are repeated until the data entered are correct.
356+
Use case resumes from step 1.
357+
297358
*{More to be added}*
298359

299360
### Non-Functional Requirements

docs/UserGuide.md

Lines changed: 69 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and efficient Graphical User Interface interaction.
1717

1818
1. Ensure you have Java `11` or above installed in your Computer.
1919

20-
1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases).
20+
1. Download the latest `CLInic.jar` from [here](https://github.com/AY2021S1-CS2103-W14-4/tp/releases).
2121

2222
1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook.
2323

@@ -27,17 +27,29 @@ and efficient Graphical User Interface interaction.
2727
1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will display instructions on various commands.<br>
2828
Some example commands you can try:
2929

30-
* **`view supplier supplierA`** : Displays all the information associated with supplierA e.g. address, contact, email, products sold by the supplier etc.
31-
32-
* **`add`**` p/PANADOL SUSP id/1 t/FEVER` : Adds product named `PANADOL SUSP` with product id of 1 with a `FEVER` tag to CLI-nic.
30+
* **`add`** `w/warehouseA addr/John street, block 123, #01-01 wn/First warehouse` : Adds a warehouse
31+
with the name warehouseA located at John street, block 123, #01-01. The warehouse is noted to be the “First warehouse”.
32+
33+
* **`add`**` s/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com sn/largest contractor` : Adds a
34+
supplier named Philips Pharmaceutical. His contact number is 00000000 and his email is
35+
philipsPharm@gmail.com. The supplier is noted to be the “largest contractor”.
36+
37+
* **`add`**` s/SupplierA p/PANADOL SUSP t/FEVER` : Adds the product PANADOL SUSP to list of products from
38+
supplierA. This indicates that supplierA is selling this product. PANADOL SUSP also has a tag of FEVER.
39+
40+
* **`clear`** : Deletes all contacts.
3341

3442
* **`delete`**` delete supplier 12` : Removes supplier at index 12 from the list of suppliers.
3543

36-
* **`clear`** : Deletes all contacts.
37-
3844
* **`exit`** : Exits the app.
3945

40-
* **`find PANADOL warehouse`** : Displays all the warehouses managed by the manager that has a product named PANADOL.
46+
* **`find`**` PANADOL warehouse`** : Displays all the warehouses managed by the manager that has a product
47+
named PANADOL.
48+
49+
* **`update`**` w/WarehouseA p/Panadol q/10` : Updates the quantity of Panadol in WarehouseA to 10. The
50+
quantity of Panadol in WarehouseA can be more than 10 or lesser than 10 before the update is done.
51+
52+
* **`view supplier supplierA`** : Displays all the information associated with supplierA e.g. address, contact, email, products sold by the supplier etc.
4153

4254

4355
1. Refer to the [Features](#features) below for details of each command.
@@ -77,29 +89,46 @@ Examples:
7789
* `help` Display entire list of commands and their description
7890
* `help add` Displays the detailed description, input format and an input example of add command.
7991

80-
### Adding a person: `add`
92+
### Adding a warehouse : `add`
8193

82-
Adds a person to the address book.
94+
Adds warehouse to the CLI-nic application.
8395

84-
Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
96+
Format: `add w/WAREHOUSE_NAME addr/ADDRESS [wn/WAREHOUSE_NOTE]`
8597

86-
<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
87-
A person can have any number of tags (including 0)
88-
</div>
98+
Examples:
99+
* `add w/warehouseA addr/John street, block 123, #01-01 wn/First warehouse` : Adds a warehouse with the name
100+
warehouseA located at John street, block 123, #01-01. The warehouse is noted to be the “First warehouse”.
101+
102+
### Adding a supplier : `add`
103+
104+
Adds a supplier to the CLI-nic application.
105+
106+
Format: `add s/SUPPLIER_NAME p/CONTACT_NUMBER [e/EMAIL_ADDRESS] [sn/SUPPLIER_NOTE]`
89107

90108
Examples:
91-
* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
92-
* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
109+
* `add s/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com sn/largest contractor` : Adds a
110+
supplier named Philips Pharmaceutical. His contact number is 00000000 and his email is philipsPharm@gmail.com. The supplier is noted to be the “largest contractor”.
93111

94-
### **Creating a purchase order : `create`**
95-
* Create a purchase order to track the purchase of medical products from a supplier to a store.
96-
* **Format**: `create sid/SUPPLIER_ID s/STORE_ID id/PRODUCT_ID…​ qty/PRODUCT_QUANTITY…​ date/EXPECTED_DELIVERED_DATE`
97-
* The number specified for PRODUCT_ID cannot exceed the total number of products. All the IDs must be identifiable
98-
* The number of arguments specified for PRODUCT_QUANTITY and PRODUCT_ID must match
99-
* EXPECTED_DELIVERED_DATE must be after current time and of the form YYYY-MM-DD
112+
### Adding a product to a supplier : `add`
100113

101-
* **Examples**:
102-
* `create sid/01 s/123 id/1 2 4 8 qty/100 200 400 800 date/2020-12-12` : Creates a purchase order for the delivery of 100, 200, 400 and 800 of products with ID 1, 2, 4 and 8 respectively from supplier ID of 01 to store ID of 123 by December 12, 2020.
114+
Adds product information to a supplier; associates a particular product with the supplier in the CLI-nic application.
115+
116+
Format: `add s/SUPPLIER_NAME p/PRODUCT_NAME [t/TAG...]`
117+
118+
Examples:
119+
* `add s/SupplierA p/PANADOL SUSP t/FEVER` : Adds the product PANADOL SUSP to list of products from supplierA.
120+
* This indicates that supplierA is selling this product. PANADOL SUSP also has a tag of FEVER.
121+
122+
### Update the stock for a product: `update`
123+
124+
* If the product does not exist for that store, it will associate the new product with the store and the
125+
* input quantity. Otherwise, it will update the stock of the existing product with the new quantity.
126+
127+
Format: `update w/WAREHOUSE_NAME p/PRODUCT_NAME q/QUANTITY`
128+
129+
Example:
130+
* `update w/WarehouseA p/Panadol q/10` : Updates the quantity of Panadol in WarehouseA to 10. The
131+
* quantity of Panadol in WarehouseA can be more than 10 or lesser than 10 before the update is done.
103132

104133
### View a specific supplier / warehouse: `view`
105134

@@ -158,6 +187,18 @@ CLI-nic data are saved in the hard disk automatically after any command that cha
158187

159188
<br />
160189

190+
### To be implemented in the future
191+
192+
### **Creating a purchase order : `create`**
193+
* Create a purchase order to track the purchase of medical products from a supplier to a store.
194+
* **Format**: `create sid/SUPPLIER_ID s/STORE_ID id/PRODUCT_ID…​ qty/PRODUCT_QUANTITY…​ date/EXPECTED_DELIVERED_DATE`
195+
* The number specified for PRODUCT_ID cannot exceed the total number of products. All the IDs must be identifiable
196+
* The number of arguments specified for PRODUCT_QUANTITY and PRODUCT_ID must match
197+
* EXPECTED_DELIVERED_DATE must be after current time and of the form YYYY-MM-DD
198+
199+
* **Examples**:
200+
* `create sid/01 s/123 id/1 2 4 8 qty/100 200 400 800 date/2020-12-12` : Creates a purchase order for the delivery of 100, 200, 400 and 800 of products with ID 1, 2, 4 and 8 respectively from supplier ID of 01 to store ID of 123 by December 12, 2020.
201+
161202
--------------------------------------------------------------------------------------------------------------------
162203

163204
## FAQ
@@ -171,11 +212,12 @@ CLI-nic data are saved in the hard disk automatically after any command that cha
171212

172213
Action | Format, Examples
173214
--------|------------------
174-
**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` <br> e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague`
175-
**Create** | `create sid/SUPPLIER_ID s/STORE_ID id/PRODUCT_ID…​ qty/PRODUCT_QUANTITY…​ date/EXPECTED_DELIVERED_DATE`
215+
**Add** Warehouse | `add w/WAREHOUSE_NAME addr/ADDRESS [wn/WAREHOUSE_NOTE]`<br> e.g., `add w/warehouseA addr/John street, block 123, #01-01 wn/First warehouse`
216+
**Add** Supplier | `add s/SUPPLIER_NAME p/CONTACT_NUMBER [e/EMAIL_ADDRESS] [sn/SUPPLIER_NOTE]`<br> e.g., `add s/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com sn/largest contractor`
217+
**Add** Product | `add s/SUPPLIER_NAME p/PRODUCT_NAME [t/TAG...]`<br> e.g., `add s/SupplierA p/PANADOL SUSP t/FEVER`
176218
**Clear** | `clear`
177219
**Delete** | `delete INDEX`<br> e.g., `delete 3`
178-
**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`<br> e.g.,`edit 2 n/James Lee e/jameslee@example.com`
179220
**Find** | `find TYPE KEYWORD`<br> e.g. `find product panadol`
180-
**List** | `list`
181221
**Help** | `help`
222+
**Update** | `update w/WAREHOUSE_NAME p/PRODUCT_NAME q/QUANTITY` <br> e.g., `update w/WarehouseA p/Panadol q/10`
223+
**View** | `view TYPE NAME`<br> e.g. `view supplier supplierA`

0 commit comments

Comments
 (0)