@phonghq/go-chat 1.0.73 → 1.0.74

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.
@@ -0,0 +1,14 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ weight: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
+ weight: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }>> & Readonly<{}>, {
12
+ weight: string;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
+ export default _default;
@@ -0,0 +1,42 @@
1
+ /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ const props = defineProps({
3
+ weight: {
4
+ type: String,
5
+ default: '2'
6
+ },
7
+ });
8
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
9
+ const __VLS_ctx = {
10
+ ...{},
11
+ ...{},
12
+ ...{},
13
+ ...{},
14
+ };
15
+ let __VLS_elements;
16
+ let __VLS_components;
17
+ let __VLS_directives;
18
+ __VLS_asFunctionalElement(__VLS_elements.svg, __VLS_elements.svg)({
19
+ width: "24",
20
+ height: "24",
21
+ viewBox: "0 0 24 24",
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ });
25
+ __VLS_asFunctionalElement(__VLS_elements.path)({
26
+ d: "M3 10H21M7 3V5M17 3V5M6.2 21H17.8C18.9201 21 19.4802 21 19.908 20.782C20.2843 20.5903 20.5903 20.2843 20.782 19.908C21 19.4802 21 18.9201 21 17.8V8.2C21 7.07989 21 6.51984 20.782 6.09202C20.5903 5.71569 20.2843 5.40973 19.908 5.21799C19.4802 5 18.9201 5 17.8 5H6.2C5.0799 5 4.51984 5 4.09202 5.21799C3.71569 5.40973 3.40973 5.71569 3.21799 6.09202C3 6.51984 3 7.07989 3 8.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z",
27
+ stroke: "currentColor",
28
+ 'stroke-width': (__VLS_ctx.weight),
29
+ 'stroke-linecap': "round",
30
+ 'stroke-linejoin': "round",
31
+ });
32
+ // @ts-ignore
33
+ [weight,];
34
+ const __VLS_export = (await import('vue')).defineComponent({
35
+ props: {
36
+ weight: {
37
+ type: String,
38
+ default: '2'
39
+ },
40
+ },
41
+ });
42
+ export default {};
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,22 @@
1
+ /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
3
+ const __VLS_ctx = {};
4
+ let __VLS_elements;
5
+ let __VLS_components;
6
+ let __VLS_directives;
7
+ __VLS_asFunctionalElement(__VLS_elements.svg, __VLS_elements.svg)({
8
+ width: "24",
9
+ height: "24",
10
+ viewBox: "0 0 20 20",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ fill: "none",
13
+ });
14
+ __VLS_asFunctionalElement(__VLS_elements.path)({
15
+ stroke: "currentColor",
16
+ 'stroke-linecap': "round",
17
+ 'stroke-linejoin': "round",
18
+ 'stroke-width': "2",
19
+ d: "M17 5L8 15l-5-4",
20
+ });
21
+ const __VLS_export = (await import('vue')).defineComponent({});
22
+ export default {};
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,20 @@
1
+ /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
3
+ const __VLS_ctx = {};
4
+ let __VLS_elements;
5
+ let __VLS_components;
6
+ let __VLS_directives;
7
+ __VLS_asFunctionalElement(__VLS_elements.svg, __VLS_elements.svg)({
8
+ width: "24",
9
+ height: "24",
10
+ viewBox: "0 0 20 20",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ fill: "none",
13
+ });
14
+ __VLS_asFunctionalElement(__VLS_elements.path)({
15
+ fill: "currentColor",
16
+ 'fill-rule': "evenodd",
17
+ d: "M10 3a7 7 0 100 14 7 7 0 000-14zm-9 7a9 9 0 1118 0 9 9 0 01-18 0zm8-4a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1zm.01 8a1 1 0 102 0V9a1 1 0 10-2 0v5z",
18
+ });
19
+ const __VLS_export = (await import('vue')).defineComponent({});
20
+ export default {};
@@ -0,0 +1,14 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ weight: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
+ weight: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }>> & Readonly<{}>, {
12
+ weight: string;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
+ export default _default;
@@ -0,0 +1,42 @@
1
+ /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ const props = defineProps({
3
+ weight: {
4
+ type: String,
5
+ default: '2'
6
+ },
7
+ });
8
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
9
+ const __VLS_ctx = {
10
+ ...{},
11
+ ...{},
12
+ ...{},
13
+ ...{},
14
+ };
15
+ let __VLS_elements;
16
+ let __VLS_components;
17
+ let __VLS_directives;
18
+ __VLS_asFunctionalElement(__VLS_elements.svg, __VLS_elements.svg)({
19
+ width: "24",
20
+ height: "24",
21
+ viewBox: "0 0 24 24",
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ });
25
+ __VLS_asFunctionalElement(__VLS_elements.path)({
26
+ d: "M21 9L21 3M21 3H15M21 3L13 11M10 5H7.8C6.11984 5 5.27976 5 4.63803 5.32698C4.07354 5.6146 3.6146 6.07354 3.32698 6.63803C3 7.27976 3 8.11984 3 9.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21H14.2C15.8802 21 16.7202 21 17.362 20.673C17.9265 20.3854 18.3854 19.9265 18.673 19.362C19 18.7202 19 17.8802 19 16.2V14",
27
+ stroke: "currentColor",
28
+ 'stroke-width': (__VLS_ctx.weight),
29
+ 'stroke-linecap': "round",
30
+ 'stroke-linejoin': "round",
31
+ });
32
+ // @ts-ignore
33
+ [weight,];
34
+ const __VLS_export = (await import('vue')).defineComponent({
35
+ props: {
36
+ weight: {
37
+ type: String,
38
+ default: '2'
39
+ },
40
+ },
41
+ });
42
+ export default {};
@@ -9,7 +9,7 @@ import CustomerCheckIn from '../chat/page/customer-check-in/CustomerCheckIn.vue'
9
9
  import CustomerAppointment from '../chat/page/customer-appointment/CustomerAppointment.vue';
10
10
  import { isRouterReady, useInitData } from '../composable/useInitData';
11
11
  import Error from '../chat/page/error/Error.vue';
12
- import { currentPage, routerPush } from '../utils/chat/chat-router';
12
+ import { currentPage, routerBack, routerPush } from '../utils/chat/chat-router';
13
13
  import BaseSpin from '../components/chat/common/spin/BaseSpin.vue';
14
14
  import Calling from '../components/chat/call/Calling.vue';
15
15
  import { dataProfile, logout } from '../utils/chat/store/auth';
@@ -35,16 +35,12 @@ const routerConfig = [
35
35
  },
36
36
  {
37
37
  id: PAGE.CUSTOMER_APPOINTMENT,
38
- backFunc: () => {
39
- routerPush(PAGE.CUSTOMER_DETAIL);
40
- },
38
+ backFunc: routerBack,
41
39
  backTitle: 'Appointments'
42
40
  },
43
41
  {
44
42
  id: PAGE.CUSTOMER_CHECK_IN,
45
- backFunc: () => {
46
- routerPush(PAGE.CUSTOMER_DETAIL);
47
- },
43
+ backFunc: routerBack,
48
44
  backTitle: 'Checkins'
49
45
  }
50
46
  ];
