forked from nusCS2113-AY1920S1/PersonalAssistant-Duke
-
Notifications
You must be signed in to change notification settings - Fork 5
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
List personloans #346
Merged
Deculsion
merged 37 commits into
AY1920S1-CS2113T-F09-3:master
from
Deculsion:list-personloans
Nov 5, 2019
Merged
List personloans #346
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
45d520b
Added skeleton classes for Parse
Deculsion 907d911
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion 2b6e7a0
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/ma…
Deculsion 8d3cda2
Added toString() and modified some javadocs for it.
Deculsion a96fe29
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion e343c96
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion 79e4603
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion d69b302
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion 5a7d1a4
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion fd55fe5
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion f5af5d3
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion a4a3f6c
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion 7413e74
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion c20a03f
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion c3009c5
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion 88da583
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion 7f81e83
docs/User Guide.md created from https://stackedit.io/
Deculsion dd6c48d
Add UG markdown
Deculsion 0c519e2
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion bf78ffc
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main
Deculsion acbf4f4
Merge remote-tracking branch 'self_origin/master'
Deculsion e620f8a
LoanList is now more OOP and optimised.
Deculsion 3fd25c7
Check whether sufficient stock before adding.
Deculsion d87a245
Checkstyle
Deculsion f2d6103
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/ma…
Deculsion 770feb7
Implement backend to list all of one person's loan
Deculsion 898941e
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/ma…
Deculsion 7c5c6e3
Add logic and parser for list specific person loans
Deculsion eb83660
Checkstyle fixes.
Deculsion d35bf7b
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-F09-3/ma…
Deculsion 2c1e807
Fix basic adding of new loan
Deculsion ca78761
Add Loan works full now
Deculsion 7f10d2a
Add Loan for single person works now
Deculsion 0f062bf
Add Loan for single person works now
Deculsion a3de754
temp fix for listloan
Deculsion e9f9be4
Delete saved_stocks.csv
Deculsion 9ae17d1
Merge branch 'master' into list-personloans
Deculsion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/eggventory/logic/commands/list/ListPersonLoansCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package eggventory.logic.commands.list; | ||
|
||
import eggventory.commons.enums.CommandType; | ||
import eggventory.commons.exceptions.BadInputException; | ||
import eggventory.logic.commands.Command; | ||
import eggventory.model.LoanList; | ||
import eggventory.model.PersonList; | ||
import eggventory.model.StockList; | ||
import eggventory.storage.Storage; | ||
import eggventory.ui.Ui; | ||
|
||
//@@author Deculsion | ||
public class ListPersonLoansCommand extends Command { | ||
String matricNo; | ||
|
||
public ListPersonLoansCommand(CommandType type, String matricNo) { | ||
super(type); | ||
this.matricNo = matricNo; | ||
} | ||
|
||
/** | ||
* Executes the command. | ||
* @param list The stock list. | ||
* @param ui The ui. | ||
* @param storage The Storage. | ||
*/ | ||
@Override | ||
public String execute(StockList list, Ui ui, Storage storage) throws BadInputException { | ||
String output = ""; | ||
|
||
output += LoanList.printPersonLoans(matricNo); | ||
|
||
ui.drawTable(LoanList.getPersonLoansStruct(matricNo)); | ||
ui.print(output); | ||
|
||
return output; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mm i've noticed that the predictive search (however raghav did it) prevents users from spamming spaces between their params anyway, so the multiple spaces regex has truly become obsolete