@ozdao/martyrs 0.2.518 → 0.2.520
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.cjs +4 -4
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.cjs +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/{abac-Cf_9lCSh.js → abac-CnJsrv8S.js} +3 -3
- package/dist/{abac-6LjoG9u-.cjs → abac-DOyUjhee.cjs} +3 -3
- package/dist/builder.cjs +27 -25
- package/dist/builder.js +27 -25
- package/dist/chats.server.cjs +198 -1
- package/dist/chats.server.js +198 -1
- package/dist/{crud-sE7GLPbj.js → crud-BIFl1W1i.js} +6 -6
- package/dist/{crud-JN_LFj01.cjs → crud-CC6k6yY5.cjs} +6 -6
- package/dist/{globals.logger-CZMgIMlM.cjs → globals.logger-BuW7JHMY.cjs} +63 -53
- package/dist/{globals.logger-Bf6rRU7j.js → globals.logger-VRHh-WUW.js} +63 -53
- package/dist/{globals.observer-CV2wCzzh.cjs → globals.observer-C_FYclgV.cjs} +36 -1
- package/dist/{globals.observer-CDqUjVU5.js → globals.observer-MZsqaE6F.js} +36 -1
- package/dist/globals.server.cjs +1 -1
- package/dist/globals.server.js +1 -1
- package/dist/inventory.server.cjs +276 -376
- package/dist/inventory.server.js +276 -376
- package/dist/main-BM3GslOO.cjs +11 -0
- package/dist/{main-wmEhGVvD.js → main-Qcn7YlTx.js} +1834 -1830
- package/dist/martyrs/src/components/Address/{Address.vue2.cjs → Address.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Address/{Address.vue2.js.map → Address.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Address/{Address.vue2.js → Address.vue.js} +2 -2
- package/dist/martyrs/src/components/Address/Address.vue.js.map +1 -0
- package/dist/martyrs/src/components/Button/Button.vue.cjs +1 -1
- package/dist/martyrs/src/components/Button/Button.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Button/Button.vue.js +1 -1
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -1
- package/dist/martyrs/src/components/Chips/{Chips.vue.cjs → Chips.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue.js → Chips.vue2.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +2 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs +1 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.js +1 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +1 -1
- package/dist/martyrs/src/components/LocationMarker/{LocationMarker.vue2.cjs → LocationMarker.vue.cjs} +2 -2
- package/dist/martyrs/src/components/LocationMarker/{LocationMarker.vue2.js.map → LocationMarker.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/LocationMarker/{LocationMarker.vue2.js → LocationMarker.vue.js} +2 -2
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js.map +1 -0
- package/dist/martyrs/src/components/Select/{Select.vue2.cjs → Select.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Select/{Select.vue2.js.map → Select.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/blocks/CardUser.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/blocks/CardUser.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +4 -4
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +41 -51
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +59 -69
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs +11 -13
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +11 -13
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs +10 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +10 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.cjs +6 -0
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +6 -0
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.cjs +27 -11
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js +28 -12
- package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs +62 -0
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js +63 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs +60 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.js +60 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +3 -3
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +3 -3
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs +50 -368
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js +53 -371
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +2 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js.map +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs +16 -3
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js +17 -4
- package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs +7 -0
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.js +7 -0
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.js.map +1 -1
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +67 -43
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +68 -44
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.cjs +22 -7
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +23 -8
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.cjs +47 -32
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +48 -33
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +47 -26
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +48 -27
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +42 -52
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +43 -53
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +18 -18
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/store/{ inventory.store.cjs → inventory.store.cjs} +46 -2
- package/dist/martyrs/src/modules/inventory/store/inventory.store.cjs.map +1 -0
- package/dist/martyrs/src/modules/inventory/store/{ inventory.store.js → inventory.store.js} +46 -2
- package/dist/martyrs/src/modules/inventory/store/inventory.store.js.map +1 -0
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +180 -19
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +181 -20
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
- package/dist/martyrs/src/modules/music/router/music.cjs +1 -2
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.js +1 -2
- package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -4
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +3 -4
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.cjs +2 -2
- package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +2 -2
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/router/customers.router.cjs +1 -1
- package/dist/martyrs/src/modules/orders/router/customers.router.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/router/customers.router.js +1 -1
- package/dist/martyrs/src/modules/orders/router/customers.router.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +2 -24
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +5 -27
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.cjs +4 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +4 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +3 -3
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.cjs +195 -0
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +195 -0
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.cjs +402 -0
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +402 -0
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.cjs +86 -0
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +86 -0
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js.map +1 -0
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +10 -10
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +11 -11
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +279 -191
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +285 -197
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +7 -7
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +7 -7
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +42 -41
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +53 -52
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/organizations.client.cjs +23 -16
- package/dist/martyrs/src/modules/organizations/organizations.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/organizations.client.js +35 -28
- package/dist/martyrs/src/modules/organizations/organizations.client.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/departments.router.cjs +0 -18
- package/dist/martyrs/src/modules/organizations/router/departments.router.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/departments.router.js +0 -18
- package/dist/martyrs/src/modules/organizations/router/departments.router.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/store/departments.store.cjs +6 -0
- package/dist/martyrs/src/modules/organizations/store/departments.store.cjs.map +1 -0
- package/dist/martyrs/src/modules/organizations/store/departments.store.js +6 -0
- package/dist/martyrs/src/modules/organizations/store/departments.store.js.map +1 -0
- package/dist/martyrs/src/modules/organizations/store/invites.store.cjs +6 -0
- package/dist/martyrs/src/modules/organizations/store/invites.store.cjs.map +1 -0
- package/dist/martyrs/src/modules/organizations/store/invites.store.js +6 -0
- package/dist/martyrs/src/modules/organizations/store/invites.store.js.map +1 -0
- package/dist/martyrs/src/modules/organizations/store/memberships.store.cjs +20 -0
- package/dist/martyrs/src/modules/organizations/store/memberships.store.cjs.map +1 -0
- package/dist/martyrs/src/modules/organizations/store/memberships.store.js +20 -0
- package/dist/martyrs/src/modules/organizations/store/memberships.store.js.map +1 -0
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -4
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -4
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +3 -3
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +60 -272
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +62 -274
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +4 -4
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.cjs +9 -9
- package/dist/music.server.js +9 -9
- package/dist/notifications.server.cjs +0 -24
- package/dist/notifications.server.js +0 -24
- package/dist/orders.server.cjs +3 -6
- package/dist/orders.server.js +3 -6
- package/dist/organizations.server.cjs +119 -43
- package/dist/organizations.server.js +119 -43
- package/dist/products.server.cjs +5 -5
- package/dist/products.server.js +5 -5
- package/dist/rents.server.cjs +3 -3
- package/dist/rents.server.js +3 -3
- package/dist/style.css +16 -17
- package/dist/wallet.server.cjs +2 -2
- package/dist/wallet.server.js +2 -2
- package/dist/{web-B5wZTKbK.cjs → web-B0cfxzgu.cjs} +1 -1
- package/dist/{web-520xCgXy.js → web-DVR8m2fm.js} +1 -1
- package/package.json +1 -1
- package/src/builder/modes/ssr.rspack.dev.js +20 -12
- package/src/builder/rspack/rspack.config.base.js +16 -15
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Feed/Feed.old.vue +0 -1
- package/src/components/Feed/Feed.vue +1 -31
- package/src/components/Loader/Loader.vue +1 -1
- package/src/modules/auth/FIXES.md +61 -0
- package/src/modules/auth/PROMT.md +33 -0
- package/src/modules/auth/auth.server.js +1 -0
- package/src/modules/auth/views/components/blocks/CardUser.vue +2 -2
- package/src/modules/auth/views/components/layouts/Auth.vue +1 -1
- package/src/modules/auth/views/components/pages/Invite.vue +2 -2
- package/src/modules/auth/views/components/pages/Profile.vue +33 -48
- package/src/modules/auth/views/components/sections/SliderFeatures.vue +5 -7
- package/src/modules/auth/views/store/auth.js +16 -1
- package/src/modules/auth//320/220/320/240/320/245/320/230/320/242/320/225/320/232/320/242/320/243/320/240/320/220.md +445 -0
- package/src/modules/backoffice/components/partials/Sidebar.vue +6 -0
- package/src/modules/chats/CLAUDE.md +137 -0
- package/src/modules/chats/components/blocks/ChatMessage.vue +12 -0
- package/src/modules/chats/components/sections/ChatWindow.vue +84 -2
- package/src/modules/chats/controllers/chats.controller.js +187 -0
- package/src/modules/chats/models/chat.model.js +21 -0
- package/src/modules/chats/routes/chats.routes.js +46 -0
- package/src/modules/chats/store/chat.store.js +67 -0
- package/src/modules/community/components/layouts/Community.vue +2 -2
- package/src/modules/community/components/pages/Posts.vue +3 -328
- package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
- package/src/modules/events/components/pages/Events.vue +2 -2
- package/src/modules/globals/controllers/classes/globals.cache.js +64 -55
- package/src/modules/globals/controllers/classes/globals.logger.js +40 -4
- package/src/modules/globals/controllers/classes/globals.observer.js +54 -4
- package/src/modules/globals/views/components/partials/Header.vue +1 -1
- package/src/modules/globals/views/components/partials/Sidebar.vue +17 -13
- package/src/modules/globals/views/mixins/mixins.js +7 -0
- package/src/modules/inventory/CLAUDE.md +330 -0
- package/src/modules/inventory/PROMT.md +25 -0
- package/src/modules/inventory/components/forms/AdjustmentForm.vue +53 -36
- package/src/modules/inventory/components/forms/ColumnSettingsMenu.vue +11 -6
- package/src/modules/inventory/components/forms/HistoryView.vue +21 -9
- package/src/modules/inventory/components/forms/StockAlertsForm.vue +33 -22
- package/src/modules/inventory/components/pages/Inventory.vue +40 -40
- package/src/modules/inventory/components/pages/InventoryEdit.vue +1 -1
- package/src/modules/inventory/docs/01-intro.md +126 -0
- package/src/modules/inventory/docs/02-architecture.md +266 -0
- package/src/modules/inventory/docs/03-components-and-relationships.md +338 -0
- package/src/modules/inventory/docs/04-business-logic-and-algorithms.md +376 -0
- package/src/modules/inventory/docs/05-api-specification.md +356 -0
- package/src/modules/inventory/docs/06-access-control.md +320 -0
- package/src/modules/inventory/inventory.server.js +6 -2
- package/src/modules/inventory/{services → middlewares}/inventory.verifier.js +5 -16
- package/src/modules/inventory/models/stock.availability.model.js +20 -7
- package/src/modules/inventory/routes/inventory.routes.js +14 -17
- package/src/modules/inventory/services/adjustment.service.js +137 -0
- package/src/modules/inventory/services/audit.service.js +160 -0
- package/src/modules/inventory/services/availability.service.js +323 -0
- package/src/modules/inventory/services/inventory.helpers.old.js +217 -0
- package/src/modules/inventory/store/{ inventory.store.js → inventory.store.js} +0 -14
- package/src/modules/inventory/workers/inventory.availability.worker.js +29 -30
- package/src/modules/marketplace/views/components/layouts/Marketplace.vue +160 -8
- package/src/modules/notifications/controllers/notifications.controller.js +0 -6
- package/src/modules/notifications/services/notification.service.js +1 -17
- package/src/modules/notifications/services/web-push.service.js +0 -2
- package/src/modules/orders/components/blocks/CardOrderBackoffice.vue +2 -2
- package/src/modules/orders/components/blocks/CardOrderVar1.vue +1 -1
- package/src/modules/orders/controllers/orders.controller.js +2 -4
- package/src/modules/orders/orders.client.js +2 -2
- package/src/modules/orders/router/customers.router.js +1 -1
- package/src/modules/organizations/CLAUDE.md +259 -0
- package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -22
- package/src/modules/organizations/components/blocks/Socials.vue +1 -1
- package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +3 -3
- package/src/modules/organizations/components/forms/AddExistingMembersForm.vue +191 -0
- package/src/modules/organizations/components/forms/DepartmentForm.vue +390 -0
- package/src/modules/organizations/components/forms/InviteForm.vue +81 -0
- package/src/modules/organizations/components/pages/Department.vue +10 -10
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +8 -8
- package/src/modules/organizations/components/pages/Members.vue +265 -171
- package/src/modules/organizations/components/pages/Organization.new.vue +172 -183
- package/src/modules/organizations/components/pages/Organization.vue +6 -6
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +1 -1
- package/src/modules/organizations/components/sections/Organizations.vue +2 -2
- package/src/modules/organizations/components/sections/Publics.vue +4 -4
- package/src/modules/organizations/configs/navigation.organization.config.js +40 -39
- package/src/modules/organizations/controllers/departments.controller.js +53 -34
- package/src/modules/organizations/controllers/invites.controller.js +44 -5
- package/src/modules/organizations/controllers/memberships.controller.js +43 -4
- package/src/modules/organizations/organizations.client.js +24 -15
- package/src/modules/organizations/router/departments.router.js +0 -18
- package/src/modules/organizations/routes/departments.routes.js +6 -8
- package/src/modules/organizations/routes/invites.routes.js +6 -4
- package/src/modules/organizations/routes/memberships.routes.js +6 -5
- package/src/modules/organizations/routes/organizations.routes.js +1 -1
- package/src/modules/organizations/store/departments.store.js +5 -0
- package/src/modules/organizations/store/invites.store.js +5 -0
- package/src/modules/organizations/store/memberships.store.js +23 -0
- package/src/modules/products/components/pages/Products.vue +0 -1
- package/src/modules/spots/components/blocks/CardSpot.vue +1 -1
- package/src/modules/spots/components/pages/Spots.vue +3 -203
- package/src/styles/base/all.scss +0 -15
- package/src/styles/responsive.scss +1 -31
- package/src/styles/typography.scss +20 -5
- package/dist/main-CSzPfQYR.cjs +0 -11
- package/dist/martyrs/src/components/Address/Address.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +0 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +0 -76
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js +0 -76
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js.map +0 -1
- package/dist/martyrs/src/modules/inventory/store/ inventory.store.cjs.map +0 -1
- package/dist/martyrs/src/modules/inventory/store/ inventory.store.js.map +0 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +0 -280
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +0 -280
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +0 -1
- package/dist/martyrs/src/modules/organizations/store/departments.cjs +0 -121
- package/dist/martyrs/src/modules/organizations/store/departments.cjs.map +0 -1
- package/dist/martyrs/src/modules/organizations/store/departments.js +0 -121
- package/dist/martyrs/src/modules/organizations/store/departments.js.map +0 -1
- package/dist/martyrs/src/modules/organizations/store/invites.cjs +0 -64
- package/dist/martyrs/src/modules/organizations/store/invites.cjs.map +0 -1
- package/dist/martyrs/src/modules/organizations/store/invites.js +0 -64
- package/dist/martyrs/src/modules/organizations/store/invites.js.map +0 -1
- package/dist/martyrs/src/modules/organizations/store/memberships.cjs +0 -87
- package/dist/martyrs/src/modules/organizations/store/memberships.cjs.map +0 -1
- package/dist/martyrs/src/modules/organizations/store/memberships.js +0 -87
- package/dist/martyrs/src/modules/organizations/store/memberships.js.map +0 -1
- package/src/modules/globals/controllers/classes/globals.websocket.ws.js +0 -102
- package/src/modules/globals/views/components/blocks/BlockFilter.vue +0 -60
- package/src/modules/inventory/docs/README.md +0 -291
- package/src/modules/inventory/models/stock.balance.model.js +0 -43
- package/src/modules/inventory/services/inventory.crud.js +0 -710
- package/src/modules/inventory/tests/inventory.test.js +0 -281
- package/src/modules/organizations/store/departments.js +0 -137
- package/src/modules/organizations/store/invites.js +0 -76
- package/src/modules/organizations/store/memberships.js +0 -110
package/dist/martyrs.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, L as h, p as b, M as k, q as x, H as B, r as T, s as U, t as f, u as w, S as D, v as E, w as I, x as L, y as P, z as q, A as y, B as A, D as j, U as v, E as z, G, m as H } from "./main-
|
|
1
|
+
import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, L as h, p as b, M as k, q as x, H as B, r as T, s as U, t as f, u as w, S as D, v as E, w as I, x as L, y as P, z as q, A as y, B as A, D as j, U as v, E as z, G, m as H } from "./main-Qcn7YlTx.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Address,
|
|
4
4
|
o as Breadcrumbs,
|
package/dist/music.server.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const globals_abac = require("./globals.abac-CPXLas7N.cjs");
|
|
4
|
-
const globals_logger = require("./globals.logger-
|
|
4
|
+
const globals_logger = require("./globals.logger-BuW7JHMY.cjs");
|
|
5
5
|
require("cookie");
|
|
6
6
|
require("jsonwebtoken");
|
|
7
7
|
require("uWebSockets.js");
|
|
8
|
-
const crud = require("./crud-
|
|
9
|
-
const abac = require("./abac-
|
|
8
|
+
const crud = require("./crud-CC6k6yY5.cjs");
|
|
9
|
+
const abac = require("./abac-DOyUjhee.cjs");
|
|
10
10
|
const globals_verifier = require("./globals.verifier-C0zj_LLo.cjs");
|
|
11
11
|
const fs$1 = require("fs");
|
|
12
12
|
const path$1 = require("path");
|
|
@@ -1380,8 +1380,8 @@ function setupGenresRoutes(app, db) {
|
|
|
1380
1380
|
return genresCRUD;
|
|
1381
1381
|
}
|
|
1382
1382
|
const SearchController = function(app, db) {
|
|
1383
|
-
const logger = new globals_logger.
|
|
1384
|
-
const cache = new globals_logger.
|
|
1383
|
+
const logger = new globals_logger.LoggerNamespaced(db);
|
|
1384
|
+
const cache = new globals_logger.CacheNamespaced();
|
|
1385
1385
|
async function search(req, res) {
|
|
1386
1386
|
try {
|
|
1387
1387
|
const { query, type, limit = 10 } = req.query;
|
|
@@ -1441,7 +1441,7 @@ const SearchController = function(app, db) {
|
|
|
1441
1441
|
};
|
|
1442
1442
|
const StreamController = function(app, db, publicPath) {
|
|
1443
1443
|
const { getInstance: getInstance2 } = globals_abac.globalsabac;
|
|
1444
|
-
const logger = new globals_logger.
|
|
1444
|
+
const logger = new globals_logger.LoggerNamespaced(db);
|
|
1445
1445
|
const abac2 = getInstance2(db);
|
|
1446
1446
|
async function streamAudio(req, res) {
|
|
1447
1447
|
try {
|
|
@@ -1938,7 +1938,7 @@ const streamRoutes = function(app, db, origins, publicPath) {
|
|
|
1938
1938
|
});
|
|
1939
1939
|
};
|
|
1940
1940
|
const StreamingHandler = function(db) {
|
|
1941
|
-
const logger = new globals_logger.
|
|
1941
|
+
const logger = new globals_logger.LoggerNamespaced(db);
|
|
1942
1942
|
return {
|
|
1943
1943
|
// Handle WebSocket messages for music streaming
|
|
1944
1944
|
handleStreamingMessage: async (ws, message) => {
|
|
@@ -2076,8 +2076,8 @@ function initializeMusic({ app, db, wss, origins, publicPath }) {
|
|
|
2076
2076
|
} else {
|
|
2077
2077
|
console.log("Music Server: WebSocket server (wss) not provided, streaming handler not registered");
|
|
2078
2078
|
}
|
|
2079
|
-
new globals_logger.
|
|
2080
|
-
const musicLogger = new globals_logger.
|
|
2079
|
+
new globals_logger.CacheNamespaced({ ttlSeconds: 60 * 15 });
|
|
2080
|
+
const musicLogger = new globals_logger.LoggerNamespaced(db);
|
|
2081
2081
|
musicLogger.info("Music module initialized");
|
|
2082
2082
|
}
|
|
2083
2083
|
const models = {
|
package/dist/music.server.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { g as globalsabac } from "./globals.abac-DNdtSYop.js";
|
|
2
|
-
import { L as
|
|
2
|
+
import { L as LoggerNamespaced, C as CacheNamespaced } from "./globals.logger-VRHh-WUW.js";
|
|
3
3
|
import "cookie";
|
|
4
4
|
import "jsonwebtoken";
|
|
5
5
|
import "uWebSockets.js";
|
|
6
|
-
import { C as CRUD } from "./crud-
|
|
7
|
-
import { A as ABAC } from "./abac-
|
|
6
|
+
import { C as CRUD } from "./crud-BIFl1W1i.js";
|
|
7
|
+
import { A as ABAC } from "./abac-CnJsrv8S.js";
|
|
8
8
|
import { V as Verifier, a as Validator } from "./globals.verifier-DFqKQ7hK.js";
|
|
9
9
|
import fs$1 from "fs";
|
|
10
10
|
import path$1 from "path";
|
|
@@ -1378,8 +1378,8 @@ function setupGenresRoutes(app, db) {
|
|
|
1378
1378
|
return genresCRUD;
|
|
1379
1379
|
}
|
|
1380
1380
|
const SearchController = function(app, db) {
|
|
1381
|
-
const logger = new
|
|
1382
|
-
const cache = new
|
|
1381
|
+
const logger = new LoggerNamespaced(db);
|
|
1382
|
+
const cache = new CacheNamespaced();
|
|
1383
1383
|
async function search(req, res) {
|
|
1384
1384
|
try {
|
|
1385
1385
|
const { query, type, limit = 10 } = req.query;
|
|
@@ -1439,7 +1439,7 @@ const SearchController = function(app, db) {
|
|
|
1439
1439
|
};
|
|
1440
1440
|
const StreamController = function(app, db, publicPath) {
|
|
1441
1441
|
const { getInstance: getInstance2 } = globalsabac;
|
|
1442
|
-
const logger = new
|
|
1442
|
+
const logger = new LoggerNamespaced(db);
|
|
1443
1443
|
const abac = getInstance2(db);
|
|
1444
1444
|
async function streamAudio(req, res) {
|
|
1445
1445
|
try {
|
|
@@ -1936,7 +1936,7 @@ const streamRoutes = function(app, db, origins, publicPath) {
|
|
|
1936
1936
|
});
|
|
1937
1937
|
};
|
|
1938
1938
|
const StreamingHandler = function(db) {
|
|
1939
|
-
const logger = new
|
|
1939
|
+
const logger = new LoggerNamespaced(db);
|
|
1940
1940
|
return {
|
|
1941
1941
|
// Handle WebSocket messages for music streaming
|
|
1942
1942
|
handleStreamingMessage: async (ws, message) => {
|
|
@@ -2074,8 +2074,8 @@ function initializeMusic({ app, db, wss, origins, publicPath }) {
|
|
|
2074
2074
|
} else {
|
|
2075
2075
|
console.log("Music Server: WebSocket server (wss) not provided, streaming handler not registered");
|
|
2076
2076
|
}
|
|
2077
|
-
new
|
|
2078
|
-
const musicLogger = new
|
|
2077
|
+
new CacheNamespaced({ ttlSeconds: 60 * 15 });
|
|
2078
|
+
const musicLogger = new LoggerNamespaced(db);
|
|
2079
2079
|
musicLogger.info("Music module initialized");
|
|
2080
2080
|
}
|
|
2081
2081
|
const models = {
|
|
@@ -18,17 +18,12 @@ const NotificationsController = (db, wss, notificationService) => {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
const createBatch = async (req, res) => {
|
|
21
|
-
console.log("=== Batch notifications endpoint ===");
|
|
22
|
-
console.log("Request body:", JSON.stringify(req.body, null, 2));
|
|
23
21
|
try {
|
|
24
22
|
const { notifications } = req.body;
|
|
25
23
|
if (!notifications || !Array.isArray(notifications)) {
|
|
26
|
-
console.error("Invalid request: notifications array is required");
|
|
27
24
|
return res.status(400).json({ message: "notifications array is required" });
|
|
28
25
|
}
|
|
29
|
-
console.log("Creating notifications count:", notifications.length);
|
|
30
26
|
const createdNotifications = await db.notification.insertMany(notifications);
|
|
31
|
-
console.log("Created notifications:", createdNotifications.map((n) => n._id));
|
|
32
27
|
setImmediate(() => {
|
|
33
28
|
Promise.allSettled(createdNotifications.map(
|
|
34
29
|
(notif) => notificationService.processNotification(notif)
|
|
@@ -511,9 +506,7 @@ const WebPushService = {
|
|
|
511
506
|
badge: process.env.NOTIFICATION_BADGE_URL || "/favicon.ico",
|
|
512
507
|
data
|
|
513
508
|
});
|
|
514
|
-
console.log("payload is", payload);
|
|
515
509
|
const result = await webpush.sendNotification(subscription, payload);
|
|
516
|
-
console.log("web push is", result);
|
|
517
510
|
return { success: true, statusCode: result.statusCode };
|
|
518
511
|
} catch (error) {
|
|
519
512
|
console.error("Web Push service error:", error);
|
|
@@ -553,35 +546,23 @@ const NotificationService = function(db, wss) {
|
|
|
553
546
|
userId: new ObjectId(userId),
|
|
554
547
|
isActive: true
|
|
555
548
|
});
|
|
556
|
-
console.log("=== CHANNEL SELECTION DEBUG ===");
|
|
557
|
-
console.log("userDevices found:", userDevices.length);
|
|
558
|
-
console.log("userDevices:", userDevices);
|
|
559
|
-
console.log("user.email:", user.email);
|
|
560
|
-
console.log("user.phoneNumber:", user.phoneNumber);
|
|
561
|
-
console.log("preferences.length:", preferences.length);
|
|
562
549
|
let channels = ["web"];
|
|
563
550
|
if (userDevices.length > 0) {
|
|
564
551
|
channels.push("push");
|
|
565
|
-
console.log("Added push channel - devices found");
|
|
566
552
|
} else {
|
|
567
553
|
console.log("No push channel - no devices found");
|
|
568
554
|
}
|
|
569
555
|
if (user.email) {
|
|
570
556
|
channels.push("email");
|
|
571
|
-
console.log("Added email channel");
|
|
572
557
|
}
|
|
573
558
|
if (user.phoneNumber) {
|
|
574
559
|
channels.push("sms");
|
|
575
|
-
console.log("Added SMS channel");
|
|
576
560
|
}
|
|
577
561
|
if (preferences.length > 0) {
|
|
578
562
|
channels = preferences.filter((pref) => pref.isEnabled).map((pref) => pref.channelType);
|
|
579
|
-
console.log("Overridden with user preferences:", channels);
|
|
580
563
|
}
|
|
581
|
-
console.log("=== FINAL CHANNELS ===", channels);
|
|
582
564
|
const channelPromises = [];
|
|
583
565
|
for (const channel of channels) {
|
|
584
|
-
console.log(`=== PREPARING CHANNEL: ${channel} ===`);
|
|
585
566
|
const sendFunc = channelRouters[channel];
|
|
586
567
|
if (!sendFunc) {
|
|
587
568
|
channelPromises.push(Promise.resolve({
|
|
@@ -592,14 +573,11 @@ const NotificationService = function(db, wss) {
|
|
|
592
573
|
continue;
|
|
593
574
|
}
|
|
594
575
|
if (channel === "push") {
|
|
595
|
-
console.log(`Preparing push to ${userDevices.length} devices`);
|
|
596
576
|
for (const device of userDevices) {
|
|
597
577
|
channelPromises.push(
|
|
598
578
|
sendFunc(notification, user, device).then(() => {
|
|
599
|
-
console.log(`Push sent successfully to device ${device.deviceId}`);
|
|
600
579
|
return { channel: "push", deviceId: device.deviceId, success: true };
|
|
601
580
|
}).catch((err) => {
|
|
602
|
-
console.error(`Push failed for device ${device.deviceId}:`, err);
|
|
603
581
|
return { channel: "push", deviceId: device.deviceId, success: false, error: err.message };
|
|
604
582
|
})
|
|
605
583
|
);
|
|
@@ -616,7 +594,6 @@ const NotificationService = function(db, wss) {
|
|
|
616
594
|
);
|
|
617
595
|
}
|
|
618
596
|
}
|
|
619
|
-
console.log(`=== PROCESSING ${channelPromises.length} PARALLEL OPERATIONS ===`);
|
|
620
597
|
const results = await Promise.allSettled(channelPromises);
|
|
621
598
|
const logs = [];
|
|
622
599
|
const channelSuccessMap = /* @__PURE__ */ new Map();
|
|
@@ -659,7 +636,6 @@ const NotificationService = function(db, wss) {
|
|
|
659
636
|
}
|
|
660
637
|
};
|
|
661
638
|
const sendWebNotification = async (notification, user) => {
|
|
662
|
-
console.log(`[WebSocket][notification] sending to user ${user._id}`);
|
|
663
639
|
const result = await wss.sendToUserInModule("notification", user._id, {
|
|
664
640
|
type: "notification",
|
|
665
641
|
data: notification
|
|
@@ -16,17 +16,12 @@ const NotificationsController = (db, wss, notificationService) => {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
const createBatch = async (req, res) => {
|
|
19
|
-
console.log("=== Batch notifications endpoint ===");
|
|
20
|
-
console.log("Request body:", JSON.stringify(req.body, null, 2));
|
|
21
19
|
try {
|
|
22
20
|
const { notifications } = req.body;
|
|
23
21
|
if (!notifications || !Array.isArray(notifications)) {
|
|
24
|
-
console.error("Invalid request: notifications array is required");
|
|
25
22
|
return res.status(400).json({ message: "notifications array is required" });
|
|
26
23
|
}
|
|
27
|
-
console.log("Creating notifications count:", notifications.length);
|
|
28
24
|
const createdNotifications = await db.notification.insertMany(notifications);
|
|
29
|
-
console.log("Created notifications:", createdNotifications.map((n) => n._id));
|
|
30
25
|
setImmediate(() => {
|
|
31
26
|
Promise.allSettled(createdNotifications.map(
|
|
32
27
|
(notif) => notificationService.processNotification(notif)
|
|
@@ -509,9 +504,7 @@ const WebPushService = {
|
|
|
509
504
|
badge: process.env.NOTIFICATION_BADGE_URL || "/favicon.ico",
|
|
510
505
|
data
|
|
511
506
|
});
|
|
512
|
-
console.log("payload is", payload);
|
|
513
507
|
const result = await webpush.sendNotification(subscription, payload);
|
|
514
|
-
console.log("web push is", result);
|
|
515
508
|
return { success: true, statusCode: result.statusCode };
|
|
516
509
|
} catch (error) {
|
|
517
510
|
console.error("Web Push service error:", error);
|
|
@@ -551,35 +544,23 @@ const NotificationService = function(db, wss) {
|
|
|
551
544
|
userId: new ObjectId(userId),
|
|
552
545
|
isActive: true
|
|
553
546
|
});
|
|
554
|
-
console.log("=== CHANNEL SELECTION DEBUG ===");
|
|
555
|
-
console.log("userDevices found:", userDevices.length);
|
|
556
|
-
console.log("userDevices:", userDevices);
|
|
557
|
-
console.log("user.email:", user.email);
|
|
558
|
-
console.log("user.phoneNumber:", user.phoneNumber);
|
|
559
|
-
console.log("preferences.length:", preferences.length);
|
|
560
547
|
let channels = ["web"];
|
|
561
548
|
if (userDevices.length > 0) {
|
|
562
549
|
channels.push("push");
|
|
563
|
-
console.log("Added push channel - devices found");
|
|
564
550
|
} else {
|
|
565
551
|
console.log("No push channel - no devices found");
|
|
566
552
|
}
|
|
567
553
|
if (user.email) {
|
|
568
554
|
channels.push("email");
|
|
569
|
-
console.log("Added email channel");
|
|
570
555
|
}
|
|
571
556
|
if (user.phoneNumber) {
|
|
572
557
|
channels.push("sms");
|
|
573
|
-
console.log("Added SMS channel");
|
|
574
558
|
}
|
|
575
559
|
if (preferences.length > 0) {
|
|
576
560
|
channels = preferences.filter((pref) => pref.isEnabled).map((pref) => pref.channelType);
|
|
577
|
-
console.log("Overridden with user preferences:", channels);
|
|
578
561
|
}
|
|
579
|
-
console.log("=== FINAL CHANNELS ===", channels);
|
|
580
562
|
const channelPromises = [];
|
|
581
563
|
for (const channel of channels) {
|
|
582
|
-
console.log(`=== PREPARING CHANNEL: ${channel} ===`);
|
|
583
564
|
const sendFunc = channelRouters[channel];
|
|
584
565
|
if (!sendFunc) {
|
|
585
566
|
channelPromises.push(Promise.resolve({
|
|
@@ -590,14 +571,11 @@ const NotificationService = function(db, wss) {
|
|
|
590
571
|
continue;
|
|
591
572
|
}
|
|
592
573
|
if (channel === "push") {
|
|
593
|
-
console.log(`Preparing push to ${userDevices.length} devices`);
|
|
594
574
|
for (const device of userDevices) {
|
|
595
575
|
channelPromises.push(
|
|
596
576
|
sendFunc(notification, user, device).then(() => {
|
|
597
|
-
console.log(`Push sent successfully to device ${device.deviceId}`);
|
|
598
577
|
return { channel: "push", deviceId: device.deviceId, success: true };
|
|
599
578
|
}).catch((err) => {
|
|
600
|
-
console.error(`Push failed for device ${device.deviceId}:`, err);
|
|
601
579
|
return { channel: "push", deviceId: device.deviceId, success: false, error: err.message };
|
|
602
580
|
})
|
|
603
581
|
);
|
|
@@ -614,7 +592,6 @@ const NotificationService = function(db, wss) {
|
|
|
614
592
|
);
|
|
615
593
|
}
|
|
616
594
|
}
|
|
617
|
-
console.log(`=== PROCESSING ${channelPromises.length} PARALLEL OPERATIONS ===`);
|
|
618
595
|
const results = await Promise.allSettled(channelPromises);
|
|
619
596
|
const logs = [];
|
|
620
597
|
const channelSuccessMap = /* @__PURE__ */ new Map();
|
|
@@ -657,7 +634,6 @@ const NotificationService = function(db, wss) {
|
|
|
657
634
|
}
|
|
658
635
|
};
|
|
659
636
|
const sendWebNotification = async (notification, user) => {
|
|
660
|
-
console.log(`[WebSocket][notification] sending to user ${user._id}`);
|
|
661
637
|
const result = await wss.sendToUserInModule("notification", user._id, {
|
|
662
638
|
type: "notification",
|
|
663
639
|
data: notification
|
package/dist/orders.server.cjs
CHANGED
|
@@ -6,8 +6,8 @@ require("./mailing-Bs9ThyVZ.cjs");
|
|
|
6
6
|
const profile_schema = require("./profile.schema-pidHrksV.cjs");
|
|
7
7
|
const ownership_schema = require("./ownership.schema-D1p5XSpt.cjs");
|
|
8
8
|
const credentials_schema = require("./credentials.schema-DwhGdrwC.cjs");
|
|
9
|
-
const crud = require("./crud-
|
|
10
|
-
const abac = require("./abac-
|
|
9
|
+
const crud = require("./crud-CC6k6yY5.cjs");
|
|
10
|
+
const abac = require("./abac-DOyUjhee.cjs");
|
|
11
11
|
const axios = require("axios");
|
|
12
12
|
const globals_verifier = require("./globals.verifier-C0zj_LLo.cjs");
|
|
13
13
|
const index = require("./index-BFxqqmgh.cjs");
|
|
@@ -404,10 +404,7 @@ const controllerFactory = (db) => {
|
|
|
404
404
|
console.log("Sending notification for status change...");
|
|
405
405
|
try {
|
|
406
406
|
const usersWithAccess = await getUsersWithOrdersConfirmAccess(order.owner.target);
|
|
407
|
-
|
|
408
|
-
(userId) => userId.toString() !== order.creator.target.toString()
|
|
409
|
-
);
|
|
410
|
-
await sendOrderNotifications(order, "order_status", filteredUsers, {
|
|
407
|
+
await sendOrderNotifications(order, "order_status", usersWithAccess, {
|
|
411
408
|
oldStatus,
|
|
412
409
|
newStatus: order.status,
|
|
413
410
|
organization: order.owner.target
|
package/dist/orders.server.js
CHANGED
|
@@ -4,8 +4,8 @@ import "./mailing-DzlhsxCC.js";
|
|
|
4
4
|
import { m as modelsFactory, a as applyProfileSchema } from "./profile.schema-BGAe5VN5.js";
|
|
5
5
|
import { a as applyOwnershipSchema } from "./ownership.schema-BqH4v5vH.js";
|
|
6
6
|
import { a as applyCredentialsSchema } from "./credentials.schema-C9FB2EyY.js";
|
|
7
|
-
import { C as CRUD } from "./crud-
|
|
8
|
-
import { A as ABAC } from "./abac-
|
|
7
|
+
import { C as CRUD } from "./crud-BIFl1W1i.js";
|
|
8
|
+
import { A as ABAC } from "./abac-CnJsrv8S.js";
|
|
9
9
|
import axios from "axios";
|
|
10
10
|
import { V as Verifier, a as Validator } from "./globals.verifier-DFqKQ7hK.js";
|
|
11
11
|
import { m as middlewareIndexFactory } from "./index-_Edcmck_.js";
|
|
@@ -402,10 +402,7 @@ const controllerFactory = (db) => {
|
|
|
402
402
|
console.log("Sending notification for status change...");
|
|
403
403
|
try {
|
|
404
404
|
const usersWithAccess = await getUsersWithOrdersConfirmAccess(order.owner.target);
|
|
405
|
-
|
|
406
|
-
(userId) => userId.toString() !== order.creator.target.toString()
|
|
407
|
-
);
|
|
408
|
-
await sendOrderNotifications(order, "order_status", filteredUsers, {
|
|
405
|
+
await sendOrderNotifications(order, "order_status", usersWithAccess, {
|
|
409
406
|
oldStatus,
|
|
410
407
|
newStatus: order.status,
|
|
411
408
|
organization: order.owner.target
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const abac = require("./abac-
|
|
3
|
+
const abac = require("./abac-DOyUjhee.cjs");
|
|
4
4
|
const credentials_schema = require("./credentials.schema-DwhGdrwC.cjs");
|
|
5
5
|
const ownership_schema = require("./ownership.schema-D1p5XSpt.cjs");
|
|
6
6
|
const engagement_schema = require("./engagement.schema-JADHu8pj.cjs");
|
|
@@ -10,7 +10,7 @@ const uuidv4 = require("uuidv4");
|
|
|
10
10
|
const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
|
|
11
11
|
const mongoose = require("mongoose");
|
|
12
12
|
const globals_abac = require("./globals.abac-CPXLas7N.cjs");
|
|
13
|
-
const globals_logger = require("./globals.logger-
|
|
13
|
+
const globals_logger = require("./globals.logger-BuW7JHMY.cjs");
|
|
14
14
|
const addUserStatusFields = require("./addUserStatusFields-7-66sf45.cjs");
|
|
15
15
|
const jwt = require("jsonwebtoken");
|
|
16
16
|
const googleMapsServicesJs = require("@googlemaps/google-maps-services-js");
|
|
@@ -35,7 +35,7 @@ const googleMapsServicesJs__namespace = /* @__PURE__ */ _interopNamespaceDefault
|
|
|
35
35
|
const controllerFactory$2 = (db) => {
|
|
36
36
|
const Department = db.department;
|
|
37
37
|
const readOne = (req, res) => {
|
|
38
|
-
Department.findOne({ _id: req.params._id }).populate("members.user").populate("subdepartments").then((department) => {
|
|
38
|
+
Department.findOne({ _id: req.params._id }).populate("members.user", "-password").populate("subdepartments").then((department) => {
|
|
39
39
|
if (!department) {
|
|
40
40
|
return res.status(404).send({ message: "Отдел не найден" });
|
|
41
41
|
}
|
|
@@ -44,38 +44,43 @@ const controllerFactory$2 = (db) => {
|
|
|
44
44
|
res.status(500).send({ message: err.message });
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
const read = (req, res) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (
|
|
58
|
-
|
|
47
|
+
const read = async (req, res) => {
|
|
48
|
+
try {
|
|
49
|
+
const { skip = 0, limit = 10, organization, hidden, _id, search } = req.query;
|
|
50
|
+
let query = {};
|
|
51
|
+
if (_id) {
|
|
52
|
+
query._id = _id;
|
|
53
|
+
}
|
|
54
|
+
if (organization) {
|
|
55
|
+
query.organization = new db.mongoose.Types.ObjectId(organization);
|
|
56
|
+
}
|
|
57
|
+
if (hidden !== void 0) {
|
|
58
|
+
query.hidden = hidden === "true";
|
|
59
59
|
}
|
|
60
|
+
if (search) {
|
|
61
|
+
query["profile.name"] = new RegExp(search, "i");
|
|
62
|
+
}
|
|
63
|
+
const departments = await Department.find(query).skip(parseInt(skip)).limit(parseInt(limit)).populate("members.user", "-password").populate("subdepartments").sort({ createdAt: -1 });
|
|
60
64
|
res.send(departments);
|
|
61
|
-
}
|
|
65
|
+
} catch (err) {
|
|
62
66
|
res.status(500).send({ message: err.message });
|
|
63
|
-
}
|
|
67
|
+
}
|
|
64
68
|
};
|
|
65
69
|
const create = async (req, res) => {
|
|
66
70
|
try {
|
|
67
71
|
const newDepartment = new Department({
|
|
68
72
|
...req.body,
|
|
69
|
-
organization: req.params._id
|
|
73
|
+
organization: req.body.organization || req.params._id
|
|
70
74
|
});
|
|
71
75
|
const data = await newDepartment.save();
|
|
72
|
-
|
|
76
|
+
const populated = await Department.findById(data._id).populate("members.user", "-password").populate("subdepartments");
|
|
77
|
+
res.send(populated);
|
|
73
78
|
} catch (err) {
|
|
74
79
|
res.status(500).send({ message: err.message });
|
|
75
80
|
}
|
|
76
81
|
};
|
|
77
82
|
const update = (req, res) => {
|
|
78
|
-
Department.findOneAndUpdate({ _id: req.body._id }, req.body, { new: true }).then((department) => {
|
|
83
|
+
Department.findOneAndUpdate({ _id: req.body._id }, req.body, { new: true }).populate("members.user", "-password").populate("subdepartments").then((department) => {
|
|
79
84
|
if (!department) {
|
|
80
85
|
return res.status(404).send({ message: "Department not found" });
|
|
81
86
|
}
|
|
@@ -84,15 +89,20 @@ const controllerFactory$2 = (db) => {
|
|
|
84
89
|
res.status(500).send({ message: err.message });
|
|
85
90
|
});
|
|
86
91
|
};
|
|
87
|
-
const deleteDepartment = (req, res) => {
|
|
88
|
-
|
|
92
|
+
const deleteDepartment = async (req, res) => {
|
|
93
|
+
try {
|
|
94
|
+
const { _id } = req.body;
|
|
95
|
+
if (!_id) {
|
|
96
|
+
return res.status(400).send({ message: "Department ID is required" });
|
|
97
|
+
}
|
|
98
|
+
const department = await Department.findOneAndRemove({ _id });
|
|
89
99
|
if (!department) {
|
|
90
100
|
return res.status(404).send({ message: "Department not found" });
|
|
91
101
|
}
|
|
92
|
-
res.send(
|
|
93
|
-
}
|
|
102
|
+
res.send(department);
|
|
103
|
+
} catch (err) {
|
|
94
104
|
res.status(500).send({ message: err.message });
|
|
95
|
-
}
|
|
105
|
+
}
|
|
96
106
|
};
|
|
97
107
|
return {
|
|
98
108
|
readOne,
|
|
@@ -524,10 +534,10 @@ const OrganizationModel = (db) => {
|
|
|
524
534
|
const departmentsRoutes = function(app, db) {
|
|
525
535
|
const controller = controllerFactory$2(db);
|
|
526
536
|
app.get("/api/departments/read", controller.read);
|
|
537
|
+
app.post("/api/departments/create", controller.create);
|
|
538
|
+
app.put("/api/departments/update", controller.update);
|
|
539
|
+
app.post("/api/departments/delete", controller.delete);
|
|
527
540
|
app.get("/api/departments/get/:_id", controller.readOne);
|
|
528
|
-
app.post("/api/departments/:_id/create", controller.create);
|
|
529
|
-
app.post("/api/departments/:_id/update", controller.update);
|
|
530
|
-
app.delete("/api/departments/:_id/delete", controller.delete);
|
|
531
541
|
};
|
|
532
542
|
const { sendEmail, sendSms } = mailing.mailing;
|
|
533
543
|
const сontrollerFactory = (db) => {
|
|
@@ -547,10 +557,17 @@ const сontrollerFactory = (db) => {
|
|
|
547
557
|
};
|
|
548
558
|
const read = async (req, res) => {
|
|
549
559
|
try {
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
|
|
560
|
+
const { skip = 0, limit = 10, owner, target, search } = req.query;
|
|
561
|
+
const query = {};
|
|
562
|
+
if (owner) query["owner.user"] = owner;
|
|
563
|
+
if (target) query["owner.target"] = target;
|
|
564
|
+
if (search) {
|
|
565
|
+
query.$or = [
|
|
566
|
+
{ email: new RegExp(search, "i") },
|
|
567
|
+
{ phone: new RegExp(search, "i") }
|
|
568
|
+
];
|
|
553
569
|
}
|
|
570
|
+
const invites = await Invite.find(query).skip(parseInt(skip)).limit(parseInt(limit)).sort({ createdAt: -1 });
|
|
554
571
|
res.send(invites);
|
|
555
572
|
} catch (err) {
|
|
556
573
|
res.status(500).send({ message: err.message });
|
|
@@ -617,13 +634,36 @@ const сontrollerFactory = (db) => {
|
|
|
617
634
|
res.status(500).json({ message: "Something went wrong" });
|
|
618
635
|
}
|
|
619
636
|
};
|
|
637
|
+
const update = async (req, res) => {
|
|
638
|
+
try {
|
|
639
|
+
const { _id, ...updateData } = req.body;
|
|
640
|
+
if (!_id) {
|
|
641
|
+
return res.status(400).send({ message: "Invite ID is required" });
|
|
642
|
+
}
|
|
643
|
+
const invite = await Invite.findByIdAndUpdate(
|
|
644
|
+
_id,
|
|
645
|
+
updateData,
|
|
646
|
+
{ new: true, runValidators: true }
|
|
647
|
+
);
|
|
648
|
+
if (!invite) {
|
|
649
|
+
return res.status(404).send({ message: "Invite not found" });
|
|
650
|
+
}
|
|
651
|
+
res.send(invite);
|
|
652
|
+
} catch (err) {
|
|
653
|
+
res.status(500).send({ message: err.message });
|
|
654
|
+
}
|
|
655
|
+
};
|
|
620
656
|
const deleteInvite = async (req, res) => {
|
|
621
657
|
try {
|
|
622
|
-
const
|
|
658
|
+
const { _id } = req.body;
|
|
659
|
+
if (!_id) {
|
|
660
|
+
return res.status(400).send({ message: "Invite ID is required" });
|
|
661
|
+
}
|
|
662
|
+
const invite = await Invite.findOneAndDelete({ _id });
|
|
623
663
|
if (!invite) {
|
|
624
664
|
return res.status(404).send({ message: "Invite not found" });
|
|
625
665
|
}
|
|
626
|
-
res.send(
|
|
666
|
+
res.send(invite);
|
|
627
667
|
} catch (err) {
|
|
628
668
|
res.status(500).send({ message: err.message });
|
|
629
669
|
}
|
|
@@ -632,16 +672,18 @@ const сontrollerFactory = (db) => {
|
|
|
632
672
|
getOneByCode,
|
|
633
673
|
read,
|
|
634
674
|
create,
|
|
675
|
+
update,
|
|
635
676
|
delete: deleteInvite
|
|
636
677
|
};
|
|
637
678
|
};
|
|
638
679
|
const invitesRoutes = function(app, db) {
|
|
639
680
|
const controller = сontrollerFactory(db);
|
|
640
681
|
const { verifyInvites } = index.middlewareIndexFactory(db);
|
|
682
|
+
app.get("/api/invites/read", controller.read);
|
|
641
683
|
app.get("/api/invites/get/:_id", controller.getOneByCode);
|
|
642
|
-
app.get("/api/invites/:_id", controller.read);
|
|
643
684
|
app.post("/api/invites/create", [verifyInvites.checkInviteExist, verifyInvites.checkUsersExist], controller.create);
|
|
644
|
-
app.
|
|
685
|
+
app.put("/api/invites/update", controller.update);
|
|
686
|
+
app.post("/api/invites/delete", controller.delete);
|
|
645
687
|
};
|
|
646
688
|
const ObjectId$1 = { Types: mongoose.Types }.Types.ObjectId;
|
|
647
689
|
const controllerFactory$1 = (db) => {
|
|
@@ -687,7 +729,30 @@ const controllerFactory$1 = (db) => {
|
|
|
687
729
|
{
|
|
688
730
|
$unwind: "$user"
|
|
689
731
|
},
|
|
690
|
-
|
|
732
|
+
{
|
|
733
|
+
$project: {
|
|
734
|
+
_id: 1,
|
|
735
|
+
user: {
|
|
736
|
+
_id: 1,
|
|
737
|
+
profile: 1,
|
|
738
|
+
roles: 1,
|
|
739
|
+
phone: 1,
|
|
740
|
+
email: 1,
|
|
741
|
+
username: 1,
|
|
742
|
+
socials: 1,
|
|
743
|
+
status: 1,
|
|
744
|
+
createdAt: 1,
|
|
745
|
+
updatedAt: 1
|
|
746
|
+
},
|
|
747
|
+
type: 1,
|
|
748
|
+
role: 1,
|
|
749
|
+
label: 1,
|
|
750
|
+
target: 1,
|
|
751
|
+
createdAt: 1,
|
|
752
|
+
updatedAt: 1
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
// Sorting and Pagination
|
|
691
756
|
...queryProcessor.queryProcessorGlobals.getSortingOptions(req.query.sortParam, req.query.sortOrder),
|
|
692
757
|
...queryProcessor.queryProcessorGlobals.getPaginationOptions(req.query.skip, req.query.limit)
|
|
693
758
|
]);
|
|
@@ -709,7 +774,8 @@ const controllerFactory$1 = (db) => {
|
|
|
709
774
|
});
|
|
710
775
|
try {
|
|
711
776
|
const data = await newMembership.save();
|
|
712
|
-
|
|
777
|
+
const populated = await Membership.findById(data._id).populate("user", "-password");
|
|
778
|
+
res.send(populated);
|
|
713
779
|
} catch (err) {
|
|
714
780
|
console.log(err);
|
|
715
781
|
res.status(500).send({ errorCode: "SERVER_ERROR" });
|
|
@@ -717,7 +783,7 @@ const controllerFactory$1 = (db) => {
|
|
|
717
783
|
};
|
|
718
784
|
const update = async (req, res) => {
|
|
719
785
|
try {
|
|
720
|
-
const membership = await Membership.findByIdAndUpdate(req.body._id, req.body, { new: true });
|
|
786
|
+
const membership = await Membership.findByIdAndUpdate(req.body._id, req.body, { new: true }).populate("user", "-password");
|
|
721
787
|
if (!membership) {
|
|
722
788
|
return res.status(404).send({ errorCode: "MEMBERSHIP_NOT_FOUND" });
|
|
723
789
|
}
|
|
@@ -728,8 +794,17 @@ const controllerFactory$1 = (db) => {
|
|
|
728
794
|
};
|
|
729
795
|
const deleteMembership = async (req, res) => {
|
|
730
796
|
const { _id, type, target, user, role } = req.body;
|
|
797
|
+
console.log("Delete membership request:", { _id, type, target, user, role });
|
|
731
798
|
try {
|
|
732
|
-
const
|
|
799
|
+
const query = _id ? { _id: new ObjectId$1(_id) } : {
|
|
800
|
+
type,
|
|
801
|
+
target: new ObjectId$1(target),
|
|
802
|
+
user: new ObjectId$1(user),
|
|
803
|
+
role
|
|
804
|
+
};
|
|
805
|
+
console.log("Delete query:", query);
|
|
806
|
+
const membership = await Membership.findOneAndDelete(query);
|
|
807
|
+
console.log("Deleted membership:", membership);
|
|
733
808
|
if (!membership) {
|
|
734
809
|
return res.status(404).send({ errorCode: "MEMBERSHIP_NOT_FOUND" });
|
|
735
810
|
}
|
|
@@ -751,10 +826,11 @@ const controllerFactory$1 = (db) => {
|
|
|
751
826
|
};
|
|
752
827
|
const membershipsRoutes = function(app, db) {
|
|
753
828
|
const controller = controllerFactory$1(db);
|
|
754
|
-
app.get("/api/memberships", controller.read);
|
|
829
|
+
app.get("/api/memberships/read", controller.read);
|
|
755
830
|
app.post("/api/memberships/create", controller.create);
|
|
756
|
-
app.
|
|
831
|
+
app.put("/api/memberships/update", controller.update);
|
|
757
832
|
app.post("/api/memberships/delete", controller.deleteMembership);
|
|
833
|
+
app.get("/api/memberships", controller.read);
|
|
758
834
|
};
|
|
759
835
|
const lookupConfigs = {
|
|
760
836
|
products: {
|
|
@@ -1033,7 +1109,7 @@ const controllerFactory = (db) => {
|
|
|
1033
1109
|
const Organization = db.organization;
|
|
1034
1110
|
const Department = db.department;
|
|
1035
1111
|
const Membership = db.membership;
|
|
1036
|
-
const cache = new globals_logger.
|
|
1112
|
+
const cache = new globals_logger.CacheNamespaced({ ttlSeconds: 60 * 5 });
|
|
1037
1113
|
const read = async (req, res) => {
|
|
1038
1114
|
console.log("controller query", req.query);
|
|
1039
1115
|
try {
|
|
@@ -1235,7 +1311,7 @@ const organizationsRoutes = function(app, db) {
|
|
|
1235
1311
|
app.post("/api/organizations/create", controller.create);
|
|
1236
1312
|
app.post("/api/organizations/:_id/update", controller.update);
|
|
1237
1313
|
app.delete("/api/organizations/:_id/delete", controller.delete);
|
|
1238
|
-
app.get("/api/
|
|
1314
|
+
app.get("/api/organizations/check-accesses", [authJwt.verifyToken()], controller.checkAccesses);
|
|
1239
1315
|
};
|
|
1240
1316
|
const initOrganizationPolicies = function initializeOrganizationPolicies(abacAccessControl, db) {
|
|
1241
1317
|
const Organization = db.organization;
|