Skip to content

Commit

Permalink
Merge pull request #127 from p-xp/guest-edit
Browse files Browse the repository at this point in the history
Implement `guest edit` feature
  • Loading branch information
wasjoe1 authored Oct 27, 2023
2 parents e857e2a + 50f34c0 commit 46a0da9
Show file tree
Hide file tree
Showing 18 changed files with 1,328 additions and 47 deletions.
3 changes: 3 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,15 @@ exit
--------------------------------------------------------------------------------------------------------------------

## Command summary

| Action | Format | Example |
|--------------------|:-------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| View help | `help` | |
| Add a guest | `guest add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/RSVP_STATUS] [d/DIETARY REQUIREMENTS] [tn/TABLE_NUMBER] [t/TAG...]` | `guest add n/John Doe p/98765432 e/john@doe.com a/Street 456 r/unknown d/vegetarian t/friend` |
| Add a vendor | `vendor add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG...]` | `vendor add n/Betsy p/91234567` |
| Delete a guest | `guest delete INDEX` | `guest delete 1` |
| Delete a vendor | `vendor delete INDEX` | `vendor delete 2` |
| Edit a guest | `guest edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/RSVP_STATUS] [d/DIETARY REQUIREMENTS] [t/TAG]... [tn/TABLE_NUMBER]` | `guest edit 1 p/98765432 r/unknown` |
| Edit a vendor | `vendor edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]...` | `vendor edit 2 p/914624435` |
| View all guests | `guest list` | |
| View all vendors | `vendor list` | |
Expand All @@ -443,6 +445,7 @@ exit
| Redo last action | `redo` | |
| Exit program | `exit` | |


<span style="font-size: 0.4em;">[Back to Top](#wedlog-user-guide)</span>
--------------------------------------------------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions src/main/java/wedlog/address/logic/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static String format(Guest guest) {
.addOptional("Address", guest.getAddress())
.add("RSVP Status", guest.getRsvpStatus())
.add("Dietary Requirements", guest.getDietaryRequirements())
.addOptional("Table Number", guest.getTableNumber())
.addTags(guest.getTags());

return builder.toString();
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/wedlog/address/logic/commands/GuestAddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public class GuestAddCommand extends Command {
+ "Compulsory Parameters: "
+ PREFIX_NAME + "NAME "
+ "Optional Parameters: "
+ PREFIX_PHONE + "PHONE "
+ PREFIX_EMAIL + "EMAIL "
+ PREFIX_ADDRESS + "ADDRESS "
+ PREFIX_RSVP + "RSVP"
+ PREFIX_DIETARY + "DIETARY"
+ PREFIX_TABLE + "TABLE_NUMBER"
+ "[" + PREFIX_PHONE + "PHONE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_ADDRESS + "ADDRESS] "
+ "[" + PREFIX_RSVP + "RSVP STATUS] "
+ "[" + PREFIX_DIETARY + "DIETARY REQUIREMENT]... "
+ "[" + PREFIX_TABLE + "TABLE_NUMBER] "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ "Example: " + GUEST_COMMAND_WORD + " " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
Expand Down
Loading

0 comments on commit 46a0da9

Please sign in to comment.