From cea9d9393b0ac7b70e2c61e6bedc4ed24904786f Mon Sep 17 00:00:00 2001 From: JerryWang0000 Date: Sat, 16 Mar 2024 02:01:57 +0800 Subject: [PATCH] Make minor chagnes Make changes in the output value of Faculty in some splaces of the codes as the type is now Enum. --- src/main/java/staffconnect/storage/JsonAdaptedPerson.java | 2 +- src/main/java/staffconnect/ui/PersonCard.java | 2 +- src/test/java/staffconnect/testutil/PersonUtil.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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(