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

Enable vip status to be initialized as input #98

Merged

Conversation

muller317
Copy link

No description provided.

@muller317 muller317 added this to the v1.5 milestone Nov 7, 2024
@muller317 muller317 self-assigned this Nov 7, 2024
@muller317 muller317 linked an issue Nov 7, 2024 that may be closed by this pull request
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ Complexity Δ
.../java/seedu/address/logic/commands/AddCommand.java 100.00% <ø> (ø) 8.00 <0.00> (ø)
...a/seedu/address/logic/parser/AddCommandParser.java 100.00% <100.00%> (ø) 5.00 <0.00> (ø)
...ain/java/seedu/address/logic/parser/CliSyntax.java 87.50% <100.00%> (+1.78%) 1.00 <0.00> (ø)

... and 1 file with indirect coverage changes

Copy link

@1st2GetThisName 1st2GetThisName left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor nits, LGTM

@@ -50,7 +52,9 @@ public AddCommand parse(String args) throws ParseException {
Comment comment = ParserUtil.parseComment(argMultimap.getValue(PREFIX_COMMENT).orElse(EMPTY_COMMENT));
Set<Tag> tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));

Person person = new Person(name, phone, email, address, comment, tagList);
// Parse VIP status; default to false if not provided
boolean isVip = Boolean.parseBoolean(argMultimap.getValue(PREFIX_VIP).orElse(DEFAULT_VIP));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit: might've made more sense to put this like with the previous paragraph

@@ -41,7 +42,7 @@ public PersonBuilder() {
address = new Address(DEFAULT_ADDRESS);
comment = new Comment(DEFAULT_COMMENT);
tags = new HashSet<>();
isVip = false;
isVip = DEFAULT_IS_VIP;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good practice!

@1st2GetThisName 1st2GetThisName merged commit 3213c65 into AY2425S1-CS2103T-T17-2:master Nov 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to initialize the VIP status when adding a new person.
2 participants