update: 刪除重複的 interface: clientInfo => appointment
| | |
| | | import appointmentService from '~/shared/services/appointment.service'; |
| | | import UtilsService from '~/shared/services/utils.service'; |
| | | import { hideReviews } from '~/shared/const/hide-reviews'; |
| | | import { AppointmentMemoInfo, ClientInfo } from '~/shared/models/client.model'; |
| | | import myConsultantService from '~/shared/services/my-consultant.service'; |
| | | import { ElRow } from 'element-ui/types/row'; |
| | | import { Appointment, AppointmentMemoInfo } from '~/shared/models/appointment.model'; |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | @Component({ |
| | |
| | | }) |
| | | export default class ClientList extends Vue { |
| | | @Action |
| | | updateMyAppointment!: (data: ClientInfo) => void; |
| | | updateMyAppointment!: (data: Appointment) => void; |
| | | |
| | | @Prop() |
| | | client!: ClientInfo; |
| | | client!: Appointment; |
| | | |
| | | @localStorage.Mutation |
| | | storageClearAppointmentIdFromMsg!: () => void; |
| | |
| | | <script lang='ts'> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | import { Appointment } from '~/shared/models/appointment.model'; |
| | | |
| | | @Component |
| | | export default class ClientList extends Vue { |
| | | @Prop() clients!: ClientInfo[]; |
| | | @Prop() clients!: Appointment[]; |
| | | @Prop() title!: string; |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | |
| | | |
| | | import * as _ from 'lodash'; |
| | | |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | import { Appointment } from '~/shared/models/appointment.model'; |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | |
| | |
| | | export default class ClientReservedList extends Vue { |
| | | |
| | | @State('myAppointmentList') |
| | | myAppointmentList!: ClientInfo[]; |
| | | myAppointmentList!: Appointment[]; |
| | | |
| | | @State('myNewAppointmentSum') |
| | | newAppointmentSum!: number; |
| | |
| | | currentAppointmentIdFromMsg!: string; |
| | | |
| | | activeTabName : string = 'appointmentList'; |
| | | appointmentList : ClientInfo[] = []; |
| | | clients : ClientInfo[] = []; |
| | | contactedList : ClientInfo[] = []; |
| | | appointmentList : Appointment[] = []; |
| | | clients : Appointment[] = []; |
| | | contactedList : Appointment[] = []; |
| | | showNewAppointmentHint: boolean = false; |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | |
| | | <script lang="ts"> |
| | | import { Vue, Component, State, Watch, namespace } from 'nuxt-property-decorator'; |
| | | |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | import { Appointment } from '~/shared/models/appointment.model'; |
| | | |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | @Component |
| | | export default class ClientReservedList extends Vue { |
| | | |
| | | @State('myAppointmentList') |
| | | myAppointmentList!: ClientInfo[]; |
| | | myAppointmentList!: Appointment[]; |
| | | |
| | | @localStorage.Getter |
| | | currentAppointmentIdFromMsg!: string; |
| | | |
| | | appointmentList: ClientInfo[] = []; |
| | | filterList : ClientInfo[] = []; |
| | | appointmentList: Appointment[] = []; |
| | | filterList : Appointment[] = []; |
| | | keyWord : string = ''; |
| | | pageList : ClientInfo[] = []; |
| | | pageList : Appointment[] = []; |
| | | currentPage : number = 1; |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | |
| | | }) |
| | | } |
| | | |
| | | changePage(pageList: ClientInfo[]): void { |
| | | changePage(pageList: Appointment[]): void { |
| | | this.pageList = pageList; |
| | | } |
| | | |
| | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Watch, State, namespace } from 'nuxt-property-decorator'; |
| | | |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | import { Appointment } from '~/shared/models/appointment.model'; |
| | | |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | @Component |
| | | export default class ClientContactedList extends Vue { |
| | | |
| | | @State('myAppointmentList') |
| | | myAppointmentList!: ClientInfo[]; |
| | | myAppointmentList!: Appointment[]; |
| | | |
| | | @localStorage.Getter |
| | | currentAppointmentIdFromMsg!: string; |
| | | |
| | | contactedList: ClientInfo[] = []; |
| | | filterList : ClientInfo[] = []; |
| | | contactedList: Appointment[] = []; |
| | | filterList : Appointment[] = []; |
| | | keyWord : string = ''; |
| | | pageList : ClientInfo[] = []; |
| | | pageList : Appointment[] = []; |
| | | currentPage : number = 1; |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | |
| | | }) |
| | | } |
| | | |
| | | changePage(pageList: ClientInfo[]): void { |
| | | changePage(pageList: Appointment[]): void { |
| | | this.pageList = pageList; |
| | | } |
| | | |
| | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Watch, State, namespace } from 'nuxt-property-decorator'; |
| | | |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | import { Appointment } from '~/shared/models/appointment.model'; |
| | | |
| | | |
| | | const localStorage = namespace('localStorage'); |
| | | @Component |
| | | export default class ClientContactedList extends Vue { |
| | | |
| | | @State('myAppointmentList') |
| | | myAppointmentList!: ClientInfo[]; |
| | | myAppointmentList!: Appointment[]; |
| | | |
| | | @localStorage.Getter |
| | | currentAppointmentIdFromMsg!: string; |
| | | |
| | | contactedList: ClientInfo[] = []; |
| | | filterList : ClientInfo[] = []; |
| | | contactedList: Appointment[] = []; |
| | | filterList : Appointment[] = []; |
| | | keyWord : string = ''; |
| | | pageList : ClientInfo[] = []; |
| | | pageList : Appointment[] = []; |
| | | currentPage : number = 1; |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | |
| | | }) |
| | | } |
| | | |
| | | changePage(pageList: ClientInfo[]): void { |
| | | changePage(pageList: Appointment[]): void { |
| | | this.pageList = pageList; |
| | | } |
| | | |
| | |
| | | export interface AppointmentLog { |
| | | id : number, |
| | | createdDate : Date, |
| | | lastModifiedDate: Date, |
| | | customerId : number, |
| | | agentNo : string, |
| | | status : 'UNFILLED' | 'FILLED', |
| | | score : number, |
| | | agentName : string, |
| | | customerName : string, |
| | | id : number; |
| | | createdDate : string; |
| | | lastModifiedDate: string; |
| | | customerId : number; |
| | | agentNo : string; |
| | | status : 'UNFILLED' | 'FILLED'; |
| | | score : number; |
| | | agentName : string; |
| | | customerName : string; |
| | | } |
| | | export interface Appointment { |
| | | id : number; |
| | | phone? : string; |
| | | email? : string; |
| | | contactType : string; |
| | | gender : string; |
| | | age : string; |
| | | job : string; |
| | | requirement : string; |
| | | communicateStatus : string; |
| | | hopeContactTime : string; |
| | | otherRequirement? : string; |
| | | appointmentDate : string; |
| | | lastModifiedDate : string; |
| | | agentNo : string; |
| | | appointmentDate : string; |
| | | appointmentMemoList: AppointmentMemoInfo[] |
| | | communicateStatus : string; |
| | | consultantReadTime : string; |
| | | consultantViewTime : string; |
| | | contactTime : string; |
| | | contactType : string; |
| | | customerId : number; |
| | | email : string; |
| | | gender : string; |
| | | hopeContactTime : string; |
| | | id : number; |
| | | interviewRecordDTOs: InterviewRecord[]; |
| | | job : string; |
| | | lastModifiedDate : string; |
| | | name : string; |
| | | consultantViewTime?: string; |
| | | consultantReadTime?: string; |
| | | satisfactionScore? : number; |
| | | otherRequirement : string; |
| | | phone : string; |
| | | requirement : string; |
| | | satisfactionScore : number; |
| | | }; |
| | | |
| | | export interface AppointmentMemoInfo { |
| | | appointmentId: number; |
| | | content : string; |
| | | id : number; |
| | | } |
| | | export interface InterviewRecord { |
| | | appointmentId : number; |
| | | content : string; |
| | | createdBy : string; |
| | | createdDate : string; |
| | | id : number; |
| | | interviewDate : string; |
| | | lastModifiedBy : string; |
| | | lastModifiedDate: string; |
| | | } |
| | | export interface AppointmentWithConsultantInfo extends Appointment { |
| | | consultantName : string; |
| | | consultantAvatar : string; |
| | | consultantExpertList: string[] |
| | | updateTime : Date | string; |
| | | consultantExpertList: string[]; |
| | | consultantName : string; |
| | | contactStatus : string; |
| | | updateTime : string; |
| | | } |
| | | |
| | | export interface AppointmentDetail { |
| | |
| | | satisfactionScore? : number; |
| | | } |
| | | export interface AppointmentParams { |
| | | phone : string; |
| | | email : string; |
| | | contactType : string; |
| | | gender : string; |
| | | age : string; |
| | | job : string; |
| | | requirement : string; |
| | | hopeContactTime: string; |
| | | agentNo : string; |
| | | contactType : string; |
| | | email : string; |
| | | gender : string; |
| | | hopeContactTime: string; |
| | | job : string; |
| | | phone : string; |
| | | requirement : string; |
| | | } |
| | | export interface EditAppointmentParams { |
| | | id : number, |
| | | phone : string, |
| | | email : string, |
| | | contactType : string, |
| | | gender : string, |
| | | age : string, |
| | | job : string, |
| | | requirement : string, |
| | | hopeContactTime : string, |
| | | otherRequirement: null |
| | | age : string; |
| | | contactType : string; |
| | | email : string; |
| | | gender : string; |
| | | hopeContactTime : string; |
| | | id : number; |
| | | job : string; |
| | | otherRequirement: null; |
| | | phone : string; |
| | | requirement : string; |
| | | } |
| | | export interface AppointmentRequests { |
| | | phone : string, |
| | | email : string, |
| | | contactType : string, |
| | | gender : string, |
| | | age : string, |
| | | job : string, |
| | | requirement : string[], |
| | | hopeContactTime: ContactTime[], |
| | | agentNo : string, |
| | | age : string; |
| | | agentNo : string; |
| | | contactType : string; |
| | | email : string; |
| | | gender : string; |
| | | hopeContactTime: ContactTime[]; |
| | | job : string; |
| | | phone : string; |
| | | requirement : string[]; |
| | | } |
| | | export interface ContactTime { |
| | | selectWeekOptions : string[], |
| | | selectTimesOptions: string[] |
| | | selectTimesOptions: string[]; |
| | | selectWeekOptions : string[]; |
| | | } |
| | | |
| | | |
| | | export interface createdMemoInfo { |
| | | content: string, |
| | | appointmentId: number |
| | | appointmentId: number; |
| | | content : string; |
| | | } |
| | | |
| | | export interface updatedMemoInfo { |
| | | content: string, |
| | | /** memo id */ |
| | | id: number |
| | | content: string; |
| | | id : number; |
| | | } |
| | |
| | | import { http } from "./httpClient"; |
| | | |
| | | import { AppointmentMemoInfo, ClientInfo } from "~/shared/models/client.model"; |
| | | import { AppointmentDetail, createdMemoInfo, EditAppointmentParams, updatedMemoInfo } from "~/shared/models/appointment.model"; |
| | | import { Appointment, AppointmentDetail, AppointmentMemoInfo, createdMemoInfo, EditAppointmentParams, updatedMemoInfo } from "~/shared/models/appointment.model"; |
| | | |
| | | class AppointmentService { |
| | | |
| | | // å徿æé ç´æ¸
å® |
| | | async getMyAppointmentList(): Promise<ClientInfo[]> { |
| | | // é¡§åå徿æèªå·±çé ç´å®API |
| | | async getMyAppointmentList(): Promise<Appointment[]> { |
| | | return http.get('/consultant/getMyAppointment').then((res) => { |
| | | const hasNewAppointment = res.data.find((appointment: ClientInfo) => !appointment.consultantViewTime); |
| | | const hasNewAppointment = res.data.find((appointment: Appointment) => !appointment.consultantViewTime); |
| | | if (hasNewAppointment) { |
| | | this.viewAllAppointment(); |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | // é¡§åç»å
¥é¡¯ç¤ºæ°é ç´å®çæ¸å¾è§¸ç¼ |
| | | // é¡§åç覽èªå·±ææçé ç´å®ç´é觸ç¼API |
| | | private viewAllAppointment(): void { |
| | | http.post('/consultant/record/allAppointmentsView').then(); |
| | | } |
| | |
| | | import _ from "lodash"; |
| | | |
| | | import { http } from "./httpClient"; |
| | | import { AgentInfo } from '~/shared/models/agent-info.model'; |
| | | import { Consultant } from "../models/consultant.model"; |
| | | import _ from "lodash"; |
| | | import { ClientInfo } from "../models/client.model"; |
| | | import { Appointment } from "../models/appointment.model"; |
| | | class MyConsultantService { |
| | | |
| | | async getFavoriteConsultantList(): Promise<Consultant[]> { |
| | |
| | | } |
| | | |
| | | // æ¨è¨çºå·²è¯çµ¡ |
| | | markAsContact(appointmentId: number): Promise<ClientInfo> { |
| | | markAsContact(appointmentId: number): Promise<Appointment> { |
| | | return http.post(`/appointment/markAsContacted/${appointmentId}`).then(res => res.data); |
| | | } |
| | | |
| | |
| | | import reviewsService from '~/shared/services/reviews.service'; |
| | | |
| | | import { Consultant } from '~/shared/models/consultant.model'; |
| | | import { AppointmentLog } from '~/shared/models/appointment.model'; |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | import { Appointment, AppointmentLog } from '~/shared/models/appointment.model'; |
| | | import { AgentOfStrictQuery } from '~/shared/models/strict-query.model'; |
| | | @Module |
| | | export default class Store extends VuexModule { |
| | |
| | | strictQueryList: AgentOfStrictQuery[] = []; |
| | | myConsultantList: Consultant[] = []; |
| | | |
| | | myAppointmentList: ClientInfo[] = []; |
| | | myAppointmentList: Appointment[] = []; |
| | | myNewAppointmentSum: number = 0; |
| | | |
| | | myAppointmentReviewLogList: AppointmentLog[] = []; |
| | |
| | | } |
| | | |
| | | @Mutation |
| | | updateMyAppointmentList(data: ClientInfo[]) { |
| | | updateMyAppointmentList(data: Appointment[]) { |
| | | this.myAppointmentList = data; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Action |
| | | updateMyAppointment(myAppointment: ClientInfo) { |
| | | updateMyAppointment(myAppointment: Appointment) { |
| | | const data = this.myAppointmentList.filter(item => item.id !== myAppointment.id); |
| | | data.unshift(myAppointment); |
| | | this.context.commit('updateMyAppointmentList', data) |