Skip to content

Commit

Permalink
Merge branch 'master' into branch-javafx-resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Respirayson committed Oct 27, 2023
2 parents 1b72977 + 9ff7679 commit 081b811
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 46 deletions.
27 changes: 14 additions & 13 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ If you're new to the Command-Line Interface and need assistance, this User Guide

<!-- * Table of Contents -->
<page-nav-print />
* Table of Contents
{:toc}

### How to use the User Guide
You may refer to the **Table of Contents** on the right for easy navigation of the User Guide.
Expand Down Expand Up @@ -77,7 +79,7 @@ The following describes what each panel contains:
3. Copy the file to the folder you want to use as the _home folder_ for your F.A.K.E.J.A.R.V.I.S..

4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar fakejarvis.jar` command to run the application.<br>
A GUI similar to the below should appear in a few seconds. (Currently, the image below is a mock-up of our GUI) Note how the app contains some sample data.<br>
A GUI similar to the image below should appear in a few seconds. (Currently, the image below is a mock-up of our GUI) Note how the app contains some sample data.<br>

![Ui](images/Ui.png)

Expand Down Expand Up @@ -326,24 +328,23 @@ Examples:
* `takeattendance n/John Doe s/5 present` Marks John Doe as present on the 5th session.
* `takeattendance n/Foo Bar s/2 absent` Marks Foo Bar as absent on the 2nd session.

### 👀Viewing attendance: viewattendance
### 👀Viewing attendance: `viewattendance`
Views the attendance list

Format: `viewattendance n/STUDENT_NAME s/SESSION`
Format: `viewattendance n/STUDENT_NAME [MORE_STUDENT_NAMES]`

Parameters:
* STUDENT_NAME - The name of the student.
* SESSION - The session number.
* STUDENT_NAME - The name of the student you want to view the attendance of.

Examples:
* `viewattendance` Displays the overall attendance across all students and sessions.
* `viewattendance n/Rayan` Displays Rayan’s overall attendance.
* `viewattendance s/3` Displays all students’ attendance for the 3rd session.
* `viewattendance n/Rayan` Displays all the sessions that Rayan has attended.
* `viewattendance n/Jayson Resley` Displays all the sessions that Jayson and Resley have attended.

### 🔎Finding a Student: find
### 🔎Finding a Student: `find`
Finds a student’s profile

Format: `find n/STUDENT_NAME`
Format: `find n/STUDENT_NAME [MORE_STUDENT_NAMES]`

Parameters:
* STUDENT_NAME - The name of the student you want to find.
Expand All @@ -352,7 +353,7 @@ Examples:
* `find n/John Doe` Finds and displays the profile of students with the name “John Doe”.
* `find n/Jane Doe` Finds and displays the profile of students with the name “Jane Doe”.

### 🥅Filtering results: filter
### 🥅Filtering results: `filter`
Filters the results displayed on the dashboard

Format:
Expand Down Expand Up @@ -506,7 +507,7 @@ Shows the list of upcoming consultations.

Format: `showconsults`

Examples:
Example:
* `showconsults` displays a list of upcoming consultations


Expand Down Expand Up @@ -543,7 +544,7 @@ Examples:
* `addtoconsult -1 n/Foo Bar`shows an error message.


### Remove students from a consultation: `removefromconsult`
### Removing students from a consultation: `removefromconsult`
Removes student(s) from a consultation.

Format: `removefromconsult INDEX n/STUDENT_NAME …`
Expand Down Expand Up @@ -574,7 +575,7 @@ Examples:

## FAQ

**Q**: How do I transfer my data to another Computer?<br>
**Q**: How do I transfer my data to another computer?<br>
**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous F.A.K.E.J.A.R.V.I.S. home folder.

--------------------------------------------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
markdown: kramdown
10 changes: 7 additions & 3 deletions docs/team/ldinghan.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ F.A.K.E.J.A.R.V.I.S. is a project to help CS1101S Avengers manage their time and

Below are my contributions to the project:

* **New Features**: To be added
* **New Features**:
* Create session
* Add remarks to sessions
* Take attendance of students
* View attendance of students

* **Code contributed**: To be added
* **Code contributed**: [RepoSense](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=ldinghan&breakdown=true)

* **Project management**: To be added

Expand All @@ -26,7 +30,7 @@ Below are my contributions to the project:

* **Review/mentoring contributions**: To be added

* **Tools**: To be added
* **Tools**: Java, IntelliJ, FXML, PlantUML

* **Contributions beyond the project team**: To be added

22 changes: 13 additions & 9 deletions docs/team/raydenlim.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ F.A.K.E.J.A.R.V.I.S. is a brownfield project built on Address Book 3 (AB3), with

Given below are my contributions to the project.

* **New Feature 1**:
* Highlights:
* **New Features**:
* GradedTests
* View graded tests of students at a glance.
* Dynamically update/edit any graded test scores.
<br><br>
* Credits:
* My last braincell and his friend

* Credits:

* **New Feature 2**:

* **Code contributed**: [RepoSense link](https://tinyurl.com/CS2103T15raydenlim)

Expand All @@ -33,12 +35,14 @@ Given below are my contributions to the project.
* **Enhancements to existing features**:

* **Documentation**:
* User Guide:
* User Guide:

* Developer Guide:
* Developer Guide:

* **Community**:

* **Tools**:

* _{you can add/remove categories in the list above}_
* Jave
* IntelliJ
* FXML
* PlantUML
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;

import java.util.function.Predicate;

import seedu.address.commons.util.ToStringBuilder;
import seedu.address.logic.Messages;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.model.Model;
import seedu.address.model.session.SessionStudentsContainsKeywordsPredicate;
import seedu.address.model.session.Session;


/**
Expand All @@ -21,14 +23,14 @@ public class ViewAttendanceCommand extends Command {
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe Alice";

private final SessionStudentsContainsKeywordsPredicate predicate;
private final Predicate<Session> predicate;

/**
* Creates a `ViewAttendanceCommand` to view attendance of student(s) listed.
*
* @param predicate The names of the student(s).
*/
public ViewAttendanceCommand(SessionStudentsContainsKeywordsPredicate predicate) {
public ViewAttendanceCommand(Predicate<Session> predicate) {
this.predicate = predicate;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package seedu.address.logic.parser;

import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_SESSIONS;

import java.util.Arrays;
import java.util.function.Predicate;
import java.util.stream.Stream;

import seedu.address.logic.commands.ViewAttendanceCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.Name;
import seedu.address.model.session.Session;
import seedu.address.model.session.SessionStudentsContainsKeywordsPredicate;

/**
Expand All @@ -28,14 +29,14 @@ public ViewAttendanceCommand parse(String args) throws ParseException {

argMultimap.verifyNoDuplicatePrefixesFor(PREFIX_NAME);

if (!arePrefixesPresent(argMultimap, PREFIX_NAME) || !argMultimap.getPreamble().isEmpty()) {
throw new ParseException(String.format(
MESSAGE_INVALID_COMMAND_FORMAT, ViewAttendanceCommand.MESSAGE_USAGE));
Predicate<Session> predicate = PREDICATE_SHOW_ALL_SESSIONS;

if (argMultimap.getValue(PREFIX_NAME).isPresent()) {
String[] nameKeywords = argMultimap.getValue(PREFIX_NAME).get().split("\\s+");
predicate = new SessionStudentsContainsKeywordsPredicate(Arrays.asList(nameKeywords));
}

Name name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get());
String[] nameKeywords = name.toString().split("\\s+");
return new ViewAttendanceCommand(new SessionStudentsContainsKeywordsPredicate(Arrays.asList(nameKeywords)));
return new ViewAttendanceCommand(predicate);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package seedu.address.logic.parser;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static seedu.address.testutil.Assert.assertThrows;
import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_SESSIONS;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -44,14 +45,8 @@ public void parse_validArgumentsWithMultipleNames_success() throws ParseExceptio
}

@Test
public void parse_missingNamePrefix_throwsParseException() {
String invalidArgs = "John Doe";
assertThrows(ParseException.class, () -> parser.parse(invalidArgs));
}

@Test
public void parse_emptyName_throwsParseException() {
String invalidArgs = " n/";
assertThrows(ParseException.class, () -> parser.parse(invalidArgs));
public void parse_emptyArg_success() {
ViewAttendanceCommand expectedCommand = new ViewAttendanceCommand(PREDICATE_SHOW_ALL_SESSIONS);
assertParseSuccess(parser, " ", expectedCommand);
}
}

0 comments on commit 081b811

Please sign in to comment.