@phonghq/go-chat 1.0.10 → 1.0.13
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.
- package/dist/assets/icons/IconAiCheck.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconClose.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +2 -0
- package/dist/chat/App.vue.d.ts +7 -2
- package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +1 -1
- package/dist/chat/page/home/ChatList.vue.d.ts +29 -1
- package/dist/chat/page/home/ChatMessage.vue.d.ts +1 -1
- package/dist/chat/page/home/Home.vue.d.ts +1 -1
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +1 -0
- package/dist/components/chat/call/Calling.vue.d.ts +8 -2
- package/dist/components/chat/common/input/InputSearch.vue.d.ts +1 -1
- package/dist/components/chat/select/SelectBase.vue.d.ts +22 -0
- package/dist/composable/useCallHelper.d.ts +6 -2
- package/dist/composable/useInitData.d.ts +2 -4
- package/dist/go-chat.es.js +24960 -23685
- package/dist/go-chat.umd.js +42 -16
- package/dist/plugins/websocket.d.ts +12 -2
- package/dist/router/index.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/test/assets/icons/IconAiCheck.vue.js +28 -0
- package/dist/test/assets/icons/call/IconClose.vue.js +26 -0
- package/dist/test/assets/icons/call/IconSoundDownload.vue.js +50 -0
- package/dist/test/chat/App.vue.js +145 -90
- package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +6 -5
- package/dist/test/chat/page/home/ChatList.vue.js +30 -9
- package/dist/test/chat/page/home/ChatMessage.vue.js +17 -9
- package/dist/test/chat/page/home/Home.vue.js +3 -3
- package/dist/test/chat/page/home/NewCustomer.vue.js +0 -12
- package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +7 -1
- package/dist/test/components/chat/call/Calling.vue.js +198 -76
- package/dist/test/components/chat/common/input/InputSearch.vue.js +2 -2
- package/dist/test/components/chat/select/SelectBase.vue.js +98 -0
- package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +0 -1
- package/dist/test/composable/data.json +32 -0
- package/dist/test/composable/useCallHelper.js +143 -33
- package/dist/test/composable/useDigibot.js +1 -1
- package/dist/test/composable/useInitData.js +17 -12
- package/dist/test/constant/color.js +1 -1
- package/dist/test/plugins/axios.js +2 -1
- package/dist/test/plugins/mqtt.js +11 -5
- package/dist/test/plugins/websocket.js +84 -4
- package/dist/test/router/index.js +39 -0
- package/dist/test/utils/chat/auth.js +10 -2
- package/dist/test/utils/chat/call.js +32 -5
- package/dist/test/utils/chat/phone-string.js +4 -0
- package/dist/test/utils/chat/user.js +7 -2
- package/dist/test/views/NotFound.vue.js +47 -0
- package/dist/test/views/TenantPhone.vue.js +270 -0
- package/dist/types/chat/global.d.ts +4 -0
- package/dist/utils/chat/auth.d.ts +5 -1
- package/dist/utils/chat/call.d.ts +5 -2
- package/dist/utils/chat/phone-string.d.ts +1 -0
- package/dist/utils/chat/user.d.ts +4 -0
- package/dist/views/NotFound.vue.d.ts +2 -0
- package/dist/views/TenantPhone.vue.d.ts +2 -0
- package/package.json +1 -1
|
@@ -14,7 +14,6 @@ import BaseSpin from '../components/chat/common/spin/BaseSpin.vue';
|
|
|
14
14
|
import Calling from '../components/chat/call/Calling.vue';
|
|
15
15
|
import { logout } from '../utils/chat/auth';
|
|
16
16
|
import MobileFooter from '../components/chat/layout/mobile/Footer.vue';
|
|
17
|
-
import { initWebSocket } from '../plugins/websocket';
|
|
18
17
|
import '../style/index.scss';
|
|
19
18
|
import { useDebounce } from '../utils/debounce';
|
|
20
19
|
const routerConfig = [
|
|
@@ -32,6 +31,13 @@ const routerConfig = [
|
|
|
32
31
|
routerPush(PAGE.CUSTOMER_DETAIL);
|
|
33
32
|
},
|
|
34
33
|
backTitle: 'Appointments'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: PAGE.CUSTOMER_CHECK_IN,
|
|
37
|
+
backFunc: () => {
|
|
38
|
+
routerPush(PAGE.CUSTOMER_DETAIL);
|
|
39
|
+
},
|
|
40
|
+
backTitle: 'Checkins'
|
|
35
41
|
}
|
|
36
42
|
];
|
|
37
43
|
const routerMobileConfig = computed(() => [
|
|
@@ -64,11 +70,19 @@ const routerMobileConfig = computed(() => [
|
|
|
64
70
|
routerPush(PAGE.CUSTOMER_DETAIL);
|
|
65
71
|
},
|
|
66
72
|
backTitle: 'Appointments'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: PAGE.CUSTOMER_CHECK_IN,
|
|
76
|
+
backFunc: () => {
|
|
77
|
+
routerPush(PAGE.CUSTOMER_DETAIL);
|
|
78
|
+
},
|
|
79
|
+
backTitle: 'Checkins'
|
|
67
80
|
}
|
|
68
81
|
]);
|
|
69
82
|
const props = withDefaults(defineProps(), {
|
|
70
83
|
response: 'tablet'
|
|
71
84
|
});
|
|
85
|
+
const emit = defineEmits();
|
|
72
86
|
const { initPage } = useInitData();
|
|
73
87
|
onMounted(() => {
|
|
74
88
|
getResponsiveObserver();
|
|
@@ -86,6 +100,8 @@ const currentPageConfig = computed(() => {
|
|
|
86
100
|
const responsiveRender = computed(() => {
|
|
87
101
|
return props.response == 'mobile' ? props.response : responsiveObserver.value;
|
|
88
102
|
});
|
|
103
|
+
const list = computed(() => chatListRef.value?.listConversations ?? []);
|
|
104
|
+
const unreadCount = computed(() => list.value?.reduce((total, cur) => total + (cur?.unread_count ?? 0), 0) ?? 0);
|
|
89
105
|
const responsiveObserver = ref('tablet');
|
|
90
106
|
const appChatRef = ref();
|
|
91
107
|
const callingRef = ref(null);
|
|
@@ -94,7 +110,7 @@ const customerDetailRef = ref(null);
|
|
|
94
110
|
const homeComponentRef = ref(null);
|
|
95
111
|
const chatListRef = ref(null);
|
|
96
112
|
const selectReceiver = async (data) => {
|
|
97
|
-
if (receiverId.value != data?.receiver_id) {
|
|
113
|
+
if (receiverId.value != data?.receiver_id || responsiveRender.value === 'mobile') {
|
|
98
114
|
if (currentPage.value != PAGE.HOME) {
|
|
99
115
|
routerPush(PAGE.HOME);
|
|
100
116
|
}
|
|
@@ -103,9 +119,11 @@ const selectReceiver = async (data) => {
|
|
|
103
119
|
chatListRef.value?.handleReadMessage();
|
|
104
120
|
homeComponentRef.value?.getData(data);
|
|
105
121
|
}
|
|
122
|
+
console.log(list.value);
|
|
106
123
|
};
|
|
107
124
|
const handleCall = (user) => {
|
|
108
125
|
callingRef.value?.startCall(user);
|
|
126
|
+
// callingRef.value?.startAnswer('16013818811')
|
|
109
127
|
};
|
|
110
128
|
const getResponsiveObserver = useDebounce(() => {
|
|
111
129
|
// const div = document.getElementById('appChatMain')
|
|
@@ -126,8 +144,9 @@ const getResponsiveObserver = useDebounce(() => {
|
|
|
126
144
|
}
|
|
127
145
|
}
|
|
128
146
|
}, 50);
|
|
129
|
-
|
|
130
|
-
|
|
147
|
+
initPage({ props: props, response: props.response });
|
|
148
|
+
let __VLS_exposed;
|
|
149
|
+
defineExpose({ unreadCount });
|
|
131
150
|
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
132
151
|
const __VLS_defaults = {
|
|
133
152
|
response: 'tablet'
|
|
@@ -137,18 +156,20 @@ const __VLS_ctx = {
|
|
|
137
156
|
...{},
|
|
138
157
|
...{},
|
|
139
158
|
...{},
|
|
159
|
+
...{},
|
|
140
160
|
};
|
|
141
161
|
let __VLS_elements;
|
|
142
162
|
let __VLS_components;
|
|
143
163
|
let __VLS_directives;
|
|
144
164
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
145
|
-
...{ class: "go-chat-main max-w-full
|
|
165
|
+
...{ class: "go-chat-main max-w-full" },
|
|
166
|
+
...{ class: ({ 'p-8': !__VLS_ctx.isLib }) },
|
|
146
167
|
id: "appChatMain",
|
|
147
168
|
ref: "appChatRef",
|
|
148
169
|
});
|
|
149
170
|
/** @type {typeof __VLS_ctx.appChatRef} */ ;
|
|
150
171
|
// @ts-ignore
|
|
151
|
-
[appChatRef,];
|
|
172
|
+
[isLib, appChatRef,];
|
|
152
173
|
if (!__VLS_ctx.isRouterReady) {
|
|
153
174
|
// @ts-ignore
|
|
154
175
|
[isRouterReady,];
|
|
@@ -172,22 +193,38 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
172
193
|
// @ts-ignore
|
|
173
194
|
[responsiveRender,];
|
|
174
195
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
175
|
-
...{ class: "relative flex flex-col mx-auto w-
|
|
196
|
+
...{ class: "relative flex flex-col mx-auto w-full max-w-[350px] h-full bg-[#F9FAFC] overflow-hidden chat-mobile pt-4" },
|
|
176
197
|
});
|
|
177
198
|
/** @type {[typeof Calling, ]} */ ;
|
|
178
199
|
// @ts-ignore
|
|
179
200
|
const __VLS_8 = __VLS_asFunctionalComponent(Calling, new Calling({
|
|
201
|
+
...{ 'onUserCalling': {} },
|
|
180
202
|
ref: "callingRef",
|
|
181
203
|
responsive: (__VLS_ctx.responsiveRender),
|
|
182
204
|
}));
|
|
183
205
|
const __VLS_9 = __VLS_8({
|
|
206
|
+
...{ 'onUserCalling': {} },
|
|
184
207
|
ref: "callingRef",
|
|
185
208
|
responsive: (__VLS_ctx.responsiveRender),
|
|
186
209
|
}, ...__VLS_functionalComponentArgsRest(__VLS_8));
|
|
210
|
+
let __VLS_11;
|
|
211
|
+
let __VLS_12;
|
|
212
|
+
const __VLS_13 = ({ userCalling: {} },
|
|
213
|
+
{ onUserCalling: (...[$event]) => {
|
|
214
|
+
if (!!(!__VLS_ctx.isRouterReady))
|
|
215
|
+
return;
|
|
216
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
|
|
217
|
+
return;
|
|
218
|
+
if (!(__VLS_ctx.responsiveRender == 'mobile'))
|
|
219
|
+
return;
|
|
220
|
+
__VLS_ctx.emit('userCalling', $event);
|
|
221
|
+
// @ts-ignore
|
|
222
|
+
[responsiveRender, emit,];
|
|
223
|
+
} });
|
|
187
224
|
/** @type {typeof __VLS_ctx.callingRef} */ ;
|
|
188
|
-
var
|
|
225
|
+
var __VLS_14 = {};
|
|
189
226
|
// @ts-ignore
|
|
190
|
-
[
|
|
227
|
+
[callingRef,];
|
|
191
228
|
var __VLS_10;
|
|
192
229
|
if (__VLS_ctx.currentPageConfig?.backFunc) {
|
|
193
230
|
// @ts-ignore
|
|
@@ -213,8 +250,8 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
213
250
|
});
|
|
214
251
|
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
215
252
|
// @ts-ignore
|
|
216
|
-
const
|
|
217
|
-
const
|
|
253
|
+
const __VLS_17 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
254
|
+
const __VLS_18 = __VLS_17({}, ...__VLS_functionalComponentArgsRest(__VLS_17));
|
|
218
255
|
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
219
256
|
...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
|
|
220
257
|
});
|
|
@@ -227,114 +264,114 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
227
264
|
});
|
|
228
265
|
/** @type {[typeof ChatList, ]} */ ;
|
|
229
266
|
// @ts-ignore
|
|
230
|
-
const
|
|
267
|
+
const __VLS_21 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
231
268
|
...{ 'onSelectReceiver': {} },
|
|
232
269
|
ref: "chatListRef",
|
|
233
270
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
234
|
-
|
|
271
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
235
272
|
receiverId: (__VLS_ctx.receiverId),
|
|
236
273
|
}));
|
|
237
|
-
const
|
|
274
|
+
const __VLS_22 = __VLS_21({
|
|
238
275
|
...{ 'onSelectReceiver': {} },
|
|
239
276
|
ref: "chatListRef",
|
|
240
277
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
241
|
-
|
|
278
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
242
279
|
receiverId: (__VLS_ctx.receiverId),
|
|
243
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
244
|
-
let
|
|
245
|
-
let
|
|
246
|
-
const
|
|
280
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_21));
|
|
281
|
+
let __VLS_24;
|
|
282
|
+
let __VLS_25;
|
|
283
|
+
const __VLS_26 = ({ selectReceiver: {} },
|
|
247
284
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
248
285
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
|
|
249
286
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
250
|
-
var
|
|
287
|
+
var __VLS_27 = {};
|
|
251
288
|
// @ts-ignore
|
|
252
289
|
[currentPage, PAGE, responsiveRender, receiverId, selectReceiver, chatListRef,];
|
|
253
|
-
var
|
|
290
|
+
var __VLS_23;
|
|
254
291
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
255
292
|
// @ts-ignore
|
|
256
|
-
const
|
|
293
|
+
const __VLS_30 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
257
294
|
...{ 'onCall': {} },
|
|
258
295
|
ref: "homeComponentRef",
|
|
259
296
|
receiverId: (__VLS_ctx.receiverId),
|
|
260
297
|
...{ class: "h-full pt-4" },
|
|
261
|
-
|
|
298
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
262
299
|
}));
|
|
263
|
-
const
|
|
300
|
+
const __VLS_31 = __VLS_30({
|
|
264
301
|
...{ 'onCall': {} },
|
|
265
302
|
ref: "homeComponentRef",
|
|
266
303
|
receiverId: (__VLS_ctx.receiverId),
|
|
267
304
|
...{ class: "h-full pt-4" },
|
|
268
|
-
|
|
269
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
270
|
-
let
|
|
271
|
-
let
|
|
272
|
-
const
|
|
305
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
306
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_30));
|
|
307
|
+
let __VLS_33;
|
|
308
|
+
let __VLS_34;
|
|
309
|
+
const __VLS_35 = ({ call: {} },
|
|
273
310
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
274
311
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
|
|
275
312
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
276
|
-
var
|
|
313
|
+
var __VLS_36 = {};
|
|
277
314
|
// @ts-ignore
|
|
278
315
|
[currentPage, PAGE, responsiveRender, receiverId, handleCall, homeComponentRef,];
|
|
279
|
-
var
|
|
316
|
+
var __VLS_32;
|
|
280
317
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
281
318
|
// @ts-ignore
|
|
282
319
|
[currentPage, PAGE,];
|
|
283
320
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
284
321
|
// @ts-ignore
|
|
285
|
-
const
|
|
322
|
+
const __VLS_39 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
286
323
|
ref: "customerDetailRef",
|
|
287
324
|
receiverId: (__VLS_ctx.receiverId),
|
|
288
325
|
...{ class: "h-full" },
|
|
289
|
-
|
|
326
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
290
327
|
}));
|
|
291
|
-
const
|
|
328
|
+
const __VLS_40 = __VLS_39({
|
|
292
329
|
ref: "customerDetailRef",
|
|
293
330
|
receiverId: (__VLS_ctx.receiverId),
|
|
294
331
|
...{ class: "h-full" },
|
|
295
|
-
|
|
296
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
332
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
333
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_39));
|
|
297
334
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
298
|
-
var
|
|
335
|
+
var __VLS_42 = {};
|
|
299
336
|
// @ts-ignore
|
|
300
337
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
301
|
-
var
|
|
338
|
+
var __VLS_41;
|
|
302
339
|
}
|
|
303
340
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
304
341
|
// @ts-ignore
|
|
305
342
|
[currentPage, PAGE,];
|
|
306
343
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
307
344
|
// @ts-ignore
|
|
308
|
-
const
|
|
345
|
+
const __VLS_45 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
309
346
|
...{ class: "h-full" },
|
|
310
347
|
}));
|
|
311
|
-
const
|
|
348
|
+
const __VLS_46 = __VLS_45({
|
|
312
349
|
...{ class: "h-full" },
|
|
313
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
350
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_45));
|
|
314
351
|
}
|
|
315
352
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
316
353
|
// @ts-ignore
|
|
317
354
|
[currentPage, PAGE,];
|
|
318
355
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
319
356
|
// @ts-ignore
|
|
320
|
-
const
|
|
357
|
+
const __VLS_49 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
321
358
|
...{ class: "h-full" },
|
|
322
359
|
}));
|
|
323
|
-
const
|
|
360
|
+
const __VLS_50 = __VLS_49({
|
|
324
361
|
...{ class: "h-full" },
|
|
325
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
362
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_49));
|
|
326
363
|
}
|
|
327
364
|
if (__VLS_ctx.currentPage != __VLS_ctx.PAGE.HOME) {
|
|
328
365
|
// @ts-ignore
|
|
329
366
|
[currentPage, PAGE,];
|
|
330
367
|
/** @type {[typeof MobileFooter, ]} */ ;
|
|
331
368
|
// @ts-ignore
|
|
332
|
-
const
|
|
369
|
+
const __VLS_53 = __VLS_asFunctionalComponent(MobileFooter, new MobileFooter({
|
|
333
370
|
...{ class: "shrink-0" },
|
|
334
371
|
}));
|
|
335
|
-
const
|
|
372
|
+
const __VLS_54 = __VLS_53({
|
|
336
373
|
...{ class: "shrink-0" },
|
|
337
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
374
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_53));
|
|
338
375
|
}
|
|
339
376
|
}
|
|
340
377
|
else {
|
|
@@ -343,29 +380,29 @@ else {
|
|
|
343
380
|
});
|
|
344
381
|
/** @type {[typeof ChatList, ]} */ ;
|
|
345
382
|
// @ts-ignore
|
|
346
|
-
const
|
|
383
|
+
const __VLS_57 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
347
384
|
...{ 'onSelectReceiver': {} },
|
|
348
385
|
ref: "chatListRef",
|
|
349
386
|
...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
|
|
350
|
-
|
|
387
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
351
388
|
receiverId: (__VLS_ctx.receiverId),
|
|
352
389
|
}));
|
|
353
|
-
const
|
|
390
|
+
const __VLS_58 = __VLS_57({
|
|
354
391
|
...{ 'onSelectReceiver': {} },
|
|
355
392
|
ref: "chatListRef",
|
|
356
393
|
...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
|
|
357
|
-
|
|
394
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
358
395
|
receiverId: (__VLS_ctx.receiverId),
|
|
359
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
360
|
-
let
|
|
361
|
-
let
|
|
362
|
-
const
|
|
396
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_57));
|
|
397
|
+
let __VLS_60;
|
|
398
|
+
let __VLS_61;
|
|
399
|
+
const __VLS_62 = ({ selectReceiver: {} },
|
|
363
400
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
364
401
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
365
|
-
var
|
|
402
|
+
var __VLS_63 = {};
|
|
366
403
|
// @ts-ignore
|
|
367
404
|
[responsiveRender, receiverId, selectReceiver, chatListRef,];
|
|
368
|
-
var
|
|
405
|
+
var __VLS_59;
|
|
369
406
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
370
407
|
...{ class: "chat-box-white grow flex flex-col h-full pt-6 overflow-hidden" },
|
|
371
408
|
});
|
|
@@ -393,8 +430,8 @@ else {
|
|
|
393
430
|
});
|
|
394
431
|
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
395
432
|
// @ts-ignore
|
|
396
|
-
const
|
|
397
|
-
const
|
|
433
|
+
const __VLS_66 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
434
|
+
const __VLS_67 = __VLS_66({}, ...__VLS_functionalComponentArgsRest(__VLS_66));
|
|
398
435
|
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
399
436
|
...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
|
|
400
437
|
});
|
|
@@ -407,92 +444,108 @@ else {
|
|
|
407
444
|
});
|
|
408
445
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
409
446
|
// @ts-ignore
|
|
410
|
-
const
|
|
447
|
+
const __VLS_70 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
411
448
|
...{ 'onCall': {} },
|
|
412
449
|
ref: "homeComponentRef",
|
|
413
450
|
receiverId: (__VLS_ctx.receiverId),
|
|
414
451
|
...{ class: "h-full" },
|
|
415
|
-
|
|
452
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
416
453
|
}));
|
|
417
|
-
const
|
|
454
|
+
const __VLS_71 = __VLS_70({
|
|
418
455
|
...{ 'onCall': {} },
|
|
419
456
|
ref: "homeComponentRef",
|
|
420
457
|
receiverId: (__VLS_ctx.receiverId),
|
|
421
458
|
...{ class: "h-full" },
|
|
422
|
-
|
|
423
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
424
|
-
let
|
|
425
|
-
let
|
|
426
|
-
const
|
|
459
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
460
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_70));
|
|
461
|
+
let __VLS_73;
|
|
462
|
+
let __VLS_74;
|
|
463
|
+
const __VLS_75 = ({ call: {} },
|
|
427
464
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
428
465
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
|
|
429
466
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
430
|
-
var
|
|
467
|
+
var __VLS_76 = {};
|
|
431
468
|
// @ts-ignore
|
|
432
469
|
[currentPage, PAGE, responsiveRender, receiverId, handleCall, homeComponentRef,];
|
|
433
|
-
var
|
|
470
|
+
var __VLS_72;
|
|
434
471
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
435
472
|
// @ts-ignore
|
|
436
473
|
[currentPage, PAGE,];
|
|
437
474
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
438
475
|
// @ts-ignore
|
|
439
|
-
const
|
|
476
|
+
const __VLS_79 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
440
477
|
ref: "customerDetailRef",
|
|
441
478
|
receiverId: (__VLS_ctx.receiverId),
|
|
442
479
|
...{ class: "h-full" },
|
|
443
|
-
|
|
480
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
444
481
|
}));
|
|
445
|
-
const
|
|
482
|
+
const __VLS_80 = __VLS_79({
|
|
446
483
|
ref: "customerDetailRef",
|
|
447
484
|
receiverId: (__VLS_ctx.receiverId),
|
|
448
485
|
...{ class: "h-full" },
|
|
449
|
-
|
|
450
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
486
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
487
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_79));
|
|
451
488
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
452
|
-
var
|
|
489
|
+
var __VLS_82 = {};
|
|
453
490
|
// @ts-ignore
|
|
454
491
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
455
|
-
var
|
|
492
|
+
var __VLS_81;
|
|
456
493
|
}
|
|
457
494
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
458
495
|
// @ts-ignore
|
|
459
496
|
[currentPage, PAGE,];
|
|
460
497
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
461
498
|
// @ts-ignore
|
|
462
|
-
const
|
|
499
|
+
const __VLS_85 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
463
500
|
...{ class: "h-full" },
|
|
464
501
|
}));
|
|
465
|
-
const
|
|
502
|
+
const __VLS_86 = __VLS_85({
|
|
466
503
|
...{ class: "h-full" },
|
|
467
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
504
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_85));
|
|
468
505
|
}
|
|
469
506
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
470
507
|
// @ts-ignore
|
|
471
508
|
[currentPage, PAGE,];
|
|
472
509
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
473
510
|
// @ts-ignore
|
|
474
|
-
const
|
|
511
|
+
const __VLS_89 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
475
512
|
...{ class: "h-full" },
|
|
476
513
|
}));
|
|
477
|
-
const
|
|
514
|
+
const __VLS_90 = __VLS_89({
|
|
478
515
|
...{ class: "h-full" },
|
|
479
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
516
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_89));
|
|
480
517
|
}
|
|
481
518
|
/** @type {[typeof Calling, ]} */ ;
|
|
482
519
|
// @ts-ignore
|
|
483
|
-
const
|
|
520
|
+
const __VLS_93 = __VLS_asFunctionalComponent(Calling, new Calling({
|
|
521
|
+
...{ 'onUserCalling': {} },
|
|
484
522
|
ref: "callingRef",
|
|
485
523
|
responsive: (__VLS_ctx.responsiveRender),
|
|
486
524
|
}));
|
|
487
|
-
const
|
|
525
|
+
const __VLS_94 = __VLS_93({
|
|
526
|
+
...{ 'onUserCalling': {} },
|
|
488
527
|
ref: "callingRef",
|
|
489
528
|
responsive: (__VLS_ctx.responsiveRender),
|
|
490
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
529
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_93));
|
|
530
|
+
let __VLS_96;
|
|
531
|
+
let __VLS_97;
|
|
532
|
+
const __VLS_98 = ({ userCalling: {} },
|
|
533
|
+
{ onUserCalling: (...[$event]) => {
|
|
534
|
+
if (!!(!__VLS_ctx.isRouterReady))
|
|
535
|
+
return;
|
|
536
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
|
|
537
|
+
return;
|
|
538
|
+
if (!!(__VLS_ctx.responsiveRender == 'mobile'))
|
|
539
|
+
return;
|
|
540
|
+
__VLS_ctx.emit('userCalling', $event);
|
|
541
|
+
// @ts-ignore
|
|
542
|
+
[responsiveRender, emit,];
|
|
543
|
+
} });
|
|
491
544
|
/** @type {typeof __VLS_ctx.callingRef} */ ;
|
|
492
|
-
var
|
|
545
|
+
var __VLS_99 = {};
|
|
493
546
|
// @ts-ignore
|
|
494
|
-
[
|
|
495
|
-
var
|
|
547
|
+
[callingRef,];
|
|
548
|
+
var __VLS_95;
|
|
496
549
|
}
|
|
497
550
|
/** @type {__VLS_StyleScopedClasses['go-chat-main']} */ ;
|
|
498
551
|
/** @type {__VLS_StyleScopedClasses['max-w-full']} */ ;
|
|
@@ -504,7 +557,7 @@ else {
|
|
|
504
557
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
505
558
|
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
506
559
|
/** @type {__VLS_StyleScopedClasses['mx-auto']} */ ;
|
|
507
|
-
/** @type {__VLS_StyleScopedClasses['w-
|
|
560
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
508
561
|
/** @type {__VLS_StyleScopedClasses['max-w-[350px]']} */ ;
|
|
509
562
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
510
563
|
/** @type {__VLS_StyleScopedClasses['bg-[#F9FAFC]']} */ ;
|
|
@@ -560,8 +613,10 @@ else {
|
|
|
560
613
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
561
614
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
562
615
|
// @ts-ignore
|
|
563
|
-
var
|
|
616
|
+
var __VLS_15 = __VLS_14, __VLS_28 = __VLS_27, __VLS_37 = __VLS_36, __VLS_43 = __VLS_42, __VLS_64 = __VLS_63, __VLS_77 = __VLS_76, __VLS_83 = __VLS_82, __VLS_100 = __VLS_99;
|
|
564
617
|
const __VLS_export = (await import('vue')).defineComponent({
|
|
618
|
+
setup: () => (__VLS_exposed),
|
|
619
|
+
__typeEmits: {},
|
|
565
620
|
__typeProps: {},
|
|
566
621
|
props: {},
|
|
567
622
|
});
|
|
@@ -47,7 +47,7 @@ const historyItems = computed(() => {
|
|
|
47
47
|
icon: IconDate,
|
|
48
48
|
label: 'Appointments',
|
|
49
49
|
value: userHistory.value?.appointment?.length ?? '',
|
|
50
|
-
click: userHistory.value?.appointment
|
|
50
|
+
click: userHistory.value?.appointment?.length
|
|
51
51
|
? () => {
|
|
52
52
|
routerPush(PAGE.CUSTOMER_APPOINTMENT);
|
|
53
53
|
}
|
|
@@ -61,6 +61,7 @@ const otherActions = [
|
|
|
61
61
|
{ icon: IconGroup, label: 'Add Groups' }
|
|
62
62
|
];
|
|
63
63
|
const getData = async () => {
|
|
64
|
+
userHistory.value = null;
|
|
64
65
|
userHistory.value = await getUserHistory(user.value?.phone?.slice(1) ?? '');
|
|
65
66
|
};
|
|
66
67
|
getData();
|
|
@@ -111,20 +112,20 @@ __VLS_asFunctionalElement(__VLS_elements.img)({
|
|
|
111
112
|
});
|
|
112
113
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
113
114
|
...{ class: " mt-5 text-center mx-auto" },
|
|
114
|
-
...{ class: ({ 'flex justify-between w-max': __VLS_ctx.
|
|
115
|
+
...{ class: ({ 'flex justify-between w-max': __VLS_ctx.responsive == 'tablet', 'grid grid-cols-3 w-full': __VLS_ctx.responsive == 'mobile' }) },
|
|
115
116
|
});
|
|
116
117
|
// @ts-ignore
|
|
117
|
-
[
|
|
118
|
+
[responsive, responsive,];
|
|
118
119
|
for (const [item, i] of __VLS_getVForSourceType((__VLS_ctx.customerTotalDetail))) {
|
|
119
120
|
// @ts-ignore
|
|
120
121
|
[customerTotalDetail,];
|
|
121
122
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
122
123
|
...{ class: "border-l border-chat-haze-100 first:border-none" },
|
|
123
|
-
...{ class: ({ 'w-full': __VLS_ctx.
|
|
124
|
+
...{ class: ({ 'w-full': __VLS_ctx.responsive == 'mobile', 'w-[130px]': __VLS_ctx.responsive == 'tablet' }) },
|
|
124
125
|
key: (i),
|
|
125
126
|
});
|
|
126
127
|
// @ts-ignore
|
|
127
|
-
[
|
|
128
|
+
[responsive, responsive,];
|
|
128
129
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
129
130
|
...{ class: "w-full flex items-center justify-center gap-1" },
|
|
130
131
|
});
|