Skip to content

Commit

Permalink
Merge pull request #337 from Jweewee/master
Browse files Browse the repository at this point in the history
Update DG, UG, PPP, reuse usage comments
  • Loading branch information
yucongkoo authored Nov 14, 2023
2 parents dd9ae47 + efac8ba commit ead8a82
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 5 deletions.
1 change: 0 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ By default, each `Person` has an empty default appointment.
**Implementing `AppointmentCommand`**

`AppointmentCommand` executes its command on the Model, updating the Model accordingly to reflect the changes made by the command on the Model. Note that an `AppointmentCommand` is **non-executable** if the index is not in range or the person has an existing appointment.
Note that an `AppointmentCommand` is **non-executable** if there is an **existing appointment**.


The sequence diagram below illustrates the interactions of `AppointmentCommand#execute(Model model)`, taking `execute(m)` call to the `AppointmentCommand` as an example. Note that the **reference frames have been omitted** as the operations performed are trivial.
Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ After:

**Description:**

* Deletes a customer's appointment at `<index>` in the displayed customer list.\
* Deletes a customer's appointment at `<index>` in the displayed customer list.
* Used when the appointment has been cancelled.

<box type="warning" seamless>
Expand Down
5 changes: 3 additions & 2 deletions docs/team/jweewee.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AddressBook Level 3

Given below are my contributions to the project.

###### **New Feature**: Appointment
###### **New Feature**: Appointment, Add Appointment, Delete Appointment, Mark Appointment, Unmark Appointment

* What it does: Allows the user to assign appointment details: Date, Time, Venue, to a customer, and keep track of the number of
appointments completed with a customers.
Expand All @@ -34,7 +34,8 @@ efficiency and increase their conversion rate of closing customer deals.
###### **Project management**:
* Have weekly meetings and brainstorm sessions to decide direction of the project.
* Have some commits and merged some pull requests in every milestone.
* Have some reviews and comments on teammates' pull requests.
* Have some reviews and comments on teammates' pull requests. [#171](https://github.com/AY2324S1-CS2103T-W16-2/tp/pull/171) [#154](https://github.com/AY2324S1-CS2103T-W16-2/tp/pull/154)
* Responses to teammates' comments. [#77](https://github.com/AY2324S1-CS2103T-W16-2/tp/pull/77)
* Discussed project ideation, use cases, target audience revamp


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
import seedu.address.model.person.Appointment;
import seedu.address.model.person.Person;

//@@author AY2122S1-CS2103T-T09-4/tp--reused
//Reused from https://github.com/AY2122S1-CS2103T-T09-4/tp/blob/
//master/src/main/java/seedu/fast/logic/commands/AppointmentCommand.java
//with minor modifications
/**
* Adds/Edits the appointment with an existing person in the address book.
*/
Expand Down Expand Up @@ -96,3 +100,4 @@ public boolean equals(Object other) {
&& appointment.equals(a.appointment);
}
}
//@@author
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
import seedu.address.model.person.Appointment;
import seedu.address.model.person.Person;

//@@author AY2122S1-CS2103T-T09-4/tp--reused
//Reused from https://github.com/AY2122S1-CS2103T-T09-4/tp/blob/
//master/src/main/java/seedu/fast/logic/commands/DeleteAppointmentCommand.java
//with minor modifications
/**
* Deletes the appointment with an existing person in the address book.
*/
Expand Down Expand Up @@ -85,5 +89,5 @@ public boolean equals(Object other) {
return index.equals(e.index)
&& appointment.equals(e.appointment);
}

}
//@@author
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
import seedu.address.model.person.Appointment;
import seedu.address.model.person.Person;

//@@author AY2122S1-CS2103T-T09-4/tp--reused
//Reused from https://github.com/AY2122S1-CS2103T-T09-4/tp/blob/master/
//src/main/java/seedu/fast/logic/commands/MarkAppointmentCommand.java
//with minor modifications
/**
* Marks the appointment with an existing person in the address book.
*/
Expand Down Expand Up @@ -94,3 +98,4 @@ public boolean equals(Object other) {
&& appointment.equals(e.appointment);
}
}
//@@author
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
import seedu.address.model.person.AppointmentCount;
import seedu.address.model.person.Person;

//@@author AY2122S1-CS2103T-T09-4/tp--reused
//Reused from https://github.com/AY2122S1-CS2103T-T09-4/tp/blob/master/
//src/main/java/seedu/fast/logic/commands/UnmarkAppointmentCommand.java
//with minor modifications
/**
* Unmarks the appointment with an existing person in the address book.
*/
Expand Down Expand Up @@ -102,3 +106,4 @@ public boolean equals(Object other) {
&& appointment.equals(e.appointment);
}
}
//@@author
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public AppointmentCommand parse(String args) throws ParseException {
return new AppointmentCommand(index, new Appointment(parsedDate, parsedTime, parsedVenue));
}

//@@author AY2122S1-CS2103T-T09-4/tp--reused
//Reused from https://github.com/AY2122S1-CS2103T-T09-4/tp/blob/master/
//src/main/java/seedu/fast/logic/parser/AppointmentCommandParser.java
//with minor modifications
private String checkInputDate(String retrievedDate) throws ParseException {
if (retrievedDate.equalsIgnoreCase(Appointment.NO_APPOINTMENT)) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
Expand Down Expand Up @@ -85,3 +89,4 @@ private String getParsedVenue(ArgumentMultimap argMultimap) throws ParseExceptio
return parsedVenue;
}
}
//@@author
5 changes: 5 additions & 0 deletions src/main/java/seedu/address/model/person/Appointment.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

import seedu.address.commons.core.LogsCenter;

//@@author AY2122S1-CS2103T-T09-4/tp--reused
//Reused from https://github.com/AY2122S1-CS2103T-T09-4/tp/blob/master/
//src/main/java/seedu/fast/model/person/Appointment.java
//with minor modifications
/**
* Represents an appointment with the Person in the address book.
* Guarantees: immutable; is always valid.
Expand Down Expand Up @@ -215,3 +219,4 @@ public String toString() {
return builder.toString();
}
}
//@@author
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

import static java.util.Objects.requireNonNull;
import static seedu.address.commons.util.AppUtil.checkArgument;

//@@author AY2122S1-CS2103T-T09-4/tp--reused
//Reused from https://github.com/AY2122S1-CS2103T-T09-4/tp/blob/master/
//src/main/java/seedu/fast/model/person/AppointmentCount.java
//with minor modifications
/**
* Keeps track of the number of appointment the user have with a client.
*/
Expand Down Expand Up @@ -97,3 +102,4 @@ public int hashCode() {
return count;
}
}
//@@author

0 comments on commit ead8a82

Please sign in to comment.