From 9bf4de1e52c2c3a4e0ad427aa249ae368ac0b684 Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 01:58:02 +0800 Subject: [PATCH 01/10] Improve grammar for UG intro --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index f0f4312ce96..fe267103936 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -15,7 +15,7 @@ title: User Guide ### Purpose of this guide - The purpose of this guide is to get you familiar with the features of **Jobby** - from the very basics, to the most advanced features the application has to offer. These features range from the simple task of adding an contacts into the application for tracking to how our application can assist you in tracking every steps of your application process. We will go through every feature **Jobby** has to offer within this guide. You can check out the Table of Contents to navigate to a feature you might be interested in using. + The purpose of this guide is to get you familiar with the features of **Jobby** - from the very basics, to the most advanced features the application has to offer. These features range from the simple task of adding contacts into the application for tracking to how our application can assist you in tracking every step of your application process. We will go through every feature **Jobby** has to offer within this guide. You can check out the Table of Contents to navigate to a feature you might be interested in using. ### How to use this guide From 1611a1503e1d01b7a94964d1591aa5550219211a Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 02:05:31 +0800 Subject: [PATCH 02/10] Remove generic delete --- docs/UserGuide.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index fe267103936..7d7608b9de6 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -478,18 +478,13 @@ Edits the given job application according to the parameters given. | `edit --application 1`{:.language-sh} | None of the fields to edit are given. | | `edit --application 1 --by 31-31-2023`{:.language-sh} | The date is invalid. | +### Deleting contacts - `delete` +
Organization Recruiter
-### Deleting data - `delete` -
Organization Recruiter Job Application
+:trophy: How to delete contacts and job applications in Jobby Intermediate :warning: The deletion of data is permanent and there is no way to undo it. -The `delete` command allows you to delete contacts and job applications if they are no longer relevant. To learn more about deleting a contact or application, check out the sections below. - -#### Deleting contacts - `delete` - -:trophy: How to delete contacts and job applications in Jobby Intermediate - ##### Format ```sh delete INDEX/ID [--recursive] @@ -512,10 +507,13 @@ Deletes the contact at the given `INDEX` or `ID`. |------------------------|---------------------------------------------------------------------| | `delete 0` | Invalid index, as index starts from 1. | -#### Deleting job applications - `delete --application`{:.language-sh} +### Deleting job applications - `delete --application`{:.language-sh} +
Job Application
:trophy: Able to delete job applications in Jobby Intermediate +:warning: The deletion of data is permanent and there is no way to undo it. + ##### Format ```sh delete --application INDEX From 1a1a8da0369ea2b66c6fb2011ae57c257ed2e161 Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 02:08:51 +0800 Subject: [PATCH 03/10] Add exit to command summary --- docs/UserGuide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 7d7608b9de6..b73d2045e84 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -781,6 +781,7 @@ Jobby's data are saved automatically as a JSON file `[JAR file location]/data/jo |-----------|------------------| | **Clear** | `clear` | | **Help** | `help` | +| **Exit** | `exit` | From 9c9c1eb83f58454c15f2e460667a46e637c31b2d Mon Sep 17 00:00:00 2001 From: "LAPTOP-NQHH6Q7K\\Juanpa" Date: Tue, 14 Nov 2023 01:47:44 +0800 Subject: [PATCH 04/10] Add test cases for List, Sort, and Reminder --- .../logic/commands/ReminderCommandTest.java | 53 +++++++++++++++++++ .../logic/commands/SortCommandTest.java | 46 +++++++++++++++- .../logic/parser/ListCommandParserTest.java | 6 +++ .../parser/ReminderCommandParserTest.java | 39 ++++++++++++++ .../logic/parser/SortCommandParserTest.java | 43 +++++++++++++++ 5 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 src/test/java/seedu/address/logic/commands/ReminderCommandTest.java create mode 100644 src/test/java/seedu/address/logic/parser/ReminderCommandParserTest.java create mode 100644 src/test/java/seedu/address/logic/parser/SortCommandParserTest.java diff --git a/src/test/java/seedu/address/logic/commands/ReminderCommandTest.java b/src/test/java/seedu/address/logic/commands/ReminderCommandTest.java new file mode 100644 index 00000000000..010f386e1db --- /dev/null +++ b/src/test/java/seedu/address/logic/commands/ReminderCommandTest.java @@ -0,0 +1,53 @@ +package seedu.address.logic.commands; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.testutil.TypicalContacts.getTypicalAddressBook; + +import java.util.ArrayList; + +import org.junit.jupiter.api.Test; + +import seedu.address.model.Model; +import seedu.address.model.ModelManager; +import seedu.address.model.UserPrefs; +import seedu.address.model.jobapplication.JobApplication; + +class ReminderCommandTest { + private Model model = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + private Model expectedModel = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + + @Test + public void equals() { + ReminderCommand r = new ReminderCommand(true); + ReminderCommand r2 = new ReminderCommand(true); + ReminderCommand r3 = new ReminderCommand(false); + + assertEquals(r, r); + assertEquals(r, r2); + assertNotEquals(r, r3); + } + + @Test + public void execute_remindEarliest_applicationsSorted() { + String expectedMessage = ReminderCommand.MESSAGE_REMINDED_EARLIEST; + ReminderCommand command = new ReminderCommand(true); + expectedModel.updateSortedApplicationList(JobApplication.DEADLINE_COMPARATOR); + assertCommandSuccess(command, model, expectedMessage, expectedModel); + ArrayList arrayList1 = new ArrayList<>(model.getDisplayedApplicationList()); + ArrayList arrayList2 = new ArrayList<>(expectedModel.getDisplayedApplicationList()); + assertEquals(arrayList1, arrayList2); + } + + @Test + public void execute_sortTitle_applicationsSorted() { + String expectedMessage = ReminderCommand.MESSAGE_REMINDED_LATEST; + ReminderCommand command = new ReminderCommand(false); + expectedModel.updateSortedApplicationList(JobApplication.DEADLINE_COMPARATOR.reversed()); + assertCommandSuccess(command, model, expectedMessage, expectedModel); + ArrayList arrayList1 = new ArrayList<>(model.getDisplayedApplicationList()); + ArrayList arrayList2 = new ArrayList<>(expectedModel.getDisplayedApplicationList()); + assertEquals(arrayList1, arrayList2); + } +} diff --git a/src/test/java/seedu/address/logic/commands/SortCommandTest.java b/src/test/java/seedu/address/logic/commands/SortCommandTest.java index 727a2033043..ed453d8dcbc 100644 --- a/src/test/java/seedu/address/logic/commands/SortCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/SortCommandTest.java @@ -2,17 +2,25 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.testutil.TypicalContacts.getTypicalAddressBook; +import java.util.ArrayList; import java.util.Comparator; import org.junit.jupiter.api.Test; +import seedu.address.model.Model; +import seedu.address.model.ModelManager; +import seedu.address.model.UserPrefs; import seedu.address.model.contact.Contact; import seedu.address.model.jobapplication.JobApplication; class SortCommandTest { + private Model model = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + private Model expectedModel = new ModelManager(getTypicalAddressBook(), new UserPrefs()); + private Model unsortedModel = new ModelManager(getTypicalAddressBook(), new UserPrefs()); - // TODO: tech debt - lousy tests @Test public void equals() { Comparator a = (c, b) -> c.getType().compareTo(b.getType()); @@ -34,4 +42,40 @@ public void equals() { assertNotEquals(s, new SortCommand(d, j, false)); assertNotEquals(s, new SortCommand(a, j, true)); } + + @Test + public void execute_sortName_contactsSorted() { + String expectedMessage = SortCommand.MESSAGE_SORTED_CONTACTS; + SortCommand command = new SortCommand(Model.COMPARATOR_NAME, null, false); + expectedModel.updateSortedContactList(Model.COMPARATOR_NAME); + assertCommandSuccess(command, model, expectedMessage, expectedModel); + ArrayList arrayList1 = new ArrayList<>(model.getDisplayedContactList()); + ArrayList arrayList2 = new ArrayList<>(expectedModel.getDisplayedContactList()); + assertEquals(arrayList1, arrayList2); + } + + @Test + public void execute_sortTitle_applicationsSorted() { + String expectedMessage = SortCommand.MESSAGE_SORTED_APPLICATIONS; + SortCommand command = new SortCommand(null, JobApplication.JOB_TITLE_COMPARATOR, + false); + expectedModel.updateSortedApplicationList(JobApplication.JOB_TITLE_COMPARATOR); + assertCommandSuccess(command, model, expectedMessage, expectedModel); + ArrayList arrayList1 = new ArrayList<>(model.getDisplayedApplicationList()); + ArrayList arrayList2 = new ArrayList<>(expectedModel.getDisplayedApplicationList()); + assertEquals(arrayList1, arrayList2); + } + + @Test + public void execute_sortNone_applicationsUnsorted() { + String expectedMessage = SortCommand.MESSAGE_RESET_SORTING; + SortCommand command = new SortCommand(null, null, true); + assertCommandSuccess(command, model, expectedMessage, unsortedModel); + ArrayList arrayListContact1 = new ArrayList<>(model.getDisplayedContactList()); + ArrayList arrayListContact2 = new ArrayList<>(unsortedModel.getDisplayedContactList()); + ArrayList arrayListApp1 = new ArrayList<>(model.getDisplayedApplicationList()); + ArrayList arrayListApp2 = new ArrayList<>(unsortedModel.getDisplayedApplicationList()); + assertEquals(arrayListApp1, arrayListApp2); + assertEquals(arrayListContact1, arrayListContact2); + } } diff --git a/src/test/java/seedu/address/logic/parser/ListCommandParserTest.java b/src/test/java/seedu/address/logic/parser/ListCommandParserTest.java index 5e218051b41..daca4f46401 100644 --- a/src/test/java/seedu/address/logic/parser/ListCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/ListCommandParserTest.java @@ -2,6 +2,9 @@ import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; import static seedu.address.model.Model.PREDICATE_SHOW_ALL_CONTACTS; +import static seedu.address.model.Model.PREDICATE_SHOW_NOT_APPLIED_ORGANIZATIONS; +import static seedu.address.model.Model.PREDICATE_SHOW_ONLY_ORGANIZATIONS; +import static seedu.address.model.Model.PREDICATE_SHOW_ONLY_RECRUITERS; import org.junit.jupiter.api.Test; @@ -14,5 +17,8 @@ public class ListCommandParserTest { @Test public void parse_validArgs_returnsListCommand() { assertParseSuccess(parser, "", new ListCommand(PREDICATE_SHOW_ALL_CONTACTS)); + assertParseSuccess(parser, "--org", new ListCommand(PREDICATE_SHOW_ONLY_ORGANIZATIONS)); + assertParseSuccess(parser, "--rec", new ListCommand(PREDICATE_SHOW_ONLY_RECRUITERS)); + assertParseSuccess(parser, "--toapply", new ListCommand(PREDICATE_SHOW_NOT_APPLIED_ORGANIZATIONS)); } } diff --git a/src/test/java/seedu/address/logic/parser/ReminderCommandParserTest.java b/src/test/java/seedu/address/logic/parser/ReminderCommandParserTest.java new file mode 100644 index 00000000000..5a58119fce9 --- /dev/null +++ b/src/test/java/seedu/address/logic/parser/ReminderCommandParserTest.java @@ -0,0 +1,39 @@ +package seedu.address.logic.parser; + +import static seedu.address.logic.Messages.MESSAGE_EXTRA_FIELDS; +import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; + +import org.junit.jupiter.api.Test; + +import seedu.address.logic.commands.ReminderCommand; + +public class ReminderCommandParserTest { + + private ReminderCommandParser parser = new ReminderCommandParser(); + + @Test + public void parse_emptyArg_throwsParseException() { + assertParseFailure(parser, " ", + String.format(MESSAGE_INVALID_COMMAND_FORMAT, ReminderCommand.MESSAGE_USAGE)); + } + + @Test + public void parse_invalidArg_throwsParseException() { + assertParseFailure(parser, "--org", + MESSAGE_EXTRA_FIELDS + "--org"); + assertParseFailure(parser, "--by", + MESSAGE_EXTRA_FIELDS + "--by"); + } + + @Test + public void parse_validArgs_returnsReminderCommand() { + ReminderCommand expectedReminderCommand = + new ReminderCommand(true); + assertParseSuccess(parser, "--earliest", expectedReminderCommand); + ReminderCommand expectedReminderCommand2 = + new ReminderCommand(false); + assertParseSuccess(parser, "--latest", expectedReminderCommand2); + } +} diff --git a/src/test/java/seedu/address/logic/parser/SortCommandParserTest.java b/src/test/java/seedu/address/logic/parser/SortCommandParserTest.java new file mode 100644 index 00000000000..c7b94642c6b --- /dev/null +++ b/src/test/java/seedu/address/logic/parser/SortCommandParserTest.java @@ -0,0 +1,43 @@ +package seedu.address.logic.parser; + +import static seedu.address.logic.Messages.MESSAGE_EXTRA_FIELDS; +import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT; +import static seedu.address.logic.Messages.MESSAGE_SIMULTANEOUS_USE_DISALLOWED_FIELDS; +import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure; +import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess; + +import org.junit.jupiter.api.Test; + +import seedu.address.logic.commands.SortCommand; +import seedu.address.model.Model; + +public class SortCommandParserTest { + + private SortCommandParser parser = new SortCommandParser(); + + @Test + public void parse_emptyArg_throwsParseException() { + assertParseFailure(parser, " ", + String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE)); + } + + @Test + public void parse_invalidArg_throwsParseException() { + assertParseFailure(parser, "--title --name", + MESSAGE_SIMULTANEOUS_USE_DISALLOWED_FIELDS + "--name, --title"); + assertParseFailure(parser, "--none --descending", + MESSAGE_SIMULTANEOUS_USE_DISALLOWED_FIELDS + "--descending, --none"); + assertParseFailure(parser, "--org", + MESSAGE_EXTRA_FIELDS + "--org"); + } + + @Test + public void parse_validArgs_returnsSortCommand() { + SortCommand expectedSortCommand = + new SortCommand(Model.COMPARATOR_ADDRESS, null, false); + assertParseSuccess(parser, "--address", expectedSortCommand); + SortCommand expectedSortCommand2 = + new SortCommand(Model.COMPARATOR_ADDRESS, null, true); + assertParseSuccess(parser, "--none", expectedSortCommand2); + } +} From 9fba25ccaeb693cafad7969ea19d16afb9dfd79e Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 02:11:36 +0800 Subject: [PATCH 05/10] Adjust formatting for clear --- docs/UserGuide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index b73d2045e84..33bbd834124 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -714,6 +714,7 @@ Shows a message explaining how to access the help page.
Organization Recruiter Job Application
:trophy: How to clear all contacts and job applications in Jobby Intermediate
+ :warning: The deletion of all data is permanent and there is no way to undo it. ##### Format From 6669d22e92c0d1e2d78f2c5f7b9b06caa69eafb3 Mon Sep 17 00:00:00 2001 From: Wern Date: Tue, 14 Nov 2023 02:19:42 +0800 Subject: [PATCH 06/10] Fix DG heading level --- docs/DeveloperGuide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index f9aaa18455a..9c61a5576ec 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -424,7 +424,7 @@ Internally, whenever requested, the `AutocompleteGenerator`: 4. ranks them based on their relevance, 5. and finally returns a stream of autocompleted commands. -### Design Considerations +#### Design Considerations When designing the Autocomplete feature, important considerations include the ability to flexibly define and craft new constraints based on heuristically determined rules. @@ -433,15 +433,15 @@ By abstracting away all operations into simple components like sets and constrai Most notably, it also allows for advanced rulesets to be specified in a human-readable fashion. Take a look at [AddCommand#AUTOCOMPLETE_SUPPLIER](https://github.com/AY2324S1-CS2103T-W08-3/tp/blob/c484696fe4c12d514ad3fb6a71ff2dfea089fe32/src/main/java/seedu/address/logic/commands/AddCommand.java#L47). -#### Alternatives Considered +##### Alternatives Considered -##### Alternative 1: Using Hardcoded Rules in Java +###### Alternative 1: Using Hardcoded Rules in Java One obvious alternative is to simply the possible autocompletion results for each command in standard Java. We may achieve this by manually checking against a command string for each command type, and using existing tokenization classes like `ArgumentTokenizer` and `ArgumentMultimap`. While this would incur less overhead in initial development time, more explicit coding is required - it is neither quick to write nor scalable to tons of commands. This is especially important as autocomplete was developed in parallel with other new features being added to Jobby, which would require constant changes to the autocomplete rules. -##### Alternative 2: Using a Graph-based Approach +###### Alternative 2: Using a Graph-based Approach A graph based approach, e.g., having a tree structure to define constraints and dependencies, may be more efficient than the current solution (which has to check against _all_ known rules every single time). From 44862328dfec25e26864ac4612c440435112b8ef Mon Sep 17 00:00:00 2001 From: wamps-jp <77482467+wamps-jp@users.noreply.github.com> Date: Tue, 14 Nov 2023 02:24:22 +0800 Subject: [PATCH 07/10] Update UserGuide.md --- docs/UserGuide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 33bbd834124..ea18c80f2e7 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -156,7 +156,7 @@ You can use [`add --org`{:.language-sh}](#adding-organizations---add---org) to a ![Adding Organization](images/ug-images/org-added.png) -You have successfully added **Google**, with the email **google@gmail.com** into your **organization contact**! +You have successfully added **Google**, with the email **google@gmail.com** into Jobby! ### Adding your first Recruiter @@ -191,7 +191,7 @@ command structures and formats, or visit the [Features](#features) section to se ## Using Jobby -This section explains how we can understand and interact with Jobby via commands. +This section explains how you can understand and interact with Jobby via commands. If you're looking for the list of available commands, check out the [Features](#features) section instead. @@ -265,7 +265,7 @@ Throughout this guide and within Jobby itself, you will find symbols and placeho * e.g., if you see something like `< add some text here >`, it means you should replace it with your own text. -Parameters may have certain value format restrictions - Jobby will let you know if you do not meet a requirement when you input your command. Optionally, you may also refer to their details in [Appendix A](#appendix-a--acceptable-values-for-parameters) later. +Parameters may have certain value format restrictions - Jobby will let you know if you do not meet a requirement when you input your command. Optionally, you may also refer to their details in [Appendix A](#appendix-a-acceptable-values-for-parameters) later. ### Autocompleting Commands From d43843608fb206713263a26a4e1538654f5f1d4f Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 02:33:53 +0800 Subject: [PATCH 08/10] Update ID requirement --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index ea18c80f2e7..2998c725b1b 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -807,7 +807,7 @@ Jobby's data are saved automatically as a JSON file `[JAR file location]/data/jo |-----------|---------|--------------|----------| | `INDEX` | [`edit`](#editing-contacts---edit)

