You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/05/31 18:18:17 UTC
[airavata-django-portal] 02/05: AIRAVATA-3040 Persist detail
toggled state
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit c3cc34b9e07dd2c64586ce9b0eb62ce6145679b4
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu May 30 12:03:40 2019 -0400
AIRAVATA-3040 Persist detail toggled state
---
.../src/components/users/UserManagementContainer.vue | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue
index 49ca5db..25c5ba7 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue
@@ -20,7 +20,7 @@
>
<b-button
v-if="data.item.airavataUserProfileExists"
- @click="data.toggleDetails"
+ @click="toggleDetails(data)"
>
Edit Groups
</b-button>
@@ -58,7 +58,8 @@ export default {
data() {
return {
usersPaginator: null,
- allGroups: null
+ allGroups: null,
+ showingDetails: {}
};
},
components: {
@@ -107,7 +108,13 @@ export default {
];
},
items() {
- return this.usersPaginator ? this.usersPaginator.results : [];
+ return this.usersPaginator
+ ? this.usersPaginator.results.map(u => {
+ const user = u.clone();
+ user._showDetails = this.showingDetails[u.airavataInternalUserId] || false;
+ return user;
+ })
+ : [];
},
editableGroups() {
return this.allGroups
@@ -138,6 +145,11 @@ export default {
limit: 10,
offset: this.currentOffset
}).then(users => (this.usersPaginator = users));
+ },
+ toggleDetails(row) {
+ row.toggleDetails();
+ this.showingDetails[row.item.airavataInternalUserId] = !this
+ .showingDetails[row.item.airavataInternalUserId];
}
}
};