@ozdao/martyrs 0.2.511 → 0.2.513

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 (156) hide show
  1. package/dist/{main-B1XN9Zjg.cjs → main-CVOBCkmD.cjs} +5 -5
  2. package/dist/{main-u7zgfMGL.js → main-CVRRj-vK.js} +259 -262
  3. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -1
  4. package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -1
  5. package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
  6. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
  7. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  8. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  9. package/dist/martyrs/src/components/Menu/MenuItem.vue.cjs +2 -2
  10. package/dist/martyrs/src/components/Menu/MenuItem.vue.cjs.map +1 -1
  11. package/dist/martyrs/src/components/Menu/MenuItem.vue.js +2 -2
  12. package/dist/martyrs/src/components/Menu/MenuItem.vue.js.map +1 -1
  13. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  14. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  15. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  16. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  17. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs +0 -2
  18. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs.map +1 -1
  19. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js +0 -2
  20. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
  21. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +3 -5
  22. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -1
  23. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +3 -5
  24. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -1
  25. package/dist/martyrs/src/modules/globals/globals.client.cjs +10 -1
  26. package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
  27. package/dist/martyrs/src/modules/globals/globals.client.js +31 -22
  28. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  29. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  30. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  31. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +42 -46
  32. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -1
  33. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +45 -49
  34. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -1
  35. package/dist/martyrs/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +308 -0
  36. package/dist/martyrs/src/modules/globals/views/components/sections/Walkthrough.vue.cjs.map +1 -0
  37. package/dist/martyrs/src/modules/globals/views/components/sections/Walkthrough.vue.js +308 -0
  38. package/dist/martyrs/src/modules/globals/views/components/sections/Walkthrough.vue.js.map +1 -0
  39. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +14 -16
  40. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs.map +1 -1
  41. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +13 -15
  42. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
  43. package/dist/martyrs/src/modules/notifications/notifications.client.cjs +101 -32
  44. package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
  45. package/dist/martyrs/src/modules/notifications/notifications.client.js +101 -32
  46. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  47. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs +45 -12
  48. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs.map +1 -1
  49. package/dist/martyrs/src/modules/notifications/store/notifications.store.js +38 -5
  50. package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
  51. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +19 -18
  52. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.cjs.map +1 -1
  53. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js +19 -18
  54. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
  55. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +82 -61
  56. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +83 -62
  58. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -1
  59. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +3 -3
  60. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs.map +1 -1
  61. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +3 -3
  62. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
  63. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +4 -2
  64. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
  65. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +4 -2
  66. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -2
  68. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  70. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
  71. package/dist/martyrs/src/modules/orders/orders.client.cjs +1 -0
  72. package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
  73. package/dist/martyrs/src/modules/orders/orders.client.js +2 -0
  74. package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
  75. package/dist/martyrs/src/modules/orders/store/shopcart.cjs +33 -23
  76. package/dist/martyrs/src/modules/orders/store/shopcart.cjs.map +1 -1
  77. package/dist/martyrs/src/modules/orders/store/shopcart.js +31 -21
  78. package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
  79. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  81. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +3 -18
  82. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  83. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +4 -19
  84. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  85. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  87. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +37 -43
  88. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
  89. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +48 -54
  90. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  91. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
  92. package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
  93. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +11 -8
  94. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  95. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +11 -8
  96. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  97. package/dist/martyrs.cjs.js +1 -1
  98. package/dist/martyrs.css +1 -1
  99. package/dist/martyrs.es.js +1 -1
  100. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.cjs +8 -0
  101. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.cjs.map +1 -0
  102. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.js +8 -0
  103. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/index.js.map +1 -0
  104. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.cjs +13 -0
  105. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.cjs.map +1 -0
  106. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.js +13 -0
  107. package/dist/node_modules/.pnpm/capacitor-plugin-app-tracking-transparency@2.0.5_@capacitor_core@7.2.0/node_modules/capacitor-plugin-app-tracking-transparency/dist/esm/web.js.map +1 -0
  108. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +43 -0
  109. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs.map +1 -0
  110. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +43 -0
  111. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +1 -0
  112. package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs +43 -0
  113. package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs.map +1 -0
  114. package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js +43 -0
  115. package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js.map +1 -0
  116. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1630 -0
  117. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs.map +1 -0
  118. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1630 -0
  119. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +1 -0
  120. package/dist/notifications.server.cjs +205 -11
  121. package/dist/notifications.server.js +205 -11
  122. package/dist/style.css +258 -242
  123. package/dist/{web--8-wgr6b.js → web-BW449LVt.js} +1 -1
  124. package/dist/{web-BS6utuAZ.cjs → web-CO3tWG6J.cjs} +1 -1
  125. package/package.json +1 -1
  126. package/src/components/Button/Button.vue +2 -2
  127. package/src/components/Menu/MenuItem.vue +11 -6
  128. package/src/modules/auth/views/components/pages/Profile.vue +1 -1
  129. package/src/modules/chats/components/sections/ChatWindow.vue +1 -1
  130. package/src/modules/events/components/pages/EventsBackoffice.vue +0 -1
  131. package/src/modules/globals/globals.client.js +17 -0
  132. package/src/modules/globals/views/components/layouts/Client.vue +1 -0
  133. package/src/modules/globals/views/components/sections/Filters.vue +2 -4
  134. package/src/modules/globals/views/components/sections/Walkthrough.vue +245 -57
  135. package/src/modules/inventory/components/pages/Inventory.vue +0 -1
  136. package/src/modules/notifications/FIXES.md +1 -0
  137. package/src/modules/notifications/controllers/notifications.controller.js +147 -7
  138. package/src/modules/notifications/models/user-device.model.js +10 -2
  139. package/src/modules/notifications/notifications.client.js +127 -41
  140. package/src/modules/notifications/routes/notifications.routes.js +4 -0
  141. package/src/modules/notifications/services/notification.service.js +93 -0
  142. package/src/modules/notifications/store/notifications.store.js +47 -7
  143. package/src/modules/orders/components/blocks/CardOrderItem.vue +1 -1
  144. package/src/modules/orders/components/forms/FormCustomerDetails.vue +52 -35
  145. package/src/modules/orders/components/pages/OrderBackoffice.vue +2 -2
  146. package/src/modules/orders/components/pages/OrderCreate.vue +3 -1
  147. package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
  148. package/src/modules/orders/orders.client.js +2 -0
  149. package/src/modules/orders/store/shopcart.js +34 -23
  150. package/src/modules/organizations/components/pages/Organization.vue +6 -2
  151. package/src/modules/organizations/configs/navigation.organization.config.js +36 -36
  152. package/src/modules/products/components/pages/Products.vue +11 -9
  153. package/src/modules/products/migrations/categories-to-materialized-path.js +0 -3
  154. package/src/styles/base/backgrounds.scss +1 -0
  155. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
  156. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Menu = require("../../../../components/Menu/Menu.vue.cjs");
4
+ const Menu = require("../../../../components/Menu/Menu.vue2.cjs");
5
5
  const MenuItem = require("../../../../components/Menu/MenuItem.vue.cjs");
6
6
  ;/* empty css */
