Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jingting1412 committed Oct 26, 2023
2 parents 31c8833 + 7e31d01 commit 3070ff8
Show file tree
Hide file tree
Showing 80 changed files with 2,093 additions and 325 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ src/test/data/sandbox/
.DS_Store
docs/_site/
docs/_markbind/logs/
/htmlReport/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It is based on the AddressBook-Level3 project created by the [SE-EDU initiative]

> An applicant management program for Hiring Managers to track applicants throughout the hiring process.
![Ui](docs/images/Ui.png)
![Ui](docs/images/readme/Ui.png)

Staff-Snap is a desktop app for HR Managers to track staff information, optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, Staff-Snap can get your staff information management tasks done faster than traditional GUI apps.

Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ shadowJar {
archiveFileName = 'staffsnap.jar'
}

run {
enableAssertions = true
}

defaultTasks 'clean', 'test'
10 changes: 5 additions & 5 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can reach us at the email `craigton.lian[at]gmail.com`

### Craigton Lian Ee John

<img src="images/craigtonlian.png" width="200px" height = "200px" style = "border-radius: 50%;">
<img src="images/developer-profiles/craigtonlian.png" width="200px" height = "200px" style = "border-radius: 50%;">


* Links:
Expand All @@ -28,7 +28,7 @@ You can reach us at the email `craigton.lian[at]gmail.com`

### Austin Huang De Yu

<img src="images/austinhuang1203.png" width="200px" height = "200px" style = "border-radius: 50%;">
<img src="images/developer-profiles/austinhuang1203.png" width="200px" height = "200px" style = "border-radius: 50%;">

