Skip to content

Commit 5a87dc9

Browse files
authored
Merge pull request #1376 from ucdavis/JCS/TeamAdminTable
Enhances Team Admin member role view.
2 parents 06e7565 + 5194d05 commit 5a87dc9

4 files changed

Lines changed: 169 additions & 137 deletions

File tree

Keas.Mvc/ClientApp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
}
9595
},
9696
"engines": {
97-
"npm": ">=9.5.1",
98-
"node": ">=18.16.0"
97+
"npm": ">=10.0.0",
98+
"node": ">=20.0.0"
9999
}
100100
}
Lines changed: 74 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,80 @@
11
@model Keas.Mvc.Models.TeamAdminMembersListModel
22

33
@{
4-
ViewData["Title"] = "Role Assigned Members ";
5-
}
6-
<div class="card">
7-
<div class="card-header-primary">
8-
<div class="card-head row justify-content-between">
9-
<h2>Members with roles in @Model.Team.Name</h2>
10-
<a class="btn btn-link" asp-action="AddMemberRole"><i class="fas fa-plus fa-xs"/></i> Add new Admin Role.</a>
11-
</div>
4+
ViewData["Title"] = "Role Assigned Members ";
5+
}
6+
<div class="card">
7+
<div class="card-header-primary">
8+
<div class="card-head row justify-content-between">
9+
<h2>Members with roles in @Model.Team.Name</h2>
10+
<a class="btn btn-link" asp-action="AddMemberRole"><i class="fas fa-plus fa-xs" /></i> Add new Admin Role.</a>
1211
</div>
13-
<div class="card-content">
14-
<table class="table">
15-
<thead>
16-
<tr>
17-
<th>
18-
Name
19-
</th>
20-
<th>
21-
Email
22-
</th>
23-
<th>
24-
Roles
25-
</th>
26-
<th>
12+
</div>
13+
<div class="card-content">
14+
<table class="table">
15+
<thead>
16+
<tr>
17+
<th>
18+
Name
19+
</th>
20+
<th>
21+
Email
22+
</th>
23+
<th>
24+
Roles
25+
</th>
26+
<th>
2727

