stuartridout/teamlink

Clicking on person icon doesn't show directs and text to show peers not working

digitalanalogue9 opened this issue · 0 comments

Hi Stuart,
I made a couple of tweaks as this didn't seem to return information for me

Screen
Edit Presence and View Any Team
Control
lblNoDirectReports
Method
OnSelect

/*
Set(teamViewParentEmail,Office365Users.ManagerV2(teamViewParentEmail).mail);
Set(teamViewType,"Directs");

ClearCollect(thisTeamList,Office365Users.DirectReportsV2(teamViewParentEmail).value.mail);
ClearCollect(teamViewAvailability,Filter(Presences,Email in thisTeamList.mail));
*/
Set(
    teamViewType,
    "Peers"
);
Clear(thisTeamList);
Patch(
    thisTeamList,
    Defaults(thisTeamList),
    Office365Users.ManagerV2(teamViewParentEmail)
);
ClearCollect(thisTmpTeamList,
    SortByColumns(Office365Users.DirectReportsV2(Office365Users.ManagerV2(teamViewParentEmail).mail).value,"displayName",Ascending)
);
Collect(
    thisTeamList,
    SortByColumns(
        thisTmpTeamList,
        "mail",
        Ascending
    )
);
ClearCollect(
    teamViewAvailability,
    ShowColumns(
        Filter(
            Presences,
            Email in thisTeamList.mail, (Date >= DateAdd(firstDate,TimeZoneOffset(firstDate)*-1,Minutes) && Date <= DateAdd(DateAdd(firstDate,7,Days),TimeZoneOffset(DateAdd(firstDate,7,Days))*-1,Minutes) ) || IsBlank(Date)
        ),
        "cr599_date",
        "cr599_email",
        "cr599_name",
        "cr599_PresentStatus","crbd3_dayvalue"
    )
);
Reset(txtSearchPeopleGrid);

Screen
Edit Presence and View Any Team
Control
imgPersonPhoto_1 and imgNoPhoto
Method
OnSelect

/*
ClearCollect(thisTeamList,Office365Users.DirectReportsV2(teamViewParentEmail).value.mail);
ClearCollect(teamViewAvailability,Filter(Presences,Email in thisTeamList.mail));
*/
ClearCollect(thisTeamList,SortByColumns(Office365Users.DirectReportsV2(teamViewParentEmail).value,"displayName",Ascending));
ClearCollect(teamViewAvailability,ShowColumns(Filter(Presences,Email in thisTeamList.mail, (Date >= DateAdd(firstDate,TimeZoneOffset(firstDate)-1,Minutes) && Date <= DateAdd(DateAdd(firstDate,7,Days),TimeZoneOffset(DateAdd(firstDate,7,Days))*-1,Minutes) ) || IsBlank(Date)),"cr599_date","cr599_email","cr599_name","cr599_PresentStatus","crbd3_dayvalue"));
Reset(txtSearchPeopleGrid);