@ozdao/prometheus-framework 0.2.80 → 0.2.82
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +3 -3
- package/dist/credentials.schema-CDZCKfEI.mjs +106 -0
- package/dist/credentials.schema-CfhPcsuI.js +105 -0
- package/dist/events.server.js +4 -15
- package/dist/events.server.mjs +3 -14
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-B6a1mPgp.mjs +217 -0
- package/dist/index-BCCiEK_u.js +216 -0
- package/dist/main-8N2Jmsuk.js +91 -0
- package/dist/main-CkeuHuCY.mjs +13619 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-Cu_mPkjE.js +77 -0
- package/dist/metadata.schema-cbFgazeK.mjs +78 -0
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -0
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +238 -0
- package/dist/organizations.server.js +297 -134
- package/dist/organizations.server.mjs +295 -132
- package/dist/products.server.js +2 -2
- package/dist/products.server.mjs +2 -2
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +33 -24
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +23 -20
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +32 -155
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +71 -60
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +325 -340
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +2 -2
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +53 -44
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +18 -19
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +28 -28
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +26 -26
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +78 -103
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +132 -141
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +29 -27
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +32 -25
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +6 -3
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +70 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.js +35 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +63 -86
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +174 -114
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +39 -39
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +141 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +77 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +46 -35
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +5 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.js +30 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +24 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +39 -50
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +161 -138
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +199 -79
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +83 -126
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +59 -70
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +34 -36
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +38 -18
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +34 -35
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +41 -21
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +24 -26
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +78 -0
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +13 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/queryProcessor-BJdKh0Ow.mjs +162 -0
- package/dist/queryProcessor-DRMo_GWK.js +161 -0
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/users.server.js +69 -38
- package/dist/users.server.mjs +67 -36
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/dist/web-CtVocufd.js +1 -0
- package/dist/web-DNq1tHCE.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +13 -2
- package/src/components/Block/Block.vue +3 -2
- package/src/components/Button/Button.vue +9 -12
- package/src/components/Feed/Feed.vue +28 -6
- package/src/components/FieldPhone/FieldPhone.vue +592 -558
- package/src/components/LocationMarker/LocationMarker.vue +26 -22
- package/src/components/Popup/Popup.vue +22 -23
- package/src/components/Select/Select.vue +43 -32
- package/src/components/Slider/Slider.vue +3 -4
- package/src/modules/auth/components/pages/Invite.vue +7 -7
- package/src/modules/auth/store/auth.js +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +44 -29
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/events/components/blocks/CardEvent.vue +4 -3
- package/src/modules/events/components/pages/Event.vue +4 -3
- package/src/modules/events/components/pages/Events.vue +23 -6
- package/src/modules/events/components/sections/HeroEvent.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +19 -7
- package/src/modules/globals/controllers/utils/queryProcessor.js +21 -7
- package/src/modules/globals/localization/vue-i18n.js +3 -0
- package/src/modules/globals/models/credentials.schema.js +7 -0
- package/src/modules/globals/models/metadata.schema.js +17 -0
- package/src/modules/globals/models/profile.schema.js +23 -0
- package/src/modules/globals/models/socials.schema.js +22 -0
- package/src/modules/globals/router/routerGuards.js +1 -0
- package/src/modules/globals/services/globals.cashe.js +26 -0
- package/src/modules/globals/services/globals.crud.js +115 -0
- package/src/modules/globals/services/globals.logger.js +41 -0
- package/src/modules/globals/services/globals.store.js +114 -0
- package/src/modules/icons/entities/IconGallery.vue +14 -0
- package/src/modules/icons/entities/IconLeftovers.vue +14 -0
- package/src/modules/icons/entities/IconOrders.vue +15 -0
- package/src/modules/icons/entities/IconProducts.vue +14 -0
- package/src/modules/landing/components/sections/HeroSection.vue +1 -1
- package/src/modules/landing/components/sections/MobileApp.vue +4 -4
- package/src/modules/landing/router/landing.js +1 -1
- package/src/modules/marketplace/components/sections/Filters.vue +3 -3
- package/src/modules/middlewares/server/accessors/AccessController.js +33 -0
- package/src/modules/middlewares/server/accessors/ReadDepartments.js +101 -0
- package/src/modules/middlewares/server/verifyAccesses.js +33 -0
- package/src/modules/middlewares/server/verifyInvites.js +4 -4
- package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +105 -68
- package/src/modules/orders/components/pages/Orders.vue +2 -2
- package/src/modules/orders/components/sections/FormAddCustomer.vue +152 -0
- package/src/modules/orders/components/sections/FormCustomerDetails.vue +67 -0
- package/src/modules/orders/components/sections/FormDelivery.vue +17 -3
- package/src/modules/orders/controllers/applications.controller.js +2 -0
- package/src/modules/orders/controllers/orders.controller.js +77 -52
- package/src/modules/orders/models/customer.model.js +54 -18
- package/src/modules/orders/models/order.model.js +1 -1
- package/src/modules/orders/orders.client.js +51 -51
- package/src/modules/orders/orders.server.js +32 -12
- package/src/modules/orders/router/orders.router.js +36 -41
- package/src/modules/orders/routes/orders.routes.js +3 -21
- package/src/modules/orders/store/customers.store.js +5 -0
- package/src/modules/orders/store/models/customer.js +29 -0
- package/src/modules/orders/store/orders.js +14 -20
- package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +1 -12
- package/src/modules/organizations/components/pages/Department.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +72 -48
- package/src/modules/organizations/components/pages/Members.vue +178 -64
- package/src/modules/organizations/components/pages/Organization.vue +1 -41
- package/src/modules/organizations/components/sections/MembersAdd.vue +44 -52
- package/src/modules/organizations/controllers/departments.controller.js +2 -4
- package/src/modules/organizations/controllers/invites.controller.js +24 -23
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/models/department.model.js +52 -2
- package/src/modules/organizations/models/invite.model.js +29 -32
- package/src/modules/organizations/models/membership.model.js +2 -0
- package/src/modules/organizations/models/organization.model.js +2 -1
- package/src/modules/organizations/organizations.client.js +0 -2
- package/src/modules/organizations/routes/departments.routes.js +18 -7
- package/src/modules/organizations/routes/invites.routes.js +2 -2
- package/src/modules/organizations/store/departments.js +22 -1
- package/src/modules/organizations/store/invites.js +74 -90
- package/src/modules/products/components/blocks/CardProduct.vue +24 -0
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/reports/components/sections/FormReport.vue +40 -40
- package/src/modules/spots/components/pages/Spot.vue +1 -1
- package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
- package/src/modules/users/components/blocks/CardUser.vue +85 -0
- package/src/modules/users/controllers/users.controller.js +36 -13
- package/src/modules/users/middlewares/visitor.logger.js +66 -0
- package/src/modules/users/models/request.model.js +18 -0
- package/src/modules/users/models/user.model.js +26 -55
- package/src/modules/users/models/visitor.model.js +14 -0
- package/src/modules/users/store/users.js +2 -11
- package/src/modules/wallet/controllers/routes/payments.routes.js +2 -0
- package/src/components/FieldPhone/FieldPhone(script-setup).vue +0 -1646
- package/src/components/FieldPhone/FieldPhone2.vue +0 -671
- package/src/modules/orders/components/sections/FormClientDetails.vue +0 -61
- package/src/modules/organizations/components/blocks/User.vue +0 -69
- /package/src/modules/backoffice/components/admin/{User.vue → UserEdit.vue} +0 -0
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js
CHANGED
@@ -1,278 +1,301 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRouter as
|
1
|
+
import { ref as c, openBlock as n, createElementBlock as i, createElementVNode as s, unref as k, createVNode as r, withCtx as m, createTextVNode as x, createBlock as g, createCommentVNode as w, Fragment as C, renderList as U } from "vue";
|
2
|
+
import { useRouter as F, useRoute as H } from "vue-router";
|
3
3
|
import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
4
4
|
import "vue-i18n";
|
5
5
|
import "../../../globals/localization/vue-i18n.js";
|
6
6
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
7
7
|
import L from "../../../../components/UploadImage/UploadImage.vue.js";
|
8
8
|
import "../../../../components/Tab/Tab.vue.js";
|
9
|
-
import
|
10
|
-
import "../../../../components/Select/Select.
|
11
|
-
import
|
9
|
+
import O from "../../../../components/Field/Field.vue2.js";
|
10
|
+
import "../../../../components/Select/Select.vue.js";
|
11
|
+
import l from "../../../../components/Checkbox/Checkbox.vue.js";
|
12
|
+
import "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
|
12
13
|
import "../../../../components/Address/Address.vue.js";
|
13
14
|
import "../../../../components/Loader/Loader.vue.js";
|
14
15
|
import "../../../../components/LocationMarker/LocationMarker.vue.js";
|
15
|
-
import
|
16
|
-
import
|
16
|
+
import $ from "../../../../components/Button/Button.vue2.js";
|
17
|
+
import N from "../../../../components/Popup/Popup.vue2.js";
|
17
18
|
import E from "../../../../components/Block/Block.vue.js";
|
18
19
|
import "../blocks/EditArray.vue2.js";
|
19
20
|
import j from "../blocks/DepartmentSub.vue.js";
|
20
21
|
import M from "../blocks/DepartmentMemberModify.vue.js";
|
21
|
-
import q from "
|
22
|
-
import { state as e, actions as
|
23
|
-
import { state as
|
22
|
+
import q from "../../../users/components/blocks/CardUser.vue.js";
|
23
|
+
import { state as e, actions as u } from "../../store/departments.js";
|
24
|
+
import { state as R, actions as G } from "../../store/memberships.js";
|
24
25
|
const I = { class: "for-transition pd-thin w-100" }, J = { class: "mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big" }, K = {
|
25
26
|
key: 0,
|
26
27
|
class: "mn-r-auto"
|
27
28
|
}, Q = {
|
28
29
|
key: 1,
|
29
30
|
class: "mn-r-auto"
|
30
|
-
}, W = { class: "flex-nowrap flex pd-thin" }, X = { class: "cols-2-fit-content" }, Y = { class: "w-100 flex-child-grow-1 flex-child" }, Z = { class: "cols-2 gap-thin" }, ee = { class: "bg-grey pd-medium o-hidden radius-big" }, te = /* @__PURE__ */
|
31
|
+
}, W = { class: "flex-nowrap flex pd-thin" }, X = { class: "cols-2-fit-content" }, Y = { class: "w-100 flex-child-grow-1 flex-child" }, Z = { class: "cols-2 gap-thin" }, ee = { class: "bg-grey pd-medium o-hidden radius-big" }, te = /* @__PURE__ */ s("h3", { class: "mn-b-semi" }, "Department Settings", -1), ae = /* @__PURE__ */ s("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1), se = { class: "cols-1 gap-thin" }, re = /* @__PURE__ */ s("h4", null, "Products", -1), de = { class: "bg-grey pd-medium o-hidden radius-big" }, ne = /* @__PURE__ */ s("h3", { class: "mn-b-semi" }, "Acessess", -1), le = /* @__PURE__ */ s("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1), oe = { class: "cols-1 gap-thin" }, ie = /* @__PURE__ */ s("h4", null, "Products", -1), me = /* @__PURE__ */ s("h4", null, "Orders", -1), pe = /* @__PURE__ */ s("h4", null, "Departments", -1), ce = {
|
31
32
|
key: 1,
|
32
33
|
class: "flex-nowrap flex pd-thin"
|
33
34
|
}, ue = {
|
34
35
|
id: "dash",
|
35
36
|
class: "pd-medium bg-white"
|
36
|
-
},
|
37
|
+
}, fe = { class: "mn-b-regular flex-v-center flex-nowrap flex" }, be = /* @__PURE__ */ s("h3", { class: "mn-r-small" }, "Подотделы ", -1), he = { class: "mn-b-small" }, _e = { key: 0 }, je = {
|
37
38
|
__name: "DepartmentEdit",
|
38
|
-
setup(
|
39
|
-
const
|
40
|
-
async function
|
41
|
-
|
39
|
+
setup(ge) {
|
40
|
+
const S = F(), d = H();
|
41
|
+
async function z() {
|
42
|
+
d.params.department && await G.read({ target: d.params._id }), c(R.memberships), d.params.department && await u.readOne(d.params.department);
|
42
43
|
}
|
43
|
-
|
44
|
-
const f =
|
45
|
-
function
|
46
|
-
f.value = !0, typeof
|
44
|
+
z();
|
45
|
+
const f = c(!1), b = c(null);
|
46
|
+
function v(o) {
|
47
|
+
f.value = !0, typeof o == "number" && (b.value = o);
|
47
48
|
}
|
48
|
-
function
|
49
|
-
f.value = !1,
|
49
|
+
function D() {
|
50
|
+
f.value = !1, b.value = null;
|
50
51
|
}
|
51
|
-
const
|
52
|
-
function
|
53
|
-
|
52
|
+
const h = c(!1), _ = c(null);
|
53
|
+
function y(o) {
|
54
|
+
h.value = !0, typeof o == "number" && (_.value = o);
|
54
55
|
}
|
55
|
-
function
|
56
|
-
|
56
|
+
function P() {
|
57
|
+
h.value = !1, _.value = null;
|
57
58
|
}
|
58
|
-
async function
|
59
|
-
|
60
|
-
|
59
|
+
async function T() {
|
60
|
+
d.params.department && await u.update(
|
61
|
+
d.params._id,
|
61
62
|
e.department
|
62
|
-
),
|
63
|
-
|
63
|
+
), d.params.department || await u.create(
|
64
|
+
d.params._id,
|
64
65
|
e.department
|
65
66
|
);
|
66
67
|
}
|
67
|
-
function
|
68
|
-
|
68
|
+
function V() {
|
69
|
+
S.replace({ name: "Department", params: { _id: d.params._id, department: e.department._id } });
|
69
70
|
}
|
70
71
|
async function A() {
|
71
|
-
await
|
72
|
-
|
72
|
+
await u.delete(
|
73
|
+
d.params._id,
|
73
74
|
e.department
|
74
75
|
);
|
75
76
|
}
|
76
|
-
return (
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
submit:
|
82
|
-
callback:
|
77
|
+
return (o, t) => (n(), i("div", I, [
|
78
|
+
s("header", J, [
|
79
|
+
k(d).params.department ? (n(), i("h1", K, "Edit Department")) : (n(), i("h1", Q, "Create Department")),
|
80
|
+
s("section", W, [
|
81
|
+
r($, {
|
82
|
+
submit: T,
|
83
|
+
callback: V,
|
83
84
|
class: "bg-main"
|
84
85
|
}, {
|
85
|
-
default:
|
86
|
+
default: m(() => [
|
86
87
|
x("Save Department")
|
87
88
|
]),
|
88
89
|
_: 1
|
89
90
|
})
|
90
91
|
])
|
91
92
|
]),
|
92
|
-
e.department.profile ? (
|
93
|
+
e.department.profile ? (n(), g(E, {
|
93
94
|
key: 0,
|
94
95
|
title: "Profile",
|
95
96
|
class: "mn-b-thin"
|
96
97
|
}, {
|
97
|
-
default:
|
98
|
-
|
99
|
-
|
98
|
+
default: m(() => [
|
99
|
+
s("div", X, [
|
100
|
+
r(L, {
|
100
101
|
photo: e.department.profile.photo,
|
101
|
-
"onUpdate:photo":
|
102
|
+
"onUpdate:photo": t[0] || (t[0] = (a) => e.department.profile.photo = a),
|
102
103
|
uploadPath: "organizations/" + e.department.name + "/avatars",
|
103
104
|
class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
|
104
105
|
}, null, 8, ["photo", "uploadPath"]),
|
105
|
-
|
106
|
-
|
106
|
+
s("div", Y, [
|
107
|
+
r(O, {
|
107
108
|
field: e.department.profile.name,
|
108
|
-
"onUpdate:field":
|
109
|
+
"onUpdate:field": t[1] || (t[1] = (a) => e.department.profile.name = a),
|
109
110
|
label: "Name",
|
110
111
|
placeholder: "Department Name",
|
111
112
|
class: "mn-b-small bg-white radius-small pd-medium",
|
112
|
-
validation:
|
113
|
+
validation: o.organizationName
|
113
114
|
}, null, 8, ["field", "validation"]),
|
114
|
-
|
115
|
+
r(O, {
|
115
116
|
field: e.department.profile.description,
|
116
|
-
"onUpdate:field":
|
117
|
+
"onUpdate:field": t[2] || (t[2] = (a) => e.department.profile.description = a),
|
117
118
|
label: "Description",
|
118
119
|
placeholder: "Department description (max 120 symbols)",
|
119
120
|
class: "bg-white radius-small pd-medium",
|
120
|
-
validation:
|
121
|
+
validation: o.organizationName
|
121
122
|
}, null, 8, ["field", "validation"])
|
122
123
|
])
|
123
124
|
])
|
124
125
|
]),
|
125
126
|
_: 1
|
126
|
-
})) :
|
127
|
-
|
127
|
+
})) : w("", !0),
|
128
|
+
r(E, {
|
128
129
|
title: "Team",
|
129
130
|
placeholder: "No members added yet",
|
130
131
|
actions: [{
|
131
132
|
label: "+",
|
132
|
-
function: () =>
|
133
|
+
function: () => v()
|
133
134
|
}],
|
134
135
|
class: "cols-1 gap-thin mn-b-thin"
|
135
136
|
}, {
|
136
|
-
default:
|
137
|
-
(
|
137
|
+
default: m(() => [
|
138
|
+
(n(!0), i(C, null, U(e.department.members, (a, p) => (n(), g(q, {
|
138
139
|
class: "bg-grey o-hidden radius-small mn-b-thin",
|
139
140
|
key: p,
|
140
|
-
user:
|
141
|
-
photo:
|
142
|
-
name:
|
143
|
-
position:
|
144
|
-
onClick: (
|
141
|
+
user: a.user,
|
142
|
+
photo: a.user.profile.photo,
|
143
|
+
name: a.user.profile.name || a.user.phone || a.user.email || a.user._id,
|
144
|
+
position: a.position,
|
145
|
+
onClick: (B) => v(p)
|
145
146
|
}, null, 8, ["user", "photo", "name", "position", "onClick"]))), 128))
|
146
147
|
]),
|
147
148
|
_: 1
|
148
149
|
}, 8, ["actions"]),
|
149
|
-
|
150
|
-
title: "
|
151
|
-
onClosePopup:
|
150
|
+
r(N, {
|
151
|
+
title: "Add member",
|
152
|
+
onClosePopup: D,
|
152
153
|
isPopupOpen: f.value,
|
153
154
|
class: "bg-white w-max-30r radius-big pd-big"
|
154
155
|
}, {
|
155
|
-
default:
|
156
|
-
|
156
|
+
default: m(() => [
|
157
|
+
r(M, {
|
157
158
|
members: e.department.members,
|
158
|
-
member:
|
159
|
-
users:
|
160
|
-
onCallback:
|
159
|
+
member: b.value,
|
160
|
+
users: R.memberships,
|
161
|
+
onCallback: D
|
161
162
|
}, null, 8, ["members", "member", "users"])
|
162
163
|
]),
|
163
164
|
_: 1
|
164
165
|
}, 8, ["isPopupOpen"]),
|
165
|
-
|
166
|
-
|
166
|
+
s("div", Z, [
|
167
|
+
s("div", ee, [
|
167
168
|
te,
|
168
169
|
ae,
|
169
|
-
|
170
|
-
|
171
|
-
|
170
|
+
s("div", se, [
|
171
|
+
re,
|
172
|
+
r(l, {
|
172
173
|
label: "Hidden department",
|
173
|
-
name: "
|
174
|
-
value: "pickup",
|
174
|
+
name: "hidden",
|
175
175
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
176
|
-
radio: e.department.
|
176
|
+
"onUpdate:radio": t[3] || (t[3] = (a) => e.department.hidden = !e.department.hidden),
|
177
|
+
radio: e.department.hidden
|
177
178
|
}, null, 8, ["radio"])
|
178
179
|
])
|
179
180
|
]),
|
180
|
-
|
181
|
-
ie,
|
181
|
+
s("div", de, [
|
182
182
|
ne,
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
183
|
+
le,
|
184
|
+
s("div", oe, [
|
185
|
+
ie,
|
186
|
+
r(l, {
|
187
|
+
label: "Read products",
|
188
|
+
name: "readProducts",
|
189
189
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
190
|
-
radio: e.department.
|
190
|
+
radio: e.department.accesses.products.read,
|
191
|
+
"onUpdate:radio": t[4] || (t[4] = (a) => e.department.accesses.products.read = !e.department.accesses.products.read)
|
191
192
|
}, null, 8, ["radio"]),
|
192
|
-
|
193
|
+
r(l, {
|
193
194
|
label: "Edit products",
|
194
|
-
name: "
|
195
|
-
value: "courier",
|
195
|
+
name: "editProducts",
|
196
196
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
197
|
-
radio: e.department.
|
197
|
+
radio: e.department.accesses.products.edit,
|
198
|
+
"onUpdate:radio": t[5] || (t[5] = (a) => e.department.accesses.products.edit = !e.department.accesses.products.edit)
|
198
199
|
}, null, 8, ["radio"]),
|
199
|
-
|
200
|
-
label: "Delete
|
201
|
-
name: "
|
202
|
-
value: "post",
|
200
|
+
r(l, {
|
201
|
+
label: "Delete products",
|
202
|
+
name: "deleteProducts",
|
203
203
|
class: "w-100 bg-white radius-small pd-small",
|
204
|
-
radio: e.department.
|
204
|
+
radio: e.department.accesses.products.delete,
|
205
|
+
"onUpdate:radio": t[6] || (t[6] = (a) => e.department.accesses.products.delete = !e.department.accesses.products.delete)
|
205
206
|
}, null, 8, ["radio"]),
|
206
|
-
|
207
|
-
|
208
|
-
label: "
|
209
|
-
name: "
|
210
|
-
value: "pickup",
|
207
|
+
me,
|
208
|
+
r(l, {
|
209
|
+
label: "Read orders",
|
210
|
+
name: "readOrders",
|
211
211
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
212
|
-
radio: e.department.
|
212
|
+
radio: e.department.accesses.orders.read,
|
213
|
+
"onUpdate:radio": t[7] || (t[7] = (a) => e.department.accesses.orders.read = !e.department.accesses.orders.read)
|
213
214
|
}, null, 8, ["radio"]),
|
214
|
-
|
215
|
+
r(l, {
|
215
216
|
label: "Confirm orders",
|
216
|
-
name: "
|
217
|
-
value: "courier",
|
217
|
+
name: "confirmOrders",
|
218
218
|
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
219
|
-
radio: e.department.
|
219
|
+
radio: e.department.accesses.orders.confirm,
|
220
|
+
"onUpdate:radio": t[8] || (t[8] = (a) => e.department.accesses.orders.confirm = !e.department.accesses.orders.confirm)
|
220
221
|
}, null, 8, ["radio"]),
|
221
|
-
|
222
|
+
r(l, {
|
222
223
|
label: "Delete orders",
|
223
|
-
name: "
|
224
|
-
|
224
|
+
name: "deleteOrders",
|
225
|
+
class: "w-100 bg-white radius-small pd-small",
|
226
|
+
radio: e.department.accesses.orders.delete,
|
227
|
+
"onUpdate:radio": t[9] || (t[9] = (a) => e.department.accesses.orders.delete = !e.department.accesses.orders.delete)
|
228
|
+
}, null, 8, ["radio"]),
|
229
|
+
pe,
|
230
|
+
r(l, {
|
231
|
+
label: "Read departments",
|
232
|
+
name: "readDepartments",
|
233
|
+
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
234
|
+
radio: e.department.accesses.departments.read,
|
235
|
+
"onUpdate:radio": t[10] || (t[10] = (a) => e.department.accesses.departments.read = !e.department.accesses.departments.read)
|
236
|
+
}, null, 8, ["radio"]),
|
237
|
+
r(l, {
|
238
|
+
label: "Edit departments",
|
239
|
+
name: "editDepartments",
|
240
|
+
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
241
|
+
radio: e.department.accesses.departments.edit,
|
242
|
+
"onUpdate:radio": t[11] || (t[11] = (a) => e.department.accesses.departments.edit = !e.department.accesses.departments.edit)
|
243
|
+
}, null, 8, ["radio"]),
|
244
|
+
r(l, {
|
245
|
+
label: "Delete departments",
|
246
|
+
name: "deleteDepartments",
|
225
247
|
class: "w-100 bg-white radius-small pd-small",
|
226
|
-
radio: e.department.
|
248
|
+
radio: e.department.accesses.departments.delete,
|
249
|
+
"onUpdate:radio": t[12] || (t[12] = (a) => e.department.accesses.departments.delete = !e.department.accesses.departments.delete)
|
227
250
|
}, null, 8, ["radio"])
|
228
251
|
])
|
229
252
|
])
|
230
253
|
]),
|
231
|
-
|
232
|
-
|
254
|
+
k(d).params.department ? (n(), i("section", ce, [
|
255
|
+
r($, {
|
233
256
|
submit: A,
|
234
|
-
callback:
|
257
|
+
callback: o.redirectToDash,
|
235
258
|
class: "bg-grey"
|
236
259
|
}, {
|
237
|
-
default:
|
260
|
+
default: m(() => [
|
238
261
|
x("Delete Department")
|
239
262
|
]),
|
240
263
|
_: 1
|
241
264
|
}, 8, ["callback"])
|
242
|
-
])) :
|
243
|
-
|
244
|
-
|
265
|
+
])) : w("", !0),
|
266
|
+
s("div", ue, [
|
267
|
+
r(N, {
|
245
268
|
title: "Добавить подотдел",
|
246
|
-
onClosePopup:
|
247
|
-
isPopupOpen:
|
269
|
+
onClosePopup: P,
|
270
|
+
isPopupOpen: h.value
|
248
271
|
}, {
|
249
|
-
default:
|
250
|
-
|
272
|
+
default: m(() => [
|
273
|
+
r(M, {
|
251
274
|
departments: e.department.subdepartments,
|
252
|
-
department:
|
275
|
+
department: _.value,
|
253
276
|
maindepartment: e.department,
|
254
277
|
alldepartments: e.departments,
|
255
|
-
onCallback:
|
278
|
+
onCallback: P
|
256
279
|
}, null, 8, ["departments", "department", "maindepartment", "alldepartments"])
|
257
280
|
]),
|
258
281
|
_: 1
|
259
282
|
}, 8, ["isPopupOpen"]),
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
283
|
+
s("div", fe, [
|
284
|
+
be,
|
285
|
+
s("div", null, [
|
286
|
+
s("a", {
|
264
287
|
class: "t-main h5",
|
265
|
-
onClick:
|
288
|
+
onClick: t[13] || (t[13] = (a) => y())
|
266
289
|
}, "+")
|
267
290
|
])
|
268
291
|
]),
|
269
|
-
|
270
|
-
e.department.subdepartments.length < 1 ? (
|
271
|
-
(
|
292
|
+
s("ul", he, [
|
293
|
+
e.department.subdepartments.length < 1 ? (n(), i("li", _e, "В отделе еще нет подотделов")) : w("", !0),
|
294
|
+
(n(!0), i(C, null, U(e.department.subdepartments, (a, p) => (n(), g(j, {
|
272
295
|
key: p,
|
273
296
|
class: "bg-grey o-hidden radius-small mn-b-thin",
|
274
|
-
department:
|
275
|
-
onClick: (
|
297
|
+
department: a,
|
298
|
+
onClick: (B) => y(p)
|
276
299
|
}, null, 8, ["department", "onClick"]))), 128))
|
277
300
|
])
|
278
301
|
])
|
@@ -280,5 +303,5 @@ const I = { class: "for-transition pd-thin w-100" }, J = { class: "mn-b-thin fle
|
|
280
303
|
}
|
281
304
|
};
|
282
305
|
export {
|
283
|
-
|
306
|
+
je as default
|
284
307
|
};
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),c=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const B=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),q=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),M=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),N=require("../blocks/CardDepartment.vue.cjs"),m=require("../../../auth/store/auth.cjs"),l=require("../../store/invites.cjs"),p=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),_=require("../../store/departments.cjs"),x={class:"pd-thin"},P={class:"mn-b-big radius-medium bg-white"},V={key:0,class:"cols-1 gap-thin"},z={key:1},E={__name:"Members",setup(F){const o=f.useRoute();f.useRouter();const u=e.ref(null),s=e.ref("members"),d=e.ref(!1);function g(){d.value=!0}function v(){d.value=!1}e.onMounted(async()=>{u.value=(await h.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=_.state.departments,n=a.flatMap(r=>r.subdepartments.map(t=>t._id));return a.filter(r=>!n.includes(r._id))});async function k(a){await l.actions.create({owner:{type:"Organization",target:u.value._id},creator:{type:"User",target:m.state.user._id},invites:a})}async function y(a,n){confirm("Confirm remove of member")==!0&&(p.state.memberships.splice(a,1),await p.actions.delete(n._id))}async function w(a,n){confirm("Confirm remove of member")==!0&&(l.state.invites.splice(a,1),await l.actions.delete(n._id))}return(a,n)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(q.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${h.state.current.numberOfMembers})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:g,label:"Invite members"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(C.default,{title:"Add members",onClosePopup:v,isPopupOpen:d.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(M.default,{text:"Please enter your email or phone number to send an invitation link:",organization:u.value,onSendInvite:k},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(B.default,{key:0,class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(c.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>_.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id,hidden:!1}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(N.default,{key:i,department:t,organization:e.unref(o).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("section",P,[s.value==="members"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>p.actions.read(r)},options:{target:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:I=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:"x",method:()=>y(i,t)}:null,class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["states","store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>l.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(b.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:"x",method:()=>w(a.index,t)},class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["states","store","options"])])):e.createCommentVNode("",!0)])]))}};exports.default=E;
|