@ozdao/martyrs 0.2.519 → 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/chats.server.cjs +198 -1
- package/dist/chats.server.js +198 -1
- package/dist/{main-Wr1_4rwl.cjs → main-BM3GslOO.cjs} +6 -6
- package/dist/{main-DgGUrhjT.js → main-Qcn7YlTx.js} +1832 -1828
- 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/Feed/Feed.vue.cjs +0 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +0 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.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 +40 -50
- 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 +9 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +9 -0
- package/dist/martyrs/src/modules/auth/views/store/auth.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/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 +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.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/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 +0 -1
- 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 +0 -1
- 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 +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +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/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 +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- 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/router/music.cjs +0 -1
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.js +0 -1
- 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 +2 -3
- 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 +2 -3
- 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/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/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 +5 -5
- 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 +5 -5
- 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/pages/CategoryEdit.vue.cjs +2 -3
- 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 +2 -3
- 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 +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- 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 +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.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 +2 -2
- 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 +2 -2
- 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/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 +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/notifications.server.cjs +0 -24
- package/dist/notifications.server.js +0 -24
- package/dist/orders.server.cjs +1 -4
- package/dist/orders.server.js +1 -4
- package/dist/organizations.server.cjs +115 -39
- package/dist/organizations.server.js +115 -39
- package/dist/style.css +9 -9
- package/dist/{web-42I-Howt.cjs → web-B0cfxzgu.cjs} +1 -1
- package/dist/{web-ByhZ_fIu.js → web-DVR8m2fm.js} +1 -1
- package/package.json +1 -1
- package/src/components/Feed/Feed.old.vue +0 -1
- package/src/components/Feed/Feed.vue +0 -30
- package/src/modules/auth/FIXES.md +2 -26
- 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 +15 -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/views/mixins/mixins.js +7 -0
- 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/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/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/typography.scss +20 -5
- package/dist/martyrs/src/components/Address/Address.vue2.cjs.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/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/CLAUDE.MD +0 -15
- 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/organizations/store/departments.js +0 -137
- package/src/modules/organizations/store/invites.js +0 -76
- package/src/modules/organizations/store/memberships.js +0 -110
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<p class="mn-b-thin t-transp p-medium">Select users to add to the organization:</p>
|
|
4
|
+
|
|
5
|
+
<Feed
|
|
6
|
+
:search="{
|
|
7
|
+
placeholder: 'Search users...',
|
|
8
|
+
class: 'bg-light mn-b-thin'
|
|
9
|
+
}"
|
|
10
|
+
:states="{
|
|
11
|
+
empty: {
|
|
12
|
+
title: 'No Users Found',
|
|
13
|
+
description: 'No users match your search criteria.'
|
|
14
|
+
},
|
|
15
|
+
loading: {
|
|
16
|
+
title: 'Loading users...'
|
|
17
|
+
}
|
|
18
|
+
}"
|
|
19
|
+
:store="{
|
|
20
|
+
read: (options) => fetchFilteredUsers(options),
|
|
21
|
+
state: null
|
|
22
|
+
}"
|
|
23
|
+
:options="{}"
|
|
24
|
+
v-slot="{ items }"
|
|
25
|
+
class="bg-light pd-medium radius-medium h-max-30r o-scroll mn-b-thin"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
v-for="user in items"
|
|
29
|
+
:key="user._id"
|
|
30
|
+
@click="() => toggleUserSelection(user)"
|
|
31
|
+
class="pd-thin radius-medium w-100 mn-b-thin cursor-pointer hover-scale-1"
|
|
32
|
+
:class="getUserCardClass(user)"
|
|
33
|
+
>
|
|
34
|
+
<div class="flex-nowrap flex-v-center flex gap-thin">
|
|
35
|
+
<div class="aspect-1x1 h-3r flex-child-default radius-small o-hidden">
|
|
36
|
+
<img
|
|
37
|
+
v-if="user.profile?.photo"
|
|
38
|
+
:src="user.profile.photo"
|
|
39
|
+
alt="User photo"
|
|
40
|
+
class="w-100 h-100 object-fit-cover"
|
|
41
|
+
/>
|
|
42
|
+
<PlaceholderUserpic v-else class="w-100 h-100" />
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="w-100">
|
|
46
|
+
<p class="t-medium">{{ user.profile?.name || user.phone || user.email || 'Unnamed user' }}</p>
|
|
47
|
+
<p class="t-small t-transp">{{ user.email || user.phone || 'No contact info' }}</p>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div v-if="isUserInOrganization(user)" class="pd-nano pd-h-thin radius-thin bg-grey">
|
|
51
|
+
<span class="t-small">Already member</span>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div v-else-if="isUserSelected(user)" class="pd-nano pd-h-thin radius-thin bg-green">
|
|
55
|
+
<IconCheck class="i-small" fill="rgb(var(--white))" />
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</Feed>
|
|
60
|
+
|
|
61
|
+
<div v-if="selectedUsers.length > 0" class="mn-b-thin">
|
|
62
|
+
<p class="t-small t-transp">Selected: {{ selectedUsers.length }} user(s)</p>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<Button
|
|
66
|
+
:submit="addSelectedUsers"
|
|
67
|
+
:disabled="selectedUsers.length === 0"
|
|
68
|
+
class="w-100 bg-main"
|
|
69
|
+
>
|
|
70
|
+
Add {{ selectedUsers.length }} user(s) to organization
|
|
71
|
+
</Button>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<script setup>
|
|
76
|
+
import { ref, computed } from 'vue';
|
|
77
|
+
|
|
78
|
+
import Button from '@martyrs/src/components/Button/Button.vue';
|
|
79
|
+
import Feed from '@martyrs/src/components/Feed/Feed.vue';
|
|
80
|
+
|
|
81
|
+
import PlaceholderUserpic from '@martyrs/src/modules/icons/placeholders/PlaceholderUserpic.vue';
|
|
82
|
+
import IconCheck from '@martyrs/src/modules/icons/navigation/IconCheck.vue';
|
|
83
|
+
|
|
84
|
+
import * as users from '@martyrs/src/modules/auth/views/store/users.js';
|
|
85
|
+
import membershipsStore from '@martyrs/src/modules/organizations/store/memberships.store.js';
|
|
86
|
+
import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';
|
|
87
|
+
|
|
88
|
+
const props = defineProps({
|
|
89
|
+
organizationId: {
|
|
90
|
+
type: String,
|
|
91
|
+
required: true
|
|
92
|
+
},
|
|
93
|
+
existingMembers: {
|
|
94
|
+
type: Array,
|
|
95
|
+
default: () => []
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const emit = defineEmits(['users-added']);
|
|
100
|
+
|
|
101
|
+
// State
|
|
102
|
+
const selectedUsers = ref([]);
|
|
103
|
+
const organizationMembers = ref([]);
|
|
104
|
+
|
|
105
|
+
// Check if user is already in organization
|
|
106
|
+
function isUserInOrganization(user) {
|
|
107
|
+
return organizationMembers.value.some(member =>
|
|
108
|
+
member.user._id === user._id || member.user === user._id
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Check if user is selected
|
|
113
|
+
function isUserSelected(user) {
|
|
114
|
+
return selectedUsers.value.some(selected => selected._id === user._id);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Get card styling based on user status
|
|
118
|
+
function getUserCardClass(user) {
|
|
119
|
+
if (isUserInOrganization(user)) {
|
|
120
|
+
return 'bg-grey opacity-60 cursor-not-allowed';
|
|
121
|
+
}
|
|
122
|
+
if (isUserSelected(user)) {
|
|
123
|
+
return 'bg-green-light';
|
|
124
|
+
}
|
|
125
|
+
return 'bg-white hover-bg-light';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Toggle user selection
|
|
129
|
+
function toggleUserSelection(user) {
|
|
130
|
+
if (isUserInOrganization(user)) {
|
|
131
|
+
globals.actions.setError({ message: 'This user is already a member of the organization' });
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const index = selectedUsers.value.findIndex(u => u._id === user._id);
|
|
136
|
+
if (index > -1) {
|
|
137
|
+
selectedUsers.value.splice(index, 1);
|
|
138
|
+
} else {
|
|
139
|
+
selectedUsers.value.push(user);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Fetch users and organization members
|
|
144
|
+
async function fetchFilteredUsers(options) {
|
|
145
|
+
try {
|
|
146
|
+
// Fetch organization members
|
|
147
|
+
const membersResponse = await membershipsStore.read({
|
|
148
|
+
target: props.organizationId,
|
|
149
|
+
role: ['member', 'owner']
|
|
150
|
+
});
|
|
151
|
+
organizationMembers.value = membersResponse || [];
|
|
152
|
+
|
|
153
|
+
// Fetch all users
|
|
154
|
+
const usersResponse = await users.actions.read(options);
|
|
155
|
+
return usersResponse;
|
|
156
|
+
} catch (error) {
|
|
157
|
+
console.error('Error fetching users:', error);
|
|
158
|
+
return [];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Add selected users to organization
|
|
163
|
+
async function addSelectedUsers() {
|
|
164
|
+
if (selectedUsers.value.length === 0) return;
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
const promises = selectedUsers.value.map(user =>
|
|
168
|
+
membershipsStore.create({
|
|
169
|
+
user: user._id,
|
|
170
|
+
type: 'organization',
|
|
171
|
+
target: props.organizationId,
|
|
172
|
+
role: 'member',
|
|
173
|
+
label: 'member'
|
|
174
|
+
})
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
const results = await Promise.all(promises);
|
|
178
|
+
|
|
179
|
+
emit('users-added', results);
|
|
180
|
+
selectedUsers.value = [];
|
|
181
|
+
|
|
182
|
+
globals.actions.setSuccess({
|
|
183
|
+
message: `Successfully added ${results.length} user(s) to the organization`
|
|
184
|
+
});
|
|
185
|
+
} catch (error) {
|
|
186
|
+
console.error('Error adding users:', error);
|
|
187
|
+
globals.actions.setError(error);
|
|
188
|
+
throw error;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</script>
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cols-1 gap-thin o-y-scroll">
|
|
3
|
+
<Block
|
|
4
|
+
title="Profile"
|
|
5
|
+
class="mn-b-thin"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
class="cols-2-fit-content"
|
|
9
|
+
>
|
|
10
|
+
<UploadImage
|
|
11
|
+
v-model:photo="currentDepartment.profile.photo"
|
|
12
|
+
:uploadPath="'organizations/' + currentDepartment.profile.name + '/departments'"
|
|
13
|
+
class="w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
|
|
14
|
+
/>
|
|
15
|
+
<div class="w-100 flex-child-grow-1 flex-child">
|
|
16
|
+
<Field
|
|
17
|
+
v-model:field="currentDepartment.profile.name"
|
|
18
|
+
label="Name"
|
|
19
|
+
placeholder="Department Name"
|
|
20
|
+
class="mn-b-small bg-white radius-small pd-medium"
|
|
21
|
+
/>
|
|
22
|
+
<Field
|
|
23
|
+
v-model:field="currentDepartment.profile.description"
|
|
24
|
+
label="Description"
|
|
25
|
+
placeholder="Department description (max 120 symbols)"
|
|
26
|
+
class="bg-white radius-small pd-medium"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</Block>
|
|
31
|
+
|
|
32
|
+
<Block
|
|
33
|
+
title="Team"
|
|
34
|
+
placeholder="No members added yet"
|
|
35
|
+
:actions="[{
|
|
36
|
+
label: '+',
|
|
37
|
+
function: () => openMemberPopup()
|
|
38
|
+
}]"
|
|
39
|
+
class="cols-1 gap-thin mn-b-thin"
|
|
40
|
+
>
|
|
41
|
+
<CardUser
|
|
42
|
+
class="h-4r bg-white pd-thin radius-medium w-100"
|
|
43
|
+
v-for="(member, index) in currentDepartment.members"
|
|
44
|
+
:key="member._id || index"
|
|
45
|
+
:user="member.user"
|
|
46
|
+
:photo="member.user.profile.photo"
|
|
47
|
+
:name="member.user.profile.name || member.user.phone || member.user.email || member.user._id"
|
|
48
|
+
:position="member.position"
|
|
49
|
+
:action="{
|
|
50
|
+
label: {
|
|
51
|
+
is: IconDelete,
|
|
52
|
+
props: { class: 'i-medium', fill: 'rgb(var(--white)' }
|
|
53
|
+
},
|
|
54
|
+
method: () => removeMember(member)
|
|
55
|
+
}"
|
|
56
|
+
/>
|
|
57
|
+
</Block>
|
|
58
|
+
|
|
59
|
+
<div class="bg-light pd-medium o-hidden radius-medium mn-b-thin">
|
|
60
|
+
<h3 class="mn-b-semi">Department Settings</h3>
|
|
61
|
+
|
|
62
|
+
<p class="p-medium mn-b-small">Please settings for your department:</p>
|
|
63
|
+
<div class="cols-1 gap-thin">
|
|
64
|
+
<Checkbox
|
|
65
|
+
label="Hidden department"
|
|
66
|
+
name="hidden"
|
|
67
|
+
class="w-100 mn-r-small bg-white radius-small pd-small"
|
|
68
|
+
@update:radio="updated => currentDepartment.hidden = !currentDepartment.hidden"
|
|
69
|
+
:radio="currentDepartment.hidden"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div class="bg-light pd-medium o-hidden radius-medium">
|
|
75
|
+
<h3 class="mn-b-semi">Accesses</h3>
|
|
76
|
+
|
|
77
|
+
<p class="p-medium mn-b-small">Please select organization accesses for user in department:</p>
|
|
78
|
+
|
|
79
|
+
<div class="cols-1 gap-thin">
|
|
80
|
+
<div v-for="(actions, category) in currentDepartment.accesses" :key="category" class="mn-b-small">
|
|
81
|
+
<Spoiler :status="false">
|
|
82
|
+
<template #header="{ isOpen }">
|
|
83
|
+
<h4 class="cursor-pointer flex-v-center flex gap-thin">
|
|
84
|
+
{{ category.charAt(0).toUpperCase() + category.slice(1) }}
|
|
85
|
+
<span class="t-small">{{ isOpen ? '▼' : '▶' }}</span>
|
|
86
|
+
</h4>
|
|
87
|
+
</template>
|
|
88
|
+
<template #content>
|
|
89
|
+
<div class="cols-1 gap-thin mn-t-thin">
|
|
90
|
+
<Checkbox
|
|
91
|
+
v-for="(value, action) in actions"
|
|
92
|
+
:key="action"
|
|
93
|
+
:label="action"
|
|
94
|
+
:name="action"
|
|
95
|
+
:radio="value"
|
|
96
|
+
@update:radio="updated => (currentDepartment.accesses[category][action] = !value)"
|
|
97
|
+
class="w-100 mn-r-small bg-white radius-small pd-small"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
101
|
+
</Spoiler>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<!-- Action Buttons -->
|
|
107
|
+
<div class="flex gap-thin mn-t-medium">
|
|
108
|
+
<Button
|
|
109
|
+
v-if="editingDepartment"
|
|
110
|
+
:submit="onDelete"
|
|
111
|
+
:showSuccess="true"
|
|
112
|
+
:showLoader="true"
|
|
113
|
+
class="bg-red"
|
|
114
|
+
>
|
|
115
|
+
Delete
|
|
116
|
+
</Button>
|
|
117
|
+
<Button
|
|
118
|
+
:showSuccess="false"
|
|
119
|
+
:showLoader="false"
|
|
120
|
+
class="bg-grey t-white w-100"
|
|
121
|
+
@click="$emit('close')"
|
|
122
|
+
>
|
|
123
|
+
Cancel
|
|
124
|
+
</Button>
|
|
125
|
+
<Button
|
|
126
|
+
class="bg-main w-100"
|
|
127
|
+
:submit="saveDepartment"
|
|
128
|
+
>
|
|
129
|
+
{{ editingDepartment ? 'Update Department' : 'Create Department' }}
|
|
130
|
+
</Button>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<!-- Member Selection Popup -->
|
|
134
|
+
<Popup
|
|
135
|
+
title="Add member"
|
|
136
|
+
@close-popup="closeMemberPopup"
|
|
137
|
+
:isPopupOpen="isOpenAddMemberPopup"
|
|
138
|
+
class="bg-white w-max-30r radius-medium pd-big"
|
|
139
|
+
>
|
|
140
|
+
<Feed
|
|
141
|
+
:search="{
|
|
142
|
+
placeholder: 'Search member...',
|
|
143
|
+
class: 'bg-light mn-b-thin'
|
|
144
|
+
}"
|
|
145
|
+
:states="{
|
|
146
|
+
empty: {
|
|
147
|
+
title: 'No Members Found',
|
|
148
|
+
description: 'Currently, there are no members in organization.'
|
|
149
|
+
}
|
|
150
|
+
}"
|
|
151
|
+
:store="{
|
|
152
|
+
read: (options) => membershipsStore.read(options),
|
|
153
|
+
state: null
|
|
154
|
+
}"
|
|
155
|
+
:options="{
|
|
156
|
+
target: organizationId,
|
|
157
|
+
role: ['member', 'owner']
|
|
158
|
+
}"
|
|
159
|
+
v-slot="{
|
|
160
|
+
items
|
|
161
|
+
}"
|
|
162
|
+
class="bg-light pd-medium w-min-20r w-max-40r radius-medium h-max-20r o-scroll"
|
|
163
|
+
>
|
|
164
|
+
<CardUser
|
|
165
|
+
v-for="(user, index) in items"
|
|
166
|
+
:key="user._id"
|
|
167
|
+
:user="user.user"
|
|
168
|
+
:photo="user.user.profile?.photo"
|
|
169
|
+
:name="user.user.profile?.name || user.user.phone || user.user.email"
|
|
170
|
+
:disabled="isDuplicateMember(user.user._id)"
|
|
171
|
+
@click="() => addMemberToDepartment(user.user)"
|
|
172
|
+
class="h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"
|
|
173
|
+
:class="{ 'opacity-50 cursor-not-allowed': isDuplicateMember(user.user._id) }"
|
|
174
|
+
/>
|
|
175
|
+
</Feed>
|
|
176
|
+
</Popup>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<script setup>
|
|
181
|
+
import { ref, reactive, computed } from 'vue';
|
|
182
|
+
import { useRoute } from 'vue-router';
|
|
183
|
+
|
|
184
|
+
import UploadImage from '@martyrs/src/components/UploadImage/UploadImage.vue';
|
|
185
|
+
import Field from '@martyrs/src/components/Field/Field.vue';
|
|
186
|
+
import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue';
|
|
187
|
+
import Button from '@martyrs/src/components/Button/Button.vue';
|
|
188
|
+
import Popup from '@martyrs/src/components/Popup/Popup.vue';
|
|
189
|
+
import Block from '@martyrs/src/components/Block/Block.vue';
|
|
190
|
+
import Feed from '@martyrs/src/components/Feed/Feed.vue';
|
|
191
|
+
import Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue';
|
|
192
|
+
|
|
193
|
+
import CardUser from '@martyrs/src/modules/auth/views/components/blocks/CardUser.vue';
|
|
194
|
+
import IconDelete from '@martyrs/src/modules/icons/navigation/IconDelete.vue';
|
|
195
|
+
|
|
196
|
+
import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';
|
|
197
|
+
import membershipsStore from '@martyrs/src/modules/organizations/store/memberships.store.js';
|
|
198
|
+
import departmentsStore from '@martyrs/src/modules/organizations/store/departments.store.js';
|
|
199
|
+
|
|
200
|
+
const route = useRoute();
|
|
201
|
+
|
|
202
|
+
const props = defineProps({
|
|
203
|
+
department: Object,
|
|
204
|
+
organizationId: String
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
const emit = defineEmits(['close', 'saved']);
|
|
208
|
+
|
|
209
|
+
// State
|
|
210
|
+
const editingDepartment = computed(() => !!props.department?._id);
|
|
211
|
+
const isOpenAddMemberPopup = ref(false);
|
|
212
|
+
|
|
213
|
+
// Create default department structure
|
|
214
|
+
const createDefaultDepartment = () => ({
|
|
215
|
+
organization: props.organizationId,
|
|
216
|
+
profile: {
|
|
217
|
+
photo: '',
|
|
218
|
+
name: '',
|
|
219
|
+
description: '',
|
|
220
|
+
categories: [],
|
|
221
|
+
},
|
|
222
|
+
address: '',
|
|
223
|
+
location: {
|
|
224
|
+
lat: null,
|
|
225
|
+
lng: null,
|
|
226
|
+
},
|
|
227
|
+
worktime: [],
|
|
228
|
+
delivery: [],
|
|
229
|
+
payment: [],
|
|
230
|
+
members: [],
|
|
231
|
+
subdepartments: [],
|
|
232
|
+
hidden: false,
|
|
233
|
+
accesses: {
|
|
234
|
+
categories: {
|
|
235
|
+
create: false,
|
|
236
|
+
read: false,
|
|
237
|
+
edit: false,
|
|
238
|
+
delete: false,
|
|
239
|
+
},
|
|
240
|
+
rents: {
|
|
241
|
+
create: false,
|
|
242
|
+
read: false,
|
|
243
|
+
edit: false,
|
|
244
|
+
delete: false,
|
|
245
|
+
},
|
|
246
|
+
spots: {
|
|
247
|
+
create: false,
|
|
248
|
+
read: false,
|
|
249
|
+
edit: false,
|
|
250
|
+
delete: false,
|
|
251
|
+
},
|
|
252
|
+
members: {
|
|
253
|
+
read: false,
|
|
254
|
+
edit: false,
|
|
255
|
+
delete: false,
|
|
256
|
+
},
|
|
257
|
+
posts: {
|
|
258
|
+
create: false,
|
|
259
|
+
read: false,
|
|
260
|
+
edit: false,
|
|
261
|
+
delete: false,
|
|
262
|
+
},
|
|
263
|
+
events: {
|
|
264
|
+
create: false,
|
|
265
|
+
read: false,
|
|
266
|
+
edit: false,
|
|
267
|
+
delete: false,
|
|
268
|
+
},
|
|
269
|
+
tickets: {
|
|
270
|
+
create: false,
|
|
271
|
+
read: false,
|
|
272
|
+
edit: false,
|
|
273
|
+
delete: false,
|
|
274
|
+
},
|
|
275
|
+
gallery: {
|
|
276
|
+
read: false,
|
|
277
|
+
create: false,
|
|
278
|
+
edit: false,
|
|
279
|
+
delete: false,
|
|
280
|
+
},
|
|
281
|
+
inventory: {
|
|
282
|
+
read: false,
|
|
283
|
+
edit: false,
|
|
284
|
+
delete: false,
|
|
285
|
+
},
|
|
286
|
+
products: {
|
|
287
|
+
read: false,
|
|
288
|
+
edit: false,
|
|
289
|
+
delete: false,
|
|
290
|
+
},
|
|
291
|
+
orders: {
|
|
292
|
+
read: false,
|
|
293
|
+
confirm: false,
|
|
294
|
+
delete: false,
|
|
295
|
+
},
|
|
296
|
+
departments: {
|
|
297
|
+
read: false,
|
|
298
|
+
edit: false,
|
|
299
|
+
delete: false,
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
// Current department reactive state - create deep copy to avoid mutating original
|
|
305
|
+
const currentDepartment = reactive(
|
|
306
|
+
props.department ? JSON.parse(JSON.stringify(props.department)) : createDefaultDepartment()
|
|
307
|
+
);
|
|
308
|
+
|
|
309
|
+
// Member management
|
|
310
|
+
function openMemberPopup() {
|
|
311
|
+
isOpenAddMemberPopup.value = true;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function closeMemberPopup() {
|
|
315
|
+
isOpenAddMemberPopup.value = false;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function isDuplicateMember(userId) {
|
|
319
|
+
return currentDepartment.members.some(member =>
|
|
320
|
+
member.user._id === userId || member._id === userId
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function addMemberToDepartment(user) {
|
|
325
|
+
if (!isDuplicateMember(user._id)) {
|
|
326
|
+
currentDepartment.members.push({
|
|
327
|
+
_id: user._id,
|
|
328
|
+
user: user,
|
|
329
|
+
position: 'Member'
|
|
330
|
+
});
|
|
331
|
+
closeMemberPopup();
|
|
332
|
+
} else {
|
|
333
|
+
globals.actions.setError({ message: 'This user is already a member of this department' });
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function removeMember(member) {
|
|
338
|
+
if (confirm("Are you sure you want to remove this member?")) {
|
|
339
|
+
const index = currentDepartment.members.findIndex(m =>
|
|
340
|
+
(m.user._id === member.user._id) || (m._id === member._id)
|
|
341
|
+
);
|
|
342
|
+
if (index > -1) {
|
|
343
|
+
currentDepartment.members.splice(index, 1);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// Save/Delete operations
|
|
349
|
+
async function saveDepartment() {
|
|
350
|
+
try {
|
|
351
|
+
// Prepare department data
|
|
352
|
+
const departmentData = {
|
|
353
|
+
...currentDepartment,
|
|
354
|
+
organization: props.organizationId
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
let result;
|
|
358
|
+
if (editingDepartment.value) {
|
|
359
|
+
// Update existing department
|
|
360
|
+
result = await departmentsStore.update({
|
|
361
|
+
...departmentData,
|
|
362
|
+
_id: props.department._id
|
|
363
|
+
});
|
|
364
|
+
} else {
|
|
365
|
+
// Create new department
|
|
366
|
+
result = await departmentsStore.create(departmentData);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
emit('saved', result);
|
|
370
|
+
emit('close');
|
|
371
|
+
} catch (error) {
|
|
372
|
+
console.error('Error saving department:', error);
|
|
373
|
+
globals.actions.setError(error);
|
|
374
|
+
throw error;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
async function onDelete() {
|
|
379
|
+
if (confirm("Are you sure you want to delete this department?")) {
|
|
380
|
+
try {
|
|
381
|
+
await departmentsStore.delete({ _id: props.department._id });
|
|
382
|
+
emit('saved', null);
|
|
383
|
+
emit('close');
|
|
384
|
+
} catch (error) {
|
|
385
|
+
console.error('Error deleting department:', error);
|
|
386
|
+
globals.actions.setError(error);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<p class="mn-b-thin t-transp p-medium">{{ text }}</p>
|
|
4
|
+
|
|
5
|
+
<section class="cols-1 mn-b-small radius-medium pd-semi bg-light pos-relative">
|
|
6
|
+
<div
|
|
7
|
+
v-for="(member, index) in members"
|
|
8
|
+
:key="index"
|
|
9
|
+
class="br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"
|
|
10
|
+
>
|
|
11
|
+
<Field
|
|
12
|
+
v-model:field="member.contact"
|
|
13
|
+
placeholder="Enter email or phone"
|
|
14
|
+
class="w-100 pd-small radius-small bg-white"
|
|
15
|
+
:validation="contactValidation"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
v-if="index < 1"
|
|
19
|
+
@click="() => members.push({contact: ''})"
|
|
20
|
+
class="radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"
|
|
21
|
+
>
|
|
22
|
+
<IconAdd
|
|
23
|
+
class="i-medium"
|
|
24
|
+
:fill="'rgb(var(--white)'"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div
|
|
29
|
+
v-else
|
|
30
|
+
@click="() => members.splice(index, 1)"
|
|
31
|
+
class="radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"
|
|
32
|
+
>
|
|
33
|
+
<IconDelete
|
|
34
|
+
class="i-medium"
|
|
35
|
+
:fill="'rgb(var(--white)'"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</Field>
|
|
39
|
+
</div>
|
|
40
|
+
</section>
|
|
41
|
+
|
|
42
|
+
<Button
|
|
43
|
+
:submit="submitMembers"
|
|
44
|
+
class="w-100 bg-main"
|
|
45
|
+
>
|
|
46
|
+
<span>Send invitations</span>
|
|
47
|
+
</Button>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup>
|
|
52
|
+
import { ref } from 'vue';
|
|
53
|
+
|
|
54
|
+
import Field from '@martyrs/src/components/Field/Field.vue';
|
|
55
|
+
import Button from '@martyrs/src/components/Button/Button.vue';
|
|
56
|
+
|
|
57
|
+
import IconDelete from '@martyrs/src/modules/icons/navigation/IconDelete.vue';
|
|
58
|
+
import IconAdd from '@martyrs/src/modules/icons/navigation/IconAdd.vue';
|
|
59
|
+
|
|
60
|
+
const props = defineProps({
|
|
61
|
+
organization: Object,
|
|
62
|
+
text: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: 'Please enter email or phone number to send an invitation link:'
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const emit = defineEmits(['send-invite']);
|
|
69
|
+
|
|
70
|
+
// Validation
|
|
71
|
+
const contactValidation = ref(null);
|
|
72
|
+
|
|
73
|
+
// Members list
|
|
74
|
+
const members = ref([{ contact: '' }]);
|
|
75
|
+
|
|
76
|
+
async function submitMembers() {
|
|
77
|
+
return new Promise((resolve, reject) => {
|
|
78
|
+
emit('send-invite', members.value, resolve, reject);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
</script>
|