fix reference to provisiong script

This commit is contained in:
Tobias Maestrini 2024-02-26 00:35:49 +01:00
parent 0af817155e
commit b670a3cde7
3 changed files with 4 additions and 38 deletions

View File

@ -87,7 +87,7 @@ For manual creation here is what you need:
## Minimal path to awesome
* Clone this repository
* Run the script `CreateLists.ps1` in the [`env-setup` folder](./env-setup/CreateLists.ps1) ([you need pnp-powershell to run this](https://pnp.github.io/powershell/))
* Run the script `CreateLists.ps1` in the [`env-setup` folder](./src/webparts/myTools/env-setup/CreateLists.ps1) ([you need pnp-powershell to run this](https://pnp.github.io/powershell/))
* In your CLI navigate to the solution folder (the folder where this readme file lives)
* in the command-line run:
* `npm install`

View File

@ -1,36 +0,0 @@
# CONNECTING TO ENVIRONMENT
$dev = ""
$test = ""
$prod = ""
$envurl = $dev
Connect-PnPOnline -Interactive -Url $envurl
#Create content types
Add-PnPContentType -Name "ToolItem" -ContentTypeId "0x0100b2a59b27e25341959bc1687f68d1785e" -Group "Custom" -Description "Content type to hold information about the tool"
Add-PnPContentType -Name "PersonalTools" -ContentTypeId "0x01001ba482dd07974a06a154ce8bc0240bed" -Group "Custom" -Description "Content Type to hold info about the current users selected tools"
#Add Fields
Add-PnPField -InternalName "tool_name" -DisplayName "Tool display name" -Type Text -Group "Tools"
Add-PnPField -InternalName "tool_url" -DisplayName "Tool url" -Type Text -Group "Tools"
Add-PnPField -InternalName "tool_username" -DisplayName "User email" -Type Text -Group "Tools"
Add-PnPField -InternalName "tool_usertools" -DisplayName "Personal Tools Settings" -Type Note -Group "Tools"
#Add fields to content type
Add-PnPFieldToContentType -Field "tool_name" -ContentType "ToolItem"
Add-PnPFieldToContentType -Field "tool_url" -ContentType "ToolItem"
#Add fields to content type
Add-PnPFieldToContentType -Field "tool_username" -ContentType "PersonalTools"
Add-PnPFieldToContentType -Field "tool_usertools" -ContentType "PersonalTools"
#Create list and add CT
New-PnPList -Title "AvailableTools" -Url "lists/availabletools" -Template GenericList
Add-PnPContentTypeToList -List "AvailableTools" -ContentType "ToolItem"
Remove-PnPContentTypeFromList -List "AvailableTools" -ContentType "Item"
#Create list and add CT
New-PnPList -Title "PersonalTools" -Url "lists/personaltools" -Template GenericList
Add-PnPContentTypeToList -List "PersonalTools" -ContentType "PersonalTools"
Remove-PnPContentTypeFromList -List "PersonalTools" -ContentType "Item"

View File

@ -27,8 +27,10 @@ Add-PnPFieldToContentType -Field "tool_usertools" -ContentType "PersonalTools"
#Create list and add CT
New-PnPList -Title "AvailableTools" -Url "lists/availabletools" -Template GenericList
Add-PnPContentTypeToList -List "AvailableTools" -ContentType "ToolItem"
Remove-PnPContentTypeFromList -List "AvailableTools" -ContentType "Item"
#Create list and add CT
New-PnPList -Title "PersonalTools" -Url "lists/personaltools" -Template GenericList
Add-PnPContentTypeToList -List "PersonalTools" -ContentType "PersonalTools"
Add-PnPContentTypeToList -List "PersonalTools" -ContentType "PersonalTools"
Remove-PnPContentTypeFromList -List "PersonalTools" -ContentType "Item"