7
7
  const IconProducts = require("../../../icons/entities/IconProducts.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { ref, onMounted, createElementBlock, openBlock, createVNode, withCtx, createBlock, createCommentVNode, unref, createElementVNode } from "vue";
2
- import _sfc_main$1 from "../../../../components/Menu/Menu.vue.js";
2
+ import _sfc_main$1 from "../../../../components/Menu/Menu.vue2.js";
3
3
  import _sfc_main$2 from "../../../../components/Menu/MenuItem.vue.js";
4
4
  /* empty css */
5
5
  import _sfc_main$4 from "../../../icons/entities/IconProducts.vue.js";
@@ -2,16 +2,14 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const IconCommunity = require("../../icons/entities/IconCommunity.vue.cjs");
4
4
  const IconEvents = require("../../icons/entities/IconEvents.vue.cjs");
5
- const IconGallery = require("../../icons/entities/IconGallery.vue.cjs");
5
+ require("vue");
6
6
  const IconGroups = require("../../icons/entities/IconGroups.vue.cjs");
7
7
  const IconOrders = require("../../icons/entities/IconOrders.vue.cjs");
8
8
  const IconProducts = require("../../icons/entities/IconProducts.vue.cjs");
9
9
  const IconLeftovers = require("../../icons/entities/IconLeftovers.vue.cjs");
10
- require("vue");
11
10
  const IconPrice = require("../../icons/entities/IconPrice.vue.cjs");
12
11
  const IconSettings = require("../../icons/entities/IconSettings.vue.cjs");
13
12
  const IconHome = require("../../icons/entities/IconHome.vue.cjs");
14
- const IconAddress = require("../../icons/entities/IconAddress.vue.cjs");
15
13
  const mixins = require("../../globals/views/mixins/mixins.cjs");
16
14
  const { hasAccess } = mixins.useGlobalMixins();
17
15
  const navigationItems = [
@@ -71,47 +69,43 @@ const navigationItems = [
71
69
  }),
72
70
  visible: () => true
73
71
  // Public access
74
- },
75
- {
76
- title: "Events",
77
- iconComponent: IconEvents.default,
78
- route: (auth, route) => ({
79
- name: "Organization_Events",
80
- params: { _id: route.params._id }
81
- }),
82
- visible: () => true
83
- // Public access
84
- },
85
- {
86
- title: "Posts",
87
- iconComponent: IconCommunity.default,
88
- route: (auth, route) => ({
89
- name: "Organization_Posts",
90
- params: { _id: route.params._id }
91
- }),
92
- visible: () => true
93
- // Public access
94
- },
95
- {
96
- title: "Spots",
97
- iconComponent: IconAddress.default,
98
- route: (auth, route) => ({
99
- name: "Organization_Spots",
100
- params: { _id: route.params._id }
101
- }),
102
- visible: () => true
103
- // Public access
104
- },
105
- {
106
- title: "Gallery",
107
- iconComponent: IconGallery.default,
108
- route: (auth, route) => ({
109
- name: "Backoffice Gallery",
110
- params: { _id: route.params._id }
111
- }),
112
- visible: () => true
113
- // Public access
114
72
  }
73
+ // {
74
+ // title: 'Events',
75
+ // iconComponent: IconEvents,
76
+ // route: (auth, route) => ({
77
+ // name: 'Organization_Events',
78
+ // params: { _id: route.params._id }
79
+ // }),
80
+ // visible: () => true // Public access
81
+ // },
82
+ // {
83
+ // title: 'Posts',
84
+ // iconComponent: IconCommunity,
85
+ // route: (auth, route) => ({
86
+ // name: 'Organization_Posts',
87
+ // params: { _id: route.params._id }
88
+ // }),
89
+ // visible: () => true // Public access
90
+ // },
91
+ // {
92
+ // title: 'Spots',
93
+ // iconComponent: IconAddress,
94
+ // route: (auth, route) => ({
95
+ // name: 'Organization_Spots',
96
+ // params: { _id: route.params._id }
97
+ // }),
98
+ // visible: () => true // Public access
99
+ // },
100
+ // {
101
+ // title: 'Gallery',
102
+ // iconComponent: IconGallery,
103
+ // route: (auth, route) => ({
104
+ // name: 'Backoffice Gallery',
105
+ // params: { _id: route.params._id }
106
+ // }),
107
+ // visible: () => true // Public access
108
+ // },
115
109
  ]
116
110
  },
117
111
  {
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.organization.config.cjs","sources":["../../../../../../src/modules/organizations/configs/navigation.organization.config.js"],"sourcesContent":["// Import icons\nimport IconCommunity from '@martyrs/src/modules/icons/entities/IconCommunity.vue';\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue';\nimport IconGallery from '@martyrs/src/modules/icons/entities/IconGallery.vue';\nimport IconGroups from '@martyrs/src/modules/icons/entities/IconGroups.vue';\nimport IconOrders from '@martyrs/src/modules/icons/entities/IconOrders.vue';\nimport IconProducts from '@martyrs/src/modules/icons/entities/IconProducts.vue';\nimport IconLeftovers from '@martyrs/src/modules/icons/entities/IconLeftovers.vue';\nimport IconDate from '@martyrs/src/modules/icons/entities/IconDate.vue';\nimport IconPrice from '@martyrs/src/modules/icons/entities/IconPrice.vue';\nimport IconSettings from '@martyrs/src/modules/icons/entities/IconSettings.vue';\nimport IconHome from '@martyrs/src/modules/icons/entities/IconHome.vue';\nimport IconAddress from '@martyrs/src/modules/icons/entities/IconAddress.vue';\n\n// Import global mixins for access control\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\nconst { hasAccess } = useGlobalMixins();\n\n// Organization backoffice navigation configuration\nexport const navigationItems = [\n {\n category: 'Organization',\n visible: () => true, // Always visible - has both public and private items\n items: [\n {\n title: 'Profile',\n iconComponent: IconHome,\n route: (auth, route) => ({\n name: 'Organization',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Members',\n iconComponent: IconGroups,\n route: (auth, route) => ({\n name: 'Organization Members',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Settings',\n iconComponent: IconSettings,\n route: (auth, route) => ({\n name: 'Organization Edit',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'members', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Discover',\n visible: () => true, // Always visible - public category\n items: [\n {\n title: 'Products',\n iconComponent: IconProducts,\n route: (auth, route) => ({\n name: 'Organization_Products',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Events',\n iconComponent: IconEvents,\n route: (auth, route) => ({\n name: 'Organization_Events',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Posts',\n iconComponent: IconCommunity,\n route: (auth, route) => ({\n name: 'Organization_Posts',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Spots',\n iconComponent: IconAddress,\n route: (auth, route) => ({\n name: 'Organization_Spots',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Gallery',\n iconComponent: IconGallery,\n route: (auth, route) => ({\n name: 'Backoffice Gallery',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n ]\n },\n {\n category: 'Management',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Categories',\n iconComponent: IconPrice,\n route: (auth, route) => ({\n name: 'Categories',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Inventory',\n iconComponent: IconLeftovers,\n route: (auth, route) => ({\n name: 'OrganizationInventoryList',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'inventory', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Rents',\n iconComponent: IconEvents,\n route: (auth, route) => ({\n name: 'Organization_Rents',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Orders & Sales',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Orders',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationOrdersList',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Customers',\n iconComponent: IconCommunity,\n route: (auth, route) => ({\n name: 'OrganizationCustomers',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Applications',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationApplications',\n params: { _id: route.params._id }\n })\n },\n ]\n },\n];\n\nexport default navigationItems;"],"names":["useGlobalMixins","IconHome","IconGroups","IconSettings","IconProducts","IconEvents","IconCommunity","IconAddress","IconGallery","IconPrice","IconLeftovers","IconOrders"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAM,EAAE,UAAS,IAAKA,uBAAe;AAGzB,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,UAAU;AAAA,IACV,SAAS,MAAM;AAAA;AAAA,IACf,OAAO;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,eAAeC,SAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,QACQ,SAAS,MAAM;AAAA;AAAA,MACvB;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeC,WAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,QACQ,SAAS,MAAM;AAAA;AAAA,MACvB;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeC,aAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,QACQ,SAAS,CAAC,MA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,MAAM,UAAU;AAAA,MACxB,MAAM,OAAO;AAAA,MACb;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL,KAAK,OAAO;AAAA,IAClB;AAAA,IACI,OAAO;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,eAAeM,WAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeL,cAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeK,WAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;"}
1
+ {"version":3,"file":"navigation.organization.config.cjs","sources":["../../../../../../src/modules/organizations/configs/navigation.organization.config.js"],"sourcesContent":["// Import icons\nimport IconCommunity from '@martyrs/src/modules/icons/entities/IconCommunity.vue';\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue';\nimport IconGallery from '@martyrs/src/modules/icons/entities/IconGallery.vue';\nimport IconGroups from '@martyrs/src/modules/icons/entities/IconGroups.vue';\nimport IconOrders from '@martyrs/src/modules/icons/entities/IconOrders.vue';\nimport IconProducts from '@martyrs/src/modules/icons/entities/IconProducts.vue';\nimport IconLeftovers from '@martyrs/src/modules/icons/entities/IconLeftovers.vue';\nimport IconDate from '@martyrs/src/modules/icons/entities/IconDate.vue';\nimport IconPrice from '@martyrs/src/modules/icons/entities/IconPrice.vue';\nimport IconSettings from '@martyrs/src/modules/icons/entities/IconSettings.vue';\nimport IconHome from '@martyrs/src/modules/icons/entities/IconHome.vue';\nimport IconAddress from '@martyrs/src/modules/icons/entities/IconAddress.vue';\n\n// Import global mixins for access control\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\nconst { hasAccess } = useGlobalMixins();\n\n// Organization backoffice navigation configuration\nexport const navigationItems = [\n {\n category: 'Organization',\n visible: () => true, // Always visible - has both public and private items\n items: [\n {\n title: 'Profile',\n iconComponent: IconHome,\n route: (auth, route) => ({\n name: 'Organization',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Members',\n iconComponent: IconGroups,\n route: (auth, route) => ({\n name: 'Organization Members',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Settings',\n iconComponent: IconSettings,\n route: (auth, route) => ({\n name: 'Organization Edit',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'members', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Discover',\n visible: () => true, // Always visible - public category\n items: [\n {\n title: 'Products',\n iconComponent: IconProducts,\n route: (auth, route) => ({\n name: 'Organization_Products',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n // {\n // title: 'Events',\n // iconComponent: IconEvents,\n // route: (auth, route) => ({\n // name: 'Organization_Events',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n // {\n // title: 'Posts',\n // iconComponent: IconCommunity,\n // route: (auth, route) => ({\n // name: 'Organization_Posts',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n // {\n // title: 'Spots',\n // iconComponent: IconAddress,\n // route: (auth, route) => ({\n // name: 'Organization_Spots',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n // {\n // title: 'Gallery',\n // iconComponent: IconGallery,\n // route: (auth, route) => ({\n // name: 'Backoffice Gallery',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n ]\n },\n {\n category: 'Management',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Categories',\n iconComponent: IconPrice,\n route: (auth, route) => ({\n name: 'Categories',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Inventory',\n iconComponent: IconLeftovers,\n route: (auth, route) => ({\n name: 'OrganizationInventoryList',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'inventory', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Rents',\n iconComponent: IconEvents,\n route: (auth, route) => ({\n name: 'Organization_Rents',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Orders & Sales',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Orders',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationOrdersList',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Customers',\n iconComponent: IconCommunity,\n route: (auth, route) => ({\n name: 'OrganizationCustomers',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Applications',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationApplications',\n params: { _id: route.params._id }\n })\n },\n ]\n },\n];\n\nexport default navigationItems;"],"names":["useGlobalMixins","IconHome","IconGroups","IconSettings","IconProducts","IconPrice","IconLeftovers","IconEvents","IconOrders","IconCommunity"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,EAAE,UAAS,IAAKA,uBAAe;AAGzB,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,UAAU;AAAA,IACV,SAAS,MAA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AA,IACV,SAAS,CAAC,MAAM,UAAU;AAAA,MACxB,MAAM,OAAO;AAAA,MACb;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL,KAAK,OAAO;AAAA,IAClB;AAAA,IACI,OAAO;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,eAAeC,WAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeC,cAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeD,WAAAA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;"}
@@ -1,15 +1,13 @@
1
- import _sfc_main$5 from "../../icons/entities/IconCommunity.vue.js";
2
- import _sfc_main$4 from "../../icons/entities/IconEvents.vue.js";
3
- import _sfc_main$7 from "../../icons/entities/IconGallery.vue.js";
1
+ import _sfc_main$8 from "../../icons/entities/IconCommunity.vue.js";
2
+ import _sfc_main$6 from "../../icons/entities/IconEvents.vue.js";
3
+ import "vue";
4
4
  import _sfc_main$1 from "../../icons/entities/IconGroups.vue.js";
5
- import _sfc_main$a from "../../icons/entities/IconOrders.vue.js";
5
+ import _sfc_main$7 from "../../icons/entities/IconOrders.vue.js";
6
6
  import _sfc_main$3 from "../../icons/entities/IconProducts.vue.js";
7
- import _sfc_main$9 from "../../icons/entities/IconLeftovers.vue.js";
8
- import "vue";
9
- import _sfc_main$8 from "../../icons/entities/IconPrice.vue.js";
7
+ import _sfc_main$5 from "../../icons/entities/IconLeftovers.vue.js";
8
+ import _sfc_main$4 from "../../icons/entities/IconPrice.vue.js";
10
9
  import _sfc_main$2 from "../../icons/entities/IconSettings.vue.js";
11
10
  import _sfc_main from "../../icons/entities/IconHome.vue.js";
12
- import _sfc_main$6 from "../../icons/entities/IconAddress.vue.js";
13
11
  import { useGlobalMixins } from "../../globals/views/mixins/mixins.js";
14
12
  const { hasAccess } = useGlobalMixins();
15
13
  const navigationItems = [
@@ -69,47 +67,43 @@ const navigationItems = [
69
67
  }),
70
68
  visible: () => true
71
69
  // Public access
72
- },
73
- {
74
- title: "Events",
75
- iconComponent: _sfc_main$4,
76
- route: (auth, route) => ({
77
- name: "Organization_Events",
78
- params: { _id: route.params._id }
79
- }),
80
- visible: () => true
81
- // Public access
82
- },
83
- {
84
- title: "Posts",
85
- iconComponent: _sfc_main$5,
86
- route: (auth, route) => ({
87
- name: "Organization_Posts",
88
- params: { _id: route.params._id }
89
- }),
90
- visible: () => true
91
- // Public access
92
- },
93
- {
94
- title: "Spots",
95
- iconComponent: _sfc_main$6,
96
- route: (auth, route) => ({
97
- name: "Organization_Spots",
98
- params: { _id: route.params._id }
99
- }),
100
- visible: () => true
101
- // Public access
102
- },
103
- {
104
- title: "Gallery",
105
- iconComponent: _sfc_main$7,
106
- route: (auth, route) => ({
107
- name: "Backoffice Gallery",
108
- params: { _id: route.params._id }
109
- }),
110
- visible: () => true
111
- // Public access
112
70
  }
71
+ // {
72
+ // title: 'Events',
73
+ // iconComponent: IconEvents,
74
+ // route: (auth, route) => ({
75
+ // name: 'Organization_Events',
76
+ // params: { _id: route.params._id }
77
+ // }),
78
+ // visible: () => true // Public access
79
+ // },
80
+ // {
81
+ // title: 'Posts',
82
+ // iconComponent: IconCommunity,
83
+ // route: (auth, route) => ({
84
+ // name: 'Organization_Posts',
85
+ // params: { _id: route.params._id }
86
+ // }),
87
+ // visible: () => true // Public access
88
+ // },
89
+ // {
90
+ // title: 'Spots',
91
+ // iconComponent: IconAddress,
92
+ // route: (auth, route) => ({
93
+ // name: 'Organization_Spots',
94
+ // params: { _id: route.params._id }
95
+ // }),
96
+ // visible: () => true // Public access
97
+ // },
98
+ // {
99
+ // title: 'Gallery',
100
+ // iconComponent: IconGallery,
101
+ // route: (auth, route) => ({
102
+ // name: 'Backoffice Gallery',
103
+ // params: { _id: route.params._id }
104
+ // }),
105
+ // visible: () => true // Public access
106
+ // },
113
107
  ]
114
108
  },
115
109
  {
@@ -124,7 +118,7 @@ const navigationItems = [
124
118
  items: [
125
119
  {
126
120
  title: "Categories",
127
- iconComponent: _sfc_main$8,
121
+ iconComponent: _sfc_main$4,
128
122
  route: (auth, route) => ({
129
123
  name: "Categories",
130
124
  params: { _id: route.params._id }
@@ -139,7 +133,7 @@ const navigationItems = [
139
133
  },
140
134
  {
141
135
  title: "Inventory",
142
- iconComponent: _sfc_main$9,
136
+ iconComponent: _sfc_main$5,
143
137
  route: (auth, route) => ({
144
138
  name: "OrganizationInventoryList",
145
139
  params: { _id: route.params._id }
@@ -154,7 +148,7 @@ const navigationItems = [
154
148
  },
155
149
  {
156
150
  title: "Rents",
157
- iconComponent: _sfc_main$4,
151
+ iconComponent: _sfc_main$6,
158
152
  route: (auth, route) => ({
159
153
  name: "Organization_Rents",
160
154
  params: { _id: route.params._id }
@@ -181,7 +175,7 @@ const navigationItems = [
181
175
  items: [
182
176
  {
183
177
  title: "Orders",
184
- iconComponent: _sfc_main$a,
178
+ iconComponent: _sfc_main$7,
185
179
  route: (auth, route) => ({
186
180
  name: "OrganizationOrdersList",
187
181
  params: { _id: route.params._id }
@@ -189,7 +183,7 @@ const navigationItems = [
189
183
  },
190
184
  {
191
185
  title: "Customers",
192
- iconComponent: _sfc_main$5,
186
+ iconComponent: _sfc_main$8,
193
187
  route: (auth, route) => ({
194
188
  name: "OrganizationCustomers",
195
189
  params: { _id: route.params._id }
@@ -197,7 +191,7 @@ const navigationItems = [
197
191
  },
198
192
  {
199
193
  title: "Applications",
200
- iconComponent: _sfc_main$a,
194
+ iconComponent: _sfc_main$7,
201
195
  route: (auth, route) => ({
202
196
  name: "OrganizationApplications",
203
197
  params: { _id: route.params._id }
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.organization.config.js","sources":["../../../../../../src/modules/organizations/configs/navigation.organization.config.js"],"sourcesContent":["// Import icons\nimport IconCommunity from '@martyrs/src/modules/icons/entities/IconCommunity.vue';\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue';\nimport IconGallery from '@martyrs/src/modules/icons/entities/IconGallery.vue';\nimport IconGroups from '@martyrs/src/modules/icons/entities/IconGroups.vue';\nimport IconOrders from '@martyrs/src/modules/icons/entities/IconOrders.vue';\nimport IconProducts from '@martyrs/src/modules/icons/entities/IconProducts.vue';\nimport IconLeftovers from '@martyrs/src/modules/icons/entities/IconLeftovers.vue';\nimport IconDate from '@martyrs/src/modules/icons/entities/IconDate.vue';\nimport IconPrice from '@martyrs/src/modules/icons/entities/IconPrice.vue';\nimport IconSettings from '@martyrs/src/modules/icons/entities/IconSettings.vue';\nimport IconHome from '@martyrs/src/modules/icons/entities/IconHome.vue';\nimport IconAddress from '@martyrs/src/modules/icons/entities/IconAddress.vue';\n\n// Import global mixins for access control\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\nconst { hasAccess } = useGlobalMixins();\n\n// Organization backoffice navigation configuration\nexport const navigationItems = [\n {\n category: 'Organization',\n visible: () => true, // Always visible - has both public and private items\n items: [\n {\n title: 'Profile',\n iconComponent: IconHome,\n route: (auth, route) => ({\n name: 'Organization',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Members',\n iconComponent: IconGroups,\n route: (auth, route) => ({\n name: 'Organization Members',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Settings',\n iconComponent: IconSettings,\n route: (auth, route) => ({\n name: 'Organization Edit',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'members', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Discover',\n visible: () => true, // Always visible - public category\n items: [\n {\n title: 'Products',\n iconComponent: IconProducts,\n route: (auth, route) => ({\n name: 'Organization_Products',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Events',\n iconComponent: IconEvents,\n route: (auth, route) => ({\n name: 'Organization_Events',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Posts',\n iconComponent: IconCommunity,\n route: (auth, route) => ({\n name: 'Organization_Posts',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Spots',\n iconComponent: IconAddress,\n route: (auth, route) => ({\n name: 'Organization_Spots',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Gallery',\n iconComponent: IconGallery,\n route: (auth, route) => ({\n name: 'Backoffice Gallery',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n ]\n },\n {\n category: 'Management',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Categories',\n iconComponent: IconPrice,\n route: (auth, route) => ({\n name: 'Categories',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Inventory',\n iconComponent: IconLeftovers,\n route: (auth, route) => ({\n name: 'OrganizationInventoryList',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'inventory', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Rents',\n iconComponent: IconEvents,\n route: (auth, route) => ({\n name: 'Organization_Rents',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Orders & Sales',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Orders',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationOrdersList',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Customers',\n iconComponent: IconCommunity,\n route: (auth, route) => ({\n name: 'OrganizationCustomers',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Applications',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationApplications',\n params: { _id: route.params._id }\n })\n },\n ]\n },\n];\n\nexport default navigationItems;"],"names":["IconHome","IconGroups","IconSettings","IconProducts","IconEvents","IconCommunity","IconAddress","IconGallery","IconPrice","IconLeftovers","IconOrders"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,EAAE,UAAS,IAAK,gBAAe;AAGzB,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,UAAU;AAAA,IACV,SAAS,MAAM;AAAA;AAAA,IACf,OAAO;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,eAAeA;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,QACQ,SAAS,MAAM;AAAA;AAAA,MACvB;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeC;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,QACQ,SAAS,MAAM;AAAA;AAAA,MACvB;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeC;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,QACQ,SAAS,CAAC,M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A;AAAA,MACA,KAAK;AAAA,MACL,KAAK,OAAO;AAAA,IAClB;AAAA,IACI,OAAO;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,eAAeM;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeL;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeK;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;"}
1
+ {"version":3,"file":"navigation.organization.config.js","sources":["../../../../../../src/modules/organizations/configs/navigation.organization.config.js"],"sourcesContent":["// Import icons\nimport IconCommunity from '@martyrs/src/modules/icons/entities/IconCommunity.vue';\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue';\nimport IconGallery from '@martyrs/src/modules/icons/entities/IconGallery.vue';\nimport IconGroups from '@martyrs/src/modules/icons/entities/IconGroups.vue';\nimport IconOrders from '@martyrs/src/modules/icons/entities/IconOrders.vue';\nimport IconProducts from '@martyrs/src/modules/icons/entities/IconProducts.vue';\nimport IconLeftovers from '@martyrs/src/modules/icons/entities/IconLeftovers.vue';\nimport IconDate from '@martyrs/src/modules/icons/entities/IconDate.vue';\nimport IconPrice from '@martyrs/src/modules/icons/entities/IconPrice.vue';\nimport IconSettings from '@martyrs/src/modules/icons/entities/IconSettings.vue';\nimport IconHome from '@martyrs/src/modules/icons/entities/IconHome.vue';\nimport IconAddress from '@martyrs/src/modules/icons/entities/IconAddress.vue';\n\n// Import global mixins for access control\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\nconst { hasAccess } = useGlobalMixins();\n\n// Organization backoffice navigation configuration\nexport const navigationItems = [\n {\n category: 'Organization',\n visible: () => true, // Always visible - has both public and private items\n items: [\n {\n title: 'Profile',\n iconComponent: IconHome,\n route: (auth, route) => ({\n name: 'Organization',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Members',\n iconComponent: IconGroups,\n route: (auth, route) => ({\n name: 'Organization Members',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n {\n title: 'Settings',\n iconComponent: IconSettings,\n route: (auth, route) => ({\n name: 'Organization Edit',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'members', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Discover',\n visible: () => true, // Always visible - public category\n items: [\n {\n title: 'Products',\n iconComponent: IconProducts,\n route: (auth, route) => ({\n name: 'Organization_Products',\n params: { _id: route.params._id }\n }),\n visible: () => true // Public access\n },\n // {\n // title: 'Events',\n // iconComponent: IconEvents,\n // route: (auth, route) => ({\n // name: 'Organization_Events',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n // {\n // title: 'Posts',\n // iconComponent: IconCommunity,\n // route: (auth, route) => ({\n // name: 'Organization_Posts',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n // {\n // title: 'Spots',\n // iconComponent: IconAddress,\n // route: (auth, route) => ({\n // name: 'Organization_Spots',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n // {\n // title: 'Gallery',\n // iconComponent: IconGallery,\n // route: (auth, route) => ({\n // name: 'Backoffice Gallery',\n // params: { _id: route.params._id }\n // }),\n // visible: () => true // Public access\n // },\n ]\n },\n {\n category: 'Management',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Categories',\n iconComponent: IconPrice,\n route: (auth, route) => ({\n name: 'Categories',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'products', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Inventory',\n iconComponent: IconLeftovers,\n route: (auth, route) => ({\n name: 'OrganizationInventoryList',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'inventory', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n {\n title: 'Rents',\n iconComponent: IconEvents,\n route: (auth, route) => ({\n name: 'Organization_Rents',\n params: { _id: route.params._id }\n }),\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n )\n },\n ]\n },\n {\n category: 'Orders & Sales',\n visible: (auth, route) => hasAccess(\n route.params._id, \n 'orders', \n 'read', \n auth.accesses, \n auth.access.roles\n ),\n items: [\n {\n title: 'Orders',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationOrdersList',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Customers',\n iconComponent: IconCommunity,\n route: (auth, route) => ({\n name: 'OrganizationCustomers',\n params: { _id: route.params._id }\n })\n },\n {\n title: 'Applications',\n iconComponent: IconOrders,\n route: (auth, route) => ({\n name: 'OrganizationApplications',\n params: { _id: route.params._id }\n })\n },\n ]\n },\n];\n\nexport default navigationItems;"],"names":["IconHome","IconGroups","IconSettings","IconProducts","IconPrice","IconLeftovers","IconEvents","IconOrders","IconCommunity"],"mappings":";;;;;;;;;;;AAgBA,MAAM,EAAE,UAAS,IAAK,gBAAe;AAGzB,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,UAAU;AAAA,IACV,SAAS,MAAM;AAAA;AAAA,IACf,OAAO;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,eAAeA;AAAAA,QACf,OAAO,CAAC,MA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AAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,eAAeC;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeC;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,MACM;AAAA,QACE,OAAO;AAAA,QACP,eAAeD;AAAAA,QACf,OAAO,CAAC,MAAM,WAAW;AAAA,UACvB,MAAM;AAAA,UACN,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG;AAAA,QACzC;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;"}
@@ -13,7 +13,7 @@ const gallery_backoffice_router = require("../../gallery/router/gallery.backoffi
13
13
  const payments_router = require("../../wallet/views/router/payments.router.cjs");
14
14
  const auth_validation = require("../../auth/views/middlewares/auth.validation.cjs");
15
15
  require("vue");
16
- ;/* empty css */
16
+ ;/* empty css */
17
17
  require("../../../components/Menu/MenuItem.vue.cjs");
18
18
  ;/* empty css */
19
19
  require("vue-router");
@@ -11,7 +11,7 @@ import gallery from "../../gallery/router/gallery.backoffice.router.js";
11
11
  import payments from "../../wallet/views/router/payments.router.js";
12
12
  import { requiresAuth } from "../../auth/views/middlewares/auth.validation.js";
13
13
  import "vue";
14
- /* empty css */
14
+ /* empty css */
15
15
  import "../../../components/Menu/MenuItem.vue.js";
16
16
  /* empty css */
17
17
  import "vue-router";
@@ -178,14 +178,17 @@ const _sfc_main = {
178
178
  selectedFilters.value[filter.name] = [];
179
179
  });
180
180
  };
181
- globals.state.navigation_bar.actions = [{
182
- component: IconPlus.default,
183
- props: {
184
- fill: "rgb(var(--main))"
185
- },
186
- condition: () => auth.state.user && auth.state.user._id,
187
- action: () => route.params._id ? router.push({ name: "Organization_ProductAdd", params: { _id: route.params._id } }) : router.push({ name: "ProductAdd" })
188
- }], vue.onMounted(async () => {
181
+ if (route.params?._id) {
182
+ globals.state.navigation_bar.actions = [{
183
+ component: IconPlus.default,
184
+ props: {
185
+ fill: "rgb(var(--main))"
186
+ },
187
+ condition: () => auth.state.user && auth.state.user._id,
188
+ action: () => route.params._id ? router.push({ name: "Organization_ProductAdd", params: { _id: route.params._id } }) : router.push({ name: "ProductAdd" })
189
+ }];
190
+ }
191
+ vue.onMounted(async () => {
189
192
  await loadCategoryData();
190
193
  });
191
194
  vue.onUnmounted(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"Products.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Products.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <header \n v-if=\"route.name !== 'Organization' && !MOBILE_APP\"\n class=\"pd-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">{{ currentCategory ? currentCategory.name : 'All Products' }}</h2>\n <button \n v-if=\"hasAccess(route.params._id, 'products', 'create', auth.state.accesses, auth.state.access.roles)\"\n @click=\"$router.push({\n name: route.params?._id ? 'Organization_ProductAdd' : 'ProductAdd'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <div class=\"cols-2-1_3 br-1px br-solid br-light z-index-3 pos-relative\">\n\n <div class=\"o-y-scroll br-r br-solid br-light pd-medium z-index-2 desktop-only h-100 pos-relative\">\n <div class=\"w-100 o-y-scroll h-100\">\n <!-- Категории -->\n <div class=\"mn-b-medium\" v-if=\"currentCategories.length > 0\">\n <h4 class=\"mn-b-medium\">\n {{ route.params.categoryPath ? 'Subcategories' : 'Categories' }}\n </h4>\n <div class=\"gap-micro\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\"cursor-pointer hover-t-underline mn-b-regular transition-all\"\n >\n {{ category.name }}\n <br>\n <span v-for=\"subcategory in category.children\">{{subcategory.name}}</span>\n </div>\n </div>\n </div>\n\n <!-- Фильтры категории -->\n <Spoiler \n v-for=\"filter in categoryFilters\"\n :key=\"filter.name\"\n class=\"o-hidden mn-b-medium\"\n :status=\"true\"\n >\n <template #header=\"{ isOpen }\">\n <div class=\"cursor-pointer w-100 flex-v-center flex-nowrap flex\">\n <h4 class=\"w-100\">{{ filter.name }}</h4>\n <div class=\"h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra\">\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" fill=\"rgb(var(--black))\" class=\"i-regular\"/>\n </div>\n </div>\n </template>\n\n <template #content>\n <div class=\"mn-t-small\">\n <Checkbox \n v-for=\"option in filter.options\"\n :key=\"option.text || option\"\n v-model:radio=\"selectedFilters[filter.name]\"\n :label=\"option.text || option\"\n :value=\"option.text || option\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n </template>\n </Spoiler>\n \n <!-- Цена за сутки -->\n <Spoiler \n class=\"o-hidden mn-b-medium\"\n :status=\"true\"\n >\n <template #header=\"{ isOpen }\">\n <div class=\"cursor-pointer w-100 flex-v-center flex-nowrap flex\">\n <h4 class=\"w-100\"> Price</h4>\n <div class=\"h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra\">\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" fill=\"rgb(var(--black))\" class=\"i-regular\"/>\n </div>\n </div>\n </template>\n\n <template #content>\n <div class=\"mn-t-small flex gap-thin\">\n <Field\n v-model:field=\"selectedFilters.price.min\"\n placeholder=\"From\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"selectedFilters.price.max\"\n placeholder=\"To\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\n </template>\n </Spoiler>\n\n <!-- Доступность -->\n <Spoiler \n class=\"o-hidden mn-b-medium\"\n :status=\"true\"\n >\n <template #header=\"{ isOpen }\">\n <div class=\"cursor-pointer w-100 flex-v-center flex-nowrap flex\">\n <h4 class=\"w-100\">Availability</h4>\n <div class=\"h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra\">\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" fill=\"rgb(var(--black))\" class=\"i-regular\"/>\n </div>\n </div>\n </template>\n\n <template #content>\n <div class=\"mn-t-small\">\n <div \n @click=\"() => { tempSelectedDates = selectedFilters.availability; showDatePickerPopup = true; }\"\n :class=\"{ 'bg-light': selectedFilters?.availability }\"\n class=\"pd-small field-wrapper radius-small bg-light cursor-pointer hover-bg-light transition-all flex-v-center flex gap-thin\"\n >\n <IconCalendar class=\"i-regular\" />\n <span class=\"h-1r\">{{ selectedFilters.availability ? `${formatDate(selectedFilters.availability.start, { dayMonth: true, language: 'en' })} - ${formatDate(selectedFilters.availability.end, { dayMonth: true, language: 'en' })}` : 'Select dates'}}</span>\n </div>\n </div>\n </template>\n </Spoiler>\n\n <!-- Кнопка очистки фильтров -->\n <button \n @click=\"clearAllFilters\"\n class=\"bg-main w-100 button mn-t-medium\"\n >\n Clear Filters\n </button>\n </div>\n </div>\n\n <div class=\"w-100 rows-1 pd-thin pos-relative o-hidden\">\n \n <slot></slot>\n\n <div class=\"mn-b-thin mobile-only w-100 o-y-scroll scroll-hide scroll-snap-type-x-mandatory scroll-pd-regular\">\n <div class=\"gap-thin flex-nowrap flex\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\" flex-child-default bg-light flex t-nowrap pd-medium radius-medium cursor-pointer hover-bg-light transition-all\"\n >\n {{ category.name }}\n </div>\n </div>\n </div>\n\n <Feed\n :search=\"true\"\n v-model:sort=\"products.state.sort\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: products.state\n }\"\n :options=\"{\n limit: 16,\n owner: route.name?.includes('Organization') ? route.params._id : null,\n search: route.query.search,\n lookup: ['variants','rents','inventory'],\n categories: route.params.categoryPath ? `/${route.params.categoryPath}` : null,\n filters: processedFilters,\n priceMin: selectedFilters.price?.min,\n priceMax: selectedFilters.price?.max,\n dateStart: selectedFilters.availability?.start,\n dateEnd: selectedFilters.availability?.end\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n \n >\n <div class=\"mn-b-thin mobile-only\">\n <Filters\n v-model:filters=\"availableFilters\"\n v-model:selected=\"selectedFilters\"\n class=\"\"\n />\n </div>\n <div class=\"cols-4 pos-relative w-100 rows-1 gap-thin\">\n <router-link \n v-for=\"product in items\" \n :to=\"route.params._id ? { name: 'Organization_Product', params: { _id: route.params._id, product: product._id } } : { name: 'Product', params: { product: product._id } }\"\n class=\"pos-relative h-100 w-100\"\n >\n <CardProduct\n :key=\"product._id\"\n :product=\"product\"\n :user=\"auth.state.access\"\n :organization=\"route.params._id\"\n :access=\"hasAccess(route.params._id, 'products', 'edit', auth.state.accesses, auth.state.access.roles)\"\n class=\"pos-relative h-100 w-100 bg-light\"\n />\n </router-link>\n </div>\n </Feed>\n\n </div>\n </div>\n \n <!-- Date Picker Popup -->\n <Popup\n :isPopupOpen=\"showDatePickerPopup\"\n @close-popup=\"showDatePickerPopup = false\"\n class=\"pd-medium bg-white radius-medium\"\n style=\"min-width: 350px;\"\n >\n <h3 class=\"mn-b-medium\">Select Date Range</h3>\n \n <Calendar\n v-model:date=\"tempSelectedDates\"\n :allowRange=\"true\"\n :disablePastDates=\"true\"\n class=\"mn-b-medium radius-small bg-light\"\n />\n \n <div class=\"flex gap-small\">\n <button \n @click=\"showDatePickerPopup = false\"\n class=\"bg-light button flex-child-full\"\n >\n Cancel\n </button>\n <button \n @click=\"applyDateFilter\"\n class=\"bg-main button w-100 flex-child-full\"\n >\n Apply\n </button>\n \n </div>\n </Popup>\n</div>\n\n</template>\n\n\n<script setup=\"props\">\n // Import libs\n import { ref, computed, watch, onMounted, onUnmounted } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Tab from '@martyrs/src/components/Tab/Tab.vue'\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import FilterProducts from '@martyrs/src/modules/products/components/sections/FilterProducts.vue'\n import BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\n import BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n import Filters from '@martyrs/src/modules/globals/views/components/sections/Filters.vue'\n import Spoiler from \"@martyrs/src/components/Spoiler/Spoiler.vue\"\n import Field from \"@martyrs/src/components/Field/Field.vue\"\n import Calendar from \"@martyrs/src/components/Calendar/Calendar.vue\"\n import Popup from \"@martyrs/src/components/Popup/Popup.vue\"\n import Checkbox from \"@martyrs/src/components/Checkbox/Checkbox.vue\"\n\n import CardProduct from '@martyrs/src/modules/products/components/blocks/CardProduct.vue'\n\n import IconPlus from '@martyrs/src/modules/icons/navigation/IconPlus.vue'\n import IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'\n import IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'\n\n\n // Accessing router and store\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n import * as products from '@martyrs/src/modules/products/store/products.js';\n import * as categories from '@martyrs/src/modules/products/store/categories.js';\n import { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\n const route = useRoute()\n const router = useRouter()\n const { generateFilters, formatDate } = useGlobalMixins()\n\n // Категории и фильтры\n const currentCategories = ref([]);\n const currentCategory = ref(null);\n const categoryFilters = ref([]);\n // const selectedFilters = ref({});\n\n const availableFilters = ref([\n {\n title: 'Price',\n value: 'price',\n type: 'range',\n minPlaceholder: 'From',\n maxPlaceholder: 'To'\n },\n {\n title: 'Availability',\n value: 'availability',\n type: 'date'\n }\n ])\n\n const selectedFilters = ref({\n price: { min: '', max: '' },\n availability: null\n })\n\n const showDatePickerPopup = ref(false);\n const tempSelectedDates = ref(null);\n\n // Computed property for processed filters\n const processedFilters = computed(() => {\n const filters = [];\n \n // Обрабатываем фильтры категорий\n Object.entries(selectedFilters.value).forEach(([key, value]) => {\n if (key === 'price' || key === 'availability') return; // эти обрабатываются отдельно\n \n if (Array.isArray(value) && value.length > 0) {\n filters.push({\n parameter: key,\n values: value,\n caseSensitive: false\n });\n } else if (value && typeof value === 'string' && value.trim() !== '') {\n filters.push({\n parameter: key,\n values: [value],\n caseSensitive: false\n });\n }\n });\n \n return filters.length > 0 ? JSON.stringify(filters) : '';\n });\n\n\n\n\n const processedLookups = computed(() => {\n const lookups = ['variants'];\n if (selectedFilters.value.availability) {\n lookups.push('rents');\n }\n return lookups;\n });\n\n const loadCategoryData = async () => {\n const categoryPath = route.params.categoryPath;\n \n // Очищаем фильтры категории из предыдущей загрузки\n availableFilters.value = availableFilters.value.filter(f => f.value === 'price' || f.value === 'availability');\n \n try {\n if (categoryPath) {\n // Загружаем категорию и её прямых детей\n const result = await categories.actions.read({ \n url: `/${categoryPath}`,\n depth: 1,\n tree: false\n });\n \n if (result.length > 0) {\n currentCategory.value = result[0];\n currentCategories.value = result[0].children || [];\n categoryFilters.value = result[0].filters || [];\n \n // Добавляем фильтры категории в availableFilters\n (result[0].filters || []).forEach(filter => {\n availableFilters.value.push({\n title: filter.name,\n value: filter.name,\n type: 'checkbox',\n options: (filter.options || []).map(option => ({\n label: typeof option === 'string' ? option : option.text,\n value: typeof option === 'string' ? option : option.text\n }))\n });\n // Инициализируем массив для фильтра\n if (!selectedFilters.value[filter.name]) {\n selectedFilters.value[filter.name] = [];\n }\n });\n }\n } else {\n // Загружаем только корневые категории\n const result = await categories.actions.read({ \n root: true,\n tree: false\n });\n \n currentCategories.value = result;\n categoryFilters.value = [];\n }\n } catch (error) {\n console.error('Error loading categories:', error);\n currentCategories.value = [];\n categoryFilters.value = [];\n }\n };\n\n // Функция для выбора категории\n const selectCategory = (category) => {\n const categoryPath = category.url ? category.url.substring(1) : '';\n \n if (!categoryPath) {\n console.warn('No URL found for category:', category);\n return;\n }\n \n // Переходим к странице категории используя wildcard роут\n if (route.params._id) {\n router.push(`/organizations/${route.params._id}/products/categories/${categoryPath}`);\n } else {\n router.push(`/products/categories/${categoryPath}`);\n }\n };\n\n\n // Функция применения фильтра дат\n const applyDateFilter = () => {\n selectedFilters.value.availability = tempSelectedDates.value;\n showDatePickerPopup.value = false;\n };\n \n // Функция очистки всех фильтров\n const clearAllFilters = () => {\n selectedFilters.value.price = { min: '', max: '' };\n selectedFilters.value.availability = null;\n \n // Очищаем фильтры категорий\n categoryFilters.value.forEach(filter => {\n selectedFilters.value[filter.name] = [];\n });\n };\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: 'Organization_ProductAdd', params: { _id: route.params._id} }) : router.push({ name: 'ProductAdd' })\n }],\n\n onMounted(async () => {\n await loadCategoryData();\n })\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","useGlobalMixins","ref","computed","categories.actions","globals.state","IconPlus","auth.state","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkSE,UAAM,QAAQA,UAAAA,SAAQ;AACtB,UAAM,SAASC,UAAAA,UAAS;AACxB,UAAM,EAAE,iBAAiB,WAAU,IAAKC,OAAAA,gBAAe;AAGvD,UAAM,oBAAoBC,IAAAA,IAAI,EAAE;AAChC,UAAM,kBAAkBA,IAAAA,IAAI,IAAI;AAChC,UAAM,kBAAkBA,IAAAA,IAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Products.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Products.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <header \n v-if=\"route.name !== 'Organization' && !MOBILE_APP\"\n class=\"pd-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">{{ currentCategory ? currentCategory.name : 'All Products' }}</h2>\n <button \n v-if=\"hasAccess(route.params._id, 'products', 'create', auth.state.accesses, auth.state.access.roles)\"\n @click=\"$router.push({\n name: route.params?._id ? 'Organization_ProductAdd' : 'ProductAdd'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <div class=\"cols-2-1_3 br-1px br-solid br-light z-index-3 pos-relative\">\n\n <div class=\"o-y-scroll br-r br-solid br-light pd-medium z-index-2 desktop-only h-100 pos-relative\">\n <div class=\"w-100 o-y-scroll h-100\">\n <!-- Категории -->\n <div class=\"mn-b-medium\" v-if=\"currentCategories.length > 0\">\n <h4 class=\"mn-b-medium\">\n {{ route.params.categoryPath ? 'Subcategories' : 'Categories' }}\n </h4>\n <div class=\"gap-micro\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\"cursor-pointer hover-t-underline mn-b-regular transition-all\"\n >\n {{ category.name }}\n <br>\n <span v-for=\"subcategory in category.children\">{{subcategory.name}}</span>\n </div>\n </div>\n </div>\n\n <!-- Фильтры категории -->\n <Spoiler \n v-for=\"filter in categoryFilters\"\n :key=\"filter.name\"\n class=\"o-hidden mn-b-medium\"\n :status=\"true\"\n >\n <template #header=\"{ isOpen }\">\n <div class=\"cursor-pointer w-100 flex-v-center flex-nowrap flex\">\n <h4 class=\"w-100\">{{ filter.name }}</h4>\n <div class=\"h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra\">\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" fill=\"rgb(var(--black))\" class=\"i-regular\"/>\n </div>\n </div>\n </template>\n\n <template #content>\n <div class=\"mn-t-small\">\n <Checkbox \n v-for=\"option in filter.options\"\n :key=\"option.text || option\"\n v-model:radio=\"selectedFilters[filter.name]\"\n :label=\"option.text || option\"\n :value=\"option.text || option\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n </template>\n </Spoiler>\n \n <!-- Цена за сутки -->\n <Spoiler \n class=\"o-hidden mn-b-medium\"\n :status=\"true\"\n >\n <template #header=\"{ isOpen }\">\n <div class=\"cursor-pointer w-100 flex-v-center flex-nowrap flex\">\n <h4 class=\"w-100\"> Price</h4>\n <div class=\"h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra\">\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" fill=\"rgb(var(--black))\" class=\"i-regular\"/>\n </div>\n </div>\n </template>\n\n <template #content>\n <div class=\"mn-t-small flex gap-thin\">\n <Field\n v-model:field=\"selectedFilters.price.min\"\n placeholder=\"From\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"selectedFilters.price.max\"\n placeholder=\"To\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\n </template>\n </Spoiler>\n\n <!-- Доступность -->\n <Spoiler \n class=\"o-hidden mn-b-medium\"\n :status=\"true\"\n >\n <template #header=\"{ isOpen }\">\n <div class=\"cursor-pointer w-100 flex-v-center flex-nowrap flex\">\n <h4 class=\"w-100\">Availability</h4>\n <div class=\"h-2r w-2r flex-child-auto aspect-1x1 flex-center flex bg-light radius-extra\">\n <IconChevronBottom :class=\"{ 'rotate-180 mn-t-micro-negative': isOpen }\" fill=\"rgb(var(--black))\" class=\"i-regular\"/>\n </div>\n </div>\n </template>\n\n <template #content>\n <div class=\"mn-t-small\">\n <div \n @click=\"() => { tempSelectedDates = selectedFilters.availability; showDatePickerPopup = true; }\"\n :class=\"{ 'bg-light': selectedFilters?.availability }\"\n class=\"pd-small field-wrapper radius-small bg-light cursor-pointer hover-bg-light transition-all flex-v-center flex gap-thin\"\n >\n <IconCalendar class=\"i-regular\" />\n <span class=\"h-1r\">{{ selectedFilters.availability ? `${formatDate(selectedFilters.availability.start, { dayMonth: true, language: 'en' })} - ${formatDate(selectedFilters.availability.end, { dayMonth: true, language: 'en' })}` : 'Select dates'}}</span>\n </div>\n </div>\n </template>\n </Spoiler>\n\n <!-- Кнопка очистки фильтров -->\n <button \n @click=\"clearAllFilters\"\n class=\"bg-main w-100 button mn-t-medium\"\n >\n Clear Filters\n </button>\n </div>\n </div>\n\n <div class=\"w-100 rows-1 pd-thin pos-relative o-hidden\">\n \n <slot></slot>\n\n <div class=\"mn-b-thin mobile-only w-100 o-y-scroll scroll-hide scroll-snap-type-x-mandatory scroll-pd-regular\">\n <div class=\"gap-thin flex-nowrap flex\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\" flex-child-default bg-light flex t-nowrap pd-medium radius-medium cursor-pointer hover-bg-light transition-all\"\n >\n {{ category.name }}\n </div>\n </div>\n </div>\n\n <Feed\n :search=\"true\"\n v-model:sort=\"products.state.sort\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: products.state\n }\"\n :options=\"{\n limit: 16,\n owner: route.name?.includes('Organization') ? route.params._id : null,\n search: route.query.search,\n lookup: ['variants','rents','inventory'],\n categories: route.params.categoryPath ? `/${route.params.categoryPath}` : null,\n filters: processedFilters,\n priceMin: selectedFilters.price?.min,\n priceMax: selectedFilters.price?.max,\n dateStart: selectedFilters.availability?.start,\n dateEnd: selectedFilters.availability?.end\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n \n >\n <div class=\"mn-b-thin mobile-only\">\n <Filters\n v-model:filters=\"availableFilters\"\n v-model:selected=\"selectedFilters\"\n class=\"\"\n />\n </div>\n <div class=\"cols-4 pos-relative w-100 rows-1 gap-thin\">\n <router-link \n v-for=\"product in items\" \n :to=\"route.params._id ? { name: 'Organization_Product', params: { _id: route.params._id, product: product._id } } : { name: 'Product', params: { product: product._id } }\"\n class=\"pos-relative h-100 w-100\"\n >\n <CardProduct\n :key=\"product._id\"\n :product=\"product\"\n :user=\"auth.state.access\"\n :organization=\"route.params._id\"\n :access=\"hasAccess(route.params._id, 'products', 'edit', auth.state.accesses, auth.state.access.roles)\"\n class=\"pos-relative h-100 w-100 bg-light\"\n />\n </router-link>\n </div>\n </Feed>\n\n </div>\n </div>\n \n <!-- Date Picker Popup -->\n <Popup\n :isPopupOpen=\"showDatePickerPopup\"\n @close-popup=\"showDatePickerPopup = false\"\n class=\"pd-medium bg-white radius-medium\"\n style=\"min-width: 350px;\"\n >\n <h3 class=\"mn-b-medium\">Select Date Range</h3>\n \n <Calendar\n v-model:date=\"tempSelectedDates\"\n :allowRange=\"true\"\n :disablePastDates=\"true\"\n class=\"mn-b-medium radius-small bg-light\"\n />\n \n <div class=\"flex gap-small\">\n <button \n @click=\"showDatePickerPopup = false\"\n class=\"bg-light button flex-child-full\"\n >\n Cancel\n </button>\n <button \n @click=\"applyDateFilter\"\n class=\"bg-main button w-100 flex-child-full\"\n >\n Apply\n </button>\n \n </div>\n </Popup>\n</div>\n\n</template>\n\n\n<script setup=\"props\">\n // Import libs\n import { ref, computed, watch, onMounted, onUnmounted } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Tab from '@martyrs/src/components/Tab/Tab.vue'\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import FilterProducts from '@martyrs/src/modules/products/components/sections/FilterProducts.vue'\n import BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\n import BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n import Filters from '@martyrs/src/modules/globals/views/components/sections/Filters.vue'\n import Spoiler from \"@martyrs/src/components/Spoiler/Spoiler.vue\"\n import Field from \"@martyrs/src/components/Field/Field.vue\"\n import Calendar from \"@martyrs/src/components/Calendar/Calendar.vue\"\n import Popup from \"@martyrs/src/components/Popup/Popup.vue\"\n import Checkbox from \"@martyrs/src/components/Checkbox/Checkbox.vue\"\n\n import CardProduct from '@martyrs/src/modules/products/components/blocks/CardProduct.vue'\n\n import IconPlus from '@martyrs/src/modules/icons/navigation/IconPlus.vue'\n import IconChevronBottom from '@martyrs/src/modules/icons/navigation/IconChevronBottom.vue'\n import IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'\n\n\n // Accessing router and store\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n import * as products from '@martyrs/src/modules/products/store/products.js';\n import * as categories from '@martyrs/src/modules/products/store/categories.js';\n import { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\n const route = useRoute()\n const router = useRouter()\n const { generateFilters, formatDate } = useGlobalMixins()\n\n // Категории и фильтры\n const currentCategories = ref([]);\n const currentCategory = ref(null);\n const categoryFilters = ref([]);\n // const selectedFilters = ref({});\n\n const availableFilters = ref([\n {\n title: 'Price',\n value: 'price',\n type: 'range',\n minPlaceholder: 'From',\n maxPlaceholder: 'To'\n },\n {\n title: 'Availability',\n value: 'availability',\n type: 'date'\n }\n ])\n\n const selectedFilters = ref({\n price: { min: '', max: '' },\n availability: null\n })\n\n const showDatePickerPopup = ref(false);\n const tempSelectedDates = ref(null);\n\n // Computed property for processed filters\n const processedFilters = computed(() => {\n const filters = [];\n \n // Обрабатываем фильтры категорий\n Object.entries(selectedFilters.value).forEach(([key, value]) => {\n if (key === 'price' || key === 'availability') return; // эти обрабатываются отдельно\n \n if (Array.isArray(value) && value.length > 0) {\n filters.push({\n parameter: key,\n values: value,\n caseSensitive: false\n });\n } else if (value && typeof value === 'string' && value.trim() !== '') {\n filters.push({\n parameter: key,\n values: [value],\n caseSensitive: false\n });\n }\n });\n \n return filters.length > 0 ? JSON.stringify(filters) : '';\n });\n\n\n\n\n const processedLookups = computed(() => {\n const lookups = ['variants'];\n if (selectedFilters.value.availability) {\n lookups.push('rents');\n }\n return lookups;\n });\n\n const loadCategoryData = async () => {\n const categoryPath = route.params.categoryPath;\n \n // Очищаем фильтры категории из предыдущей загрузки\n availableFilters.value = availableFilters.value.filter(f => f.value === 'price' || f.value === 'availability');\n \n try {\n if (categoryPath) {\n // Загружаем категорию и её прямых детей\n const result = await categories.actions.read({ \n url: `/${categoryPath}`,\n depth: 1,\n tree: false\n });\n \n if (result.length > 0) {\n currentCategory.value = result[0];\n currentCategories.value = result[0].children || [];\n categoryFilters.value = result[0].filters || [];\n \n // Добавляем фильтры категории в availableFilters\n (result[0].filters || []).forEach(filter => {\n availableFilters.value.push({\n title: filter.name,\n value: filter.name,\n type: 'checkbox',\n options: (filter.options || []).map(option => ({\n label: typeof option === 'string' ? option : option.text,\n value: typeof option === 'string' ? option : option.text\n }))\n });\n // Инициализируем массив для фильтра\n if (!selectedFilters.value[filter.name]) {\n selectedFilters.value[filter.name] = [];\n }\n });\n }\n } else {\n // Загружаем только корневые категории\n const result = await categories.actions.read({ \n root: true,\n tree: false\n });\n \n currentCategories.value = result;\n categoryFilters.value = [];\n }\n } catch (error) {\n console.error('Error loading categories:', error);\n currentCategories.value = [];\n categoryFilters.value = [];\n }\n };\n\n // Функция для выбора категории\n const selectCategory = (category) => {\n const categoryPath = category.url ? category.url.substring(1) : '';\n \n if (!categoryPath) {\n console.warn('No URL found for category:', category);\n return;\n }\n \n // Переходим к странице категории используя wildcard роут\n if (route.params._id) {\n router.push(`/organizations/${route.params._id}/products/categories/${categoryPath}`);\n } else {\n router.push(`/products/categories/${categoryPath}`);\n }\n };\n\n\n // Функция применения фильтра дат\n const applyDateFilter = () => {\n selectedFilters.value.availability = tempSelectedDates.value;\n showDatePickerPopup.value = false;\n };\n \n // Функция очистки всех фильтров\n const clearAllFilters = () => {\n selectedFilters.value.price = { min: '', max: '' };\n selectedFilters.value.availability = null;\n \n // Очищаем фильтры категорий\n categoryFilters.value.forEach(filter => {\n selectedFilters.value[filter.name] = [];\n });\n };\n\n if (route.params?._id) {\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: 'Organization_ProductAdd', params: { _id: route.params._id} }) : router.push({ name: 'ProductAdd' })\n }];\n }\n\n onMounted(async () => {\n await loadCategoryData();\n });\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","useGlobalMixins","ref","computed","categories.actions","globals.state","IconPlus","auth.state","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkSE,UAAM,QAAQA,UAAAA,SAAQ;AACtB,UAAM,SAASC,UAAAA,UAAS;AACxB,UAAM,EAAE,iBAAiB,WAAU,IAAKC,OAAAA,gBAAe;AAGvD,UAAM,oBAAoBC,IAAAA,IAAI,EAAE;AAChC,UAAM,kBAAkBA,IAAAA,IAAI,IAAI;AAChC,UAAM,kBAAkBA,IAAAA,IAAI,EAAE;AAG9B,UAAM,mBAAmBA,IAAAA,IAAI;AAAA,MAC3B;AAAA,QACE,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,QAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -176,14 +176,17 @@ const _sfc_main = {
176
176
  selectedFilters.value[filter.name] = [];
177
177
  });
178
178
  };
179
- state$1.navigation_bar.actions = [{
180
- component: _sfc_main$1,
181
- props: {
182
- fill: "rgb(var(--main))"
183
- },
184
- condition: () => state.user && state.user._id,
185
- action: () => route.params._id ? router.push({ name: "Organization_ProductAdd", params: { _id: route.params._id } }) : router.push({ name: "ProductAdd" })
186
- }], onMounted(async () => {
179
+ if (route.params?._id) {
180
+ state$1.navigation_bar.actions = [{
181
+ component: _sfc_main$1,
182
+ props: {
183
+ fill: "rgb(var(--main))"
184
+ },
185
+ condition: () => state.user && state.user._id,
186
+ action: () => route.params._id ? router.push({ name: "Organization_ProductAdd", params: { _id: route.params._id } }) : router.push({ name: "ProductAdd" })
187
+ }];
188
+ }
189
+ onMounted(async () => {
187
190
  await loadCategoryData();
188
191
  });
189
192
  onUnmounted(() => {