| | |
| | | import { Vue, Component, Prop, Emit, Action, State, namespace } from 'nuxt-property-decorator'; |
| | | import { Consultant } from '~/shared/models/consultant.model'; |
| | | |
| | | const roleStorage = namespace('localStorage'); |
| | | |
| | | @Component |
| | | export default class AddAndReservedBtns extends Vue { |
| | | |
| | |
| | | @Prop() |
| | | cusClass!: string; |
| | | |
| | | @roleStorage.Getter |
| | | isUserLogin!: boolean; |
| | | |
| | | isVisiblePopUp = false; |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | addConsultant(item: Consultant): void { |
| | | if (!this.isUserLogin) { |
| | | item = { |
| | | ...item, |
| | | updateTime: new Date().toISOString() |
| | | }; |
| | | } |
| | | this.addToMyConsultantList(item).then(addOk => { |
| | | addOk && this.openPopUp(); |
| | | }); |