Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in Meeting class #221

Merged
merged 4 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,24 @@ These are some proposed features that can be implemented in the future.

#### Adding a policy displays it in the Policies panel

- Proposed implementation: Modify CommandResult to have an `isAddPolicy()` method. In the MainWindow class, modify `executeCommand` - if the command result isAddPolicy, display the newly added policy in the PolicyListPanel.
- A possible implementation: Modify CommandResult to have an `isAddPolicy()` method. In the MainWindow class, modify `executeCommand` - if the command result isAddPolicy, display the newly added policy in the PolicyListPanel.
- This feature would allow users to easily check the details of the newly added policy, without having to look through the user feedback box.

#### Delete policies using the policy's index in Policies panel

- This feature would allow users to easily delete policies, without having to type out the whole policy number.

#### Improving allowed inputs
Change the allowed inputs for certain fields so that they make logical sense.

- Improve allowed inputs for phone number (ensure it is 8 digits long and starts with 6, 8 or 9)
- Improve allowed input for phone number and email fields (ensure that these fields are unique across clients)

#### Fixing text out of boundaries in UI
- Right now, long input fields may cause text to be cut off in the UI, e.g. a long client name might get cut off in the UI with `...`
- This can be fixed by either:
- limiting the number of characters allowed in the name. This is not ideal as certain clients may in fact have very long names, and we should allow these names too.
- fixing UI such that text out of boundaries are wrapped. This is the better solution.
---

## **Documentation, logging, testing, configuration, dev-ops**
Expand Down
4 changes: 2 additions & 2 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Meeting field input <strong>MUST</strong> be a date and time in the future!

MEETING_TIME <strong>MUST</strong> be unique!

Name <strong>MUST</strong> be alphanumeric characters only!
Name <strong>MUST</strong> be alphanumeric characters only, and unique across clients!

PHONE_NUMBER <strong>MUST</strong> be numeric characters only! <strong> Min: 3 characters</strong>
</div>
Expand All @@ -219,7 +219,7 @@ PHONE_NUMBER <strong>MUST</strong> be numeric characters only! <strong> Min: 3 c

<div style="border: 1px solid #28a745; background-color: #d4edda; padding: 10px; border-radius: 5px;">
<span style="font-size: 20px; color: #007bff;">&#x1F4A1;</span> <strong>Tip:</strong>
It is optional for the client to have tags. A client can have any number of tags (including 0). TAG <strong>MUST</strong> be alphanumeric characters only!
It is optional for the client to have tags. A client can have any number of tags (including 0). TAG <strong>MUST</strong> be alphanumeric characters only (space is not allowed)!
</div>

<br/>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/model/person/Meeting.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;

Expand Down Expand Up @@ -87,6 +88,7 @@ private static LocalDateTime stringToDateTime(String dateTime) {
}
try {
LocalDate dateCheck = LocalDate.parse(dateTime.substring(0, 10)); // Check that the date is valid.
LocalTime timeCheck = LocalTime.parse(dateTime.substring(11)); // Check that the time is valid.
return LocalDateTime.parse(dateTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
} catch (DateTimeParseException e) {
throw new IllegalArgumentException(MESSAGE_CONSTRAINTS);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/model/tag/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
public class Tag {

public static final String MESSAGE_CONSTRAINTS = "Tags names should be alphanumeric";
public static final String MESSAGE_CONSTRAINTS = "Tag names should be alphanumeric";
public static final String VALIDATION_REGEX = "\\p{Alnum}+";

public final String tagName;
Expand Down
Loading