Skip to content

Commit

Permalink
Merge pull request #198 from driedmelon/testCase
Browse files Browse the repository at this point in the history
Edit User Guide
  • Loading branch information
sylchw committed Nov 11, 2018
2 parents 4098d19 + 17dd30e commit 7fcdf59
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
35 changes: 23 additions & 12 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -278,23 +278,23 @@ Exports the 2nd person in the address book as a csv file.
Exports the 1st person starting from the 1st person in the results of the `find` command as a csv file.

// tag::schedule[]
=== Add personal schedule : `schedule`
=== Add personal schedule : `schedule` / `sc`
This function enables you to add the scheduled events of a person into the selected person's card.


Format:

`schedule IndexOfPerson d/DDMMYYYY st/START-TIME et/END_TIME en/EVENT-NAME`
`schedule INDEX-OF-PERSON d/DATE(DDMMYYYY) st/START-TIME et/END_TIME en/EVENT-NAME`

Examples:

* `schedule 1 d/09092018 st/1200 et/1400 en/CS1231 Exam`
* `schedule 2 d/08072018 st/1000 et/1900 en/CS2040C Practical Exam`

*Currently, the date validation regex allows for 31 days every month. This issue will be fixed
in v1.4*
*Currently, the adding of scheduled events allows for events of the same name to be added, at the same time slot.
This issue will be fixed in V2.0.*

=== Clear personal weekly schedule : `clearSchedule`
=== Clear personal weekly schedule : `clearSchedule` / `cs`

Format:

Expand All @@ -304,14 +304,14 @@ Examples:

* `clearSchedule 1`

=== List Common Schedule : `commonschedule` [coming in v1.4]
=== List Common Schedule : `matchSchedule` / `ms`

Shows a list of common meeting time for a group of contacts and the user in that given that given period of time. +
Format: `commonschedule i/IndexOfPerson...[INDEX] sd/START-DATE-DDMMYYYY ed/END-DATE-DDMMYYYY t/AVAIL-HOURS-REQUIRED`
Format: `matchSchedule d/SELECTED-DATE st/START-TIME et/END-TIME i/INDEX-OF-PERSON...[INDEX]`

Examples:

* `commonschedule i/1 i/2 i/3 sd/08092018 ed/01102018 t/1.5`
* `matchSchedule d/01012018 st/0800 et/1800 i/1 i/2 i/3`
// end::schedule[]

=== Add To-do task: `todo`
Expand Down Expand Up @@ -377,6 +377,16 @@ Examples:
and would suggest to you the command `select` instead.
// end::suggestions[]

// tag::calendarViewSchedule[]
=== Calendar to view schedule [Coming in V2.0]

When selecting a person, the scheduled events are to be displayed on the calendar panel.
Command type: `select INDEX`

When matching schedules, the common time slots found are to be displayed on the calendar panel.
Command type: `matchSchedule d/SELECTED-DATE st/START-TIME et/END-TIME i/INDEX-OF-PERSON...[INDEX]`
// end::calendarViewSchedule[]

// tag::dataencryption[]
=== Encryption [Coming in V2.0]

Expand Down Expand Up @@ -418,8 +428,9 @@ e.g.`select 2`
* *Export* : `export INDEX FILETYPE`
* *Mail* : `mail [i/INDEX]` (to be added)
* *Todo* : `todo tt/TITLE c/CONTENT`
* *List Schedule* : `commonschedule p/PERSON…[PERSON] sd/START-DATE-DDMMYYYY` * *Mail* : `mail [i/INDEX]` +
(to be added)
* *Add Schedule* : `addschedule d/DDMMYYYY st/START-TIME et/END-TIME en/EVENT-NAME` * *Mail* : `mail [i/INDEX]` +
(to be added)
* *Schedule* : `schedule INDEX-OF-PERSON d/DATE(DDMMYYYY) st/START-TIME et/END_TIME en/EVENT-NAME`
* *Clear Schedule* : `clearSchedule IndexOfPerson`
* *Match Schedule* : `matchSchedule d/SELECTED-DATE st/START-TIME et/END-TIME i/INDEX-OF-PERSON...[INDEX]`
* *Mail* : `mail [i/INDEX]`


Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class ScheduleCommand extends Command {
+ COMMAND_EXAMPLE;

public static final String MESSAGE_SUCCESS = "Schedule Added!";
public static final String MESSAGE_FAILURE = "Unable to add schedule";
public static final String MESSAGE_DUPLICATE_SCHEDULE = "Event already exists in person's schedule";

private Schedule toSchedule;
private final Index index;
Expand All @@ -74,9 +74,7 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
}

Person personToAddSchedule = lastShownList.get(index.getZeroBased());
// System.out.println(personToAddSchedule.getSchedules().toString());
Person scheduledPerson = addScheduleToPerson(personToAddSchedule, this.toSchedule);
// System.out.println(scheduledPerson.getSchedules().toString());

model.updatePerson(personToAddSchedule, scheduledPerson);
model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/model/person/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public boolean equals(Object other) {
&& otherPerson.getPhone().equals(getPhone())
&& otherPerson.getEmail().equals(getEmail())
&& otherPerson.getAddress().equals(getAddress())
&& otherPerson.getTags().equals(getTags());
&& otherPerson.getTags().equals(getTags())
&& otherPerson.getSchedules().equals(getSchedules());
}

@Override
Expand Down

0 comments on commit 7fcdf59

Please sign in to comment.