diff --git a/atst/forms/data.py b/atst/forms/data.py index 6a41c647..5c7f9b7a 100644 --- a/atst/forms/data.py +++ b/atst/forms/data.py @@ -106,27 +106,37 @@ COMPLETION_DATE_RANGES = [ WORKSPACE_ROLES = [ ( "owner", - "Workspace Owner", - "Can add, edit, deactivate access to all projects, environments, and members. Can view budget reports. Can start and edit JEDI Cloud requests.", + { + "name": "Workspace Owner", + "description": "Can add, edit, deactivate access to all projects, environments, and members. Can view budget reports. Can start and edit JEDI Cloud requests.", + }, ), ( "admin", - "Administrator", - "Can add and edit projects, environments, members, but cannot deactivate. Cannot view budget reports or JEDI Cloud requests.", + { + "name": "Administrator", + "description": "Can add and edit projects, environments, members, but cannot deactivate. Cannot view budget reports or JEDI Cloud requests.", + }, ), ( "developer", - "Developer", - "Can view only the projects and environments they are granted access to. Can also view members associated with each environment.", + { + "name": "Developer", + "description": "Can view only the projects and environments they are granted access to. Can also view members associated with each environment.", + }, ), ( "billing_auditor", - "Billing Auditor", - "Can view only the projects and environments they are granted access to. Can also view budgets and reports associated with the workspace.", + { + "name": "Billing Auditor", + "description": "Can view only the projects and environments they are granted access to. Can also view budgets and reports associated with the workspace.", + }, ), ( "security_auditor", - "Security Auditor", - "Can view only the projects and environments they are granted access to. Can also view activity logs.", + { + "name": "Security Auditor", + "description": "Can view only the projects and environments they are granted access to. Can also view activity logs.", + }, ), ] diff --git a/js/components/selector.js b/js/components/selector.js index b6c23023..e3c94a8a 100644 --- a/js/components/selector.js +++ b/js/components/selector.js @@ -26,17 +26,21 @@ export default { computed: { label: function () { - return this.value - ? this.choices.find((choice) => { + if (this.value) { + const selectedChoice = this.choices.find((choice) => { return this.value === choice[0] })[1] - : this.defaultLabel + return selectedChoice.name + } else { + return this.defaultLabel + } } }, methods: { change: function (e) { this.value = e.target.value + console.log(this.value) this.showError = false setTimeout(() => this.$refs.popover.hide(), 300) } diff --git a/templates/components/selector.html b/templates/components/selector.html index cfa44d0a..cb374286 100644 --- a/templates/components/selector.html +++ b/templates/components/selector.html @@ -44,13 +44,13 @@ v-bind:checked='value === choice[0]' v-on:change='change'/>