@ozdao/prometheus-framework 0.2.30 → 0.2.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/addMembersQuantity-3505b6f3.mjs +98 -0
- package/dist/addMembersQuantity-fb552ca0.js +97 -0
- package/dist/auth.server.js +6 -9
- package/dist/auth.server.mjs +6 -9
- package/dist/community.server.js +28 -21
- package/dist/community.server.mjs +28 -21
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +114 -111
- package/dist/files.server.mjs +114 -111
- package/dist/gallery.server.js +3 -3
- package/dist/gallery.server.mjs +3 -3
- package/dist/globals.server.js +1 -1
- package/dist/globals.server.mjs +1 -1
- package/dist/index-a8dffc0c.js +213 -0
- package/dist/index-d769324d.mjs +214 -0
- package/dist/mailing-37c2ba41.mjs +68 -0
- package/dist/mailing-fe16a26a.js +67 -0
- package/dist/main.css +1 -1
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/organizations.server.js +125 -25
- package/dist/organizations.server.mjs +125 -25
- package/dist/prometheus-framework.cjs.js +30 -29
- package/dist/prometheus-framework.es.js +2478 -2282
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/users.server.js +1 -1
- package/dist/users.server.mjs +1 -1
- package/package.json +4 -2
- package/src/assets/images/logo.svg +7 -7
- package/src/components/Block/Block.vue +77 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +2 -2
- package/src/components/Button/Button.vue +32 -227
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/components/Chips/Chips.vue +8 -8
- package/src/components/DatePicker/DatePicker.vue +3 -4
- package/src/components/EditImages/EditImages.vue +32 -14
- package/src/{modules/globals/components/sections → components/Feed}/Feed.vue +60 -45
- package/src/components/FieldBig/FieldBig.vue +16 -5
- package/src/components/FieldPhone/FieldPhone.vue +2 -1
- package/src/components/Footer/Footer.vue +36 -27
- package/src/components/Header/Header.vue +161 -166
- package/src/components/Loader/Loader.vue +9 -2
- package/src/components/LocationMarker/LocationMarker.vue +38 -12
- package/src/components/LocationSelection/LocationSelection.vue +67 -75
- package/src/components/Magnifier/Magnifier.vue +3 -3
- package/src/components/Navigation/Navigation.vue +16 -16
- package/src/components/Popup/Popup.vue +8 -6
- package/src/components/Select/Select.vue +35 -6
- package/src/components/SelectMulti/SelectMulti.vue +5 -13
- package/src/components/Shader/Shader.vue +128 -0
- package/src/components/Sidebar/Sidebar.vue +71 -35
- package/src/components/Spoiler/Spoiler.vue +1 -1
- package/src/components/Tab/Tab.vue +1 -1
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/UploadImage/UploadImage.vue +4 -4
- package/src/components/UploadImageMultiple/UploadImageMultiple.vue +54 -10
- package/src/modules/applications/controllers/applications.controller.js +0 -1
- package/src/modules/auth/components/pages/EnterCode.vue +1 -1
- package/src/modules/auth/components/pages/EnterPassword.vue +3 -3
- package/src/modules/auth/components/pages/ResetPassword.vue +1 -2
- package/src/modules/auth/components/pages/SignIn.vue +26 -10
- package/src/modules/auth/components/pages/SignUp.vue +1 -2
- package/src/modules/auth/controllers/twofa.controller.js +4 -4
- package/src/modules/auth/localization/EnterCode.json +2 -2
- package/src/modules/auth/localization/EnterPassword.json +2 -2
- package/src/modules/auth/localization/ResetPassword.json +2 -2
- package/src/modules/auth/localization/SignIn.json +3 -3
- package/src/modules/auth/localization/SignUp.json +3 -3
- package/src/modules/auth/utils/server/verifyAppleIdToken.js +0 -1
- package/src/modules/backoffice/components/layouts/Backoffice.vue +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +171 -120
- package/src/modules/backoffice/router/backoffice.js +119 -129
- package/src/modules/chats/components/blocks/ChatMessage.vue +25 -0
- package/src/modules/chats/components/pages/ChatPage.vue +50 -0
- package/src/modules/chats/components/sections/ChatWindow.vue +38 -0
- package/src/modules/chats/controllers/chats.controller.js +32 -0
- package/src/modules/chats/models/chat.model.js +26 -0
- package/src/modules/chats/routes/chats.routes.js +53 -0
- package/src/modules/chats/store/chat.store.js +61 -0
- package/src/modules/community/components/blocks/CardBlogpost.vue +19 -4
- package/src/modules/community/components/layouts/Community.vue +96 -39
- package/src/modules/community/components/pages/Blog.vue +4 -3
- package/src/modules/community/components/pages/BlogPost.vue +10 -1
- package/src/modules/community/components/pages/CreateBlogPost.vue +36 -17
- package/src/modules/community/components/sections/HotPosts.vue +3 -3
- package/src/modules/community/components/sections/JoinUs.vue +19 -13
- package/src/modules/community/controllers/blog.controller.js +3 -4
- package/src/modules/community/controllers/utils/queryProcessor.js +16 -17
- package/src/modules/community/models/blogpost.model.js +6 -3
- package/src/modules/community/store/blogposts.js +1 -0
- package/src/modules/constructor/components/elements/Embed.vue +12 -1
- package/src/modules/constructor/components/elements/ImageUpload.vue +2 -2
- package/src/modules/constructor/components/elements/Textarea.vue +6 -1
- package/src/modules/constructor/components/elements/Video.vue +79 -0
- package/src/modules/constructor/components/elements/VideoPlayer.vue +59 -0
- package/src/modules/constructor/components/elements/Youtube.vue +52 -0
- package/src/modules/constructor/components/sections/Constructor.vue +27 -3
- package/src/modules/events/components/layouts/layoutEvents.vue +7 -28
- package/src/modules/files/controllers/files.controller.js +9 -22
- package/src/modules/files/middlewares/server/index.js +2 -2
- package/src/modules/files/middlewares/server/middlewareBusboy.js +137 -0
- package/src/modules/files/routes/files.routes.js +9 -9
- package/src/modules/globals/localization/vue-i18n.js +8 -1
- package/src/modules/globals/mixins/mixins.js +23 -13
- package/src/modules/globals/router/routerGuards.js +2 -2
- package/src/modules/globals/store/globals.js +86 -9
- package/src/modules/globals/utils/mailing.js +24 -3
- package/src/modules/icons/entities/IconCommunity.vue +4 -4
- package/src/modules/icons/entities/IconEvents.vue +1 -1
- package/src/modules/icons/entities/IconGroups.vue +1 -1
- package/src/modules/icons/entities/IconPrice.vue +5 -0
- package/src/modules/icons/entities/IconProfile.vue +5 -0
- package/src/modules/icons/entities/IconShopcart.vue +5 -0
- package/src/modules/icons/entities/IconTime.vue +5 -0
- package/src/modules/icons/icons.client.js +4 -0
- package/src/modules/icons/labels/LabelAppStore.vue +24 -24
- package/src/modules/icons/labels/LabelGooglePlay.vue +9 -9
- package/src/modules/icons/logos/Logotype.vue +20 -0
- package/src/modules/icons/navigation/IconAdd.vue +17 -0
- package/src/modules/icons/navigation/IconChevronBottom.vue +18 -0
- package/src/modules/icons/navigation/IconChevronRight.vue +3 -3
- package/src/modules/icons/navigation/IconDelete.vue +19 -0
- package/src/modules/icons/navigation/IconMinus.vue +15 -0
- package/src/modules/icons/navigation/IconSearch.vue +17 -0
- package/src/modules/icons/navigation/IconUpload.vue +16 -0
- package/src/modules/icons/placeholders/PlaceholderImage.vue +5 -0
- package/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue +20 -0
- package/src/modules/icons/placeholders/PlaceholderUserpic.vue +4 -18
- package/src/modules/icons/socials/instagram.vue +1 -1
- package/src/modules/icons/socials/line.vue +1 -1
- package/src/modules/icons/socials/reddit.vue +1 -1
- package/src/modules/icons/socials/telegram.vue +1 -1
- package/src/modules/icons/socials/twitter.vue +1 -1
- package/src/modules/icons/socials/youtube.vue +1 -1
- package/src/modules/landing/components/sections/Guide.vue +92 -0
- package/src/modules/landing/components/sections/MobileApp.vue +23 -12
- package/src/modules/marketplace/components/layouts/Marketplace.vue +76 -188
- package/src/modules/marketplace/components/pages/Catalog.vue +65 -119
- package/src/modules/marketplace/components/sections/Filters.vue +195 -0
- package/src/modules/marketplace/store/marketplace.js +2 -2
- package/src/modules/middlewares/client/auth.validation.js +0 -6
- package/src/modules/middlewares/client/states.validation.js +2 -8
- package/src/modules/middlewares/server/authJwt.js +1 -1
- package/src/modules/mobile/components/Menu/MenuItem.vue +3 -6
- package/src/modules/openai/controllers/openai.controller.js +0 -1
- package/src/modules/orders/components/blocks/CardOrder.vue +166 -0
- package/src/modules/orders/components/blocks/CardOrderItem.vue +59 -66
- package/src/modules/orders/components/blocks/Positions.vue +4 -4
- package/src/modules/orders/components/pages/EditOrder.vue +78 -142
- package/src/modules/orders/components/pages/FormOrder.vue +192 -0
- package/src/modules/orders/components/pages/Order.vue +326 -120
- package/src/modules/orders/components/pages/Orders.vue +13 -9
- package/src/modules/orders/components/pages/{ViewOrder.vue → Orders_refact.vue} +13 -10
- package/src/modules/orders/components/partials/ShopCart.vue +22 -13
- package/src/modules/orders/components/sections/EmptyState.vue +1 -1
- package/src/modules/orders/components/sections/{Form.vue → FormOrderDetails.vue} +38 -106
- package/src/modules/orders/controllers/orders.controller.js +37 -28
- package/src/modules/orders/models/order.model.js +39 -9
- package/src/modules/orders/router/orders.router.js +23 -2
- package/src/modules/orders/routes/orders.routes.js +14 -17
- package/src/modules/orders/store/orders.js +24 -9
- package/src/modules/orders/store/shopcart.js +20 -19
- package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +98 -46
- package/src/modules/organizations/components/blocks/Rating.vue +1 -1
- package/src/modules/organizations/components/blocks/Socials.vue +11 -3
- package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
- package/src/modules/organizations/components/pages/Department.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +4 -4
- package/src/modules/organizations/components/pages/Members.vue +6 -4
- package/src/modules/organizations/components/pages/Organization.vue +120 -49
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +8 -1
- package/src/modules/organizations/components/pages/Organizations.vue +27 -6
- package/src/modules/organizations/components/sections/DetailsTab.vue +11 -9
- package/src/modules/organizations/components/sections/Feed.vue +0 -3
- package/src/modules/organizations/components/sections/FeedDepartments.vue +2 -2
- package/src/modules/organizations/controllers/organizations.controller.js +126 -15
- package/src/modules/organizations/controllers/utils/addMembersQuantity.js +19 -9
- package/src/modules/organizations/models/organization.model.js +5 -2
- package/src/modules/organizations/router/members.router.js +1 -3
- package/src/modules/organizations/router/organizations.js +8 -6
- package/src/modules/organizations/router/products.router.js +36 -2
- package/src/modules/organizations/store/organizations.js +38 -84
- package/src/modules/pages/controllers/pages.controller.js +0 -4
- package/src/modules/payments/controller/payments.controller.js +1 -1
- package/src/modules/products/components/blocks/CardLeftover.vue +17 -22
- package/src/modules/products/components/blocks/CardPosition.vue +96 -49
- package/src/modules/products/components/blocks/CardProduct.vue +24 -53
- package/src/modules/products/components/blocks/Images360.vue +4 -4
- package/src/modules/products/components/blocks/ImagesThumbnails.vue +2 -7
- package/src/modules/products/components/blocks/ListPositions.vue +74 -0
- package/src/modules/products/components/elements/Price.vue +11 -5
- package/src/modules/products/components/elements/THC.vue +6 -6
- package/src/modules/products/components/pages/{LeftoverAdd.vue → EditLeftover.vue} +93 -79
- package/src/modules/products/components/pages/Leftovers.vue +74 -70
- package/src/modules/products/components/pages/Product.vue +4 -7
- package/src/modules/products/components/pages/ProductEdit.vue +230 -88
- package/src/modules/products/components/pages/ProductRecommmendation.vue +1 -1
- package/src/modules/products/components/pages/Products.vue +6 -3
- package/src/modules/products/components/pages/ProductsBackoffice.vue +3 -5
- package/src/modules/products/components/sections/EditModifications.vue +3 -3
- package/src/modules/products/components/sections/EditProductInfo.vue +40 -50
- package/src/modules/products/components/sections/FilterProducts.vue +57 -18
- package/src/modules/products/components/sections/HeroRecommendation.vue +233 -99
- package/src/modules/products/components/sections/MenuSection.vue +127 -0
- package/src/modules/products/components/sections/PopularProducts.vue +81 -37
- package/src/modules/products/components/sections/SectionProduct.vue +21 -23
- package/src/modules/products/controllers/leftovers.controller.js +11 -1
- package/src/modules/products/controllers/products.controller.js +100 -97
- package/src/modules/products/models/leftover.model.js +6 -4
- package/src/modules/products/models/product.model.js +13 -1
- package/src/modules/products/routes/products.routes.js +4 -4
- package/src/modules/products/store/leftovers.js +4 -24
- package/src/modules/products/store/products.js +44 -30
- package/src/modules/spots/components/blocks/CardSpot.vue +43 -72
- package/src/modules/spots/components/layouts/Spots.vue +9 -91
- package/src/modules/spots/components/pages/Map.vue +171 -62
- package/src/modules/spots/components/pages/Spot.vue +1 -1
- package/src/modules/spots/components/pages/SpotEdit.vue +131 -174
- package/src/modules/spots/controllers/spots.controller.js +1 -0
- package/src/modules/spots/models/spot.model.js +6 -3
- package/src/modules/spots/store/spots.js +42 -48
- package/src/modules/users/components/pages/Profile.vue +6 -28
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +1 -1
- package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
- package/src/modules/users/components/pages/ProfileOrganizations.vue +1 -1
- package/src/modules/users/router/users.js +1 -1
- package/src/modules/wallet/components/pages/Wallet.vue +105 -109
- package/src/modules/wallet/controllers/crypto.controller.js +129 -0
- package/src/modules/wallet/models/reward.model.js +53 -0
- package/src/modules/wallet/routes/crypto.routes.js +36 -0
- package/src/modules/wallet/store/wallet.js +52 -49
- package/src/styles/base/all.scss +143 -11
- package/src/styles/base/backgrounds.scss +2 -34
- package/src/styles/base/borders.scss +18 -23
- package/src/styles/base/scrolling.scss +97 -29
- package/src/styles/base/{shadows.scss → shadow_transitions_hover_refactor.scss} +55 -2
- package/src/styles/config.scss +69 -17
- package/src/styles/layout.scss +12 -182
- package/src/styles/reset.scss +20 -21
- package/src/styles/responsive.scss +4 -67
- package/src/styles/theme.scss +3 -4
- package/src/styles/typography.scss +15 -17
- package/src/assets/fonts/AvenirNext-Bold.woff2 +0 -0
- package/src/assets/fonts/AvenirNext-DemiBold.woff2 +0 -0
- package/src/assets/fonts/AvenirNext-Heavy.woff2 +0 -0
- package/src/assets/fonts/AvenirNext-Medium.woff2 +0 -0
- package/src/assets/fonts/AvenirNext-Regular.woff2 +0 -0
- package/src/assets/fonts/AvenirNext-UltraLight.woff2 +0 -0
- package/src/modules/files/middlewares/server/md.js +0 -152
- package/src/modules/files/middlewares/server/middlewareMulter.js +0 -121
- package/src/modules/organizations/controllers/organizations.new.controller.js +0 -372
- package/src/modules/products/components/blocks/EditCategories.vue +0 -68
- package/src/modules/products/components/sections/EditParameters.vue +0 -58
- package/src/modules/products/components/sections/EditProductImages.vue +0 -67
- package/src/modules/spots/components/sections/Feed.vue +0 -64
- package/src/styles/base/border-radius.scss +0 -47
- package/src/styles/base/cursors.scss +0 -23
- package/src/styles/base/height.scss +0 -60
- package/src/styles/base/hovers.scss +0 -110
- package/src/styles/base/positions.scss +0 -192
- package/src/styles/base/transitions.scss +0 -137
- package/src/styles/base/width.scss +0 -2
- package/src/styles/components/block.scss +0 -18
- package/src/styles/components/breadcrumbs.scss +0 -0
- package/src/styles/components/input.scss +0 -319
@@ -1,111 +1,98 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="for-transition w-100">
|
3
|
-
|
4
|
-
<div class="pd-b-zero pd-t-zero pd-thin">
|
5
|
-
<Breadcrumbs class="pd-medium bg-grey radius-big"/>
|
6
|
-
</div>
|
7
|
-
|
8
|
-
<div class="pd-thin">
|
9
|
-
<header class="flex-nowrap flex bg-grey pd-medium radius-big">
|
10
|
-
<h1 v-if="route.params.spot" class="mn-r-auto">Edit Spot</h1>
|
11
|
-
<h1 v-else class="mn-r-auto">Create Spot</h1>
|
2
|
+
<div class="for-transition w-100 cols-1 pd-thin gap-thin">
|
12
3
|
|
13
|
-
<section class="flex-nowrap flex pd-thin">
|
14
|
-
<Button :submit="onSubmit" :callback="redirectTo">Save Spot</Button>
|
15
|
-
</section>
|
16
4
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
5
|
+
<Block class="flex-nowrap flex-v-center flex">
|
6
|
+
|
7
|
+
<h1 class="mn-r-auto">
|
8
|
+
{{ route.params.spot ? spots.state.spot.profile.name : 'Create Spot' }}
|
9
|
+
</h1>
|
10
|
+
|
11
|
+
<Button
|
12
|
+
:submit="onSubmit"
|
13
|
+
:callback="redirectTo"
|
14
|
+
class="bg-main"
|
15
|
+
>
|
16
|
+
Save Spot
|
17
|
+
</Button>
|
18
|
+
</Block>
|
21
19
|
|
22
|
-
<div class="flex-stretch flex-column flex">
|
23
20
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
21
|
+
<div class="cols-2 gap-thin">
|
22
|
+
|
23
|
+
<Block
|
24
|
+
title="Profile"
|
25
|
+
class="mn-b-semi"
|
26
|
+
>
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
<div class="gap-small mn-b-small cols-2-fit-content">
|
31
|
+
<UploadImage
|
32
|
+
v-model:photo="spots.state.spot.profile.photo"
|
33
|
+
:uploadPath="'organizations/' + spots.state.spot.name + '/avatars'"
|
34
|
+
class="aspect-1x1 w-8r o-hidden radius-extra"
|
35
|
+
/>
|
36
|
+
|
37
|
+
<div class="w-100">
|
38
|
+
<Field
|
39
|
+
v-model:field="spots.state.spot.profile.name"
|
40
|
+
label="Name"
|
41
|
+
placeholder="Spot Name"
|
42
|
+
class="mn-b-small bg-white radius-small pd-medium"
|
43
|
+
:validation="organizationName"
|
32
44
|
/>
|
33
|
-
<
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
/>
|
41
|
-
<Field
|
42
|
-
v-model:field="spots.state.spot.profile.description"
|
43
|
-
label="Description"
|
44
|
-
placeholder="Spot description (max 120 symbols)"
|
45
|
-
class="bg-white radius-small pd-medium"
|
46
|
-
:validation="organizationName"
|
47
|
-
/>
|
48
|
-
</div>
|
45
|
+
<Field
|
46
|
+
v-model:field="spots.state.spot.profile.description"
|
47
|
+
label="Description"
|
48
|
+
placeholder="Spot description (max 120 symbols)"
|
49
|
+
class="bg-white radius-small pd-medium"
|
50
|
+
:validation="organizationName"
|
51
|
+
/>
|
49
52
|
</div>
|
50
53
|
</div>
|
51
54
|
|
52
|
-
<
|
53
|
-
|
55
|
+
<Select
|
56
|
+
v-model:select="spots.state.spot.status"
|
57
|
+
label="Status"
|
58
|
+
:options="[
|
59
|
+
'unpublished',
|
60
|
+
'published',
|
61
|
+
'archivied'
|
62
|
+
]"
|
63
|
+
placeholder="Display product"
|
64
|
+
class="pos-relative w-100 mn-b-small bg-white radius-small pd-medium"
|
65
|
+
/>
|
54
66
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
name="Delivery"
|
67
|
-
value="courier"
|
68
|
-
class="w-100 mn-r-small bg-white radius-small pd-small"
|
69
|
-
:radio="spots.state.spot.delivery"
|
70
|
-
/>
|
71
|
-
<Checkbox
|
72
|
-
label="Post"
|
73
|
-
name="Delivery"
|
74
|
-
value="post"
|
75
|
-
class="w-100 bg-white radius-small pd-small"
|
76
|
-
:radio="spots.state.spot.delivery"
|
77
|
-
/>
|
78
|
-
</div>
|
67
|
+
<p class="p-medium mn-b-small">Please the available delivery options:</p>
|
68
|
+
|
69
|
+
<Checkbox
|
70
|
+
v-for="option in ['pickup','courier','post']"
|
71
|
+
:label="option"
|
72
|
+
name="Delivery"
|
73
|
+
:value="option"
|
74
|
+
class="w-100 mn-b-small bg-white radius-small pd-small"
|
75
|
+
:radio="spots.state.spot.delivery"
|
76
|
+
@update:radio="event => spots.state.spot.delivery = event"
|
77
|
+
/>
|
79
78
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
value="bank"
|
93
|
-
class="w-100 mn-r-small bg-white radius-small pd-small"
|
94
|
-
:radio="spots.state.spot.payment"
|
95
|
-
/>
|
96
|
-
<Checkbox
|
97
|
-
label="Crypto"
|
98
|
-
name="Payment"
|
99
|
-
value="crypto"
|
100
|
-
class="w-100 bg-white radius-small pd-small"
|
101
|
-
:radio="spots.state.spot.payment"
|
102
|
-
/>
|
103
|
-
</div>
|
104
|
-
</div>
|
105
|
-
</div>
|
79
|
+
<p class="p-medium mn-b-small">Please select the available payment methods:</p>
|
80
|
+
|
81
|
+
<Checkbox
|
82
|
+
v-for="option in ['cash','bank transfer','crypto']"
|
83
|
+
:label="option"
|
84
|
+
name="Payment"
|
85
|
+
:value="option"
|
86
|
+
class="w-100 mn-b-small bg-white radius-small pd-small"
|
87
|
+
:radio="spots.state.spot.payment"
|
88
|
+
@update:radio="event => spots.state.spot.payment = event"
|
89
|
+
/>
|
90
|
+
</Block>
|
106
91
|
|
107
|
-
<
|
108
|
-
|
92
|
+
<Block
|
93
|
+
title="Location"
|
94
|
+
class="pos-relative"
|
95
|
+
>
|
109
96
|
<Address
|
110
97
|
:apiKey="GOOGLE_MAPS_API_KEY"
|
111
98
|
:address="spots.state.spot.address"
|
@@ -113,7 +100,7 @@
|
|
113
100
|
label="Address"
|
114
101
|
placeholder="Enter delivery address"
|
115
102
|
class="
|
116
|
-
bg-white
|
103
|
+
bg-white pd-small radius-tl-medium radius-tr-medium
|
117
104
|
"
|
118
105
|
@update:location="newLocation => {
|
119
106
|
spots.state.spot.location = newLocation;
|
@@ -122,14 +109,13 @@
|
|
122
109
|
spots.state.spot.address = newAddress;
|
123
110
|
}"
|
124
111
|
/>
|
125
|
-
|
126
|
-
<p class="mn-b-small p-medium">Or choose on map:</p>
|
127
|
-
|
128
112
|
<LocationMarker
|
113
|
+
:apiKey="GOOGLE_MAPS_API_KEY"
|
114
|
+
|
129
115
|
:address="spots.state.spot.address"
|
130
116
|
:location="spots.state.spot.location"
|
131
|
-
|
132
|
-
class="radius-
|
117
|
+
|
118
|
+
class="h-20r mn-b-small radius-bl-medium radius-br-medium o-hidden"
|
133
119
|
@update:location="newLocation => {
|
134
120
|
spots.state.spot.location = newLocation;
|
135
121
|
}"
|
@@ -137,86 +123,36 @@
|
|
137
123
|
spots.state.spot.address = newAddress;
|
138
124
|
}"
|
139
125
|
/>
|
126
|
+
<p class="mn-b-small p-medium">Options:</p>
|
127
|
+
<Checkbox
|
128
|
+
:label="'Hide address'"
|
129
|
+
name="address"
|
130
|
+
class="w-100 mn-r-small bg-white radius-small pd-small"
|
131
|
+
:radio="spots.state.spot.position?.hide"
|
132
|
+
@update:radio="event => spots.state.spot.position.hide = event"
|
140
133
|
|
141
|
-
</div>
|
142
|
-
</div>
|
143
|
-
|
144
|
-
<section class="flex-nowrap flex pd-thin">
|
145
|
-
<Button :submit="onDelete" :callback="redirectToDash" class="bg-grey">Delete Spot</Button>
|
146
|
-
</section>
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<!-- <div id="dash" class="pd-medium bg-white">
|
151
|
-
|
152
|
-
|
153
|
-
<div class="mn-b-regular flex-v-center flex-nowrap flex">
|
154
|
-
<h3 class="mn-r-small">Команда</h3>
|
155
|
-
<div>
|
156
|
-
<a class="t-main h5" @click="openMemberPopup()">+</a>
|
157
|
-
</div>
|
158
|
-
</div>
|
159
|
-
|
160
|
-
<Popup title="Добавить участника" @close-popup="closeMemberPopup" :isPopupOpen="isOpenAddMemberPopup">
|
161
|
-
<SpotMemberModify
|
162
|
-
:members="spots.state.spot.members"
|
163
|
-
:member="selectedMember"
|
164
|
-
:users="users"
|
165
|
-
@callback="closeMemberPopup"
|
166
|
-
/>
|
167
|
-
</Popup>
|
168
|
-
|
169
|
-
|
170
|
-
<ul class=mn-b-small>
|
171
|
-
<li v-if="spots.state.spot.members.length < 1">В отделе еще нет участников</li>
|
172
|
-
<User
|
173
|
-
class="bg-grey o-hidden radius-small mn-b-thin"
|
174
|
-
v-for="(member, index) in spots.state.spot.members"
|
175
|
-
:key="index"
|
176
|
-
:user="member.user"
|
177
|
-
:position="member.position"
|
178
|
-
@click="openMemberPopup(index)"
|
179
134
|
/>
|
180
|
-
</ul>
|
181
135
|
|
136
|
+
<Field
|
137
|
+
v-model:field="spots.state.spot.minorder"
|
138
|
+
label="Min.order"
|
139
|
+
placeholder="Enter minimum order value"
|
140
|
+
class="bg-white radius-small pd-medium"
|
141
|
+
:validation="organizationName"
|
142
|
+
/>
|
182
143
|
|
183
|
-
|
184
|
-
|
185
|
-
:spots="spots.state.spot.subspots"
|
186
|
-
:spot="selectedSpot"
|
187
|
-
:mainspot="spots.state.spot"
|
188
|
-
:allspots="spots.state.spots"
|
189
|
-
@callback="closeSpotPopup"
|
190
|
-
/>
|
191
|
-
</Popup>
|
192
|
-
|
193
|
-
<div class="mn-b-regular flex-v-center flex-nowrap flex">
|
194
|
-
<h3 class="mn-r-small">Подотделы </h3>
|
195
|
-
<div>
|
196
|
-
<a class="t-main h5" @click="openSpotPopup()">+</a>
|
197
|
-
</div>
|
198
|
-
</div>
|
199
|
-
|
200
|
-
<ul class="mn-b-small">
|
201
|
-
<li v-if="spots.state.spot.subspots.length < 1">В отделе еще нет подотделов</li>
|
202
|
-
<SpotSub
|
203
|
-
v-for="(subspot, index) in spots.state.spot.subspots"
|
204
|
-
:key="index" class="bg-grey o-hidden radius-small mn-b-thin"
|
205
|
-
:spot="subspot"
|
206
|
-
@click="openSpotPopup(index)"
|
207
|
-
/>
|
208
|
-
</ul>
|
144
|
+
</Block>
|
145
|
+
</div>
|
209
146
|
|
210
|
-
|
211
|
-
</div> -->
|
147
|
+
<Button :submit="onDelete" :callback="redirectToDash" class="w-100 bg-grey">Delete Spot</Button>
|
212
148
|
</div>
|
213
149
|
</template>
|
214
150
|
|
215
151
|
<script setup>
|
216
|
-
import { ref } from "vue";
|
152
|
+
import { ref, onMounted } from "vue";
|
217
153
|
import { useRoute, useRouter } from "vue-router";
|
218
|
-
|
219
|
-
import
|
154
|
+
|
155
|
+
import Block from '@pf/src/components/Block/Block.vue';
|
220
156
|
import UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';
|
221
157
|
|
222
158
|
|
@@ -243,17 +179,31 @@ const route = useRoute();
|
|
243
179
|
const tabOrganization = ref("details");
|
244
180
|
const showAddNew = ref(false);
|
245
181
|
|
182
|
+
onMounted(() => {
|
183
|
+
// spots.state.spot.location = spots.state.spot.location
|
184
|
+
})
|
185
|
+
|
246
186
|
async function fetchData() {
|
247
187
|
if (route.params.spot) {
|
248
188
|
await memberships.actions.read(route.params.spot);
|
249
189
|
}
|
250
190
|
const users = ref(memberships.state.memberships);
|
251
191
|
|
252
|
-
await spots.actions.read(route.params._id);
|
253
192
|
if (route.params.spot) await spots.actions.readOne(route.params.spot);
|
193
|
+
|
254
194
|
}
|
255
195
|
|
256
|
-
fetchData();
|
196
|
+
await fetchData();
|
197
|
+
|
198
|
+
// const [ lng, lat ] = spots.state.spot.location?.coordinates
|
199
|
+
|
200
|
+
const lng = spots.state.spot.location?.coordinates[0]
|
201
|
+
const lat = spots.state.spot.location?.coordinates[1]
|
202
|
+
|
203
|
+
spots.state.spot.location = {
|
204
|
+
lat: lat || 1,
|
205
|
+
lng: lng || 1
|
206
|
+
}
|
257
207
|
|
258
208
|
const members = ref(spots.state.spot.members);
|
259
209
|
|
@@ -284,6 +234,13 @@ function closeSpotPopup() {
|
|
284
234
|
}
|
285
235
|
|
286
236
|
async function onSubmit() {
|
237
|
+
|
238
|
+
spots.state.spot.location = {
|
239
|
+
type: 'Point',
|
240
|
+
coordinates: [spots.state.spot.location.lng, spots.state.spot.location.lat]
|
241
|
+
}
|
242
|
+
|
243
|
+
|
287
244
|
if (route.params.spot) {
|
288
245
|
await spots.actions.update(
|
289
246
|
route.params._id,
|
@@ -15,15 +15,18 @@ module.exports = (mongoose) => {
|
|
15
15
|
description: { type: String },
|
16
16
|
categories: [String]
|
17
17
|
},
|
18
|
+
minorder: { type: Number },
|
19
|
+
position: {
|
20
|
+
hide: { type: Boolean}
|
21
|
+
},
|
18
22
|
// Working hours
|
19
23
|
address: String,
|
20
24
|
// Position on map
|
21
25
|
location: {
|
22
|
-
lat: Number,
|
23
|
-
lng: Number,
|
24
26
|
type: {
|
25
27
|
type: String,
|
26
|
-
enum: ['Point'],
|
28
|
+
enum: ['Point'],
|
29
|
+
default: 'Point',
|
27
30
|
required: true
|
28
31
|
},
|
29
32
|
coordinates: {
|
@@ -13,18 +13,24 @@ $axios.defaults.withCredentials = true
|
|
13
13
|
const state = reactive({
|
14
14
|
spots: [],
|
15
15
|
spot: {
|
16
|
+
status: 'unpublished',
|
16
17
|
organization: '',
|
18
|
+
|
17
19
|
profile: {
|
18
20
|
photo: '',
|
19
21
|
name: '',
|
20
22
|
description: '',
|
21
23
|
categories: [],
|
22
24
|
},
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
position: {
|
26
|
+
address: undefined,
|
27
|
+
location: undefined,
|
28
|
+
hide: false
|
27
29
|
},
|
30
|
+
|
31
|
+
address: undefined,
|
32
|
+
location: undefined,
|
33
|
+
|
28
34
|
worktime: [],
|
29
35
|
delivery: [],
|
30
36
|
payment: [],
|
@@ -37,58 +43,46 @@ const state = reactive({
|
|
37
43
|
// Methods
|
38
44
|
const actions = {
|
39
45
|
async readOne(spotID) {
|
40
|
-
|
41
|
-
.get(`/api/spots/get/${spotID}`)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
setError(error)
|
48
|
-
});
|
46
|
+
try {
|
47
|
+
const response = await $axios.get(`/api/spots/get/${spotID}`);
|
48
|
+
|
49
|
+
state.spot = response.data;
|
50
|
+
} catch (error) {
|
51
|
+
setError(error);
|
52
|
+
}
|
49
53
|
},
|
50
54
|
async read(organizationId) {
|
51
|
-
|
52
|
-
.get(`/api/spots/${organizationId}`)
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
setError(error)
|
60
|
-
});
|
55
|
+
try {
|
56
|
+
const response = await $axios.get(`/api/spots/${organizationId}`);
|
57
|
+
|
58
|
+
state.spots = response.data;
|
59
|
+
return response.data
|
60
|
+
} catch (error) {
|
61
|
+
setError(error);
|
62
|
+
}
|
61
63
|
},
|
62
64
|
async create(organizationId, spot) {
|
63
|
-
|
64
|
-
.post(`/api/spots/${organizationId}/create`, spot)
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
setError(error)
|
71
|
-
});
|
65
|
+
try {
|
66
|
+
const response = await $axios.post(`/api/spots/${organizationId}/create`, spot);
|
67
|
+
|
68
|
+
state.spot = response.data;
|
69
|
+
} catch (error) {
|
70
|
+
setError(error);
|
71
|
+
}
|
72
72
|
},
|
73
73
|
async update(organizationId, spot) {
|
74
|
-
|
75
|
-
.post(`/api/spots/${organizationId}/update`, spot)
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
.catch(error => {
|
80
|
-
setError(error)
|
81
|
-
});
|
74
|
+
try {
|
75
|
+
await $axios.post(`/api/spots/${organizationId}/update`, spot);
|
76
|
+
} catch (error) {
|
77
|
+
setError(error);
|
78
|
+
}
|
82
79
|
},
|
83
80
|
async delete(organizationId, spotId) {
|
84
|
-
|
85
|
-
.delete(`/api/spots/${organizationId}/delete`, { data: { _id: spotId } })
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
.catch(error => {
|
90
|
-
setError(error)
|
91
|
-
});
|
81
|
+
try {
|
82
|
+
await $axios.delete(`/api/spots/${organizationId}/delete`, { data: { _id: spotId } });
|
83
|
+
} catch (error) {
|
84
|
+
setError(error);
|
85
|
+
}
|
92
86
|
},
|
93
87
|
};
|
94
88
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
<section
|
26
26
|
|
27
|
-
class="flex-center flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"
|
27
|
+
class="flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"
|
28
28
|
>
|
29
29
|
|
30
30
|
<Dropdown
|
@@ -73,7 +73,7 @@
|
|
73
73
|
_id: auth.state.user._id
|
74
74
|
}
|
75
75
|
})"
|
76
|
-
class="pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
76
|
+
class="cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
77
77
|
/>
|
78
78
|
|
79
79
|
<img
|
@@ -152,25 +152,7 @@
|
|
152
152
|
|
153
153
|
</section>
|
154
154
|
|
155
|
-
|
156
|
-
v-if="(auth.state.access.roles && auth.state.user._id === route.params._id) && (auth.state.access.roles.includes('ROLE_MODERATOR') || auth.state.access.roles.includes('ROLE_ADMIN'))"
|
157
|
-
class="mn-b-regular bg-black t-white"
|
158
|
-
>
|
159
|
-
<MenuItem
|
160
|
-
@click="router.push({
|
161
|
-
name: 'Backoffice',
|
162
|
-
params: {
|
163
|
-
_id: route.params._id
|
164
|
-
}
|
165
|
-
})"
|
166
|
-
class="cursor-pointer"
|
167
|
-
theme="white"
|
168
|
-
>
|
169
|
-
<span>
|
170
|
-
Backoffice
|
171
|
-
</span>
|
172
|
-
</MenuItem>
|
173
|
-
</Menu>
|
155
|
+
|
174
156
|
|
175
157
|
<Menu class="mn-b-regular bg-grey">
|
176
158
|
|
@@ -187,19 +169,15 @@
|
|
187
169
|
<MenuItem @click="router.push({name: 'User Blogposts', params: {_id: route.params._id}})" class="cursor-pointer">
|
188
170
|
<IconCommunity class="i-semi" :icon="true"/>
|
189
171
|
<span>Posts</span>
|
190
|
-
</MenuItem>
|
172
|
+
</MenuItem>
|
191
173
|
</Menu>
|
192
174
|
|
193
|
-
|
194
|
-
|
195
|
-
<!-- <Menu class="mn-b-regular bg-grey">
|
175
|
+
<Menu class="mn-b-regular bg-grey">
|
196
176
|
<MenuItem @click="router.push({name: 'User Wallet', params: {_id: route.params._id}})" class="cursor-pointer">
|
197
177
|
<IconGroups class="i-semi" :icon="true"/>
|
198
178
|
<span>Wallet</span>
|
199
179
|
</MenuItem>
|
200
|
-
</Menu>
|
201
|
-
|
202
|
-
|
180
|
+
</Menu>
|
203
181
|
|
204
182
|
<!-- <MenuItem @click="router.push({name: 'User Comments', params: {_id: route.params._id}})" class="cursor-pointer">
|
205
183
|
<span>Comments</span>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
:validation="organizationName"
|
20
20
|
/>
|
21
21
|
|
22
|
-
<p class="mn-b-semi">Your username will be used for URL of profile like
|
22
|
+
<p class="mn-b-semi">Your username will be used for URL of profile like {{API_URL}}/users/username</p>
|
23
23
|
<!-- -->
|
24
24
|
<h3 class="mn-b-small">Profile</h3>
|
25
25
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<button
|
15
15
|
v-if="auth.state.user._id === route.params._id"
|
16
16
|
@click="router.push({name: 'Create Event'})"
|
17
|
-
class="radius-
|
17
|
+
class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
|
18
18
|
>
|
19
19
|
+
|
20
20
|
</button>
|
@@ -53,7 +53,7 @@ const users = [{
|
|
53
53
|
ru: 'Группы'
|
54
54
|
}
|
55
55
|
},
|
56
|
-
component: () => import(/* webpackChunkName: "profile" */ '
|
56
|
+
component: () => import(/* webpackChunkName: "profile" */ '@pf/src/modules/organizations/components/pages/Organizations.vue'),
|
57
57
|
},{
|
58
58
|
path: 'profile/:_id/wallet',
|
59
59
|
name: 'User Wallet',
|