Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM
| | |
| | | import { Vue, Component, Prop, Action } from 'nuxt-property-decorator'; |
| | | |
| | | import appointmentService from '~/shared/services/appointment.service'; |
| | | import { isMobileDevice } from '~/shared/device'; |
| | | import UtilsService from '~/shared/services/utils.service'; |
| | | import { hideReviews } from '~/shared/const/hide-reviews'; |
| | | import { ClientInfo } from '~/shared/models/client.model'; |
| | | import myConsultantService from '~/shared/services/my-consultant.service'; |
| | |
| | | } |
| | | |
| | | openDetail() { |
| | | this.dialogWidth = isMobileDevice() ? '80%' : ''; |
| | | this.dialogWidth = UtilsService.isMobileDevice() ? '80%' : ''; |
| | | this.isVisibleDialog = true; |
| | | } |
| | | |
| | |
| | | |
| | | import appointmentService from '~/shared/services/appointment.service'; |
| | | import reviewsService from '~/shared/services/reviews.service'; |
| | | import { isMobileDevice } from '~/shared/device'; |
| | | import UtilsService from '~/shared/services/utils.service'; |
| | | import { hideReviews } from '~/shared/const/hide-reviews'; |
| | | import { Consultant, ConsultantWithAppointmentId } from '~/shared/models/consultant.model'; |
| | | import { Appointment } from '~/shared/models/appointment.model'; |
| | |
| | | ...res, |
| | | satisfactionScore: this.agentInfo['appointmentScore'], |
| | | }; |
| | | this.width = isMobileDevice() ? '80%' : ''; |
| | | this.width = UtilsService.isMobileDevice() ? '80%' : ''; |
| | | this.isVisibleDialog = true; |
| | | }); |
| | | } |
| | |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop } from 'vue-property-decorator'; |
| | | import { isMobileDevice } from '~/shared/device'; |
| | | |
| | | import UtilsService from '~/shared/services/utils.service'; |
| | | |
| | | @Component |
| | | export default class UiField extends Vue { |
| | |
| | | currentDevice: 'MOBILE' | 'DESKTOP' = 'MOBILE'; |
| | | |
| | | mounted(): void { |
| | | this.currentDevice = isMobileDevice() ? 'MOBILE' : 'DESKTOP'; |
| | | this.currentDevice = UtilsService.isMobileDevice() ? 'MOBILE' : 'DESKTOP'; |
| | | } |
| | | |
| | | get fieldSpan(): number { |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop,Emit, Watch, PropSync} from 'vue-property-decorator'; |
| | | import { isMobileDevice } from '~/shared/device'; |
| | | import { Vue, Component, Prop, Emit, PropSync} from 'vue-property-decorator'; |
| | | |
| | | import UtilsService from '~/shared/services/utils.service'; |
| | | |
| | | @Component |
| | | export default class PopUpFrame extends Vue { |
| | | @PropSync('isOpen',{type:Boolean,default:false}) syncIsOpen!:boolean; |
| | |
| | | @Prop({default:'50%'}) dialogWidth!:string; // element UI dialog default width |
| | | |
| | | private get isUseDrawer() : boolean { |
| | | return this.syncIsOpen && isMobileDevice(); |
| | | return this.syncIsOpen && UtilsService.isMobileDevice(); |
| | | } |
| | | private set isUseDrawer(value: boolean) { |
| | | this.$emit('update:isOpen',value); |
| | | } |
| | | |
| | | private get isUseDialog() : boolean { |
| | | return this.syncIsOpen && !isMobileDevice(); |
| | | return this.syncIsOpen && !UtilsService.isMobileDevice(); |
| | | } |
| | | |
| | | private set isUseDialog(value: boolean) { |
| | |
| | | </template> |
| | | <script lang="ts"> |
| | | import { Vue,Component } from 'vue-property-decorator' |
| | | import { isMobileDevice } from '~/shared/device'; |
| | | |
| | | import UtilsService from '~/shared/services/utils.service'; |
| | | |
| | | @Component({ |
| | | layout: 'home' |
| | |
| | | }; |
| | | |
| | | mounted() { |
| | | this.isMobileDevice = isMobileDevice(); |
| | | this.isMobileDevice = UtilsService.isMobileDevice(); |
| | | }; |
| | | |
| | | sendReviews() { |
File was renamed from PAMapp/shared/device.ts |
| | |
| | | export function isMobileDevice(): boolean { |
| | | class UtilsService { |
| | | |
| | | isMobileDevice(): boolean { |
| | | const mobileDevices = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone']; |
| | | return mobileDevices.some(e => navigator.userAgent.match(e)); |
| | | } |
| | | |
| | | } |
| | | |
| | | export default new UtilsService(); |