Page 1 of 1

AppTopbar not display logged in full name

Posted: 08 Aug 2021, 11:48
by damnh
Hi,

I have been using the basic license of Serenity. I have a problem.
I used VueJS 3, Vuex, and backend with Django rest framework with simple JWT for our project.
After I logged in successfully, I performed to get user information and save into localstorage by Vuex (store), and push to dashboard page.
At AppTopbar.vue, I edited profile name by getting fullname of user from localstorage. But it not displayed.
If I refresh dashboard page again, fullname is displayed.

Why logged in successfully and push to dashboard page, fullname of user is not displayed. Please help me. Thank you!

Code: Select all

..........
<span class="topbar-item-name profile-name">{{ profileName }}</span>
..........
computed: {
    topbarMenuClass () {
      return ['topbar-menu fadeInDown', {
        'topbar-menu-active': this.topbarMenuActive
      }]
    },
    profileName () {
      const authUser = JSON.parse(this.$store.state.authUser)
      return authUser.first_name + ' ' + authUser.last_name
    }
  }

Re: AppTopbar not display logged in full name

Posted: 09 Aug 2021, 08:13
by tugce.kucukoglu
Hi,

Please debug your code with Vue.js devtools. If you are having trouble with Serenity with PrimeVue, we glad to help.

Regards,