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

[CS2103T-W10-3] ComputingConnection #107

Open
wants to merge 397 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
397 commits
Select commit Hold shift + click to select a range
0b23c9b
Merge pull request #73 from Shivlock221b/branch-Filter-New-Fields
djiangel Oct 24, 2021
5afb583
update-DG-on-interactions
noobmaster19 Oct 24, 2021
4b2b750
Merge pull request #74 from noobmaster19/master
djiangel Oct 25, 2021
47169ce
Add 'remove' command functionality
timothywongej Oct 25, 2021
5cdfa24
Update parsers to support 'remove' command
timothywongej Oct 25, 2021
e718c48
Add exception handling for 'remove' command
timothywongej Oct 25, 2021
245d20a
Update code quality for 'remove' command
timothywongej Oct 25, 2021
28e321a
Merge branch 'master' into branch-remove-command
timothywongej Oct 25, 2021
043f08e
Format code for checkstyle test
timothywongej Oct 25, 2021
e0e21a5
Update 'remove' command to support Remark and Interaction class
timothywongej Oct 25, 2021
66ec684
feat: save to DB
noobmaster19 Oct 26, 2021
ef477d1
Merge pull request #75 from timothywongej/branch-remove-command
kdeasymoneysniper Oct 26, 2021
7896171
Merge pull request #78 from noobmaster19/master
kdeasymoneysniper Oct 26, 2021
23517f4
Merge branch 'master' into branch-v1.3-documentation
timothywongej Oct 26, 2021
afbf7b2
Merge branch 'master' into branch-add-command
timothywongej Oct 26, 2021
c79b418
Updated GUI to reflect 'View' detail page
kdeasymoneysniper Oct 26, 2021
a736b50
Fixed missing line at EOF
kdeasymoneysniper Oct 26, 2021
a3fd327
Fixed checkstyle issues
kdeasymoneysniper Oct 26, 2021
9d7ee5b
Fixed import order issue
kdeasymoneysniper Oct 26, 2021
5329e83
Fix test issues
kdeasymoneysniper Oct 26, 2021
d304992
Merge pull request #79 from kdeasymoneysniper/branch-view-GUI
timothywongej Oct 26, 2021
63644c3
Update valid faculty data fields
timothywongej Oct 26, 2021
320a211
Update validation regex for data fields
timothywongej Oct 26, 2021
b1aaf60
Merge branch 'master' into branch-v1.3-documentation
timothywongej Oct 26, 2021
e46b4ac
Add front matters for UserGuide.md
timothywongej Oct 26, 2021
522ff9c
Add categorisation of features in UserGuide.md
timothywongej Oct 27, 2021
cde4150
Merge pull request #80 from timothywongej/branch-add-command
timothywongej Oct 27, 2021
af308b2
Merge pull request #81 from timothywongej/branch-v1.3-documentation
timothywongej Oct 27, 2021
62194a5
docs: updated user-guide
noobmaster19 Oct 27, 2021
83e28aa
Merge pull request #82 from noobmaster19/master
timothywongej Oct 27, 2021
a7bbc3d
Update and reformat UserGuide.md for v1.3
timothywongej Oct 27, 2021
dfe442a
Merge branch 'master' into branch-v1.3-documentation
timothywongej Oct 27, 2021
1c44391
Merge branch 'master' into branch-append-command
timothywongej Oct 27, 2021
87642db
Add defensive coding for 'append' and 'remove' commands
timothywongej Oct 27, 2021
05d5aee
Merge branch 'master' into branch-remove-command
timothywongej Oct 27, 2021
4db8107
Refactor 'remove' command to use generics
timothywongej Oct 27, 2021
d75d979
Merge pull request #83 from timothywongej/branch-v1.3-documentation
timothywongej Oct 28, 2021
58c3587
Merge pull request #85 from timothywongej/branch-append-command
timothywongej Oct 28, 2021
6dafba6
Merge pull request #86 from timothywongej/branch-remove-command
timothywongej Oct 28, 2021
eafcc0b
organisation-commands
djiangel Oct 28, 2021
4b0aa85
Merge branch 'master' into branch-v1.3-documentation
timothywongej Oct 28, 2021
ae42080
feat: Add organisation command
Oct 28, 2021
19fa290
Changes in testing
Oct 28, 2021
17f8abc
Stub changes in testing
Oct 28, 2021
41f20ed
Json file changes
Oct 28, 2021
f51cb5e
Json checks
Oct 28, 2021
0e6cd1b
Merge pull request #88 from Shivlock221b/branch-AddOrgCommand
Shivlock221b Oct 28, 2021
0e3ee2a
Merge branch 'master' into organisation-commands
Shivlock221b Oct 28, 2021
9c657a7
Updated roles and responsibilities
timothywongej Oct 28, 2021
1af227b
Reformat UserGuide.md and update features
timothywongej Oct 28, 2021
23e88bc
Update 'add' and 'edit' commands for minor bugs
timothywongej Oct 28, 2021
b1bc8fd
Update Model.java
djiangel Oct 28, 2021
112f33a
Update ModelManager.java
djiangel Oct 28, 2021
81a2520
Update Organisation.java
djiangel Oct 28, 2021
96e9293
Update AddressBookParser.java
djiangel Oct 28, 2021
2885978
Update UniqueOrganisationList.java
djiangel Oct 28, 2021
dde38a4
Update AddCommandTest.java
djiangel Oct 28, 2021
dad49d9
Updated UG to reflect view and find command correctly
kdeasymoneysniper Oct 28, 2021
259040d
Merge pull request #89 from timothywongej/branch-v1.3-documentation
kdeasymoneysniper Oct 28, 2021
9171ca0
Merge pull request #90 from kdeasymoneysniper/branch-update-UG
kdeasymoneysniper Oct 28, 2021
ca5cbe2
Merge pull request #87 from djiangel/organisation-commands
Shivlock221b Oct 28, 2021
36258d2
fix: bug that clears interaction on append
noobmaster19 Oct 28, 2021
283374a
Merge branch 'AY2122S1-CS2103T-W10-3:master' into master
noobmaster19 Oct 28, 2021
98372d2
fix: linting issue
noobmaster19 Oct 28, 2021
aa553fa
Merge branch 'master' of https://github.com/noobmaster19/tp
noobmaster19 Oct 28, 2021
b9df50e
Testing for filter
Oct 28, 2021
a88a4e4
Testing bugs fixed
Oct 28, 2021
ffee493
Merge pull request #91 from noobmaster19/master
timothywongej Oct 28, 2021
b985b29
Merge pull request #92 from Shivlock221b/branch-FilterTest
Shivlock221b Oct 28, 2021
6f7a4fc
Displays the last viewed contact on the right side at all times
kdeasymoneysniper Oct 28, 2021
95ce73c
GUI: organisation GUI enhancement
Oct 28, 2021
b5d4e25
Update vertical flex and height in MainWindow.fxml
timothywongej Oct 28, 2021
9815586
Update GUI for PersonCard
timothywongej Oct 28, 2021
9cbaad9
Merge pull request #95 from kdeasymoneysniper/branch-v1.3b
timothywongej Oct 28, 2021
0827af2
organisation-changes
djiangel Oct 28, 2021
e267186
s
noobmaster19 Oct 28, 2021
aa93143
Merge pull request #96 from Shivlock221b/branch-GUI-Organisation
djiangel Oct 28, 2021
ed9ebfd
Merge pull request #98 from timothywongej/branch-v1.3-gui
djiangel Oct 28, 2021
188a209
s
noobmaster19 Oct 28, 2021
8e282b3
Merge pull request #99 from djiangel/organisation-changes
timothywongej Oct 28, 2021
fcfd3d5
GUI: Person view in organisation
Oct 28, 2021
7bb31eb
Merge branch 'AY2122S1-CS2103T-W10-3:master' into branch-GUI-Organisa…
Shivlock221b Oct 28, 2021
8763737
ug-changes
djiangel Oct 28, 2021
1442263
Merge pull request #101 from Shivlock221b/branch-GUI-Organisation
djiangel Oct 28, 2021
503405f
Merge pull request #102 from djiangel/ug-changes
Shivlock221b Oct 28, 2021
efc1b19
s
noobmaster19 Oct 28, 2021
3a5819c
init
noobmaster19 Oct 28, 2021
f3d41f3
gui-changes
djiangel Oct 28, 2021
d2202b8
Fixed cases when last viewed person disappears
kdeasymoneysniper Oct 28, 2021
3545948
Merge pull request #104 from kdeasymoneysniper/master
djiangel Oct 28, 2021
e960dd5
Add column headers to GUI
timothywongej Oct 28, 2021
f4c4e4e
Merge pull request #100 from noobmaster19/master
djiangel Oct 28, 2021
d26ed76
fix: test
noobmaster19 Oct 28, 2021
0351e6c
Merge pull request #103 from djiangel/gui-changes
kdeasymoneysniper Oct 28, 2021
b3968fb
Merge pull request #2 from noobmaster19/test-feat
noobmaster19 Oct 28, 2021
22fbda7
Merge pull request #105 from noobmaster19/master
kdeasymoneysniper Oct 28, 2021
ef22ed5
docs
noobmaster19 Oct 28, 2021
5dd5b1c
Merge branch 'AY2122S1-CS2103T-W10-3:master' into master
noobmaster19 Oct 28, 2021
137b062
safety check
noobmaster19 Oct 28, 2021
90768ba
Merge branch 'master' of https://github.com/noobmaster19/tp
noobmaster19 Oct 28, 2021
df30825
Added GUI for compatibility field
kdeasymoneysniper Oct 28, 2021
53eb7c6
fix: bug where only compat is selected
noobmaster19 Oct 28, 2021
40438e8
Merge pull request #106 from timothywongej/branch-v1.3-gui
djiangel Oct 28, 2021
ce28c17
Fixed checkstyle issue
kdeasymoneysniper Oct 28, 2021
e00c3e6
UG update final
Oct 28, 2021
19d5257
Merge pull request #107 from noobmaster19/master
djiangel Oct 28, 2021
e73702b
Merge pull request #108 from kdeasymoneysniper/master
djiangel Oct 28, 2021
8db5709
Fixed Optional bug for GUI
kdeasymoneysniper Oct 28, 2021
cbad61d
Merge pull request #110 from kdeasymoneysniper/master
djiangel Oct 28, 2021
71e5d36
Update UG
Oct 28, 2021
eeaee92
Merge pull request #109 from Shivlock221b/branch-UG-Update
kdeasymoneysniper Oct 28, 2021
e031fb5
UG update
Oct 28, 2021
106df4d
Merge branch 'master' into branch-v1.3-documentation
timothywongej Oct 28, 2021
27110cd
Merge pull request #111 from Shivlock221b/branch-UG-Update
djiangel Oct 28, 2021
757eeaa
Format UserGuide.md for v1.3
timothywongej Oct 28, 2021
92109fb
Merge branch 'master' into branch-v1.3-documentation
timothywongej Oct 28, 2021
77c10ff
Merge pull request #112 from timothywongej/branch-v1.3-documentation
djiangel Oct 28, 2021
27c5ae8
Final Update
Oct 28, 2021
c105493
final update 2
Oct 28, 2021
bd3b679
Minor change in UG
Oct 28, 2021
9750363
Merge pull request #113 from Shivlock221b/branch-FinalUpdate
timothywongej Oct 28, 2021
ba13ddd
Update index.md with latest Ui.png
timothywongej Oct 28, 2021
4d9c4d4
Merge branch 'branch-v1.3-documentation' of https://github.com/timoth…
timothywongej Oct 28, 2021
4c22647
Merge pull request #114 from timothywongej/branch-v1.3-documentation
timothywongej Oct 29, 2021
0cc5df2
Rename OrganisationLIstCard.fxml to OrganisationListCard.fxml
Shivlock221b Oct 29, 2021
178efaa
fix-name
djiangel Oct 29, 2021
6e02e41
Merge pull request #115 from AY2122S1-CS2103T-W10-3/Shivlock221b-patch-1
noobmaster19 Oct 29, 2021
03212c2
organisation-fix
djiangel Oct 29, 2021
f7d263e
Merge branch 'master' into organisation-fix
djiangel Oct 29, 2021
6db3e25
Merge pull request #117 from djiangel/organisation-fix
noobmaster19 Oct 29, 2021
3ba716e
Fix PED issues for UG
timothywongej Nov 2, 2021
c2b715c
Add punctuation, closes #170
timothywongej Nov 2, 2021
d51586d
Update correct message usage for 'add' command
timothywongej Nov 2, 2021
fce7cc2
Solve validation bug for Framework data field
timothywongej Nov 2, 2021
d96d02c
Update code quality in Framework.java
timothywongej Nov 2, 2021
ec8a24f
Update 'add' command and add supporting information
timothywongej Nov 2, 2021
e744d96
Add info on sorting of data fields
timothywongej Nov 2, 2021
871189e
Solve Tag validation regex with 30 char limit
timothywongej Nov 2, 2021
b5f7959
Update data field table in UserGuide.md
timothywongej Nov 2, 2021
cdee7eb
Update default storage and log file path
timothywongej Nov 3, 2021
286ad09
Merge pull request #172 from timothywongej/branch-v1.4-bugs
Shivlock221b Nov 3, 2021
6dcce28
addtoorg-errormsg
djiangel Nov 3, 2021
e45fc01
deletefromorg-errormsg-example
djiangel Nov 3, 2021
3849df2
checkstyle changes
djiangel Nov 3, 2021
2821f13
checkstyle changes
djiangel Nov 3, 2021
64a44ae
checkstyle changes
djiangel Nov 3, 2021
1b2c35c
Merge pull request #174 from djiangel/addtoorg-errormsg
kdeasymoneysniper Nov 3, 2021
770f439
Merge pull request #175 from djiangel/deletefromorg-errormsg-example
kdeasymoneysniper Nov 3, 2021
3738199
addtoorg-duplicate
djiangel Nov 3, 2021
dd1a115
deleteorg-usage
djiangel Nov 3, 2021
d8e71b5
sort- caseinsensitive
djiangel Nov 3, 2021
8e2bfa7
Merge pull request #176 from djiangel/addtoorg-duplicate
kdeasymoneysniper Nov 3, 2021
b2df1ed
Merge pull request #177 from djiangel/deleteorg-usage
kdeasymoneysniper Nov 3, 2021
bf235b6
Merge pull request #178 from djiangel/sort-caseinsensitive
kdeasymoneysniper Nov 3, 2021
0795044
Maximises app to screen size by default.
kdeasymoneysniper Nov 3, 2021
5c55741
Fixed issues regarding spelling errors and image errors
kdeasymoneysniper Nov 3, 2021
f2463c2
Merge pull request #180 from kdeasymoneysniper/branch-documentation
djiangel Nov 3, 2021
dd61883
fix: [PE-D] Edit command with compatibility issue #168
noobmaster19 Nov 4, 2021
5e7737d
fix: compatability -> comptibility
noobmaster19 Nov 4, 2021
bd93396
fix: [PE-D] Incorrect display for Compatibility #162
noobmaster19 Nov 4, 2021
94a55b0
fix: [PE-D] Error message not shown for incorrect Interaction inputs …
noobmaster19 Nov 4, 2021
f9ebf07
fix: linting issues
noobmaster19 Nov 4, 2021
25f3aa4
fix: [PE-D] Add command inconsistency in UG, optional fields #132
noobmaster19 Nov 4, 2021
2683a7f
[PE-D] Unclear what compatibility is meant to represent #138
noobmaster19 Nov 4, 2021
e9881d2
Merge pull request #181 from noobmaster19/master
kdeasymoneysniper Nov 4, 2021
ee49867
PED Filter bugs resolved
Nov 5, 2021
98871c2
Merge pull request #182 from Shivlock221b/branch-PED-Filter
djiangel Nov 5, 2021
8204d7f
ugdg
noobmaster19 Nov 5, 2021
8c3e22e
Merge branch 'AY2122S1-CS2103T-W10-3:master' into master
noobmaster19 Nov 5, 2021
d4cfe74
Merge pull request #183 from noobmaster19/master
kdeasymoneysniper Nov 5, 2021
ba01fd5
Updated UG and PPP
kdeasymoneysniper Nov 5, 2021
0669c11
Fixed checkstyle issues
kdeasymoneysniper Nov 5, 2021
7dadfdc
Fixed checkstyle issues 2
kdeasymoneysniper Nov 5, 2021
f4eccee
Merge pull request #184 from kdeasymoneysniper/master
kdeasymoneysniper Nov 5, 2021
a4e5829
ug-ppp-changes
djiangel Nov 6, 2021
06e8a49
edit-delete-updatesOrganisation
djiangel Nov 6, 2021
df7109a
Merge pull request #185 from djiangel/ug-ppp-changes
Shivlock221b Nov 6, 2021
691335c
Merge pull request #186 from djiangel/edit-delete-updatesOrganisation
Shivlock221b Nov 6, 2021
dc53a68
Update PPP in timothywong.md
timothywongej Nov 7, 2021
93d88ee
Update UserGuide.md to fix conflicts in earlier PR
timothywongej Nov 7, 2021
5437343
Fix 'remove' command bug due to accidental deletion
timothywongej Nov 7, 2021
ad2305b
Refactor 'append' command to improve code quality
timothywongej Nov 7, 2021
c12cd5b
Merge pull request #187 from timothywongej/branch-v1.4-bugs
Shivlock221b Nov 7, 2021
fa39bf9
DG changes and PPP Update
Nov 7, 2021
97d7164
Bug fixed
Nov 7, 2021
fb2f8fa
Update sample data for new user
timothywongej Nov 8, 2021
00ef60d
Update code quality in SampleDataUtil.java
timothywongej Nov 8, 2021
ba50c9b
Merge pull request #188 from Shivlock221b/branch-DG-PPP-Update
Shivlock221b Nov 8, 2021
6e22fba
Merge pull request #189 from timothywongej/branch-v1.4-bugs
Shivlock221b Nov 8, 2021
9f8dbb0
Update Developer Guide for View feature implementation and use cases.
kdeasymoneysniper Nov 8, 2021
7ac2455
dg-changes
djiangel Nov 8, 2021
9830276
dg-changes
djiangel Nov 8, 2021
7bd68ae
Merge pull request #190 from kdeasymoneysniper/master
djiangel Nov 8, 2021
affb15b
Merge pull request #191 from djiangel/dg-changes
kdeasymoneysniper Nov 8, 2021
54b93f1
Update Model class diagrams for Developer Guide
timothywongej Nov 8, 2021
f559d08
Update DeveloperGuide.md for v1.4
timothywongej Nov 8, 2021
3c87705
Add Append command diagrams for Developer Guide
timothywongej Nov 8, 2021
f4d7bf3
Merge branch 'master' into branch-v1.4-bugs
timothywongej Nov 8, 2021
6b934ae
Merge pull request #192 from timothywongej/branch-v1.4-bugs
kdeasymoneysniper Nov 8, 2021
4759c2a
Merge branch 'master' into branch-v1.4-bugs
timothywongej Nov 8, 2021
b39a556
Update User Stories in DG
kdeasymoneysniper Nov 8, 2021
37c383d
Merge branch 'master' into master
kdeasymoneysniper Nov 8, 2021
21803b2
Update and format DeveloperGuide.md
timothywongej Nov 8, 2021
0450b22
Merge pull request #193 from kdeasymoneysniper/master
timothywongej Nov 8, 2021
ef249d3
Merge pull request #194 from timothywongej/branch-v1.4-bugs
djiangel Nov 8, 2021
b47ae9c
UG/DG screenshot update
Nov 8, 2021
8327062
docs: update UG w screenshot
noobmaster19 Nov 8, 2021
c210703
s
noobmaster19 Nov 8, 2021
be75586
Merge pull request #195 from Shivlock221b/branch-UG/DG-Image-Update
kdeasymoneysniper Nov 8, 2021
59a3e7b
s
noobmaster19 Nov 8, 2021
5a065fd
change pic
noobmaster19 Nov 8, 2021
3ead31c
Added Use case for filter
Nov 8, 2021
8c05ee1
removed space
noobmaster19 Nov 8, 2021
b0fc9ee
Merge pull request #196 from noobmaster19/master
kdeasymoneysniper Nov 8, 2021
49d46e6
Merge pull request #197 from Shivlock221b/branch-Filter-DG-Update
kdeasymoneysniper Nov 8, 2021
d4cbe19
ug-updates
djiangel Nov 8, 2021
783edfa
Merge pull request #198 from djiangel/ug-updates
kdeasymoneysniper Nov 8, 2021
f1cc496
Add updates example images for UserGuide.md
timothywongej Nov 8, 2021
428947f
Update UserGuide.md with example images
timothywongej Nov 8, 2021
65508cc
Update navigable links
timothywongej Nov 8, 2021
d7c8579
Update navigable links
timothywongej Nov 8, 2021
8b7ef26
Merge branch 'AY2122S1-CS2103T-W10-3:master' into master
timothywongej Nov 8, 2021
331f7b6
Merge pull request #199 from timothywongej/master
Shivlock221b Nov 8, 2021
638147a
Update PPP with developer guide updates
timothywongej Nov 8, 2021
13e0a7d
Merge pull request #200 from timothywongej/branch-v1.4-portfolio
Shivlock221b Nov 8, 2021
726915c
Reduce word cound to fit 2 pages
timothywongej Nov 8, 2021
9c39dbd
Update images for UserGuide.md
timothywongej Nov 8, 2021
5cc58aa
Update navigable links in index.md
timothywongej Nov 8, 2021
49c6fd0
Refactor and format UserGuide.md
timothywongej Nov 8, 2021
0bae051
Merge pull request #201 from timothywongej/branch-v1.4-portfolio
Shivlock221b Nov 8, 2021
47ce556
Refactor DeveloperGuide.md
timothywongej Nov 8, 2021
56c830f
Added PPP to AboutUs
Nov 8, 2021
6000310
Update AboutUs.md email
timothywongej Nov 8, 2021
ee3bf93
Merge pull request #203 from Shivlock221b/branch-PPP-Update
timothywongej Nov 8, 2021
81d014c
Merge pull request #202 from timothywongej/branch-v1.4-final
Shivlock221b Nov 8, 2021
f7a6b5f
final-change
djiangel Nov 8, 2021
f239ce2
Merge branch 'master' into final-change
djiangel Nov 8, 2021
aac5413
Merge pull request #204 from djiangel/final-change
kdeasymoneysniper Nov 8, 2021
1aa5e20
Updated interaction screenshot for UG
kdeasymoneysniper Nov 8, 2021
c15dec7
Merge pull request #205 from kdeasymoneysniper/master
djiangel Nov 8, 2021
ab34601
Add pagebreak for pdf conversion
timothywongej Nov 8, 2021
804627d
Editted DG
kdeasymoneysniper Nov 8, 2021
1cc1365
Update uses of 'person' to 'contact'
timothywongej Nov 8, 2021
26bd2fc
Merge pull request #206 from timothywongej/branch-v1.4-pagebreak
djiangel Nov 8, 2021
f9ed44a
Merge pull request #207 from kdeasymoneysniper/master
djiangel Nov 8, 2021
b4e2c38
Helping my teammate rename his file so it links properly
kdeasymoneysniper Nov 8, 2021
2f9eefc
Product name change in PPP
Nov 8, 2021
8c63f79
Changed PPP file names to github username
kdeasymoneysniper Nov 8, 2021
44e1fb5
Merge pull request #209 from Shivlock221b/branch-PPP-Product-Name
timothywongej Nov 8, 2021
4b5ee15
Merge pull request #208 from kdeasymoneysniper/master
timothywongej Nov 8, 2021
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
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ private static Person createEditedPerson(Person personToEdit, EditPersonDescript
Set<Remark> updatedRemarks = editPersonDescriptor.getRemarks().orElse(personToEdit.getRemarks());

return new Person(updatedName, updatedEmail, updatedFaculty, updatedMajor,
updatedSkills, updatedLanguages, updatedFrameworks, updatedTags, updatedRemarks);
updatedSkills, updatedLanguages, updatedFrameworks, updatedTags,
updatedRemarks, personToEdit.getInteractions());
}

