Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- New-UDPage -Name "Detention Page" -AuthorizationPolicy "UserPolicy", "ITPolicy" -Icon ticket -Content {
- New-UDRow {
- New-UDColumn -LargeSize 7 {
- New-UDInput -Title "Student Lookup" -Content {
- New-UDInputField -Name "detSearch" -Type "textbox" -Placeholder "Search for a student"
- } -Endpoint {
- param($detSearch)
- Set-UDElement -Id "detResults" -Content {
- New-UDGrid -Title "Search Results for $detSearch" -Headers @("Name", "Student ID", "House", "Lookup Detentions", "Issue Detentions") -Properties @("Name", "StudentID", "House", "detLookup", "detIssue") -Endpoint {
- $detObjects = $Cache:AllUsers | Where-Object {($_.name -like "*$detSearch*") -or ($_.SamAccountName -like "*$detSearch*") -or ($_.Description -like "*$detSearch*")}
- $detObjects | ForEach-Object {
- [PSCustomObject]@{
- Name = $_.Name
- StudentID = $_.Description
- House = $_.St
- detLookup = $_.detLookup
- detIssue = $_.detIssue
- }
- } | Out-UDGridData
- }
- }
- }
- New-UDElement -Tag "div" -Attributes @{
- style = @{
- height = '25px'
- }
- }
- New-UDRow -Columns {
- New-UDColumn -SmallSize 10 -SmallOffset 1 {
- New-UDElement -Tag "div" -Id "detResults"
- }
- }
- }
- New-UDColumn -LargeSize 5 {
- New-UDElement -Tag "div" -Id "detWorkingArea"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement