feat: added status next in que and changed forms state machine

This commit is contained in:
Тимур Городецкий
2026-08-05 13:53:26 +05:00
parent 5bc80df11c
commit 571614c031
18 changed files with 373 additions and 68 deletions
+14 -1
View File
@@ -62,7 +62,20 @@ function Add-Column {
param([string]$List, $Col)
if (Test-FieldExists -List $List -InternalName $Col.internalName) {
Write-Host " [=] колонка есть: $($Col.internalName)" -ForegroundColor DarkGray
# Колонка уже есть. Для Choice — досетапливаем варианты (могли добавиться новые
# статусы): существующие значения сохраняются, добавляются недостающие.
if ($Col.type -eq 'Choice' -and $Col.choices) {
try {
Set-PnPField -List $List -Identity $Col.internalName -Values @{ Choices = [string[]]$Col.choices } | Out-Null
Write-Host " [~] варианты обновлены: $($Col.internalName)" -ForegroundColor DarkGray
}
catch {
Write-Warning " [!] $($Col.internalName): не удалось обновить варианты — $($_.Exception.Message)"
}
}
else {
Write-Host " [=] колонка есть: $($Col.internalName)" -ForegroundColor DarkGray
}
return
}