From 91586cf2992c1b7b12cad509619094251c52322e Mon Sep 17 00:00:00 2001 From: Wes Bonelli Date: Fri, 8 May 2020 11:17:26 -0400 Subject: [PATCH] style fixes, toast on profile update, remove spinner from toasts --- .../src/components/AppNavigation.vue | 97 +++++++++++++++---- .../collections/EditUserInfoModal.vue | 2 +- plantit/front_end/src/scss/main.sass | 4 +- plantit/front_end/src/views/Job.vue | 8 +- plantit/front_end/src/views/Profile.vue | 13 ++- plantit/plantit/user/models.py | 10 +- 6 files changed, 91 insertions(+), 43 deletions(-) diff --git a/plantit/front_end/src/components/AppNavigation.vue b/plantit/front_end/src/components/AppNavigation.vue index e37a8a6e..c69acef2 100644 --- a/plantit/front_end/src/components/AppNavigation.vue +++ b/plantit/front_end/src/components/AppNavigation.vue @@ -388,8 +388,82 @@ + +

+ User information updated. Thanks, + {{ this.info ? this.info.first_name : '' }}! +

+


+ + - -

- User information updated. Thanks, - {{ this.info ? this.info.profile ? this.info.profile.first_name : '' : '' }}! -

- -
@@ -527,14 +583,12 @@ export default { } }, methods: { - reload(toast) { + reload() { UserApi.getCurrentUser().then(info => { this.info = info; this.loading = false; if (this.profileIncomplete) { this.$bvModal.show('editUserInfoModalNav'); - } else if (toast) { - this.showAlert(); } }); }, @@ -565,6 +619,7 @@ export default { fieldOfStudy ).then(() => { this.reload(); + this.showAlert(); }); } } diff --git a/plantit/front_end/src/components/collections/EditUserInfoModal.vue b/plantit/front_end/src/components/collections/EditUserInfoModal.vue index 74c6be46..81d3b983 100644 --- a/plantit/front_end/src/components/collections/EditUserInfoModal.vue +++ b/plantit/front_end/src/components/collections/EditUserInfoModal.vue @@ -2,7 +2,7 @@ Job info reloaded.

- @@ -244,7 +238,7 @@ export default { if (this.job.status_set.length > 0) { return this.job.status_set[0].state; } else { - return ''; + return 0; } }, warning_count() { diff --git a/plantit/front_end/src/views/Profile.vue b/plantit/front_end/src/views/Profile.vue index b3770516..4c9afef9 100644 --- a/plantit/front_end/src/views/Profile.vue +++ b/plantit/front_end/src/views/Profile.vue @@ -22,7 +22,9 @@ - - + -->