Skip to content

Commit

Permalink
Merge f2af316 into c939251
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyao-lee committed Nov 8, 2018
2 parents c939251 + f2af316 commit 36a1146
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 9 deletions.
1 change: 1 addition & 0 deletions docs/team/jylee-git.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ require user authentication.

** Project management:
*** Managed vetting through and approving individual pull requests
*** Deployed website for our project: https://cs2113-t16-3.netlify.com/[Website]

** Enhancements to existing features:
*** Added a field that shows the user who is logged in at the status footer of the UI
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/logic/parser/ParserUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public static boolean hasOnlyOnePrefixOfSpecifiedType(String userInput, Prefix..
if (prefix.equals(CliSyntax.PREFIX_ADDRESS)) {
throw new ParseException("Exception thrown because address prefix is entered.");
}
if (userInput.indexOf(prefix.getPrefix()) == userInput.lastIndexOf(prefix.getPrefix())) {
if (userInput.indexOf(prefix.getPrefix()) != userInput.lastIndexOf(prefix.getPrefix())) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public SetPriorityLevelCommand parse(String userInput) throws ParseException {
SetPriorityLevelCommand.MESSAGE_USAGE), pe);
}

if (ParserUtil.hasOnlyOnePrefixOfSpecifiedType(userInput, PREFIX_PRIORITYLEVEL)) {
if (!ParserUtil.hasOnlyOnePrefixOfSpecifiedType(userInput, PREFIX_PRIORITYLEVEL)) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
SetPriorityLevelCommand.MESSAGE_USAGE));
}
Expand Down
108 changes: 101 additions & 7 deletions src/main/java/seedu/address/model/util/SampleDataUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import seedu.address.model.schedule.Venue;
import seedu.address.model.tag.Tag;

//@@author
/**
* Contains utility methods for populating {@code AddressBook} with sample data.
*/
Expand All @@ -49,47 +50,140 @@ public static Person[] getSamplePersons() {
new Email("alexyeoh@abbank-sg.com"), new Department("Top Management"),
new PriorityLevel(PriorityLevelEnum.ADMINISTRATOR.getPriorityLevelCode()),
new Address("Blk 30 Geylang Street 29, #06-40"), new Mode("out"),
new WorkingRate("7.5"), new CheckedInTime("18:00:00"),
new WorkingRate("7.5"), new CheckedInTime(""),
getTagSet("friends", "ADMINISTRATOR", "S1234567E", "Password"),
getSchedule("1300", "1400", "Level 5")),

new Person(new Name("Bernice Yu"), new Nric("T1234567E"), new Password("Password"), new Phone("99272758"),
new Email("berniceyu@abbank-sg.com"), new Department("Senior Management"),
new PriorityLevel(PriorityLevelEnum.MANAGER.getPriorityLevelCode()),
new Address("Blk 30 Lorong 3 Serangoon Gardens, #07-18"), new Mode("out"),
new WorkingRate("7.5"), new CheckedInTime("18:00:00"),
new WorkingRate("7.5"), new CheckedInTime(""),
getTagSet("MANAGER", "T1234567E", "Password"),
getSchedule("1100", "1600", "Level 4")),

new Person(new Name("Charlotte Oliveiro"), new Nric("F1234567E"), new Password("Password"),
new Phone("93210283"), new Email("charlotte@abbank-sg.com"), new Department("Middle Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()),
new Address("Blk 11 Ang Mo Kio Street 74, #11-04"), new Mode("out"),
new WorkingRate("10"), new CheckedInTime("18:00:00"),
new WorkingRate("10"), new CheckedInTime(""),
getTagSet(),
getSchedule("1000", "1700", "Counter 1")),

new Person(new Name("David Li"), new Nric("S5473621G"), new Password("NeuEr2018"), new Phone("91031282"),
new Email("lidavid@abbank-sg.com"), new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()),
new Address("Blk 436 Serangoon Gardens Street 26, #16-43"), new Mode("out"),
new WorkingRate("7.5"), new CheckedInTime("18:00:00"),
new WorkingRate("7.5"), new CheckedInTime(""),
getTagSet(),
getSchedule("2200", "0800", "Main Door")),