28-
</th>
29-
</tr>
30-
</thead>
31-
<tbody>
32-
@foreach (var item in Model.UserRoles) {
33-
<tr>
34-
<td>
35-
@item.User.LastName, @item.User.FirstName
36-
</td>
37-
<td>@Html.DisplayFor(a => item.User.Email)</td>
38-
<td>
39-
@item.RolesList
40-
</td>
41-
<td>
42-
@Html.ActionLink("Remove Role(s)", "RemoveRoles", new { userId = item.User.Id})
43-
</td>
28+
</th>
29+
</tr>
30+
</thead>
31+
<tbody>
32+
@foreach (var item in Model.UserRoles)
33+
{
34+
<tr>
35+
<td>
36+
@item.User.LastName, @item.User.FirstName
37+
</td>
38+
<td>@Html.DisplayFor(a => item.User.Email)</td>
39+
<td>
40+
@item.RolesList
41+
</td>
42+
<td>
43+
@Html.ActionLink("Remove Role(s)", "RemoveRoles", new { userId = item.User.Id })
44+
</td>
4445

45-
</tr>
46-
}
47-
</tbody>
48-
</table>
49-
</div>
50-
</div>
46+
</tr>
47+
}
48+
</tbody>
49+
</table>
50+
</div>
51+
</div>
52+
53+
54+
@section Styles
55+
{
56+
@{
57+
await Html.RenderPartialAsync("_ReportStylePartial");
58+
}
59+
}
60+
61+
@section Scripts
62+
{
63+
@{
64+
await Html.RenderPartialAsync("_ReportScriptsPartial");
65+
}
66+
<script type="text/javascript">
67+
$(function () {
68+
$(".table").dataTable({
69+
"columnDefs": [
70+
{
71+
targets: -1,
72+
className: 'dt-body-right',
73+
sortable: false,
74+
},
75+
76+
]
77+
});
78+
});
79+
</script>
80+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Get the app settings from Box and put them in your secrets location
3636

3737
//This is the current version of node we are using
3838

39+
`>=20.0.0`
40+
Old one:
3941
`nvm use 18.16.0`
4042

4143
// when you are ready to debug locally

azure-pipelines.yml

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -4,111 +4,111 @@
44
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
55

66
trigger:
7-
- master
7+
- master
88

99
name: 1.1.$(Date:yyMM).$(build.buildId)
1010

1111
pool:
12-
vmImage: 'windows-2019'
12+
vmImage: "windows-latest"
1313

1414
variables:
15-
solution: '**/*.sln'
16-
buildPlatform: 'Any CPU'
17-
buildConfiguration: 'Release'
15+
solution: "**/*.sln"
16+
buildPlatform: "Any CPU"
17+
buildConfiguration: "Release"
1818

1919
stages:
20-
- stage: Build
21-
jobs:
22-
- job:
23-
steps:
24-
- task: NodeTool@0
25-
inputs:
26-
versionSpec: '18.16.x'
27-
- task: UseDotNet@2
28-
displayName: 'Use .NET Core 6.0.407 sdk'
29-
inputs:
30-
packageType: sdk
31-
version: 6.0.407
32-
installationPath: $(Agent.ToolsDirectory)/dotnet
33-
34-
- task: DotNetCoreCLI@2
35-
inputs:
36-
command: 'restore'
20+
- stage: Build
21+
jobs:
22+
- job:
23+
steps:
24+
- task: NodeTool@0
25+
inputs:
26+
versionSpec: "20.x"
27+
- task: UseDotNet@2
28+
displayName: "Use .NET Core 6.0.407 sdk"
29+
inputs:
30+
packageType: sdk
31+
version: 6.0.407
32+
installationPath: $(Agent.ToolsDirectory)/dotnet
3733

38-
- task: DotNetCoreCLI@2
39-
displayName: 'Build Keas.Mvc'
40-
inputs:
41-
command: 'build'
42-
projects: './Keas.Mvc/Keas.Mvc.csproj'
43-
arguments: '--configuration $(BuildConfiguration) /property:Version=$(build.buildNumber)'
34+
- task: DotNetCoreCLI@2
35+
inputs:
36+
command: "restore"
4437

45-
- task: Npm@1
46-
inputs:
47-
command: 'install'
48-
workingDir: './Keas.Mvc'
38+
- task: DotNetCoreCLI@2
39+
displayName: "Build Keas.Mvc"
40+
inputs:
41+
command: "build"
42+
projects: "./Keas.Mvc/Keas.Mvc.csproj"
43+
arguments: "--configuration $(BuildConfiguration) /property:Version=$(build.buildNumber)"
4944

50-
- task: DotNetCoreCLI@2
51-
displayName: 'Run Server Tests'
52-
inputs:
53-
command: 'test'
45+
- task: Npm@1
46+
inputs:
47+
command: "install"
48+
workingDir: "./Keas.Mvc"
5449

55-
- task: Npm@1
56-
displayName: 'Run Client Tests'
57-
inputs:
58-
command: 'custom'
59-
workingDir: './Keas.Mvc/ClientApp'
60-
customCommand: 'run citest'
50+
- task: DotNetCoreCLI@2
51+
displayName: "Run Server Tests"
52+
inputs:
53+
command: "test"
6154

62-
- task: PublishTestResults@2
63-
displayName: 'Publish Client Tests'
64-
inputs:
65-
testResultsFormat: 'VSTest'
66-
testResultsFiles: '**/test-results.trx'
67-
testRunTitle: 'Client Tests'
55+
- task: Npm@1
56+
displayName: "Run Client Tests"
57+
inputs:
58+
command: "custom"
59+
workingDir: "./Keas.Mvc/ClientApp"
60+
customCommand: "run citest"
6861

69-
- stage: Publish
70-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
71-
jobs:
72-
- job:
73-
steps:
74-
- task: NodeTool@0
75-
inputs:
76-
versionSpec: '18.16.x'
77-
- task: UseDotNet@2
78-
displayName: 'Use .NET Core 6.0.407 sdk'
79-
inputs:
80-
packageType: sdk
81-
version: 6.0.407
82-
installationPath: $(Agent.ToolsDirectory)/dotnet
83-
- task: DotNetCoreCLI@2
84-
displayName: 'Publish Keas.Mvc'
85-
inputs:
86-
command: 'publish'
87-
publishWebProjects: true
88-
zipAfterPublish: false
89-
modifyOutputPath: false
90-
projects: './Keas.Mvc/Keas.Mvc.csproj'
91-
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/'
62+
- task: PublishTestResults@2
63+
displayName: "Publish Client Tests"
64+
inputs:
65+
testResultsFormat: "VSTest"
66+
testResultsFiles: "**/test-results.trx"
67+
testRunTitle: "Client Tests"
9268

93-
- task: DotNetCoreCLI@2
94-
displayName: 'Publish Keas.Jobs.SendMail'
95-
inputs:
96-
command: 'publish'
97-
publishWebProjects: false
98-
zipAfterPublish: false
99-
projects: './Keas.Jobs.SendMail/Keas.Jobs.SendMail.csproj'
100-
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/app_data/jobs/triggered'
69+
- stage: Publish
70+
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
71+
jobs:
72+
- job:
73+
steps:
74+
- task: NodeTool@0
75+
inputs:
76+
versionSpec: "20.x"
77+
- task: UseDotNet@2
78+
displayName: "Use .NET Core 6.0.407 sdk"
79+
inputs:
80+
packageType: sdk
81+
version: 6.0.407
82+
installationPath: $(Agent.ToolsDirectory)/dotnet
83+
- task: DotNetCoreCLI@2
84+
displayName: "Publish Keas.Mvc"
85+
inputs:
86+
command: "publish"
87+
publishWebProjects: true
88+
zipAfterPublish: false
89+
modifyOutputPath: false
90+
projects: "./Keas.Mvc/Keas.Mvc.csproj"
91+
arguments: "--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/"
10192

102-
- task: DotNetCoreCLI@2
103-
displayName: 'Publish Keas.Jobs.LivedName'
104-
inputs:
105-
command: 'publish'
106-
publishWebProjects: false
107-
zipAfterPublish: false
108-
projects: './Keas.Jobs.LivedName/Keas.Jobs.LivedName.csproj'
109-
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/app_data/jobs/triggered'
93+
- task: DotNetCoreCLI@2
94+
displayName: "Publish Keas.Jobs.SendMail"
95+
inputs:
96+
command: "publish"
97+
publishWebProjects: false
98+
zipAfterPublish: false
99+
projects: "./Keas.Jobs.SendMail/Keas.Jobs.SendMail.csproj"
100+
arguments: "--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/app_data/jobs/triggered"
110101

111-
- task: PublishBuildArtifacts@1
112-
displayName: 'Publish Artifact'
113-
inputs:
114-
PathtoPublish: '$(build.artifactstagingdirectory)'
102+
- task: DotNetCoreCLI@2
103+
displayName: "Publish Keas.Jobs.LivedName"
104+
inputs:
105+
command: "publish"
106+
publishWebProjects: false
107+
zipAfterPublish: false
108+
projects: "./Keas.Jobs.LivedName/Keas.Jobs.LivedName.csproj"
109+
arguments: "--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/app_data/jobs/triggered"
110+
111+
- task: PublishBuildArtifacts@1
112+
displayName: "Publish Artifact"
113+
inputs:
114+
PathtoPublish: "$(build.artifactstagingdirectory)"

0 commit comments

Comments
 (0)