From 459dc8483831e071b53fbcb5edcd08761ad5fe11 Mon Sep 17 00:00:00 2001 From: Chee Jing Jie Date: Thu, 4 Apr 2024 20:30:30 +0800 Subject: [PATCH 1/5] Add fit add and fit delete commands to UG --- docs/UserGuide.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index d699babc4aa..a5aa9465db8 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -200,6 +200,38 @@ If `/edit` is supplied instead of a note, (e.g. `note 1 /edit`), the contents of > Executing the command `note 1 /edit` will replace the contents of the command box with `note 1 Wants to gain muscle`.
+### Adding or overriding exercise(s) of clients : `fitadd` + +Format: `fitadd INDEX [n/EXERCISE_NAME] [s/SETS] [r/REPS] [b/BREAK_BETWEEN_SETS_IN_SECONDS] [/arms] [/legs] [/chest] [/back] [/shoulders] [/abs] [/all] ` + +* Adds the specified exercise(s) to the client specified by `INDEX`. The index refers to the index number shown in the displayed client list. The index **must be a positive integer** 1, 2, 3, …​ +* If an exercise with same name already exists for the client, the old exercise will be overwritten with the newly supplied field values, or a default set of values if not supplied. +* The `n/EXERCISE_NAME`, `s/SETS`, `r/REPS` and `[b/BREAK_BETWEEN_SETS_IN_SECONDS]` may be omitted in place of a default supported prefix such as `/arms` and `/legs`. +* Using default supported prefixes such as `/arms` or `/legs` will add a pre-defined set of related exercises to the specified client. +* You must either specify a specific exercise name or use a number of default supported prefixes, but not both together. + +Examples: + +* `fitadd 1 n/burpees` - Adds or overwrites the `burpees` exercise of the 1st client with a default set of 1, repetition of 1 and 0 seconds break time between sets. +* `fitadd 1 n/burpees s/3 r/5 b/30` - Adds or overwrites the `burpees` exercise of the 1st client with sets of 3, repetitions of 5 and 30 seconds break time between sets. +* `fitadd 2 /arms` - Adds or overwrites a default set of exercises from the `arms` category to the 2nd client. +* `fitadd 2 /arms /legs` - Adds or overwrites a default set of exercises from the `arms` and `legs` category to the 2nd client. +
+ +### Deleting exercise(s) of clients : `fitdelete` + +Format: `fitdelete INDEX [n/EXERCISE_NAME] [/all]` + +* Deletes the specified exercises(s) from the client specified by `INDEX`. The index refers to the index number shown in the displayed client list. The index **must be a positive integer** 1, 2, 3, …​ +* Supplying the `/all` prefix deletes all exercise(s) from the specified client. +* You must either specify a specific exercise name or the `/all` prefix, but not both together. + +Examples: + +* `fitdelete 1 n/burpees` - Deletes the exercise with name `burpees` from the 1st client. +* `fitdelete 2 /all` - Deletes all exercise(s) from the 2nd client. +
+ ### Searching clients: `find` Finds all clients that match the specified attributes. From 76dd679c0f8a254669f9737efa9eb00b78210368 Mon Sep 17 00:00:00 2001 From: Chee Jing Jie Date: Thu, 4 Apr 2024 22:01:52 +0800 Subject: [PATCH 2/5] Update command summary --- docs/UserGuide.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index a5aa9465db8..0349a6cce9c 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -361,13 +361,15 @@ _Details coming soon ..._ ## Command summary -| Action | Format, Examples | -|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Add** | `add n/NAME p/PHONE_NUMBER [e/EMAIL] [a/ADDRESS] [nt/NOTE] [t/TAG]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 nt/likes pizzas t/friend t/colleague` | -| **Clear** | `clear` | -| **Delete** | `delete INDEX`
e.g., `delete 3` | -| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [nt/NOTE] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | -| **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | -| **List** | `list` | -| **Help** | `help` | -| **Note** | `note INDEX [NOTE]`
e.g.
`note 2 Sprained right ankle in the past` | +| Action | Format, Examples | +|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Add** | `add n/NAME p/PHONE_NUMBER [e/EMAIL] [a/ADDRESS] [nt/NOTE] [t/TAG]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 nt/likes pizzas t/friend t/colleague` | +| **Clear** | `clear` | +| **Delete** | `delete INDEX`
e.g., `delete 3` | +| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [nt/NOTE] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | +| **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | +| **FitAdd** | `fitadd INDEX [n/EXERCISE_NAME] [s/SETS] [r/REPS] [b/BREAK_BETWEEN_SETS_IN_SECONDS] [/arms] [/legs] [/chest] [/back] [/shoulders] [/abs] [/all] `
e.g., `fitadd 1 n/burpees s/3 r/5 b/30` | +| **FitDelete** | `fitdelete INDEX [n/EXERCISE_NAME] [/all]`
e.g., `fitdelete 1 n/burpees` | +| **List** | `list` | +| **Help** | `help` | +| **Note** | `note INDEX [NOTE]`
e.g.
`note 2 Sprained right ankle in the past` | From 55f336d9956e25389fd88b9284ea43e04d4951b4 Mon Sep 17 00:00:00 2001 From: Chee Jing Jie Date: Thu, 4 Apr 2024 22:14:12 +0800 Subject: [PATCH 3/5] Add default values for fitadd command --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 0349a6cce9c..2eca57b8cff 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -205,7 +205,7 @@ If `/edit` is supplied instead of a note, (e.g. `note 1 /edit`), the contents of Format: `fitadd INDEX [n/EXERCISE_NAME] [s/SETS] [r/REPS] [b/BREAK_BETWEEN_SETS_IN_SECONDS] [/arms] [/legs] [/chest] [/back] [/shoulders] [/abs] [/all] ` * Adds the specified exercise(s) to the client specified by `INDEX`. The index refers to the index number shown in the displayed client list. The index **must be a positive integer** 1, 2, 3, …​ -* If an exercise with same name already exists for the client, the old exercise will be overwritten with the newly supplied field values, or a default set of values if not supplied. +* If an exercise with same name already exists for the client, the old exercise will be overwritten with the newly supplied field values, or a default set of values (sets: 1, reps: 1, break: 0) if not supplied. * The `n/EXERCISE_NAME`, `s/SETS`, `r/REPS` and `[b/BREAK_BETWEEN_SETS_IN_SECONDS]` may be omitted in place of a default supported prefix such as `/arms` and `/legs`. * Using default supported prefixes such as `/arms` or `/legs` will add a pre-defined set of related exercises to the specified client. * You must either specify a specific exercise name or use a number of default supported prefixes, but not both together. From c25d95646797b221a5b076fbf443827149a72491 Mon Sep 17 00:00:00 2001 From: dillontkh Date: Thu, 4 Apr 2024 23:02:45 +0800 Subject: [PATCH 4/5] Update fitadd/delete section --- docs/UserGuide.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 2eca57b8cff..d747f558986 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -202,13 +202,19 @@ If `/edit` is supplied instead of a note, (e.g. `note 1 /edit`), the contents of ### Adding or overriding exercise(s) of clients : `fitadd` -Format: `fitadd INDEX [n/EXERCISE_NAME] [s/SETS] [r/REPS] [b/BREAK_BETWEEN_SETS_IN_SECONDS] [/arms] [/legs] [/chest] [/back] [/shoulders] [/abs] [/all] ` +Format: `fitadd INDEX n/EXERCISE_NAME [s/SETS] [r/REPS] [b/BREAK_BETWEEN_SETS_IN_SECONDS]` * Adds the specified exercise(s) to the client specified by `INDEX`. The index refers to the index number shown in the displayed client list. The index **must be a positive integer** 1, 2, 3, …​ * If an exercise with same name already exists for the client, the old exercise will be overwritten with the newly supplied field values, or a default set of values (sets: 1, reps: 1, break: 0) if not supplied. -* The `n/EXERCISE_NAME`, `s/SETS`, `r/REPS` and `[b/BREAK_BETWEEN_SETS_IN_SECONDS]` may be omitted in place of a default supported prefix such as `/arms` and `/legs`. -* Using default supported prefixes such as `/arms` or `/legs` will add a pre-defined set of related exercises to the specified client. -* You must either specify a specific exercise name or use a number of default supported prefixes, but not both together. + +Alternatively, you can use any one of the supported prefixes to quickly add a predefined set of related exercises to the specified client. + +Format: `fitadd INDEX [/arms] [/legs] [/chest] [/back] [/shoulders] [/abs] [/all]` + +
:warning: **Warning** + +You must either specify a specific exercise name or use a number of default supported prefixes, but not both together. +
Examples: @@ -220,11 +226,15 @@ Examples: ### Deleting exercise(s) of clients : `fitdelete` -Format: `fitdelete INDEX [n/EXERCISE_NAME] [/all]` +Format: `fitdelete INDEX n/EXERCISE_NAME [/all]` * Deletes the specified exercises(s) from the client specified by `INDEX`. The index refers to the index number shown in the displayed client list. The index **must be a positive integer** 1, 2, 3, …​ * Supplying the `/all` prefix deletes all exercise(s) from the specified client. -* You must either specify a specific exercise name or the `/all` prefix, but not both together. + +
:warning: **Warning** + +You must either specify a specific exercise name or the `/all` prefix, but not both together. +
Examples: From 41d0cb5e989a8c2babc56540d0d3e19a99fbda78 Mon Sep 17 00:00:00 2001 From: dillontkh Date: Thu, 4 Apr 2024 23:35:53 +0800 Subject: [PATCH 5/5] Fix dead link --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 2d5fae08284..e63c49bfb3b 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -249,7 +249,7 @@ Examples: Format: `weight INDEX [WEIGHT] ` * Adds a weight value to a client specified by `INDEX`. The index refers to the index number shown in the displayed client list. The index **must be a positive integer** 1, 2, 3, …​ -* Weight values specified in this command will be added as a new weight value to the specified client. To edit the latest weight of the client, use the [`edit`](#editing-a-client) command. +* Weight values specified in this command will be added as a new weight value to the specified client. To edit the latest weight of the client, use the [`edit`](#editing-a-client--edit) command. * If no weight value is given, the latest weight for the client at the specified index will be deleted. > While the `edit` command allows one to **edit** a client's latest weight value, this `weight` command serves as a way for users to **add** a client's weight.