[`apply`](#applying-to-organizations---apply)

[`edit --application`{:.language-sh}](#editing-job-applications---edit---application)

[`delete`](#deleting-contacts---delete)

[`delete --application`{:.language-sh}](#deleting-job-applications---delete---application) | A valid index can accept any positive integer up to the number of items displayed in the contact or job application list where applicable. | `1`
`10` | | `NAME` | [`add --org`{:.language-sh}](#adding-organizations---add---org)

[`add --rec`{:.language-sh}](#adding-recruiters---add---rec)

[`edit`](#editing-contacts---edit) | A valid name can accept any non-empty value. | `Ryan Koh`
`小明` | -| `ID` | [`add --org`{:.language-sh}](#adding-organizations---add---org)

[`add --rec`{:.language-sh}](#adding-recruiters---add---rec)

[`edit`](#editing-contacts---edit)

[`apply`](#applying-to-organizations---apply)

[`delete`](#deleting-contacts---delete) | A valid ID has to start with a letter.

It can consist of alphanumeric and basic symbols (i.e. `a-z`, `A-Z`, `0-9`, `-`, `_`) | `woogle123`
`ryan_soc-rec` | +| `ID` | [`add --org`{:.language-sh}](#adding-organizations---add---org)

[`add --rec`{:.language-sh}](#adding-recruiters---add---rec)

[`edit`](#editing-contacts---edit)

[`apply`](#applying-to-organizations---apply)

[`delete`](#deleting-contacts---delete) | A valid ID has to start with a letter.

It can consist of alphanumeric characters and basic symbols (i.e. `a-z`, `A-Z`, `0-9`, `-`, `_`). However it cannot have consecutive underscores and dashes. | `woogle123`
`ryan_soc-rec` | | `NUMBER` | [`add --org`{:.language-sh}](#adding-organizations---add---org)

[`add --rec`{:.language-sh}](#adding-recruiters---add---rec)

[`edit`](#editing-contacts---edit) | A valid phone number can consist of only numbers with no whitespace.

It must be at least 3 digits. | `999`
`91824137` | | `EMAIL` | [`add --org`{:.language-sh}](#adding-organizations---add---org)

[`add --rec`{:.language-sh}](#adding-recruiters---add---rec)

[`edit`](#editing-contacts---edit) | A valid email should be in the form of `local-part@domain` where the `local-part` and `domain` must be separated by a single **@**.

The `local-part` can consist of any character except whitespace.

The `domain` name can comprise of one or more labels separated by periods, and each label can include any character except whitespace. The last `domain` label must be a minimum of two characters long. | `ryankoh@nus`
`ryan-koh@nus.edu.sg` | | `URL` | [`add --org`{:.language-sh}](#adding-organizations---add---org)

[`add --rec`{:.language-sh}](#adding-recruiters---add---rec)

[`edit`](#editing-contacts---edit) | A valid url should include a part in the form of `domain.tld` where the `domain` and the `tld` (top level domain) must be separated by a period. | `example.com`
`example.more.com`
`https://example.com`
`example.com/more` | From 8804cb6191a7b3ee1f43d38fb30378fe66bcd9f6 Mon Sep 17 00:00:00 2001 From: wamps-jp <77482467+wamps-jp@users.noreply.github.com> Date: Tue, 14 Nov 2023 02:31:58 +0800 Subject: [PATCH 09/10] Update UserGuide.md --- docs/UserGuide.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 2998c725b1b..b21f0a534bd 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -338,9 +338,9 @@ Adds an organization contact with the details given to the command. | Command | Reason | |------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------| -| `add --org --name J&J`{:.language-sh} | Adding an organization **J&J**. | -| `add --org --name Google --id g-sg --phone 98765432 `{:.language-sh} | Adding an organization **Google** with other flags. | -| `add --org --name Examinations NUS --phone 65166269 --email examinations@nus.edu.sg --url https://luminus.nus.edu.sg/`{:.language-sh} | Adding an organization **Examination NUS** with other flags. | +| `add --org --name J&J`{:.language-sh} | Adds an organization **J&J**. | +| `add --org --name Google --id g-sg --phone 98765432 `{:.language-sh} | Adds an organization **Google** with other flags. | +| `add --org --name Examinations NUS --phone 65166269 --email examinations@nus.edu.sg --url https://luminus.nus.edu.sg/`{:.language-sh} | Adds an organization **Examination NUS** with other flags. | ##### Invalid examples @@ -410,8 +410,8 @@ Edits the given contact according to the parameters given. | Command | Reason | |-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------| -| `edit google --phone 91292951`{:.language-sh} | Change phone number of organization with **ID** google to **91292951**. | -| `edit 1 --name Jane Street`{:.language-sh} | Change name of contact at index 1 to **Jane Street**. | +| `edit google --phone 91292951`{:.language-sh} | Changes phone number of organization with **ID** google to **91292951**. | +| `edit 1 --name Jane Street`{:.language-sh} | Changes name of contact at index 1 to **Jane Street**. | | `edit 1 --name Google --phone 91241412 --email google@gmail.sg`{:.language-sh} | Changes the name, phone number and email of the contact at index 1 to `Google`, `91241412` and `google@gmail.sg` respectively. | ##### Invalid examples @@ -437,8 +437,8 @@ Applies to the given organization by creating a job application associated with | Command | Reason | |----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------| -| `apply 1 --title SWE`{:.language-sh} | Apply to the **organization** at index 1, for the title of **SWE**. | -| `apply google --title Unit Tester --by 12-12-2023`{:.language-sh} | Apply to the **organization** with ID of *google** for title of **Unit Tester** by **12-12-2023**. | +| `apply 1 --title SWE`{:.language-sh} | Applies to the **organization** at index 1, for the title of **SWE**. | +| `apply google --title Unit Tester --by 12-12-2023`{:.language-sh} | Applies to the **organization** with ID of *google** for title of **Unit Tester** by **12-12-2023**. | ##### Invalid examples @@ -467,8 +467,8 @@ Edits the given job application according to the parameters given. | Command | Reason | |--------------------------------------------|-----------------------------------------------------------------| -| `edit --application 1 --title SRE`{:.language-sh} | Change the title of the job application at index 1 to **SRE**. | -| `edit --application 1 --status pending`{:.language-sh} | Change the status of job application at index 1 to **pending**. | +| `edit --application 1 --title SRE`{:.language-sh} | Changes the title of the job application at index 1 to **SRE**. | +| `edit --application 1 --status pending`{:.language-sh} | Changes the status of job application at index 1 to **pending**. | ##### Invalid examples @@ -497,9 +497,9 @@ Deletes the contact at the given `INDEX` or `ID`. | Command | Reason | |------------------------|----------------------------------------------------------------------------------------| -| `delete 1` | This will delete the contact at index 1. | -| `delete josh` | This will delete the contact with the **ID** of **josh**. | -| `delete 1 --recursive`{:.language-sh} | This will delete a contact and all its associated recruiter contacts and applications. | +| `delete 1` | Deletes the contact at index 1. | +| `delete josh` | Deletes the contact with the **ID** of **josh**. | +| `delete 1 --recursive`{:.language-sh} | Deletes a contact and all its associated recruiter contacts and applications. | ##### Invalid examples @@ -525,7 +525,7 @@ Deletes the job application at the given `INDEX`. | Command | Reason | |--------------------------|---------------------------------------------------------------------| -| `delete --application 1`{:.language-sh} | This will delete the application at index 1. | +| `delete --application 1`{:.language-sh} | Deletes the application at index 1. | ##### Invalid examples @@ -554,9 +554,9 @@ Lists all contacts. If you provide a parameter, the contacts listed will be only | Command | Reason | |------------------|-------------------------------------------------------------------| | `list` | List all **contacts**. | -| `list --org`{:.language-sh} | List all **organization contacts**. | -| `list --rec`{:.language-sh} | List all **recruiter contacts**. | -| `list --toapply`{:.language-sh} | List all **organization contacts** that have not been applied to. | +| `list --org`{:.language-sh} | Lists all **organization contacts**. | +| `list --rec`{:.language-sh} | Lists all **recruiter contacts**. | +| `list --toapply`{:.language-sh} | Lists all **organization contacts** that have not been applied to. | ### Searching contacts - `find` @@ -650,10 +650,10 @@ Sorts contacts or job applications for you by the specified flag. | Command | Reason | |-----------------------------|------------------------------------------------------------------------------------------------------------| -| `sort --title --ascending`{:.language-sh} | Sort **job applications** by title, in ascending alphabetical order. | -| `sort --url`{:.language-sh} | Sort **contacts** by url, in the default order - ascending alphabetical. | -| `sort --stale --descending`{:.language-sh} | Sort **job applications** by last updated time, in reverse chronological order, from most recent to least. | -| `sort --none`{:.language-sh} | Reset the sorting order of **contacts** and **job applications**. | +| `sort --title --ascending`{:.language-sh} | Sorts **job applications** by title, in ascending alphabetical order. | +| `sort --url`{:.language-sh} | Sorts **contacts** by url, in the default order - ascending alphabetical. | +| `sort --stale --descending`{:.language-sh} | Sorts **job applications** by last updated time, in reverse chronological order, from most recent to least. | +| `sort --none`{:.language-sh} | Resets the sorting order of **contacts** and **job applications**. | ##### Invalid examples @@ -686,8 +686,8 @@ Reminds you of upcoming deadlines for job applications. | Command | Reason | |---------------------|--------------------------------------------------------------------------------------| -| `remind --earliest`{:.language-sh} | List the application deadlines in order of urgency, from earliest to latest. | -| `remind --latest`{:.language-sh} | List the application deadlines in order of reverse urgency, from latest to earliest. | +| `remind --earliest`{:.language-sh} | Lists the application deadlines in order of urgency, from earliest to latest. | +| `remind --latest`{:.language-sh} | Lists the application deadlines in order of reverse urgency, from latest to earliest. | ##### Invalid examples From 6d1b551e648f88d3f3aa14e020105f07121e2107 Mon Sep 17 00:00:00 2001 From: Wern Date: Tue, 14 Nov 2023 02:43:54 +0800 Subject: [PATCH 10/10] Move delete --- docs/UserGuide.md | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index b21f0a534bd..dc3e7632f82 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -420,6 +420,35 @@ Edits the given contact according to the parameters given. |-----------------------------------------|-------------------------------------------------------------------------------------| | `edit google --phone 8124!@#$`{:.language-sh} | `--phone`{:.language-sh} has an [invalid parameter](#appendix-a-acceptable-values-for-parameters) | +### Deleting contacts - `delete` +
Organization Recruiter
+ +:trophy: How to delete contacts and job applications in Jobby Intermediate + +:warning: The deletion of data is permanent and there is no way to undo it. + +##### Format +```sh +delete INDEX/ID [--recursive] +``` +Deletes the contact at the given `INDEX` or `ID`. +* `--recursive`{:.language-sh} flag deletes the associated recruiter contacts and internship applications if the contact to delete is an organization. +* If you wish to know more about the requirements for each parameter, check out the [given appendix](#appendix-a-acceptable-values-for-parameters). + +##### Valid examples + +| Command | Reason | +|------------------------|----------------------------------------------------------------------------------------| +| `delete 1` | Deletes the contact at index 1. | +| `delete josh` | Deletes the contact with the **ID** of **josh**. | +| `delete 1 --recursive`{:.language-sh} | Deletes a contact and all its associated recruiter contacts and applications. | + +##### Invalid examples + +| Command | Reason | +|------------------------|---------------------------------------------------------------------| +| `delete 0` | Invalid index, as index starts from 1. | + ### Applying to organizations - `apply`
Job Application
@@ -478,35 +507,6 @@ Edits the given job application according to the parameters given. | `edit --application 1`{:.language-sh} | None of the fields to edit are given. | | `edit --application 1 --by 31-31-2023`{:.language-sh} | The date is invalid. | -### Deleting contacts - `delete` -
Organization Recruiter
- -:trophy: How to delete contacts and job applications in Jobby Intermediate - -:warning: The deletion of data is permanent and there is no way to undo it. - -##### Format -```sh -delete INDEX/ID [--recursive] -``` -Deletes the contact at the given `INDEX` or `ID`. -* `--recursive`{:.language-sh} flag deletes the associated recruiter contacts and internship applications if the contact to delete is an organization. -* If you wish to know more about the requirements for each parameter, check out the [given appendix](#appendix-a-acceptable-values-for-parameters). - -##### Valid examples - -| Command | Reason | -|------------------------|----------------------------------------------------------------------------------------| -| `delete 1` | Deletes the contact at index 1. | -| `delete josh` | Deletes the contact with the **ID** of **josh**. | -| `delete 1 --recursive`{:.language-sh} | Deletes a contact and all its associated recruiter contacts and applications. | - -##### Invalid examples - -| Command | Reason | -|------------------------|---------------------------------------------------------------------| -| `delete 0` | Invalid index, as index starts from 1. | - ### Deleting job applications - `delete --application`{:.language-sh}
Job Application