From c0946457d311eb1ced63f7dcbcf4bc3f0e33c55a Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期三, 19 一月 2022 16:43:01 +0800 Subject: [PATCH] fixed: BackActionBar - 預約單結案後顯示的 lable 應為'結案明細' --- PAMapp/components/Consultant/ConsultantList.vue | 58 ++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 40 insertions(+), 18 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue index efc3914..06ccd84 100644 --- a/PAMapp/components/Consultant/ConsultantList.vue +++ b/PAMapp/components/Consultant/ConsultantList.vue @@ -1,46 +1,68 @@ <template> <div> - <template v-if="agents.length > 0"> + <template v-if="agentList.length > 0"> <ConsultantCard - v-for="(agent, index) in agents" + v-for="(agent, index) in agentList" :key="index" :agentInfo="agent" - @removeAgent="removeAgent" ></ConsultantCard> </template> - <template v-else-if="noLogin"> + <template v-if="isUserLogin && agentList.length === 0"> <div class="emptyRowStyle"> - <div class="mdTxt login" @click="$router.push('/login')">��</div> - <div class="smTxt txt">���憭歇�憿批��</div> + <div class="smTxt txt">{{ noDataPlaceholder }}</div> </div> </template> - <template v-else> + <template v-if="!isUserLogin"> <div class="emptyRowStyle"> - <div class="smTxt txt">����撌脤憿批��</div> + <div class="mdTxt login fix-chrome-click--issue" @click="$router.push('/login')">�� | 閮餃��</div> + <div class="smTxt txt ">���憭�</div> </div> </template> </div> </template> <script lang="ts"> -import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator'; -import { Agents } from '~/plugins/api/home'; +import { Consultant } from '~/shared/models/consultant.model'; +import { Vue, Component, Prop } from 'nuxt-property-decorator'; +import authService from '~/shared/services/auth.service'; @Component export default class ConsultantList extends Vue { - @Prop() agents!: Agents[]; + @Prop() + agents!: Consultant[]; - noLogin = false; + @Prop() + title! : string; - @Emit('removeAgent') removeAgent(agentId: number) { - return agentId; + isUserLogin = false; + + ////////////////////////////////////////////////////////////////////// + + get agentList(){ + return this.agents.map((agentDto)=> + ({...agentDto,customerScore:0,}) + ) } + + get noDataPlaceholder(): string { + return this.title === 'contactedList' + ? '����撌脰蝯⊿“���' + : '����撌脤憿批��'; + } + + ////////////////////////////////////////////////////////////////////// + + mounted() { + this.isUserLogin = authService.isUserLogin(); + } + } </script> <style lang="scss" scoped> + .emptyRowStyle { - background-color: #FFFFFF; + background-color: $PRIMARY_WHITE; width: 100%; height: 100px; display: flex; @@ -48,14 +70,14 @@ align-items: center; .login { - color: #ED1B2E; + color: $PRIMARY_RED; cursor: pointer; } .txt { - color: #68737A; + color: $PRUDENTIAL_GREY; margin-left: 17px; } } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0