pages/job-feedback.ps1
New-UDPage -Url 'job-feedback/:jobId' -Endpoint { $Feedback = (Get-UAJobFeedback -JobId $JobId) | Where-Object Complete -eq $false if ($null -eq $Feedback) { New-UDHeading -Text "This job does not require feedback." } else { New-UDInput -Title $Feedback.Message -Endpoint { param($Response) Set-UAJobFeedback -JobFeedback $Feedback -Response $Response New-UDInputAction -Content { New-UDHeading -Text "Feedback received!" } } } } |