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 undo command #149

Merged
merged 8 commits into from
Oct 23, 2020
Merged

Conversation

Ziyang-98
Copy link

I add new method to Account so that GetTotalCommand and GetProfitCommand's code quality is improved. I added assertions to all the Commands as well. Lastly, I implemented the UndoCommand. I only allow UndoCommand for editing, deleting and adding of entries. Also, if the user switches account, the user will not be able to undo the previous commands even if the user switches back.

@Ziyang-98 Ziyang-98 added this to the v1.3b (2nd sprint) milestone Oct 23, 2020
@Ziyang-98 Ziyang-98 linked an issue Oct 23, 2020 that may be closed by this pull request
Copy link

@lettuceman4 lettuceman4 left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov-io
Copy link

Codecov Report

Merging #149 into master will decrease coverage by 0.26%.
The diff coverage is 27.53%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #149      +/-   ##
============================================
- Coverage     52.80%   52.53%   -0.27%     
- Complexity      428      431       +3     
============================================
  Files            97       98       +1     
  Lines          1854     1892      +38     
  Branches        202      204       +2     
============================================
+ Hits            979      994      +15     
- Misses          800      819      +19     
- Partials         75       79       +4     
Impacted Files Coverage Δ Complexity Δ
...java/seedu/address/logic/commands/EditCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...java/seedu/address/logic/commands/ExitCommand.java 100.00% <ø> (ø) 2.00 <0.00> (ø)
...seedu/address/logic/commands/GetProfitCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../seedu/address/logic/commands/GetTotalCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...java/seedu/address/logic/commands/ListCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...u/address/logic/commands/SwitchAccountCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...java/seedu/address/logic/commands/UndoCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...a/seedu/address/logic/parser/AddCommandParser.java 80.00% <0.00%> (-12.86%) 4.00 <0.00> (ø)
.../seedu/address/logic/parser/CommonCentsParser.java 48.00% <0.00%> (-2.00%) 8.00 <0.00> (ø)
.../seedu/address/logic/parser/FindCommandParser.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0067843...2a8fa1b. Read the comment docs.

@Ziyang-98 Ziyang-98 merged commit b26d1e7 into AY2021S1-CS2103T-T13-4:master Oct 23, 2020
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.

Add new Command - Undo command
3 participants