Skip to content

Commit

Permalink
Merge pull request #185 from wamps-jp/branch-UG-5
Browse files Browse the repository at this point in the history
Update UG examples
  • Loading branch information
McNaBry authored Nov 13, 2023

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
2 parents d3c16c1 + 6ba5e6e commit 0a439ab
Showing 2 changed files with 159 additions and 137 deletions.
296 changes: 159 additions & 137 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
@@ -404,143 +404,6 @@ edit INDEX/ID [--name NAME] [--id ID] [--phone PHONE] [--email EMAIL] [--url URL
|-----------------------------------------|-------------------------------------------------------------------------------------|
| `edit google --phone 8124!@#$` | `--phone` has an [invalid parameter](appendix-a--acceptable-values-for-parameters) |

### Searching contacts - `find`
<div class="applies-to pill"><span class="jobby-data-class pill">Organization</span> <span class="jobby-data-class pill">Recruiter</span></div>

<span class="learning-outcome pill">:trophy: How to find organizations and recruiters by name or id</span> <span class="beginner pill">Beginner</span>

##### Format
```sh
find KEYWORD/ID...
```
* This will return any <span class="jobby-data-class">Organization</span> or <span class="jobby-data-class">Recruiter</span> that contains the given keywords.

##### Valid examples

| Command | Reason |
|-------------------|-----------------------------------------------------------------------------------------------------|
| `find jo` | Finds Contacts and Applications whose **KEYWORD/ID** contains the [substring](#Glossary) "jo". |
| `find 1231` | Finds Contacts and Applications whose **KEYWORD/ID** contains the substring "1231". |
| `find alex david` | Finds Contacts and Applications whose **KEYWORD/ID** contains the substring "alex" or "david". |

##### Rules
<span class="intermediate pill">Intermediate</span>

* The search is case-insensitive. e.g `hans` will match `Hans`
* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
* You can match partial keywords. e.g. searching for `ha` will match with `hamburger`.
* Partial IDs can match the entire ID. e.g. searching for `1234` will match with `id_12345`.
* Persons matching at least one keyword will be returned (i.e. `OR` search)
e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`
* Can match with multiple ids `12345 id_51231` will match with `id_12345` and `id_51231`


### Listing data - `list`
<div class="applies-to pill"><span class="jobby-data-class pill">Organization</span> <span class="jobby-data-class pill">Recruiter</span> <span class="jobby-data-class pill">Job Application</span></div>

<span class="learning-outcome pill">:trophy: How to list organizations and recruiters in Jobby by conditions</span> <span class="intermediate pill">Intermediate</span>

##### Format
```sh
list [--org / --rec / --toapply]
```

* Supplying `--org` lists only <span class="jobby-data-class">Organizations</span> while supplying `--rec` lists only <span class="jobby-data-class">Recruiters</span>. Specifying neither will list all contacts.

* Supplying `--toapply` lists <span class="jobby-data-class">Organizations</span> you have not applied to.

##### Valid examples
* `list`
* `list --org`
* `list --rec`
* `list --toapply`


### Sorting data - `sort`
<div class="applies-to pill"><span class="jobby-data-class pill">Organization</span> <span class="jobby-data-class pill">Recruiter</span> <span class="jobby-data-class pill">Job Application</span></div>

<span class="learning-outcome pill">:trophy: How to sort contacts and job applications in Jobby</span> <span class="intermediate pill">Intermediate</span>

##### Format
```sh
sort --FLAG_TO_SORT [--ascending / --descending]
```

This sorts contacts or job applications by the specified field.

##### Supported fields <sub>(only 1 may be provided)</sub>

###### Fields for Contacts
* `--address` - The address of the <span class="jobby-data-class">Contact</span>. Will sort alphabetically.
* `--email` - The email address of the <span class="jobby-data-class">Contact</span>. Will sort alphabetically.
* `--id` - The identification string of the <span class="jobby-data-class">Contact</span>. Will sort alphabetically.
* `--name` - The name of the <span class="jobby-data-class">Contact</span>. Will sort alphabetically.
* `--phone` - The phone number of the <span class="jobby-data-class">Contact</span>. Will sort alphabetically.
* `--url` - The web address of the <span class="jobby-data-class">Contact</span>. Will sort alphabetically.

###### Fields for Job Applications
* `--by` - The deadline of the <span class="jobby-data-class">Job Application</span>. Will sort chronologically.
* `--stage` - The stage of the <span class="jobby-data-class">Job Application</span>. Will sort by stage order.
* `--stale` - The time of last update of the <span class="jobby-data-class">Job Application</span>. Will sort chronologically.
* `--status` - The status of the <span class="jobby-data-class">Job Application</span>. Will sort by status order.
* `--title` - The title of the <span class="jobby-data-class">Job Application</span>. Will sort alphabetically.

###### Resetting the sort order
* `--none` - Will reset the sorting order of <span class="jobby-data-class">Contacts</span> and <span class="jobby-data-class">Job Applications</span>.

###### Changing the sort order
* `--ascending` - The specified flag will sort in ascending order.
* `--descending` - The specified flag will sort in descending order.

If neither `--ascending` or `--descending` are provided, the list will be sorted in ascending order by default.

Neither `--ascending` nor `--descending` may be specified if the flag is `--none`.

`sort` will work even if no <span class="jobby-data-class">Contacts</span> or <span class="jobby-data-class">Job Applications</span> exist.

##### Sample demonstration

[SCREENSHOT HERE]

##### Valid examples
* `sort --title --ascending`
* `sort --url`
* `sort --stale --descending`
* `sort --none`

##### Invalid examples
* `sort` _No flag provided._
* `sort --organization` _Invalid flag._
* `sort --none --ascending` _Flags `--none` and `--ascending` both specified._


### Reminding about deadlines - `remind`
<div class="applies-to pill"><span class="jobby-data-class pill">Job Application</span></div>

<span class="learning-outcome pill">:trophy: How to get reminders of deadlines in Jobby</span> <span class="intermediate pill">Intermediate</span>

Reminds the user of upcoming deadlines for job applications.

##### Format
```sh
remind --earliest / --latest
```

* Specifying `--earliest` will list the application deadlines in order of urgency, from earliest to latest.

* Specifying `--latest` will list the application deadlines in order of reverse urgency, from latest to earliest.


##### Sample demonstration
* To see your application deadlines from the earliest to latest, use the command `remind --earliest`.

![Remind Earliest](images/starter-guide/remind-earliest.jpg)

##### Valid examples
* `remind --earliest`
* `remind --latest`


### Applying to organizations - `apply`
<div class="applies-to pill"><span class="jobby-data-class pill">Job Application</span></div>

@@ -645,6 +508,165 @@ delete --application INDEX
| `delete --application 0` | Invalid index, as index starts from 1. |


### Listing data - `list`
<div class="applies-to pill"><span class="jobby-data-class pill">Organization</span> <span class="jobby-data-class pill">Recruiter</span> <span class="jobby-data-class pill">Job Application</span></div>

<span class="learning-outcome pill">:trophy: How to list organizations and recruiters in Jobby by conditions</span> <span class="intermediate pill">Intermediate</span>

##### Format
```sh
list [--org / --rec / --toapply]
```
Lists all contacts. If you provide a parameter, the contacts listed will be only those that fit the given parameter.

* Supplying `--org` lists only <span class="jobby-data-class">Organizations</span> while supplying `--rec` lists only <span class="jobby-data-class">Recruiters</span>. Specifying neither will list all contacts.

* Supplying `--toapply` lists <span class="jobby-data-class">Organizations</span> you have not applied to.

##### Valid examples

| Command | Reason |
|------------------|-------------------------------------------------------------------|
| `list` | List all **contacts**. |
| `list --org` | List all **organization contacts**. |
| `list --rec` | List all **recruiter contacts**. |
| `list --toapply` | List all **organization contacts** that have not been applied to. |


### Searching contacts - `find`
<div class="applies-to pill"><span class="jobby-data-class pill">Organization</span> <span class="jobby-data-class pill">Recruiter</span></div>

<span class="learning-outcome pill">:trophy: How to find organizations and recruiters by name or id</span> <span class="beginner pill">Beginner</span>

##### Format
```sh
find KEYWORD/ID...
```
* This will return any <span class="jobby-data-class">Organization</span> or <span class="jobby-data-class">Recruiter</span> that contains the given keywords.

##### Valid examples

| Command | Reason |
|-------------------|-----------------------------------------------------------------------------------------------------|
| `find jo` | Finds Contacts and Applications whose **KEYWORD/ID** contains the [substring](#Glossary) "jo". |
| `find 1231` | Finds Contacts and Applications whose **KEYWORD/ID** contains the substring "1231". |
| `find alex david` | Finds Contacts and Applications whose **KEYWORD/ID** contains the substring "alex" or "david". |

##### Rules
<span class="intermediate pill">Intermediate</span>

* The search is case-insensitive. e.g `hans` will match `Hans`
* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
* You can match partial keywords. e.g. searching for `ha` will match with `hamburger`.
* Partial IDs can match the entire ID. e.g. searching for `1234` will match with `id_12345`.
* Persons matching at least one keyword will be returned (i.e. `OR` search)
e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`
* Can match with multiple ids `12345 id_51231` will match with `id_12345` and `id_51231`


### Sorting data - `sort`
<div class="applies-to pill"><span class="jobby-data-class pill">Organization</span> <span class="jobby-data-class pill">Recruiter</span> <span class="jobby-data-class pill">Job Application</span></div>

<span class="learning-outcome pill">:trophy: How to sort contacts and job applications in Jobby</span> <span class="intermediate pill">Intermediate</span>

##### Format
```sh
sort --FLAG_TO_SORT [--ascending / --descending]
```

Sorts contacts or job applications for you by the specified flag.
`--FLAG_TO_SORT` represents a parameter of the contact or job application (i.e. `--phone` represents the phone number of a contact).

##### Supported primary parameters <sub>(only 1 may be provided)</sub>

###### Fields for Contacts
* `--address` - Will sort alphabetically.
* `--email` - Will sort alphabetically.
* `--id` - Will sort alphabetically.
* `--name` - Will sort alphabetically.
* `--phone` - Will sort alphabetically.
* `--url` - Will sort alphabetically.

###### Fields for Job Applications
* `--by` - Will sort chronologically.
* `--stage` - Will sort by stage order.
* `--stale` - Will sort chronologically.
* `--status` - Will sort by status order.
* `--title` - Will sort alphabetically.

###### Resetting the sort order
* `--none` - Will reset the sorting order of <span class="jobby-data-class">Contacts</span> and <span class="jobby-data-class">Job Applications</span>.

##### Supported secondary parameters

###### Changing the sort order
* `--ascending` - The specified flag will sort in ascending order.
* `--descending` - The specified flag will sort in descending order.



* If neither `--ascending` or `--descending` are provided, the list will be sorted in ascending order by default.

* Neither `--ascending` nor `--descending` may be specified if the flag is `--none`.

* Sorting will work even if no <span class="jobby-data-class">Contacts</span> or <span class="jobby-data-class">Job Applications</span> exist. In that case, nothing will happen.

##### Sample demonstration
* To order your <span class="jobby-data-class">Job Applications</span> by order of earliest deadline, you can use the command `sort --by`.
* In the Application Details section of Jobby, you should see your <span class="jobby-data-class">Job Applications</span> now ordered by most urgent deadline.

![Sort Deadline](images/sort_deadline.png)

##### Valid examples

| Command | Reason |
|-----------------------------|------------------------------------------------------------------------------------------------------------|
| `sort --title --ascending` | Sort **job applications** by title, in ascending alphabetical order. |
| `sort --url` | Sort **contacts** by url, in the default order - ascending alphabetical. |
| `sort --stale --descending` | Sort **job applications** by last updated time, in reverse chronological order, from most recent to least. |
| `sort --none` | Reset the sorting order of **contacts** and **job applications**. |

##### Invalid examples

| Command | Reason |
|----------------------------|---------------------------------------------|
| `sort` | No field provided. |
| `sort --org` | Invalid field. |
| `sort --none --descending` | `--none` and `--descending` both specified. |
| `sort --title --name` | More than 1 field specified. |


### Reminding about deadlines - `remind`
<div class="applies-to pill"><span class="jobby-data-class pill">Job Application</span></div>

<span class="learning-outcome pill">:trophy: How to get reminders of deadlines in Jobby</span> <span class="intermediate pill">Intermediate</span>

##### Format
```sh
remind --earliest / --latest
```

Reminds you of upcoming deadlines for job applications.

##### Sample demonstration
* To see your application deadlines from the earliest to latest, use the command `remind --earliest`.

![Remind Earliest](images/starter-guide/remind-earliest.jpg)

##### Valid examples

| Command | Reason |
|---------------------|--------------------------------------------------------------------------------------|
| `remind --earliest` | List the application deadlines in order of urgency, from earliest to latest. |
| `remind --latest` | List the application deadlines in order of reverse urgency, from latest to earliest. |

##### Invalid examples

| Command | Reason |
|---------------------------------------|-----------------------------------------------------|
| `remind` | No urgency level specified. |


--------------------------------------------------------------------------------------------------------------------

## Command Summary
Binary file added docs/images/sort_deadline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0a439ab

Please sign in to comment.