sme-pos-package 1.0.13 → 1.0.15

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 (314) hide show
  1. package/dist/index.d.mts +1 -1
  2. package/dist/index.mjs +1 -0
  3. package/package.json +4 -1
  4. package/dist/index.css.map +0 -1
  5. package/dist/index.mjs.map +0 -1
  6. package/dist/tailwind.preset.mjs.map +0 -1
  7. package/public/assets/images/bank-logos.png +0 -0
  8. package/public/assets/images/banner1.png +0 -0
  9. package/public/assets/images/banner2.png +0 -0
  10. package/public/assets/images/banner3.png +0 -0
  11. package/public/assets/images/banner4.png +0 -0
  12. package/public/assets/images/cashier.svg +0 -9
  13. package/public/assets/images/empty-cart.png +0 -0
  14. package/public/assets/images/empty-table-state.png +0 -0
  15. package/public/assets/images/layout-display/left-layout.png +0 -0
  16. package/public/assets/images/layout-display/right-layout.png +0 -0
  17. package/public/assets/images/modal-illustration.png +0 -0
  18. package/public/assets/images/order-empty-state.png +0 -0
  19. package/public/assets/images/order.png +0 -0
  20. package/public/assets/images/payment-success-label.png +0 -0
  21. package/public/assets/images/table-empty.png +0 -0
  22. package/public/assets/images/take-away.png +0 -0
  23. package/public/assets/lottie/loading.json +0 -1
  24. package/public/assets/lottie/soft_pos.json +0 -1
  25. package/public/assets/lottie/success.json +0 -1
  26. package/public/config.json +0 -27
  27. package/public/env.json +0 -17
  28. package/src/animations/success.json +0 -9730
  29. package/src/assets/icons/breadcrumbs-icon.tsx +0 -85
  30. package/src/assets/icons/cart-icon.tsx +0 -14
  31. package/src/assets/icons/common.tsx +0 -270
  32. package/src/assets/icons/customer-view-icon.tsx +0 -20
  33. package/src/assets/icons/dining-table.tsx +0 -34
  34. package/src/assets/icons/edit-line-icon.tsx +0 -18
  35. package/src/assets/icons/emenu-icon.tsx +0 -39
  36. package/src/assets/icons/file-close-line-icon.tsx +0 -18
  37. package/src/assets/icons/helper-icon.tsx +0 -84
  38. package/src/assets/icons/home-gear-line-icon.tsx +0 -18
  39. package/src/assets/icons/kanban-icon.tsx +0 -16
  40. package/src/assets/icons/loading-icon.tsx +0 -45
  41. package/src/assets/icons/logout-box-line-icon.tsx +0 -18
  42. package/src/assets/icons/order-icon.tsx +0 -92
  43. package/src/assets/icons/payment-icon.tsx +0 -429
  44. package/src/assets/icons/pincode.tsx +0 -196
  45. package/src/assets/icons/pos-connect-icon.tsx +0 -67
  46. package/src/assets/icons/pos-device-icon.tsx +0 -52
  47. package/src/assets/icons/pos-icon.tsx +0 -75
  48. package/src/assets/icons/printer-line-icon.tsx +0 -18
  49. package/src/assets/icons/star-icon.tsx +0 -174
  50. package/src/assets/icons/table-icon.tsx +0 -77
  51. package/src/assets/icons/user-add-line-icon.tsx +0 -33
  52. package/src/assets/icons/user-icon.tsx +0 -65
  53. package/src/components/common/button-action.tsx +0 -46
  54. package/src/components/common/button-icon.tsx +0 -23
  55. package/src/components/common/dropdown/index.tsx +0 -79
  56. package/src/components/common/empty-state.tsx +0 -60
  57. package/src/components/common/header/index.tsx +0 -89
  58. package/src/components/common/header/tabs.tsx +0 -119
  59. package/src/components/common/image.tsx +0 -20
  60. package/src/components/common/input/index.tsx +0 -55
  61. package/src/components/common/input/radio-group.tsx +0 -75
  62. package/src/components/common/input/text-area.tsx +0 -28
  63. package/src/components/common/modal/delete-confirm-modal-container.tsx +0 -65
  64. package/src/components/common/modal/index.ts +0 -2
  65. package/src/components/common/modal/modal-direction.tsx +0 -125
  66. package/src/components/common/modal/modal-header.tsx +0 -37
  67. package/src/components/common/modal/modal-wrapper.tsx +0 -56
  68. package/src/components/common/modal/modal-zoom.tsx +0 -61
  69. package/src/components/common/pagination.tsx +0 -95
  70. package/src/components/common/refresh-button.tsx +0 -28
  71. package/src/components/common/search-bar.tsx +0 -27
  72. package/src/components/common/search.tsx +0 -59
  73. package/src/components/common/skeleton.tsx +0 -7
  74. package/src/components/common/tabs-layout.tsx +0 -98
  75. package/src/components/common/use-check-session.tsx +0 -19
  76. package/src/components/customer-management/add-customer/add-customer-drawer.tsx +0 -286
  77. package/src/components/customer-management/add-customer/address-select.tsx +0 -51
  78. package/src/components/customer-management/choose-customer-drawer.tsx +0 -177
  79. package/src/components/customer-management/customer-info-drawer.tsx +0 -166
  80. package/src/components/customer-management/customer-no-data.tsx +0 -18
  81. package/src/components/emenu/emenu-qr-code.tsx +0 -59
  82. package/src/components/emenu/menu-link.tsx +0 -67
  83. package/src/components/index.ts +0 -8
  84. package/src/components/kanban-template/kitchen-template.tsx +0 -60
  85. package/src/components/kanban-template/pos-order-template.tsx +0 -77
  86. package/src/components/kanban-template/pos-template.tsx +0 -170
  87. package/src/components/kitchen-management/change-status-confirm-modal.tsx +0 -61
  88. package/src/components/kitchen-management/index.ts +0 -1
  89. package/src/components/kitchen-management/kitchen-order/index.tsx +0 -153
  90. package/src/components/kitchen-management/kitchen-order/line.tsx +0 -78
  91. package/src/components/kitchen-management/kitchen-order/state.tsx +0 -52
  92. package/src/components/kitchen-management/kitchen-status.tsx +0 -69
  93. package/src/components/kitchen-management/orders-kitchen-management.tsx +0 -113
  94. package/src/components/order-management/index.tsx +0 -128
  95. package/src/components/order-management/order-actions.tsx +0 -46
  96. package/src/components/order-management/order-detail/header.tsx +0 -37
  97. package/src/components/order-management/order-detail/index.ts +0 -3
  98. package/src/components/order-management/order-detail/information.tsx +0 -96
  99. package/src/components/order-management/order-detail/order-detail.tsx +0 -84
  100. package/src/components/order-management/order-detail/order-line.tsx +0 -56
  101. package/src/components/order-management/order-detail/summary.tsx +0 -221
  102. package/src/components/order-management/order-header.tsx +0 -113
  103. package/src/components/order-management/order-pagination.tsx +0 -49
  104. package/src/components/order-management/order-status.tsx +0 -58
  105. package/src/components/order-management/order-table.tsx +0 -179
  106. package/src/components/order-management/order-tabs.tsx +0 -48
  107. package/src/components/pos-management/add-product-from-barcode/index.tsx +0 -97
  108. package/src/components/pos-management/cart-content/action-line.tsx +0 -81
  109. package/src/components/pos-management/cart-content/cancel-order-line-modal.tsx +0 -41
  110. package/src/components/pos-management/cart-content/cart-item.tsx +0 -173
  111. package/src/components/pos-management/cart-content/cart-items.tsx +0 -130
  112. package/src/components/pos-management/cart-content/draft-orders/draft-order-line.tsx +0 -67
  113. package/src/components/pos-management/cart-content/draft-orders/index.tsx +0 -40
  114. package/src/components/pos-management/cart-content/edit-cart-modal.tsx +0 -11
  115. package/src/components/pos-management/cart-content/index.tsx +0 -260
  116. package/src/components/pos-management/cart-content/no-select-order.tsx +0 -26
  117. package/src/components/pos-management/cart-content/order-info/customer-info.tsx +0 -53
  118. package/src/components/pos-management/cart-content/order-info/index.tsx +0 -109
  119. package/src/components/pos-management/cart-content/order-total.tsx +0 -36
  120. package/src/components/pos-management/cart-content/orders-line.tsx +0 -72
  121. package/src/components/pos-management/menu-content/category-tab.tsx +0 -38
  122. package/src/components/pos-management/menu-content/create-order-modal.tsx +0 -65
  123. package/src/components/pos-management/menu-content/product-content.tsx +0 -93
  124. package/src/components/pos-management/menu-content/product-detail/info.tsx +0 -28
  125. package/src/components/pos-management/menu-content/product-detail/modal.tsx +0 -148
  126. package/src/components/pos-management/menu-content/product-detail/option.tsx +0 -87
  127. package/src/components/pos-management/menu-content/product-detail/quantity-control.tsx +0 -155
  128. package/src/components/pos-management/menu-content/product-detail/sale-keypad.tsx +0 -100
  129. package/src/components/pos-management/menu-content/product-item.tsx +0 -65
  130. package/src/components/pos-management/order-helper/cancel-order-confirm.tsx +0 -43
  131. package/src/components/pos-management/order-helper/history-call.tsx +0 -105
  132. package/src/components/pos-management/order-helper/order-helper-modal.tsx +0 -116
  133. package/src/components/pos-management/payment-content/bill/actions.tsx +0 -46
  134. package/src/components/pos-management/payment-content/bill/content.tsx +0 -207
  135. package/src/components/pos-management/payment-content/bill/index.tsx +0 -18
  136. package/src/components/pos-management/payment-content/card-payment/index.tsx +0 -124
  137. package/src/components/pos-management/payment-content/card-payment/pos-payment/pos-connect.tsx +0 -183
  138. package/src/components/pos-management/payment-content/card-payment/pos-payment/qr-connect.tsx +0 -185
  139. package/src/components/pos-management/payment-content/card-payment/waiting-for-payment-pos-modal.tsx +0 -37
  140. package/src/components/pos-management/payment-content/cash-payment/index.tsx +0 -216
  141. package/src/components/pos-management/payment-content/index.tsx +0 -70
  142. package/src/components/pos-management/payment-content/payment-info.tsx +0 -67
  143. package/src/components/pos-management/payment-content/payment-layout.tsx +0 -16
  144. package/src/components/pos-management/payment-content/payment-method-cards.tsx +0 -99
  145. package/src/components/pos-management/payment-content/qr-payment/index.tsx +0 -118
  146. package/src/components/pos-management/payment-content/qr-payment/qr_code.js +0 -29
  147. package/src/components/pos-management/payment-content/qr-payment/vietqr.js +0 -436
  148. package/src/components/pos-management/payment-content/session-close-modal.tsx +0 -35
  149. package/src/components/pos-management/payment-content/soft-pos-payment/index.tsx +0 -48
  150. package/src/components/pos-management/pos-helpers/back-confirm.tsx +0 -45
  151. package/src/components/pos-management/pos-helpers/index.tsx +0 -135
  152. package/src/components/pos-management/pos-helpers/layout-display-modal.tsx +0 -99
  153. package/src/components/pos-management/search.tsx +0 -48
  154. package/src/components/pos-management/table-content/filtered-tables.tsx +0 -59
  155. package/src/components/pos-management/table-content/floor-tabs.tsx +0 -65
  156. package/src/components/pos-management/table-content/index.tsx +0 -76
  157. package/src/components/pos-management/table-content/table-item.tsx +0 -127
  158. package/src/components/pos-management/table-content/tables.tsx +0 -96
  159. package/src/components/restaurant-management/add-floor-modal.tsx +0 -133
  160. package/src/components/restaurant-management/add-table-modal.tsx +0 -198
  161. package/src/components/restaurant-management/delete-floor-confirm-modal.tsx +0 -42
  162. package/src/components/restaurant-management/delete-table-confirm-modal.tsx +0 -51
  163. package/src/components/restaurant-management/header.tsx +0 -22
  164. package/src/components/restaurant-management/index.tsx +0 -54
  165. package/src/components/restaurant-management/left-side.tsx +0 -51
  166. package/src/components/restaurant-management/right-side.tsx +0 -179
  167. package/src/components/restaurant-management/table-empty.tsx +0 -43
  168. package/src/components/session-management/close-session-modal/actions.tsx +0 -45
  169. package/src/components/session-management/close-session-modal/close-session-confirm.tsx +0 -157
  170. package/src/components/session-management/close-session-modal/close-session-ticket.tsx +0 -218
  171. package/src/components/session-management/close-session-modal/container.tsx +0 -25
  172. package/src/components/session-management/close-session-modal/draft-orders-confirm.tsx +0 -53
  173. package/src/components/session-management/close-session-modal/draft-orders-summary.tsx +0 -82
  174. package/src/components/session-management/close-session-modal/draft-orders.tsx +0 -34
  175. package/src/components/session-management/close-session-modal/index.tsx +0 -35
  176. package/src/components/session-management/close-session-modal/order/index.ts +0 -1
  177. package/src/components/session-management/close-session-modal/order/order-line.tsx +0 -64
  178. package/src/components/session-management/close-session-modal/order/orders-in-draft.tsx +0 -31
  179. package/src/components/session-management/close-session-modal/session-summary.tsx +0 -165
  180. package/src/components/session-management/index.ts +0 -1
  181. package/src/components/session-management/open-shift/index.tsx +0 -172
  182. package/src/components/table-management/index.tsx +0 -0
  183. package/src/constants/api/index.ts +0 -1
  184. package/src/constants/headers.constant.tsx +0 -24
  185. package/src/constants/index.ts +0 -1
  186. package/src/constants/language.store.ts +0 -21
  187. package/src/constants/methods.constant.ts +0 -10
  188. package/src/constants/order-state.ts +0 -8
  189. package/src/constants/payment-color.constant.ts +0 -26
  190. package/src/constants/query.constant.ts +0 -14
  191. package/src/constants/routes.constants.ts +0 -23
  192. package/src/constants/template-name.constant.ts +0 -9
  193. package/src/hooks/bill/use-get-bill-information.ts +0 -49
  194. package/src/hooks/bill/use-print-bill.tsx +0 -0
  195. package/src/hooks/common/load-env-config.ts +0 -98
  196. package/src/hooks/common/use-back.ts +0 -13
  197. package/src/hooks/common/use-broadcast.ts +0 -22
  198. package/src/hooks/common/use-click-outside.ts +0 -58
  199. package/src/hooks/common/use-get-base64-photo.ts +0 -71
  200. package/src/hooks/common/use-get-query.ts +0 -25
  201. package/src/hooks/common/use-pos.ts +0 -21
  202. package/src/hooks/common/use-query-params.ts +0 -89
  203. package/src/hooks/common/use-speech.ts +0 -36
  204. package/src/hooks/customer/use-customer-provider.ts +0 -247
  205. package/src/hooks/floor/use-floor-provider.ts +0 -172
  206. package/src/hooks/kitchen/use-kitchen-provider.ts +0 -80
  207. package/src/hooks/order/use-get-point-reward.ts +0 -50
  208. package/src/hooks/order/use-loop-fetch-order.ts +0 -30
  209. package/src/hooks/order/use-order-items.ts +0 -61
  210. package/src/hooks/order/use-orders.ts +0 -76
  211. package/src/hooks/payment/use-payment-provider.ts +0 -221
  212. package/src/hooks/product/use-product-provider.ts +0 -87
  213. package/src/hooks/session/use-check-session.tsx +0 -19
  214. package/src/hooks/session/use-session-provider.ts +0 -79
  215. package/src/hooks/table/use-pos-table-provider.ts +0 -193
  216. package/src/index.css +0 -5
  217. package/src/index.ts +0 -10
  218. package/src/layouts/common.tsx +0 -15
  219. package/src/layouts/index.ts +0 -4
  220. package/src/layouts/pos-layout.tsx +0 -33
  221. package/src/layouts/pos-order-layout.tsx +0 -43
  222. package/src/layouts/sale-layout.tsx +0 -25
  223. package/src/locales/en.json +0 -394
  224. package/src/locales/vi.json +0 -400
  225. package/src/pages/index.ts +0 -4
  226. package/src/pages/login/index.tsx +0 -128
  227. package/src/pages/pincode/index.tsx +0 -198
  228. package/src/pages/pos/kitchen-management/layout.tsx +0 -18
  229. package/src/pages/pos/management-floor/index.tsx +0 -7
  230. package/src/pages/pos/management-order/index.tsx +0 -7
  231. package/src/pages/pos/management-order/order-detail/index.tsx +0 -7
  232. package/src/pages/pos/management-table/index.tsx +0 -0
  233. package/src/pages/pos/payment-success/index.tsx +0 -75
  234. package/src/provider/app-provider.tsx +0 -56
  235. package/src/provider/fallback/custom-error.tsx +0 -26
  236. package/src/provider/main-provider.tsx +0 -41
  237. package/src/provider/meta-provider.tsx +0 -72
  238. package/src/provider/modal-provider.tsx +0 -48
  239. package/src/provider/notification-provider.tsx +0 -64
  240. package/src/provider/pos-provider/close-session-provider/index.tsx +0 -207
  241. package/src/provider/pos-provider/customer-provider/index.tsx +0 -30
  242. package/src/provider/pos-provider/floor-provider/index.tsx +0 -39
  243. package/src/provider/pos-provider/index.ts +0 -6
  244. package/src/provider/pos-provider/kitchen-provider/index.tsx +0 -30
  245. package/src/provider/pos-provider/order-detail-provider/index.tsx +0 -233
  246. package/src/provider/pos-provider/order-provider/index.tsx +0 -803
  247. package/src/provider/pos-provider/payment-provider/index.tsx +0 -30
  248. package/src/provider/pos-provider/product-provider/index.tsx +0 -30
  249. package/src/provider/pos-provider/sale-provider/index.tsx +0 -168
  250. package/src/provider/pos-provider/session-provider/index.tsx +0 -30
  251. package/src/provider/pos-provider/socket-provider/index.tsx +0 -118
  252. package/src/provider/pos-provider/table-provider/index.tsx +0 -30
  253. package/src/provider/public-provider.tsx +0 -104
  254. package/src/provider/use-session-provider.ts +0 -79
  255. package/src/router/app-router.tsx +0 -38
  256. package/src/router/index.tsx +0 -26
  257. package/src/router/pos-route.tsx +0 -75
  258. package/src/router/protected-route.tsx +0 -16
  259. package/src/router/public-route.tsx +0 -11
  260. package/src/store/header/index.ts +0 -21
  261. package/src/store/session/index.ts +0 -25
  262. package/src/store/states/cart.state.ts +0 -135
  263. package/src/store/states/close-session.state.ts +0 -20
  264. package/src/store/states/customer.state.ts +0 -19
  265. package/src/store/states/payment.state.ts +0 -14
  266. package/src/styles/base.css +0 -212
  267. package/src/styles/common.css +0 -65
  268. package/src/styles/lib/tailwind.css +0 -0
  269. package/src/styles/lib/tailwind.theme.css +0 -34
  270. package/src/styles/loading.css +0 -72
  271. package/src/styles/main.css +0 -5
  272. package/src/styles/refreshing-content.css +0 -55
  273. package/src/styles/text.css +0 -44
  274. package/src/types/account.ts +0 -61
  275. package/src/types/branch.ts +0 -6
  276. package/src/types/category.ts +0 -13
  277. package/src/types/common.ts +0 -4
  278. package/src/types/customer.ts +0 -52
  279. package/src/types/dashboard.ts +0 -18
  280. package/src/types/edc.ts +0 -37
  281. package/src/types/export-e-invoice.ts +0 -17
  282. package/src/types/filter.d.ts +0 -12
  283. package/src/types/floor/floor.ts +0 -16
  284. package/src/types/floor.d.ts +0 -36
  285. package/src/types/index.ts +0 -127
  286. package/src/types/invoice.ts +0 -32
  287. package/src/types/modal.ts +0 -15
  288. package/src/types/notification.ts +0 -12
  289. package/src/types/order.ts +0 -182
  290. package/src/types/payment.ts +0 -44
  291. package/src/types/product/product.ts +0 -47
  292. package/src/types/product.ts +0 -137
  293. package/src/types/provider-info.d.ts +0 -14
  294. package/src/types/qr.d.ts +0 -25
  295. package/src/types/report.d.ts +0 -43
  296. package/src/types/sale.d.ts +0 -68
  297. package/src/types/search.d.ts +0 -7
  298. package/src/types/session.d.ts +0 -30
  299. package/src/types/shop-qr.d.ts +0 -89
  300. package/src/types/staff.d.ts +0 -35
  301. package/src/types/store.d.ts +0 -25
  302. package/src/types/table.d.ts +0 -57
  303. package/src/utils/close-session-ticket.tsx +0 -129
  304. package/src/utils/functions.ts +0 -299
  305. package/src/utils/i18n.ts +0 -25
  306. package/src/utils/pos/bill.ts +0 -156
  307. package/src/utils/pos/convert-order.ts +0 -58
  308. package/src/utils/pos/helpers.ts +0 -48
  309. package/src/utils/pos/session.ts +0 -44
  310. package/src/utils/storages/index.ts +0 -1
  311. package/src/utils/storages/local-storage.ts +0 -72
  312. package/tailwind.preset.ts +0 -25
  313. package/tsconfig.json +0 -30
  314. package/tsup.config.ts +0 -30
