@phonghq/go-chat 1.0.3 → 1.0.4

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.
Files changed (296) hide show
  1. package/dist/go-chat.es.js +6578 -6530
  2. package/dist/go-chat.umd.js +14 -14
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/dist/assets/icons/IconArrowLeft.vue.d.ts +0 -2
  6. package/dist/assets/icons/IconPhone.vue.d.ts +0 -2
  7. package/dist/assets/icons/IconPlan.vue.d.ts +0 -2
  8. package/dist/assets/icons/IconPlus.vue.d.ts +0 -2
  9. package/dist/assets/icons/IconSearch.vue.d.ts +0 -32
  10. package/dist/assets/icons/call/IconMic.vue.d.ts +0 -14
  11. package/dist/assets/icons/call/IconPhone.vue.d.ts +0 -2
  12. package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +0 -2
  13. package/dist/assets/icons/call/IconSpeaker.vue.d.ts +0 -14
  14. package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +0 -2
  15. package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +0 -2
  16. package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +0 -2
  17. package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +0 -2
  18. package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +0 -2
  19. package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +0 -2
  20. package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +0 -2
  21. package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +0 -2
  22. package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +0 -2
  23. package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +0 -2
  24. package/dist/chat/App.vue.d.ts +0 -5
  25. package/dist/chat/main.d.ts +0 -6
  26. package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +0 -2
  27. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +0 -12
  28. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +0 -2
  29. package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +0 -7
  30. package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +0 -16
  31. package/dist/chat/page/error/Error.vue.d.ts +0 -2
  32. package/dist/chat/page/home/ChatList.vue.d.ts +0 -20
  33. package/dist/chat/page/home/ChatMessage.vue.d.ts +0 -16
  34. package/dist/chat/page/home/Home.vue.d.ts +0 -14
  35. package/dist/chat/page/home/HomeHeader.vue.d.ts +0 -10
  36. package/dist/chat/page/home/InputChat.vue.d.ts +0 -19
  37. package/dist/chat/page/home/NewCustomer.vue.d.ts +0 -6
  38. package/dist/components/ListenEvent.vue.d.ts +0 -2
  39. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +0 -22
  40. package/dist/components/chat/call/Calling.vue.d.ts +0 -7
  41. package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +0 -13
  42. package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +0 -20
  43. package/dist/components/chat/common/input/InputSearch.vue.d.ts +0 -16
  44. package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +0 -35
  45. package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +0 -2
  46. package/dist/components/chat/customer/Avatar.vue.d.ts +0 -11
  47. package/dist/components/chat/layout/mobile/Footer.vue.d.ts +0 -2
  48. package/dist/components/common/CustomLoading.vue.d.ts +0 -2
  49. package/dist/components/common/Notification/NotificationDescription.vue.d.ts +0 -7
  50. package/dist/components/common/button/ButtonBase.vue.d.ts +0 -22
  51. package/dist/components/common/button/ButtonToggle.vue.d.ts +0 -20
  52. package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +0 -16
  53. package/dist/components/common/collapse/BaseCollapse.vue.d.ts +0 -12
  54. package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +0 -4
  55. package/dist/components/common/drawer/DrawerBase.vue.d.ts +0 -39
  56. package/dist/components/common/dropdown/DropdownBase.vue.d.ts +0 -21
  57. package/dist/components/common/input/CInputSearch.vue.d.ts +0 -14
  58. package/dist/components/common/modal/ModalBase.vue.d.ts +0 -35
  59. package/dist/components/common/popover/PopoverBase.vue.d.ts +0 -3
  60. package/dist/components/common/slider/BaseSlider.vue.d.ts +0 -11
  61. package/dist/components/common/spin/CSpin.vue.d.ts +0 -9
  62. package/dist/components/common/tooltip/TooltipBase.vue.d.ts +0 -2
  63. package/dist/components/layout/Blank.vue.d.ts +0 -9
  64. package/dist/components/layout/Default.vue.d.ts +0 -9
  65. package/dist/components/modal/Confirm.vue.d.ts +0 -2
  66. package/dist/components/ui/button/CButton.vue.d.ts +0 -19
  67. package/dist/components/ui/button/c-button.d.ts +0 -7
  68. package/dist/components/ui/checkbox/Checkbox.vue.d.ts +0 -18
  69. package/dist/components/ui/checkbox/index.d.ts +0 -1
  70. package/dist/components/ui/collapsible/Collapsible.vue.d.ts +0 -16
  71. package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +0 -10
  72. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +0 -10
  73. package/dist/components/ui/collapsible/index.d.ts +0 -3
  74. package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -14
  75. package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -10
  76. package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -29
  77. package/dist/components/ui/dialog/DialogDescription.vue.d.ts +0 -14
  78. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -13
  79. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -13
  80. package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +0 -30
  81. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -14
  82. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -10
  83. package/dist/components/ui/dialog/index.d.ts +0 -9
  84. package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -26
  85. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -33
  86. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -14
  87. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -13
  88. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -13
  89. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -7
  90. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -14
  91. package/dist/components/ui/drawer/index.d.ts +0 -8
  92. package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -14
  93. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -20
  94. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -28
  95. package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -10
  96. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -15
  97. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -15
  98. package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -14
  99. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +0 -18
  100. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -7
  101. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -13
  102. package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -14
  103. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -30
  104. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -14
  105. package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -10
  106. package/dist/components/ui/dropdown-menu/index.d.ts +0 -15
  107. package/dist/components/ui/popover/Popover.vue.d.ts +0 -14
  108. package/dist/components/ui/popover/PopoverContent.vue.d.ts +0 -28
  109. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +0 -10
  110. package/dist/components/ui/popover/index.d.ts +0 -3
  111. package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +0 -18
  112. package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +0 -7
  113. package/dist/components/ui/radio-group/index.d.ts +0 -2
  114. package/dist/components/ui/slider/Slider.vue.d.ts +0 -13
  115. package/dist/components/ui/slider/index.d.ts +0 -1
  116. package/dist/components/ui/switch/Switch.vue.d.ts +0 -18
  117. package/dist/components/ui/switch/index.d.ts +0 -1
  118. package/dist/composable/useCallHelper.d.ts +0 -23
  119. package/dist/composable/useInitData.d.ts +0 -11
  120. package/dist/composable/useModalConfirm.d.ts +0 -5
  121. package/dist/constant/color.d.ts +0 -22
  122. package/dist/constant/datetime.d.ts +0 -5
  123. package/dist/constant/general.d.ts +0 -8
  124. package/dist/constant/message.d.ts +0 -8
  125. package/dist/constant/mqtt.d.ts +0 -4
  126. package/dist/constant/user.d.ts +0 -8
  127. package/dist/lib/utils.d.ts +0 -2
  128. package/dist/plugins/axios-gci.d.ts +0 -3
  129. package/dist/plugins/axios.d.ts +0 -3
  130. package/dist/plugins/mqtt.d.ts +0 -10
  131. package/dist/plugins/sdk.d.ts +0 -19
  132. package/dist/plugins/websocket.d.ts +0 -4
  133. package/dist/test/assets/icons/IconArrowLeft.vue.js +0 -29
  134. package/dist/test/assets/icons/IconPhone.vue.js +0 -19
  135. package/dist/test/assets/icons/IconPlan.vue.js +0 -19
  136. package/dist/test/assets/icons/IconPlus.vue.js +0 -22
  137. package/dist/test/assets/icons/IconSearch.vue.js +0 -68
  138. package/dist/test/assets/icons/call/IconMic.vue.js +0 -123
  139. package/dist/test/assets/icons/call/IconPhone.vue.js +0 -35
  140. package/dist/test/assets/icons/call/IconPhoneCancel.vue.js +0 -35
  141. package/dist/test/assets/icons/call/IconSpeaker.vue.js +0 -62
  142. package/dist/test/assets/icons/customer-appointment/IconFilter.vue.js +0 -53
  143. package/dist/test/assets/icons/customer-detail/IconArrow.vue.js +0 -22
  144. package/dist/test/assets/icons/customer-detail/IconCheck.vue.js +0 -27
  145. package/dist/test/assets/icons/customer-detail/IconDate.vue.js +0 -43
  146. package/dist/test/assets/icons/customer-detail/IconGroup.vue.js +0 -48
  147. package/dist/test/assets/icons/customer-detail/IconMessage.vue.js +0 -28
  148. package/dist/test/assets/icons/customer-detail/IconNote.vue.js +0 -29
  149. package/dist/test/assets/icons/customer-detail/IconPhone.vue.js +0 -21
  150. package/dist/test/assets/icons/customer-detail/IconPin.vue.js +0 -29
  151. package/dist/test/assets/icons/customer-detail/IconSearch.vue.js +0 -29
  152. package/dist/test/chat/App.vue.js +0 -502
  153. package/dist/test/chat/main.js +0 -6
  154. package/dist/test/chat/page/customer-appointment/CustomerAppointment.vue.js +0 -207
  155. package/dist/test/chat/page/customer-check-in/CollapseCheckIn.vue.js +0 -80
  156. package/dist/test/chat/page/customer-check-in/CustomerCheckIn.vue.js +0 -136
  157. package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +0 -235
  158. package/dist/test/chat/page/customer-detail/SubInformation.vue.js +0 -102
  159. package/dist/test/chat/page/error/Error.vue.js +0 -64
  160. package/dist/test/chat/page/home/ChatList.vue.js +0 -380
  161. package/dist/test/chat/page/home/ChatMessage.vue.js +0 -271
  162. package/dist/test/chat/page/home/Home.vue.js +0 -327
  163. package/dist/test/chat/page/home/HomeHeader.vue.js +0 -122
  164. package/dist/test/chat/page/home/InputChat.vue.js +0 -226
  165. package/dist/test/chat/page/home/NewCustomer.vue.js +0 -82
  166. package/dist/test/components/ListenEvent.vue.js +0 -45
  167. package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +0 -197
  168. package/dist/test/components/chat/call/Calling.vue.js +0 -291
  169. package/dist/test/components/chat/card/CardCustomerDetail.vue.js +0 -28
  170. package/dist/test/components/chat/common/collapse/CollapseBase.vue.js +0 -59
  171. package/dist/test/components/chat/common/input/InputSearch.vue.js +0 -71
  172. package/dist/test/components/chat/common/popover/PopoverBase.vue.js +0 -148
  173. package/dist/test/components/chat/common/spin/BaseSpin.vue.js +0 -12
  174. package/dist/test/components/chat/customer/Avatar.vue.js +0 -79
  175. package/dist/test/components/chat/layout/mobile/Footer.vue.js +0 -109
  176. package/dist/test/components/common/CustomLoading.vue.js +0 -19
  177. package/dist/test/components/common/Notification/NotificationDescription.vue.js +0 -38
  178. package/dist/test/components/common/button/ButtonBase.vue.js +0 -78
  179. package/dist/test/components/common/button/ButtonToggle.vue.js +0 -70
  180. package/dist/test/components/common/checkbox/CCheckboxNumber.vue.js +0 -48
  181. package/dist/test/components/common/collapse/BaseCollapse.vue.js +0 -36
  182. package/dist/test/components/common/collapse/BaseCollapseItem.vue.js +0 -22
  183. package/dist/test/components/common/drawer/DrawerBase.vue.js +0 -126
  184. package/dist/test/components/common/dropdown/DropdownBase.vue.js +0 -91
  185. package/dist/test/components/common/input/CInputSearch.vue.js +0 -62
  186. package/dist/test/components/common/modal/ModalBase.vue.js +0 -164
  187. package/dist/test/components/common/popover/PopoverBase.vue.js +0 -36
  188. package/dist/test/components/common/slider/BaseSlider.vue.js +0 -70
  189. package/dist/test/components/common/spin/CSpin.vue.js +0 -41
  190. package/dist/test/components/common/tooltip/TooltipBase.vue.js +0 -8
  191. package/dist/test/components/layout/Blank.vue.js +0 -19
  192. package/dist/test/components/layout/Default.vue.js +0 -21
  193. package/dist/test/components/modal/Confirm.vue.js +0 -164
  194. package/dist/test/components/ui/button/CButton.vue.js +0 -49
  195. package/dist/test/components/ui/button/c-button.js +0 -26
  196. package/dist/test/components/ui/checkbox/Checkbox.vue.js +0 -79
  197. package/dist/test/components/ui/checkbox/index.js +0 -1
  198. package/dist/test/components/ui/collapsible/Collapsible.vue.js +0 -47
  199. package/dist/test/components/ui/collapsible/CollapsibleContent.vue.js +0 -41
  200. package/dist/test/components/ui/collapsible/CollapsibleTrigger.vue.js +0 -35
  201. package/dist/test/components/ui/collapsible/index.js +0 -3
  202. package/dist/test/components/ui/dialog/Dialog.vue.js +0 -42
  203. package/dist/test/components/ui/dialog/DialogClose.vue.js +0 -35
  204. package/dist/test/components/ui/dialog/DialogContent.vue.js +0 -84
  205. package/dist/test/components/ui/dialog/DialogDescription.vue.js +0 -43
  206. package/dist/test/components/ui/dialog/DialogFooter.vue.js +0 -26
  207. package/dist/test/components/ui/dialog/DialogHeader.vue.js +0 -26
  208. package/dist/test/components/ui/dialog/DialogScrollContent.vue.js +0 -99
  209. package/dist/test/components/ui/dialog/DialogTitle.vue.js +0 -43
  210. package/dist/test/components/ui/dialog/DialogTrigger.vue.js +0 -35
  211. package/dist/test/components/ui/dialog/index.js +0 -9
  212. package/dist/test/components/ui/drawer/Drawer.vue.js +0 -48
  213. package/dist/test/components/ui/drawer/DrawerContent.vue.js +0 -81
  214. package/dist/test/components/ui/drawer/DrawerDescription.vue.js +0 -42
  215. package/dist/test/components/ui/drawer/DrawerFooter.vue.js +0 -26
  216. package/dist/test/components/ui/drawer/DrawerHeader.vue.js +0 -26
  217. package/dist/test/components/ui/drawer/DrawerOverlay.vue.js +0 -37
  218. package/dist/test/components/ui/drawer/DrawerTitle.vue.js +0 -42
  219. package/dist/test/components/ui/drawer/index.js +0 -8
  220. package/dist/test/components/ui/dropdown-menu/DropdownMenu.vue.js +0 -41
  221. package/dist/test/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +0 -79
  222. package/dist/test/components/ui/dropdown-menu/DropdownMenuContent.vue.js +0 -61
  223. package/dist/test/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +0 -35
  224. package/dist/test/components/ui/dropdown-menu/DropdownMenuItem.vue.js +0 -43
  225. package/dist/test/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +0 -43
  226. package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +0 -41
  227. package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +0 -80
  228. package/dist/test/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +0 -37
  229. package/dist/test/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +0 -26
  230. package/dist/test/components/ui/dropdown-menu/DropdownMenuSub.vue.js +0 -41
  231. package/dist/test/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +0 -46
  232. package/dist/test/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +0 -58
  233. package/dist/test/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +0 -41
  234. package/dist/test/components/ui/dropdown-menu/index.js +0 -15
  235. package/dist/test/components/ui/popover/Popover.vue.js +0 -41
  236. package/dist/test/components/ui/popover/PopoverContent.vue.js +0 -60
  237. package/dist/test/components/ui/popover/PopoverTrigger.vue.js +0 -35
  238. package/dist/test/components/ui/popover/index.js +0 -3
  239. package/dist/test/components/ui/radio-group/RadioGroup.vue.js +0 -46
  240. package/dist/test/components/ui/radio-group/RadioGroupItem.vue.js +0 -71
  241. package/dist/test/components/ui/radio-group/index.js +0 -2
  242. package/dist/test/components/ui/slider/Slider.vue.js +0 -155
  243. package/dist/test/components/ui/slider/index.js +0 -1
  244. package/dist/test/components/ui/switch/Switch.vue.js +0 -61
  245. package/dist/test/components/ui/switch/index.js +0 -1
  246. package/dist/test/composable/useCallHelper.js +0 -170
  247. package/dist/test/composable/useInitData.js +0 -84
  248. package/dist/test/composable/useModalConfirm.js +0 -39
  249. package/dist/test/constant/color.js +0 -43
  250. package/dist/test/constant/datetime.js +0 -5
  251. package/dist/test/constant/general.js +0 -9
  252. package/dist/test/constant/message.js +0 -8
  253. package/dist/test/constant/mqtt.js +0 -11
  254. package/dist/test/constant/user.js +0 -9
  255. package/dist/test/lib/utils.js +0 -5
  256. package/dist/test/plugins/axios-gci.js +0 -25
  257. package/dist/test/plugins/axios.js +0 -85
  258. package/dist/test/plugins/mqtt.js +0 -128
  259. package/dist/test/plugins/sdk.js +0 -83
  260. package/dist/test/plugins/websocket.js +0 -65
  261. package/dist/test/types/call.js +0 -1
  262. package/dist/test/types/chat/auth.js +0 -1
  263. package/dist/test/types/chat/global.js +0 -1
  264. package/dist/test/types/chat/promise.js +0 -1
  265. package/dist/test/types/chat/user.js +0 -1
  266. package/dist/test/types/conversation.js +0 -1
  267. package/dist/test/types/global.js +0 -15
  268. package/dist/test/types/message.js +0 -1
  269. package/dist/test/utils/chat/auth.js +0 -51
  270. package/dist/test/utils/chat/call.js +0 -61
  271. package/dist/test/utils/chat/chat-router.js +0 -9
  272. package/dist/test/utils/chat/conversation.js +0 -7
  273. package/dist/test/utils/chat/message.js +0 -42
  274. package/dist/test/utils/chat/user.js +0 -33
  275. package/dist/test/utils/debounce.js +0 -9
  276. package/dist/test/utils/json.js +0 -18
  277. package/dist/test/utils/logger.js +0 -5
  278. package/dist/test/utils/string-helper.js +0 -27
  279. package/dist/types/call.d.ts +0 -4
  280. package/dist/types/chat/auth.d.ts +0 -37
  281. package/dist/types/chat/global.d.ts +0 -7
  282. package/dist/types/chat/promise.d.ts +0 -17
  283. package/dist/types/chat/user.d.ts +0 -88
  284. package/dist/types/conversation.d.ts +0 -18
  285. package/dist/types/global.d.ts +0 -11
  286. package/dist/types/message.d.ts +0 -43
  287. package/dist/utils/chat/auth.d.ts +0 -45
  288. package/dist/utils/chat/call.d.ts +0 -5
  289. package/dist/utils/chat/chat-router.d.ts +0 -3
  290. package/dist/utils/chat/conversation.d.ts +0 -3
  291. package/dist/utils/chat/message.d.ts +0 -17
  292. package/dist/utils/chat/user.d.ts +0 -193
  293. package/dist/utils/debounce.d.ts +0 -1
  294. package/dist/utils/json.d.ts +0 -2
  295. package/dist/utils/logger.d.ts +0 -3
  296. package/dist/utils/string-helper.d.ts +0 -1