* Links:
[[github](http://github.com/austinhuang1203)]
Expand All @@ -39,7 +39,7 @@ You can reach us at the email `craigton.lian[at]gmail.com`

### Ivan Lee Kai Kiat

<img src="images/ivanleekk.png" width="200px" height = "200px" style = "border-radius: 50%;">
<img src="images/developer-profiles/ivanleekk.png" width="200px" height = "200px" style = "border-radius: 50%;">


* Links:
Expand All @@ -52,7 +52,7 @@ You can reach us at the email `craigton.lian[at]gmail.com`

### Celestine Tan Yen Tong

<img src="images/celestinetan03.png" width="200px" height = "200px" style = "border-radius: 50%;">
<img src="images/developer-profiles/celestinetan03.png" width="200px" height = "200px" style = "border-radius: 50%;">


* Links:
Expand All @@ -66,7 +66,7 @@ You can reach us at the email `craigton.lian[at]gmail.com`

### Wang Jingting

<img src="images/jingting1412.png" width="200px" height = "200px" style = "border-radius: 50%;">
<img src="images/developer-profiles/jingting1412.png" width="200px" height = "200px" style = "border-radius: 50%;">


* Links:
Expand Down
436 changes: 320 additions & 116 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

68 changes: 49 additions & 19 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## User Interface Guide

![User Interface Guide Example](./images/userInterfaceGuide.png)
![User Interface Guide Example](images/user-guide/userInterfaceGuide.png)



Expand All @@ -17,7 +17,7 @@

<box type="tip" seamless>

**Notation Guide** :rocket:<br>
**Notation Guide**<br>

* Words in `UPPER_CASE` are the parameters to be supplied by the user.
* Items in square brackets are optional.
Expand All @@ -29,12 +29,12 @@
---
### `help` : Viewing help

Displays a message explaining how to access the help page.
Opens up your browser to view the help page.

Format: `help`

UI mockup:
![Help UI Mockup](./images/help.png)
![Help UI Mockup](images/user-guide/help.png)

---
### `add` : Adding a new applicant
Expand All @@ -48,7 +48,7 @@ Example:
* `add n/Jane Greenwood p/Project Manager e/[email protected] hp/91234567`

UI mockup:
![Add UI Mockup](./images/add.png)
![Add UI Mockup](images/user-guide/add.png)

---
### `edit` : Editing an applicant
Expand All @@ -65,7 +65,7 @@ Example:
* `edit 2 hp/80081234 e/[email protected]` edits the phone number and email of the 2nd applicant in the list.

UI mockup:
![Edit UI Mockup](./images/edit.png)
![Edit UI Mockup](images/user-guide/edit.png)

---
### `list` : Listing all applicants
Expand All @@ -75,7 +75,7 @@ Displays the full list of all applicants.
Format: `list`

UI mockup:
![List UI Mockup](./images/list.png)
![List UI Mockup](images/user-guide/list.png)

---
### `delete` : Deleting an applicant
Expand All @@ -92,7 +92,7 @@ Examples:
* `sort d/name` followed by `delete 3` deletes the 3rd person in the sorted applicant list.

UI mockup:
![Delete UI Mockup](./images/delete.png)
![Delete UI Mockup](images/user-guide/delete.png)

---
### `find` : Finding an applicant by name
Expand All @@ -111,44 +111,74 @@ Examples:
* `find IVAN CHEW` finds any applicant whose name contains “ivan” or contains “chew”.

UI mockup:
![Find UI Mockup](./images/find.png)
![Find UI Mockup](images/user-guide/find.png)

---
### `sort`: Sorting applicants by descriptor

Sorts the applicant list by using a particular descriptor as the sorting criteria.

Format: `sort d/DESCRIPTOR`
* `DESCRIPTOR` must be either `name` or `phone`.
* `DESCRIPTOR` must be either `name` or `phone` or `email` or `position` or `score` or `status`.

Examples:
* `sort d/name` sorts the applicant list by name in alphabetical order.
* `sort d/phone` sorts the applicant list by phone numbers in ascending order.
* `sort d/email` sorts the applicant list by email in alphabetical order.
* `sort d/position` sorts the applicant list by positions in alphabetical order.
* `sort d/score` sorts the applicant list by score in descending order.
* `sort d/status` sorts the applicant list by status in alphabetical order.

UI mockup:
![Sort UI Mockup](./images/sort.png)
![Sort UI Mockup](images/user-guide/sort.png)

---
### `addi` : Adding an interview to an applicant

Adds a new interview to an applicant.

Format: `addi INDEX t/TYPE`
Format: `addi INDEX t/TYPE [r/RATING]`

Examples:
* `addi 1 t/technical` adds a Technical interview to the 1st person in the displayed applicant list.
* `addi 3 t/screening`
* `addi 1 t/technical r/8.6` adds a Technical interview with rating 8.6 to the 1st person in the displayed applicant list.
* `addi 3 t/screening` adds a Screening interview without rating to the 3rd person in the displayed applicant list.

---
### `editi` : Editing an interview of an applicant

Edits an interview of an applicant.

Format: `editi INDEX i/INTERVIEW_INDEX t/TYPE`
Format: `editi INDEX i/INTERVIEW_INDEX [t/TYPE] [r/RATING]`
* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list.
* At least one of the optional fields must be provided.
* Existing values will be updated by the input values.

Examples:
* `editi 1 i/1 t/technical r/7.8` edits the 1st interview of the 1st person in the displayed applicant list to a technical interview with rating 7.8.
* `editi 3 i/2 t/screening` edits the 2nd interview type of the 3rd person in the displayed applicant list to a screening interview.
* `editi 2 i/1 r/8.9` edits the 1st interview rating of the 2nd person in the displayed applicant list to 8.9.

---
### `deletei` : Deleting an interview from an applicant

Deletes an interview from an applicant.

Format: `deletei INDEX i/INTERVIEW_INDEX`

Examples:
* `deletei 1 i/2` deletes the 2nd interview of the 1st person in the displayed applicant list.

---
### `status` : Editing an applicant status

Edits the status of an applicant.

Format: `status INDEX s/STATUS`
* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list.
* `STATUS` must be either `o`(offered) or `r`(rejected) or `u`(undecided).

Examples:
* `editi 1 i/1 t/technical` edits the 1st interview of the 1st person in the displayed applicant list to a technical interview.
* `editi 3 i/2 t/screening`
* `status 3 s/o` updates the status of the 3rd person in the displayed applicant list to OFFERED.

---
### `clear` : Clearing all applicant entries
Expand All @@ -158,7 +188,7 @@ Clears all the current data stored in the system.
Format: `clear`

UI mockup:
![Clear UI Mockup](./images/clear.png)
![Clear UI Mockup](images/user-guide/clear.png)

---
### `exit` : Exiting the program
Expand All @@ -176,7 +206,7 @@ Automatically saves the data to a local storage whenever there is a change to th
### Editing the data file

<box type="warning" header="**Caution**">
Editing the data file directly may result in unexpected behaviour.
If the format of the edited data file is invalid, Staff-Snap will override the existing data file with an empty data file in the next run. Please make a backup before you attempt to edit the data file!
</box>

Staff-Snap applicant data are saved automatically as a JSON file `[JAR file location]/data/applicantBook.json`. Advanced users are welcome to update data directly by editing that data file.
Expand Down
42 changes: 42 additions & 0 deletions docs/diagrams/FilterCommandActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@startuml
'https://plantuml.com/activity-diagram-beta

start
:User enters filter command syntax;
:ApplicantBookParser and FilterCommandParser
parse arguments;
if (At least 1 argument is provided) then (true)
:Parse provided fields;
if (Provided fields are valid) then (true)
:Create new CustomFilterPredicate
from specified fields;
:Create new FilterCommand
from CustomFilterPredicate;
:FilterCommand updates predicate used in
ModelManager with CustomFilterPredicate;
:Display success message and show updated list in GUI;
stop
else (false)
:Throw ParseException with
invalid command format
message and proper Filter
syntax;
:Display error message;
stop
endif

else (false)
label 1
label 2
label 3

:Throw ParseException with
invalid command format
message and proper Filter
syntax;
:Display error message;
stop
endif

@enduml

22 changes: 22 additions & 0 deletions docs/diagrams/SortCommandActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@startuml
'https://plantuml.com/activity-diagram-beta

start
:User enters sort command syntax;
:ApplicantBookParser parses command_word;
:SortCommandParser parses arguments;
if (Descriptor is present) then (true)
:Execute SortCommand;
:Update Applicant Descriptor;
:Refresh Applicant List;
:Display success message;
:Show updated list in GUI;
stop
else (false)
:Throw ParseException with
invalid command format
message and proper Sort
syntax;
:Display error message;
stop
@enduml
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[![CI Status](https://github.com/AY2324S1-CS2103T-W08-1/tp/actions/workflows/gradle.yml/badge.svg)](https://github.com/AY2324S1-CS2103T-W08-1/tp/actions)
[![codecov](https://codecov.io/gh/AY2324S1-CS2103T-W08-1/tp/graph/badge.svg?token=7PPPGQNQFE)](https://codecov.io/gh/AY2324S1-CS2103T-W08-1/tp)

![Ui](images/Ui.png)
![Ui](images/readme/Ui.png)

**Staff-Snap is a desktop application for managing your employee details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).
**Staff-Snap is a desktop application for managing your applicant details during your recruitment cycle.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).

* If you are interested in using Staff-Snap, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start).
* If you are interested about developing Staff-Snap, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/staffsnap/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public class MainApp extends Application {

public static final Version VERSION = new Version(0, 2, 2, true);
public static final Version VERSION = new Version(1, 2, 0, false);

private static final Logger logger = LogsCenter.getLogger(MainApp.class);

Expand Down Expand Up @@ -82,7 +82,7 @@ private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) {
try {
applicantBookOptional = storage.readApplicantBook();
if (!applicantBookOptional.isPresent()) {
logger.info("No applicant book found at file path. A new data file will be created at"
logger.info("No applicant book found at file path. A new data file will be created at "
+ storage.getApplicantBookFilePath()
+ " populated with a sample ApplicantBook.");
}
Expand Down Expand Up @@ -173,7 +173,7 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) {

@Override
public void start(Stage primaryStage) {
logger.info("Starting ApplicantBook " + MainApp.VERSION);
logger.info("Starting Staff-Snap " + MainApp.VERSION);
ui.start(primaryStage);
}

Expand Down
24 changes: 22 additions & 2 deletions src/main/java/seedu/staffsnap/commons/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,33 @@ public static boolean containsWordIgnoreCase(String sentence, String word) {
checkArgument(!preppedWord.isEmpty(), "Word parameter cannot be empty");
checkArgument(preppedWord.split("\\s+").length == 1, "Word parameter should be a single word");

String preppedSentence = sentence;
String[] wordsInPreppedSentence = preppedSentence.split("\\s+");
String[] wordsInPreppedSentence = sentence.split("\\s+");

return Arrays.stream(wordsInPreppedSentence)
.anyMatch(sentenceWord -> sentenceWord.toLowerCase().contains(preppedWord.toLowerCase()));
}

/**
* Returns true if the {@code sentence} contains the {@code word}.
* Ignores case.
* <br>examples:<pre>
* containsStringIgnoreCase("ABc def", "abc") == true
* containsStringIgnoreCase("ABc def", "DEF") == true
* containsStringIgnoreCase("ABc def", "AB") == true
* containsStringIgnoreCase("ABc def", "acd") == false // "acd" is not a substring in "ABc def"
* </pre>
* @param sentence a String that is not null
* @param word a String that is not empty and is not null
*/
public static boolean containsStringIgnoreCase(String sentence, String word) {
requireNonNull(sentence);
requireNonNull(word);

String preppedWord = word.trim();
checkArgument(!preppedWord.isEmpty(), "Word parameter cannot be empty");

return sentence.contains(word);
}
/**
* Returns a detailed message of the t, including the stack trace.
*/
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/seedu/staffsnap/logic/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ public static String format(Applicant applicant) {
.append("; Position: ")
.append(applicant.getPosition())
.append("; Interviews: ");
applicant.getInterviews().forEach(builder::append);
applicant.getInterviews().forEach(interview ->
builder.append(interview.getType())
.append("(")
.append(interview.getRating())
.append("); "));
builder.append("; Status: ")
.append(applicant.getStatus());
return builder.toString();
}

Expand Down
Loading

0 comments on commit 3070ff8

Please sign in to comment.