@phonghq/go-chat 1.0.40 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@ import IconCloseCircle from '../assets/icons/IconCloseCircle.vue';
21
21
  import Setting from '../chat/page/setting/Setting.vue';
22
22
  import SettingSuccess from '../chat/page/setting/SettingSuccess.vue';
23
23
  import { goChatError } from '../composable/useError';
24
+ import NotTenantPhone from '@/views/NotTenantPhone.vue';
24
25
  const routerConfig = [
25
26
  { id: PAGE.HOME, backFunc: null, backTitle: '' },
26
27
  {
@@ -162,9 +163,10 @@ const getResponsiveObserverDebounce = useDebounce(() => {
162
163
  }, 50);
163
164
  const handleInitPage = async () => {
164
165
  await initPage({ props: props, response: responsiveRender.value });
165
- console.log(dataProfile.value, '55555555555555555');
166
+ routerPush(PAGE.NOT_TENANT_PHONE);
166
167
  if (!dataProfile.value?.tenant_phone && dataProfile.value?.user_type == 'tenant') {
167
168
  emit('error:noPhoneTenant');
169
+ routerPush(PAGE.NOT_TENANT_PHONE);
168
170
  // if (dataProfile.value?.has_business_tenant_phone) {
169
171
  // routerPush(PAGE.REGISTER_SUCCESS)
170
172
  // } else {
@@ -282,8 +284,12 @@ else if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR) {
282
284
  [currentPage, PAGE,];
283
285
  /** @type {[typeof Error, ]} */ ;
284
286
  // @ts-ignore
285
- const __VLS_4 = __VLS_asFunctionalComponent(Error, new Error({}));
286
- const __VLS_5 = __VLS_4({}, ...__VLS_functionalComponentArgsRest(__VLS_4));
287
+ const __VLS_4 = __VLS_asFunctionalComponent(Error, new Error({
288
+ ...{ class: "mt-10" },
289
+ }));
290
+ const __VLS_5 = __VLS_4({
291
+ ...{ class: "mt-10" },
292
+ }, ...__VLS_functionalComponentArgsRest(__VLS_4));
287
293
  }
288
294
  else if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT) {
289
295
  // @ts-ignore
@@ -301,6 +307,31 @@ else if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS) {
301
307
  const __VLS_12 = __VLS_asFunctionalComponent(SettingSuccess, new SettingSuccess({}));
302
308
  const __VLS_13 = __VLS_12({}, ...__VLS_functionalComponentArgsRest(__VLS_12));
303
309
  }
310
+ if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE) {
311
+ // @ts-ignore
312
+ [currentPage, PAGE,];
313
+ /** @type {[typeof NotTenantPhone, ]} */ ;
314
+ // @ts-ignore
315
+ const __VLS_16 = __VLS_asFunctionalComponent(NotTenantPhone, new NotTenantPhone({
316
+ ...{ 'onTryAgain': {} },
317
+ isLib: (props.isLib),
318
+ }));
319
+ const __VLS_17 = __VLS_16({
320
+ ...{ 'onTryAgain': {} },
321
+ isLib: (props.isLib),
322
+ }, ...__VLS_functionalComponentArgsRest(__VLS_16));
323
+ let __VLS_19;
324
+ let __VLS_20;
325
+ const __VLS_21 = ({ tryAgain: {} },
326
+ { onTryAgain: (...[$event]) => {
327
+ if (!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
328
+ return;
329
+ __VLS_ctx.handleInitPage();
330
+ // @ts-ignore
331
+ [handleInitPage,];
332
+ } });
333
+ var __VLS_18;
334
+ }
304
335
  else {
305
336
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
306
337
  ...{ class: "w-full h-full flex flex-col overflow-hidden relative" },
@@ -333,13 +364,7 @@ else {
333
364
  else {
334
365
  __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
335
366
  ...{ onClick: (...[$event]) => {
336
- if (!!(!__VLS_ctx.isRouterReady))
337
- return;
338
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
339
- return;
340
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
341
- return;
342
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
367
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
343
368
  return;
344
369
  if (!(__VLS_ctx.goChatError))
345
370
  return;
@@ -357,45 +382,39 @@ else {
357
382
  }
358
383
  /** @type {[typeof Calling, ]} */ ;
359
384
  // @ts-ignore
360
- const __VLS_16 = __VLS_asFunctionalComponent(Calling, new Calling({
385
+ const __VLS_23 = __VLS_asFunctionalComponent(Calling, new Calling({
361
386
  ...{ 'onUserCalling': {} },
362
387
  ...{ 'onEndCall': {} },
363
388
  ...{ 'onError:mediaPermissionFail': {} },
364
389
  ref: "callingRef",
365
390
  responsive: (__VLS_ctx.responsiveRender),
366
391
  }));
367
- const __VLS_17 = __VLS_16({
392
+ const __VLS_24 = __VLS_23({
368
393
  ...{ 'onUserCalling': {} },
369
394
  ...{ 'onEndCall': {} },
370
395
  ...{ 'onError:mediaPermissionFail': {} },
371
396
  ref: "callingRef",
372
397
  responsive: (__VLS_ctx.responsiveRender),
373
- }, ...__VLS_functionalComponentArgsRest(__VLS_16));
374
- let __VLS_19;
375
- let __VLS_20;
376
- const __VLS_21 = ({ userCalling: {} },
398
+ }, ...__VLS_functionalComponentArgsRest(__VLS_23));
399
+ let __VLS_26;
400
+ let __VLS_27;
401
+ const __VLS_28 = ({ userCalling: {} },
377
402
  { onUserCalling: (...[$event]) => {
378
- if (!!(!__VLS_ctx.isRouterReady))
379
- return;
380
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
381
- return;
382
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
383
- return;
384
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
403
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
385
404
  return;
386
405
  __VLS_ctx.emit('userCalling', $event);
387
406
  // @ts-ignore
388
407
  [responsiveRender, emit,];
389
408
  } });
390
- const __VLS_22 = ({ endCall: {} },
409
+ const __VLS_29 = ({ endCall: {} },
391
410
  { onEndCall: (__VLS_ctx.handleEndCall) });
392
- const __VLS_23 = ({ 'error:mediaPermissionFail': {} },
411
+ const __VLS_30 = ({ 'error:mediaPermissionFail': {} },
393
412
  { 'onError:mediaPermissionFail': (__VLS_ctx.handleMedialPermissionError) });
394
413
  /** @type {typeof __VLS_ctx.callingRef} */ ;
395
- var __VLS_24 = {};
414
+ var __VLS_31 = {};
396
415
  // @ts-ignore
397
416
  [handleEndCall, handleMedialPermissionError, callingRef,];
398
- var __VLS_18;
417
+ var __VLS_25;
399
418
  if (__VLS_ctx.responsiveRender == 'mobile') {
400
419
  // @ts-ignore
401
420
  [responsiveRender,];
@@ -413,13 +432,7 @@ else {
413
432
  [currentPageConfig, currentPageConfig,];
414
433
  __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
415
434
  ...{ onClick: (...[$event]) => {
416
- if (!!(!__VLS_ctx.isRouterReady))
417
- return;
418
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
419
- return;
420
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
421
- return;
422
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
435
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
423
436
  return;
424
437
  if (!(__VLS_ctx.responsiveRender == 'mobile'))
425
438
  return;
@@ -433,8 +446,8 @@ else {
433
446
  });
434
447
  /** @type {[typeof IconArrowLeft, ]} */ ;
435
448
  // @ts-ignore
436
- const __VLS_27 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
437
- const __VLS_28 = __VLS_27({}, ...__VLS_functionalComponentArgsRest(__VLS_27));
449
+ const __VLS_34 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
450
+ const __VLS_35 = __VLS_34({}, ...__VLS_functionalComponentArgsRest(__VLS_34));
438
451
  __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
439
452
  ...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
440
453
  });
@@ -448,13 +461,7 @@ else {
448
461
  if (props.isLib) {
449
462
  __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
450
463
  ...{ onClick: (...[$event]) => {
451
- if (!!(!__VLS_ctx.isRouterReady))
452
- return;
453
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
454
- return;
455
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
456
- return;
457
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
464
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
458
465
  return;
459
466
  if (!(__VLS_ctx.responsiveRender == 'mobile'))
460
467
  return;
@@ -468,41 +475,41 @@ else {
468
475
  });
469
476
  /** @type {[typeof IconCloseCircle, ]} */ ;
470
477
  // @ts-ignore
471
- const __VLS_31 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
472
- const __VLS_32 = __VLS_31({}, ...__VLS_functionalComponentArgsRest(__VLS_31));
478
+ const __VLS_38 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
479
+ const __VLS_39 = __VLS_38({}, ...__VLS_functionalComponentArgsRest(__VLS_38));
473
480
  }
474
481
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
475
482
  ...{ class: "grow overflow-hidden" },
476
483
  });
477
484
  /** @type {[typeof ChatList, ]} */ ;
478
485
  // @ts-ignore
479
- const __VLS_35 = __VLS_asFunctionalComponent(ChatList, new ChatList({
486
+ const __VLS_42 = __VLS_asFunctionalComponent(ChatList, new ChatList({
480
487
  ...{ 'onSelectReceiver': {} },
481
488
  ref: "chatListRef",
482
489
  ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
483
490
  responsive: (__VLS_ctx.responsiveRender),
484
491
  receiverId: (__VLS_ctx.receiverId),
485
492
  }));
486
- const __VLS_36 = __VLS_35({
493
+ const __VLS_43 = __VLS_42({
487
494
  ...{ 'onSelectReceiver': {} },
488
495
  ref: "chatListRef",
489
496
  ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
490
497
  responsive: (__VLS_ctx.responsiveRender),
491
498
  receiverId: (__VLS_ctx.receiverId),
492
- }, ...__VLS_functionalComponentArgsRest(__VLS_35));
493
- let __VLS_38;
494
- let __VLS_39;
495
- const __VLS_40 = ({ selectReceiver: {} },
499
+ }, ...__VLS_functionalComponentArgsRest(__VLS_42));
500
+ let __VLS_45;
501
+ let __VLS_46;
502
+ const __VLS_47 = ({ selectReceiver: {} },
496
503
  { onSelectReceiver: (__VLS_ctx.selectReceiver) });
497
504
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
498
505
  /** @type {typeof __VLS_ctx.chatListRef} */ ;
499
- var __VLS_41 = {};
506
+ var __VLS_48 = {};
500
507
  // @ts-ignore
501
508
  [currentPage, PAGE, responsiveRender, receiverId, selectReceiver, chatListRef,];
502
- var __VLS_37;
509
+ var __VLS_44;
503
510
  /** @type {[typeof HomeComponent, ]} */ ;
504
511
  // @ts-ignore
505
- const __VLS_44 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
512
+ const __VLS_51 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
506
513
  ...{ 'onCall': {} },
507
514
  ...{ 'onBack': {} },
508
515
  ...{ 'onInputFocus': {} },
@@ -511,7 +518,7 @@ else {
511
518
  ...{ class: "h-full pt-4" },
512
519
  responsive: (__VLS_ctx.responsiveRender),
513
520
  }));
514
- const __VLS_45 = __VLS_44({
521
+ const __VLS_52 = __VLS_51({
515
522
  ...{ 'onCall': {} },
516
523
  ...{ 'onBack': {} },
517
524
  ...{ 'onInputFocus': {} },
@@ -519,20 +526,14 @@ else {
519
526
  receiverId: (__VLS_ctx.receiverId),
520
527
  ...{ class: "h-full pt-4" },
521
528
  responsive: (__VLS_ctx.responsiveRender),
522
- }, ...__VLS_functionalComponentArgsRest(__VLS_44));
523
- let __VLS_47;
524
- let __VLS_48;
525
- const __VLS_49 = ({ call: {} },
529
+ }, ...__VLS_functionalComponentArgsRest(__VLS_51));
530
+ let __VLS_54;
531
+ let __VLS_55;
532
+ const __VLS_56 = ({ call: {} },
526
533
  { onCall: (__VLS_ctx.handleCall) });
527
- const __VLS_50 = ({ back: {} },
534
+ const __VLS_57 = ({ back: {} },
528
535
  { onBack: (...[$event]) => {
529
- if (!!(!__VLS_ctx.isRouterReady))
530
- return;
531
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
532
- return;
533
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
534
- return;
535
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
536
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
536
537
  return;
537
538
  if (!(__VLS_ctx.responsiveRender == 'mobile'))
538
539
  return;
@@ -540,72 +541,72 @@ else {
540
541
  // @ts-ignore
541
542
  [responsiveRender, currentPageConfig, receiverId, handleCall,];
542
543
  } });
543
- const __VLS_51 = ({ inputFocus: {} },
544
+ const __VLS_58 = ({ inputFocus: {} },
544
545
  { onInputFocus: (__VLS_ctx.handleReadMessage) });
545
546
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
546
547
  /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
547
- var __VLS_52 = {};
548
+ var __VLS_59 = {};
548
549
  // @ts-ignore
549
550
  [currentPage, PAGE, handleReadMessage, homeComponentRef,];
550
- var __VLS_46;
551
+ var __VLS_53;
551
552
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
552
553
  // @ts-ignore
553
554
  [currentPage, PAGE,];
554
555
  /** @type {[typeof CustomerDetail, ]} */ ;
555
556
  // @ts-ignore
556
- const __VLS_55 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
557
+ const __VLS_62 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
557
558
  ref: "customerDetailRef",
558
559
  receiverId: (__VLS_ctx.receiverId),
559
560
  ...{ class: "w-full h-full" },
560
561
  responsive: (__VLS_ctx.responsiveRender),
561
562
  }));
562
- const __VLS_56 = __VLS_55({
563
+ const __VLS_63 = __VLS_62({
563
564
  ref: "customerDetailRef",
564
565
  receiverId: (__VLS_ctx.receiverId),
565
566
  ...{ class: "w-full h-full" },
566
567
  responsive: (__VLS_ctx.responsiveRender),
567
- }, ...__VLS_functionalComponentArgsRest(__VLS_55));
568
+ }, ...__VLS_functionalComponentArgsRest(__VLS_62));
568
569
  /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
569
- var __VLS_58 = {};
570
+ var __VLS_65 = {};
570
571
  // @ts-ignore
571
572
  [responsiveRender, receiverId, customerDetailRef,];
572
- var __VLS_57;
573
+ var __VLS_64;
573
574
  }
574
575
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
575
576
  // @ts-ignore
576
577
  [currentPage, PAGE,];
577
578
  /** @type {[typeof CustomerCheckIn, ]} */ ;
578
579
  // @ts-ignore
579
- const __VLS_61 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
580
+ const __VLS_68 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
580
581
  ...{ class: "w-full h-full" },
581
582
  }));
582
- const __VLS_62 = __VLS_61({
583
+ const __VLS_69 = __VLS_68({
583
584
  ...{ class: "w-full h-full" },
584
- }, ...__VLS_functionalComponentArgsRest(__VLS_61));
585
+ }, ...__VLS_functionalComponentArgsRest(__VLS_68));
585
586
  }
586
587
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
587
588
  // @ts-ignore
588
589
  [currentPage, PAGE,];
589
590
  /** @type {[typeof CustomerAppointment, ]} */ ;
590
591
  // @ts-ignore
591
- const __VLS_65 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
592
+ const __VLS_72 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
592
593
  ...{ class: "w-full h-full" },
593
594
  }));
594
- const __VLS_66 = __VLS_65({
595
+ const __VLS_73 = __VLS_72({
595
596
  ...{ class: "w-full h-full" },
596
- }, ...__VLS_functionalComponentArgsRest(__VLS_65));
597
+ }, ...__VLS_functionalComponentArgsRest(__VLS_72));
597
598
  }
598
599
  if (__VLS_ctx.currentPage != __VLS_ctx.PAGE.HOME) {
599
600
  // @ts-ignore
600
601
  [currentPage, PAGE,];
601
602
  /** @type {[typeof MobileFooter, ]} */ ;
602
603
  // @ts-ignore
603
- const __VLS_69 = __VLS_asFunctionalComponent(MobileFooter, new MobileFooter({
604
+ const __VLS_76 = __VLS_asFunctionalComponent(MobileFooter, new MobileFooter({
604
605
  ...{ class: "shrink-0" },
605
606
  }));
606
- const __VLS_70 = __VLS_69({
607
+ const __VLS_77 = __VLS_76({
607
608
  ...{ class: "shrink-0" },
608
- }, ...__VLS_functionalComponentArgsRest(__VLS_69));
609
+ }, ...__VLS_functionalComponentArgsRest(__VLS_76));
609
610
  }
610
611
  }
611
612
  else {
@@ -614,29 +615,29 @@ else {
614
615
  });
615
616
  /** @type {[typeof ChatList, ]} */ ;
616
617
  // @ts-ignore
617
- const __VLS_73 = __VLS_asFunctionalComponent(ChatList, new ChatList({
618
+ const __VLS_80 = __VLS_asFunctionalComponent(ChatList, new ChatList({
618
619
  ...{ 'onSelectReceiver': {} },
619
620
  ref: "chatListRef",
620
621
  ...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
621
622
  responsive: (__VLS_ctx.responsiveRender),
622
623
  receiverId: (__VLS_ctx.receiverId),
623
624
  }));
624
- const __VLS_74 = __VLS_73({
625
+ const __VLS_81 = __VLS_80({
625
626
  ...{ 'onSelectReceiver': {} },
626
627
  ref: "chatListRef",
627
628
  ...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
628
629
  responsive: (__VLS_ctx.responsiveRender),
629
630
  receiverId: (__VLS_ctx.receiverId),
630
- }, ...__VLS_functionalComponentArgsRest(__VLS_73));
631
- let __VLS_76;
632
- let __VLS_77;
633
- const __VLS_78 = ({ selectReceiver: {} },
631
+ }, ...__VLS_functionalComponentArgsRest(__VLS_80));
632
+ let __VLS_83;
633
+ let __VLS_84;
634
+ const __VLS_85 = ({ selectReceiver: {} },
634
635
  { onSelectReceiver: (__VLS_ctx.selectReceiver) });
635
636
  /** @type {typeof __VLS_ctx.chatListRef} */ ;
636
- var __VLS_79 = {};
637
+ var __VLS_86 = {};
637
638
  // @ts-ignore
638
639
  [responsiveRender, receiverId, selectReceiver, chatListRef,];
639
- var __VLS_75;
640
+ var __VLS_82;
640
641
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
641
642
  ...{ class: "chat-box-white grow flex flex-col h-full pt-6 overflow-hidden" },
642
643
  });
@@ -648,13 +649,7 @@ else {
648
649
  });
649
650
  __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
650
651
  ...{ onClick: (...[$event]) => {
651
- if (!!(!__VLS_ctx.isRouterReady))
652
- return;
653
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
654
- return;
655
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
656
- return;
657
- if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
652
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
658
653
  return;
659
654
  if (!!(__VLS_ctx.responsiveRender == 'mobile'))
660
655
  return;
@@ -668,8 +663,8 @@ else {
668
663
  });
669
664
  /** @type {[typeof IconArrowLeft, ]} */ ;
670
665
  // @ts-ignore
671
- const __VLS_82 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
672
- const __VLS_83 = __VLS_82({}, ...__VLS_functionalComponentArgsRest(__VLS_82));
666
+ const __VLS_89 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
667
+ const __VLS_90 = __VLS_89({}, ...__VLS_functionalComponentArgsRest(__VLS_89));
673
668
  __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
674
669
  ...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
675
670
  });
@@ -682,7 +677,7 @@ else {
682
677
  });
683
678
  /** @type {[typeof HomeComponent, ]} */ ;
684
679
  // @ts-ignore
685
- const __VLS_86 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
680
+ const __VLS_93 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
686
681
  ...{ 'onCall': {} },
687
682
  ...{ 'onInputFocus': {} },
688
683
  ref: "homeComponentRef",
@@ -690,72 +685,72 @@ else {
690
685
  ...{ class: "h-full" },
691
686
  responsive: (__VLS_ctx.responsiveRender),
692
687
  }));
693
- const __VLS_87 = __VLS_86({
688
+ const __VLS_94 = __VLS_93({
694
689
  ...{ 'onCall': {} },
695
690
  ...{ 'onInputFocus': {} },
696
691
  ref: "homeComponentRef",
697
692
  receiverId: (__VLS_ctx.receiverId),
698
693
  ...{ class: "h-full" },
699
694
  responsive: (__VLS_ctx.responsiveRender),
700
- }, ...__VLS_functionalComponentArgsRest(__VLS_86));
701
- let __VLS_89;
702
- let __VLS_90;
703
- const __VLS_91 = ({ call: {} },
695
+ }, ...__VLS_functionalComponentArgsRest(__VLS_93));
696
+ let __VLS_96;
697
+ let __VLS_97;
698
+ const __VLS_98 = ({ call: {} },
704
699
  { onCall: (__VLS_ctx.handleCall) });
705
- const __VLS_92 = ({ inputFocus: {} },
700
+ const __VLS_99 = ({ inputFocus: {} },
706
701
  { onInputFocus: (__VLS_ctx.handleReadMessage) });
707
702
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME && __VLS_ctx.receiverId) }, null, null);
708
703
  /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
709
- var __VLS_93 = {};
704
+ var __VLS_100 = {};
710
705
  // @ts-ignore
711
706
  [currentPage, PAGE, responsiveRender, receiverId, receiverId, handleCall, handleReadMessage, homeComponentRef,];
712
- var __VLS_88;
707
+ var __VLS_95;
713
708
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
714
709
  // @ts-ignore
715
710
  [currentPage, PAGE,];
716
711
  /** @type {[typeof CustomerDetail, ]} */ ;
717
712
  // @ts-ignore
718
- const __VLS_96 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
713
+ const __VLS_103 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
719
714
  ref: "customerDetailRef",
720
715
  receiverId: (__VLS_ctx.receiverId),
721
716
  ...{ class: "h-full" },
722
717
  responsive: (__VLS_ctx.responsiveRender),
723
718
  }));
724
- const __VLS_97 = __VLS_96({
719
+ const __VLS_104 = __VLS_103({
725
720
  ref: "customerDetailRef",
726
721
  receiverId: (__VLS_ctx.receiverId),
727
722
  ...{ class: "h-full" },
728
723
  responsive: (__VLS_ctx.responsiveRender),
729
- }, ...__VLS_functionalComponentArgsRest(__VLS_96));
724
+ }, ...__VLS_functionalComponentArgsRest(__VLS_103));
730
725
  /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
731
- var __VLS_99 = {};
726
+ var __VLS_106 = {};
732
727
  // @ts-ignore
733
728
  [responsiveRender, receiverId, customerDetailRef,];
734
- var __VLS_98;
729
+ var __VLS_105;
735
730
  }
736
731
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
737
732
  // @ts-ignore
738
733
  [currentPage, PAGE,];
739
734
  /** @type {[typeof CustomerCheckIn, ]} */ ;
740
735
  // @ts-ignore
741
- const __VLS_102 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
736
+ const __VLS_109 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
742
737
  ...{ class: "h-full" },
743
738
  }));
744
- const __VLS_103 = __VLS_102({
739
+ const __VLS_110 = __VLS_109({
745
740
  ...{ class: "h-full" },
746
- }, ...__VLS_functionalComponentArgsRest(__VLS_102));
741
+ }, ...__VLS_functionalComponentArgsRest(__VLS_109));
747
742
  }
748
743
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
749
744
  // @ts-ignore
750
745
  [currentPage, PAGE,];
751
746
  /** @type {[typeof CustomerAppointment, ]} */ ;
752
747
  // @ts-ignore
753
- const __VLS_106 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
748
+ const __VLS_113 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
754
749
  ...{ class: "h-full" },
755
750
  }));
756
- const __VLS_107 = __VLS_106({
751
+ const __VLS_114 = __VLS_113({
757
752
  ...{ class: "h-full" },
758
- }, ...__VLS_functionalComponentArgsRest(__VLS_106));
753
+ }, ...__VLS_functionalComponentArgsRest(__VLS_113));
759
754
  }
760
755
  }
761
756
  }
@@ -767,6 +762,7 @@ else {
767
762
  /** @type {__VLS_StyleScopedClasses['m-auto']} */ ;
768
763
  /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
769
764
  /** @type {__VLS_StyleScopedClasses['sc-full']} */ ;
765
+ /** @type {__VLS_StyleScopedClasses['mt-10']} */ ;
770
766
  /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
771
767
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
772
768
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
@@ -865,7 +861,7 @@ else {
865
861
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
866
862
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
867
863
  // @ts-ignore
868
- var __VLS_25 = __VLS_24, __VLS_42 = __VLS_41, __VLS_53 = __VLS_52, __VLS_59 = __VLS_58, __VLS_80 = __VLS_79, __VLS_94 = __VLS_93, __VLS_100 = __VLS_99;
864
+ var __VLS_32 = __VLS_31, __VLS_49 = __VLS_48, __VLS_60 = __VLS_59, __VLS_66 = __VLS_65, __VLS_87 = __VLS_86, __VLS_101 = __VLS_100, __VLS_107 = __VLS_106;
869
865
  const __VLS_export = (await import('vue')).defineComponent({
870
866
  setup: () => (__VLS_exposed),
871
867
  __typeEmits: {},
@@ -1,5 +1,6 @@
1
1
  /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
2
  import Avatar from '../../../components/chat/customer/Avatar.vue';
3
+ import { dataProfile } from '../../../utils/chat/auth';
3
4
  import { computed, nextTick } from 'vue';
4
5
  import { MessageState } from '../../../constant/message';
5
6
  import IconPhoneCancel from '../../../assets/icons/call/IconPhoneCancel.vue';
@@ -193,19 +194,25 @@ if (__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyM
193
194
  (__VLS_ctx.getCallDuration(__VLS_ctx.message?.duration ?? 0));
194
195
  // @ts-ignore
195
196
  [message, getCallDuration,];
196
- __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
197
- ...{ onClick: (...[$event]) => {
198
- if (!(__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyMessage))
199
- return;
200
- if (!(__VLS_ctx.message.is_call == 1))
201
- return;
202
- __VLS_ctx.emit('callAgain');
203
- // @ts-ignore
204
- [emit,];
205
- } },
206
- ...{ class: "flex-center h-10 rounded-xl bg-chat-haze-200 font-semibold" },
207
- });
208
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({});
197
+ if (__VLS_ctx.dataProfile?.user_type == 'tenant') {
198
+ // @ts-ignore
199
+ [dataProfile,];
200
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
201
+ ...{ onClick: (...[$event]) => {
202
+ if (!(__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyMessage))
203
+ return;
204
+ if (!(__VLS_ctx.message.is_call == 1))
205
+ return;
206
+ if (!(__VLS_ctx.dataProfile?.user_type == 'tenant'))
207
+ return;
208
+ __VLS_ctx.emit('callAgain');
209
+ // @ts-ignore
210
+ [emit,];
211
+ } },
212
+ ...{ class: "flex-center h-10 rounded-xl bg-chat-haze-200 font-semibold" },
213
+ });
214
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({});
215
+ }
209
216
  }
210
217
  else if (__VLS_ctx.message.message) {
211
218
  // @ts-ignore
@@ -212,6 +212,23 @@ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
212
212
  var __VLS_8;
213
213
  }
214
214
  var __VLS_2;
215
+ const __VLS_13 = {}.EmojiPicker;
216
+ /** @type {[typeof __VLS_components.EmojiPicker, typeof __VLS_components.emojiPicker, ]} */ ;
217
+ // @ts-ignore
218
+ EmojiPicker;
219
+ // @ts-ignore
220
+ const __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13({
221
+ ...{ class: "opacity-0 pointer-events-none absolute" },
222
+ native: (true),
223
+ offset: (2),
224
+ hideSearch: true,
225
+ }));
226
+ const __VLS_15 = __VLS_14({
227
+ ...{ class: "opacity-0 pointer-events-none absolute" },
228
+ native: (true),
229
+ offset: (2),
230
+ hideSearch: true,
231
+ }, ...__VLS_functionalComponentArgsRest(__VLS_14));
215
232
  __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
216
233
  ...{ onClick: (...[$event]) => {
217
234
  __VLS_ctx.handleSendMessage('message');
@@ -222,8 +239,8 @@ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
222
239
  });
223
240
  /** @type {[typeof IconPlan, ]} */ ;
