Merge pull request #1985 from PathToSharePoint/main
This commit is contained in:
commit
63b46bf6d8
|
@ -48,6 +48,7 @@ React-Groups-Teams | [Alison Collins](https://github.com/ReactIntern) |
|
|||
| Version | Date | Comments |
|
||||
| ------- | ---------------- | --------------- |
|
||||
| 1.0.0 | April 16, 2021 | Initial release |
|
||||
| 1.0.1 | August 1, 2021 | Fixed references to Office.com |
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"Web part pulls all Microsoft 365 Groups and Teams that the logged in user has access to view."
|
||||
],
|
||||
"creationDateTime": "2021-05-06",
|
||||
"updateDateTime": "2021-05-06",
|
||||
"updateDateTime": "2021-08-01",
|
||||
"products": [
|
||||
"SharePoint",
|
||||
"Office"
|
||||
|
@ -55,14 +55,19 @@
|
|||
"gitHubAccount": "ReactIntern",
|
||||
"pictureUrl": "https://github.com/ReactIntern.png",
|
||||
"name": "Alison Collins"
|
||||
},
|
||||
{
|
||||
"gitHubAccount": "PathToSharePoint",
|
||||
"pictureUrl": "https://github.com/PathToSharePoint.png",
|
||||
"name": "Christophe Humbert"
|
||||
}
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"name": "Build your first SharePoint client-side web part",
|
||||
"description": "Client-side web parts are client-side components that run in the context of a SharePoint page. Client-side web parts can be deployed to SharePoint environments that support the SharePoint Framework. You can also use modern JavaScript web frameworks, tools, and libraries to build them.",
|
||||
"url": "https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part"
|
||||
"url": "https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"solution": {
|
||||
"name": "react-groups-client-side-solution",
|
||||
"id": "e562b13d-7e90-4a1e-810c-ccde0ff27866",
|
||||
"version": "1.0.0.0",
|
||||
"version": "1.0.1.0",
|
||||
"includeClientSideAssets": true,
|
||||
"skipFeatureDeployment": true,
|
||||
"isDomainIsolated": false,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-groups",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.1",
|
||||
"private": true,
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
|
|
|
@ -35,7 +35,9 @@ export default class MicrosoftGroups extends React.Component<IGraphConsumerProps
|
|||
public _plannerIDs = [];
|
||||
public _arr = [];
|
||||
private graphClient: MSGraphClient = null;
|
||||
public Tenant = this.props.context.pageContext.web.absoluteUrl.split('.')[0].split('//')[1];
|
||||
public webAbsoluteURL: string = this.props.context.pageContext.web.absoluteUrl;
|
||||
public TenantPathname: string = this.webAbsoluteURL.split('//')[1].split('/')[0];
|
||||
public TenantEmail: string = this.props.context.pageContext.user.loginName.split('@')[1];
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.GetPlanner = this.GetPlanner.bind(this);
|
||||
|
@ -96,7 +98,7 @@ export default class MicrosoftGroups extends React.Component<IGraphConsumerProps
|
|||
var ID; results.value.map(Items => {
|
||||
ID = Items.id;
|
||||
});
|
||||
var URL = `https://tasks.office.com/${this.Tenant}.com/EN-US/Home/Planner#/plantaskboard?groupId=${GroupId.Id}&planId=${ID}`;
|
||||
var URL = `https://tasks.office.com/${this.TenantEmail}/EN-US/Home/Planner#/plantaskboard?groupId=${GroupId.Id}&planId=${ID}`;
|
||||
var Planner = { Planner: URL };
|
||||
var Results = Object.assign(GroupId, Planner);
|
||||
GroupId = Results;
|
||||
|
@ -197,13 +199,13 @@ export default class MicrosoftGroups extends React.Component<IGraphConsumerProps
|
|||
Group.Mail = GroupEmailSplit[0];
|
||||
return <div className={styles.rowStyle}>
|
||||
<div className={styles.ToolTipName}>{Group.Name}<span className={styles.ToolTip}>{Group.Description}</span></div>
|
||||
<a className={styles.Center} href={`https://outlook.office365.com/mail/group/${this.Tenant}.com/${Group.Mail.toLowerCase()}/email`}>
|
||||
<a className={styles.Center} href={`https://outlook.office.com/mail/group/${this.TenantEmail}/${Group.Mail.toLowerCase()}/email`}>
|
||||
<Icon className={iconClass} style={{ color: '#087CD7' }} iconName="OutlookLogo"></Icon>
|
||||
</a>
|
||||
<a className={styles.Center} href={`https://${this.Tenant}.sharepoint.com/sites/${Group.Mail}`}>
|
||||
<a className={styles.Center} href={`https://${this.TenantPathname}/sites/${Group.Mail}`}>
|
||||
<Icon className={iconClass} style={{ color: '#068B90' }} iconName="SharePointLogo"></Icon>
|
||||
</a>
|
||||
<a className={styles.Center} href={`https://outlook.office365.com/calendar/group/${this.Tenant}.com/${Group.Name.replace(Replaceregex, '')}/view/week`}>
|
||||
<a className={styles.Center} href={`https://outlook.office.com/calendar/group/${this.TenantEmail}/${Group.Name.replace(Replaceregex, '')}/view/week`}>
|
||||
<Icon className={iconClass} style={{ color: '#119AE2' }} iconName="Calendar"></Icon>
|
||||
</a>
|
||||
|
||||
|
@ -218,13 +220,13 @@ export default class MicrosoftGroups extends React.Component<IGraphConsumerProps
|
|||
Group.Mail = GroupEmailSplit[0];
|
||||
return <div className={styles.rowStyle}>
|
||||
<div className={styles.ToolTipName}>{Group.Name}<span className={styles.ToolTip}>{Group.Description}</span></div>
|
||||
<a className={styles.Center} href={`https://outlook.office365.com/mail/group/${this.Tenant}.com/${Group.Mail.toLowerCase()}/email`}>
|
||||
<a className={styles.Center} href={`https://outlook.office.com/mail/group/${this.TenantEmail}/${Group.Mail.toLowerCase()}/email`}>
|
||||
<Icon className={iconClass} style={{ color: '#087CD7' }} iconName="OutlookLogo"></Icon>
|
||||
</a>
|
||||
<a className={styles.Center} href={`https://${this.Tenant}.sharepoint.com/sites/${Group.Mail}`}>
|
||||
<a className={styles.Center} href={`https://${this.TenantPathname}/sites/${Group.Mail}`}>
|
||||
<Icon className={iconClass} style={{ color: '#068B90' }} iconName="SharePointLogo"></Icon>
|
||||
</a>
|
||||
<a className={styles.Center} href={`https://outlook.office365.com/calendar/group/${this.Tenant}.com/${Group.Name.replace(Replaceregex, '')}/view/week`}>
|
||||
<a className={styles.Center} href={`https://outlook.office.com/calendar/group/${this.TenantEmail}/${Group.Name.replace(Replaceregex, '')}/view/week`}>
|
||||
<Icon className={iconClass} style={{ color: '#119AE2' }} iconName="Calendar"></Icon>
|
||||
</a>
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@ export interface IMyTeamsState {
|
|||
TenantURL: String;
|
||||
}
|
||||
export default class MyTeams extends React.Component<IMyTeamsProps, IMyTeamsState> {
|
||||
public Tenant = this.props.context.pageContext.web.absoluteUrl.split('.')[0].split('//')[1];
|
||||
public webAbsoluteURL: string = this.props.context.pageContext.web.absoluteUrl;
|
||||
public TenantPathname: string = this.webAbsoluteURL.split('//')[1].split('/')[0];
|
||||
public TenantEmail: string = this.props.context.pageContext.user.loginName.split('@')[1];
|
||||
private graphClient: MSGraphClient = null;
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
@ -67,7 +69,7 @@ export default class MyTeams extends React.Component<IMyTeamsProps, IMyTeamsStat
|
|||
var ID; results.value.map(Items => {
|
||||
ID = Items.id;
|
||||
});
|
||||
var URL = `https://tasks.office.com/${this.Tenant}.com/EN-US/Home/Planner#/plantaskboard?groupId=${GroupId.Id}&planId=${ID}`;
|
||||
var URL = `https://tasks.office.com/${this.TenantEmail}/EN-US/Home/Planner#/plantaskboard?groupId=${GroupId.Id}&planId=${ID}`;
|
||||
var Planner = { Planner: URL };
|
||||
var Results = Object.assign(GroupId, Planner);
|
||||
GroupId = Results;
|
||||
|
@ -176,12 +178,12 @@ export default class MyTeams extends React.Component<IMyTeamsProps, IMyTeamsStat
|
|||
return (
|
||||
<div className={styles.rowStyle}>
|
||||
<div className={styles.ToolTipName}>{Team.Name}<span className={styles.ToolTip}>{Team.Description}</span></div>
|
||||
<a className={styles.Center} href={`https://outlook.office365.com/mail/group/${this.Tenant}.com/${Mail.toLowerCase()}/email`}>
|
||||
<a className={styles.Center} href={`https://outlook.office.com/mail/group/${this.TenantEmail}/${Mail.toLowerCase()}/email`}>
|
||||
<Icon className={iconClass} style={{ color: '#087CD7' }} iconName="OutlookLogo"></Icon></a>
|
||||
<a className={styles.Center} href={`https://${this.Tenant}.sharepoint.com/sites/${Mail}`}>
|
||||
<a className={styles.Center} href={`https://${this.TenantPathname}/sites/${Mail}`}>
|
||||
<Icon className={iconClass} style={{ color: '#068B90' }} iconName="SharePointLogo"></Icon>
|
||||
</a>
|
||||
<a className={styles.Center} href={`https://outlook.office365.com/calendar/group/${this.Tenant}.com/${Team.Name.replace(Replaceregex, '')}/view/week`}>
|
||||
<a className={styles.Center} href={`https://outlook.office.com/calendar/group/${this.TenantEmail}/${Team.Name.replace(Replaceregex, '')}/view/week`}>
|
||||
<Icon className={iconClass} style={{ color: '#119AE2' }} iconName="Calendar"></Icon>
|
||||
</a>
|
||||
<div className={styles.Center}>
|
||||
|
@ -197,4 +199,4 @@ export default class MyTeams extends React.Component<IMyTeamsProps, IMyTeamsStat
|
|||
);
|
||||
})}</div></div>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue