| | |
| | | <template> |
| | | <div> |
| | | <el-row type="flex" class="rowStyle"> |
| | | <el-row type="flex" class="rowStyle" @click.native="openDetail"> |
| | | <el-col :xs="5" :sm="3"> |
| | | <el-avatar |
| | | :size="50" |
| | |
| | | <el-col class="flex-column contactInfo" :xs="5" :sm="6"> |
| | | <div class="smTxt_bold cursor--pointer" |
| | | :class="client.communicateStatus" |
| | | @click="openDetail" |
| | | >{{isReserved ? '已預約' : '已聯絡'}} |
| | | </div> |
| | | <div class="date xsTxt text--mid_grey">{{date}}</div> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | import { Vue, Component, Prop, Mutation, Action } from 'nuxt-property-decorator'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | import { ClientInfo, markAsContact } from '~/assets/ts/api/appointment'; |
| | | |
| | |
| | | } |
| | | }) |
| | | export default class ClientList extends Vue { |
| | | @Action updateMyAppointment!: (data: ClientInfo) => void |
| | | |
| | | @Prop() client!: ClientInfo; |
| | | isVisibleDialog = false; |
| | | width = ''; |
| | |
| | | } |
| | | |
| | | markAppointment() { |
| | | markAsContact(this.client.id).then(res => this.$router.go(0)) |
| | | markAsContact(this.client.id).then(data => { |
| | | // TODO: 要接後台傳回的 updated client 資料 - Ben 2021/11/16 |
| | | |
| | | const updatedClient = {...this.client}; |
| | | updatedClient.communicateStatus = 'contacted'; |
| | | updatedClient.appointmentDate = new Date(); |
| | | |
| | | this.updateMyAppointment(updatedClient); |
| | | this.isVisibleDialog = false; |
| | | |
| | | }) |
| | | } |
| | | |
| | | } |