Skip to content

Commit

Permalink
Merge pull request #253 from blackpanther9229/branch-alpha-bug
Browse files Browse the repository at this point in the history
Cattag displaying bug
  • Loading branch information
blackpanther9229 authored Nov 7, 2024
2 parents 153dd91 + 0dcaf9d commit 0fd80f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Categorizes a tag under a defined category.
Format: `cattag t/TAG [t/MORE_TAGS]…​ CATEGORY`

* Sets the tag(s) in CampusConnect with the specified name `TAG` to fall under the specified `CATEGORY`.
*
* Currently available categories with their respective keywords and colours are:

Category | Keyword (case sensitive) | Colour
Expand All @@ -234,15 +235,18 @@ Format: `cattag t/TAG [t/MORE_TAGS]…​ CATEGORY`
**Activities**| `activity` | <span style="color:DodgerBlue"> Blue </span>
**Networking**| `network` | <span style="color:LimeGreen"> Green </span>
**Mentorship**| `mentor` | <span style="color:HotPink"> Pink </span>

* Multiple tags can be categorized to the same category at a time.
* All tags specified must be valid existing tags.
* Attempts to set a tag to its current category will cause the whole command to be rejected.
* Only one category is allowed to be entered per command, i.e. `cattag t/tag1 acads t/tag2 general` is not allowed.

Examples:
* `cattag t/CS2100 acads` categorizes the tag `CS2100` under `Academics`
* `cattag t/floorball t/mahjong activity` categorizes both tags `floorball` and `mahjong` under `Activities`
* `cattag t/CS2100 acads` categorizes the tag `CS2100` under `Academics` and color of `t/CS2100` become `Gold`.
* `cattag t/floorball t/mahjong activity` categorizes both tags `floorball` and `mahjong` under `Activities` with color `Blue`.
* Not-yet categorized tags have color `Grey` by default.

![cattag response image](images/cattagResponse.png)
### Undo a command : `undo`

Undoes the previous command and reverts CampusConnect.
Expand Down
Binary file added docs/images/cattagResponse.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
Expand Up @@ -21,7 +21,8 @@ public class CategorizeTagCommand extends Command {

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": Categorizes a tag. Changes all occurrences of the specified tag to the desired category.\n"
+ "Parameters: " + PREFIX_TAG + "TAG (existing tag label) CATEGORY\n"
+ "Parameters: " + PREFIX_TAG + "TAG (existing tag label)"
+ " [" + PREFIX_TAG + "TAG (existing tag label)]... CATEGORY\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_TAG + "CS1101S acads";

public static final String MESSAGE_CAT_TAG_SUCCESS = "Category of tag(s) %1$s has been changed successfully.";
Expand Down

0 comments on commit 0fd80f7

Please sign in to comment.