@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
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const vueRouter = require("vue-router");
|
|
5
|
-
require("../../../../../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.cjs");
|
|
6
|
-
require("vue-i18n");
|
|
7
|
-
;/* empty css */
|
|
8
|
-
const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
|
|
9
|
-
;/* empty css */
|
|
10
|
-
const Field = require("../../../../components/Field/Field.vue.cjs");
|
|
11
|
-
;/* empty css */
|
|
12
|
-
const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
|
|
13
|
-
require("../../../../../../node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.cjs");
|
|
14
|
-
;/* empty css */
|
|
15
|
-
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
18
|
-
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
19
|
-
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
20
|
-
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
21
|
-
const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
|
|
22
|
-
;/* empty css */
|
|
23
|
-
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
|
24
|
-
const globals = require("../../../globals/views/store/globals.cjs");
|
|
25
|
-
const departments = require("../../store/departments.cjs");
|
|
26
|
-
const memberships = require("../../store/memberships.cjs");
|
|
27
|
-
const _hoisted_1 = { class: "for-transition pd-thin w-100" };
|
|
28
|
-
const _hoisted_2 = { class: "mn-b-thin flex-nowrap flex-v-center flex bg-light pd-medium radius-medium" };
|
|
29
|
-
const _hoisted_3 = {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: "mn-r-auto"
|
|
32
|
-
};
|
|
33
|
-
const _hoisted_4 = {
|
|
34
|
-
key: 1,
|
|
35
|
-
class: "mn-r-auto"
|
|
36
|
-
};
|
|
37
|
-
const _hoisted_5 = { class: "flex-nowrap flex gap-thin pd-thin" };
|
|
38
|
-
const _hoisted_6 = { class: "cols-2-fit-content" };
|
|
39
|
-
const _hoisted_7 = { class: "w-100 flex-child-grow-1 flex-child" };
|
|
40
|
-
const _hoisted_8 = { class: "cols-2 gap-thin" };
|
|
41
|
-
const _hoisted_9 = { class: "bg-light pd-medium o-hidden radius-big" };
|
|
42
|
-
const _hoisted_10 = { class: "cols-1 gap-thin" };
|
|
43
|
-
const _hoisted_11 = { class: "bg-light pd-medium o-hidden radius-big" };
|
|
44
|
-
const _hoisted_12 = { class: "cols-1 gap-thin" };
|
|
45
|
-
const _sfc_main = {
|
|
46
|
-
__name: "DepartmentEdit",
|
|
47
|
-
setup(__props) {
|
|
48
|
-
const router = vueRouter.useRouter();
|
|
49
|
-
const route = vueRouter.useRoute();
|
|
50
|
-
async function fetchData() {
|
|
51
|
-
vue.ref(memberships.state.memberships);
|
|
52
|
-
if (route.params.department) await departments.actions.readOne(route.params.department);
|
|
53
|
-
}
|
|
54
|
-
fetchData();
|
|
55
|
-
const isOpenAddMemberPopup = vue.ref(false);
|
|
56
|
-
const selectedMember = vue.ref(null);
|
|
57
|
-
function openMemberPopup(member) {
|
|
58
|
-
isOpenAddMemberPopup.value = true;
|
|
59
|
-
}
|
|
60
|
-
function closeMemberPopup() {
|
|
61
|
-
isOpenAddMemberPopup.value = false;
|
|
62
|
-
selectedMember.value = null;
|
|
63
|
-
}
|
|
64
|
-
vue.ref(false);
|
|
65
|
-
vue.ref(null);
|
|
66
|
-
async function onSubmit() {
|
|
67
|
-
if (route.params.department) {
|
|
68
|
-
await departments.actions.update(
|
|
69
|
-
route.params._id,
|
|
70
|
-
departments.state.department
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
if (!route.params.department) {
|
|
74
|
-
await departments.actions.create(
|
|
75
|
-
route.params._id,
|
|
76
|
-
departments.state.department
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function redirectTo() {
|
|
81
|
-
router.push({ name: "Organization Members", params: { _id: route.params._id } });
|
|
82
|
-
}
|
|
83
|
-
async function onDelete() {
|
|
84
|
-
if (confirm("Are you sure you want to delete this department?")) {
|
|
85
|
-
await departments.actions.delete(
|
|
86
|
-
route.params._id,
|
|
87
|
-
departments.state.department
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function removeMember(member) {
|
|
92
|
-
if (confirm("Are you sure you want to remove this member?")) {
|
|
93
|
-
globals.actions.delete(departments.state.department.members, { _id: member.user._id });
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return (_ctx, _cache) => {
|
|
97
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
98
|
-
vue.createElementVNode("header", _hoisted_2, [
|
|
99
|
-
vue.unref(route).params.department ? (vue.openBlock(), vue.createElementBlock("h1", _hoisted_3, "Edit Department")) : (vue.openBlock(), vue.createElementBlock("h1", _hoisted_4, "Create Department")),
|
|
100
|
-
vue.createElementVNode("section", _hoisted_5, [
|
|
101
|
-
vue.unref(route).params.department ? (vue.openBlock(), vue.createBlock(Button.default, {
|
|
102
|
-
key: 0,
|
|
103
|
-
submit: onDelete,
|
|
104
|
-
callback: _ctx.redirectToDash,
|
|
105
|
-
class: "bg-red"
|
|
106
|
-
}, {
|
|
107
|
-
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
108
|
-
vue.createTextVNode("Delete")
|
|
109
|
-
])),
|
|
110
|
-
_: 1
|
|
111
|
-
}, 8, ["callback"])) : vue.createCommentVNode("", true),
|
|
112
|
-
vue.createVNode(Button.default, {
|
|
113
|
-
submit: onSubmit,
|
|
114
|
-
callback: redirectTo,
|
|
115
|
-
class: "bg-main"
|
|
116
|
-
}, {
|
|
117
|
-
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
118
|
-
vue.createTextVNode("Save")
|
|
119
|
-
])),
|
|
120
|
-
_: 1
|
|
121
|
-
})
|
|
122
|
-
])
|
|
123
|
-
]),
|
|
124
|
-
departments.state.department.profile ? (vue.openBlock(), vue.createBlock(Block.default, {
|
|
125
|
-
key: 0,
|
|
126
|
-
title: "Profile",
|
|
127
|
-
class: "mn-b-thin"
|
|
128
|
-
}, {
|
|
129
|
-
default: vue.withCtx(() => [
|
|
130
|
-
vue.createElementVNode("div", _hoisted_6, [
|
|
131
|
-
vue.createVNode(UploadImage.default, {
|
|
132
|
-
photo: departments.state.department.profile.photo,
|
|
133
|
-
"onUpdate:photo": _cache[0] || (_cache[0] = ($event) => departments.state.department.profile.photo = $event),
|
|
134
|
-
uploadPath: "organizations/" + departments.state.department.name + "/avatars",
|
|
135
|
-
class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
|
|
136
|
-
}, null, 8, ["photo", "uploadPath"]),
|
|
137
|
-
vue.createElementVNode("div", _hoisted_7, [
|
|
138
|
-
vue.createVNode(Field.default, {
|
|
139
|
-
field: departments.state.department.profile.name,
|
|
140
|
-
"onUpdate:field": _cache[1] || (_cache[1] = ($event) => departments.state.department.profile.name = $event),
|
|
141
|
-
label: "Name",
|
|
142
|
-
placeholder: "Department Name",
|
|
143
|
-
class: "mn-b-small bg-white radius-small pd-medium",
|
|
144
|
-
validation: _ctx.organizationName
|
|
145
|
-
}, null, 8, ["field", "validation"]),
|
|
146
|
-
vue.createVNode(Field.default, {
|
|
147
|
-
field: departments.state.department.profile.description,
|
|
148
|
-
"onUpdate:field": _cache[2] || (_cache[2] = ($event) => departments.state.department.profile.description = $event),
|
|
149
|
-
label: "Description",
|
|
150
|
-
placeholder: "Department description (max 120 symbols)",
|
|
151
|
-
class: "bg-white radius-small pd-medium",
|
|
152
|
-
validation: _ctx.organizationName
|
|
153
|
-
}, null, 8, ["field", "validation"])
|
|
154
|
-
])
|
|
155
|
-
])
|
|
156
|
-
]),
|
|
157
|
-
_: 1
|
|
158
|
-
})) : vue.createCommentVNode("", true),
|
|
159
|
-
vue.createVNode(Block.default, {
|
|
160
|
-
title: "Team",
|
|
161
|
-
placeholder: "No members added yet",
|
|
162
|
-
actions: [{
|
|
163
|
-
label: "+",
|
|
164
|
-
function: () => openMemberPopup()
|
|
165
|
-
}],
|
|
166
|
-
class: "cols-1 gap-thin mn-b-thin"
|
|
167
|
-
}, {
|
|
168
|
-
default: vue.withCtx(() => [
|
|
169
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(departments.state.department.members, (member, index) => {
|
|
170
|
-
return vue.openBlock(), vue.createBlock(CardUser.default, {
|
|
171
|
-
class: "h-4r bg-white pd-thin radius-medium w-100",
|
|
172
|
-
key: index,
|
|
173
|
-
user: member.user,
|
|
174
|
-
photo: member.user.profile.photo,
|
|
175
|
-
name: member.user.profile.name || member.user.phone || member.user.email || member.user._id,
|
|
176
|
-
position: member.position,
|
|
177
|
-
action: {
|
|
178
|
-
label: {
|
|
179
|
-
is: IconDelete.default,
|
|
180
|
-
props: { class: "i-medium", fill: "rgb(var(--white)" }
|
|
181
|
-
},
|
|
182
|
-
method: () => removeMember(member)
|
|
183
|
-
}
|
|
184
|
-
}, null, 8, ["user", "photo", "name", "position", "action"]);
|
|
185
|
-
}), 128))
|
|
186
|
-
]),
|
|
187
|
-
_: 1
|
|
188
|
-
}, 8, ["actions"]),
|
|
189
|
-
vue.createVNode(Popup.default, {
|
|
190
|
-
title: "Add member",
|
|
191
|
-
onClosePopup: closeMemberPopup,
|
|
192
|
-
isPopupOpen: isOpenAddMemberPopup.value,
|
|
193
|
-
class: "bg-white w-max-30r radius-big pd-big"
|
|
194
|
-
}, {
|
|
195
|
-
default: vue.withCtx(() => [
|
|
196
|
-
vue.createVNode(Feed.default, {
|
|
197
|
-
search: {
|
|
198
|
-
placeholder: "Search customer...",
|
|
199
|
-
class: "bg-light mn-b-thin"
|
|
200
|
-
},
|
|
201
|
-
states: {
|
|
202
|
-
empty: {
|
|
203
|
-
title: "No Members Found",
|
|
204
|
-
description: "Currently, there are no members in organization."
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
store: {
|
|
208
|
-
read: (options) => memberships.actions.read(options),
|
|
209
|
-
state: null
|
|
210
|
-
},
|
|
211
|
-
options: {
|
|
212
|
-
target: vue.unref(route).params._id,
|
|
213
|
-
role: ["member"]
|
|
214
|
-
},
|
|
215
|
-
class: "bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"
|
|
216
|
-
}, {
|
|
217
|
-
default: vue.withCtx(({
|
|
218
|
-
items
|
|
219
|
-
}) => [
|
|
220
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items, (user, index) => {
|
|
221
|
-
return vue.openBlock(), vue.createBlock(CardUser.default, {
|
|
222
|
-
key: user._id,
|
|
223
|
-
user: user.user,
|
|
224
|
-
photo: user.user.profile?.photo,
|
|
225
|
-
name: user.user.profile?.name || user.user.phone || user.user.email,
|
|
226
|
-
onClick: () => {
|
|
227
|
-
globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: "Member" });
|
|
228
|
-
closeMemberPopup();
|
|
229
|
-
},
|
|
230
|
-
class: "h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"
|
|
231
|
-
}, null, 8, ["user", "photo", "name", "onClick"]);
|
|
232
|
-
}), 128))
|
|
233
|
-
]),
|
|
234
|
-
_: 1
|
|
235
|
-
}, 8, ["store", "options"])
|
|
236
|
-
]),
|
|
237
|
-
_: 1
|
|
238
|
-
}, 8, ["isPopupOpen"]),
|
|
239
|
-
vue.createElementVNode("div", _hoisted_8, [
|
|
240
|
-
vue.createElementVNode("div", _hoisted_9, [
|
|
241
|
-
_cache[6] || (_cache[6] = vue.createElementVNode("h3", { class: "mn-b-semi" }, "Department Settings", -1)),
|
|
242
|
-
_cache[7] || (_cache[7] = vue.createElementVNode("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1)),
|
|
243
|
-
vue.createElementVNode("div", _hoisted_10, [
|
|
244
|
-
vue.createVNode(Checkbox.default, {
|
|
245
|
-
label: "Hidden department",
|
|
246
|
-
name: "hidden",
|
|
247
|
-
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
|
248
|
-
"onUpdate:radio": _cache[3] || (_cache[3] = (updated) => departments.state.department.hidden = !departments.state.department.hidden),
|
|
249
|
-
radio: departments.state.department.hidden
|
|
250
|
-
}, null, 8, ["radio"])
|
|
251
|
-
])
|
|
252
|
-
]),
|
|
253
|
-
vue.createElementVNode("div", _hoisted_11, [
|
|
254
|
-
_cache[8] || (_cache[8] = vue.createElementVNode("h3", { class: "mn-b-semi" }, "Acessess", -1)),
|
|
255
|
-
_cache[9] || (_cache[9] = vue.createElementVNode("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1)),
|
|
256
|
-
vue.createElementVNode("div", _hoisted_12, [
|
|
257
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(departments.state.department.accesses, (actions, category) => {
|
|
258
|
-
return vue.openBlock(), vue.createElementBlock("div", { key: category }, [
|
|
259
|
-
vue.createElementVNode("h4", null, vue.toDisplayString(category.charAt(0).toUpperCase() + category.slice(1)), 1),
|
|
260
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(actions, (value, action) => {
|
|
261
|
-
return vue.openBlock(), vue.createBlock(Checkbox.default, {
|
|
262
|
-
key: action,
|
|
263
|
-
label: action,
|
|
264
|
-
name: action,
|
|
265
|
-
radio: value,
|
|
266
|
-
"onUpdate:radio": (updated) => departments.state.department.accesses[category][action] = !value,
|
|
267
|
-
class: "w-100 mn-r-small bg-white radius-small pd-small"
|
|
268
|
-
}, null, 8, ["label", "name", "radio", "onUpdate:radio"]);
|
|
269
|
-
}), 128))
|
|
270
|
-
]);
|
|
271
|
-
}), 128))
|
|
272
|
-
])
|
|
273
|
-
])
|
|
274
|
-
])
|
|
275
|
-
]);
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
exports.default = _sfc_main;
|
|
280
|
-
//# sourceMappingURL=DepartmentEdit.vue.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DepartmentEdit.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex-v-center flex bg-light pd-medium radius-medium\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members in organization.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <div v-for=\"(actions, category) in departments.state.department.accesses\" :key=\"category\">\n <h4>{{ category.charAt(0).toUpperCase() + category.slice(1) }}</h4>\n <Checkbox\n v-for=\"(value, action) in actions\"\n :key=\"action\"\n :label=\"action\"\n :name=\"action\"\n :radio=\"value\"\n @update:radio=\"updated => (departments.state.department.accesses[category][action] = !value)\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n />\n </div>\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@martyrs/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@martyrs/src/components/Tab/Tab.vue\";\nimport Field from \"@martyrs/src/components/Field/Field.vue\";\nimport Select from \"@martyrs/src/components/Select/Select.vue\";\nimport Checkbox from \"@martyrs/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@martyrs/src/components/Address/Address.vue\";\nimport LocationMarker from \"@martyrs/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@martyrs/src/components/Button/Button.vue\";\nimport Popup from \"@martyrs/src/components/Popup/Popup.vue\";\nimport Block from '@martyrs/src/components/Block/Block.vue';\nimport Feed from '@martyrs/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@martyrs/src/modules/icons/navigation/IconDelete.vue'\n\nimport DepartmentSub from \"@martyrs/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@martyrs/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport * as globals from \"@martyrs/src/modules/globals/views/store/globals.js\";\nimport * as departments from \"@martyrs/src/modules/organizations/store/departments.js\";\nimport * as memberships from \"@martyrs/src/modules/organizations/store/memberships.js\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRouter","useRoute","ref","memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkOA,UAAM,SAASA,UAAAA,UAAS;AACxB,UAAM,QAAQC,UAAAA,SAAQ;AAEtB,mBAAe,YAAY;AACXC,UAAAA,IAAIC,YAAAA,MAAkB,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,YAAAA,QAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA,cAAS;AAIT,UAAM,uBAAuBF,IAAAA,IAAI,KAAK;AACtC,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8BA,QAAAA,IAAI,KAAK;AACZA,QAAAA,IAAI,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAME,YAAAA,QAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,kBAAkB;AAAA,QACxB;AAAA,MACE;AACA,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,YAAAA,QAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,kBAAkB;AAAA,QACxB;AAAA,MACE;AAAA,IACF;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAE,CAAE;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,YAAAA,QAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,kBAAkB;AAAA,QACxB;AAAA,MACE;AAAA,IAEF;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,wBAAgB,OAAOD,YAAAA,MAAkB,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACtF;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { ref, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, createVNode, unref, withCtx, createTextVNode, Fragment, renderList, toDisplayString } from "vue";
|
|
2
|
-
import { useRouter, useRoute } from "vue-router";
|
|
3
|
-
import "../../../../../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.js";
|
|
4
|
-
import "vue-i18n";
|
|
5
|
-
/* empty css */
|
|
6
|
-
import _sfc_main$3 from "../../../../components/UploadImage/UploadImage.vue.js";
|
|
7
|
-
/* empty css */
|
|
8
|
-
import Field from "../../../../components/Field/Field.vue.js";
|
|
9
|
-
/* empty css */
|
|
10
|
-
import _sfc_main$8 from "../../../../components/Checkbox/Checkbox.vue.js";
|
|
11
|
-
import "../../../../../../node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
/* empty css */
|
|
14
|
-
/* empty css */
|
|
15
|
-
import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
|
|
16
|
-
import _sfc_main$6 from "../../../../components/Popup/Popup.vue.js";
|
|
17
|
-
import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
|
|
18
|
-
import _sfc_main$7 from "../../../../components/Feed/Feed.vue.js";
|
|
19
|
-
import _sfc_main$5 from "../../../icons/navigation/IconDelete.vue.js";
|
|
20
|
-
/* empty css */
|
|
21
|
-
import _sfc_main$4 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
|
22
|
-
import { actions as actions$1 } from "../../../globals/views/store/globals.js";
|
|
23
|
-
import { state, actions as actions$2 } from "../../store/departments.js";
|
|
24
|
-
import { actions, state as state$1 } from "../../store/memberships.js";
|
|
25
|
-
const _hoisted_1 = { class: "for-transition pd-thin w-100" };
|
|
26
|
-
const _hoisted_2 = { class: "mn-b-thin flex-nowrap flex-v-center flex bg-light pd-medium radius-medium" };
|
|
27
|
-
const _hoisted_3 = {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "mn-r-auto"
|
|
30
|
-
};
|
|
31
|
-
const _hoisted_4 = {
|
|
32
|
-
key: 1,
|
|
33
|
-
class: "mn-r-auto"
|
|
34
|
-
};
|
|
35
|
-
const _hoisted_5 = { class: "flex-nowrap flex gap-thin pd-thin" };
|
|
36
|
-
const _hoisted_6 = { class: "cols-2-fit-content" };
|
|
37
|
-
const _hoisted_7 = { class: "w-100 flex-child-grow-1 flex-child" };
|
|
38
|
-
const _hoisted_8 = { class: "cols-2 gap-thin" };
|
|
39
|
-
const _hoisted_9 = { class: "bg-light pd-medium o-hidden radius-big" };
|
|
40
|
-
const _hoisted_10 = { class: "cols-1 gap-thin" };
|
|
41
|
-
const _hoisted_11 = { class: "bg-light pd-medium o-hidden radius-big" };
|
|
42
|
-
const _hoisted_12 = { class: "cols-1 gap-thin" };
|
|
43
|
-
const _sfc_main = {
|
|
44
|
-
__name: "DepartmentEdit",
|
|
45
|
-
setup(__props) {
|
|
46
|
-
const router = useRouter();
|
|
47
|
-
const route = useRoute();
|
|
48
|
-
async function fetchData() {
|
|
49
|
-
ref(state$1.memberships);
|
|
50
|
-
if (route.params.department) await actions$2.readOne(route.params.department);
|
|
51
|
-
}
|
|
52
|
-
fetchData();
|
|
53
|
-
const isOpenAddMemberPopup = ref(false);
|
|
54
|
-
const selectedMember = ref(null);
|
|
55
|
-
function openMemberPopup(member) {
|
|
56
|
-
isOpenAddMemberPopup.value = true;
|
|
57
|
-
}
|
|
58
|
-
function closeMemberPopup() {
|
|
59
|
-
isOpenAddMemberPopup.value = false;
|
|
60
|
-
selectedMember.value = null;
|
|
61
|
-
}
|
|
62
|
-
ref(false);
|
|
63
|
-
ref(null);
|
|
64
|
-
async function onSubmit() {
|
|
65
|
-
if (route.params.department) {
|
|
66
|
-
await actions$2.update(
|
|
67
|
-
route.params._id,
|
|
68
|
-
state.department
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
if (!route.params.department) {
|
|
72
|
-
await actions$2.create(
|
|
73
|
-
route.params._id,
|
|
74
|
-
state.department
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function redirectTo() {
|
|
79
|
-
router.push({ name: "Organization Members", params: { _id: route.params._id } });
|
|
80
|
-
}
|
|
81
|
-
async function onDelete() {
|
|
82
|
-
if (confirm("Are you sure you want to delete this department?")) {
|
|
83
|
-
await actions$2.delete(
|
|
84
|
-
route.params._id,
|
|
85
|
-
state.department
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function removeMember(member) {
|
|
90
|
-
if (confirm("Are you sure you want to remove this member?")) {
|
|
91
|
-
actions$1.delete(state.department.members, { _id: member.user._id });
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return (_ctx, _cache) => {
|
|
95
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
96
|
-
createElementVNode("header", _hoisted_2, [
|
|
97
|
-
unref(route).params.department ? (openBlock(), createElementBlock("h1", _hoisted_3, "Edit Department")) : (openBlock(), createElementBlock("h1", _hoisted_4, "Create Department")),
|
|
98
|
-
createElementVNode("section", _hoisted_5, [
|
|
99
|
-
unref(route).params.department ? (openBlock(), createBlock(_sfc_main$1, {
|
|
100
|
-
key: 0,
|
|
101
|
-
submit: onDelete,
|
|
102
|
-
callback: _ctx.redirectToDash,
|
|
103
|
-
class: "bg-red"
|
|
104
|
-
}, {
|
|
105
|
-
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
106
|
-
createTextVNode("Delete")
|
|
107
|
-
])),
|
|
108
|
-
_: 1
|
|
109
|
-
}, 8, ["callback"])) : createCommentVNode("", true),
|
|
110
|
-
createVNode(_sfc_main$1, {
|
|
111
|
-
submit: onSubmit,
|
|
112
|
-
callback: redirectTo,
|
|
113
|
-
class: "bg-main"
|
|
114
|
-
}, {
|
|
115
|
-
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
116
|
-
createTextVNode("Save")
|
|
117
|
-
])),
|
|
118
|
-
_: 1
|
|
119
|
-
})
|
|
120
|
-
])
|
|
121
|
-
]),
|
|
122
|
-
state.department.profile ? (openBlock(), createBlock(_sfc_main$2, {
|
|
123
|
-
key: 0,
|
|
124
|
-
title: "Profile",
|
|
125
|
-
class: "mn-b-thin"
|
|
126
|
-
}, {
|
|
127
|
-
default: withCtx(() => [
|
|
128
|
-
createElementVNode("div", _hoisted_6, [
|
|
129
|
-
createVNode(_sfc_main$3, {
|
|
130
|
-
photo: state.department.profile.photo,
|
|
131
|
-
"onUpdate:photo": _cache[0] || (_cache[0] = ($event) => state.department.profile.photo = $event),
|
|
132
|
-
uploadPath: "organizations/" + state.department.name + "/avatars",
|
|
133
|
-
class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
|
|
134
|
-
}, null, 8, ["photo", "uploadPath"]),
|
|
135
|
-
createElementVNode("div", _hoisted_7, [
|
|
136
|
-
createVNode(Field, {
|
|
137
|
-
field: state.department.profile.name,
|
|
138
|
-
"onUpdate:field": _cache[1] || (_cache[1] = ($event) => state.department.profile.name = $event),
|
|
139
|
-
label: "Name",
|
|
140
|
-
placeholder: "Department Name",
|
|
141
|
-
class: "mn-b-small bg-white radius-small pd-medium",
|
|
142
|
-
validation: _ctx.organizationName
|
|
143
|
-
}, null, 8, ["field", "validation"]),
|
|
144
|
-
createVNode(Field, {
|
|
145
|
-
field: state.department.profile.description,
|
|
146
|
-
"onUpdate:field": _cache[2] || (_cache[2] = ($event) => state.department.profile.description = $event),
|
|
147
|
-
label: "Description",
|
|
148
|
-
placeholder: "Department description (max 120 symbols)",
|
|
149
|
-
class: "bg-white radius-small pd-medium",
|
|
150
|
-
validation: _ctx.organizationName
|
|
151
|
-
}, null, 8, ["field", "validation"])
|
|
152
|
-
])
|
|
153
|
-
])
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
})) : createCommentVNode("", true),
|
|
157
|
-
createVNode(_sfc_main$2, {
|
|
158
|
-
title: "Team",
|
|
159
|
-
placeholder: "No members added yet",
|
|
160
|
-
actions: [{
|
|
161
|
-
label: "+",
|
|
162
|
-
function: () => openMemberPopup()
|
|
163
|
-
}],
|
|
164
|
-
class: "cols-1 gap-thin mn-b-thin"
|
|
165
|
-
}, {
|
|
166
|
-
default: withCtx(() => [
|
|
167
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(state.department.members, (member, index) => {
|
|
168
|
-
return openBlock(), createBlock(_sfc_main$4, {
|
|
169
|
-
class: "h-4r bg-white pd-thin radius-medium w-100",
|
|
170
|
-
key: index,
|
|
171
|
-
user: member.user,
|
|
172
|
-
photo: member.user.profile.photo,
|
|
173
|
-
name: member.user.profile.name || member.user.phone || member.user.email || member.user._id,
|
|
174
|
-
position: member.position,
|
|
175
|
-
action: {
|
|
176
|
-
label: {
|
|
177
|
-
is: _sfc_main$5,
|
|
178
|
-
props: { class: "i-medium", fill: "rgb(var(--white)" }
|
|
179
|
-
},
|
|
180
|
-
method: () => removeMember(member)
|
|
181
|
-
}
|
|
182
|
-
}, null, 8, ["user", "photo", "name", "position", "action"]);
|
|
183
|
-
}), 128))
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
}, 8, ["actions"]),
|
|
187
|
-
createVNode(_sfc_main$6, {
|
|
188
|
-
title: "Add member",
|
|
189
|
-
onClosePopup: closeMemberPopup,
|
|
190
|
-
isPopupOpen: isOpenAddMemberPopup.value,
|
|
191
|
-
class: "bg-white w-max-30r radius-big pd-big"
|
|
192
|
-
}, {
|
|
193
|
-
default: withCtx(() => [
|
|
194
|
-
createVNode(_sfc_main$7, {
|
|
195
|
-
search: {
|
|
196
|
-
placeholder: "Search customer...",
|
|
197
|
-
class: "bg-light mn-b-thin"
|
|
198
|
-
},
|
|
199
|
-
states: {
|
|
200
|
-
empty: {
|
|
201
|
-
title: "No Members Found",
|
|
202
|
-
description: "Currently, there are no members in organization."
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
store: {
|
|
206
|
-
read: (options) => actions.read(options),
|
|
207
|
-
state: null
|
|
208
|
-
},
|
|
209
|
-
options: {
|
|
210
|
-
target: unref(route).params._id,
|
|
211
|
-
role: ["member"]
|
|
212
|
-
},
|
|
213
|
-
class: "bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"
|
|
214
|
-
}, {
|
|
215
|
-
default: withCtx(({
|
|
216
|
-
items
|
|
217
|
-
}) => [
|
|
218
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (user, index) => {
|
|
219
|
-
return openBlock(), createBlock(_sfc_main$4, {
|
|
220
|
-
key: user._id,
|
|
221
|
-
user: user.user,
|
|
222
|
-
photo: user.user.profile?.photo,
|
|
223
|
-
name: user.user.profile?.name || user.user.phone || user.user.email,
|
|
224
|
-
onClick: () => {
|
|
225
|
-
actions$1.add(state.department.members, { _id: user.user._id, user: user.user, position: "Member" });
|
|
226
|
-
closeMemberPopup();
|
|
227
|
-
},
|
|
228
|
-
class: "h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"
|
|
229
|
-
}, null, 8, ["user", "photo", "name", "onClick"]);
|
|
230
|
-
}), 128))
|
|
231
|
-
]),
|
|
232
|
-
_: 1
|
|
233
|
-
}, 8, ["store", "options"])
|
|
234
|
-
]),
|
|
235
|
-
_: 1
|
|
236
|
-
}, 8, ["isPopupOpen"]),
|
|
237
|
-
createElementVNode("div", _hoisted_8, [
|
|
238
|
-
createElementVNode("div", _hoisted_9, [
|
|
239
|
-
_cache[6] || (_cache[6] = createElementVNode("h3", { class: "mn-b-semi" }, "Department Settings", -1)),
|
|
240
|
-
_cache[7] || (_cache[7] = createElementVNode("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1)),
|
|
241
|
-
createElementVNode("div", _hoisted_10, [
|
|
242
|
-
createVNode(_sfc_main$8, {
|
|
243
|
-
label: "Hidden department",
|
|
244
|
-
name: "hidden",
|
|
245
|
-
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
|
246
|
-
"onUpdate:radio": _cache[3] || (_cache[3] = (updated) => state.department.hidden = !state.department.hidden),
|
|
247
|
-
radio: state.department.hidden
|
|
248
|
-
}, null, 8, ["radio"])
|
|
249
|
-
])
|
|
250
|
-
]),
|
|
251
|
-
createElementVNode("div", _hoisted_11, [
|
|
252
|
-
_cache[8] || (_cache[8] = createElementVNode("h3", { class: "mn-b-semi" }, "Acessess", -1)),
|
|
253
|
-
_cache[9] || (_cache[9] = createElementVNode("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1)),
|
|
254
|
-
createElementVNode("div", _hoisted_12, [
|
|
255
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(state.department.accesses, (actions2, category) => {
|
|
256
|
-
return openBlock(), createElementBlock("div", { key: category }, [
|
|
257
|
-
createElementVNode("h4", null, toDisplayString(category.charAt(0).toUpperCase() + category.slice(1)), 1),
|
|
258
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(actions2, (value, action) => {
|
|
259
|
-
return openBlock(), createBlock(_sfc_main$8, {
|
|
260
|
-
key: action,
|
|
261
|
-
label: action,
|
|
262
|
-
name: action,
|
|
263
|
-
radio: value,
|
|
264
|
-
"onUpdate:radio": (updated) => state.department.accesses[category][action] = !value,
|
|
265
|
-
class: "w-100 mn-r-small bg-white radius-small pd-small"
|
|
266
|
-
}, null, 8, ["label", "name", "radio", "onUpdate:radio"]);
|
|
267
|
-
}), 128))
|
|
268
|
-
]);
|
|
269
|
-
}), 128))
|
|
270
|
-
])
|
|
271
|
-
])
|
|
272
|
-
])
|
|
273
|
-
]);
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
export {
|
|
278
|
-
_sfc_main as default
|
|
279
|
-
};
|
|
280
|
-
//# sourceMappingURL=DepartmentEdit.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DepartmentEdit.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex-v-center flex bg-light pd-medium radius-medium\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members in organization.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <div v-for=\"(actions, category) in departments.state.department.accesses\" :key=\"category\">\n <h4>{{ category.charAt(0).toUpperCase() + category.slice(1) }}</h4>\n <Checkbox\n v-for=\"(value, action) in actions\"\n :key=\"action\"\n :label=\"action\"\n :name=\"action\"\n :radio=\"value\"\n @update:radio=\"updated => (departments.state.department.accesses[category][action] = !value)\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n />\n </div>\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@martyrs/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@martyrs/src/components/Tab/Tab.vue\";\nimport Field from \"@martyrs/src/components/Field/Field.vue\";\nimport Select from \"@martyrs/src/components/Select/Select.vue\";\nimport Checkbox from \"@martyrs/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@martyrs/src/components/Address/Address.vue\";\nimport LocationMarker from \"@martyrs/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@martyrs/src/components/Button/Button.vue\";\nimport Popup from \"@martyrs/src/components/Popup/Popup.vue\";\nimport Block from '@martyrs/src/components/Block/Block.vue';\nimport Feed from '@martyrs/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@martyrs/src/modules/icons/navigation/IconDelete.vue'\n\nimport DepartmentSub from \"@martyrs/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@martyrs/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport * as globals from \"@martyrs/src/modules/globals/views/store/globals.js\";\nimport * as departments from \"@martyrs/src/modules/organizations/store/departments.js\";\nimport * as memberships from \"@martyrs/src/modules/organizations/store/memberships.js\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkOA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,mBAAe,YAAY;AACX,UAAIA,QAAkB,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,UAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA,cAAS;AAIT,UAAM,uBAAuB,IAAI,KAAK;AACtC,UAAM,iBAAiB,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8B,QAAI,KAAK;AACZ,QAAI,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAMA,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACE;AACA,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACE;AAAA,IACF;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAE,CAAE;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACE;AAAA,IAEF;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,kBAAgB,OAAOD,MAAkB,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACtF;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|