From 2029b22bbfadb0d7d5b0bd5782c6fbd10149e08c Mon Sep 17 00:00:00 2001 From: McNaBry Date: Wed, 18 Oct 2023 21:46:37 +0800 Subject: [PATCH 1/6] Change oid field to optional --- .../java/seedu/address/model/person/Recruiter.java | 7 ++++--- .../seedu/address/storage/JsonAdaptedContact.java | 6 ++++-- src/main/java/seedu/address/ui/ContactCard.java | 13 +++++++------ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/main/java/seedu/address/model/person/Recruiter.java b/src/main/java/seedu/address/model/person/Recruiter.java index 72d878dd338..c77c8763873 100644 --- a/src/main/java/seedu/address/model/person/Recruiter.java +++ b/src/main/java/seedu/address/model/person/Recruiter.java @@ -1,6 +1,7 @@ package seedu.address.model.person; import java.util.Objects; +import java.util.Optional; import java.util.Set; import seedu.address.commons.util.ToStringBuilder; @@ -12,17 +13,17 @@ */ public class Recruiter extends Contact { - private final Id oid; + private final Optional oid; /** * Every field except oid must be present and not null. */ public Recruiter(Name name, Id id, Phone phone, Email email, Url url, Address address, Set tags, Id oid) { super(name, id, phone, email, url, address, tags); - this.oid = oid; + this.oid = Optional.ofNullable(oid); } - public Id getOrganizationId() { + public Optional getOrganizationId() { return oid; } diff --git a/src/main/java/seedu/address/storage/JsonAdaptedContact.java b/src/main/java/seedu/address/storage/JsonAdaptedContact.java index 868d764b37b..3e17f1a5987 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedContact.java +++ b/src/main/java/seedu/address/storage/JsonAdaptedContact.java @@ -78,10 +78,12 @@ public JsonAdaptedContact(Contact source) { position = ((Organization) source).getPosition().jobPosition; oid = ""; } else if (source.getType() == Type.RECRUITER) { + Recruiter recruiter = (Recruiter) source; status = ""; position = ""; - Id tmp = ((Recruiter) source).getOrganizationId(); - oid = tmp == null ? null : tmp.value; + oid = recruiter.getOrganizationId() + .map(oid -> oid.value) + .orElse(null); } type = source.getType().toString(); diff --git a/src/main/java/seedu/address/ui/ContactCard.java b/src/main/java/seedu/address/ui/ContactCard.java index 7148574e103..70c85b5ea8f 100644 --- a/src/main/java/seedu/address/ui/ContactCard.java +++ b/src/main/java/seedu/address/ui/ContactCard.java @@ -1,6 +1,7 @@ package seedu.address.ui; import java.util.Comparator; +import java.util.Optional; import java.util.function.Supplier; import javafx.fxml.FXML; @@ -97,14 +98,14 @@ public ContactCard(Contact contact, int displayedIndex) { case RECRUITER: { Recruiter recruiter = (Recruiter) contact; - final Id linkedOrgId = recruiter.getOrganizationId(); + final Optional linkedOrgId = recruiter.getOrganizationId(); setVboxInnerLabelText( - linkedParentOrganization, () -> linkedOrgId == null - ? null - : String.format( - "from %s (%s)", "organization" /* TODO: Use org name instead */, linkedOrgId.value - ) + linkedParentOrganization, () -> linkedOrgId.map(oid -> + String.format( + "from %s (%s)", "organization" /* TODO: Use org name instead */, oid.value + )) + .orElse(null) ); cardPaneInnerVbox.getChildren().removeAll(status, position); break; From 412a5d9cd64688248021ace2a41704c1547aeecf Mon Sep 17 00:00:00 2001 From: McNaBry Date: Thu, 19 Oct 2023 15:20:28 +0800 Subject: [PATCH 2/6] Add optional fields to Contact --- .../address/logic/commands/EditCommand.java | 21 ++- .../logic/parser/AddCommandParser.java | 143 ++++++++---------- .../address/logic/parser/ParserUtil.java | 38 ++++- .../seedu/address/model/person/Contact.java | 41 ++--- .../address/model/person/Organization.java | 20 ++- .../seedu/address/model/person/Recruiter.java | 2 +- .../java/seedu/address/model/person/Url.java | 2 +- .../address/storage/JsonAdaptedContact.java | 55 +++---- .../java/seedu/address/ui/ContactCard.java | 46 +++--- .../logic/commands/CommandTestUtil.java | 3 +- .../logic/parser/AddCommandParserTest.java | 24 +-- .../storage/JsonAdaptedContactTest.java | 24 ++- .../address/testutil/ContactBuilder.java | 18 +-- .../seedu/address/testutil/ContactUtil.java | 8 +- .../EditContactDescriptorBuilder.java | 6 +- .../address/testutil/RecruiterBuilder.java | 8 +- 16 files changed, 228 insertions(+), 231 deletions(-) diff --git a/src/main/java/seedu/address/logic/commands/EditCommand.java b/src/main/java/seedu/address/logic/commands/EditCommand.java index 3661f829193..9cb9bb46b1a 100644 --- a/src/main/java/seedu/address/logic/commands/EditCommand.java +++ b/src/main/java/seedu/address/logic/commands/EditCommand.java @@ -97,13 +97,20 @@ public CommandResult execute(Model model) throws CommandException { private static Contact createEditedContact(Contact contactToEdit, EditContactDescriptor editContactDescriptor) { assert contactToEdit != null; - Name updatedName = editContactDescriptor.getName().orElse(contactToEdit.getName()); - Id updatedId = editContactDescriptor.getId().orElse(contactToEdit.getId()); - Phone updatedPhone = editContactDescriptor.getPhone().orElse(contactToEdit.getPhone()); - Email updatedEmail = editContactDescriptor.getEmail().orElse(contactToEdit.getEmail()); - Url updatedUrl = editContactDescriptor.getUrl().orElse(contactToEdit.getUrl()); - Address updatedAddress = editContactDescriptor.getAddress().orElse(contactToEdit.getAddress()); - Set updatedTags = editContactDescriptor.getTags().orElse(contactToEdit.getTags()); + Name updatedName = editContactDescriptor.getName() + .orElse(contactToEdit.getName()); + Id updatedId = editContactDescriptor.getId() + .orElse(contactToEdit.getId()); + Phone updatedPhone = editContactDescriptor.getPhone() + .orElse(contactToEdit.getPhone().orElse(null)); + Email updatedEmail = editContactDescriptor.getEmail() + .orElse(contactToEdit.getEmail().orElse(null)); + Url updatedUrl = editContactDescriptor.getUrl() + .orElse(contactToEdit.getUrl().orElse(null)); + Address updatedAddress = editContactDescriptor.getAddress() + .orElse(contactToEdit.getAddress().orElse(null)); + Set updatedTags = editContactDescriptor.getTags() + .orElse(contactToEdit.getTags()); return new Contact(updatedName, updatedId, updatedPhone, updatedEmail, updatedUrl, updatedAddress, updatedTags); } diff --git a/src/main/java/seedu/address/logic/parser/AddCommandParser.java b/src/main/java/seedu/address/logic/parser/AddCommandParser.java index f354ac01e58..42e398ddd8d 100644 --- a/src/main/java/seedu/address/logic/parser/AddCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/AddCommandParser.java @@ -14,7 +14,7 @@ import static seedu.address.logic.parser.CliSyntax.FLAG_TAG; import static seedu.address.logic.parser.CliSyntax.FLAG_URL; -import java.util.NoSuchElementException; +import java.util.Optional; import java.util.Set; import seedu.address.logic.commands.AddCommand; @@ -39,21 +39,23 @@ public class AddCommandParser implements Parser { /** - * Parses the given {@code String} of arguments in the context of the AddCommand - * and returns an AddCommand object for execution. + * Parses the given {@code String} of arguments in the context of the AddCommand and returns an AddCommand object + * for execution. + * * @throws ParseException if the user input does not conform the expected format */ public AddCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = - ArgumentTokenizer.tokenize(args, - FLAG_NAME, FLAG_PHONE, FLAG_EMAIL, - FLAG_ADDRESS, FLAG_TAG, FLAG_URL, - FLAG_ID, FLAG_STATUS, FLAG_POSITION, - FLAG_ORGANIZATION_ID, - FLAG_ORGANIZATION, FLAG_RECRUITER); - - if (!argMultimap.hasAllOfFlags(FLAG_NAME, FLAG_PHONE, FLAG_EMAIL, FLAG_ADDRESS) - || !argMultimap.getPreamble().isEmpty()) { + ArgumentTokenizer.tokenize(args, + FLAG_NAME, FLAG_PHONE, FLAG_EMAIL, + FLAG_ADDRESS, FLAG_TAG, FLAG_URL, + FLAG_ID, FLAG_STATUS, FLAG_POSITION, + FLAG_ORGANIZATION_ID, + FLAG_ORGANIZATION, FLAG_RECRUITER + ); + + if (!argMultimap.hasAllOfFlags(FLAG_NAME) + || !argMultimap.getPreamble().isEmpty()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE)); } @@ -69,21 +71,18 @@ public AddCommand parse(String args) throws ParseException { // Deprecated contact format. Will be removed in future versions. Name name = ParserUtil.parseName(argMultimap.getValue(FLAG_NAME).get()); - Id id; - try { - id = ParserUtil.parseId(argMultimap.getValue(FLAG_ID).get()); - } catch (NoSuchElementException e) { - id = new Id(); - } - Phone phone = ParserUtil.parsePhone(argMultimap.getValue(FLAG_PHONE).get()); - Email email = ParserUtil.parseEmail(argMultimap.getValue(FLAG_EMAIL).get()); - Url url; - try { - url = ParserUtil.parseUrl(argMultimap.getValue(FLAG_URL).get()); - } catch (NoSuchElementException e) { - url = new Url(); - } - Address address = ParserUtil.parseAddress(argMultimap.getValue(FLAG_ADDRESS).get()); + Optional idString = argMultimap.getValue(FLAG_ID); + Id id = idString.isPresent() + ? ParserUtil.parseId(idString.get()) + : new Id(); + Phone phone = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_PHONE), ParserUtil::parsePhone); + Email email = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_EMAIL), ParserUtil::parseEmail); + Address address = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_ADDRESS), ParserUtil::parseAddress); + Url url = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_URL), ParserUtil::parseUrl); Set tagList = ParserUtil.parseTags(argMultimap.getAllValues(FLAG_TAG)); Contact contact = new Contact(name, id, phone, email, url, address, tagList); @@ -94,70 +93,50 @@ public AddCommand parse(String args) throws ParseException { private Recruiter parseAsRecruiter(ArgumentMultimap argMultimap) throws ParseException { argMultimap.verifyNoDuplicateFlagsFor(FLAG_ORGANIZATION_ID); Name name = ParserUtil.parseName(argMultimap.getValue(FLAG_NAME).get()); - Phone phone = ParserUtil.parsePhone(argMultimap.getValue(FLAG_PHONE).get()); - Email email = ParserUtil.parseEmail(argMultimap.getValue(FLAG_EMAIL).get()); - Address address = ParserUtil.parseAddress(argMultimap.getValue(FLAG_ADDRESS).get()); - Set tagList = ParserUtil.parseTags(argMultimap.getAllValues(FLAG_TAG)); - Id id; - try { - id = ParserUtil.parseId(argMultimap.getValue(FLAG_ID).get()); - } catch (NoSuchElementException e) { - id = new Id(); - } - Url url; - try { - url = ParserUtil.parseUrl(argMultimap.getValue(FLAG_URL).get()); - } catch (NoSuchElementException e) { - url = new Url(); - } - - Id oid; - try { - oid = ParserUtil.parseId(argMultimap.getValue(FLAG_ORGANIZATION_ID).get()); - } catch (NoSuchElementException e) { - oid = null; - } + Optional idString = argMultimap.getValue(FLAG_ID); + Id id = idString.isPresent() + ? ParserUtil.parseId(idString.get()) + : new Id(); + + Phone phone = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_PHONE), ParserUtil::parsePhone); + Email email = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_EMAIL), ParserUtil::parseEmail); + Address address = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_ADDRESS), ParserUtil::parseAddress); + Url url = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_URL), ParserUtil::parseUrl); + Id oid = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_ORGANIZATION_ID), ParserUtil::parseId); + Set tagList = ParserUtil.parseTags(argMultimap.getAllValues(FLAG_TAG)); return new Recruiter(name, id, phone, email, url, address, tagList, oid); } private Organization parseAsOrganization(ArgumentMultimap argMultimap) throws ParseException { - argMultimap.verifyNoDuplicateFlagsFor(FLAG_NAME, FLAG_PHONE, FLAG_EMAIL, FLAG_ADDRESS); + argMultimap.verifyNoDuplicateFlagsFor(FLAG_POSITION, FLAG_STATUS); Name name = ParserUtil.parseName(argMultimap.getValue(FLAG_NAME).get()); - Phone phone = ParserUtil.parsePhone(argMultimap.getValue(FLAG_PHONE).get()); - Email email = ParserUtil.parseEmail(argMultimap.getValue(FLAG_EMAIL).get()); - Address address = ParserUtil.parseAddress(argMultimap.getValue(FLAG_ADDRESS).get()); - Set tagList = ParserUtil.parseTags(argMultimap.getAllValues(FLAG_TAG)); - Id id; - try { - id = ParserUtil.parseId(argMultimap.getValue(FLAG_ID).get()); - } catch (NoSuchElementException e) { - id = new Id(); - } - - Url url; - try { - url = ParserUtil.parseUrl(argMultimap.getValue(FLAG_URL).get()); - } catch (NoSuchElementException e) { - url = new Url(); - } - - Position position; - try { - position = ParserUtil.parsePosition(argMultimap.getValue(FLAG_POSITION).get()); - } catch (NoSuchElementException e) { - position = new Position(); - } - Status status; - try { - status = ParserUtil.parseStatus(argMultimap.getValue(FLAG_STATUS).get()); - } catch (NoSuchElementException e) { - status = new Status(); - } + Optional idString = argMultimap.getValue(FLAG_ID); + Id id = idString.isPresent() + ? ParserUtil.parseId(idString.get()) + : new Id(); + + Phone phone = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_PHONE), ParserUtil::parsePhone); + Email email = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_EMAIL), ParserUtil::parseEmail); + Address address = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_ADDRESS), ParserUtil::parseAddress); + Url url = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_URL), ParserUtil::parseUrl); + Position position = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_POSITION), ParserUtil::parsePosition); + Status status = ParserUtil.parseOptionally( + argMultimap.getValue(FLAG_STATUS), ParserUtil::parseStatus); + Set tagList = ParserUtil.parseTags(argMultimap.getAllValues(FLAG_TAG)); return new Organization(name, id, phone, email, url, address, tagList, status, position); } - } diff --git a/src/main/java/seedu/address/logic/parser/ParserUtil.java b/src/main/java/seedu/address/logic/parser/ParserUtil.java index 311915ed6cb..851c6b6b13e 100644 --- a/src/main/java/seedu/address/logic/parser/ParserUtil.java +++ b/src/main/java/seedu/address/logic/parser/ParserUtil.java @@ -4,6 +4,7 @@ import java.util.Collection; import java.util.HashSet; +import java.util.Optional; import java.util.Set; import seedu.address.commons.core.index.Index; @@ -27,8 +28,9 @@ public class ParserUtil { public static final String MESSAGE_INVALID_INDEX = "Index is not a non-zero unsigned integer."; /** - * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be - * trimmed. + * Parses {@code oneBasedIndex} into an {@code Index} and returns it. + * Leading and trailing whitespaces will be trimmed. + * * @throws ParseException if the specified index is invalid (not non-zero unsigned integer). */ public static Index parseIndex(String oneBasedIndex) throws ParseException { @@ -79,7 +81,7 @@ public static Status parseStatus(String status) throws ParseException { requireNonNull(status); String trimmedStatus = status.trim(); if (!Status.isValidStatus(status)) { - throw new ParseException(Name.MESSAGE_CONSTRAINTS); + throw new ParseException(Status.MESSAGE_CONSTRAINTS); } return new Status(trimmedStatus); } @@ -93,8 +95,8 @@ public static Status parseStatus(String status) throws ParseException { public static Position parsePosition(String position) throws ParseException { requireNonNull(position); String trimmedPosition = position.trim(); - if (!Name.isValidName(position)) { - throw new ParseException(Name.MESSAGE_CONSTRAINTS); + if (!Position.isValidPosition(position)) { + throw new ParseException(Position.MESSAGE_CONSTRAINTS); } return new Position(trimmedPosition); } @@ -185,4 +187,30 @@ public static Set parseTags(Collection tags) throws ParseException } return tagSet; } + + /** + * References a function that parses a string into an expected output within the {@link ParserUtil} utility class. + * @param The return result. + */ + @FunctionalInterface + public interface StringParserFunction { + R parse(String value) throws ParseException; + } + + /** + * Returns an object of type R that is given by passing the given string into {@code parseFunction} if + * {@code optionalString} is non-empty, otherwise returns null. + * + * @param The type of object returned by parsing the optionalString. + * + * @throws ParseException if the given {@code optionalString} is invalid as determined by {@code parseFunction} + */ + public static R parseOptionally(Optional optionalString, StringParserFunction parseFunction) + throws ParseException { + + if (optionalString.isPresent()) { + return parseFunction.parse(optionalString.get()); + } + return null; + } } diff --git a/src/main/java/seedu/address/model/person/Contact.java b/src/main/java/seedu/address/model/person/Contact.java index 8c969bec340..250c12822fe 100644 --- a/src/main/java/seedu/address/model/person/Contact.java +++ b/src/main/java/seedu/address/model/person/Contact.java @@ -5,6 +5,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.Objects; +import java.util.Optional; import java.util.Set; import seedu.address.commons.exceptions.IllegalOperationException; @@ -13,7 +14,7 @@ /** * Represents a Contact in the address book. - * Guarantees: details are present and not null, field values are validated, immutable. + * Guarantees: name and id are present and not null, field values are immutable and if present, are validated. */ public class Contact { @@ -22,25 +23,27 @@ public class Contact { // Identity fields private final Name name; private final Id id; - private final Phone phone; - private final Email email; + private final Optional phone; + private final Optional email; // Data fields - private final Url url; - private final Address address; + private final Optional url; + private final Optional
address; private final Set tags = new HashSet<>(); /** - * Every field must be present and not null. + * Name and id fields must be non-null. + * Tags must be non-null but can be empty as well. + * The other fields can be null. */ public Contact(Name name, Id id, Phone phone, Email email, Url url, Address address, Set tags) { - requireAllNonNull(name, phone, email, address, tags); + requireAllNonNull(name, id, tags); this.name = name; this.id = id; - this.phone = phone; - this.email = email; - this.url = url; - this.address = address; + this.phone = Optional.ofNullable(phone); + this.email = Optional.ofNullable(email); + this.url = Optional.ofNullable(url); + this.address = Optional.ofNullable(address); this.tags.addAll(tags); } @@ -53,23 +56,23 @@ public Name getName() { return name; } - public Phone getPhone() { + public Id getId() { + return id; + } + + public Optional getPhone() { return phone; } - public Email getEmail() { + public Optional getEmail() { return email; } - public Address getAddress() { + public Optional
getAddress() { return address; } - public Id getId() { - return id; - } - - public Url getUrl() { + public Optional getUrl() { return url; } diff --git a/src/main/java/seedu/address/model/person/Organization.java b/src/main/java/seedu/address/model/person/Organization.java index e2e53202903..8f1538e74e7 100644 --- a/src/main/java/seedu/address/model/person/Organization.java +++ b/src/main/java/seedu/address/model/person/Organization.java @@ -1,22 +1,21 @@ package seedu.address.model.person; -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; - import java.util.Objects; +import java.util.Optional; import java.util.Set; import seedu.address.commons.util.ToStringBuilder; import seedu.address.model.tag.Tag; /** - * Represents an Organisation in the address book. Guarantees: details are present and not null, field values are - * validated, immutable. + * Represents an Organisation in the address book. + * Guarantees: Guarantees: name and id are present and not null, field values are immutable and if present, are validated. */ public class Organization extends Contact { // TODO: Override the getChildren method - private final Status status; - private final Position position; + private final Optional status; + private final Optional position; /** * Every field must be present and not null. @@ -26,9 +25,8 @@ public Organization( Address address, Set tags, Status status, Position position ) { super(name, id, phone, email, url, address, tags); - requireAllNonNull(status, position); - this.status = status; - this.position = position; + this.status = Optional.ofNullable(status); + this.position = Optional.ofNullable(position); } @Override @@ -36,11 +34,11 @@ public Type getType() { return Type.ORGANIZATION; } - public Status getStatus() { + public Optional getStatus() { return status; } - public Position getPosition() { + public Optional getPosition() { return position; } diff --git a/src/main/java/seedu/address/model/person/Recruiter.java b/src/main/java/seedu/address/model/person/Recruiter.java index c77c8763873..5dfa42ee22b 100644 --- a/src/main/java/seedu/address/model/person/Recruiter.java +++ b/src/main/java/seedu/address/model/person/Recruiter.java @@ -9,7 +9,7 @@ /** * Represents a Recruiter in the address book. - * Guarantees: details are present and not null, field values are validated, immutable. + * Guarantees: Guarantees: name and id are present and not null, field values are immutable and if present, are validated. */ public class Recruiter extends Contact { diff --git a/src/main/java/seedu/address/model/person/Url.java b/src/main/java/seedu/address/model/person/Url.java index 48a69c869cc..77c7c2e734a 100644 --- a/src/main/java/seedu/address/model/person/Url.java +++ b/src/main/java/seedu/address/model/person/Url.java @@ -12,7 +12,7 @@ public class Url { public static final String MESSAGE_CONSTRAINTS = "Url should minimally contain a dot surrounded by text, like example.com"; - public static final String VALIDATION_REGEX = "(.+\\..+|)"; + public static final String VALIDATION_REGEX = ".+\\..+"; public final String value; diff --git a/src/main/java/seedu/address/storage/JsonAdaptedContact.java b/src/main/java/seedu/address/storage/JsonAdaptedContact.java index 3e17f1a5987..6ce8be7cec0 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedContact.java +++ b/src/main/java/seedu/address/storage/JsonAdaptedContact.java @@ -74,8 +74,13 @@ public JsonAdaptedContact(@JsonProperty("type") String type, */ public JsonAdaptedContact(Contact source) { if (source.getType() == Type.ORGANIZATION) { - status = ((Organization) source).getStatus().applicationStatus; - position = ((Organization) source).getPosition().jobPosition; + Organization organization = (Organization) source; + status = organization.getStatus() + .map(status -> status.applicationStatus) + .orElse(null); + position = organization.getPosition() + .map(position -> position.jobPosition) + .orElse(null); oid = ""; } else if (source.getType() == Type.RECRUITER) { Recruiter recruiter = (Recruiter) source; @@ -88,11 +93,11 @@ public JsonAdaptedContact(Contact source) { type = source.getType().toString(); name = source.getName().fullName; - phone = source.getPhone().value; - email = source.getEmail().value; - url = source.getUrl().value; - address = source.getAddress().value; id = source.getId().value; + phone = source.getPhone().map(phone -> phone.value).orElse(null); + email = source.getEmail().map(email -> email.value).orElse(null); + url = source.getUrl().map(url -> url.value).orElse(null); + address = source.getAddress().map(address -> address.value).orElse(null); tags.addAll(source.getTags().stream() .map(JsonAdaptedTag::new) .collect(Collectors.toList())); @@ -129,45 +134,38 @@ public Contact toModelType() throws IllegalValueException { } final Id modelId = new Id(id); - if (phone == null) { - throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName())); - } - if (!Phone.isValidPhone(phone)) { + if (phone != null && !Phone.isValidPhone(phone)) { throw new IllegalValueException(Phone.MESSAGE_CONSTRAINTS); } - final Phone modelPhone = new Phone(phone); + final Phone modelPhone = phone == null ? null : new Phone(phone); - if (email == null) { - throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName())); - } - if (!Email.isValidEmail(email)) { + if (email != null && !Email.isValidEmail(email)) { throw new IllegalValueException(Email.MESSAGE_CONSTRAINTS); } - final Email modelEmail = new Email(email); + final Email modelEmail = email == null ? null : new Email(email); - if (url == null) { - throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Url.class.getSimpleName())); - } - if (!Url.isValidUrl(url)) { + if (url != null && !Url.isValidUrl(url)) { throw new IllegalValueException(Url.MESSAGE_CONSTRAINTS); } - final Url modelUrl = new Url(url); + final Url modelUrl = url == null ? null : new Url(url); - if (address == null) { - throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName())); - } - if (!Address.isValidAddress(address)) { + if (address != null && !Address.isValidAddress(address)) { throw new IllegalValueException(Address.MESSAGE_CONSTRAINTS); } - final Address modelAddress = new Address(address); + final Address modelAddress = address == null ? null : new Address(address); final Set modelTags = new HashSet<>(contactTags); switch (modelType) { case ORGANIZATION: { - + if (status != null && !Status.isValidStatus(status)) { + throw new IllegalValueException(Status.MESSAGE_CONSTRAINTS); + } final Status modelStatus = status == null ? new Status() : new Status(status); + if (position != null && !Position.isValidPosition(position)) { + throw new IllegalValueException(Position.MESSAGE_CONSTRAINTS); + } final Position modelPosition = position == null ? new Position() : new Position(position); return new Organization( @@ -176,6 +174,9 @@ public Contact toModelType() throws IllegalValueException { ); } case RECRUITER: { + if (oid != null && !Id.isValidId(oid)) { + throw new IllegalValueException(Id.MESSAGE_CONSTRAINTS); + } final Id modelOid = oid == null ? null : new Id(oid); return new Recruiter( diff --git a/src/main/java/seedu/address/ui/ContactCard.java b/src/main/java/seedu/address/ui/ContactCard.java index 70c85b5ea8f..1960c511519 100644 --- a/src/main/java/seedu/address/ui/ContactCard.java +++ b/src/main/java/seedu/address/ui/ContactCard.java @@ -24,9 +24,8 @@ public class ContactCard extends UiPart { private static final String FXML = "ContactListCard.fxml"; /** - * Note: Certain keywords such as "location" and "resources" are reserved keywords in JavaFX. - * As a consequence, UI elements' variable names cannot be set to such keywords - * or an exception will be thrown by JavaFX during runtime. + * Note: Certain keywords such as "location" and "resources" are reserved keywords in JavaFX. As a consequence, UI + * elements' variable names cannot be set to such keywords or an exception will be thrown by JavaFX during runtime. * * @see The issue on AddressBook level 4 */ @@ -75,23 +74,29 @@ public ContactCard(Contact contact, int displayedIndex) { typeLabel.setId("type"); tags.getChildren().add(typeLabel); // add it to the front of tags - setVboxInnerLabelText(phone, () -> contact.getPhone().value); - setVboxInnerLabelText(address, () -> contact.getAddress().value); - setVboxInnerLabelText(email, () -> contact.getEmail().value); - setVboxInnerLabelText(url, () -> contact.getUrl().value); + setVboxInnerLabelText( + phone, () -> contact.getPhone().map(phone -> phone.value).orElse(null)); + setVboxInnerLabelText( + address, () -> contact.getAddress().map(address -> address.value).orElse(null)); + setVboxInnerLabelText( + email, () -> contact.getEmail().map(email -> email.value).orElse(null)); + setVboxInnerLabelText( + url, () -> contact.getUrl().map(url -> url.value).orElse(null)); switch (contact.getType()) { case ORGANIZATION: { Organization organization = (Organization) contact; - final String statusString = organization.getStatus().applicationStatus; - final String positionString = organization.getPosition().jobPosition; + final String statusString = organization.getStatus() + .map(status -> status.applicationStatus).orElse(null); + final String positionString = organization.getPosition() + .map(position -> position.jobPosition).orElse(null); setVboxInnerLabelText( - status, () -> StringUtil.formatWithNullFallback("Application Status: %s", statusString) - ); + status, () -> + StringUtil.formatWithNullFallback("Application Status: %s", statusString)); setVboxInnerLabelText( - position, () -> StringUtil.formatWithNullFallback("Application Position: %s", positionString) - ); + position, () -> + StringUtil.formatWithNullFallback("Application Position: %s", positionString)); cardPaneInnerVbox.getChildren().remove(linkedParentOrganization); break; } @@ -101,11 +106,10 @@ public ContactCard(Contact contact, int displayedIndex) { final Optional linkedOrgId = recruiter.getOrganizationId(); setVboxInnerLabelText( - linkedParentOrganization, () -> linkedOrgId.map(oid -> - String.format( - "from %s (%s)", "organization" /* TODO: Use org name instead */, oid.value - )) - .orElse(null) + linkedParentOrganization, () -> + linkedOrgId.map(oid -> String.format( + "from %s (%s)", "organization" /* TODO: Use org name instead */, oid.value)) + .orElse(null) ); cardPaneInnerVbox.getChildren().removeAll(status, position); break; @@ -121,10 +125,10 @@ public ContactCard(Contact contact, int displayedIndex) { } /** - * Configures the inner label contained within the vbox container to show the given string, - * or remove the label entirely if the string is empty or null. + * Configures the inner label contained within the vbox container to show the given string, or remove the label + * entirely if the string is empty or null. * - * @param label The label to set the text to. + * @param label The label to set the text to. * @param valueSupplier The string value supplier. This may be expressed as a lambda function. */ private void setVboxInnerLabelText(Label label, Supplier valueSupplier) { diff --git a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java b/src/test/java/seedu/address/logic/commands/CommandTestUtil.java index 1da4656b9f0..44d092adc88 100644 --- a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java +++ b/src/test/java/seedu/address/logic/commands/CommandTestUtil.java @@ -27,7 +27,6 @@ * Contains helper methods for testing commands. */ public class CommandTestUtil { - public static final String VALID_NAME_AMY = "Amy Bee"; public static final String VALID_NAME_BOB = "Bob Choo"; public static final String VALID_ID_AMY = "3a6e0af8-5092-47c0-baf7-18d6dc535823"; @@ -64,7 +63,7 @@ public class CommandTestUtil { public static final String INVALID_ID_DESC = " " + FLAG_ID + " " + "e91724&_18273"; // '&' not allowed in ids public static final String INVALID_PHONE_DESC = " " + FLAG_PHONE + " " + "911a"; // 'a' not allowed in phones public static final String INVALID_EMAIL_DESC = " " + FLAG_EMAIL + " " + "bob!yahoo"; // missing '@' symbol - public static final String INVALID_ADDRESS_DESC = " " + FLAG_ADDRESS; // empty string not allowed for addresses + public static final String INVALID_ADDRESS_DESC = " " + FLAG_ADDRESS + " "; // address cannot be empty string public static final String INVALID_URL_DESC = " " + FLAG_URL + " " + "asdfjkl"; public static final String INVALID_TAG_DESC = " " + FLAG_TAG + " " + "hubby*"; // '*' not allowed in tags diff --git a/src/test/java/seedu/address/logic/parser/AddCommandParserTest.java b/src/test/java/seedu/address/logic/parser/AddCommandParserTest.java index 3c96c75c090..12d536f8afa 100644 --- a/src/test/java/seedu/address/logic/parser/AddCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/AddCommandParserTest.java @@ -23,10 +23,7 @@ import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND; import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND; import static seedu.address.logic.commands.CommandTestUtil.URL_DESC_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; -import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; import static seedu.address.logic.parser.CliSyntax.FLAG_ADDRESS; @@ -150,7 +147,7 @@ public void parse_repeatedNonTagValue_failure() { @Test public void parse_optionalFieldsMissing_success() { // zero tags, no url - Contact expectedContact = new ContactBuilder(AMY).withUrl("").withTags().build(); + Contact expectedContact = new ContactBuilder(AMY).withUrl(null).withTags().build(); assertParseSuccess( parser, NAME_DESC_AMY + ID_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY, @@ -163,24 +160,7 @@ public void parse_compulsoryFieldMissing_failure() { String expectedMessage = String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE); // missing name flag - assertParseFailure(parser, VALID_NAME_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, - expectedMessage); - - // missing phone flag - assertParseFailure(parser, NAME_DESC_BOB + VALID_PHONE_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, - expectedMessage); - - // missing email flag - assertParseFailure(parser, NAME_DESC_BOB + PHONE_DESC_BOB + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, - expectedMessage); - - // missing address flag - assertParseFailure(parser, NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, - expectedMessage); - - // all flags missing - assertParseFailure(parser, VALID_NAME_BOB + VALID_PHONE_BOB + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, - expectedMessage); + assertParseFailure(parser, VALID_NAME_BOB, expectedMessage); } @Test diff --git a/src/test/java/seedu/address/storage/JsonAdaptedContactTest.java b/src/test/java/seedu/address/storage/JsonAdaptedContactTest.java index 0d8f6b45a09..7c9b701f4cd 100644 --- a/src/test/java/seedu/address/storage/JsonAdaptedContactTest.java +++ b/src/test/java/seedu/address/storage/JsonAdaptedContactTest.java @@ -1,5 +1,6 @@ package seedu.address.storage; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static seedu.address.storage.JsonAdaptedContact.MISSING_FIELD_MESSAGE_FORMAT; import static seedu.address.testutil.Assert.assertThrows; @@ -35,10 +36,10 @@ public class JsonAdaptedContactTest { private static final String VALID_STATUS = ""; private static final String VALID_POSITION = ""; private static final String VALID_ID = "78a36caf-6d42-4fd2-a017-7f6a92fa3155"; - private static final String VALID_PHONE = BENSON.getPhone().toString(); - private static final String VALID_EMAIL = BENSON.getEmail().toString(); - private static final String VALID_URL = BENSON.getUrl().toString(); - private static final String VALID_ADDRESS = BENSON.getAddress().toString(); + private static final String VALID_PHONE = BENSON.getPhone().get().value; + private static final String VALID_EMAIL = BENSON.getEmail().get().value; + private static final String VALID_URL = BENSON.getUrl().get().value; + private static final String VALID_ADDRESS = BENSON.getAddress().get().value; private static final String VALID_OID = "78a36caf-6d42-4fd2-a017-7f6a92fa3155"; private static final List VALID_TAGS = BENSON.getTags().stream() @@ -79,12 +80,11 @@ public void toModelType_invalidPhone_throwsIllegalValueException() { } @Test - public void toModelType_nullPhone_throwsIllegalValueException() { + public void toModelType_nullPhone_doesNotThrowException() { JsonAdaptedContact person = new JsonAdaptedContact(VALID_TYPE_ORG, VALID_NAME, VALID_ID, null, VALID_EMAIL, VALID_URL, VALID_ADDRESS, VALID_STATUS, VALID_POSITION, VALID_OID, VALID_TAGS); - String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()); - assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); + assertDoesNotThrow(person::toModelType); } @Test @@ -97,12 +97,11 @@ public void toModelType_invalidEmail_throwsIllegalValueException() { } @Test - public void toModelType_nullEmail_throwsIllegalValueException() { + public void toModelType_nullEmail_doesNotThrowException() { JsonAdaptedContact person = new JsonAdaptedContact(VALID_TYPE_ORG, VALID_NAME, VALID_ID, VALID_PHONE, null, VALID_URL, VALID_ADDRESS, VALID_STATUS, VALID_POSITION, VALID_OID, VALID_TAGS); - String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()); - assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); + assertDoesNotThrow(person::toModelType); } @Test @@ -115,12 +114,11 @@ public void toModelType_invalidAddress_throwsIllegalValueException() { } @Test - public void toModelType_nullAddress_throwsIllegalValueException() { + public void toModelType_nullAddress_doesNotThrowException() { JsonAdaptedContact person = new JsonAdaptedContact(VALID_TYPE_ORG, VALID_NAME, VALID_ID, VALID_PHONE, VALID_EMAIL, VALID_URL, null, VALID_STATUS, VALID_POSITION, VALID_OID, VALID_TAGS); - String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()); - assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); + assertDoesNotThrow(person::toModelType); } @Test diff --git a/src/test/java/seedu/address/testutil/ContactBuilder.java b/src/test/java/seedu/address/testutil/ContactBuilder.java index 88d9e00944f..3ddb559290b 100644 --- a/src/test/java/seedu/address/testutil/ContactBuilder.java +++ b/src/test/java/seedu/address/testutil/ContactBuilder.java @@ -56,10 +56,10 @@ public ContactBuilder() { public ContactBuilder(Contact contactToCopy) { name = contactToCopy.getName(); id = contactToCopy.getId(); - phone = contactToCopy.getPhone(); - email = contactToCopy.getEmail(); - url = contactToCopy.getUrl(); - address = contactToCopy.getAddress(); + phone = contactToCopy.getPhone().orElse(null); + email = contactToCopy.getEmail().orElse(null); + url = contactToCopy.getUrl().orElse(null); + address = contactToCopy.getAddress().orElse(null); tags = new HashSet<>(contactToCopy.getTags()); } @@ -83,7 +83,7 @@ public ContactBuilder withId(String id) { * Sets the {@code Status} of the {@code Contact} that we are building. */ public ContactBuilder withStatus(String status) { - this.status = new Status(status); + this.status = status == null ? null : new Status(status); return this; } @@ -99,7 +99,7 @@ public ContactBuilder withTags(String ... tags) { * Sets the {@code Url} of the {@code Contact} that we are building. */ public ContactBuilder withUrl(String url) { - this.url = new Url(url); + this.url = url == null ? null : new Url(url); return this; } @@ -107,7 +107,7 @@ public ContactBuilder withUrl(String url) { * Sets the {@code Address} of the {@code Contact} that we are building. */ public ContactBuilder withAddress(String address) { - this.address = new Address(address); + this.address = address == null ? null : new Address(address); return this; } @@ -115,7 +115,7 @@ public ContactBuilder withAddress(String address) { * Sets the {@code Phone} of the {@code Contact} that we are building. */ public ContactBuilder withPhone(String phone) { - this.phone = new Phone(phone); + this.phone = phone == null ? null : new Phone(phone); return this; } @@ -123,7 +123,7 @@ public ContactBuilder withPhone(String phone) { * Sets the {@code Email} of the {@code Contact} that we are building. */ public ContactBuilder withEmail(String email) { - this.email = new Email(email); + this.email = email == null ? null : new Email(email); return this; } diff --git a/src/test/java/seedu/address/testutil/ContactUtil.java b/src/test/java/seedu/address/testutil/ContactUtil.java index cd85395cd93..195a0339e1b 100644 --- a/src/test/java/seedu/address/testutil/ContactUtil.java +++ b/src/test/java/seedu/address/testutil/ContactUtil.java @@ -34,10 +34,10 @@ public static String getContactDetails(Contact contact) { StringBuilder sb = new StringBuilder(); sb.append(FLAG_NAME + " " + contact.getName().fullName + " "); sb.append(FLAG_ID + " " + contact.getId().value + " "); - sb.append(FLAG_PHONE + " " + contact.getPhone().value + " "); - sb.append(FLAG_EMAIL + " " + contact.getEmail().value + " "); - sb.append(FLAG_ADDRESS + " " + contact.getAddress().value + " "); - sb.append(FLAG_URL + " " + contact.getUrl().value + " "); + sb.append(FLAG_PHONE + " " + contact.getPhone().map(phone -> phone.value).orElse("") + " "); + sb.append(FLAG_EMAIL + " " + contact.getEmail().map(email -> email.value).orElse("") + " "); + sb.append(FLAG_ADDRESS + " " + contact.getAddress().map(address -> address.value).orElse("") + " "); + sb.append(FLAG_URL + " " + contact.getUrl().map(url -> url.value).orElse("") + " "); contact.getTags().stream().forEach( s -> sb.append(FLAG_TAG + s.tagName + " ") ); diff --git a/src/test/java/seedu/address/testutil/EditContactDescriptorBuilder.java b/src/test/java/seedu/address/testutil/EditContactDescriptorBuilder.java index d5738e16723..b912651d78d 100644 --- a/src/test/java/seedu/address/testutil/EditContactDescriptorBuilder.java +++ b/src/test/java/seedu/address/testutil/EditContactDescriptorBuilder.java @@ -33,9 +33,9 @@ public EditContactDescriptorBuilder(EditContactDescriptor descriptor) { public EditContactDescriptorBuilder(Contact contact) { descriptor = new EditContactDescriptor(); descriptor.setName(contact.getName()); - descriptor.setPhone(contact.getPhone()); - descriptor.setEmail(contact.getEmail()); - descriptor.setAddress(contact.getAddress()); + descriptor.setPhone(contact.getPhone().orElse(null)); + descriptor.setEmail(contact.getEmail().orElse(null)); + descriptor.setAddress(contact.getAddress().orElse(null)); descriptor.setTags(contact.getTags()); } diff --git a/src/test/java/seedu/address/testutil/RecruiterBuilder.java b/src/test/java/seedu/address/testutil/RecruiterBuilder.java index f4238bd0326..c6a9608f0e7 100644 --- a/src/test/java/seedu/address/testutil/RecruiterBuilder.java +++ b/src/test/java/seedu/address/testutil/RecruiterBuilder.java @@ -42,10 +42,10 @@ public Recruiter build() { return new Recruiter( contact.getName(), contact.getId(), - contact.getPhone(), - contact.getEmail(), - contact.getUrl(), - contact.getAddress(), + contact.getPhone().orElse(null), + contact.getEmail().orElse(null), + contact.getUrl().orElse(null), + contact.getAddress().orElse(null), contact.getTags(), oid ); From 7603694d53a1ca32c50506a5e7419e3a62de6a3b Mon Sep 17 00:00:00 2001 From: McNaBry Date: Thu, 19 Oct 2023 15:25:11 +0800 Subject: [PATCH 3/6] Fix checkstyle and javadocs --- src/main/java/seedu/address/model/person/Organization.java | 7 +++++-- src/main/java/seedu/address/model/person/Recruiter.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/seedu/address/model/person/Organization.java b/src/main/java/seedu/address/model/person/Organization.java index 8f1538e74e7..f7474dee3d6 100644 --- a/src/main/java/seedu/address/model/person/Organization.java +++ b/src/main/java/seedu/address/model/person/Organization.java @@ -9,7 +9,8 @@ /** * Represents an Organisation in the address book. - * Guarantees: Guarantees: name and id are present and not null, field values are immutable and if present, are validated. + * Guarantees: Guarantees: name and id are present and not null, + * field values are immutable and if present, are validated. */ public class Organization extends Contact { // TODO: Override the getChildren method @@ -18,7 +19,9 @@ public class Organization extends Contact { private final Optional position; /** - * Every field must be present and not null. + * Name and id fields must be non-null. + * Tags must be non-null but can be empty as well. + * The other fields can be null. */ public Organization( Name name, Id id, Phone phone, Email email, Url url, diff --git a/src/main/java/seedu/address/model/person/Recruiter.java b/src/main/java/seedu/address/model/person/Recruiter.java index 5dfa42ee22b..2e9ceb408ed 100644 --- a/src/main/java/seedu/address/model/person/Recruiter.java +++ b/src/main/java/seedu/address/model/person/Recruiter.java @@ -9,14 +9,17 @@ /** * Represents a Recruiter in the address book. - * Guarantees: Guarantees: name and id are present and not null, field values are immutable and if present, are validated. + * Guarantees: Guarantees: name and id are present and not null, + * field values are immutable and if present, are validated. */ public class Recruiter extends Contact { private final Optional oid; /** - * Every field except oid must be present and not null. + * Name and id fields must be non-null. + * Tags must be non-null but can be empty as well. + * The other fields can be null. */ public Recruiter(Name name, Id id, Phone phone, Email email, Url url, Address address, Set tags, Id oid) { super(name, id, phone, email, url, address, tags); From b169b810003a0ebd5531151e56f1b544897f3524 Mon Sep 17 00:00:00 2001 From: Wern Date: Thu, 19 Oct 2023 15:36:34 +0800 Subject: [PATCH 4/6] Rename project to Jobby --- README.md | 6 +++--- build.gradle | 2 +- docs/DeveloperGuide.md | 10 +++++----- docs/Documentation.md | 2 +- docs/UserGuide.md | 16 ++++++++-------- docs/_config.yml | 2 +- docs/_data/projects.yml | 2 +- docs/_sass/minima/_base.scss | 2 +- docs/index.md | 9 ++++----- docs/team/cj-lee01.md | 4 ++-- docs/team/mcnabry.md | 6 +++--- docs/team/tanshiyu1999.md | 4 ++-- docs/team/wamps-jp.md | 4 ++-- docs/team/wxwern.md | 4 ++-- docs/tutorials/AddRemark.md | 2 +- .../seedu/address/commons/core/LogsCenter.java | 2 +- src/main/java/seedu/address/model/UserPrefs.java | 2 +- src/main/resources/view/MainWindow.fxml | 2 +- .../ExtraValuesUserPref.json | 2 +- .../TypicalUserPref.json | 2 +- .../seedu/address/logic/LogicManagerTest.java | 2 +- .../storage/JsonUserPrefsStorageTest.java | 2 +- 22 files changed, 44 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 3b6b6a8099f..9f927d5a80b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -## SteveJobs++ (SJ++) +## Jobby [![CI Status](https://github.com/AY2324S1-CS2103T-W08-3/tp/workflows/Java%20CI/badge.svg)](https://github.com/AY2324S1-CS2103T-W08-3/tp/actions) -SJ++ is a desktop application that helps you manage your job applications by easily recording organization and recruiter contacts, plus note down information about your applications. It is optimized for CLI use, so you can operate the application with only your keyboard. +Jobby is a desktop application that helps you manage your job applications by easily recording organization and recruiter contacts, plus note down information about your applications. It is optimized for CLI use, so you can operate the application with only your keyboard. ![Ui](docs/images/Ui.png) @@ -10,4 +10,4 @@ SJ++ is a desktop application that helps you manage your job applications by eas * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big. * It comes with a **reasonable level of user and developer documentation**. * It is an extension built on top of **[Address Book Level 3 by se-education.org](https://se-education.org/addressbook-level3)**. -* For detailed documentation of this project, see the **[SJ++ Product Website](https://ay2324s1-cs2103t-w08-3.github.io/tp/)**. +* For detailed documentation of this project, see the **[Jobby Product Website](https://ay2324s1-cs2103t-w08-3.github.io/tp/)**. diff --git a/build.gradle b/build.gradle index ee529dfa9a9..e1ae2c14459 100644 --- a/build.gradle +++ b/build.gradle @@ -66,7 +66,7 @@ dependencies { } shadowJar { - archiveFileName = 'sjobs.jar' + archiveFileName = 'jobby.jar' } defaultTasks 'clean', 'test' diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 1134fcbce8f..a88630f9846 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -287,16 +287,16 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli ### Use cases -(For all use cases below, the **System** is `SJ++` and the **Actor** is the `user`, unless specified otherwise) +(For all use cases below, the **System** is `Jobby` and the **Actor** is the `user`, unless specified otherwise) **Use case: Delete a contact** **MSS** 1. User requests to list organizations -2. SJ++ shows a list of organizations +2. Jobby shows a list of organizations 3. User requests to delete a specific organization in the list -4. SJ++ deletes the organization +4. Jobby deletes the organization Use case ends. @@ -308,7 +308,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli * 3a. The given index is invalid. - * 3a1. SJ++ shows an error message. + * 3a1. Jobby shows an error message. Use case resumes at step 2. @@ -319,7 +319,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli 1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed. 2. Should be able to hold up to 1000 contacts without a noticeable sluggishness in performance for typical usage. 3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. -4. A user with familiarity with common Unix/Linux shell command syntax should find the syntax of SJ++ to match their habits and easy to pick up. +4. A user with familiarity with common Unix/Linux shell command syntax should find the syntax of Jobby to match their habits and easy to pick up. 5. The command syntax should not conflict with something that a user could plausibly use as legitimate data input. diff --git a/docs/Documentation.md b/docs/Documentation.md index b34246c4288..03bac73848d 100644 --- a/docs/Documentation.md +++ b/docs/Documentation.md @@ -10,7 +10,7 @@ title: Documentation guide * To learn how set it up and maintain the project website, follow the guide [_[se-edu/guides] **Using Jekyll for project documentation**_](https://se-education.org/guides/tutorials/jekyll.html). * Note these points when adapting the documentation to a different project/product: * The 'Site-wide settings' section of the page linked above has information on how to update site-wide elements such as the top navigation bar. - * :bulb: In addition to updating content files, you might have to update the config files `docs\_config.yml` and `docs\_sass\minima\_base.scss` (which contains a reference to `SJ++` that comes into play when converting documentation pages to PDF format). + * :bulb: In addition to updating content files, you might have to update the config files `docs\_config.yml` and `docs\_sass\minima\_base.scss` (which contains a reference to `Jobby` that comes into play when converting documentation pages to PDF format). * If you are using Intellij for editing documentation files, you can consider enabling 'soft wrapping' for `*.md` files, as explained in [_[se-edu/guides] **Intellij IDEA: Useful settings**_](https://se-education.org/guides/tutorials/intellijUsefulSettings.html#enabling-soft-wrapping) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index d007de2cdd4..c459c3d2893 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -3,7 +3,7 @@ layout: page title: User Guide --- -SteveJobs++ (SJ++) is a **desktop app for managing job applications and contacts, optimized for use via a Command Line Interface (CLI)** while still having the benefits of a Graphical User Interface (GUI). SJ++ can help you manage tracking your job applications and contacts in a more streamlined fashion. If you can type fast, SJ++ can get your contact management tasks done faster than traditional GUI apps. +**Jobby** is a **desktop app for managing job applications and contacts, optimized for use via a Command Line Interface (CLI)** while still having the benefits of a Graphical User Interface (GUI). Jobby can help you manage tracking your job applications and contacts in a more streamlined fashion. If you can type fast, Jobby can get your contact management tasks done faster than traditional GUI apps. * Table of Contents {:toc} @@ -14,11 +14,11 @@ SteveJobs++ (SJ++) is a **desktop app for managing job applications and contacts 1. Ensure you have Java `11` or above installed in your Computer. -1. Download the latest `sjobs.jar` from [here](https://github.com/AY2324S1-CS2103T-W08-3/tp/releases). +1. Download the latest `jobby.jar` from [here](https://github.com/AY2324S1-CS2103T-W08-3/tp/releases). -1. Copy the file to the folder you want to use as the _home folder_ for your SteveJobs Application. +1. Copy the file to the folder you want to use as the _home folder_ for your Jobby Application. -1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar sjobs.jar` command to run the application.
+1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar jobby.jar` command to run the application.
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
![Ui](images/Ui.png) @@ -217,15 +217,15 @@ Format: `exit` ### Saving the data -SJ++ data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +Jobby data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. ### Editing the data file -SJ++ data are saved automatically as a JSON file `[JAR file location]/data/sjobs.json`. Advanced users are welcome to update data directly by editing that data file. +Jobby data are saved automatically as a JSON file `[JAR file location]/data/jobby.json`. Advanced users are welcome to update data directly by editing that data file.
:exclamation: **Caution:** -If your changes to the data file makes its format invalid, SJ++ will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it. +If your changes to the data file makes its format invalid, Jobby will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
@@ -234,7 +234,7 @@ If your changes to the data file makes its format invalid, SJ++ will discard all ## FAQ **Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous SJ++ home folder. +**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Jobby home folder. -------------------------------------------------------------------------------------------------------------------- diff --git a/docs/_config.yml b/docs/_config.yml index a9bc1db634a..ab3bd79dc72 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,4 +1,4 @@ -title: "SJ++" +title: "Jobby" theme: minima header_pages: diff --git a/docs/_data/projects.yml b/docs/_data/projects.yml index 999229c9f44..f1aee680705 100644 --- a/docs/_data/projects.yml +++ b/docs/_data/projects.yml @@ -1,4 +1,4 @@ -- name: "SJ++" +- name: "Jobby" url: https://ay2324s1-cs2103t-w08-3.github.io/tp/ diff --git a/docs/_sass/minima/_base.scss b/docs/_sass/minima/_base.scss index 283996e5508..c4a314b8a36 100644 --- a/docs/_sass/minima/_base.scss +++ b/docs/_sass/minima/_base.scss @@ -288,7 +288,7 @@ table { text-align: center; } .site-header:before { - content: "SJ++"; + content: "Jobby"; font-size: 32px; } } diff --git a/docs/index.md b/docs/index.md index 2aa981e15a4..5fe0b94a356 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ --- layout: page -title: SteveJobs++ +title: Jobby --- [![CI Status](https://github.com/AY2324S1-CS2103T-W08-3/tp/workflows/Java%20CI/badge.svg)](https://github.com/AY2324S1-CS2103T-W08-3/tp/actions) @@ -8,13 +8,12 @@ title: SteveJobs++ ![Ui](images/Ui.png) -**SteveJobs++ (SJ++) is a desktop application for managing your job application details, specifically organization and recruiter contacts, plus application info and status.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). +**Jobby is a desktop application for managing your job application details, specifically organization and recruiter contacts, plus application info and status.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). -* If you are interested in using SJ++, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). -* If you are interested about developing SJ++, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. +* If you are interested in using++, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). +* If you are interested about developing++, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. **Acknowledgements** * Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), [JUnit5](https://github.com/junit-team/junit5) -* Named in honor of [Steve Jobs](https://en.wikipedia.org/wiki/Steve_Jobs) diff --git a/docs/team/cj-lee01.md b/docs/team/cj-lee01.md index 8bfeb4b4797..325c82cf683 100644 --- a/docs/team/cj-lee01.md +++ b/docs/team/cj-lee01.md @@ -1,6 +1,6 @@ -### Project: SteveJobs++ +### Project: Jobby -SteveJobs++ is a desktop address book and job application tracking tool. The user interacts with it using a CLI, and it has a GUI created in JavaFX. It is written in Java. +Jobby is a desktop address book and job application tracking tool. The user interacts with it using a CLI, and it has a GUI created in JavaFX. It is written in Java. Given below are my contributions to the project. diff --git a/docs/team/mcnabry.md b/docs/team/mcnabry.md index 442dedb7fbc..a04cce66bda 100644 --- a/docs/team/mcnabry.md +++ b/docs/team/mcnabry.md @@ -3,11 +3,11 @@ layout: page title: Bryan's Project Portfolio Page --- -### Project: SteveJobs++ +### Project: Jobby -SteveJobs++ (SJ++) is a desktop app for managing job applications and contacts, +Jobby is a desktop app for managing job applications and contacts, optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). -SJ++ can help you manage tracking your job applications and contacts in a more streamlined fashion. +Jobby can help you manage tracking your job applications and contacts in a more streamlined fashion. Given below are my contributions to the project. diff --git a/docs/team/tanshiyu1999.md b/docs/team/tanshiyu1999.md index 8bfeb4b4797..325c82cf683 100644 --- a/docs/team/tanshiyu1999.md +++ b/docs/team/tanshiyu1999.md @@ -1,6 +1,6 @@ -### Project: SteveJobs++ +### Project: Jobby -SteveJobs++ is a desktop address book and job application tracking tool. The user interacts with it using a CLI, and it has a GUI created in JavaFX. It is written in Java. +Jobby is a desktop address book and job application tracking tool. The user interacts with it using a CLI, and it has a GUI created in JavaFX. It is written in Java. Given below are my contributions to the project. diff --git a/docs/team/wamps-jp.md b/docs/team/wamps-jp.md index 5e79e92bf91..286f8021cc2 100644 --- a/docs/team/wamps-jp.md +++ b/docs/team/wamps-jp.md @@ -3,9 +3,9 @@ layout: page title: Juanpa's Project Portfolio Page --- -### Project: SteveJobs++ +### Project: Jobby -SteveJobs++ (SJ++) is a desktop app for tracking job applications. +Jobby is a desktop app for tracking job applications. It saves organisations and recruiters as contacts in an addressbook. Given below are my contributions to the project. diff --git a/docs/team/wxwern.md b/docs/team/wxwern.md index 2035adb1958..8ff6b1f6f44 100644 --- a/docs/team/wxwern.md +++ b/docs/team/wxwern.md @@ -3,9 +3,9 @@ layout: page title: Wern's Project Portfolio Page --- -### Project: SteveJobs++ +### Project: Jobby -SteveJobs++ is a desktop application used for tracking job applications. +Jobby is a desktop application used for tracking job applications. Given below are my contributions to the project. diff --git a/docs/tutorials/AddRemark.md b/docs/tutorials/AddRemark.md index 14fcb0cdd7f..2ae594cbe1b 100644 --- a/docs/tutorials/AddRemark.md +++ b/docs/tutorials/AddRemark.md @@ -293,7 +293,7 @@ While the changes to code may be minimal, the test data will have to be updated
-:exclamation: You must delete AddressBook’s storage file located at `/data/sjobs.json` before running it! Not doing so will cause AddressBook to default to an empty address book! +:exclamation: You must delete AddressBook’s storage file located at `/data/jobby.json` before running it! Not doing so will cause AddressBook to default to an empty address book!
diff --git a/src/main/java/seedu/address/commons/core/LogsCenter.java b/src/main/java/seedu/address/commons/core/LogsCenter.java index 33c077dd566..78aad4016c4 100644 --- a/src/main/java/seedu/address/commons/core/LogsCenter.java +++ b/src/main/java/seedu/address/commons/core/LogsCenter.java @@ -20,7 +20,7 @@ public class LogsCenter { private static final int MAX_FILE_COUNT = 5; private static final int MAX_FILE_SIZE_IN_BYTES = (int) (Math.pow(2, 20) * 5); // 5MB - private static final String LOG_FILE = "sjobs.log"; + private static final String LOG_FILE = "jobby.log"; private static final Logger logger; // logger for this class private static Logger baseLogger; // to be used as the parent of all other loggers created by this class. private static Level currentLogLevel = Level.INFO; diff --git a/src/main/java/seedu/address/model/UserPrefs.java b/src/main/java/seedu/address/model/UserPrefs.java index 75fce7b90e4..b665a525e90 100644 --- a/src/main/java/seedu/address/model/UserPrefs.java +++ b/src/main/java/seedu/address/model/UserPrefs.java @@ -14,7 +14,7 @@ public class UserPrefs implements ReadOnlyUserPrefs { private GuiSettings guiSettings = new GuiSettings(); - private Path addressBookFilePath = Paths.get("data" , "sjobs.json"); + private Path addressBookFilePath = Paths.get("data" , "jobby.json"); /** * Creates a {@code UserPrefs} with default values. diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 8599b9090d4..11788ad2bb2 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -12,7 +12,7 @@ + title="Jobby" minWidth="450" minHeight="600" onCloseRequest="#handleExit"> diff --git a/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json b/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json index cba8ce64699..04bfa795a2c 100644 --- a/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json +++ b/src/test/data/JsonUserPrefsStorageTest/ExtraValuesUserPref.json @@ -9,5 +9,5 @@ "z" : 99 } }, - "addressBookFilePath" : "sjobs.json" + "addressBookFilePath" : "jobby.json" } diff --git a/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json b/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json index 0f2a780eaa8..fdcedd92f33 100644 --- a/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json +++ b/src/test/data/JsonUserPrefsStorageTest/TypicalUserPref.json @@ -7,5 +7,5 @@ "y" : 100 } }, - "addressBookFilePath" : "sjobs.json" + "addressBookFilePath" : "jobby.json" } diff --git a/src/test/java/seedu/address/logic/LogicManagerTest.java b/src/test/java/seedu/address/logic/LogicManagerTest.java index e01223dd4d5..6e5cacfcd1c 100644 --- a/src/test/java/seedu/address/logic/LogicManagerTest.java +++ b/src/test/java/seedu/address/logic/LogicManagerTest.java @@ -48,7 +48,7 @@ public class LogicManagerTest { @BeforeEach public void setUp() { JsonAddressBookStorage addressBookStorage = - new JsonAddressBookStorage(temporaryFolder.resolve("sjobs.json")); + new JsonAddressBookStorage(temporaryFolder.resolve("jobby.json")); JsonUserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(temporaryFolder.resolve("userPrefs.json")); StorageManager storage = new StorageManager(addressBookStorage, userPrefsStorage); logic = new LogicManager(model, storage); diff --git a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java b/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java index 8d4f23b424a..5903c8639e6 100644 --- a/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java +++ b/src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java @@ -73,7 +73,7 @@ public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataLoad private UserPrefs getTypicalUserPrefs() { UserPrefs userPrefs = new UserPrefs(); userPrefs.setGuiSettings(new GuiSettings(1000, 500, 300, 100)); - userPrefs.setAddressBookFilePath(Paths.get("sjobs.json")); + userPrefs.setAddressBookFilePath(Paths.get("jobby.json")); return userPrefs; } From 59256a6ddd1e108acce06d0c1b74ca59a164ff2d Mon Sep 17 00:00:00 2001 From: McNaBry Date: Thu, 19 Oct 2023 15:57:07 +0800 Subject: [PATCH 5/6] Update message for AddCommand usage --- .../address/logic/commands/AddCommand.java | 60 ++++++++++++++++--- src/main/resources/view/DarkTheme.css | 2 +- src/main/resources/view/MainWindow.fxml | 2 +- src/main/resources/view/ResultDisplay.fxml | 2 +- 4 files changed, 54 insertions(+), 12 deletions(-) diff --git a/src/main/java/seedu/address/logic/commands/AddCommand.java b/src/main/java/seedu/address/logic/commands/AddCommand.java index e4f54ed29b8..65f67323dab 100644 --- a/src/main/java/seedu/address/logic/commands/AddCommand.java +++ b/src/main/java/seedu/address/logic/commands/AddCommand.java @@ -5,8 +5,14 @@ import static seedu.address.logic.parser.CliSyntax.FLAG_EMAIL; import static seedu.address.logic.parser.CliSyntax.FLAG_ID; import static seedu.address.logic.parser.CliSyntax.FLAG_NAME; +import static seedu.address.logic.parser.CliSyntax.FLAG_ORGANIZATION; +import static seedu.address.logic.parser.CliSyntax.FLAG_ORGANIZATION_ID; import static seedu.address.logic.parser.CliSyntax.FLAG_PHONE; +import static seedu.address.logic.parser.CliSyntax.FLAG_POSITION; +import static seedu.address.logic.parser.CliSyntax.FLAG_RECRUITER; +import static seedu.address.logic.parser.CliSyntax.FLAG_STATUS; import static seedu.address.logic.parser.CliSyntax.FLAG_TAG; +import static seedu.address.logic.parser.CliSyntax.FLAG_URL; import java.util.logging.Logger; @@ -24,21 +30,57 @@ public class AddCommand extends Command { public static final String COMMAND_WORD = "add"; - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a contact to the address book. " + public static final String MESSAGE_ORGANIZATION_USAGE = "Adds an organization. " + "Parameters: " + + FLAG_ORGANIZATION + " " + FLAG_NAME + " NAME " - + FLAG_ID + " ID " - + FLAG_PHONE + " PHONE " - + FLAG_EMAIL + " EMAIL " - + FLAG_ADDRESS + " ADDRESS " + + "[" + FLAG_ID + " ID] " + + "[" + FLAG_PHONE + " PHONE] " + + "[" + FLAG_EMAIL + " EMAIL] " + + "[" + FLAG_URL + " URL] " + + "[" + FLAG_ADDRESS + " ADDRESS] " + + "[" + FLAG_STATUS + " STATUS] " + + "[" + FLAG_POSITION + " POSITION] " + "[" + FLAG_TAG + " TAG]...\n" + "Example: " + COMMAND_WORD + " " - + FLAG_NAME + " John Doe " + + FLAG_ORGANIZATION + " " + + FLAG_NAME + " JobsInc " + + FLAG_ID + " id_12345-1 " + FLAG_PHONE + " 98765432 " - + FLAG_EMAIL + " johnd@example.com " + + FLAG_EMAIL + " jobsInc@example.com " + + FLAG_URL + " www.jobsinc.com " + FLAG_ADDRESS + " 311, Clementi Ave 2, #02-25 " - + FLAG_TAG + " friends " - + FLAG_TAG + " owesMoney"; + + FLAG_STATUS + " applied " + + FLAG_POSITION + " Junior Software Engineer " + + FLAG_TAG + " softwareEngineering " + + FLAG_TAG + " competitive "; + + public static final String MESSAGE_RECRUITER_USAGE = "Adds a recruiter. " + + "Parameters: " + + FLAG_RECRUITER + " " + + FLAG_NAME + " NAME " + + "[" + FLAG_ID + " ID] " + + "[" + FLAG_ORGANIZATION_ID + " ORG_ID] " + + "[" + FLAG_PHONE + " PHONE] " + + "[" + FLAG_EMAIL + " EMAIL] " + + "[" + FLAG_URL + " URL] " + + "[" + FLAG_ADDRESS + " ADDRESS] " + + "[" + FLAG_TAG + " TAG]...\n" + + "Example: " + COMMAND_WORD + " " + + FLAG_RECRUITER + " " + + FLAG_NAME + " Steve " + + FLAG_ID + " id_98765-1 " + + FLAG_PHONE + " 83452145 " + + FLAG_EMAIL + " steveJobsInc@example.com " + + FLAG_URL + " www.linkedin.com/in/steve/ " + + FLAG_ADDRESS + " 311 W Coast Walk, #02-30 " + + FLAG_TAG + " friendly "; + + public static final String MESSAGE_USAGE = COMMAND_WORD + + ": Adds a contact to the address book of the class type Organization or Recruiter." + + " The input format varies depending on the class:\n\n" + + MESSAGE_ORGANIZATION_USAGE + "\n\n" + + MESSAGE_RECRUITER_USAGE; public static final String MESSAGE_SUCCESS = "New contact added: %1$s"; public static final String MESSAGE_DUPLICATE_CONTACT = "This contact already exists in the address book"; diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index 51cb32b4bdb..a3806dc9e9f 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -149,7 +149,7 @@ .result-display { -fx-background-color: transparent; -fx-font-family: "Segoe UI Light"; - -fx-font-size: 13pt; + -fx-font-size: 12pt; -fx-text-fill: white; } diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml index 8599b9090d4..5eeb2b6c603 100644 --- a/src/main/resources/view/MainWindow.fxml +++ b/src/main/resources/view/MainWindow.fxml @@ -40,7 +40,7 @@ + minHeight="150" prefHeight="100" maxHeight="100"> diff --git a/src/main/resources/view/ResultDisplay.fxml b/src/main/resources/view/ResultDisplay.fxml index 01b691792a9..42a3a1591f8 100644 --- a/src/main/resources/view/ResultDisplay.fxml +++ b/src/main/resources/view/ResultDisplay.fxml @@ -5,5 +5,5 @@ -