From 15d468406deedd2a6c26ff38d9d3939fa66fffe2 Mon Sep 17 00:00:00 2001 From: Plishh <101051455+Plishh@users.noreply.github.com> Date: Sun, 10 Nov 2024 17:54:07 +0800 Subject: [PATCH 1/3] Fix findSubject with multiple arguments --- .../address/logic/parser/FindSubjectCommandParser.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/seedu/address/logic/parser/FindSubjectCommandParser.java b/src/main/java/seedu/address/logic/parser/FindSubjectCommandParser.java index d400ef57885..9d2addd32e2 100644 --- a/src/main/java/seedu/address/logic/parser/FindSubjectCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/FindSubjectCommandParser.java @@ -26,9 +26,14 @@ public FindSubjectCommand parse(String userInput) throws ParseException { String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindSubjectCommand.MESSAGE_USAGE) ); } - if (!isValidSubject(trimmedArgs)) { - throw new ParseException(MESSAGE_CONSTRAINTS); + + String[] subjectKeywords = trimmedArgs.split("\\s+"); + for (String subject : subjectKeywords) { + if (!isValidSubject(subject)) { + throw new ParseException(MESSAGE_CONSTRAINTS); + } } + String subjectToFind = trimmedArgs; return new FindSubjectCommand(new PersonHaveSubjectPredicate(subjectToFind)); } From d4603903bad6cef0bc6e7590147b1397eec1d98f Mon Sep 17 00:00:00 2001 From: Plishh <101051455+Plishh@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:42:17 +0800 Subject: [PATCH 2/3] Fix address validation --- src/main/java/seedu/address/model/person/Address.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/seedu/address/model/person/Address.java b/src/main/java/seedu/address/model/person/Address.java index a5d56515bf6..a2f9d6d3c98 100644 --- a/src/main/java/seedu/address/model/person/Address.java +++ b/src/main/java/seedu/address/model/person/Address.java @@ -16,7 +16,7 @@ public class Address { * The first character of the address must not be a whitespace, * otherwise " " (a blank string) becomes a valid input. */ - public static final String VALIDATION_REGEX = "^(.*),\\s?(\\d{6})$"; + public static final String VALIDATION_REGEX = "^(\\S+.*),\\s?(\\d{6})$"; public final String value; From 2add9e309c597167fc6d3981c7d41eb9a369e9d6 Mon Sep 17 00:00:00 2001 From: Plishh <101051455+Plishh@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:07:14 +0800 Subject: [PATCH 3/3] Fix UserGuide.md --- docs/UserGuide.md | 99 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 18 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index ff9f000b383..c9a38c2c5a8 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -1,18 +1,51 @@ + --- - layout: default.md - title: "User Guide" - pageNav: 3 +layout: default.md +title: "User Guide" +pageNav: 3 --- # VolunTier User Guide -------------------------------------------------------------------------------------------------------------------- -## Introduction -VolunTier is the **top _Tier_** solution for volunteer organisations that specialise in teaching students and are -looking to manage your growing clientele in an efficient manner. -VolunTier is designed for those of you who are **familiar with the Command Line Interface (CLI)** living in Singapore, -simplifying the process of adding, editing and deleting your volunteers, students and the lessons that they share. + +- [VolunTier User Guide](#voluntier-user-guide) +- [Quick start](#quick-start) + - [Installation of application](#installation-of-application) +- [Features](#features) + - [Viewing help](#viewing-help--help) + - [Adding a Tutor](#adding-a-tutor-addtutor) + - [Adding a Tutee](#adding-a-tutee-addtutee) + - [Adding a Lesson](#adding-a-lesson-addlesson) + - [Listing all persons](#listing-all-persons--list) + - [Editing a person](#editing-a-person--edit) + - [Locating persons by name](#locating-persons-by-name-find) + - [Locating persons by subject](#locating-persons-by-subject-findsubject) + - [Deleting a person](#deleting-a-person--delete) + - [Deleting a lesson](#deleting-a-lesson--deletelesson) + - [Viewing a person's details](#viewing-a-persons-details--view) + - [Undoing a command](#undoing-a-command--undo) + - [Redoing a command](#redoing-a-command--redo) + - [Viewing command history](#viewing-command-history--history) + - [Viewing chart of tutors’ volunteer hours](#viewing-chart-of-tutors-volunteer-hours--vtc) + - [Clearing all entries](#clearing-all-entries--clear) + - [Importing people from CSV files](#importing-people-from-csv-files--import) + - [Exiting the program](#exiting-the-program--exit) +- [Saving the data](#saving-the-data) +- [Editing the data file](#editing-the-data-file) +- [FAQ](#faq) +- [Known Issues](#known-issues) +- [Command Summary](#command-summary) + + + +-------------------------------------------------------------------------------------------------------------------- + + +## Introduction +VolunTier is the **top _Tier_** solution for volunteer organisations that specialise in teaching students and looking to manage your growing clientele efficiently. +VolunTier is designed for those of you who are **familiar with the Command Line Interface (CLI) and can type fast** living in Singapore, who have many tutors and tutee data to manage and support tutoring of 3 subjects. VolunTier simplifies the process of adding, editing and deleting your volunteers, students and the lessons that they share. @@ -54,6 +87,8 @@ Tutor and Tutees can both be referred to as Person. ### CLI tutorial +Skip to [Features](#features) if you are proficient in CLI. + This tutorial introduces you to the basics of using the Command Line Interface (CLI) on Unix-based systems (Linux/macOS) and Windows. By the end, you’ll be comfortable navigating the file system, managing files, and running basic commands through the terminal. #### 1. **What is the CLI?** @@ -78,6 +113,16 @@ Ctrl + Alt + T ## Features + + + +**Tips:** + +* start the app with `java -jar VolunTier.jar` when you are in the folder you put the jar file in. + + + + **Notes about the command format:**
@@ -101,6 +146,9 @@ Ctrl + Alt + T Index **must be a positive integer**. * If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application. + +* For users who have used VolunTier before can jump to [Command Summary](# Command summary) +
@@ -122,7 +170,6 @@ Examples: * `addTutor \n Alice Pauline \p 98722342 \e alicep@example.com \a Alice street, block 123, 999888 \s math \s science` * `addTutor \n John Doe \p 98765432 \e johnd@example.com \a Mingyang street, block 123, 888777 \h 6 \s english` - ### Adding a Tutee: `addTutee` Adds a tutee to VolunTier. @@ -136,14 +183,16 @@ Format: `addTutee \n NAME \p PHONE_NUMBER \e EMAIL \a ADDRESS [\h HOURS] [\s SUB * Phone number must be 8 integer digits and start with 8, 9, or 6. * Address must have any text followed by a comma and a 6-digit postal code.
-e.g. `Tampines, 234678`. + e.g. `Tampines, 234678`. * Hours must be a non-negative integer, with a maximum of 876,000 (100 years). * Hours will default to 0 if it is not specified. * A person can have any number of subjects (including 0). -
+ +* There are only the basic 3 subjects (math, science, english) in VolunTier currently + ### Adding a Lesson: `addLesson` @@ -199,7 +248,7 @@ Examples: ### Locating persons by subject: `findSubject` -Find persons who have any of the subject(s). +Finds persons who have any of the subject(s). Format: `findSubject SUBJECT [MORE_SUBJECTS]` @@ -227,6 +276,8 @@ Examples: * `list` followed by `delete 2` deletes the 2nd person in VolunTier. * `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command. +> **⚠️ Warning:** Deleting a person will permanently remove all lessons associated with them. Ensure you have selected the correct person before proceeding with deletion. + ### Deleting a lesson : `deleteLesson` Deletes the specified lesson from VolunTier. @@ -270,6 +321,17 @@ Format: `redo` * Redo is only available immediately after an undo. + + +**Tips:** + +* The undo and redo commands only apply to actions that modify data in the VolunTier address book, such as `edit` or `addTutor`. Commands that do not alter data, like `view`, cannot be undone or redone. + + + + + + Examples: * If you `undo` the addition of a new tutor by mistake, `redo` will restore that entry. @@ -329,7 +391,7 @@ Format: `import \f FILEPATH` * For any field that requires a comma, surround it in quotes like this: "1 Jurong, 123456". * For more than one subject, separate it with a semicolon like this: English; Science. - + Example: @@ -386,20 +448,21 @@ Furthermore, certain edits can cause the VolunTier to behave in unexpected ways Action | Format, Examples -----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Add Lesson** | `addLesson TUTOR_INDEX TUTEE_INDEX \s SUBJECT`
e.g., `addLesson 1 2 \s science` -**Add Tutee** | `addTutee \n NAME \p PHONE_NUMBER \e EMAIL \a ADDRESS [\h HOURS] [\s SUBJECT​]…​`
e.g., `addTutee \n Evan Lee \p 88889999 \e evanlee@example.com \a 345, Clementi Rd, 1234665 \h 2 \s english` -**Add Tutor** | `addTutor \n NAME \p PHONE_NUMBER \e EMAIL \a ADDRESS [\h HOURS] [\s SUBJECT]…​`
e.g., `addTutor \n James Ho \p 92224444 \e jamesho@example.com \a 123, Clementi Rd, 1234665 \h 7 \s math` +**Add Tutee** | `addTutee \n NAME \p PHONE_NUMBER \e EMAIL \a ADDRESS [\h HOURS] [\s SUBJECT​]…​`
e.g., `addTutee \n Evan Lee \p 88889999 \e evanlee@example.com \a 345, Clementi Rd, 123465 \h 2 \s english` +**Add Tutor** | `addTutor \n NAME \p PHONE_NUMBER \e EMAIL \a ADDRESS [\h HOURS] [\s SUBJECT]…​`
e.g., `addTutor \n James Ho \p 92224444 \e jamesho@example.com \a 123, Clementi Rd, 123465 \h 7 \s math` **Clear** | `clear` **Delete** | `delete INDEX`
e.g., `delete 3` -**DeleteLesson**| `deleteLesson TUTOR_INDEX TUTEE_INDEX \s SUBJECT `
e.g., `deleteLesson 1 2 \s science` +**Delete Lesson**| `deleteLesson TUTOR_INDEX TUTEE_INDEX \s SUBJECT `
e.g., `deleteLesson 1 2 \s science` **Edit** | `edit INDEX [\n NAME] [\p PHONE_NUMBER] [\e EMAIL] [\a ADDRESS] [\h HOURS] [\s SUBJECT]…​`
e.g.,`edit 2 \n James Lee \e jameslee@example.com` **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` -**FindSubject** | `findSubject SUBJECT [MORE_SUBJECTS]`
e.g., `findSubject math science` +**Find Subject** | `findSubject SUBJECT [MORE_SUBJECTS]`
e.g., `findSubject math science` **History** | `history` **Import** | `import \f FILEPATH` **List** | `list` **Undo** | `undo` **Redo** | `redo` -**View** | `view` +**View** | `view INDEX`
e.g., `view 2` **View Tutor Hours** | `vtc` **Exit** | `exit` **Help** | `help` +