From 25409dc3406f56bc6c0ad81b256e93df4b0585f3 Mon Sep 17 00:00:00 2001 From: qiujiaaa Date: Thu, 31 Oct 2019 23:03:22 +0800 Subject: [PATCH] Update DG and error messages --- docs/UserGuide.adoc | 11 ++++++++++- .../java/seedu/address/commons/core/Messages.java | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index 3218070ac5c..e9779984f2d 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -535,7 +535,9 @@ Date should be in the format YYYY.MM.DD with valid year, month and date. ==== Add a schedule : `add-s` Adds a schedule. + If there are conflicts with the existing schedules, use the `-allow` flag to allow clashing schedules, or change the time. + -[underline]#Format#: `add-s ORDER_INDEX cd/DATE ct/TIME v/VENUE [t/TAG]… [-allow] ` + +*Note*: You can add multiple schedules at the same time slot but it will affect the visibility of the order index on the schedule. + + +[underline]#Format#: `add-s ORDER_INDEX cd/DATE ct/TIME v/VENUE [t/TAG]… [-allow]` + [underline]#Example#: + * `add-s 3 cd/2018.7.25 ct/18.00 v/Starbucks t/freebie -allow` + @@ -567,6 +569,8 @@ Deletes a schedule. + ==== Edit a schedule : `edit-s` Edits an existing schedule. + If there are conflicts with the existing schedules, use the `-allow` flag to allow clashing schedules, or change the time. + +*Note*: You can add multiple schedules at the same time slot but it will affect the visibility of the order index on the schedule. + + [underline]#Format#: `edit-s ORDER_INDEX [cd/DATE] [ct/TIME] [v/VENUE] [t/TAG]… [-allow]` **** - Edits the schedule of the order at the specified `ORDER_INDEX`. @@ -581,6 +585,11 @@ If there are conflicts with the existing schedules, use the `-allow` flag to all * Edit the date of the schedule of the 1st order and allow it to clash with the existing schedules. + `edit-s 1 cd/2019.12.12 -allow` +==== Clear the schedules : `clear-s` +Clears every schedule in SML. + + +[underline]#Format#: `clear-s` + === General Commands ==== Undo : `undo` diff --git a/src/main/java/seedu/address/commons/core/Messages.java b/src/main/java/seedu/address/commons/core/Messages.java index 37255297643..799ff41d318 100644 --- a/src/main/java/seedu/address/commons/core/Messages.java +++ b/src/main/java/seedu/address/commons/core/Messages.java @@ -23,13 +23,13 @@ public class Messages { public static final String MESSAGE_SCHEDULE_CONFLICT = "Scheduling conflict detected. Add \"-allow\" flag to " + "confirm overlapping schedules."; - public static final String TIME_MESSAGE_CONSTRAINTS = "Time should only contain numbers in the format of HH.MM"; + public static final String TIME_MESSAGE_CONSTRAINTS = "Time should only contain numbers in the format of HH.MM, " + + "with valid hour and minute."; public static final String DATE_MESSAGE_CONSTRAINTS_LESS_THAN_DEFAULT = "Year should not be less than 1970"; - public static final String DATE_MESSAGE_CONSTRAINTS_LESS_THAN_0 = "Date should only contain numbers in the format of YYYY.MM.DD and be positive"; public static final String DATE_MESSAGE_CONSTRAINTS = - "Date should only contain numbers in the format of YYYY.MM.DD"; + "Date should only contain numbers in the format of YYYY.MM.DD, with valid year, month and date."; public static final String OPTIONAL_DATE_MESSAGE_CONSTRAINTS = "Date should have starting and ending in the format YYYY.MM.DD\n" + "Example: d1/2018.10.05 d2/2019.04.12";