@ozdao/prometheus-framework 0.2.308 → 0.2.310

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/products.server.js +196 -198
  3. package/dist/products.server.mjs +196 -198
  4. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs.map +1 -1
  6. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  7. package/dist/prometheus-framework/src/components/Block/Block.vue.js.map +1 -1
  8. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +2 -1
  9. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs.map +1 -1
  10. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +3 -2
  11. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js.map +1 -1
  12. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +93 -0
  13. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs.map +1 -1
  14. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +94 -1
  15. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js.map +1 -1
  16. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs +0 -93
  17. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
  18. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js +1 -94
  19. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js.map +1 -1
  20. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +2 -2
  21. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
  22. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +2 -2
  23. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
  24. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +13 -12
  25. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs.map +1 -1
  26. package/dist/prometheus-framework/src/components/Field/Field.vue.js +13 -12
  27. package/dist/prometheus-framework/src/components/Field/Field.vue.js.map +1 -1
  28. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +13 -12
  29. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs.map +1 -1
  30. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +13 -12
  31. package/dist/prometheus-framework/src/components/Field/Field.vue2.js.map +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -0
  33. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs.map +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/auth.client.js +1 -0
  35. package/dist/prometheus-framework/src/modules/auth/auth.client.js.map +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +58 -78
  37. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +78 -98
  39. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  40. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +90 -85
  41. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
  42. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +94 -89
  43. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  44. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +1 -0
  45. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
  46. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +1 -0
  47. package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
  48. package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs +19 -1
  49. package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs.map +1 -1
  50. package/dist/prometheus-framework/src/modules/auth/views/router/users.js +19 -1
  51. package/dist/prometheus-framework/src/modules/auth/views/router/users.js.map +1 -1
  52. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +6 -2
  53. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
  54. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +6 -2
  55. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
  56. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +3 -5
  57. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs.map +1 -1
  58. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +4 -6
  59. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
  60. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +13 -13
  62. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +2 -2
  63. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
  64. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
  66. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +3 -3
  67. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs.map +1 -1
  68. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +3 -3
  69. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js.map +1 -1
  70. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +9 -9
  71. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
  72. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +9 -9
  73. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
  74. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs.map +1 -1
  76. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js.map +1 -1
  78. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +4 -4
  79. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
  80. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +4 -4
  81. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
  82. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs.map +1 -1
  84. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js.map +1 -1
  86. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +2 -2
  87. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
  88. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +2 -2
  89. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
  90. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +2 -1
  93. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
  94. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +2 -1
  95. package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
  96. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  99. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  100. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
  103. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  104. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +4 -2
  105. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
  106. package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
  107. package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
  108. package/dist/prometheus-framework/src/modules/globals/views/classes/store.cjs +57 -0
  109. package/dist/prometheus-framework/src/modules/globals/views/classes/store.cjs.map +1 -0
  110. package/dist/prometheus-framework/src/modules/globals/views/classes/store.js +57 -0
  111. package/dist/prometheus-framework/src/modules/globals/views/classes/store.js.map +1 -0
  112. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.cjs +75 -114
  115. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.cjs.map +1 -1
  116. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.js +76 -115
  117. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.js.map +1 -1
  118. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +4 -4
  119. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs.map +1 -1
  120. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +7 -7
  121. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js.map +1 -1
  122. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +4 -0
  123. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
  124. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +4 -0
  125. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
  126. package/dist/prometheus-framework/src/modules/icons/entities/IconCatalog.vue.cjs +36 -0
  127. package/dist/prometheus-framework/src/modules/icons/entities/IconCatalog.vue.cjs.map +1 -0
  128. package/dist/prometheus-framework/src/modules/icons/entities/IconCatalog.vue.js +36 -0
  129. package/dist/prometheus-framework/src/modules/icons/entities/IconCatalog.vue.js.map +1 -0
  130. package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs +36 -24
  131. package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs.map +1 -1
  132. package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js +36 -24
  133. package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js.map +1 -1
  134. package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.cjs +21 -12
  135. package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.cjs.map +1 -1
  136. package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.js +21 -12
  137. package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.js.map +1 -1
  138. package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.cjs +36 -0
  139. package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.cjs.map +1 -0
  140. package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.js +36 -0
  141. package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.js.map +1 -0
  142. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs.map +1 -1
  144. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js.map +1 -1
  146. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs.map +1 -1
  148. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js.map +1 -1
  150. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs.map +1 -1
  152. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +1 -1
  153. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js.map +1 -1
  154. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs.map +1 -1
  156. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
  157. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js.map +1 -1
  158. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  160. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  164. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  165. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  166. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -3
  167. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
  168. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +15 -16
  169. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
  170. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  172. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
  173. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
  174. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +1117 -1117
  175. package/dist/prometheus-framework/src/modules/pages/pages.client.js +1117 -1117
  176. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +3 -3
  177. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
  178. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +3 -3
  179. package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
  180. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  182. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +11 -10
  183. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
  184. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +11 -10
  185. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  186. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +78 -43
  187. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
  188. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +83 -48
  189. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  190. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +79 -29
  191. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
  192. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +90 -40
  193. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  194. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  196. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +120 -81
  197. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
  198. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +133 -94
  199. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
  200. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +39 -21
  201. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  202. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +51 -33
  203. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
  204. package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.cjs +96 -0
  205. package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.cjs.map +1 -0
  206. package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.js +96 -0
  207. package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.js.map +1 -0
  208. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +20 -6
  209. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs.map +1 -1
  210. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +20 -6
  211. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js.map +1 -1
  212. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js +1 -1
  214. package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
  215. package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
  216. package/dist/prometheus-framework/src/modules/products/router/categories.router.cjs +17 -5
  217. package/dist/prometheus-framework/src/modules/products/router/categories.router.cjs.map +1 -1
  218. package/dist/prometheus-framework/src/modules/products/router/categories.router.js +17 -5
  219. package/dist/prometheus-framework/src/modules/products/router/categories.router.js.map +1 -1
  220. package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +1 -12
  221. package/dist/prometheus-framework/src/modules/products/router/products.router.cjs.map +1 -1
  222. package/dist/prometheus-framework/src/modules/products/router/products.router.js +1 -12
  223. package/dist/prometheus-framework/src/modules/products/router/products.router.js.map +1 -1
  224. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +52 -71
  225. package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
  226. package/dist/prometheus-framework/src/modules/products/store/categories.js +52 -71
  227. package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
  228. package/dist/prometheus-framework/src/modules/products/store/products.cjs +6 -8
  229. package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
  230. package/dist/prometheus-framework/src/modules/products/store/products.js +6 -8
  231. package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
  232. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  233. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  234. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  235. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  236. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
  237. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  238. package/dist/prometheus-framework.cjs.js +21 -21
  239. package/dist/prometheus-framework.es.js +910 -910
  240. package/package.json +1 -1
  241. package/src/components/Block/Block.vue +1 -1
  242. package/src/components/Completion/Completion.vue +1 -0
  243. package/src/components/EditImages/EditImages.vue +1 -1
  244. package/src/components/Feed/Feed.vue +1 -1
  245. package/src/components/Field/Field.vue +1 -1
  246. package/src/modules/auth/auth.client.js +2 -0
  247. package/src/modules/auth/views/components/pages/Profile.vue +57 -35
  248. package/src/modules/auth/views/components/pages/ProfileEdit.vue +91 -77
  249. package/src/modules/auth/views/middlewares/auth.validation.js +1 -0
  250. package/src/modules/auth/views/router/users.js +21 -2
  251. package/src/modules/auth/views/store/auth.js +6 -2
  252. package/src/modules/backoffice/components/pages/Dashboard.vue +1 -3
  253. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  254. package/src/modules/community/components/blocks/FooterBlogpost.vue +3 -3
  255. package/src/modules/community/components/layouts/Community.vue +8 -8
  256. package/src/modules/community/components/pages/Blog.vue +1 -1
  257. package/src/modules/community/components/pages/BlogPost.vue +3 -3
  258. package/src/modules/community/components/pages/Community.vue +1 -1
  259. package/src/modules/community/components/sections/Comments.vue +2 -2
  260. package/src/modules/community/router/blogposts.js +4 -3
  261. package/src/modules/globals/globals.client.js +3 -0
  262. package/src/modules/globals/views/classes/store.js +63 -0
  263. package/src/modules/globals/views/components/partials/BottomNavigationBar.vue +87 -59
  264. package/src/modules/globals/views/components/partials/NavigationBar.vue +3 -3
  265. package/src/modules/globals/views/store/globals.js +5 -0
  266. package/src/modules/icons/entities/IconCatalog.vue +18 -0
  267. package/src/modules/icons/entities/IconCommunity.vue +15 -5
  268. package/src/modules/icons/entities/IconGroups.vue +7 -2
  269. package/src/modules/icons/entities/IconHome.vue +18 -0
  270. package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
  271. package/src/modules/icons/skeletons/SkeletonEvent.vue +1 -1
  272. package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
  273. package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
  274. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  275. package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +1 -2
  276. package/src/modules/products/components/blocks/CardCategory.vue +14 -3
  277. package/src/modules/products/components/blocks/CardProduct.vue +12 -11
  278. package/src/modules/products/components/pages/Categories.vue +120 -28
  279. package/src/modules/products/components/pages/CategoryEdit.vue +206 -151
  280. package/src/modules/products/components/pages/ProductEdit.vue +107 -69
  281. package/src/modules/products/components/pages/Products.vue +35 -20
  282. package/src/modules/products/components/sections/CategoriesTree.vue +102 -0
  283. package/src/modules/products/components/sections/EditProductInfo.vue +53 -40
  284. package/src/modules/products/controllers/categories.controller.js +177 -97
  285. package/src/modules/products/controllers/products.controller.js +4 -2
  286. package/src/modules/products/models/category.model.js +15 -66
  287. package/src/modules/products/models/product.model.js +15 -12
  288. package/src/modules/products/products.client.js +0 -1
  289. package/src/modules/products/router/categories.router.js +17 -5
  290. package/src/modules/products/router/products.router.js +0 -12
  291. package/src/modules/products/routes/categories.routes.js +5 -34
  292. package/src/modules/products/store/categories.js +69 -83
  293. package/src/modules/products/store/products.js +6 -8
  294. package/src/styles/base/shadow_transitions_hover_refactor.scss +2 -0
  295. package/src/styles/typography.scss +2 -2
  296. package/src/modules/auth/views/router/account.js +0 -41
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  require("./CardCategory.vue2.cjs");
6
- const _hoisted_1 = { class: "flex-v-center flex" };
6
+ const _hoisted_1 = { class: "flex-v-center flex-column flex" };
7
7
  const _hoisted_2 = { class: "mn-r-auto" };
8
8
  const _sfc_main = {
9
9
  __name: "CardCategory",
@@ -21,10 +21,10 @@ const _sfc_main = {
21
21
  return (_ctx, _cache) => {
22
22
  const _component_router_link = vue.resolveComponent("router-link");
23
23
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
24
- vue.createElementVNode("h4", _hoisted_2, vue.toDisplayString(__props.category.name), 1),
24
+ vue.createElementVNode("h4", _hoisted_2, vue.toDisplayString(__props.category.order) + " / " + vue.toDisplayString(__props.category.name), 1),
25
25
  vue.createVNode(_component_router_link, {
26
26
  to: {
27
- name: "CategoryEdit",
27
+ name: "Category Edit",
28
28
  params: {
29
29
  _id: vue.unref(route).params._id,
30
30
  category: __props.category.url
@@ -1 +1 @@
1
- {"version":3,"file":"CardCategory.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/CardCategory.vue"],"sourcesContent":["<template>\n <div class=\"flex-v-center flex\">\n <h4 class=\"mn-r-auto\">{{category.name}}</h4>\n\n <router-link \n \t:to=\"{\n\t\t\t\tname: 'CategoryEdit', \n\t\t\t\tparams: { \n\t\t\t\t\t_id: route.params._id,\n\t\t\t\t\tcategory: category.url\n\t\t\t\t} \n\t\t\t}\"\n \tclass=\"mn-r-medium nav-link\"\n >\n \tEdit\n \t</router-link>\n <a \n \tclass=\"nav-link\" \n \t@click=\"deleteCategory(category)\"\n >\n \t\tDelete\n \t</a>\n </div>\n</template>\n\n\n<script setup>\nimport { toRef, onMounted, defineEmits } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\n\nconst props = defineProps({\n category: Object,\n});\n\nconst emits = defineEmits(['delete']);\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst deleteCategory = (category) => {\n emits('delete', category);\n};\n\n</script>\n\n\n<style lang=\"scss\">\n.categories-card {\n\n}\n</style>\n\n\n"],"names":["useRoute","useRouter"],"mappings":";;;;;;;;;;;;;;AAkCA,UAAM,QAAQ;AAEd,UAAM,QAAQA,UAAQ,SAAA;AACPC,cAAAA,UAAY;AAE3B,UAAM,iBAAiB,CAAC,aAAa;AACnC,YAAM,UAAU,QAAQ;AAAA,IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardCategory.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/CardCategory.vue"],"sourcesContent":["<template>\n <div class=\"flex-v-center flex-column flex\">\n <h4 class=\"mn-r-auto\">{{category.order}} / {{category.name}}</h4>\n\n <!-- <p v-if=\" category.children.length > 0\" class=\"w-100\">Subcategories:</p> -->\n <!-- <CardCategory\n v-for=\"(subcategory,index) in category.children\"\n :key=\"subcategory._id\"\n :category=\"subcategory\" \n class=\"pd-l-small bg-white w-100\"\n /> -->\n\n <router-link \n \t:to=\"{\n\t\t\t\tname: 'Category Edit', \n\t\t\t\tparams: { \n\t\t\t\t\t_id: route.params._id,\n\t\t\t\t\tcategory: category.url\n\t\t\t\t} \n\t\t\t}\"\n \tclass=\"mn-r-medium nav-link\"\n >\n \tEdit\n \t</router-link>\n\n <a \n \tclass=\"nav-link\" \n \t@click=\"deleteCategory(category)\"\n >\n \t\tDelete\n \t</a>\n </div>\n</template>\n\n\n<script setup>\nimport { toRef, onMounted, defineEmits } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\n\nimport CardCategory from './CardCategory.vue'\n\nconst props = defineProps({\n category: Object,\n});\n\nconst emits = defineEmits(['delete']);\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst deleteCategory = (category) => {\n emits('delete', category);\n};\n\n</script>\n\n\n<style lang=\"scss\">\n.categories-card {\n\n}\n</style>\n\n\n"],"names":["useRoute","useRouter"],"mappings":";;;;;;;;;;;;;;AA6CA,UAAM,QAAQ;AAEd,UAAM,QAAQA,UAAQ,SAAA;AACPC,cAAAA,UAAY;AAE3B,UAAM,iBAAiB,CAAC,aAAa;AACnC,YAAM,UAAU,QAAQ;AAAA,IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref, withCtx, createTextVNode } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import "./CardCategory.vue2.js";
4
- const _hoisted_1 = { class: "flex-v-center flex" };
4
+ const _hoisted_1 = { class: "flex-v-center flex-column flex" };
5
5
  const _hoisted_2 = { class: "mn-r-auto" };
6
6
  const _sfc_main = {
7
7
  __name: "CardCategory",
@@ -19,10 +19,10 @@ const _sfc_main = {
19
19
  return (_ctx, _cache) => {
20
20
  const _component_router_link = resolveComponent("router-link");
21
21
  return openBlock(), createElementBlock("div", _hoisted_1, [
22
- createElementVNode("h4", _hoisted_2, toDisplayString(__props.category.name), 1),
22
+ createElementVNode("h4", _hoisted_2, toDisplayString(__props.category.order) + " / " + toDisplayString(__props.category.name), 1),
23
23
  createVNode(_component_router_link, {
24
24
  to: {
25
- name: "CategoryEdit",
25
+ name: "Category Edit",
26
26
  params: {
27
27
  _id: unref(route).params._id,
28
28
  category: __props.category.url
@@ -1 +1 @@
1
- {"version":3,"file":"CardCategory.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/CardCategory.vue"],"sourcesContent":["<template>\n <div class=\"flex-v-center flex\">\n <h4 class=\"mn-r-auto\">{{category.name}}</h4>\n\n <router-link \n \t:to=\"{\n\t\t\t\tname: 'CategoryEdit', \n\t\t\t\tparams: { \n\t\t\t\t\t_id: route.params._id,\n\t\t\t\t\tcategory: category.url\n\t\t\t\t} \n\t\t\t}\"\n \tclass=\"mn-r-medium nav-link\"\n >\n \tEdit\n \t</router-link>\n <a \n \tclass=\"nav-link\" \n \t@click=\"deleteCategory(category)\"\n >\n \t\tDelete\n \t</a>\n </div>\n</template>\n\n\n<script setup>\nimport { toRef, onMounted, defineEmits } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\n\nconst props = defineProps({\n category: Object,\n});\n\nconst emits = defineEmits(['delete']);\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst deleteCategory = (category) => {\n emits('delete', category);\n};\n\n</script>\n\n\n<style lang=\"scss\">\n.categories-card {\n\n}\n</style>\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCA,UAAM,QAAQ;AAEd,UAAM,QAAQ,SAAQ;AACP,cAAY;AAE3B,UAAM,iBAAiB,CAAC,aAAa;AACnC,YAAM,UAAU,QAAQ;AAAA,IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardCategory.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/CardCategory.vue"],"sourcesContent":["<template>\n <div class=\"flex-v-center flex-column flex\">\n <h4 class=\"mn-r-auto\">{{category.order}} / {{category.name}}</h4>\n\n <!-- <p v-if=\" category.children.length > 0\" class=\"w-100\">Subcategories:</p> -->\n <!-- <CardCategory\n v-for=\"(subcategory,index) in category.children\"\n :key=\"subcategory._id\"\n :category=\"subcategory\" \n class=\"pd-l-small bg-white w-100\"\n /> -->\n\n <router-link \n \t:to=\"{\n\t\t\t\tname: 'Category Edit', \n\t\t\t\tparams: { \n\t\t\t\t\t_id: route.params._id,\n\t\t\t\t\tcategory: category.url\n\t\t\t\t} \n\t\t\t}\"\n \tclass=\"mn-r-medium nav-link\"\n >\n \tEdit\n \t</router-link>\n\n <a \n \tclass=\"nav-link\" \n \t@click=\"deleteCategory(category)\"\n >\n \t\tDelete\n \t</a>\n </div>\n</template>\n\n\n<script setup>\nimport { toRef, onMounted, defineEmits } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\n\nimport CardCategory from './CardCategory.vue'\n\nconst props = defineProps({\n category: Object,\n});\n\nconst emits = defineEmits(['delete']);\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst deleteCategory = (category) => {\n emits('delete', category);\n};\n\n</script>\n\n\n<style lang=\"scss\">\n.categories-card {\n\n}\n</style>\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;AA6CA,UAAM,QAAQ;AAEd,UAAM,QAAQ,SAAQ;AACP,cAAY;AAE3B,UAAM,iBAAiB,CAAC,aAAa;AACnC,YAAM,UAAU,QAAQ;AAAA,IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const Field = require("../../../../components/Field/Field.vue.cjs");
5
5
  const Select = require("../../../../components/Select/Select.vue.cjs");
6
- ;/* empty css */
6
+ ;/* empty css */
7
7
  const IconAdd = require("../../../icons/navigation/IconAdd.vue.cjs");
8
8
  const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
9
9
  const _hoisted_1 = { class: "gap-thin" };
@@ -1,7 +1,7 @@
1
1
  import { ref, computed, watch, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, withCtx, createVNode, createCommentVNode, unref } from "vue";
2
2
  import Field from "../../../../components/Field/Field.vue.js";
3
3
  import Select from "../../../../components/Select/Select.vue.js";
4
- /* empty css */
4
+ /* empty css */
5
5
  import _sfc_main$1 from "../../../icons/navigation/IconAdd.vue.js";
6
6
  import _sfc_main$2 from "../../../icons/navigation/IconDelete.vue.js";
7
7
  const _hoisted_1 = { class: "gap-thin" };
@@ -10,7 +10,7 @@ const _hoisted_1 = { class: "radius-big cols-1 o-hidden pos-relative" };
10
10
  const _hoisted_2 = ["src"];
11
11
  const _hoisted_3 = {
12
12
  key: 2,
13
- class: "pos-absolute bg-light t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium"
13
+ class: "pos-absolute bg-white t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium"
14
14
  };
15
15
  const _hoisted_4 = { class: "pd-medium t-left product-card-content" };
16
16
  const _hoisted_5 = { class: "mn-b-thin t-semi h4" };
@@ -24,6 +24,13 @@ const _sfc_main = {
24
24
  product: {
25
25
  type: Object
26
26
  },
27
+ access: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ organization: {
32
+ type: String
33
+ },
27
34
  user: {
28
35
  type: [Object, String]
29
36
  },
@@ -37,15 +44,9 @@ const _sfc_main = {
37
44
  var _a, _b;
38
45
  const _component_router_link = vue.resolveComponent("router-link");
39
46
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
40
- __props.user && __props.user.roles && (__props.user.roles.includes("ROLE_MODERATOR") || __props.user.roles.includes("ROLE_ADMIN")) ? (vue.openBlock(), vue.createBlock(_component_router_link, {
47
+ __props.access ? (vue.openBlock(), vue.createBlock(_component_router_link, {
41
48
  key: 0,
42
- to: {
43
- name: "ProductEdit",
44
- params: {
45
- _id: _ctx.$route.params.organization,
46
- product: __props.product._id
47
- }
48
- },
49
+ to: __props.organization ? { name: "Organization_ProductEdit", params: { _id: __props.organization, product: __props.product._id } } : { name: "ProductEdit" },
49
50
  class: "z-index-2 cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"
50
51
  }, {
51
52
  default: vue.withCtx(() => [
@@ -59,7 +60,7 @@ const _sfc_main = {
59
60
  vue.createElementVNode("div", {
60
61
  class: vue.normalizeClass([
61
62
  "o-hidden w-100 pos-relative aspect-1x1",
62
- __props.product.information[2] && __props.product.information[2].value === "AAAA" ? "bg-black" : "bg-white"
63
+ __props.product.information[2] && __props.product.information[2].value === "AAAA" ? "bg-dark" : "bg-light"
63
64
  ])
64
65
  }, [
65
66
  __props.product.images[0] ? (vue.openBlock(), vue.createElementBlock("img", {
@@ -1 +1 @@
1
- {"version":3,"file":"CardProduct.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/CardProduct.vue"],"sourcesContent":["<template>\n\t<div \n\t\tclass=\"\n\t\t\tradius-big \n\t\t\tcols-1\n\t\t\to-hidden\n\t\t\tpos-relative\n\t\t\"\n\t>\n\t\t<router-link\n\t\t\tv-if=\"user && user.roles && (user.roles.includes('ROLE_MODERATOR') || user.roles.includes('ROLE_ADMIN'))\"\n :to=\"{\n name: 'ProductEdit', \n params: {\n _id: $route.params.organization,\n product: product._id\n }\n }\" \n class=\"\n \tz-index-2\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n\t\t<!-- Product Image Sqaure -->\n\n\n\t\t<div \n\t\t\tclass=\"o-hidden w-100 pos-relative aspect-1x1\"\n\t\t\t:class=\"\n\t\t\t\tproduct.information[2] \n\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t? 'bg-black' \n\t\t\t\t: 'bg-white'\n\t\t\t\"\n\t\t>\n\n\t\t\t<!-- Image Wrappers -->\n\t\t\t<img loading=\"lazy\" \n\t\t\t\tv-if=\"product.images[0]\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + product.images[0].split('/').slice(0, -1).join('/') + '/thumbnail_' + product.images[0].split('/').pop()\"\n\t\t\t\tclass=\"pos-absolute object-fit-cover h-max-100 w-100\"\n\t\t\t>\n\n\t\t\t<PlaceholderImage\n\t\t\t\tv-else\n\t\t\t\tclass=\"pos-absolute h-100 w-100\"\n\t\t\t/>\n\t\t\t<span v-if=\"product.quantity <= 0\" class=\"pos-absolute bg-light t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium\">Out of Stock</span>\n\t\t\t<THC v-if=\"product.information?.length > 0 && product.information[1]?.name === 'THC'\" :product=\"product\" />\n\t\t</div>\n\n\t\t<!-- Product Info Start -->\n\t\t<div class=\"pd-medium t-left product-card-content\">\n\t\t\t<!-- Detail -->\n\t\t\t<p \n\t\t\t\tv-if=\"product.information.length > 0\" \n\t\t\t\tclass=\"t-semi h6\"\n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 't-violet' \n\t\t\t\t\t: 't-main'\n\t\t\t\t\" \n\t\t\t>\n\t\t\t\t{{product.information[0].value}}\n\t\t\t</p>\n\t\t\t<!-- Name -->\n\t\t\t<p class=\"mn-b-thin t-semi h4\">\n\t\t\t\t{{product.name}}\n\t\t\t</p>\n\n\t\t\t<p \n\t\t\t\tv-if=\"product.description && !product.localization\" \n\t\t\t\tclass=\"mn-b-small t-transp p-small\"\n\t\t\t>\n\t\t\t\t{{product.description.substring(0, 99)}}...\n\t\t\t</p>\n\n\t\t\t<!-- <p v-if=\"product.localization && product.localization.length > 1\" class=\"mn-b-small t-transp p-small\">\n\t\t\t\t<span v-if=\"$i18n.locale === 'en'\">{{product.localization[0].text.substring(0, 99)}}...</span>\n\t\t\t\t<span v-if=\"$i18n.locale === 'ru'\">{{product.localization[1].text.substring(0, 99)}}...</span>\n\t\t\t</p> -->\n\t\t\t\n\t\t\t<Price \n\t\t\t\t:product=\"product\" \n\t\t\t\tsize=\"small\" \n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 'bg-third t-white' \n\t\t\t\t\t: ''\n\t\t\t\t\" \n\t\t\t/>\n\t\t</div>\n\n\t</div>\n\n</template>\n\n\n<script setup=\"props\">\n\timport {computed } from 'vue'\n\timport { useI18n } from 'vue-i18n'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport THC from '@pf/src/modules/products/components/elements/THC.vue'\n\timport Price from '@pf/src/modules/products/components/elements/Price.vue'\n\n\timport PlaceholderImage from '@pf/src/modules/icons/placeholders/PlaceholderImage.vue'\n\n\tconst props = defineProps({\n\t\tproduct: {\n\t\t\ttype: Object\n\t\t},\n\t\tuser: {\n\t\t\ttype: [Object, String] \n\t\t},\n\t\ttype: {\n\t\t\ttype: Object\n\t\t}\n\t})\n\n const { t } = useI18n()\n</script>\n\n<style lang=\"scss\">\n\n</style>\n\n\n"],"names":["useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIgBA,oBAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardProduct.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/CardProduct.vue"],"sourcesContent":["<template>\n\t<div \n\t\tclass=\"\n\t\t\tradius-big \n\t\t\tcols-1\n\t\t\to-hidden\n\t\t\tpos-relative\n\t\t\"\n\t>\n\t\t<router-link\n\t\t\tv-if=\"access\"\n :to=\"organization ? { name: 'Organization_ProductEdit', params: { _id: organization, product: product._id\t} } : { name: 'ProductEdit' }\" \n class=\"\n \tz-index-2\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n\t\t<!-- Product Image Sqaure -->\n\n\n\t\t<div \n\t\t\tclass=\"o-hidden w-100 pos-relative aspect-1x1\"\n\t\t\t:class=\"\n\t\t\t\tproduct.information[2] \n\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t? 'bg-dark' \n\t\t\t\t: 'bg-light'\n\t\t\t\"\n\t\t>\n\n\t\t\t<!-- Image Wrappers -->\n\t\t\t<img loading=\"lazy\" \n\t\t\t\tv-if=\"product.images[0]\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + product.images[0].split('/').slice(0, -1).join('/') + '/thumbnail_' + product.images[0].split('/').pop()\"\n\t\t\t\tclass=\"pos-absolute object-fit-cover h-max-100 w-100\"\n\t\t\t>\n\n\t\t\t<PlaceholderImage\n\t\t\t\tv-else\n\t\t\t\tclass=\"pos-absolute h-100 w-100\"\n\t\t\t/>\n\t\t\t<span v-if=\"product.quantity <= 0\" class=\"pos-absolute bg-white t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium\">Out of Stock</span>\n\t\t\t<THC v-if=\"product.information?.length > 0 && product.information[1]?.name === 'THC'\" :product=\"product\" />\n\t\t</div>\n\n\t\t<!-- Product Info Start -->\n\t\t<div class=\"pd-medium t-left product-card-content\">\n\t\t\t<!-- Detail -->\n\t\t\t<p \n\t\t\t\tv-if=\"product.information.length > 0\" \n\t\t\t\tclass=\"t-semi h6\"\n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 't-violet' \n\t\t\t\t\t: 't-main'\n\t\t\t\t\" \n\t\t\t>\n\t\t\t\t{{product.information[0].value}}\n\t\t\t</p>\n\t\t\t<!-- Name -->\n\t\t\t<p class=\"mn-b-thin t-semi h4\">\n\t\t\t\t{{product.name}}\n\t\t\t</p>\n\n\t\t\t<p \n\t\t\t\tv-if=\"product.description && !product.localization\" \n\t\t\t\tclass=\"mn-b-small t-transp p-small\"\n\t\t\t>\n\t\t\t\t{{product.description.substring(0, 99)}}...\n\t\t\t</p>\n\n\t\t\t<!-- <p v-if=\"product.localization && product.localization.length > 1\" class=\"mn-b-small t-transp p-small\">\n\t\t\t\t<span v-if=\"$i18n.locale === 'en'\">{{product.localization[0].text.substring(0, 99)}}...</span>\n\t\t\t\t<span v-if=\"$i18n.locale === 'ru'\">{{product.localization[1].text.substring(0, 99)}}...</span>\n\t\t\t</p> -->\n\t\t\t\n\t\t\t<Price \n\t\t\t\t:product=\"product\" \n\t\t\t\tsize=\"small\" \n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 'bg-third t-white' \n\t\t\t\t\t: ''\n\t\t\t\t\" \n\t\t\t/>\n\t\t</div>\n\n\t</div>\n\n</template>\n\n\n<script setup=\"props\">\n\timport {computed } from 'vue'\n\timport { useI18n } from 'vue-i18n'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport THC from '@pf/src/modules/products/components/elements/THC.vue'\n\timport Price from '@pf/src/modules/products/components/elements/Price.vue'\n\n\timport PlaceholderImage from '@pf/src/modules/icons/placeholders/PlaceholderImage.vue'\n\n\tconst props = defineProps({\n\t\tproduct: {\n\t\t\ttype: Object\n\t\t},\n\t\taccess: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\torganization: {\n\t\t\ttype: String\n\t\t},\n\t\tuser: {\n\t\t\ttype: [Object, String] \n\t\t},\n\t\ttype: {\n\t\t\ttype: Object\n\t\t}\n\t})\n\n const { t } = useI18n()\n</script>\n\n<style lang=\"scss\">\n\n</style>\n\n\n"],"names":["useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIgBA,oBAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,7 +8,7 @@ const _hoisted_1 = { class: "radius-big cols-1 o-hidden pos-relative" };
8
8
  const _hoisted_2 = ["src"];
9
9
  const _hoisted_3 = {
10
10
  key: 2,
11
- class: "pos-absolute bg-light t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium"
11
+ class: "pos-absolute bg-white t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium"
12
12
  };
13
13
  const _hoisted_4 = { class: "pd-medium t-left product-card-content" };
14
14
  const _hoisted_5 = { class: "mn-b-thin t-semi h4" };
@@ -22,6 +22,13 @@ const _sfc_main = {
22
22
  product: {
23
23
  type: Object
24
24
  },
25
+ access: {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ organization: {
30
+ type: String
31
+ },
25
32
  user: {
26
33
  type: [Object, String]
27
34
  },
@@ -35,15 +42,9 @@ const _sfc_main = {
35
42
  var _a, _b;
36
43
  const _component_router_link = resolveComponent("router-link");
37
44
  return openBlock(), createElementBlock("div", _hoisted_1, [
38
- __props.user && __props.user.roles && (__props.user.roles.includes("ROLE_MODERATOR") || __props.user.roles.includes("ROLE_ADMIN")) ? (openBlock(), createBlock(_component_router_link, {
45
+ __props.access ? (openBlock(), createBlock(_component_router_link, {
39
46
  key: 0,
40
- to: {
41
- name: "ProductEdit",
42
- params: {
43
- _id: _ctx.$route.params.organization,
44
- product: __props.product._id
45
- }
46
- },
47
+ to: __props.organization ? { name: "Organization_ProductEdit", params: { _id: __props.organization, product: __props.product._id } } : { name: "ProductEdit" },
47
48
  class: "z-index-2 cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"
48
49
  }, {
49
50
  default: withCtx(() => [
@@ -57,7 +58,7 @@ const _sfc_main = {
57
58
  createElementVNode("div", {
58
59
  class: normalizeClass([
59
60
  "o-hidden w-100 pos-relative aspect-1x1",
60
- __props.product.information[2] && __props.product.information[2].value === "AAAA" ? "bg-black" : "bg-white"
61
+ __props.product.information[2] && __props.product.information[2].value === "AAAA" ? "bg-dark" : "bg-light"
61
62
  ])
62
63
  }, [
63
64
  __props.product.images[0] ? (openBlock(), createElementBlock("img", {
@@ -1 +1 @@
1
- {"version":3,"file":"CardProduct.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/CardProduct.vue"],"sourcesContent":["<template>\n\t<div \n\t\tclass=\"\n\t\t\tradius-big \n\t\t\tcols-1\n\t\t\to-hidden\n\t\t\tpos-relative\n\t\t\"\n\t>\n\t\t<router-link\n\t\t\tv-if=\"user && user.roles && (user.roles.includes('ROLE_MODERATOR') || user.roles.includes('ROLE_ADMIN'))\"\n :to=\"{\n name: 'ProductEdit', \n params: {\n _id: $route.params.organization,\n product: product._id\n }\n }\" \n class=\"\n \tz-index-2\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n\t\t<!-- Product Image Sqaure -->\n\n\n\t\t<div \n\t\t\tclass=\"o-hidden w-100 pos-relative aspect-1x1\"\n\t\t\t:class=\"\n\t\t\t\tproduct.information[2] \n\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t? 'bg-black' \n\t\t\t\t: 'bg-white'\n\t\t\t\"\n\t\t>\n\n\t\t\t<!-- Image Wrappers -->\n\t\t\t<img loading=\"lazy\" \n\t\t\t\tv-if=\"product.images[0]\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + product.images[0].split('/').slice(0, -1).join('/') + '/thumbnail_' + product.images[0].split('/').pop()\"\n\t\t\t\tclass=\"pos-absolute object-fit-cover h-max-100 w-100\"\n\t\t\t>\n\n\t\t\t<PlaceholderImage\n\t\t\t\tv-else\n\t\t\t\tclass=\"pos-absolute h-100 w-100\"\n\t\t\t/>\n\t\t\t<span v-if=\"product.quantity <= 0\" class=\"pos-absolute bg-light t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium\">Out of Stock</span>\n\t\t\t<THC v-if=\"product.information?.length > 0 && product.information[1]?.name === 'THC'\" :product=\"product\" />\n\t\t</div>\n\n\t\t<!-- Product Info Start -->\n\t\t<div class=\"pd-medium t-left product-card-content\">\n\t\t\t<!-- Detail -->\n\t\t\t<p \n\t\t\t\tv-if=\"product.information.length > 0\" \n\t\t\t\tclass=\"t-semi h6\"\n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 't-violet' \n\t\t\t\t\t: 't-main'\n\t\t\t\t\" \n\t\t\t>\n\t\t\t\t{{product.information[0].value}}\n\t\t\t</p>\n\t\t\t<!-- Name -->\n\t\t\t<p class=\"mn-b-thin t-semi h4\">\n\t\t\t\t{{product.name}}\n\t\t\t</p>\n\n\t\t\t<p \n\t\t\t\tv-if=\"product.description && !product.localization\" \n\t\t\t\tclass=\"mn-b-small t-transp p-small\"\n\t\t\t>\n\t\t\t\t{{product.description.substring(0, 99)}}...\n\t\t\t</p>\n\n\t\t\t<!-- <p v-if=\"product.localization && product.localization.length > 1\" class=\"mn-b-small t-transp p-small\">\n\t\t\t\t<span v-if=\"$i18n.locale === 'en'\">{{product.localization[0].text.substring(0, 99)}}...</span>\n\t\t\t\t<span v-if=\"$i18n.locale === 'ru'\">{{product.localization[1].text.substring(0, 99)}}...</span>\n\t\t\t</p> -->\n\t\t\t\n\t\t\t<Price \n\t\t\t\t:product=\"product\" \n\t\t\t\tsize=\"small\" \n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 'bg-third t-white' \n\t\t\t\t\t: ''\n\t\t\t\t\" \n\t\t\t/>\n\t\t</div>\n\n\t</div>\n\n</template>\n\n\n<script setup=\"props\">\n\timport {computed } from 'vue'\n\timport { useI18n } from 'vue-i18n'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport THC from '@pf/src/modules/products/components/elements/THC.vue'\n\timport Price from '@pf/src/modules/products/components/elements/Price.vue'\n\n\timport PlaceholderImage from '@pf/src/modules/icons/placeholders/PlaceholderImage.vue'\n\n\tconst props = defineProps({\n\t\tproduct: {\n\t\t\ttype: Object\n\t\t},\n\t\tuser: {\n\t\t\ttype: [Object, String] \n\t\t},\n\t\ttype: {\n\t\t\ttype: Object\n\t\t}\n\t})\n\n const { t } = useI18n()\n</script>\n\n<style lang=\"scss\">\n\n</style>\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIgB,YAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardProduct.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/CardProduct.vue"],"sourcesContent":["<template>\n\t<div \n\t\tclass=\"\n\t\t\tradius-big \n\t\t\tcols-1\n\t\t\to-hidden\n\t\t\tpos-relative\n\t\t\"\n\t>\n\t\t<router-link\n\t\t\tv-if=\"access\"\n :to=\"organization ? { name: 'Organization_ProductEdit', params: { _id: organization, product: product._id\t} } : { name: 'ProductEdit' }\" \n class=\"\n \tz-index-2\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n\t\t<!-- Product Image Sqaure -->\n\n\n\t\t<div \n\t\t\tclass=\"o-hidden w-100 pos-relative aspect-1x1\"\n\t\t\t:class=\"\n\t\t\t\tproduct.information[2] \n\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t? 'bg-dark' \n\t\t\t\t: 'bg-light'\n\t\t\t\"\n\t\t>\n\n\t\t\t<!-- Image Wrappers -->\n\t\t\t<img loading=\"lazy\" \n\t\t\t\tv-if=\"product.images[0]\" \n\t\t\t\t:src=\"(FILE_SERVER_URL || '') + product.images[0].split('/').slice(0, -1).join('/') + '/thumbnail_' + product.images[0].split('/').pop()\"\n\t\t\t\tclass=\"pos-absolute object-fit-cover h-max-100 w-100\"\n\t\t\t>\n\n\t\t\t<PlaceholderImage\n\t\t\t\tv-else\n\t\t\t\tclass=\"pos-absolute h-100 w-100\"\n\t\t\t/>\n\t\t\t<span v-if=\"product.quantity <= 0\" class=\"pos-absolute bg-white t-black pd-thin radius-big p-small t-medium pos-t-medium pos-l-medium\">Out of Stock</span>\n\t\t\t<THC v-if=\"product.information?.length > 0 && product.information[1]?.name === 'THC'\" :product=\"product\" />\n\t\t</div>\n\n\t\t<!-- Product Info Start -->\n\t\t<div class=\"pd-medium t-left product-card-content\">\n\t\t\t<!-- Detail -->\n\t\t\t<p \n\t\t\t\tv-if=\"product.information.length > 0\" \n\t\t\t\tclass=\"t-semi h6\"\n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 't-violet' \n\t\t\t\t\t: 't-main'\n\t\t\t\t\" \n\t\t\t>\n\t\t\t\t{{product.information[0].value}}\n\t\t\t</p>\n\t\t\t<!-- Name -->\n\t\t\t<p class=\"mn-b-thin t-semi h4\">\n\t\t\t\t{{product.name}}\n\t\t\t</p>\n\n\t\t\t<p \n\t\t\t\tv-if=\"product.description && !product.localization\" \n\t\t\t\tclass=\"mn-b-small t-transp p-small\"\n\t\t\t>\n\t\t\t\t{{product.description.substring(0, 99)}}...\n\t\t\t</p>\n\n\t\t\t<!-- <p v-if=\"product.localization && product.localization.length > 1\" class=\"mn-b-small t-transp p-small\">\n\t\t\t\t<span v-if=\"$i18n.locale === 'en'\">{{product.localization[0].text.substring(0, 99)}}...</span>\n\t\t\t\t<span v-if=\"$i18n.locale === 'ru'\">{{product.localization[1].text.substring(0, 99)}}...</span>\n\t\t\t</p> -->\n\t\t\t\n\t\t\t<Price \n\t\t\t\t:product=\"product\" \n\t\t\t\tsize=\"small\" \n\t\t\t\t:class=\"\n\t\t\t\t\tproduct.information[2] \n\t\t\t\t\t&& product.information[2].value === 'AAAA' \n\t\t\t\t\t? 'bg-third t-white' \n\t\t\t\t\t: ''\n\t\t\t\t\" \n\t\t\t/>\n\t\t</div>\n\n\t</div>\n\n</template>\n\n\n<script setup=\"props\">\n\timport {computed } from 'vue'\n\timport { useI18n } from 'vue-i18n'\n\n\timport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\n\timport THC from '@pf/src/modules/products/components/elements/THC.vue'\n\timport Price from '@pf/src/modules/products/components/elements/Price.vue'\n\n\timport PlaceholderImage from '@pf/src/modules/icons/placeholders/PlaceholderImage.vue'\n\n\tconst props = defineProps({\n\t\tproduct: {\n\t\t\ttype: Object\n\t\t},\n\t\taccess: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\torganization: {\n\t\t\ttype: String\n\t\t},\n\t\tuser: {\n\t\t\ttype: [Object, String] \n\t\t},\n\t\ttype: {\n\t\t\ttype: Object\n\t\t}\n\t})\n\n const { t } = useI18n()\n</script>\n\n<style lang=\"scss\">\n\n</style>\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIgB,YAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,47 +1,94 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const vueDraggableNext_esmBundler = require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs");
5
4
  const vueRouter = require("vue-router");
5
+ const globals = require("../../../globals/views/store/globals.cjs");
6
+ const auth = require("../../../auth/views/store/auth.cjs");
6
7
  const categories = require("../../store/categories.cjs");
7
8
  const Button = require("../../../../components/Button/Button.vue.cjs");
8
9
  const Block = require("../../../../components/Block/Block.vue.cjs");
9
- const CardCategory = require("../blocks/CardCategory.vue.cjs");
10
- const _hoisted_1 = { class: "pd-thin" };
10
+ ;/* empty css */
11
+ ;/* empty css */
12
+ ;/* empty css */
13
+ ;/* empty css */
14
+ ;/* empty css */
15
+ ;/* empty css */
16
+ require("../blocks/CardCategory.vue2.cjs");
17
+ const CategoriesTree = require("../sections/CategoriesTree.vue.cjs");
18
+ const IconPlus = require("../../../icons/navigation/IconPlus.vue.cjs");
19
+ const _hoisted_1 = { class: "pd-thin bg-white" };
11
20
  const _sfc_main = {
12
21
  __name: "Categories",
13
- setup(__props) {
14
- vueRouter.useRoute();
15
- vueRouter.useRouter();
22
+ async setup(__props) {
23
+ let __temp, __restore;
24
+ const route = vueRouter.useRoute();
25
+ const router = vueRouter.useRouter();
26
+ globals.state.navigation_bar.actions = [{
27
+ component: IconPlus.default,
28
+ props: {
29
+ fill: "rgb(var(--main))"
30
+ },
31
+ condition: () => auth.state.user && auth.state.user._id,
32
+ action: () => route.params._id ? router.push({ name: "Category Add", params: { _id: route.params._id } }) : router.push({ name: "Category Add" })
33
+ }], vue.onUnmounted(() => {
34
+ globals.state.navigation_bar.actions = [];
35
+ });
36
+ categories.state.all = ([__temp, __restore] = vue.withAsyncContext(() => categories.actions.read({
37
+ user: auth.state.user._id,
38
+ rootOnly: true,
39
+ limit: 10
40
+ })), __temp = await __temp, __restore(), __temp);
16
41
  vue.onMounted(async () => {
17
- await categories.actions.fetchCategories();
18
42
  });
19
- function updateOrder() {
20
- categories.state.all.forEach((category, index) => {
21
- category.order = index;
22
- });
23
- updateCategoriesOrder();
24
- }
25
- async function updateCategoriesOrder() {
26
- await categories.actions.updateCategories(categories.state.all);
43
+ vue.computed(() => {
44
+ const recursiveMap = (data) => {
45
+ return data.map((item) => ({
46
+ // id: item._id,
47
+ parent: item.parent,
48
+ _id: item._id,
49
+ order: item.order,
50
+ name: item.name,
51
+ children: item.children ? recursiveMap(item.children) : []
52
+ }));
53
+ };
54
+ return recursiveMap(categories.state.all);
55
+ });
56
+ function flattenCategoryTree(categories2) {
57
+ let flatCategories = [];
58
+ function flatten(category) {
59
+ const { children, ...categoryWithoutChildren } = category;
60
+ flatCategories.push(categoryWithoutChildren);
61
+ if (children && Array.isArray(children)) {
62
+ children.forEach((child) => flatten(child));
63
+ }
64
+ }
65
+ categories2.forEach((category) => flatten(category));
66
+ return flatCategories;
27
67
  }
28
- async function deleteCategory(category) {
29
- const isConfirmed = confirm(`Are you sure you want to delete the category "${category.name}"?`);
30
- if (isConfirmed) {
31
- await categories.actions.deleteCategory(category.url);
32
- } else {
33
- alert("Category deletion cancelled");
68
+ async function updateCategoriesOrder(category) {
69
+ try {
70
+ const allCategories = categories.state.all;
71
+ const flattenedCategories = flattenCategoryTree(allCategories);
72
+ console.log("flated", flattenedCategories);
73
+ await categories.actions.update(flattenedCategories);
74
+ console.log("Categories order updated successfully");
75
+ } catch (error) {
76
+ console.error("Error updating categories order:", error);
77
+ throw error;
34
78
  }
35
79
  }
36
80
  return (_ctx, _cache) => {
37
81
  const _component_router_link = vue.resolveComponent("router-link");
38
82
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
39
- vue.createVNode(Block.default, { class: "radius-big mn-b-thin flex-nowrap flex-v-center flex" }, {
83
+ !_ctx.MOBILE_APP ? (vue.openBlock(), vue.createBlock(Block.default, {
84
+ key: 0,
85
+ class: "radius-big mn-b-thin flex-nowrap flex-v-center flex"
86
+ }, {
40
87
  default: vue.withCtx(() => [
41
- _cache[2] || (_cache[2] = vue.createElementVNode("h1", { class: "mn-r-auto" }, " Product Categories ", -1)),
88
+ _cache[2] || (_cache[2] = vue.createElementVNode("h2", { class: "mn-r-auto" }, " Product Categories ", -1)),
42
89
  vue.createVNode(_component_router_link, {
43
90
  to: {
44
- name: "CategoryAdd",
91
+ name: "Category Add",
45
92
  params: {
46
93
  _id: _ctx.$route.params._id
47
94
  }
@@ -64,25 +111,13 @@ const _sfc_main = {
64
111
  })
65
112
  ]),
66
113
  _: 1
67
- }),
68
- vue.createVNode(vue.unref(vueDraggableNext_esmBundler.VueDraggableNext), {
69
- class: "dragArea list-group w-full",
70
- list: categories.state.all,
71
- "item-key": "order",
72
- onEnd: updateOrder
73
- }, {
74
- default: vue.withCtx(() => [
75
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(categories.state.all, (category, index) => {
76
- return vue.openBlock(), vue.createBlock(CardCategory.default, {
77
- key: category.id,
78
- category,
79
- onDelete: deleteCategory,
80
- class: "pd-medium bg-light radius-medium mn-b-thin"
81
- }, null, 8, ["category"]);
82
- }), 128))
83
- ]),
84
- _: 1
85
- }, 8, ["list"])
114
+ })) : vue.createCommentVNode("", true),
115
+ categories.state.all ? (vue.openBlock(), vue.createBlock(CategoriesTree.default, {
116
+ key: 1,
117
+ items: categories.state.all,
118
+ state: categories.state.all,
119
+ onUpdate: updateCategoriesOrder
120
+ }, null, 8, ["items", "state"])) : vue.createCommentVNode("", true)
86
121
  ]);
87
122
  };
88
123
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Categories.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Categories.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <Block class=\"radius-big mn-b-thin flex-nowrap flex-v-center flex\">\n <h1 class=\"mn-r-auto\">\n Product Categories\n </h1>\n\n <router-link \n :to=\"{\n name: 'CategoryAdd', \n params: { \n _id: $route.params._id\n } \n }\"\n class=\"mn-r-medium uppercase t-medium pd-small radius-big bg-white nav-link\"\n >\n Add category\n </router-link>\n\n <Button \n @click=\"updateCategoriesOrder\" \n class=\"pd-small radius-big bg-black t-white uppercase t-medium\"\n >\n Change Order\n </Button>\n </Block>\n\n <VueDraggableNext \n class=\"dragArea list-group w-full\" \n :list=\"categories.state.all\" \n item-key=\"order\" \n @end=\"updateOrder\"\n >\n <CardCategory \n v-for=\"(category, index) in categories.state.all\"\n :key=\"category.id\"\n :category=\"category\" \n @delete=\"deleteCategory\"\n class=\"pd-medium bg-light radius-medium mn-b-thin\"\n />\n </VueDraggableNext>\n </div>\n</template>\n\n<script setup>\n import { onMounted } from 'vue';\n import { VueDraggableNext } from 'vue-draggable-next';\n\n import { useRoute, useRouter } from 'vue-router';\n\n import * as categories from '@pf/src/modules/products/store/categories'; \n\n const route = useRoute();\n const router = useRouter();\n\n import Button from \"@pf/src/components/Button/Button.vue\";\n import Block from '@pf/src/components/Block/Block.vue';\n import CardCategory from '@pf/src/modules/products/components/blocks/CardCategory.vue';\n\n onMounted(async () => {\n await categories.actions.fetchCategories();\n });\n\n function updateOrder() {\n categories.state.all.forEach((category, index) => {\n category.order = index;\n });\n updateCategoriesOrder();\n }\n\n async function updateCategoriesOrder() {\n await categories.actions.updateCategories(categories.state.all);\n }\n\n async function deleteCategory(category) {\n // Запрашиваем подтверждение у пользователя\n const isConfirmed = confirm(`Are you sure you want to delete the category \"${category.name}\"?`);\n \n // Если пользователь подтвердил удаление, продолжаем процесс\n if (isConfirmed) {\n await categories.actions.deleteCategory(category.url);\n } else {\n alert('Category deletion cancelled'); \n }\n }\n\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":["useRoute","useRouter","onMounted","categories.actions","categories.state"],"mappings":";;;;;;;;;;;;;AAoDgBA,uBAAW;AACVC,wBAAY;AAM3BC,QAAAA,UAAU,YAAY;AACpB,YAAMC,WAAAA,QAAmB;IAC7B,CAAG;AAED,aAAS,cAAc;AACrBC,iBAAAA,MAAiB,IAAI,QAAQ,CAAC,UAAU,UAAU;AAChD,iBAAS,QAAQ;AAAA,MACvB,CAAK;AACD;IACD;AAED,mBAAe,wBAAwB;AACrC,YAAMD,mBAAmB,iBAAiBC,WAAgB,MAAC,GAAG;AAAA,IAC/D;AAED,mBAAe,eAAe,UAAU;AAEtC,YAAM,cAAc,QAAQ,iDAAiD,SAAS,IAAI,IAAI;AAG9F,UAAI,aAAa;AACf,cAAMD,mBAAmB,eAAe,SAAS,GAAG;AAAA,MAC1D,OAAW;AACL,cAAM,6BAA6B;AAAA,MACpC;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Categories.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Categories.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin bg-white\">\n <Block v-if=\"!MOBILE_APP\" \n class=\"radius-big mn-b-thin flex-nowrap flex-v-center flex\"\n >\n <h2 class=\"mn-r-auto\">\n Product Categories\n </h2>\n\n <router-link \n :to=\"{\n name: 'Category Add', \n params: { \n _id: $route.params._id\n } \n }\"\n class=\"mn-r-medium uppercase t-medium pd-small radius-big bg-white nav-link\"\n >\n Add category\n </router-link>\n\n <Button \n @click=\"updateCategoriesOrder\" \n class=\"pd-small radius-big bg-black t-white uppercase t-medium\"\n >\n Change Order\n </Button>\n </Block>\n <!-- <Feed\n :states=\"{\n empty: {\n title: 'No Events Found',\n description: 'Currently, there are no events available.'\n }\n }\"\n :store=\"{\n read: (options) => categories.actions.read(options),\n state: categories.state\n }\"\n :options=\"{\n user: auth.state.user._id,\n rootOnly: true,\n limit: 10\n }\"\n v-slot=\"{ \n items \n }\"\n > -->\n <CategoryList \n v-if=\"categories.state.all\" \n :items=\"categories.state.all\" \n :state=\"categories.state.all\" \n @update=\"updateCategoriesOrder\" \n />\n\n <!-- <VueDraggableNext \n class=\"dragArea list-group w-full\" \n :list=\"items\" \n item-key=\"order\" \n @end=\"updateOrder\"\n >\n <CardCategory \n v-for=\"(category,index) in items\"\n :key=\"category.id\"\n :category=\"category\" \n @delete=\"deleteCategory\"\n class=\"pd-medium bg-light radius-medium mn-b-thin\"\n />\n </VueDraggableNext> -->\n <!-- </Feed> -->\n </div>\n</template>\n\n<script setup>\n import { onMounted, onUnmounted, computed } from 'vue';\n import { VueDraggableNext } from 'vue-draggable-next';\n\n import { useRoute, useRouter } from 'vue-router';\n\n import * as globals from '@pf/src/modules/globals/views/store/globals';\n import * as auth from '@pf/src/modules/auth/views/store/auth'; \n import * as categories from '@pf/src/modules/products/store/categories'; \n\n const route = useRoute();\n const router = useRouter();\n\n import Button from \"@pf/src/components/Button/Button.vue\";\n import Block from '@pf/src/components/Block/Block.vue';\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import CardCategory from '@pf/src/modules/products/components/blocks/CardCategory.vue';\n import CategoryList from '@pf/src/modules/products/components/sections/CategoriesTree.vue';\n\n import IconPlus from '@pf/src/modules/icons/navigation/IconPlus.vue'\n\n globals.state.navigation_bar.actions = [{\n component: IconPlus,\n props: {\n fill: \"rgb(var(--main))\" \n },\n condition: () => auth.state.user && auth.state.user._id,\n action: () => route.params._id ? router.push({ name: 'Category Add', params: { _id: route.params._id} }) : router.push({ name: 'Category Add' })\n }],\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n\ncategories.state.all = await categories.actions.read({\n user: auth.state.user._id,\n rootOnly: true,\n limit: 10\n })\n onMounted(async () => {\n \n });\n\n const mappedCategories = computed(() => {\n const recursiveMap = (data) => {\n return data.map(item => ({\n // id: item._id, \n parent: item.parent,\n _id: item._id,\n order: item.order,\n name: item.name, \n children: item.children ? recursiveMap(item.children) : []\n }));\n };\n \n return recursiveMap(categories.state.all);\n });\n\n function flattenCategoryTree(categories) {\n let flatCategories = [];\n \n function flatten(category) {\n const { children, ...categoryWithoutChildren } = category;\n flatCategories.push(categoryWithoutChildren);\n \n if (children && Array.isArray(children)) {\n children.forEach(child => flatten(child));\n }\n }\n \n categories.forEach(category => flatten(category));\n return flatCategories;\n }\n\n // Обновленная функция для обновления порядка категорий\n async function updateCategoriesOrder(category) {\n try {\n // Получаем все категории и преобразуем их в плоский массив\n const allCategories = categories.state.all;\n const flattenedCategories = flattenCategoryTree(allCategories);\n \n // Обновляем порядок для всех категорий\n console.log('flated', flattenedCategories)\n await categories.actions.update(flattenedCategories);\n \n console.log('Categories order updated successfully');\n } catch (error) {\n console.error('Error updating categories order:', error);\n throw error;\n }\n }\n\n async function deleteCategory(category) {\n // Запрашиваем подтверждение у пользователя\n const isConfirmed = confirm(`Are you sure you want to delete the category \"${category.name}\"?`);\n \n // Если пользователь подтвердил удаление, продолжаем процесс\n if (isConfirmed) {\n await categories.actions.deleteCategory(category.url);\n } else {\n alert('Category deletion cancelled'); \n }\n }\n\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":["useRoute","useRouter","globals.state","IconPlus","auth.state","onUnmounted","categories.state","_withAsyncContext","categories.actions","onMounted","computed","categories"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmFE,UAAM,QAAQA,UAAAA;AACd,UAAM,SAASC,UAAAA;AAWfC,kBAAc,eAAe,UAAU,CAAC;AAAA,MACtC,WAAWC,SAAQ;AAAA,MACnB,OAAO;AAAA,QACL,MAAM;AAAA,MACP;AAAA,MACD,WAAW,MAAMC,KAAU,MAAC,QAAQA,KAAU,MAAC,KAAK;AAAA,MACpD,QAAQ,MAAM,MAAM,OAAO,MAAM,OAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAG,CAAA,IAAI,OAAO,KAAK,EAAE,MAAM,gBAAgB;AAAA,IACnJ,CAAG,GAEFC,IAAAA,YAAY,MAAM;AACfH,oBAAc,eAAe,UAAU;IAC3C,CAAG;AAEHI,eAAAA,MAAiB,OAAY,CAAA,QAAA,SAAA,IAAAC,IAAAA,iBAAA,MAAAC,WAAkB,QAAC,KAAK;AAAA,MAC/C,MAAMJ,KAAAA,MAAW,KAAK;AAAA,MACtB,UAAU;AAAA,MACV,OAAO;AAAA,IACb,CAAK,CAAA;AACHK,QAAAA,UAAU,YAAY;AAAA,IAExB,CAAG;AAEwBC,QAAAA,SAAS,MAAM;AACvC,YAAM,eAAe,CAAC,SAAS;AAC7B,eAAO,KAAK,IAAI,WAAS;AAAA;AAAA,UAExB,QAAQ,KAAK;AAAA,UACb,KAAK,KAAK;AAAA,UACV,OAAO,KAAK;AAAA,UACZ,MAAM,KAAK;AAAA,UACX,UAAU,KAAK,WAAW,aAAa,KAAK,QAAQ,IAAI,CAAE;AAAA,QAC1D,EAAC;AAAA,MACP;AAEG,aAAO,aAAaJ,iBAAiB,GAAG;AAAA,IAC3C,CAAG;AAED,aAAS,oBAAoBK,aAAY;AACvC,UAAI,iBAAiB,CAAA;AAErB,eAAS,QAAQ,UAAU;AACzB,cAAM,EAAE,UAAU,GAAG,wBAAuB,IAAK;AACjD,uBAAe,KAAK,uBAAuB;AAE3C,YAAI,YAAY,MAAM,QAAQ,QAAQ,GAAG;AACvC,mBAAS,QAAQ,WAAS,QAAQ,KAAK,CAAC;AAAA,QACzC;AAAA,MACF;AAED,MAAAA,YAAW,QAAQ,cAAY,QAAQ,QAAQ,CAAC;AAChD,aAAO;AAAA,IACR;AAGD,mBAAe,sBAAsB,UAAU;AAC7C,UAAI;AAEF,cAAM,gBAAgBL,WAAgB,MAAC;AACvC,cAAM,sBAAsB,oBAAoB,aAAa;AAG7D,gBAAQ,IAAI,UAAU,mBAAmB;AACzC,cAAME,WAAkB,QAAC,OAAO,mBAAmB;AAEnD,gBAAQ,IAAI,uCAAuC;AAAA,MACpD,SAAQ,OAAO;AACd,gBAAQ,MAAM,oCAAoC,KAAK;AACvD,cAAM;AAAA,MACP;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,45 +1,92 @@
1
- import { onMounted, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode, unref, Fragment, renderList, createBlock } from "vue";
2
- import { VueDraggableNext } from "../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
1
+ import { onUnmounted, withAsyncContext, onMounted, computed, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, createCommentVNode } from "vue";
3
2
  import { useRoute, useRouter } from "vue-router";
4
- import { actions, state } from "../../store/categories.js";
5
- import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
6
- import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
7
- import _sfc_main$3 from "../blocks/CardCategory.vue.js";
8
- const _hoisted_1 = { class: "pd-thin" };
3
+ import { state } from "../../../globals/views/store/globals.js";
4
+ import { state as state$1 } from "../../../auth/views/store/auth.js";
5
+ import { state as state$2, actions } from "../../store/categories.js";
6
+ import _sfc_main$3 from "../../../../components/Button/Button.vue.js";
7
+ import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ /* empty css */
12
+ /* empty css */
13
+ /* empty css */
14
+ import "../blocks/CardCategory.vue2.js";
15
+ import _sfc_main$4 from "../sections/CategoriesTree.vue.js";
16
+ import _sfc_main$1 from "../../../icons/navigation/IconPlus.vue.js";
17
+ const _hoisted_1 = { class: "pd-thin bg-white" };
9
18
  const _sfc_main = {
10
19
  __name: "Categories",
11
- setup(__props) {
12
- useRoute();
13
- useRouter();
20
+ async setup(__props) {
21
+ let __temp, __restore;
22
+ const route = useRoute();
23
+ const router = useRouter();
24
+ state.navigation_bar.actions = [{
25
+ component: _sfc_main$1,
26
+ props: {
27
+ fill: "rgb(var(--main))"
28
+ },
29
+ condition: () => state$1.user && state$1.user._id,
30
+ action: () => route.params._id ? router.push({ name: "Category Add", params: { _id: route.params._id } }) : router.push({ name: "Category Add" })
31
+ }], onUnmounted(() => {
32
+ state.navigation_bar.actions = [];
33
+ });
34
+ state$2.all = ([__temp, __restore] = withAsyncContext(() => actions.read({
35
+ user: state$1.user._id,
36
+ rootOnly: true,
37
+ limit: 10
38
+ })), __temp = await __temp, __restore(), __temp);
14
39
  onMounted(async () => {
15
- await actions.fetchCategories();
16
40
  });
17
- function updateOrder() {
18
- state.all.forEach((category, index) => {
19
- category.order = index;
20
- });
21
- updateCategoriesOrder();
22
- }
23
- async function updateCategoriesOrder() {
24
- await actions.updateCategories(state.all);
41
+ computed(() => {
42
+ const recursiveMap = (data) => {
43
+ return data.map((item) => ({
44
+ // id: item._id,
45
+ parent: item.parent,
46
+ _id: item._id,
47
+ order: item.order,
48
+ name: item.name,
49
+ children: item.children ? recursiveMap(item.children) : []
50
+ }));
51
+ };
52
+ return recursiveMap(state$2.all);
53
+ });
54
+ function flattenCategoryTree(categories) {
55
+ let flatCategories = [];
56
+ function flatten(category) {
57
+ const { children, ...categoryWithoutChildren } = category;
58
+ flatCategories.push(categoryWithoutChildren);
59
+ if (children && Array.isArray(children)) {
60
+ children.forEach((child) => flatten(child));
61
+ }
62
+ }
63
+ categories.forEach((category) => flatten(category));
64
+ return flatCategories;
25
65
  }
26
- async function deleteCategory(category) {
27
- const isConfirmed = confirm(`Are you sure you want to delete the category "${category.name}"?`);
28
- if (isConfirmed) {
29
- await actions.deleteCategory(category.url);
30
- } else {
31
- alert("Category deletion cancelled");
66
+ async function updateCategoriesOrder(category) {
67
+ try {
68
+ const allCategories = state$2.all;
69
+ const flattenedCategories = flattenCategoryTree(allCategories);
70
+ console.log("flated", flattenedCategories);
71
+ await actions.update(flattenedCategories);
72
+ console.log("Categories order updated successfully");
73
+ } catch (error) {
74
+ console.error("Error updating categories order:", error);
75
+ throw error;
32
76
  }
33
77
  }
34
78
  return (_ctx, _cache) => {
35
79
  const _component_router_link = resolveComponent("router-link");
36
80
  return openBlock(), createElementBlock("div", _hoisted_1, [
37
- createVNode(_sfc_main$1, { class: "radius-big mn-b-thin flex-nowrap flex-v-center flex" }, {
81
+ !_ctx.MOBILE_APP ? (openBlock(), createBlock(_sfc_main$2, {
82
+ key: 0,
83
+ class: "radius-big mn-b-thin flex-nowrap flex-v-center flex"
84
+ }, {
38
85
  default: withCtx(() => [
39
- _cache[2] || (_cache[2] = createElementVNode("h1", { class: "mn-r-auto" }, " Product Categories ", -1)),
86
+ _cache[2] || (_cache[2] = createElementVNode("h2", { class: "mn-r-auto" }, " Product Categories ", -1)),
40
87
  createVNode(_component_router_link, {
41
88
  to: {
42
- name: "CategoryAdd",
89
+ name: "Category Add",
43
90
  params: {
44
91
  _id: _ctx.$route.params._id
45
92
  }
@@ -51,7 +98,7 @@ const _sfc_main = {
51
98
  ])),
52
99
  _: 1
53
100
  }, 8, ["to"]),
54
- createVNode(_sfc_main$2, {
101
+ createVNode(_sfc_main$3, {
55
102
  onClick: updateCategoriesOrder,
56
103
  class: "pd-small radius-big bg-black t-white uppercase t-medium"
57
104
  }, {
@@ -62,25 +109,13 @@ const _sfc_main = {
62
109
  })
63
110
  ]),
64
111
  _: 1
65
- }),
66
- createVNode(unref(VueDraggableNext), {
67
- class: "dragArea list-group w-full",
68
- list: state.all,
69
- "item-key": "order",
70
- onEnd: updateOrder
71
- }, {
72
- default: withCtx(() => [
73
- (openBlock(true), createElementBlock(Fragment, null, renderList(state.all, (category, index) => {
74
- return openBlock(), createBlock(_sfc_main$3, {
75
- key: category.id,
76
- category,
77
- onDelete: deleteCategory,
78
- class: "pd-medium bg-light radius-medium mn-b-thin"
79
- }, null, 8, ["category"]);
80
- }), 128))
81
- ]),
82
- _: 1
83
- }, 8, ["list"])
112
+ })) : createCommentVNode("", true),
113
+ state$2.all ? (openBlock(), createBlock(_sfc_main$4, {
114
+ key: 1,
115
+ items: state$2.all,
116
+ state: state$2.all,
117
+ onUpdate: updateCategoriesOrder
118
+ }, null, 8, ["items", "state"])) : createCommentVNode("", true)
84
119
  ]);
85
120
  };
86
121
  }