Skip to content

Commit

Permalink
Microsoft Graph API calls added
Browse files Browse the repository at this point in the history
  • Loading branch information
agzertuche committed Aug 7, 2017
1 parent d405093 commit 8278af3
Show file tree
Hide file tree
Showing 25 changed files with 930 additions and 1,040 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Temporary Items

# Ignore node_modules folder on each webpart
node_modules
debug
solution
3 changes: 1 addition & 2 deletions EmployeeDevelopmentApp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ node_modules
# Build generated files
dist
lib
#solution
debug
solution
temp
*.sppkg

Expand Down
33 changes: 28 additions & 5 deletions EmployeeDevelopmentApp/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,35 @@
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "Local workbench",
"type": "chrome",
"request": "launch",
"name": "Launch Program",
"program": "${file}",
"outFiles": [
"${workspaceRoot}/out/**/*.js"
"url": "https://localhost:4321/temp/workbench.html",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222"
]
},
{
"name": "Hosted workbench",
"type": "chrome",
"request": "launch",
"url": "https://agzertuche.sharepoint.com/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222"
]
}
]
Expand Down
23 changes: 20 additions & 3 deletions EmployeeDevelopmentApp/config/package-solution.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
{
"solution": {
"name": "employee-development-app-client-side-solution",
"name": "employee-development-app",
"id": "f1961b52-5795-45bb-93ae-517b178a68c5",
"version": "1.0.0.1",
"iconPath": "Images/EmployeePerformanceIcon.png"
"version": "1.0.1.0",
"iconPath": "Images/EmployeePerformanceIcon.png",
"features": [{
"title": "employee-development-app-assets",
"description": "List assets for employee development app",
"id": "523fe887-ced5-4036-b564-8dad5c6c6e24",
"version": "1.0.0.0",
"assets": {
"elementManifests": [
"elements.xml"
],
"elementFiles":[
"employeesListSchema.xml",
"achievementsListSchema.xml",
"earnedAchievementsListSchema.xml",
"performanceSkillsListSchema.xml"
]
}
}]
},
"paths": {
"zippedPackage": "solution/employee-development-app.sppkg"
Expand Down
8 changes: 6 additions & 2 deletions EmployeeDevelopmentApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@types/webpack-env": ">=1.12.1 <1.14.0",
"axios": "^0.16.2",
"chart.js": "^2.6.0",
"msalx": "^0.1.1",
"office-ui-fabric-react": "^4.21.2",
"react": "15.4.2",
"react-chartjs-2": "^2.5.5",
Expand All @@ -25,9 +26,12 @@
"@microsoft/sp-build-web": "~1.1.0",
"@microsoft/sp-module-interfaces": "~1.1.0",
"@microsoft/sp-webpart-workbench": "~1.1.0",
"gulp": "~3.9.1",
"@types/chai": ">=3.4.34 <3.6.0",
"@types/mocha": ">=2.2.33 <2.6.0"
"@types/mocha": ">=2.2.33 <2.6.0",
"enzyme": "2.9.1",
"gulp": "~3.9.1",
"react-addons-test-utils": "15.6.0",
"sinon": "^3.0.0"
},
"scripts": {
"build": "gulp bundle",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<List xmlns:ows="Microsoft SharePoint" Title="Achievements" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/Achievements" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
<MetaData>
<Fields>
<Field
Name="iconName"
DisplayName="Icon Name"
Type="Text"
Required="FALSE"
>
</Field>
<Field
Name="description"
DisplayName="Description"
Type="Text"
Required="FALSE"
>
</Field>
</Fields>
<Views>
<View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">30</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="LinkTitle"></FieldRef>
<FieldRef Name="iconName"></FieldRef>
<FieldRef Name="description"></FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="ID" />
</OrderBy>
</Query>
</View>
</Views>
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
</MetaData>
</List>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<List xmlns:ows="Microsoft SharePoint" Title="Earned Achievements" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/EarnedAchievements" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
<MetaData>
<Fields>
<Field
Name="userPrincipalName"
DisplayName="User Principal Name"
Type="Text"
Required="FALSE"
>
</Field>
<Field
Name="achievementId"
DisplayName="Achievement Id"
Type="Number"
Required="FALSE"
>
</Field>
</Fields>
<Views>
<View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">30</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="userPrincipalName"></FieldRef>
<FieldRef Name="achievementId"></FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="ID" />
</OrderBy>
</Query>
</View>
</Views>
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
</MetaData>
</List>
89 changes: 89 additions & 0 deletions EmployeeDevelopmentApp/sharepoint/assets/elements.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance
CustomSchema="employeesListSchema.xml"
FeatureId="00bfea71-de22-43b2-a848-c05709900100"
Title="Employees"
Description="List to store employees information like: Car, primary contact, cell phone, etc."
TemplateType="100"
Url="Lists/Employees">
<Data>
<Rows>
<Row>
<Field Name="userPrincipalName">userPrincipalName</Field>
<Field Name="birthday">11/12/2017</Field>
<Field Name="emergencyContacts">emergencyContacts</Field>
<Field Name="rewardPoints">24</Field>
<Field Name="hobbies">hobbies</Field>
<Field Name="music">music</Field>
<Field Name="interests">interests</Field>
<Field Name="food">food</Field>
<Field Name="blogs">blogs</Field>
<Field Name="facebook">facebook</Field>
<Field Name="twitter">twitter</Field>
<Field Name="linkedIn">linkedIn</Field>
<Field Name="officeCubicle">officeCubicle</Field>
<Field Name="isHomeOffice">FALSE</Field>
</Row>
</Rows>
</Data>
</ListInstance>

<ListInstance
CustomSchema="achievementsListSchema.xml"
FeatureId="00bfea71-de22-43b2-a848-c05709900100"
Title="Achievements"
Description="List to store all types of achievements for employees."
TemplateType="100"
Url="Lists/Achievements">
<Data>
<Rows>
<Row>
<Field Name="Title">title</Field>
<Field Name="iconName">iconName</Field>
<Field Name="description">description ... </Field>
</Row>
</Rows>
</Data>
</ListInstance>

<ListInstance
CustomSchema="earnedAchievementsListSchema.xml"
FeatureId="00bfea71-de22-43b2-a848-c05709900100"
Title="Earned Achievements"
Description="List to store achievements earned by employees."
TemplateType="100"
Url="Lists/EarnedAchievements">
<Data>
<Rows>
<Row>
<Field Name="userPrincipalName">userPrincipalName</Field>
<Field Name="achievementId">1</Field>
</Row>
</Rows>
</Data>
</ListInstance>

<ListInstance
CustomSchema="performanceSkillsListSchema.xml"
FeatureId="00bfea71-de22-43b2-a848-c05709900100"
Title="Performance Skills"
Description="List to store performance skills evaluations for employees."
TemplateType="100"
Url="Lists/PerformanceSkills">
<Data>
<Rows>
<Row>
<Field Name="userPrincipalName">userPrincipalName</Field>
<Field Name="technicalKnowledge">1</Field>
<Field Name="teamwork">2</Field>
<Field Name="meetingDeadlines">3</Field>
<Field Name="problemSolving">4</Field>
<Field Name="leadership">5</Field>
<Field Name="management">6</Field>
</Row>
</Rows>
</Data>
</ListInstance>

</Elements>
Loading

0 comments on commit 8278af3

Please sign in to comment.