224
241
  // @ts-ignore
225
- const __VLS_13 = __VLS_asFunctionalComponent(IconPlan, new IconPlan({}));
226
- const __VLS_14 = __VLS_13({}, ...__VLS_functionalComponentArgsRest(__VLS_13));
242
+ const __VLS_18 = __VLS_asFunctionalComponent(IconPlan, new IconPlan({}));
243
+ const __VLS_19 = __VLS_18({}, ...__VLS_functionalComponentArgsRest(__VLS_18));
227
244
  __VLS_asFunctionalElement(__VLS_elements.label, __VLS_elements.label)({
228
245
  ...{ class: "shrink-0 cursor-pointer relative -translate-y-1" },
229
246
  });
@@ -242,12 +259,12 @@ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
242
259
  });
243
260
  /** @type {[typeof IconPlus, ]} */ ;
244
261
  // @ts-ignore
245
- const __VLS_17 = __VLS_asFunctionalComponent(IconPlus, new IconPlus({
262
+ const __VLS_22 = __VLS_asFunctionalComponent(IconPlus, new IconPlus({
246
263
  ...{ class: "text-white" },
247
264
  }));
248
- const __VLS_18 = __VLS_17({
265
+ const __VLS_23 = __VLS_22({
249
266
  ...{ class: "text-white" },
250
- }, ...__VLS_functionalComponentArgsRest(__VLS_17));
267
+ }, ...__VLS_functionalComponentArgsRest(__VLS_22));
251
268
  /** @type {__VLS_StyleScopedClasses['z-10']} */ ;
252
269
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
253
270
  /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
@@ -273,6 +290,9 @@ const __VLS_18 = __VLS_17({
273
290
  /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
274
291
  /** @type {__VLS_StyleScopedClasses['w-10']} */ ;
275
292
  /** @type {__VLS_StyleScopedClasses['!w-[300px]']} */ ;
293
+ /** @type {__VLS_StyleScopedClasses['opacity-0']} */ ;
294
+ /** @type {__VLS_StyleScopedClasses['pointer-events-none']} */ ;
295
+ /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
276
296
  /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
277
297
  /** @type {__VLS_StyleScopedClasses['w-10']} */ ;
278
298
  /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
@@ -88,7 +88,7 @@ onMounted(async () => {
88
88
  if (dataProfile.value?.tenant_phone) {
89
89
  const token = await getPlivoAccessToken();
90
90
  await plivoLogin({ token });
91
- setTimeout(refreshToken, 1000);
91
+ setTimeout(refreshToken, 15 * 60 * 1000);
92
92
  }
93
93
  }
94
94
  catch {
@@ -8,4 +8,5 @@ export var PAGE;
8
8
  PAGE["CHAT_LIST"] = "chat_list";
9
9
  PAGE["REGISTER_TENANT"] = "register_tenant";
10
10
  PAGE["REGISTER_SUCCESS"] = "register_success";
11
+ PAGE["NOT_TENANT_PHONE"] = "not_tenant_phone";
11
12
  })(PAGE || (PAGE = {}));