@Override
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/seedu/address/model/interaction/Interaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ public class Interaction {
public final LocalDate date;

/**
* Constructs a {@code Tag}.
* @param tagName A valid tag name.
* Constructs a {@code Interaction}.
* @param description A valid interaction description.
* @param date A valid date string
*/
public Interaction(String description, String date) {
requireNonNull(description);
Expand All @@ -29,6 +30,17 @@ public Interaction(String description, String date) {
this.description = description;
}

/**
* Constructs a {@code Interaction}.
* @param description A valid interaction description.
*/
public Interaction(String description) {
requireNonNull(description);
this.date = LocalDate.now();
this.description = description;
}


/**
* Returns true if a given string is a valid tag name.
*/
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/seedu/address/model/util/SampleDataUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import seedu.address.model.AddressBook;
import seedu.address.model.ReadOnlyAddressBook;
import seedu.address.model.interaction.Interaction;
import seedu.address.model.person.Email;
import seedu.address.model.person.Faculty;
import seedu.address.model.person.Major;
Expand Down Expand Up @@ -82,6 +83,15 @@ public static Set<Language> getLanguageSet(String... strings) {
.collect(Collectors.toSet());
}

/**
* Returns a tag set containing the list of strings given.
*/
public static Set<Interaction> getInteractionSet(String... description) {
return Arrays.stream(description)
.map(Interaction::new)
.collect(Collectors.toSet());
}

/**
* Returns a framework set containing the list of strings given.
*/
Expand Down
46 changes: 46 additions & 0 deletions src/main/java/seedu/address/storage/JsonAdaptedInteractions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package seedu.address.storage;

import java.time.LocalDate;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import seedu.address.model.interaction.Interaction;

/**
* Jackson-friendly version of {@link Interaction}.
*/
class JsonAdaptedInteractions {

public final String description;
public final LocalDate date;
/**
* Constructs a {@code JsonAdaptedInteraction} with the given
* {@code description} and {@code date}.
*/
@JsonCreator
public JsonAdaptedInteractions(@JsonProperty("description") String description,
@JsonProperty("date") LocalDate date) {
this.description = description;
this.date = date;
}

/**
* Converts a given {@code Tag} into this class for Jackson use.
*/
public JsonAdaptedInteractions(Interaction source) {
System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
this.description = source.description;
this.date = source.date;
}

/**
* Converts this Jackson-friendly adapted tag object into the model's {@code Tag} object.
*
* @throws IllegalValueException if there were any data constraints violated in the adapted tag.
*/
public Interaction toModelType() {
System.out.println("INSIDE toModelTYPE@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
return new Interaction(description, date.toString());
}
}
23 changes: 20 additions & 3 deletions src/main/java/seedu/address/storage/JsonAdaptedPerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.model.interaction.Interaction;
import seedu.address.model.person.Email;
import seedu.address.model.person.Faculty;
import seedu.address.model.person.Major;
Expand Down Expand Up @@ -38,6 +39,7 @@ class JsonAdaptedPerson {
private final List<JsonAdaptedFramework> frameworks = new ArrayList<>();
private final List<JsonAdaptedTag> tagged = new ArrayList<>();
private final List<JsonAdaptedRemark> remarks = new ArrayList<>();
private final List<JsonAdaptedInteractions> interactions = new ArrayList<>();

/**
* Constructs a {@code JsonAdaptedPerson} with the given person details.
Expand All @@ -50,7 +52,8 @@ public JsonAdaptedPerson(@JsonProperty("name") String name, @JsonProperty("email
@JsonProperty("languages") List<JsonAdaptedLanguage> languages,
@JsonProperty("frameworks") List<JsonAdaptedFramework> frameworks,
@JsonProperty("tagged") List<JsonAdaptedTag> tagged,
@JsonProperty("remarks") List<JsonAdaptedRemark> remarks) {
@JsonProperty("remarks") List<JsonAdaptedRemark> remarks,
@JsonProperty("interactions") List<JsonAdaptedInteractions> interactions) {
this.name = name;
this.email = email;
this.faculty = faculty;
Expand All @@ -75,6 +78,10 @@ public JsonAdaptedPerson(@JsonProperty("name") String name, @JsonProperty("email
if (remarks != null) {
this.remarks.addAll(remarks);
}

if (interactions != null) {
this.interactions.addAll(interactions);
}
}

/**
Expand Down Expand Up @@ -105,6 +112,10 @@ public JsonAdaptedPerson(Person source) {
remarks.addAll(source.getRemarks().stream()
.map(JsonAdaptedRemark::new)
.collect(Collectors.toList()));

interactions.addAll(source.getInteractions().stream()
.map(JsonAdaptedInteractions::new)
.collect(Collectors.toList()));
}

/**
Expand Down Expand Up @@ -133,6 +144,12 @@ public Person toModelType() throws IllegalValueException {
personTags.add(tag.toModelType());
}

System.out.println(interactions);
final List<Interaction> personInteractions = new ArrayList<>();
for (JsonAdaptedInteractions interaction : interactions) {
personInteractions.add(interaction.toModelType());
}

final List<Remark> personRemarks = new ArrayList<>();
for (JsonAdaptedRemark remark : remarks) {
personRemarks.add(remark.toModelType());
Expand Down Expand Up @@ -175,10 +192,10 @@ public Person toModelType() throws IllegalValueException {
final Set<Framework> modelFrameworks = new HashSet<>(personFrameworks);
final Set<Tag> modelTags = new HashSet<>(personTags);
final Set<Remark> modelRemarks = new HashSet<>(personRemarks);

final Set<Interaction> modelInteractions = new HashSet<>(personInteractions);

return new Person(modelName, modelEmail, modelFaculty, modelMajor,
modelSkills, modelLanguages, modelFrameworks, modelTags, modelRemarks);
modelSkills, modelLanguages, modelFrameworks, modelTags, modelRemarks, modelInteractions);
}

}
18 changes: 9 additions & 9 deletions src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,31 @@ public void toModelType_validPersonDetails_returnsPerson() throws Exception {
public void toModelType_invalidName_throwsIllegalValueException() {
JsonAdaptedPerson person =
new JsonAdaptedPerson(INVALID_NAME, VALID_EMAIL, VALID_FACULTY, VALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = Name.MESSAGE_CONSTRAINTS;
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}

@Test
public void toModelType_nullName_throwsIllegalValueException() {
JsonAdaptedPerson person = new JsonAdaptedPerson(null, VALID_EMAIL, VALID_FACULTY, VALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}

@Test
public void toModelType_invalidEmail_throwsIllegalValueException() {
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, INVALID_EMAIL, VALID_FACULTY, VALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = Email.MESSAGE_CONSTRAINTS;
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}

@Test
public void toModelType_nullEmail_throwsIllegalValueException() {
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, null, VALID_FACULTY, VALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -88,7 +88,7 @@ public void toModelType_nullEmail_throwsIllegalValueException() {
public void toModelType_invalidFaculty_throwsIllegalValueException() {
JsonAdaptedPerson person =
new JsonAdaptedPerson(VALID_NAME, VALID_EMAIL, INVALID_FACULTY, VALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = Faculty.MESSAGE_CONSTRAINTS;
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -97,7 +97,7 @@ public void toModelType_invalidFaculty_throwsIllegalValueException() {
public void toModelType_nullFaculty_throwsIllegalValueException() {
JsonAdaptedPerson person =
new JsonAdaptedPerson(VALID_NAME, VALID_EMAIL, null, VALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Faculty.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -106,7 +106,7 @@ public void toModelType_nullFaculty_throwsIllegalValueException() {
public void toModelType_invalidMajor_throwsIllegalValueException() {
JsonAdaptedPerson person =
new JsonAdaptedPerson(VALID_NAME, VALID_EMAIL, VALID_FACULTY, INVALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = Major.MESSAGE_CONSTRAINTS;
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -115,7 +115,7 @@ public void toModelType_invalidMajor_throwsIllegalValueException() {
public void toModelType_nullMajor_throwsIllegalValueException() {
JsonAdaptedPerson person =
new JsonAdaptedPerson(VALID_NAME, VALID_EMAIL, VALID_FACULTY, null,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, VALID_TAGS, VALID_REMARKS, null);
String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Major.class.getSimpleName());
assertThrows(IllegalValueException.class, expectedMessage, person::toModelType);
}
Expand All @@ -126,7 +126,7 @@ public void toModelType_invalidTags_throwsIllegalValueException() {
List<JsonAdaptedTag> invalidTags = new ArrayList<>(VALID_TAGS);
invalidTags.add(new JsonAdaptedTag(INVALID_TAG));
JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_EMAIL, VALID_FACULTY, VALID_MAJOR,
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, invalidTags, VALID_REMARKS);
VALID_SKILLS, VALID_LANGUAGES, VALID_FRAMEWORK, invalidTags, VALID_REMARKS, null);
assertThrows(IllegalValueException.class, person::toModelType);
}

Expand Down