Skip to content

isabella232/contoso-airlines-spfx-sample

 
 

Repository files navigation

Contoso Airlines Flight Team Badge WebPart

WORK IN PROGRESS

This sample uses the SharePoint Framework and Microsoft Graph to build a visual display of the members of a flight crew and their "badge" status.

Setup

After cloning this repository, run npm install to install dependencies. Then follow the steps in Deploy the solution and grant permissions.

After deploying the web part, you can add it to SharePoint pages in a team site to see it in action. It will list all users in the team.

To add badge data to users, use Graph Explorer to add an open extension to the user. The request takes the following format:

POST https://graph.microsoft.com/v1.0/users/{user-id}/extensions

{
  "@odata.type": "microsoft.graph.openTypeExtension",
  "extensionName": "com.contoso.badgeData",
  "statusBadges": [
    "first-aid"
  ],
  "progressBadges": [
    {
      "name": "flights",
      "count": 98
    },
    {
      "name": "customer-kudos",
      "count": 1
    },
    {
      "name": "on-time",
      "count": 70
    }
  ]
}

About

A sample SPFX WebPart that consumes the MIcrosoft Graph to display user information.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 88.5%
  • CSS 9.1%
  • JavaScript 2.4%