opened
friedaxvictoria
username_0
Before: The user could only view their bookmarked people on the dashboard.

Now: User can switch between their team and bookmarks. If the user doesn't have any bookmarks, the dashboard will automatically display the team and next to the dashboard button it says how to bookmark somebody. Otherwise, the bookmarks are the default view. If the user isn't logged in, there won't be the option to look at the team. 

Open question: Currently, the team is displayed in the following order: supervisor, assistents, employees, and learners. Should we add subheadings to showcase the different groups or leave it the way it is now?
feat(dashboard): Show Team on Dashboard
issue
created
paule96
username_1
there is a bug. If you navigate direct to https://pr-592.demo-phonebook.me/en/dashboard nothing is to see.
comment
created
DanielHabenicht
username_2
already mentioned in my comments ;)
comment
created
paule96
username_1
/azp run T-Systems-MMS.phonebook-preview
comment
created
paule96
username_1
sad demo broken. :) So I can't check the stuff..
comment
created
friedaxvictoria
username_0
For some reason the mock user doesn't work in the preview. The id that I used is a person and can be found in the preview but unfortunately it doesn't register as the user which is the reason why you can't see the team...
comment
created
friedaxvictoria
username_0
@username_2 Do you know how I can define a Mock UserTreeNode[] and not a UserTreeNode to compare with the Mock Person's OrgUnit?
comment
created
DanielHabenicht
username_2
Just use `Partial<UserTreeNode>`
comment
created
friedaxvictoria
username_0
To use it in getNodeForUser(user, organigram, 0), the organigram needs to be a UnitTreeNode[]. It doesn't accept Partial <UnitTreeNode>.
comment
created
DanielHabenicht
username_2
Then just cast it to UserTreeNode:

Your Object `as UserTreeNode[]`
comment
created
friedaxvictoria
username_0
Doesn't really work either. The only version that isn't an error is organigram: UnitTreeNode[] = []. I don't know whether that will work though because there is an error with the user as well. I copied a mock person's data and the data itself seems to be fine but apparently the Person is missing properties (isLearner, isSupervisor, isAssistent, isOfStatus). However, these 'properties' are functions from Person.ts and I can't add them to the Mock Person.
comment
created
paule96
username_1
/azbot
comment
created
paule96
username_1
/az
comment
created
mschwrdtnr
username_3
/azp run T-Systems-MMS.phonebook-preview
comment
created
paule96
username_1
This stuff is broken?

![image](https://user-images.githubusercontent.com/11291885/80919156-d0f42d80-8d68-11ea-985a-28020fdd2b82.png)
comment
created
paule96
username_1
also this switch doesn't working:

![image](https://user-images.githubusercontent.com/11291885/80919162-dea9b300-8d68-11ea-8bcb-f727de22d7e8.png)
comment
created
friedaxvictoria
username_0
@username_1 My cards aren't broken. There is a bit of an issue with the small cards, though. I'll see what I can do about that. 
The switch only works for the booksmarks so far. Should we implement it for the team as well @username_2?
comment
created
friedaxvictoria
username_0
The Layout switch should now be working for the team as well. If you don't want that we can change it back although I would hide the button when the team is on display if this is the case. Otherwise, I think it would get to confusing. 

The cards also shouldn't spread out anymore. Furthermore, I had to add another if-statement to the organigram.service.ts since it only checked the first node of every depth. If the user is in the second or third node, it would return null. @username_2
comment
created
paule96
username_1
no it's looks good 👍 I will start reviewing this code to night.
comment
created
DanielHabenicht
username_2
@username_0 waiting for merge
comment
created
DanielHabenicht
username_2
do you? @username_1
comment
created
friedaxvictoria
username_0
The function getUnitTreeById() has been added and it works when the UnitTreeNodes have been loaded. At the moment, the dashboard is finished loading before the UnitTreeNodes are. Therefore, the getUnitTreeById() is emty and doesn't return the user's UnitTreeNode. It is just a matter of getting the nodes before returning the dashboard.
comment
created
DanielHabenicht
username_2
forgot to push functions are still not there
comment
created
friedaxvictoria
username_0
I added the function and deleted some imports. However, I can’t check in localhost whether everything is all right because I can’t seem to get localhost to work in my browser...
comment
created
DanielHabenicht
username_2
/azp run T-Systems-MMS.phonebook-preview
comment
created
mschwrdtnr
username_3
@username_1 Please test it again locally
comment
created
DanielHabenicht
username_2
/azp run T-Systems-MMS.phonebook-preview
comment
created
paule96
username_1
/azp run T-Systems-MMS.phonebook-preview
comment
created
DanielHabenicht
username_2
Preview is not working at the moment ;(
comment
created
DanielHabenicht
username_2
/azp run T-Systems-MMS.phonebook-preview
comment