This file contains hidden or 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
    
  
  
    
  | useEffect(() => { | |
| if (!selectedQuestionId) return; | |
| if (!commentsRaw.data) return; | |
| let newComments = []; | |
| let numComments = 0; | |
| // filter comments by selected question / forum | |
| newComments = commentsRaw.data.filter(comment => { | |
| if ( | |
| comment.parentType == currentCommentType && | 
  
    
      This file contains hidden or 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
    
  
  
    
  | var faker = require("faker"); | |
| export function between(min, max) { | |
| return Math.round(Math.random() * (max - min) + min); | |
| } | |
| const randomPick = arr => { | |
| return arr[Math.floor(Math.random() * arr.length)]; | |
| }; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | let instance = null; | |
| let ColorMap = {}; | |
| export const ColorService = function() { | |
| return { | |
| getInstance: () => { | |
| if (instance != null) return instance; | |
| else { | |
| ColorMap = {}; | |
| instance = { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /** | |
| * Simple for | |
| **/ | |
| var arr = new Array("a","c","c"); | |
| for(var i=0; i<arr.length; i++) { | |
| var value = arr[i]; | |
| alert(i =") "+value); | |
| } | 
  
    
      This file contains hidden or 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 { SPHttpClient } from "@pnp/sp"; | |
| export interface IHttpResponseValue { | |
| parameter: string; | |
| } | |
| export const getServiceUrl = async ( | |
| baseUrl: string, | |
| listName: string, | |
| paramName: string | 
  
    
      This file contains hidden or 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 { WebPartContext } from "@microsoft/sp-webpart-base"; | |
| import { SPHttpClient } from "@microsoft/sp-http"; | |
| export const getUserId = (context: WebPartContext) => { | |
| const payload: string = JSON.stringify({ | |
| logonName: context.pageContext.user.loginName | |
| }); | |
| var postData = { | |
| body: payload | 
  
    
      This file contains hidden or 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 getUrlParameter = (name: string) => { | |
| name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
| var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); | |
| var results = regex.exec(location.search); | |
| return results === null | |
| ? "" | |
| : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
| }; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # Search query examples | |
| ## Search Query Keywords | |
| **Filter by ContentType**`(ContentType:"PLA Prozesslink" OR ContentType:"PLA Fachbereichslink")` | |
| ## Query template | |
  
    
      This file contains hidden or 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
    
  
  
    
  | Disable Ignorecase (changing case marks files as changed). | |
| `git config core.ignorecase false` | |
| Reenable Ignorecase (changing case doesn't mark files as changed) | |
| `git config core.ignorecase true` | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # Debugging in SPFX: | |
| @see: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/debug-modern-pages | |
| ## Debug URL Parameter: | |
| ?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js | |
| _**@note choose correct port**_ | 
OlderNewer