@@ -1,77 +0,0 @@
1
- export const IcAvailableTable = () => {
2
- return (
3
- <svg
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="40"
6
- height="31"
7
- viewBox="0 0 40 31"
8
- fill="none"
9
- >
10
- <path
11
- d="M22.6384 0.728937C22.4446 0.500407 22.2034 0.31683 21.9315 0.190978C21.6596 0.0651251 21.3636 1.84977e-05 21.064 0.00018642H18.809C18.5073 -0.00386975 18.2084 0.0583104 17.9334 0.182341C17.6583 0.306372 17.4139 0.489234 17.2172 0.71803C17.0205 0.946826 16.8764 1.21598 16.7951 1.50652C16.7138 1.79706 16.6972 2.10191 16.7465 2.39956L17.434 6.29769C17.4603 6.46037 17.5442 6.60817 17.6704 6.71417C17.7966 6.82016 17.9567 6.87731 18.1215 6.87519H21.7927C21.9575 6.87731 22.1176 6.82016 22.2438 6.71417C22.37 6.60817 22.4539 6.46037 22.4802 6.29769L23.1677 2.39956C23.2076 2.09931 23.1808 1.79396 23.0893 1.50523C22.9978 1.21649 22.8438 0.95145 22.6384 0.728937Z"
12
- fill="#CDCDCD"
13
- />
14
- <path
15
- d="M19.9375 5.5C15.3791 5.5 11.0074 7.31082 7.7841 10.5341C4.56082 13.7574 2.75 18.1291 2.75 22.6875V26.125C2.75 26.3073 2.82243 26.4822 2.95136 26.6111C3.0803 26.7401 3.25516 26.8125 3.4375 26.8125H36.4375C36.6198 26.8125 36.7947 26.7401 36.9236 26.6111C37.0526 26.4822 37.125 26.3073 37.125 26.125V22.6875C37.125 20.4304 36.6804 18.1954 35.8167 16.1101C34.9529 14.0248 33.6869 12.1301 32.0909 10.5341C30.4949 8.9381 28.6002 7.67207 26.5149 6.80832C24.4296 5.94457 22.1946 5.5 19.9375 5.5Z"
16
- fill="#DEDEDE"
17
- />
18
- <path
19
- d="M22.4688 5.68555C25.4468 7.31348 27.9322 9.71254 29.6643 12.6313C31.3965 15.55 32.3116 18.8809 32.3137 22.2749V26.0562C32.3138 26.2567 32.2341 26.4491 32.0922 26.5909C31.9504 26.7327 31.7581 26.8124 31.5575 26.8124H36.4387C36.6211 26.8124 36.796 26.74 36.9249 26.6111C37.0538 26.4821 37.1262 26.3073 37.1262 26.1249V22.6874C37.1266 18.5671 35.6468 14.5838 32.9565 11.4631C30.2661 8.34242 26.5442 6.29205 22.4688 5.68555Z"
20
- fill="#D6D6D6"
21
- />
22
- <path
23
- d="M6.3586 21.189H6.2486C6.06924 21.1602 5.90855 21.0617 5.80163 20.9148C5.69471 20.7679 5.65026 20.5848 5.67798 20.4052C6.00965 18.3555 6.77956 16.4014 7.93517 14.6763C9.09077 12.9512 10.6049 11.4957 12.3742 10.409C12.4508 10.3447 12.5404 10.2979 12.6369 10.2719C12.7333 10.2458 12.8343 10.2411 12.9328 10.258C13.0313 10.2749 13.1249 10.3132 13.2071 10.37C13.2893 10.4268 13.3582 10.5008 13.4088 10.587C13.4595 10.6731 13.4908 10.7692 13.5005 10.8687C13.5102 10.9682 13.4981 11.0685 13.4651 11.1629C13.432 11.2572 13.3788 11.3431 13.3092 11.4148C13.2395 11.4864 13.1551 11.542 13.0617 11.5777C11.4672 12.5651 10.104 13.8842 9.06481 15.4454C8.02559 17.0066 7.33474 18.7732 7.03923 20.6252C7.01014 20.7842 6.92597 20.9279 6.8015 21.031C6.67703 21.1341 6.52022 21.19 6.3586 21.189Z"
24
- fill="white"
25
- />
26
- <path
27
- d="M39.1875 25.4375H0.687501C0.505165 25.4375 0.330297 25.5099 0.201365 25.6389C0.0724342 25.7678 1.37687e-06 25.9427 1.37687e-06 26.125V27.8438C-0.000232426 27.9606 0.0293137 28.0756 0.0858504 28.1778C0.142387 28.28 0.224049 28.3662 0.323126 28.4281L3.07313 30.1469C3.18254 30.2147 3.30878 30.2504 3.4375 30.25H36.4375C36.5662 30.2504 36.6925 30.2147 36.8019 30.1469L39.5519 28.4281C39.651 28.3662 39.7326 28.28 39.7892 28.1778C39.8457 28.0756 39.8752 27.9606 39.875 27.8438V26.125C39.875 25.9427 39.8026 25.7678 39.6736 25.6389C39.5447 25.5099 39.3698 25.4375 39.1875 25.4375Z"
28
- fill="#CCCCCC"
29
- />
30
- <path
31
- d="M25.5899 6.46289C24.5174 7.91955 24.0025 9.71242 24.1387 11.5162C24.2748 13.32 25.0531 15.0152 26.3322 16.2944C27.6113 17.5735 29.3065 18.3517 31.1103 18.4879C32.9141 18.6241 34.707 18.1092 36.1637 17.0366C35.3084 14.5932 33.9138 12.3739 32.0832 10.5433C30.2527 8.71281 28.0333 7.31814 25.5899 6.46289Z"
32
- fill="#C6C6C6"
33
- />
34
- <path
35
- d="M31.625 17.1875C35.0423 17.1875 37.8125 14.4173 37.8125 11C37.8125 7.58274 35.0423 4.8125 31.625 4.8125C28.2077 4.8125 25.4375 7.58274 25.4375 11C25.4375 14.4173 28.2077 17.1875 31.625 17.1875Z"
36
- fill="currentColor"
37
- />
38
- <path
39
- d="M32.3125 10.3125V8.25H30.9375V10.3125H28.875V11.6875H30.9375V13.75H32.3125V11.6875H34.375V10.3125H32.3125Z"
40
- fill="white"
41
- />
42
- </svg>
43
- );
44
- };
45
-
46
- export const IcSeatTable = () => {
47
- return (
48
- <svg
49
- xmlns="http://www.w3.org/2000/svg"
50
- width="13"
51
- height="10"
52
- viewBox="0 0 13 10"
53
- fill="none"
54
- >
55
- <path
56
- d="M7.61412 8.98547L7.05151 8.61218C7.01489 8.58775 6.98489 8.55463 6.96419 8.51578C6.94349 8.47693 6.93272 8.43356 6.93286 8.38954V5.06592H5.86632V8.38954C5.86632 8.43343 5.8555 8.47663 5.8348 8.51533C5.8141 8.55403 5.78417 8.58702 5.74766 8.61138L5.18506 8.98547C5.14855 9.00983 5.11862 9.04282 5.09792 9.08152C5.07723 9.12022 5.0664 9.16343 5.06641 9.20731V9.3321C5.06641 9.40281 5.0945 9.47063 5.1445 9.52064C5.19451 9.57064 5.26233 9.59873 5.33304 9.59873H7.46613C7.53685 9.59873 7.60467 9.57064 7.65467 9.52064C7.70468 9.47063 7.73277 9.40281 7.73277 9.3321V9.20811C7.73291 9.16409 7.72214 9.12072 7.70144 9.08187C7.68074 9.04302 7.65074 9.0099 7.61412 8.98547Z"
57
- fill="currentColor"
58
- />
59
- <path
60
- d="M9.86621 3.46631H2.66703C2.51977 3.46631 2.40039 3.58569 2.40039 3.73294V4.26622C2.40039 4.41348 2.51977 4.53285 2.66703 4.53285H9.86621C10.0135 4.53285 10.1328 4.41348 10.1328 4.26622V3.73294C10.1328 3.58569 10.0135 3.46631 9.86621 3.46631Z"
61
- fill="currentColor"
62
- />
63
- <path
64
- d="M6.66678 0.814307V0.533273H6.93342C7.00413 0.533273 7.07195 0.505181 7.12196 0.455177C7.17196 0.405173 7.20005 0.337353 7.20005 0.266636C7.20005 0.19592 7.17196 0.1281 7.12196 0.078096C7.07195 0.028092 7.00413 0 6.93342 0H5.86687C5.79616 0 5.72834 0.028092 5.67833 0.078096C5.62833 0.1281 5.60024 0.19592 5.60024 0.266636C5.60024 0.337353 5.62833 0.405173 5.67833 0.455177C5.72834 0.505181 5.79616 0.533273 5.86687 0.533273H6.13351V0.814307C5.56784 0.87179 5.03526 1.10826 4.61326 1.48931C4.19126 1.87036 3.90184 2.37611 3.78711 2.933H9.01318C8.89845 2.37611 8.60903 1.87036 8.18703 1.48931C7.76502 1.10826 7.23245 0.87179 6.66678 0.814307ZM6.05352 1.90405C5.6865 1.98597 5.35984 2.19402 5.13042 2.49198C5.08739 2.54813 5.02382 2.58489 4.95369 2.59416C4.88356 2.60344 4.81261 2.58447 4.75647 2.54144C4.70032 2.49841 4.66356 2.43484 4.65429 2.36471C4.64501 2.29458 4.66397 2.22363 4.707 2.16749C5.01294 1.77008 5.44858 1.49257 5.93806 1.38331C5.97226 1.37573 6.00761 1.37496 6.0421 1.38104C6.07659 1.38712 6.10954 1.39993 6.13908 1.41875C6.16862 1.43757 6.19416 1.46202 6.21425 1.49071C6.23434 1.5194 6.24858 1.55176 6.25616 1.58595C6.26374 1.62014 6.26451 1.6555 6.25843 1.68999C6.25235 1.72448 6.23954 1.75743 6.22072 1.78697C6.2019 1.81651 6.17745 1.84205 6.14876 1.86214C6.12007 1.88223 6.08771 1.89647 6.05352 1.90405Z"
65
- fill="currentColor"
66
- />
67
- <path
68
- d="M12.6686 2.84706C12.6187 2.79015 12.5572 2.74455 12.4882 2.71333C12.4192 2.68211 12.3444 2.66598 12.2687 2.66602H11.981C11.8641 2.66663 11.7507 2.7056 11.6582 2.77695C11.5656 2.84829 11.4991 2.94806 11.4688 3.0609L10.779 5.63714H9.1341C8.95714 5.63732 8.78526 5.69637 8.64556 5.80499C8.50585 5.9136 8.40625 6.06562 8.36246 6.23708L8.28646 6.53224C8.26613 6.61101 8.26408 6.69339 8.28048 6.77307C8.29688 6.85276 8.3313 6.92763 8.38109 6.99196C8.43089 7.0563 8.49474 7.10839 8.56777 7.14424C8.64079 7.1801 8.72105 7.19877 8.80241 7.19883H8.8208L8.30593 9.2674C8.29747 9.3014 8.2958 9.33673 8.30101 9.37138C8.30622 9.40602 8.3182 9.4393 8.33628 9.46932C8.35436 9.49933 8.37817 9.52548 8.40636 9.54629C8.43455 9.56709 8.46657 9.58214 8.50057 9.59056C8.52166 9.59596 8.54334 9.59864 8.5651 9.59856C8.62458 9.59854 8.68234 9.57864 8.7292 9.54202C8.77607 9.5054 8.80934 9.45416 8.82374 9.39645L9.36954 7.19883H11.2821L11.769 9.38978C11.7821 9.4489 11.815 9.50179 11.8622 9.53973C11.9094 9.57768 11.9681 9.59843 12.0287 9.59856C12.0483 9.59853 12.0677 9.59638 12.0868 9.59216C12.121 9.58459 12.1534 9.57035 12.1821 9.55026C12.2108 9.53018 12.2352 9.50463 12.2541 9.47509C12.2729 9.44555 12.2857 9.4126 12.2918 9.3781C12.2978 9.34361 12.2971 9.30826 12.2895 9.27406L11.8191 7.15804C11.963 7.11222 12.0909 7.02663 12.1881 6.91118C12.2854 6.79572 12.348 6.6551 12.3687 6.50558L12.7974 3.27075C12.8075 3.19502 12.8012 3.11803 12.779 3.04494C12.7567 2.97186 12.7191 2.90438 12.6686 2.84706Z"
69
- fill="currentColor"
70
- />
71
- <path
72
- d="M4.4207 6.99272C4.47083 6.92842 4.50549 6.85343 4.52199 6.77358C4.5385 6.69373 4.53641 6.61116 4.51589 6.53224L4.43963 6.23734C4.39593 6.06588 4.29639 5.91385 4.15672 5.80522C4.01705 5.6966 3.84519 5.63755 3.66825 5.63741H2.02444L1.33465 3.0609C1.30427 2.94784 1.23752 2.84791 1.14471 2.77654C1.0519 2.70518 0.938184 2.66634 0.821107 2.66602H0.53154C0.455711 2.66626 0.380806 2.68268 0.311823 2.71417C0.242841 2.74566 0.181367 2.7915 0.131505 2.84863C0.0816419 2.90576 0.0445366 2.97286 0.0226646 3.04547C0.000792528 3.11808 -0.00534323 3.19451 0.0046667 3.26968L0.433418 6.50558C0.453846 6.65517 0.516193 6.79592 0.61325 6.91157C0.710307 7.02722 0.838111 7.11304 0.981889 7.1591L0.511542 9.27406C0.496197 9.34312 0.508912 9.41544 0.54689 9.47512C0.584868 9.5348 0.644998 9.57695 0.714053 9.59229C0.783107 9.60764 0.855429 9.59492 0.915109 9.55695C0.974789 9.51897 1.01694 9.45884 1.03228 9.38978L1.51969 7.19883H3.43308L3.97995 9.39645C3.99437 9.45429 4.02777 9.50563 4.07479 9.54227C4.12182 9.5789 4.17977 9.59872 4.23938 9.59856C4.26115 9.59864 4.28283 9.59596 4.30391 9.59056C4.33789 9.58211 4.36988 9.56704 4.39804 9.54623C4.4262 9.52541 4.44999 9.49925 4.46804 9.46924C4.48609 9.43923 4.49805 9.40596 4.50324 9.37133C4.50843 9.33669 4.50675 9.30138 4.49829 9.2674L3.98208 7.19883H4.00074C4.08187 7.19903 4.16195 7.18055 4.23478 7.1448C4.30761 7.10906 4.37123 7.05702 4.4207 6.99272Z"
73
- fill="currentColor"
74
- />
75
- </svg>
76
- );
77
- };
@@ -1,33 +0,0 @@
1
- function UserAddLineIcon() {
2
- return (
3
- <svg
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="16"
6
- height="16"
7
- viewBox="0 0 16 16"
8
- fill="none"
9
- >
10
- <path
11
- d="M9.2002 9.35159V10.6056C8.65715 10.4136 8.07596 10.3547 7.50544 10.4339C6.93492 10.513 6.39172 10.7279 5.92145 11.0605C5.45119 11.3931 5.0676 11.8337 4.80289 12.3452C4.53818 12.8568 4.40009 13.4244 4.4002 14.0004L3.2002 13.9998C3.20001 13.2671 3.36755 12.5441 3.68997 11.8862C4.0124 11.2283 4.48116 10.653 5.06033 10.2042C5.63949 9.75547 6.3137 9.44527 7.03129 9.29738C7.74887 9.14948 8.49079 9.16782 9.2002 9.35099V9.35159ZM8.0002 8.60039C6.0112 8.60039 4.4002 6.98939 4.4002 5.00039C4.4002 3.01139 6.0112 1.40039 8.0002 1.40039C9.9892 1.40039 11.6002 3.01139 11.6002 5.00039C11.6002 6.98939 9.9892 8.60039 8.0002 8.60039ZM8.0002 7.40039C9.3262 7.40039 10.4002 6.32639 10.4002 5.00039C10.4002 3.67439 9.3262 2.60039 8.0002 2.60039C6.6742 2.60039 5.6002 3.67439 5.6002 5.00039C5.6002 6.32639 6.6742 7.40039 8.0002 7.40039ZM11.6002 11.0004V9.20039H12.8002V11.0004H14.6002V12.2004H12.8002V14.0004H11.6002V12.2004H9.8002V11.0004H11.6002Z"
12
- fill="currentColor"
13
- />
14
- </svg>
15
- )
16
- }
17
-
18
- export default UserAddLineIcon
19
-
20
- export const IcUserAddFill = () => (
21
- <svg
22
- xmlns="http://www.w3.org/2000/svg"
23
- width="15"
24
- height="16"
25
- viewBox="0 0 15 16"
26
- fill="none"
27
- >
28
- <path
29
- d="M7.5 9.939V15.75H1.93842e-07C-0.000232586 14.8342 0.209191 13.9304 0.612224 13.108C1.01526 12.2857 1.6012 11.5665 2.32516 11.0055C3.04912 10.4446 3.89188 10.0568 4.78887 9.87198C5.68585 9.68712 6.61325 9.71004 7.5 9.939ZM6 9C3.51375 9 1.5 6.98625 1.5 4.5C1.5 2.01375 3.51375 0 6 0C8.48625 0 10.5 2.01375 10.5 4.5C10.5 6.98625 8.48625 9 6 9ZM10.5 12V9.75H12V12H14.25V13.5H12V15.75H10.5V13.5H8.25V12H10.5Z"
30
- fill="currentColor"
31
- />
32
- </svg>
33
- )
@@ -1,65 +0,0 @@
1
- export const IcUserPlus = () => {
2
- return (
3
- <svg
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="20"
6
- height="20"
7
- viewBox="0 0 20 20"
8
- fill="none"
9
- >
10
- <path
11
- d="M11.5 11.689V17.5H4C3.99977 16.5842 4.20919 15.6804 4.61222 14.858C5.01526 14.0357 5.6012 13.3165 6.32516 12.7555C7.04912 12.1946 7.89188 11.8068 8.78887 11.622C9.68585 11.4371 10.6132 11.46 11.5 11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4862 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4862 10.75 10 10.75ZM14.5 13.75V11.5H16V13.75H18.25V15.25H16V17.5H14.5V15.25H12.25V13.75H14.5Z"
12
- fill="currentColor"
13
- />
14
- </svg>
15
- )
16
- }
17
-
18
- export const IcCustomer = () => {
19
- return (
20
- <svg
21
- xmlns="http://www.w3.org/2000/svg"
22
- width="24"
23
- height="24"
24
- viewBox="0 0 24 24"
25
- fill="none"
26
- >
27
- <path
28
- d="M4.80078 20.9996C4.80078 19.09 5.55935 17.2587 6.90961 15.9084C8.25987 14.5582 10.0912 13.7996 12.0008 13.7996C13.9103 13.7996 15.7417 14.5582 17.092 15.9084C18.4422 17.2587 19.2008 19.09 19.2008 20.9996H4.80078ZM12.0008 12.8996C9.01728 12.8996 6.60078 10.4831 6.60078 7.49961C6.60078 4.51611 9.01728 2.09961 12.0008 2.09961C14.9843 2.09961 17.4008 4.51611 17.4008 7.49961C17.4008 10.4831 14.9843 12.8996 12.0008 12.8996Z"
29
- fill="#363793"
30
- />
31
- </svg>
32
- )
33
- }
34
-
35
- export const UserLineIcon = () => {
36
- return (
37
- <svg
38
- xmlns="http://www.w3.org/2000/svg"
39
- width="60"
40
- height="78"
41
- viewBox="0 0 60 78"
42
- fill="none"
43
- >
44
- <path
45
- d="M0.664062 77.668C0.664062 61.4675 13.797 48.3346 29.9974 48.3346C46.1978 48.3346 59.3307 61.4675 59.3307 77.668H51.9974C51.9974 65.5177 42.1476 55.668 29.9974 55.668C17.8471 55.668 7.9974 65.5177 7.9974 77.668H0.664062ZM29.9974 44.668C17.8424 44.668 7.9974 34.823 7.9974 22.668C7.9974 10.513 17.8424 0.667969 29.9974 0.667969C42.1524 0.667969 51.9974 10.513 51.9974 22.668C51.9974 34.823 42.1524 44.668 29.9974 44.668ZM29.9974 37.3346C38.1007 37.3346 44.6641 30.7713 44.6641 22.668C44.6641 14.5646 38.1007 8.0013 29.9974 8.0013C21.8941 8.0013 15.3307 14.5646 15.3307 22.668C15.3307 30.7713 21.8941 37.3346 29.9974 37.3346Z"
46
- fill="#CACFD8"
47
- />
48
- </svg>
49
- )
50
- }
51
-
52
- export const UserAddFillIcon = () => (
53
- <svg
54
- xmlns="http://www.w3.org/2000/svg"
55
- width="20"
56
- height="20"
57
- viewBox="0 0 20 20"
58
- fill="none"
59
- >
60
- <path
61
- d="M11.5 11.689V17.5H4C3.99977 16.5842 4.20919 15.6804 4.61222 14.858C5.01526 14.0357 5.6012 13.3165 6.32516 12.7555C7.04912 12.1946 7.89188 11.8068 8.78887 11.622C9.68585 11.4371 10.6132 11.46 11.5 11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4862 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4862 10.75 10 10.75ZM14.5 13.75V11.5H16V13.75H18.25V15.25H16V17.5H14.5V15.25H12.25V13.75H14.5Z"
62
- fill="currentColor"
63
- />
64
- </svg>
65
- )
@@ -1,46 +0,0 @@
1
- import { cn } from "@utils/functions";
2
-
3
- const ButtonAction = ({
4
- id,
5
- onClick,
6
- iconSrc,
7
- children,
8
- className,
9
- text,
10
- disabled,
11
- type = "button",
12
- textClassName,
13
- style,
14
- }: {
15
- id?: string;
16
- onClick?: (e?: any) => void;
17
- iconSrc?: React.ReactNode;
18
- className?: string;
19
- disabled?: boolean;
20
- text?: string;
21
- children?: React.ReactNode;
22
- type?: "button" | "submit" | "reset" | undefined;
23
- textClassName?: string;
24
- style?: React.CSSProperties;
25
- }) => {
26
- return (
27
- <button
28
- id={id}
29
- type={type}
30
- onClick={onClick}
31
- disabled={disabled}
32
- className={cn("button", className)}
33
- style={style}
34
- >
35
- {iconSrc}
36
- {text && (
37
- <p className={cn("line-clamp-1 font-semibold", textClassName)}>
38
- {text}
39
- </p>
40
- )}
41
- {children}
42
- </button>
43
- );
44
- };
45
-
46
- export default ButtonAction;
@@ -1,23 +0,0 @@
1
- import { cn } from "@utils/functions";
2
-
3
- export const ButtonIcon = ({
4
- iconSrc,
5
- onClick,
6
- className,
7
- }: {
8
- iconSrc: React.ReactNode;
9
- onClick: () => void;
10
- className?: string;
11
- }) => {
12
- return (
13
- <button
14
- className={cn(
15
- "size-11 min-w-11 flex items-center justify-center text-[--text-color] hover:bg-gray-100 rounded-lg border bg-white shadow-sm",
16
- className
17
- )}
18
- onClick={() => onClick()}
19
- >
20
- {iconSrc}
21
- </button>
22
- );
23
- };
@@ -1,79 +0,0 @@
1
- import { ChevronBottomIcon } from "@fctc/sme-widget-ui";
2
- import { useClickOutside } from "@hooks/common/use-click-outside";
3
- import { cn } from "@utils/functions";
4
- import { JSX, useState } from "react";
5
-
6
- interface DropdownSelectorProps<T> {
7
- options: T[];
8
- selectedValue: {
9
- label?: string;
10
- icon?: any;
11
- };
12
- onSelect: (value: T) => void;
13
- renderItem: (item: T) => JSX.Element | string;
14
- className?: string;
15
- buttonClassName?: string;
16
- dropdownClassName?: string;
17
- placeholder?: string;
18
- }
19
-
20
- const DropdownSelector = <T,>({
21
- options,
22
- selectedValue,
23
- onSelect,
24
- renderItem,
25
- className = "",
26
- buttonClassName = "",
27
- dropdownClassName = "",
28
- placeholder,
29
- }: DropdownSelectorProps<T>) => {
30
- const [open, setOpen] = useState(false);
31
- const dropdownRef = useClickOutside({ handler: () => setOpen(false) });
32
-
33
- return (
34
- <div
35
- ref={dropdownRef}
36
- className={`relative ${className}`}
37
- onClick={() => setOpen(!open)}
38
- >
39
- <div
40
- className={cn(
41
- "flex items-center justify-between gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer",
42
- buttonClassName
43
- )}
44
- >
45
- {selectedValue?.icon}
46
- {selectedValue?.label ? (
47
- <span>{selectedValue?.label}</span>
48
- ) : (
49
- <span className="text-neutral-400-68">{placeholder}</span>
50
- )}
51
- <ChevronBottomIcon className="h-4 w-4" />
52
- </div>
53
- {open && (
54
- <div
55
- className={cn(
56
- "absolute left-0 z-[99999] bg-white overflow-hidden rounded-lg border border-[#dbe0e6] text-sub-600 h-auto !min-h-fit text-xs !leading-5 ",
57
- dropdownClassName
58
- )}
59
- onClick={(e) => e.stopPropagation()}
60
- >
61
- {options.map((option: any, index: number) => (
62
- <div
63
- key={index}
64
- onClick={() => {
65
- onSelect(option);
66
- setOpen(false);
67
- }}
68
- className="text-xs cursor-pointer leading-5 select-item transition-all active"
69
- >
70
- {renderItem(option)}
71
- </div>
72
- ))}
73
- </div>
74
- )}
75
- </div>
76
- );
77
- };
78
-
79
- export default DropdownSelector;
@@ -1,60 +0,0 @@
1
- import { IcPlus } from "@assets/icons/breadcrumbs-icon";
2
- import { cn } from "@utils/functions";
3
- import React from "react";
4
- import ButtonAction from "./button-action";
5
-
6
- interface EmptyStateProps {
7
- image: string;
8
- imageClassName?: string;
9
- imageAlt?: string;
10
- title?: string;
11
- description?: string;
12
- buttonLabel?: string;
13
- onAction?: () => void;
14
- className?: string;
15
- }
16
-
17
- export const EmptyState: React.FC<EmptyStateProps> = ({
18
- image,
19
- imageAlt = "",
20
- title,
21
- description,
22
- buttonLabel,
23
- onAction,
24
- className = "",
25
- imageClassName = "",
26
- }) => {
27
- return (
28
- <div
29
- className={cn(
30
- "flex flex-col items-center justify-center size-full gap-4",
31
- className
32
- )}
33
- >
34
- <img
35
- src={image}
36
- alt={imageAlt}
37
- className={cn("size-32 object-contain", imageClassName)}
38
- />
39
-
40
- <div className="flex flex-col gap-2 items-center justify-center">
41
- <h2 className="text-2xl font-semibold text-text-primary leading-8 tracking-[-0.24px]">
42
- {title}
43
- </h2>
44
-
45
- <p className="text-text-disable font-medium leading-6 tracking-[-0.24px]">
46
- {description}
47
- </p>
48
- </div>
49
-
50
- {onAction && buttonLabel && (
51
- <ButtonAction
52
- text={buttonLabel}
53
- iconSrc={<IcPlus />}
54
- onClick={onAction}
55
- className="flex items-center space-x-2 px-5 py-2 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors duration-200 font-medium text-gray-700"
56
- />
57
- )}
58
- </div>
59
- );
60
- };
@@ -1,89 +0,0 @@
1
- import { IcNotification, IcThreeDots } from "@assets/icons/common";
2
- import { PosHelperModal } from "@components/pos-management/pos-helpers";
3
- import { usePosAppProvider } from "@provider/app-provider";
4
- import { t } from "i18next";
5
- import { useState } from "react";
6
- import { useNavigate } from "react-router-dom";
7
- import PosConnect from "../../pos-management/payment-content/card-payment/pos-payment/pos-connect";
8
- import ButtonAction from "../button-action";
9
- import { ButtonIcon } from "../button-icon";
10
- import ModalZoom from "../modal/modal-zoom";
11
- import Tabs from "./tabs";
12
-
13
- export const VNCurrency = "₫";
14
-
15
- export const Header = () => {
16
- const [showPosHelper, setShowPosHelper] = useState(false);
17
- const [showWarning, setShowWarning] = useState(false);
18
- const { user } = usePosAppProvider();
19
- const dataUser = user?.userProfile?.data;
20
-
21
- return (
22
- <>
23
- <div
24
- className="bg-[var(--text-unavailable-table-color)] pb-0 flex justify-between items-center h-[56px] px-3"
25
- style={{
26
- background: "var(--text-unavailable-table-color)",
27
- }}
28
- >
29
- <Tabs />
30
- <div className="flex gap-2">
31
- <PosConnect dataUser={dataUser} />
32
- <img
33
- src={dataUser?.image_1024 || "/Avatar.png"}
34
- alt="User Avatar"
35
- className="size-11 rounded-lg object-cover"
36
- />
37
- <ButtonIcon iconSrc={<IcNotification />} onClick={() => {}} />
38
- <ButtonIcon
39
- iconSrc={<IcThreeDots />}
40
- onClick={() => setShowPosHelper(true)}
41
- />
42
- </div>
43
- </div>
44
- <PosHelperModal
45
- isOpen={showPosHelper}
46
- onClose={() => setShowPosHelper(false)}
47
- />
48
- <ConfirmBack isOpen={showWarning} onClose={() => setShowWarning(false)} />
49
- </>
50
- );
51
- };
52
-
53
- const ConfirmBack = ({
54
- isOpen,
55
- onClose,
56
- }: {
57
- isOpen: boolean;
58
- onClose: () => void;
59
- }) => {
60
- const navigate = useNavigate();
61
- return (
62
- <ModalZoom
63
- isOpen={isOpen}
64
- onClose={onClose}
65
- className="p-0 py-4 px-5"
66
- modalClassName="w-[40%]"
67
- title="Xác nhận thoát điểm bán" //multi language
68
- footer={
69
- <div className="flex gap-2 justify-end p-4">
70
- <ButtonAction
71
- onClick={() => onClose()}
72
- text={t("cancel_button")}
73
- className="button-secondary w-full"
74
- />
75
- <ButtonAction
76
- onClick={() => navigate(-1)}
77
- text={t("confirm_button")}
78
- className="button-primary w-full"
79
- />
80
- </div>
81
- }
82
- >
83
- <p>
84
- Bạn có đang thoát khỏi điểm bán này. Bạn có muốn thoát điểm bán này
85
- không?
86
- </p>
87
- </ModalZoom>
88
- );
89
- };
@@ -1,119 +0,0 @@
1
- import { headerTabs } from "@constants/headers.constant";
2
- import { QUERY_KEYS } from "@constants/query.constant";
3
- import { useQueryParams } from "@hooks/common/use-query-params";
4
- import { LoadDataModel, useSale } from "@provider/pos-provider/sale-provider";
5
- import { useNavigate } from "react-router-dom";
6
-
7
- const Tabs = () => {
8
- const pathname = window.location.pathname;
9
- const { getData, isModePosRestaurant } = useSale();
10
- const activeId = headerTabs.findIndex((tab) => tab.path === pathname);
11
-
12
- return (
13
- <div className="flex items-end h-[56px]">
14
- {getData(LoadDataModel.POS_CONFIG) &&
15
- (isModePosRestaurant ? headerTabs : headerTabs.slice(1, 3)).map(
16
- (tab) => {
17
- const isActive = tab.path === pathname;
18
- const showLine =
19
- !isActive &&
20
- tab.id !== headerTabs.length - 1 &&
21
- (activeId - tab.id > 1 || tab.id - activeId > 0);
22
- return (
23
- <div className="flex items-center" key={tab.id}>
24
- <HeaderTab tab={tab} isActive={isActive} />
25
- <div
26
- className={`h-5 rounded-full w-[4px] ${
27
- showLine ? "bg-[rgba(0,0,0,0.16)]" : "bg-inherit"
28
- }`}
29
- />
30
- </div>
31
- );
32
- }
33
- )}
34
- </div>
35
- );
36
- };
37
-
38
- export default Tabs;
39
-
40
- export const HeaderTab = ({
41
- tab,
42
- isActive,
43
- }: {
44
- tab: HeaderTabType;
45
- isActive: boolean;
46
- }) => {
47
- const navigate = useNavigate();
48
- const { formatQuery } = useQueryParams();
49
-
50
- const onTab = () => {
51
- const keys = [
52
- QUERY_KEYS.POS_ID,
53
- QUERY_KEYS.SESSION_ID,
54
- QUERY_KEYS.ORDER_ID,
55
- QUERY_KEYS.TABLE_ID,
56
- QUERY_KEYS.FLOOR,
57
- ];
58
- navigate({
59
- pathname: tab.path,
60
- search: formatQuery(keys).toString(),
61
- });
62
- };
63
-
64
- return (
65
- <div onClick={onTab} className="flex items-end cursor-pointer">
66
- <div
67
- className={`w-3 h-12 `}
68
- style={{
69
- background: !isActive
70
- ? "var(--text-unavailable-table-color)"
71
- : "white",
72
- }}
73
- >
74
- <div
75
- className={`size-full rounded-br-full `}
76
- style={{
77
- background: isActive
78
- ? "var(--text-unavailable-table-color)"
79
- : "transparent",
80
- }}
81
- ></div>
82
- </div>
83
-
84
- <div
85
- className={`h-12 px-[22px] rounded-t-xl flex gap-[10px] items-center ${
86
- isActive
87
- ? `bg-white text-colored-primary`
88
- : `bg-transparent text-text-btn`
89
- }`}
90
- >
91
- {tab.icon}
92
- <p className="text-lg font-semibold leading-[26px]">{tab.name}</p>
93
- </div>
94
- <div
95
- className={`w-3 h-12`}
96
- style={{
97
- background: !isActive
98
- ? "var(--text-unavailable-table-color)"
99
- : "white",
100
- }}
101
- >
102
- <div
103
- className={`size-full rounded-bl-full`}
104
- style={{
105
- background: isActive
106
- ? "var(--text-unavailable-table-color)"
107
- : "transparent",
108
- }}
109
- />
110
- </div>
111
- </div>
112
- );
113
- };
114
-
115
- type HeaderTabType = {
116
- name: string;
117
- icon: React.ReactNode;
118
- path: string;
119
- };
@@ -1,20 +0,0 @@
1
- import { cn } from "@utils/functions";
2
-
3
- type TProps = {
4
- imageUrl: string;
5
- className?: string;
6
- imageAlt?: string;
7
- };
8
-
9
- const Image = ({ imageUrl, className, imageAlt }: TProps) => {
10
- return (
11
- <img
12
- // src={"/node_modules/@fctc/sme-pos/dist"+ imageUrl}
13
- src={imageUrl}
14
- className={cn("object-contain", className)}
15
- alt={imageAlt}
16
- />
17
- );
18
- };
19
-
20
- export default Image;
@@ -1,55 +0,0 @@
1
- import { cn } from "@utils/functions";
2
-
3
- type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
4
- title: string;
5
- isRequired?: boolean;
6
- register: any;
7
- errorMessage?: string;
8
- inputClassName?: string;
9
- rightIcon?: React.ReactNode;
10
- };
11
-
12
- const Input = ({
13
- title,
14
- register,
15
- errorMessage,
16
- isRequired,
17
- className,
18
- inputClassName,
19
- rightIcon,
20
- ...props
21
- }: InputProps) => {
22
- return (
23
- <div className={cn("flex flex-col gap-1.5 justify-center", className)}>
24
- <p className="text-text-primary text-sm font-medium leading-5 tracking-[-0.12px]">
25
- {title}
26
- {isRequired && <span className="text-state-error-base"> *</span>}
27
- </p>
28
-
29
- <div
30
- className={cn(
31
- `py-2 px-3 rounded-lg flex items-center justify-between border border-stroke-disabled ${
32
- props.disabled ? "bg-alpha-4" : "bg-white"
33
- }`,
34
- inputClassName
35
- )}
36
- >
37
- <input
38
- {...props}
39
- {...register}
40
- className={`w-full outline-none border-none bg-transparent text-sm leading-5 tracking-[-0.12px] placeholder:text-neutral-400-68 ${
41
- props.disabled ? "text-neutral-400-68" : "text-text-primary"
42
- }`}
43
- />
44
-
45
- {rightIcon}
46
- </div>
47
-
48
- {errorMessage && (
49
- <p className="text-state-error-base text-xs">{errorMessage}</p>
50
- )}
51
- </div>
52
- );
53
- };
54
-
55
- export default Input;