diff --git a/src/main/java/staffconnect/storage/JsonAdaptedPerson.java b/src/main/java/staffconnect/storage/JsonAdaptedPerson.java index 5f4b5fec756..557ebc407ce 100644 --- a/src/main/java/staffconnect/storage/JsonAdaptedPerson.java +++ b/src/main/java/staffconnect/storage/JsonAdaptedPerson.java @@ -60,7 +60,7 @@ public JsonAdaptedPerson(Person source) { name = source.getName().fullName; phone = source.getPhone().value; email = source.getEmail().value; - faculty = source.getFaculty().value; + faculty = source.getFaculty().toString(); venue = source.getVenue().value; module = source.getModule().value; tags.addAll(source.getTags().stream() diff --git a/src/main/java/staffconnect/ui/PersonCard.java b/src/main/java/staffconnect/ui/PersonCard.java index c2aeb95409c..62a7fdb51e5 100644 --- a/src/main/java/staffconnect/ui/PersonCard.java +++ b/src/main/java/staffconnect/ui/PersonCard.java @@ -54,7 +54,7 @@ public PersonCard(Person person, int displayedIndex) { id.setText(displayedIndex + ". "); name.setText(person.getName().fullName); phone.setText(person.getPhone().value); - faculty.setText(person.getFaculty().value); + faculty.setText(person.getFaculty().toString()); venue.setText(person.getVenue().value); module.setText(person.getModule().value); email.setText(person.getEmail().value); diff --git a/src/test/java/staffconnect/testutil/PersonUtil.java b/src/test/java/staffconnect/testutil/PersonUtil.java index 1496b51f7dd..264a3ba39db 100644 --- a/src/test/java/staffconnect/testutil/PersonUtil.java +++ b/src/test/java/staffconnect/testutil/PersonUtil.java @@ -35,7 +35,7 @@ public static String getPersonDetails(Person person) { sb.append(PREFIX_NAME + person.getName().fullName + " "); sb.append(PREFIX_PHONE + person.getPhone().value + " "); sb.append(PREFIX_EMAIL + person.getEmail().value + " "); - sb.append(PREFIX_FACULTY + person.getFaculty().value + " "); + sb.append(PREFIX_FACULTY + person.getFaculty().toString() + " "); sb.append(PREFIX_VENUE + person.getVenue().value + " "); sb.append(PREFIX_MODULE + person.getModule().value + " "); person.getTags().stream().forEach(