new Person(new Name("Irfan Ibrahim"), new Nric("S8570520Q"), new Password("NeuEr2018"),
new Phone("92492021"), new Email("irfan@abbank-sg.com"), new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()),
new Address("Blk 47 Tampines Street 20, #17-35"), new Mode("out"),
new WorkingRate("10"), new CheckedInTime("18:00:00"),
new WorkingRate("10"), new CheckedInTime(""),
getTagSet(), null),

new Person(new Name("Roy Balakrishnan"), new Nric("F5169584T"), new Password("NeuEr2018"),
new Phone("92624417"), new Email("royb@abbank-sg.com"), new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()),
new Address("Blk 45 Aljunied Street 85, #11-31"), new Mode("out"),
new WorkingRate("7.5"), new CheckedInTime("18:00:00"),
getTagSet(), null)
new WorkingRate("7.5"), new CheckedInTime(""),
getTagSet(), null),

new Person(
new Name("Abbus Toh"),
new Nric("S4586855E"),
new Password("Password"),
new Phone("90058500"),
new Email("atoh@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()),
new Address("Yishun, Singapore"), new Mode("out"), new WorkingRate("5"), new CheckedInTime(""),
getTagSet(), null),

new Person(
new Name("Bernard Chong"),
new Nric("F9623975E"),
new Password("Password"),
new Phone("90123456"),
new Email("bchong@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()), new Address("Yishun, Singapore"),
new Mode("out"), new WorkingRate("5"), new CheckedInTime(""), getTagSet(), null),

new Person(
new Name("Charlie Ker"),
new Nric("T8507516H"),
new Password("Password"),
new Phone("88540863"),
new Email("cker@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()),
new Address("Yishun, Singapore"), new Mode("out"), new WorkingRate("5"), new CheckedInTime(""),
getTagSet(), null),

new Person(
new Name("Dennis Pek"),
new Nric("S9726800I"),
new Password("Password"),
new Phone("94280736"),
new Email("dpek@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()), new Address("Yishun, Singapore"),
new Mode("out"), new WorkingRate("5"), new CheckedInTime(""), getTagSet(), null),

new Person(
new Name("Eliott Lee"),
new Nric("G1238500E"),
new Password("Password"),
new Phone("67589052"),
new Email("elee@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()), new Address("Yishun, Singapore"),
new Mode("out"), new WorkingRate("5"), new CheckedInTime(""), getTagSet(), null),

new Person(
new Name("Faris"),
new Nric("S9576541J"),
new Password("Password"),
new Phone("91239888"),
new Email("faris@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()), new Address("Yishun, Singapore"),
new Mode("out"), new WorkingRate("5"), new CheckedInTime(""), getTagSet(), null),

new Person(
new Name("Gary Tan"),
new Nric("S4988580K"),
new Password("Password"),
new Phone("86420844"),
new Email("gtan@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()), new Address("Yishun, Singapore"),
new Mode("out"), new WorkingRate("5"), new CheckedInTime(""), getTagSet(), null),

new Person(
new Name("Hattori Shiage"),
new Nric("G9622222I"),
new Password("Password"),
new Phone("9627800"),
new Email("hshiage@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()),
new Address("Napier Road, Singapore"),
new Mode("out"), new WorkingRate("5"), new CheckedInTime(""), getTagSet(), null),

new Person(
new Name("Ben Atkinson"),
new Nric("F2058730E"),
new Password("Password"),
new Phone("67965240"),
new Email("batkinson@abbank-sg.com"),
new Department("Junior Management"),
new PriorityLevel(PriorityLevelEnum.BASIC.getPriorityLevelCode()), new Address("Yishun, Singapore"),
new Mode("out"), new WorkingRate("5"), new CheckedInTime(""), getTagSet(), null)
};
}

Expand Down

0 comments on commit 36a1146

Please sign in to comment.