Updated Docs

This commit is contained in:
João Mendes 2020-07-28 22:52:26 +01:00
parent 859f97297e
commit 1f9c7f8708
10 changed files with 55 additions and 40 deletions

View File

@ -6,11 +6,17 @@ We can create, edit, delete, directory properties that can be add to profile car
Only users with Tenant Admin Role are allowed to managed profile card properties. Only users with Tenant Admin Role are allowed to managed profile card properties.
## Site Designs List ## Manage Profile Card Properties
![site design list](https://github.com/joaojmendes/sp-dev-fx-webparts/blob/dev/samples/react-manage-sitedesigns/assets/screen1.jpg) ![manageProps](assets/Screenshot1.png)
![manageProps](assets/Screenshot2.png)
![manageProps](assets/Screenshot3.png)
![manageProps](assets/Screenshot4.png)
![manageProps](assets/Screenshot5.png)
@ -59,6 +65,7 @@ Version|Date|Comments
- `gulp bundle --ship` - `gulp bundle --ship`
- `gulp package-solution --ship` - `gulp package-solution --ship`
- `Add to AppCatalog and deploy` - `Add to AppCatalog and deploy`
- approve the required permissions (User.ReadWrite) on SharePoint Admin in App permissions
- approve the required permissions (User.ReadWrite, Directory.AccessAsUser.All) on SharePoint Admin in App permissions
<img src="https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/react-manage-sitedesigns" /> <img src="https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/react-manage-profile-card-properties" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 KiB

View File

@ -11,6 +11,10 @@
{ {
"resource": "Microsoft Graph", "resource": "Microsoft Graph",
"scope": "User.ReadWrite.All" "scope": "User.ReadWrite.All"
},
{
"resource": "Microsoft Graph",
"scope": "Directory.AccessAsUser.All"
} }
] ]
}, },

View File

@ -124,8 +124,8 @@ export default class ManageProfileCardProperties extends React.Component<
name: "Directory Property Name", name: "Directory Property Name",
fieldName: "displayAttribute", fieldName: "displayAttribute",
isResizable: true, isResizable: true,
maxWidth: 160, maxWidth: 210,
minWidth: 50, minWidth: 150,
isSorted: true, isSorted: true,
isSortedDescending: false, isSortedDescending: false,
onColumnClick: this._onColumnClick, onColumnClick: this._onColumnClick,
@ -349,6 +349,12 @@ export default class ManageProfileCardProperties extends React.Component<
this._selection.setAllSelected(false); this._selection.setAllSelected(false);
this.setState({ isLoading: true, hasError: false, errorMessage: null }); this.setState({ isLoading: true, hasError: false, errorMessage: null });
const _listItems = await this._getProfileCardProperties(); const _listItems = await this._getProfileCardProperties();
// update Application context
this.applicationContext = {
...this.applicationContext,
listItems: _listItems,
};
// update State
this.setState({ this.setState({
listItems: _listItems, listItems: _listItems,
selectedItem: undefined, selectedItem: undefined,
@ -364,9 +370,8 @@ export default class ManageProfileCardProperties extends React.Component<
displayNewPanel: false, displayNewPanel: false,
displayDeletePanel: false, displayDeletePanel: false,
}); });
this._selection.setAllSelected(false); // refresh List
const _listItems = await this._getProfileCardProperties(); await this._onRefresh();
this.setState({ listItems: _listItems, selectedItem: undefined });
} else { } else {
this.setState({ this.setState({
displayEditPanel: false, displayEditPanel: false,

View File

@ -20,7 +20,7 @@
"group": { "default": "Other" }, "group": { "default": "Other" },
"title": { "default": "Manage Profile Card Properties" }, "title": { "default": "Manage Profile Card Properties" },
"description": { "default": "Manage Profile Card Properties" }, "description": { "default": "Manage Profile Card Properties" },
"officeFabricIconFontName": "Page", "officeFabricIconFontName": "TaskManager",
"properties": { "properties": {
"title": "Manage Profile Card Properties" "title": "Manage Profile Card Properties"
} }

View File

@ -1,30 +1,29 @@
{ {
"extends": "@microsoft/sp-tslint-rules/base-tslint.json", "extends": "@microsoft/sp-tslint-rules/base-tslint.json",
"rules": { "rules": {
"class-name": false, "class-name": false,
"export-name": false, "export-name": false,
"forin": false, "forin": false,
"label-position": false, "label-position": false,
"member-access": true, "member-access": true,
"no-arg": false, "no-arg": false,
"no-console": false, "no-console": false,
"no-construct": false, "no-construct": false,
"no-duplicate-variable": true, "no-duplicate-variable": true,
"no-eval": false, "no-eval": false,
"no-function-expression": true, "no-function-expression": true,
"no-internal-module": true, "no-internal-module": true,
"no-shadowed-variable": true, "no-shadowed-variable": true,
"no-switch-case-fall-through": true, "no-switch-case-fall-through": true,
"no-unnecessary-semicolons": true, "no-unnecessary-semicolons": true,
"no-unused-expression": true, "no-unused-expression": true,
"no-use-before-declare": true, "no-with-statement": true,
"no-with-statement": true, "semicolon": true,
"semicolon": true, "trailing-comma": false,
"trailing-comma": false, "typedef": false,
"typedef": false, "typedef-whitespace": false,
"typedef-whitespace": false, "use-named-parameter": true,
"use-named-parameter": true, "variable-name": false,
"variable-name": false, "whitespace": false
"whitespace": false }
} }
}