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

Authortags update #285

Merged
merged 2 commits into from
Nov 1, 2019
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
6 changes: 6 additions & 0 deletions data/saved_stocks.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Uncategorised,#TEST,100,TD,0
Uncategorised,#TEST2,100,TD2,0




4 changes: 4 additions & 0 deletions data/saved_stocktypes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Uncategorised
Test1
Test2
Test3
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import eggventory.logic.commands.Command;
import eggventory.commons.enums.CommandType;

//@@author Deculsion

public class AddStockTypeCommand extends Command {
private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import eggventory.commons.enums.CommandType;
import eggventory.model.items.Stock;

//@@author cyanoei

/**
* Command objects for deleting stocks.
* Requires the StockCode of the Stock.
Expand Down
1 change: 0 additions & 1 deletion src/main/java/eggventory/logic/parsers/ParseAdd.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ private Command processAddPerson(String input) throws BadInputException {

return new AddPersonCommand(CommandType.ADD, addInput[0], addInput[1]);
}
//@@author

//@@author cyanoei
private Command processAddLoan(String input) throws BadInputException {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/eggventory/logic/parsers/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static boolean isCommandComplete(String command, int reqArguments) {
String[] commandArr = command.split(" ");
return commandArr.length - 1 >= reqArguments;
}
//@@author
//@@author cyanoei

/**
* Checks if the command keyword (first word is valid).
Expand Down Expand Up @@ -172,3 +172,5 @@ public Command parse(String userInput) throws Exception {
return userCommand;
}
}

//@@author
2 changes: 2 additions & 0 deletions src/main/java/eggventory/model/items/CollectiveStock.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package eggventory.model.items;

//@@author cyanoei

/**
Child of the Stock class.
* A CollectiveStock (eg. 330ohm resistor) may consist of many individual items (multiple resistors),
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/eggventory/model/items/Item.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package eggventory.model.items;

//@@author cyanoei

/**
* An item of unique stock. Has its own index (unique among items of that stock), loan and lost status.
*/
Expand Down
17 changes: 2 additions & 15 deletions src/main/java/eggventory/model/items/UniqueStock.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import java.util.ArrayList;

//@@author yanprosobo
//@@author cyanoei

/**
* A child of the Stock class.
* A UniqueStock is a group of many items (eg. Arduino Uno) that share the same stockCode, description etc.,
Expand Down Expand Up @@ -104,18 +105,4 @@ public String saveDetailsString() {
return getStockType() + "/" + getStockCode() + "/" + getQuantity()
+ "/" + getDescription() + "/" + getMinimum();
}

/*
way to access individual stock
get/set id
add stock
update total quantity ++
update loan/lost status
update total loan/lost by +/-
delete stock
update total quantity --
check if min, give warning.
*/


}