This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const element: React.ReactElement<IHardwareRequestFormProps > = React.createElement( | |
HardwareRequestForm, | |
{ | |
description: this.properties.description, | |
httpClient: this.context.httpClient | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
import { HardwareRequestProxyService,AzureFunctionSiteUrl } from "../../../services/HardwareRequestProxyService"; | |
//... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
private executeOrDelayUntilAuthenticated(action: Function): void { | |
if (this.authenticated) { | |
action(); | |
} else { | |
setTimeout(() => { | |
this.executeOrDelayUntilAuthenticated(action); | |
}, 1000); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public render(): React.ReactElement<IHardwareRequestFormProps> { | |
return ( | |
<div className={styles.hardwareRequestForm}> | |
<div className={styles.container}> | |
<iframe src={AzureFunctionSiteUrl} style={{ display: "none" }} onLoad={() => this.authenticated = true} /> | |
<div className={`ms-Grid-row`}> | |
<div className="ms-Grid-col ms-u-lg10 ms-u-xl8 ms-u-xlPush2 ms-u-lgPush1"> | |
<h2>Submit a new Hardware request</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface ITask { | |
Id: number; | |
Title: string; | |
Status: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class KanbanBoardWebPart extends BaseClientSideWebPart<IKanbanBoardWebPartProps> { | |
// .... | |
private statuses: string[] = ["Not Started", "In Progress", "Completed"]; | |
private tasks: ITask[] = [ | |
{ | |
Id: 1, | |
Status: "Not Started", | |
Title: "Task 01" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .... | |
export const LAYOUT_MAX_COLUMNS = 12; | |
export default class KanbanBoardWebPart extends BaseClientSideWebPart<IKanbanBoardWebPartProps> { | |
// .... | |
public render(): void { | |
this._renderBoard(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.kanbanBoard { | |
.container { | |
max-width: 700px; | |
margin: 0px auto; | |
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1); | |
position: relative; | |
background-color: #FEFEFF; | |
padding: 3px; | |
min-height: 500px; | |
overflow-y: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
import { SPComponentLoader } from '@microsoft/sp-loader'; | |
// ... | |
export default class KanbanBoardWebPart extends BaseClientSideWebPart<IKanbanBoardWebPartProps> { | |
// ... | |
constructor() { | |
super(); | |
SPComponentLoader.loadCss('https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css'); | |
} | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface IFieldInfo { | |
Title: string; | |
InternalName: string; | |
TypeAsString: string; | |
Choices?: string[]; | |
} |