@@ -83,16 +79,12 @@ const routerMobileConfig = computed(() => [
83
79
  },
84
80
  {
85
81
  id: PAGE.CUSTOMER_APPOINTMENT,
86
- backFunc: () => {
87
- routerPush(PAGE.CUSTOMER_DETAIL);
88
- },
82
+ backFunc: routerBack,
89
83
  backTitle: 'Appointments'
90
84
  },
91
85
  {
92
86
  id: PAGE.CUSTOMER_CHECK_IN,
93
- backFunc: () => {
94
- routerPush(PAGE.CUSTOMER_DETAIL);
95
- },
87
+ backFunc: routerBack,
96
88
  backTitle: 'Checkins'
97
89
  }
98
90
  ]);
@@ -668,21 +660,25 @@ else {
668
660
  ...{ 'onCall': {} },
669
661
  ...{ 'onBack': {} },
670
662
  ...{ 'onInputFocus': {} },
663
+ ...{ 'onViewAppointment': {} },
671
664
  ref: "homeComponentRef",
672
665
  receiverId: (__VLS_ctx.receiverId),
673
666
  ...{ class: "h-full grow" },
674
667
  conversation: (__VLS_ctx.currentConversation),
675
668
  responsive: (__VLS_ctx.responsiveRender),
669
+ parentPageName: (__VLS_ctx.parentPageName ?? ''),
676
670
  }));
677
671
  const __VLS_69 = __VLS_68({
678
672
  ...{ 'onCall': {} },
679
673
  ...{ 'onBack': {} },
680
674
  ...{ 'onInputFocus': {} },
675
+ ...{ 'onViewAppointment': {} },
681
676
  ref: "homeComponentRef",
682
677
  receiverId: (__VLS_ctx.receiverId),
683
678
  ...{ class: "h-full grow" },
684
679
  conversation: (__VLS_ctx.currentConversation),
685
680
  responsive: (__VLS_ctx.responsiveRender),
681
+ parentPageName: (__VLS_ctx.parentPageName ?? ''),
686
682
  }, ...__VLS_functionalComponentArgsRest(__VLS_68));
687
683
  let __VLS_71;
688
684
  let __VLS_72;
@@ -702,69 +698,85 @@ else {
702
698
  return;
703
699
  __VLS_ctx.currentPageConfig.backFunc?.();
704
700
  // @ts-ignore
705
- [responsiveRender, currentPageConfig, receiverId, currentConversation, handleCall,];
701
+ [responsiveRender, currentPageConfig, receiverId, currentConversation, parentPageName, handleCall,];
706
702
  } });
707
703
  const __VLS_75 = ({ inputFocus: {} },
708
704
  { onInputFocus: (__VLS_ctx.handleReadMessage) });
705
+ const __VLS_76 = ({ viewAppointment: {} },
706
+ { onViewAppointment: (...[$event]) => {
707
+ if (!!(!__VLS_ctx.isRouterReady))
708
+ return;
709
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
710
+ return;
711
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
712
+ return;
713
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
714
+ return;
715
+ if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
716
+ return;
717
+ __VLS_ctx.emit('booking-admin:viewAppointment', $event);
718
+ // @ts-ignore
719
+ [emit, handleReadMessage,];
720
+ } });
709
721
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME || (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST && __VLS_ctx.responsiveRender != 'mobile')) }, null, null);
710
722
  /** @type {typeof __VLS_ctx.homeComponentRef} */ ;
711
- var __VLS_76 = {};
723
+ var __VLS_77 = {};
712
724
  // @ts-ignore
713
- [currentPage, currentPage, PAGE, PAGE, responsiveRender, handleReadMessage, homeComponentRef,];
725
+ [currentPage, currentPage, PAGE, PAGE, responsiveRender, homeComponentRef,];
714
726
  var __VLS_70;
715
727
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
716
728
  // @ts-ignore
717
729
  [currentPage, PAGE,];
718
730
  /** @type {[typeof CustomerDetail, ]} */ ;
719
731
  // @ts-ignore
720
- const __VLS_79 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
732
+ const __VLS_80 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
721
733
  ref: "customerDetailRef",
722
734
  receiverId: (__VLS_ctx.receiverId),
723
735
  ...{ class: "w-full h-full" },
724
736
  responsive: (__VLS_ctx.responsiveRender),
725
737
  }));
726
- const __VLS_80 = __VLS_79({
738
+ const __VLS_81 = __VLS_80({
727
739
  ref: "customerDetailRef",
728
740
  receiverId: (__VLS_ctx.receiverId),
729
741
  ...{ class: "w-full h-full" },
730
742
  responsive: (__VLS_ctx.responsiveRender),
731
- }, ...__VLS_functionalComponentArgsRest(__VLS_79));
743
+ }, ...__VLS_functionalComponentArgsRest(__VLS_80));
732
744
  /** @type {typeof __VLS_ctx.customerDetailRef} */ ;
733
- var __VLS_82 = {};
745
+ var __VLS_83 = {};
734
746
  // @ts-ignore
735
747
  [responsiveRender, receiverId, customerDetailRef,];
736
- var __VLS_81;
748
+ var __VLS_82;
737
749
  }
738
750
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
739
751
  // @ts-ignore
740
752
  [currentPage, PAGE,];
741
753
  /** @type {[typeof CustomerCheckIn, ]} */ ;
742
754
  // @ts-ignore
743
- const __VLS_85 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
755
+ const __VLS_86 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
744
756
  ...{ class: "w-full h-full" },
745
757
  }));
746
- const __VLS_86 = __VLS_85({
758
+ const __VLS_87 = __VLS_86({
747
759
  ...{ class: "w-full h-full" },
748
- }, ...__VLS_functionalComponentArgsRest(__VLS_85));
760
+ }, ...__VLS_functionalComponentArgsRest(__VLS_86));
749
761
  }
750
762
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
751
763
  // @ts-ignore
752
764
  [currentPage, PAGE,];
753
765
  /** @type {[typeof CustomerAppointment, ]} */ ;
754
766
  // @ts-ignore
755
- const __VLS_89 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
767
+ const __VLS_90 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
756
768
  ...{ 'onBookingAdmin:viewAppointment': {} },
757
769
  ...{ class: "w-full h-full" },
758
770
  isBookingAdmin: (__VLS_ctx.parentPageName == 'booking-admin'),
759
771
  }));
760
- const __VLS_90 = __VLS_89({
772
+ const __VLS_91 = __VLS_90({
761
773
  ...{ 'onBookingAdmin:viewAppointment': {} },
762
774
  ...{ class: "w-full h-full" },
763
775
  isBookingAdmin: (__VLS_ctx.parentPageName == 'booking-admin'),
764
- }, ...__VLS_functionalComponentArgsRest(__VLS_89));
765
- let __VLS_92;
776
+ }, ...__VLS_functionalComponentArgsRest(__VLS_90));
766
777
  let __VLS_93;
