| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | import { Vue, Component, Prop, namespace } from 'nuxt-property-decorator'; |
| | | import { Consultant } from '~/assets/ts/models/consultant.model'; |
| | | import { isLogin } from '~/assets/ts/auth'; |
| | | import { Role } from '~/assets/ts/models/enum/Role'; |
| | | |
| | | const roleStorage = namespace('localStorage'); |
| | | |
| | | @Component |
| | | export default class ConsultantList extends Vue { |
| | | @Prop() agents!: Consultant[]; |
| | | @roleStorage.Getter currentRole!:string; |
| | | |
| | | get isLogin() { |
| | | return isLogin(); |
| | | return this.currentRole === Role.USER; |
| | | } |
| | | get agentList(){ |
| | | return this.agents.map((agentDto)=> |