@@ -1,207 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import CardCustomerDetail from '../../../components/chat/card/CardCustomerDetail.vue';
3
- import IconFilter from '../../../assets/icons/customer-appointment/IconFilter.vue';
4
- import { computed } from 'vue';
5
- import { getItemsByYear, userHistory } from '../../../utils/chat/user';
6
- import { CalendarStatus } from '../../../constant/user';
7
- import dayjs from 'dayjs';
8
- import { DATE_FORMATS } from '../../../constant/datetime';
9
- import CollapseCheckIn from '../../../chat/page/customer-check-in/CollapseCheckIn.vue';
10
- const appointment = computed(() => {
11
- return getItemsByYear(userHistory.value?.appointment ?? [], 'start_time');
12
- });
13
- const statusColor = (type) => {
14
- switch (type) {
15
- case CalendarStatus.Confirmed:
16
- return 'background-color: #E3FFF1; color: #06C270';
17
- case CalendarStatus.Scheduled:
18
- return 'background-color: #FFF0FF; color: #6600CC';
19
- case CalendarStatus.Canceled:
20
- return 'background-color: #FFE4DC; color: #F15220';
21
- case CalendarStatus.Done:
22
- return 'background-color: #E5F0FF; color: #0063F7';
23
- case CalendarStatus.Waiting:
24
- return 'background-color: #FFF0E0; color: #D96A2B';
25
- case 'website':
26
- return 'background-color: #FFF3B6; color: #F5B02A';
27
- case 'checkin':
28
- return 'background-color: #fff; color: #00b1bc';
29
- default:
30
- return '';
31
- }
32
- };
33
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
34
- const __VLS_ctx = {
35
- ...{},
36
- ...{},
37
- };
38
- let __VLS_elements;
39
- let __VLS_components;
40
- let __VLS_directives;
41
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
42
- ...{ class: "chat-padding-page" },
43
- });
44
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
45
- ...{ class: "flex justify-between items-center mb-5" },
46
- });
47
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
48
- ...{ class: "text-chat-haze-900 font-semibold" },
49
- });
50
- __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
51
- ...{ class: "flex text-chat-haze-300 border border-chat-haze-300 rounded-[99px] px-2" },
52
- });
53
- __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
54
- ...{ class: "font-medium" },
55
- });
56
- /** @type {[typeof IconFilter, ]} */ ;
57
- // @ts-ignore
58
- const __VLS_0 = __VLS_asFunctionalComponent(IconFilter, new IconFilter({}));
59
- const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
60
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
61
- ...{ class: "relative pl-4 h-max" },
62
- });
63
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
64
- ...{ class: "absolute left-0 top-0 border-l border-dashed border-chat-haze-400 h-full w-1 mt-2" },
65
- });
66
- for (const [year, i] of __VLS_getVForSourceType((__VLS_ctx.appointment))) {
67
- // @ts-ignore
68
- [appointment,];
69
- /** @type {[typeof CollapseCheckIn, typeof CollapseCheckIn, ]} */ ;
70
- // @ts-ignore
71
- const __VLS_4 = __VLS_asFunctionalComponent(CollapseCheckIn, new CollapseCheckIn({
72
- ...{ class: "relative" },
73
- title: (year.year),
74
- key: (i),
75
- }));
76
- const __VLS_5 = __VLS_4({
77
- ...{ class: "relative" },
78
- title: (year.year),
79
- key: (i),
80
- }, ...__VLS_functionalComponentArgsRest(__VLS_4));
81
- const { default: __VLS_7 } = __VLS_6.slots;
82
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
83
- ...{ class: "flex flex-col gap-y-3" },
84
- });
85
- for (const [item] of __VLS_getVForSourceType((year.items))) {
86
- /** @type {[typeof CardCustomerDetail, typeof CardCustomerDetail, ]} */ ;
87
- // @ts-ignore
88
- const __VLS_8 = __VLS_asFunctionalComponent(CardCustomerDetail, new CardCustomerDetail({
89
- key: (item.id),
90
- }));
91
- const __VLS_9 = __VLS_8({
92
- key: (item.id),
93
- }, ...__VLS_functionalComponentArgsRest(__VLS_8));
94
- const { default: __VLS_11 } = __VLS_10.slots;
95
- {
96
- const { header: __VLS_12 } = __VLS_10.slots;
97
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
98
- ...{ class: "flex justify-between items-center" },
99
- });
100
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
101
- ...{ class: "text-lg text-chat-haze-600 font-bold" },
102
- });
103
- (item.id);
104
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
105
- ...{ class: "translate-y-[-4px]" },
106
- });
107
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
108
- ...{ class: "w-max rounded-[6px] text-14px px-[10px] py-[5px] mt-2" },
109
- ...{ style: (__VLS_ctx.statusColor(item.status)) },
110
- });
111
- // @ts-ignore
112
- [statusColor,];
113
- (item.status);
114
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
115
- ...{ class: "flex justify-between items-end" },
116
- });
117
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
118
- ...{ class: "text-chat-haze-400" },
119
- });
120
- (__VLS_ctx.dayjs(item.start_time).format(__VLS_ctx.DATE_FORMATS['DATE_FORMAT']));
121
- // @ts-ignore
122
- [dayjs, DATE_FORMATS,];
123
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
124
- ...{ class: "text-chat-haze-400" },
125
- });
126
- (__VLS_ctx.dayjs(item.start_time).format(__VLS_ctx.DATE_FORMATS['TIME_12_FORMAT']));
127
- // @ts-ignore
128
- [dayjs, DATE_FORMATS,];
129
- }
130
- {
131
- const { content: __VLS_13 } = __VLS_10.slots;
132
- for (const [service, i] of __VLS_getVForSourceType((item.services))) {
133
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
134
- ...{ class: "flex justify-between items-center" },
135
- key: (i),
136
- });
137
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
138
- ...{ class: "text-chat-haze-409 font-medium" },
139
- });
140
- (service.employee_name);
141
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
142
- ...{ class: "text-chat-haze-409 font-medium" },
143
- });
144
- (service.name);
145
- }
146
- }
147
- var __VLS_10;
148
- }
149
- var __VLS_6;
150
- }
151
- /** @type {__VLS_StyleScopedClasses['chat-padding-page']} */ ;
152
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
153
- /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
154
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
155
- /** @type {__VLS_StyleScopedClasses['mb-5']} */ ;
156
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-900']} */ ;
157
- /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
158
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
159
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-300']} */ ;
160
- /** @type {__VLS_StyleScopedClasses['border']} */ ;
161
- /** @type {__VLS_StyleScopedClasses['border-chat-haze-300']} */ ;
162
- /** @type {__VLS_StyleScopedClasses['rounded-[99px]']} */ ;
163
- /** @type {__VLS_StyleScopedClasses['px-2']} */ ;
164
- /** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
165
- /** @type {__VLS_StyleScopedClasses['relative']} */ ;
166
- /** @type {__VLS_StyleScopedClasses['pl-4']} */ ;
167
- /** @type {__VLS_StyleScopedClasses['h-max']} */ ;
168
- /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
169
- /** @type {__VLS_StyleScopedClasses['left-0']} */ ;
170
- /** @type {__VLS_StyleScopedClasses['top-0']} */ ;
171
- /** @type {__VLS_StyleScopedClasses['border-l']} */ ;
172
- /** @type {__VLS_StyleScopedClasses['border-dashed']} */ ;
173
- /** @type {__VLS_StyleScopedClasses['border-chat-haze-400']} */ ;
174
- /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
175
- /** @type {__VLS_StyleScopedClasses['w-1']} */ ;
176
- /** @type {__VLS_StyleScopedClasses['mt-2']} */ ;
177
- /** @type {__VLS_StyleScopedClasses['relative']} */ ;
178
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
179
- /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
180
- /** @type {__VLS_StyleScopedClasses['gap-y-3']} */ ;
181
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
182
- /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
183
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
184
- /** @type {__VLS_StyleScopedClasses['text-lg']} */ ;
185
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
186
- /** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
187
- /** @type {__VLS_StyleScopedClasses['translate-y-[-4px]']} */ ;
188
- /** @type {__VLS_StyleScopedClasses['w-max']} */ ;
189
- /** @type {__VLS_StyleScopedClasses['rounded-[6px]']} */ ;
190
- /** @type {__VLS_StyleScopedClasses['text-14px']} */ ;
191
- /** @type {__VLS_StyleScopedClasses['px-[10px]']} */ ;
192
- /** @type {__VLS_StyleScopedClasses['py-[5px]']} */ ;
193
- /** @type {__VLS_StyleScopedClasses['mt-2']} */ ;
194
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
195
- /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
196
- /** @type {__VLS_StyleScopedClasses['items-end']} */ ;
197
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
198
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
199
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
200
- /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
201
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
202
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-409']} */ ;
203
- /** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
204
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-409']} */ ;
205
- /** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
206
- const __VLS_export = (await import('vue')).defineComponent({});
207
- export default {};
@@ -1,80 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import IconArrow from '../../../assets/icons/customer-detail/IconArrow.vue';
3
- import CollapseBase from '../../../components/chat/common/collapse/CollapseBase.vue';
4
- import { ref } from 'vue';
5
- const props = withDefaults(defineProps(), {});
6
- const open = ref(true);
7
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
8
- const __VLS_defaults = {};
9
- const __VLS_ctx = {
10
- ...{},
11
- ...{},
12
- ...{},
13
- ...{},
14
- };
15
- let __VLS_elements;
16
- let __VLS_components;
17
- let __VLS_directives;
18
- /** @type {[typeof CollapseBase, typeof CollapseBase, ]} */ ;
19
- // @ts-ignore
20
- const __VLS_0 = __VLS_asFunctionalComponent(CollapseBase, new CollapseBase({
21
- ...{ class: "relative" },
22
- open: (__VLS_ctx.open),
23
- }));
24
- const __VLS_1 = __VLS_0({
25
- ...{ class: "relative" },
26
- open: (__VLS_ctx.open),
27
- }, ...__VLS_functionalComponentArgsRest(__VLS_0));
28
- var __VLS_3 = {};
29
- const { default: __VLS_4 } = __VLS_2.slots;
30
- // @ts-ignore
31
- [open,];
32
- {
33
- const { trigger: __VLS_5 } = __VLS_2.slots;
34
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
35
- ...{ class: "w-2 h-2 bg-chat-haze-400 rounded-full absolute left-[-20px] top-2" },
36
- });
37
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
38
- ...{ class: "flex items-center text-chat-haze-400 mb-3" },
39
- });
40
- __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
41
- ...{ class: "font-semibold text-lg" },
42
- });
43
- (__VLS_ctx.title);
44
- // @ts-ignore
45
- [title,];
46
- /** @type {[typeof IconArrow, ]} */ ;
47
- // @ts-ignore
48
- const __VLS_6 = __VLS_asFunctionalComponent(IconArrow, new IconArrow({
49
- ...{ class: (__VLS_ctx.open ? 'rotate-90' : 'rotate-0') },
50
- }));
51
- const __VLS_7 = __VLS_6({
52
- ...{ class: (__VLS_ctx.open ? 'rotate-90' : 'rotate-0') },
53
- }, ...__VLS_functionalComponentArgsRest(__VLS_6));
54
- // @ts-ignore
55
- [open,];
56
- }
57
- var __VLS_10 = {};
58
- var __VLS_2;
59
- /** @type {__VLS_StyleScopedClasses['relative']} */ ;
60
- /** @type {__VLS_StyleScopedClasses['w-2']} */ ;
61
- /** @type {__VLS_StyleScopedClasses['h-2']} */ ;
62
- /** @type {__VLS_StyleScopedClasses['bg-chat-haze-400']} */ ;
63
- /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
64
- /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
65
- /** @type {__VLS_StyleScopedClasses['left-[-20px]']} */ ;
66
- /** @type {__VLS_StyleScopedClasses['top-2']} */ ;
67
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
68
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
69
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
70
- /** @type {__VLS_StyleScopedClasses['mb-3']} */ ;
71
- /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
72
- /** @type {__VLS_StyleScopedClasses['text-lg']} */ ;
73
- // @ts-ignore
74
- var __VLS_11 = __VLS_10;
75
- const __VLS_base = (await import('vue')).defineComponent({
76
- __typeProps: {},
77
- props: {},
78
- });
79
- const __VLS_export = {};
80
- export default {};
@@ -1,136 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import CardCustomerDetail from '../../../components/chat/card/CardCustomerDetail.vue';
3
- import { Status_Color } from '../../../constant/color';
4
- import { computed, ref } from 'vue';
5
- import CollapseCheckIn from '../../../chat/page/customer-check-in/CollapseCheckIn.vue';
6
- import { getItemsByYear, userHistory } from '../../../utils/chat/user';
7
- import dayjs from 'dayjs';
8
- import { DATE_FORMATS } from '../../../constant/datetime';
9
- const checkin = computed(() => {
10
- return getItemsByYear(userHistory.value?.checkin ?? []);
11
- });
12
- const open = ref(true);
13
- const open1 = ref(true);
14
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
15
- const __VLS_ctx = {
16
- ...{},
17
- ...{},
18
- };
19
- let __VLS_elements;
20
- let __VLS_components;
21
- let __VLS_directives;
22
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
23
- ...{ class: "chat-padding-page" },
24
- });
25
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
26
- ...{ class: "font-semibold mb-4" },
27
- });
28
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
29
- ...{ class: "relative pl-4 h-max" },
30
- });
31
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
32
- ...{ class: "absolute left-0 top-0 border-l border-dashed border-chat-haze-400 h-full w-1 mt-2" },
33
- });
34
- for (const [year, i] of __VLS_getVForSourceType((__VLS_ctx.checkin))) {
35
- // @ts-ignore
36
- [checkin,];
37
- /** @type {[typeof CollapseCheckIn, typeof CollapseCheckIn, ]} */ ;
38
- // @ts-ignore
39
- const __VLS_0 = __VLS_asFunctionalComponent(CollapseCheckIn, new CollapseCheckIn({
40
- ...{ class: "relative" },
41
- title: (year.year),
42
- key: (i),
43
- }));
44
- const __VLS_1 = __VLS_0({
45
- ...{ class: "relative" },
46
- title: (year.year),
47
- key: (i),
48
- }, ...__VLS_functionalComponentArgsRest(__VLS_0));
49
- const { default: __VLS_3 } = __VLS_2.slots;
50
- for (const [item] of __VLS_getVForSourceType((year.items))) {
51
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
52
- ...{ class: "flex flex-col gap-y-3" },
53
- key: (item.id),
54
- });
55
- /** @type {[typeof CardCustomerDetail, typeof CardCustomerDetail, ]} */ ;
56
- // @ts-ignore
57
- const __VLS_4 = __VLS_asFunctionalComponent(CardCustomerDetail, new CardCustomerDetail({}));
58
- const __VLS_5 = __VLS_4({}, ...__VLS_functionalComponentArgsRest(__VLS_4));
59
- const { default: __VLS_7 } = __VLS_6.slots;
60
- {
61
- const { header: __VLS_8 } = __VLS_6.slots;
62
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
63
- ...{ class: "flex justify-between items-center" },
64
- });
65
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
66
- ...{ class: "text-chat-haze-600 font-bold" },
67
- });
68
- (item.id);
69
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
70
- ...{ class: "font-bold" },
71
- ...{ style: ({ color: __VLS_ctx.Status_Color.Orange }) },
72
- });
73
- // @ts-ignore
74
- [Status_Color,];
75
- (item.status);
76
- }
77
- {
78
- const { content: __VLS_9 } = __VLS_6.slots;
79
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
80
- ...{ class: "flex justify-between items-center" },
81
- });
82
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
83
- ...{ class: "text-chat-haze-400 font-normal" },
84
- });
85
- (__VLS_ctx.dayjs(item.created_at).format(__VLS_ctx.DATE_FORMATS['DATE_FORMAT']));
86
- // @ts-ignore
87
- [dayjs, DATE_FORMATS,];
88
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
89
- ...{ class: "text-chat-success" },
90
- });
91
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (item.point_bonus > 0) }, null, null);
92
- (item.point_bonus);
93
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
94
- ...{ class: "" },
95
- });
96
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (!item.point_bonus) }, null, null);
97
- (item.point_bonus);
98
- }
99
- var __VLS_6;
100
- }
101
- var __VLS_2;
102
- }
103
- /** @type {__VLS_StyleScopedClasses['']} */ ;
104
- /** @type {__VLS_StyleScopedClasses['chat-padding-page']} */ ;
105
- /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
106
- /** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
107
- /** @type {__VLS_StyleScopedClasses['relative']} */ ;
108
- /** @type {__VLS_StyleScopedClasses['pl-4']} */ ;
109
- /** @type {__VLS_StyleScopedClasses['h-max']} */ ;
110
- /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
111
- /** @type {__VLS_StyleScopedClasses['left-0']} */ ;
112
- /** @type {__VLS_StyleScopedClasses['top-0']} */ ;
113
- /** @type {__VLS_StyleScopedClasses['border-l']} */ ;
114
- /** @type {__VLS_StyleScopedClasses['border-dashed']} */ ;
115
- /** @type {__VLS_StyleScopedClasses['border-chat-haze-400']} */ ;
116
- /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
117
- /** @type {__VLS_StyleScopedClasses['w-1']} */ ;
118
- /** @type {__VLS_StyleScopedClasses['mt-2']} */ ;
119
- /** @type {__VLS_StyleScopedClasses['relative']} */ ;
120
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
121
- /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
122
- /** @type {__VLS_StyleScopedClasses['gap-y-3']} */ ;
123
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
124
- /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
125
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
126
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
127
- /** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
128
- /** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
129
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
130
- /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
131
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
132
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
133
- /** @type {__VLS_StyleScopedClasses['font-normal']} */ ;
134
- /** @type {__VLS_StyleScopedClasses['text-chat-success']} */ ;
135
- const __VLS_export = (await import('vue')).defineComponent({});
136
- export default {};
@@ -1,235 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import Avatar from '../../../components/chat/customer/Avatar.vue';
3
- import { PAGE } from '../../../constant/general';
4
- import SubInformation from '../../../chat/page/customer-detail/SubInformation.vue';
5
- import IconMessage from '../../../assets/icons/customer-detail/IconMessage.vue';
6
- import IconPhone from '../../../assets/icons/customer-detail/IconPhone.vue';
7
- import IconCheck from '../../../assets/icons/customer-detail/IconCheck.vue';
8
- import IconDate from '../../../assets/icons/customer-detail/IconDate.vue';
9
- import IconGroup from '../../../assets/icons/customer-detail/IconGroup.vue';
10
- import IconNote from '../../../assets/icons/customer-detail/IconNote.vue';
11
- import IconSearch from '../../../assets/icons/customer-detail/IconSearch.vue';
12
- import IconPin from '../../../assets/icons/customer-detail/IconPin.vue';
13
- import { getUserHistory, user, userHistory } from '../../../utils/chat/user';
14
- import { computed } from 'vue';
15
- import { phoneNumberFormat } from '../../../utils/string-helper';
16
- import { routerPush } from '../../../utils/chat/chat-router';
17
- const props = withDefaults(defineProps(), {});
18
- const customerTotalDetail = computed(() => {
19
- return [
20
- { label: 'Points', value: userHistory.value?.lifetime_point ?? 0 },
21
- { label: 'Total Visit', value: userHistory.value?.visit_count ?? 0 },
22
- { label: 'Spent', value: userHistory.value?.total_money ?? 0 }
23
- ];
24
- });
25
- const information = computed(() => {
26
- return [
27
- { icon: IconMessage, label: '' },
28
- { icon: IconPhone, label: phoneNumberFormat(user.value?.phone ?? '', 2) }
29
- ];
30
- });
31
- const historyItems = computed(() => {
32
- return [
33
- {
34
- icon: IconCheck,
35
- label: 'Check In',
36
- value: userHistory.value?.visit_count
37
- ? userHistory.value?.visit_count + (userHistory.value?.visit_count > 1 ? ' times' : ' time')
38
- : '',
39
- click: userHistory.value?.visit_count
40
- ? () => {
41
- routerPush(PAGE.CUSTOMER_CHECK_IN);
42
- }
43
- : null
44
- },
45
- { icon: IconNote, label: 'Orders', value: userHistory.value?.order?.length ?? '' },
46
- {
47
- icon: IconDate,
48
- label: 'Appointments',
49
- value: userHistory.value?.appointment?.length ?? '',
50
- click: userHistory.value?.appointment.length
51
- ? () => {
52
- routerPush(PAGE.CUSTOMER_APPOINTMENT);
53
- }
54
- : null
55
- }
56
- ];
57
- });
58
- const otherActions = [
59
- { icon: IconSearch, label: 'Search in the conversation' },
60
- { icon: IconPin, label: 'Pin Message' },
61
- { icon: IconGroup, label: 'Add Groups' }
62
- ];
63
- const getData = async () => {
64
- userHistory.value = await getUserHistory(user.value?.phone?.slice(1) ?? '');
65
- };
66
- getData();
67
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
68
- const __VLS_defaults = {};
69
- const __VLS_ctx = {
70
- ...{},
71
- ...{},
72
- ...{},
73
- ...{},
74
- };
75
- let __VLS_elements;
76
- let __VLS_components;
77
- let __VLS_directives;
78
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
79
- ...{ class: "chat-padding-page overflow-auto" },
80
- });
81
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
82
- ...{ class: "flex flex-col items-center mx-auto" },
83
- });
84
- /** @type {[typeof Avatar, ]} */ ;
85
- // @ts-ignore
86
- const __VLS_0 = __VLS_asFunctionalComponent(Avatar, new Avatar({
87
- src: (__VLS_ctx.user?.avatar ?? ''),
88
- color: (__VLS_ctx.user?.color ?? ''),
89
- name: (__VLS_ctx.user?.username ?? ''),
90
- size: "xl",
91
- }));
92
- const __VLS_1 = __VLS_0({
93
- src: (__VLS_ctx.user?.avatar ?? ''),
94
- color: (__VLS_ctx.user?.color ?? ''),
95
- name: (__VLS_ctx.user?.username ?? ''),
96
- size: "xl",
97
- }, ...__VLS_functionalComponentArgsRest(__VLS_0));
98
- // @ts-ignore
99
- [user, user, user,];
100
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
101
- ...{ class: "flex items-center gap-1 mt-3" },
102
- });
103
- __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
104
- ...{ class: "text-lg font-semibold text-gray-800" },
105
- });
106
- (__VLS_ctx.user?.username ?? 'n/a');
107
- // @ts-ignore
108
- [user,];
109
- __VLS_asFunctionalElement(__VLS_elements.img)({
110
- src: "../../../assets/images/icons/new-customer.png",
111
- });
112
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
113
- ...{ class: " mt-5 text-center mx-auto" },
114
- ...{ class: ({ 'flex justify-between w-max': __VLS_ctx.response == 'tablet', 'grid grid-cols-3 w-full': __VLS_ctx.response == 'mobile' }) },
115
- });
116
- // @ts-ignore
117
- [response, response,];
118
- for (const [item, i] of __VLS_getVForSourceType((__VLS_ctx.customerTotalDetail))) {
119
- // @ts-ignore
120
- [customerTotalDetail,];
121
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
122
- ...{ class: "border-l border-chat-haze-100 first:border-none" },
123
- ...{ class: ({ 'w-full': __VLS_ctx.response == 'mobile', 'w-[130px]': __VLS_ctx.response == 'tablet' }) },
124
- key: (i),
125
- });
126
- // @ts-ignore
127
- [response, response,];
128
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
129
- ...{ class: "w-full flex items-center justify-center gap-1" },
130
- });
131
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
132
- ...{ class: "text-lg font-semibold text-chat-haze-900" },
133
- });
134
- (item.value);
135
- if (item.icon) {
136
- __VLS_asFunctionalElement(__VLS_elements.img)({
137
- src: (item.icon),
138
- });
139
- }
140
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
141
- ...{ class: "text-chat-haze-400" },
142
- });
143
- (item.label);
144
- }
145
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
146
- ...{ class: "w-full py-6" },
147
- });
148
- /** @type {[typeof SubInformation, ]} */ ;
149
- // @ts-ignore
150
- const __VLS_4 = __VLS_asFunctionalComponent(SubInformation, new SubInformation({
151
- ...{ class: "mb-6" },
152
- information: (__VLS_ctx.information),
153
- title: "Information",
154
- }));
155
- const __VLS_5 = __VLS_4({
156
- ...{ class: "mb-6" },
157
- information: (__VLS_ctx.information),
158
- title: "Information",
159
- }, ...__VLS_functionalComponentArgsRest(__VLS_4));
160
- // @ts-ignore
161
- [information,];
162
- /** @type {[typeof SubInformation, ]} */ ;
163
- // @ts-ignore
164
- const __VLS_8 = __VLS_asFunctionalComponent(SubInformation, new SubInformation({
165
- ...{ class: "mb-6" },
166
- information: (__VLS_ctx.historyItems),
167
- title: "History",
168
- }));
169
- const __VLS_9 = __VLS_8({
170
- ...{ class: "mb-6" },
171
- information: (__VLS_ctx.historyItems),
172
- title: "History",
173
- }, ...__VLS_functionalComponentArgsRest(__VLS_8));
174
- // @ts-ignore
175
- [historyItems,];
176
- /** @type {[typeof SubInformation, ]} */ ;
177
- // @ts-ignore
178
- const __VLS_12 = __VLS_asFunctionalComponent(SubInformation, new SubInformation({
179
- ...{ class: "" },
180
- information: (__VLS_ctx.otherActions),
181
- title: "Other Action",
182
- }));
183
- const __VLS_13 = __VLS_12({
184
- ...{ class: "" },
185
- information: (__VLS_ctx.otherActions),
186
- title: "Other Action",
187
- }, ...__VLS_functionalComponentArgsRest(__VLS_12));
188
- // @ts-ignore
189
- [otherActions,];
190
- /** @type {__VLS_StyleScopedClasses['']} */ ;
191
- /** @type {__VLS_StyleScopedClasses['chat-padding-page']} */ ;
192
- /** @type {__VLS_StyleScopedClasses['overflow-auto']} */ ;
193
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
194
- /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
195
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
196
- /** @type {__VLS_StyleScopedClasses['mx-auto']} */ ;
197
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
198
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
199
- /** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
200
- /** @type {__VLS_StyleScopedClasses['mt-3']} */ ;
201
- /** @type {__VLS_StyleScopedClasses['text-lg']} */ ;
202
- /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
203
- /** @type {__VLS_StyleScopedClasses['text-gray-800']} */ ;
204
- /** @type {__VLS_StyleScopedClasses['mt-5']} */ ;
205
- /** @type {__VLS_StyleScopedClasses['text-center']} */ ;
206
- /** @type {__VLS_StyleScopedClasses['mx-auto']} */ ;
207
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
208
- /** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
209
- /** @type {__VLS_StyleScopedClasses['w-max']} */ ;
210
- /** @type {__VLS_StyleScopedClasses['grid']} */ ;
211
- /** @type {__VLS_StyleScopedClasses['grid-cols-3']} */ ;
212
- /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
213
- /** @type {__VLS_StyleScopedClasses['border-l']} */ ;
214
- /** @type {__VLS_StyleScopedClasses['border-chat-haze-100']} */ ;
215
- /** @type {__VLS_StyleScopedClasses['first:border-none']} */ ;
216
- /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
217
- /** @type {__VLS_StyleScopedClasses['w-[130px]']} */ ;
218
- /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
219
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
220
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
221
- /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
222
- /** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
223
- /** @type {__VLS_StyleScopedClasses['text-lg']} */ ;
224
- /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
225
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-900']} */ ;
226
- /** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
227
- /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
228
- /** @type {__VLS_StyleScopedClasses['py-6']} */ ;
229
- /** @type {__VLS_StyleScopedClasses['mb-6']} */ ;
230
- /** @type {__VLS_StyleScopedClasses['mb-6']} */ ;
231
- const __VLS_export = (await import('vue')).defineComponent({
232
- __typeProps: {},
233
- props: {},
234
- });
235
- export default {};