767
- const __VLS_94 = ({ 'bookingAdmin:viewAppointment': {} },
778
+ let __VLS_94;
779
+ const __VLS_95 = ({ 'bookingAdmin:viewAppointment': {} },
768
780
  { 'onBookingAdmin:viewAppointment': (...[$event]) => {
769
781
  if (!!(!__VLS_ctx.isRouterReady))
770
782
  return;
@@ -782,11 +794,11 @@ else {
782
794
  // @ts-ignore
783
795
  [emit, parentPageName,];
784
796
  } });
785
- var __VLS_91;
797
+ var __VLS_92;
786
798
  }
787
799
  /** @type {[typeof PhoneNumpad, ]} */ ;
788
800
  // @ts-ignore
789
- const __VLS_96 = __VLS_asFunctionalComponent(PhoneNumpad, new PhoneNumpad({
801
+ const __VLS_97 = __VLS_asFunctionalComponent(PhoneNumpad, new PhoneNumpad({
790
802
  ...{ 'onCall': {} },
791
803
  ...{ 'onMessage': {} },
792
804
  ref: "phoneNumpadRef",
@@ -794,25 +806,25 @@ else {
794
806
  responsive: (__VLS_ctx.responsiveRender),
795
807
  ...{ class: "bg-white shrink-0 border-l layout-border" },
796
808
  }));
797
- const __VLS_97 = __VLS_96({
809
+ const __VLS_98 = __VLS_97({
798
810
  ...{ 'onCall': {} },
799
811
  ...{ 'onMessage': {} },
800
812
  ref: "phoneNumpadRef",
801
813
  hideNumpad: (__VLS_ctx.isLib),
802
814
  responsive: (__VLS_ctx.responsiveRender),
803
815
  ...{ class: "bg-white shrink-0 border-l layout-border" },
804
- }, ...__VLS_functionalComponentArgsRest(__VLS_96));
805
- let __VLS_99;
816
+ }, ...__VLS_functionalComponentArgsRest(__VLS_97));
806
817
  let __VLS_100;
807
- const __VLS_101 = ({ call: {} },
818
+ let __VLS_101;
819
+ const __VLS_102 = ({ call: {} },
808
820
  { onCall: (__VLS_ctx.handleCall) });
809
- const __VLS_102 = ({ message: {} },
821
+ const __VLS_103 = ({ message: {} },
810
822
  { onMessage: (__VLS_ctx.goToConversationRequest) });
811
823
  /** @type {typeof __VLS_ctx.phoneNumpadRef} */ ;
812
- var __VLS_103 = {};
824
+ var __VLS_104 = {};
813
825
  // @ts-ignore
814
826
  [isLib, responsiveRender, handleCall, goToConversationRequest, phoneNumpadRef,];
815
- var __VLS_98;
827
+ var __VLS_99;
816
828
  }
817
829
  /** @type {__VLS_StyleScopedClasses['']} */ ;
818
830
  /** @type {__VLS_StyleScopedClasses['']} */ ;
@@ -906,7 +918,7 @@ else {
906
918
  /** @type {__VLS_StyleScopedClasses['border-l']} */ ;
907
919
  /** @type {__VLS_StyleScopedClasses['layout-border']} */ ;
908
920
  // @ts-ignore
909
- var __VLS_51 = __VLS_50, __VLS_62 = __VLS_61, __VLS_77 = __VLS_76, __VLS_83 = __VLS_82, __VLS_104 = __VLS_103;
921
+ var __VLS_51 = __VLS_50, __VLS_62 = __VLS_61, __VLS_78 = __VLS_77, __VLS_84 = __VLS_83, __VLS_105 = __VLS_104;
910
922
  const __VLS_export = (await import('vue')).defineComponent({
911
923
  setup: () => (__VLS_exposed),
912
924
  __typeEmits: {},
@@ -10,7 +10,7 @@ import IconGroup from '../../../assets/icons/customer-detail/IconGroup.vue';
10
10
  import IconNote from '../../../assets/icons/customer-detail/IconNote.vue';
11
11
  import IconSearch from '../../../assets/icons/customer-detail/IconSearch.vue';
12
12
  import IconPin from '../../../assets/icons/customer-detail/IconPin.vue';
13
- import { getUserHistory, user, userHistory } from '../../../utils/chat/store/user';
13
+ import { user, userHistory } from '../../../utils/chat/store/user';
14
14
  import { computed } from 'vue';
15
15
  import { phoneNumberFormat } from '../../../utils/string-helper';
16
16
  import { routerPush } from '../../../utils/chat/chat-router';
@@ -60,11 +60,12 @@ const otherActions = [
60
60
  { icon: IconPin, label: 'Pin Message' },
61
61
  { icon: IconGroup, label: 'Add Groups' }
62
62
  ];
63
- const getData = async () => {
64
- userHistory.value = null;
65
- userHistory.value = await getUserHistory(user.value?.phone?.slice(1) ?? '');
66
- };
67
- getData();
63
+ // const getData = async () => {
64
+ // userHistory.value = null
65
+ // userHistory.value = await getUserHistory(user.value?.phone?.slice(1) ?? '')
66
+ // }
67
+ //
68
+ // getData()
68
69
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
69
70
  const __VLS_defaults = {};
70
71
  const __VLS_ctx = {
@@ -5,7 +5,7 @@ import ScrollEvent from '../../../components/chat/ScrollEvent/ScrollEvent.vue';
5
5
  import NewCustomer from '../../../chat/page/home/NewCustomer.vue';
6
6
  import ChatMessageItem from '../../../chat/page/home/ChatMessageItem.vue';
7
7
  import dayjs from 'dayjs';
8
- import { TIME_ZONE_UTC } from '../../../constant/datetime';
8
+ import { getTimeLocal } from '../../../utils/dayjs-helper';
9
9
  const props = withDefaults(defineProps(), {});
10
10
  const emit = defineEmits();
11
11
  const scrollEventRef = ref(null);
@@ -44,9 +44,9 @@ const isChatStart = (index) => {
44
44
  const isStartNewDate = (index) => {
45
45
  if (index == 0)
46
46
  return true;
47
- const time1 = dayjs.tz(props.message[index - 1].created_at, TIME_ZONE_UTC).local();
48
- const time2 = dayjs.tz(props.message[index].created_at, TIME_ZONE_UTC).local();
49
- return time2.diff(time1, 'day') > 0;
47
+ const time1 = getTimeLocal(props.message[index - 1].created_at);
48
+ const time2 = getTimeLocal(props.message[index].created_at);
49
+ return !!time2 && time2?.date() != time1?.date();
50
50
  };
51
51
  const handleScrollTop = () => {
52
52
  emit('scrollTop');
@@ -6,9 +6,10 @@ import IconPhoneCancel from '../../../assets/icons/call/IconPhoneCancel.vue';
6
6
  import { PLIVO_CALL_STATUS } from '../../../types/chat/call';
7
7
  import IconPhone from '../../../assets/icons/customer-detail/IconPhone.vue';
8
8
  import dayjs from 'dayjs';
9
- import { DATE_FORMATS, TIME_ZONE_UTC } from '../../../constant/datetime';
9
+ import { DATE_FORMATS } from '../../../constant/datetime';
10
10
  import utc from 'dayjs/plugin/utc';
11
11
  import timezone from 'dayjs/plugin/timezone';
12
+ import { getTimeLocal } from '../../../utils/dayjs-helper';
12
13
  // import IconMenuDot from '@/assets/icons/chat/IconMenuDot.vue'
13
14
  dayjs.extend(utc);
14
15
  dayjs.extend(timezone);
@@ -74,14 +75,13 @@ const getMessageStateText = (item) => {
74
75
  }
75
76
  };
76
77
  const getFinishTime = (time) => {
77
- if (!dayjs(time).isValid())
78
- return '';
79
- return dayjs.tz(time, TIME_ZONE_UTC).local().format(DATE_FORMATS.TIME_12_FORMAT);
78
+ return getTimeLocal(time)?.format(DATE_FORMATS.TIME_12_FORMAT) ?? '';
80
79
  };
81
80
  const getStartDate = (time) => {
82
- if (!dayjs(time).isValid())
83
- return '';
84
- return dayjs.tz(time, TIME_ZONE_UTC).local().format('MMM D, YYYY');
81
+ if (getTimeLocal(time)?.date() == dayjs().date()) {
82
+ return 'Today';
83
+ }
84
+ return getTimeLocal(time)?.format(DATE_FORMATS['DATE_FORMAT_MEDIUM']) ?? '';
85
85
  };
86
86
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
87
87
  const __VLS_defaults = {};
@@ -1,10 +1,11 @@
1
1
  import type { IResUser } from '../../../types/message';
2
- import type { PAGE_RESPONSIVE } from '../../../types/chat/global';
2
+ import type { PAGE_RESPONSIVE, PARENT_PAGE_NAME } from '../../../types/chat/global';
3
3
  import type { IConversation } from '../../../types/conversation';
4
4
  type Props = {
5
5
  receiverId: any;
6
6
  responsive: PAGE_RESPONSIVE;
7
7
  conversation: IConversation | null;
8
+ parentPageName: PARENT_PAGE_NAME;
8
9
  };
9
10
  declare const _default: import("vue").DefineComponent<Props, {
10
11
  getData: (data?: any) => Promise<void>;
@@ -17,10 +18,12 @@ declare const _default: import("vue").DefineComponent<Props, {
17
18
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
19
  call: (value: IResUser) => any;
19
20
  back: () => any;
21
+ viewAppointment: (id: any) => any;
20
22
  inputFocus: () => any;
21
23
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
22
24
  onCall?: ((value: IResUser) => any) | undefined;
23
25
  onBack?: (() => any) | undefined;
26
+ onViewAppointment?: ((id: any) => any) | undefined;
24
27
  onInputFocus?: (() => any) | undefined;
25
28
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
29
  export default _default;