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

Add functionality for uploading profile picture #93

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

fymbc
Copy link

@fymbc fymbc commented Oct 26, 2024

WIP

Closes #86

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

Attention: Patch coverage is 54.21687% with 38 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...va/seedu/address/logic/commands/UploadCommand.java 23.68% 29 Missing ⚠️
.../java/seedu/address/model/util/SampleDataUtil.java 14.28% 6 Missing ⚠️
...main/java/seedu/address/ui/PersonDetailedView.java 0.00% 2 Missing ⚠️
...seedu/address/model/person/ProfilePicFilePath.java 92.30% 1 Missing ⚠️
Files with missing lines Coverage Δ Complexity Δ
...java/seedu/address/logic/commands/EditCommand.java 95.78% <100.00%> (+0.04%) 13.00 <0.00> (ø)
...java/seedu/address/logic/commands/PaidCommand.java 92.59% <100.00%> (+0.13%) 9.00 <0.00> (ø)
...va/seedu/address/logic/commands/UnpaidCommand.java 85.71% <100.00%> (ø) 9.00 <0.00> (ø)
...a/seedu/address/logic/parser/AddCommandParser.java 100.00% <100.00%> (ø) 5.00 <0.00> (ø)
.../seedu/address/logic/parser/AddressBookParser.java 100.00% <100.00%> (ø) 15.00 <0.00> (+1.00)
...eedu/address/logic/parser/UploadCommandParser.java 100.00% <100.00%> (ø) 2.00 <2.00> (?)
...c/main/java/seedu/address/model/person/Person.java 90.74% <100.00%> (+0.35%) 24.00 <1.00> (+1.00)
.../java/seedu/address/storage/JsonAdaptedPerson.java 92.95% <100.00%> (+0.65%) 15.00 <0.00> (+1.00)
...seedu/address/model/person/ProfilePicFilePath.java 92.30% <92.30%> (ø) 6.00 <6.00> (?)
...main/java/seedu/address/ui/PersonDetailedView.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
... and 2 more


/**
* Default constructor for a UploadCommand object
* @param targetIndex Index to be deleted
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this "deleted" because the target will be replaced?

Copy link
Author

Choose a reason for hiding this comment

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

Nope, typo on my end. Will change to be "uploaded"

Comment on lines +63 to +78
//adapted from https://stackoverflow.com/questions/19302029/filter-file-types-with-jfilechooser
// fileChooser.setFileFilter(new FileFilter() {
//
// public String getDescription() {
// return "PNG Images (*.png)";
// }
//
// public boolean accept(File f) {
// if (f.isDirectory()) {
// return true;
// } else {
// String filename = f.getName().toLowerCase();
// return filename.endsWith(".png");
// }
// }
// });
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you need this part? If not could delete it since its commented out.

@AlphaPyke
Copy link
Collaborator

LGTM, I will take over from here.

@AlphaPyke AlphaPyke merged commit 30df9c1 into AY2425S1-CS2103T-F14b-4:master Nov 1, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement profile picture functionality
3 participants