@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,128 +1,261 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="for-transition w-100">
|
2
|
+
<div class="for-transition w-100 cols-1 pd-thin gap-thin">
|
3
3
|
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
4
|
+
<Block class="flex-nowrap flex-v-center flex">
|
5
|
+
|
6
|
+
<h1 class="mn-r-auto">
|
7
|
+
{{ route.params.product ? products.state.current.name : 'Create Product' }}
|
8
|
+
</h1>
|
9
|
+
|
10
|
+
<Button
|
11
|
+
v-if="route.params.product"
|
12
|
+
:submit="onDelete"
|
13
|
+
:callback="redirectTo"
|
14
|
+
class="bg-red mn-r-thin"
|
15
|
+
>
|
16
|
+
Delete
|
17
|
+
</Button>
|
18
|
+
|
19
|
+
<Button
|
20
|
+
:submit="onSubmit"
|
21
|
+
:callback="redirectTo"
|
22
|
+
class="bg-main"
|
23
|
+
>
|
24
|
+
Save
|
25
|
+
</Button>
|
26
|
+
</Block>
|
27
|
+
|
28
|
+
<Block
|
29
|
+
placeholder="The product doesn't have any images yet."
|
30
|
+
class="h-min"
|
31
|
+
>
|
32
|
+
<EditImages
|
33
|
+
:images="products.state.current.images"
|
34
|
+
:uploadPath="'photos'"
|
35
|
+
@update:images="(imagesNew) => { products.state.current.images = imagesNew }"
|
36
|
+
/>
|
37
|
+
</Block>
|
38
|
+
|
39
|
+
<div class="cols-2 gap-thin">
|
40
|
+
|
41
|
+
<Block
|
42
|
+
title="Profile"
|
43
|
+
>
|
24
44
|
<EditProductInfo
|
25
45
|
:product="products.state.current"
|
26
46
|
/>
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
47
|
+
</Block>
|
48
|
+
|
49
|
+
<Block
|
50
|
+
title="Categories"
|
51
|
+
>
|
52
|
+
<Checkbox
|
53
|
+
v-for="(category, index) in categories.state.all"
|
54
|
+
:label="category.name"
|
55
|
+
name="categories"
|
56
|
+
:value="category.url"
|
57
|
+
class="w-100 mn-t-small bg-white radius-small pd-small"
|
58
|
+
:radio="products.state.current.category"
|
59
|
+
@update:radio="event => products.state.current.category = event"
|
60
|
+
/>
|
61
|
+
</Block>
|
62
|
+
|
63
|
+
<Block
|
64
|
+
title="Parameters"
|
65
|
+
placeholder="No parameters added yet"
|
66
|
+
:actions="[{
|
67
|
+
label: '+',
|
68
|
+
function: () => products.state.current.information.push({name: '', value: ''})
|
69
|
+
}]"
|
70
|
+
class="cols-1 gap-thin"
|
71
|
+
>
|
72
|
+
<div
|
73
|
+
class="gap-thin flex-nowrap flex"
|
74
|
+
v-for="(item, index) in products.state.current.information"
|
75
|
+
:key="index"
|
76
|
+
>
|
77
|
+
<Field
|
78
|
+
v-model:field="item.name"
|
79
|
+
placeholder="Название параметра"
|
80
|
+
class="w-100 bg-white radius-small pd-medium"
|
81
|
+
/>
|
82
|
+
<Field
|
83
|
+
v-model:field="item.value"
|
84
|
+
placeholder="Значение параметра"
|
85
|
+
class="w-100 bg-white radius-small pd-medium"
|
86
|
+
/>
|
87
|
+
<div class="radius-small h-100 i-big flex-center flex aspect-1x1 bg-red">
|
88
|
+
<IconDelete
|
89
|
+
@click="() => products.state.current.information.splice(index, 1)"
|
90
|
+
class="i-medium"
|
91
|
+
/>
|
92
|
+
</div>
|
37
93
|
</div>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
94
|
+
</Block>
|
95
|
+
|
96
|
+
<Block
|
97
|
+
title="Localization"
|
98
|
+
placeholder="No localizations added yet"
|
99
|
+
:actions="[{
|
100
|
+
label: '+',
|
101
|
+
function: () => products.state.current.localization.push({name: '', value: ''})
|
102
|
+
}]"
|
103
|
+
>
|
104
|
+
<div
|
105
|
+
class="gap-thin mn-b-thin flex-nowrap flex"
|
106
|
+
v-for="(item, index) in products.state.current.localization"
|
107
|
+
:key="index"
|
108
|
+
>
|
109
|
+
<Field
|
110
|
+
v-model:field="item.name"
|
111
|
+
placeholder="Название параметра"
|
112
|
+
class="w-100 bg-white radius-small pd-medium"
|
113
|
+
/>
|
114
|
+
<Field
|
115
|
+
v-model:field="item.value"
|
116
|
+
placeholder="Значение параметра"
|
117
|
+
class="w-100 bg-white radius-small pd-medium"
|
118
|
+
/>
|
119
|
+
<div class="radius-small pd-small flex-center flex aspect-1x1 bg-red">
|
120
|
+
<IconDelete
|
121
|
+
@click="() => products.state.current.localization.splice(index, 1)"
|
122
|
+
class="i-medium"
|
123
|
+
/>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
</Block>
|
127
|
+
|
71
128
|
</div>
|
129
|
+
|
130
|
+
<Block
|
131
|
+
title="Quantity Discount"
|
132
|
+
class="mn-b-semi"
|
133
|
+
:actions="[{
|
134
|
+
label: '+',
|
135
|
+
function: () => products.state.current.quantityDiscount.push({name: '', value: ''})
|
136
|
+
}]"
|
137
|
+
>
|
138
|
+
<div
|
139
|
+
class="gap-thin mn-b-thin flex-nowrap flex"
|
140
|
+
v-for="(item, index) in products.state.current.quantityDiscount"
|
141
|
+
:key="index"
|
142
|
+
>
|
143
|
+
<Field
|
144
|
+
v-model:field="item.name"
|
145
|
+
placeholder="Quantity"
|
146
|
+
class="w-100 bg-white radius-small pd-medium"
|
147
|
+
/>
|
148
|
+
<Field
|
149
|
+
v-model:field="item.value"
|
150
|
+
placeholder="Discount"
|
151
|
+
class="w-100 bg-white radius-small pd-medium"
|
152
|
+
/>
|
153
|
+
<div class="radius-small pd-small flex-center flex aspect-1x1 bg-red">
|
154
|
+
<IconDelete
|
155
|
+
@click="() => products.state.current.quantityDiscount.splice(index, 1)"
|
156
|
+
class="i-medium"
|
157
|
+
/>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</Block>
|
161
|
+
|
162
|
+
<!-- <EditModifications
|
163
|
+
:product="products.state.current"
|
164
|
+
/> -->
|
165
|
+
|
166
|
+
<Block
|
167
|
+
title="Add Ingridient"
|
168
|
+
class="mn-b-semi"
|
169
|
+
>
|
170
|
+
<CardPosition
|
171
|
+
@add="(item) => globals.actions.add(
|
172
|
+
products.state.current.ingridients,
|
173
|
+
item
|
174
|
+
)"
|
175
|
+
:products="Products"
|
176
|
+
/>
|
177
|
+
|
178
|
+
<Block
|
179
|
+
placeholder="No positions added yet"
|
180
|
+
class="pd-zero mn-b-semi"
|
181
|
+
>
|
182
|
+
<CardPosition
|
183
|
+
v-for="(product, index) in products.state.current.ingridients"
|
184
|
+
:key="product._id"
|
185
|
+
:product="product"
|
186
|
+
:array="products.state.current.ingridients"
|
187
|
+
:products="Products"
|
188
|
+
@add="(item) => globals.actions.add(
|
189
|
+
products.state.current.ingridients,
|
190
|
+
item
|
191
|
+
)"
|
192
|
+
@update="(item) => globals.actions.update(
|
193
|
+
products.state.current.ingridients,
|
194
|
+
item,
|
195
|
+
index
|
196
|
+
)"
|
197
|
+
@delete="(item) => globals.actions.delete(
|
198
|
+
products.state.current.ingridients,
|
199
|
+
item,
|
200
|
+
index
|
201
|
+
)"
|
202
|
+
/>
|
203
|
+
</Block>
|
204
|
+
</Block>
|
205
|
+
|
72
206
|
</div>
|
73
207
|
|
74
208
|
</template>
|
75
209
|
|
76
210
|
<script setup>
|
77
211
|
// Import libs
|
78
|
-
import { reactive, computed, onMounted,
|
212
|
+
import { reactive, computed, onMounted, ref } from 'vue'
|
79
213
|
import { useRoute, useRouter } from 'vue-router'
|
80
214
|
// Import components
|
81
215
|
import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'
|
82
216
|
|
217
|
+
import Block from '@pf/src/components/Block/Block.vue';
|
83
218
|
import Tab from "@pf/src/components/Tab/Tab.vue";
|
84
219
|
import Field from "@pf/src/components/Field/Field.vue";
|
85
220
|
import Select from "@pf/src/components/Select/Select.vue";
|
86
221
|
import Checkbox from "@pf/src/components/Checkbox/Checkbox.vue";
|
87
222
|
import Button from "@pf/src/components/Button/Button.vue";
|
88
223
|
import Popup from "@pf/src/components/Popup/Popup.vue";
|
224
|
+
import EditImages from '@pf/src/components/EditImages/EditImages.vue';
|
225
|
+
|
226
|
+
import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue';
|
227
|
+
|
228
|
+
import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';
|
229
|
+
|
89
230
|
|
90
231
|
import EditProductInfo from '@pf/src/modules/products/components/sections/EditProductInfo.vue';
|
91
|
-
import EditCategories from '@pf/src/modules/products/components/blocks/EditCategories.vue'
|
92
|
-
import EditParameters from '@pf/src/modules/products/components/sections/EditParameters.vue';
|
93
|
-
import EditProductImages from '@pf/src/modules/products/components/sections/EditProductImages.vue';
|
94
232
|
import EditModifications from '@pf/src/modules/products/components/sections/EditModifications.vue';
|
95
233
|
|
96
234
|
// Accessing router and store
|
235
|
+
import * as globals from '@pf/src/modules/globals/store/globals';
|
97
236
|
import * as products from '@pf/src/modules/products/store/products';
|
98
237
|
import * as categories from '@pf/src/modules/products/store/categories';
|
99
238
|
|
100
239
|
const route = useRoute()
|
101
240
|
const router = useRouter()
|
102
241
|
|
242
|
+
const Products = ref(products.state.all);
|
243
|
+
|
244
|
+
onMounted(async() => {
|
245
|
+
|
103
246
|
// Data prefetching
|
104
|
-
|
105
|
-
|
106
|
-
if (route.params.product) {
|
107
|
-
await products.actions.read({ _id: route.params.product });
|
108
|
-
} else {
|
109
|
-
// await commit('products/clearProductState')
|
110
|
-
}
|
111
|
-
// Accessing state
|
112
|
-
function addInfo() {
|
113
|
-
products.state.current.information.push({name: '', value: ''});
|
114
|
-
}
|
247
|
+
await categories.actions.fetchCategories()
|
115
248
|
|
116
|
-
|
117
|
-
|
118
|
-
|
249
|
+
if (route.params.product) {
|
250
|
+
await products.actions.read({ _id: route.params.product });
|
251
|
+
} else {
|
252
|
+
// await commit('products/clearProductState')
|
253
|
+
}
|
119
254
|
|
120
|
-
|
121
|
-
products.state.current.localization.push({locale: '', text: ''});
|
122
|
-
}
|
255
|
+
})
|
123
256
|
|
124
|
-
function
|
125
|
-
|
257
|
+
function onImagesUpdate(newImages) {
|
258
|
+
products.state.current.images = newImages;
|
126
259
|
}
|
127
260
|
|
128
261
|
function onSubmit() {
|
@@ -133,8 +266,17 @@
|
|
133
266
|
}
|
134
267
|
}
|
135
268
|
|
269
|
+
function onDelete() {
|
270
|
+
products.actions.deleteProduct(products.state.current._id)
|
271
|
+
}
|
272
|
+
|
136
273
|
function redirectTo () {
|
137
|
-
router.push({
|
274
|
+
router.push({
|
275
|
+
name: 'Organization',
|
276
|
+
params: {
|
277
|
+
_id: route.params._id
|
278
|
+
}
|
279
|
+
})
|
138
280
|
}
|
139
281
|
</script>
|
140
282
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div id="product-recommendation" class="min-
|
2
|
+
<div id="product-recommendation" class="h-min-100vh t-white bg-black">
|
3
3
|
<Loader v-if="loading" :status="loadingText" class="pos-fixed"/>
|
4
4
|
|
5
5
|
<div v-if="!loading && !showInput" class="section">
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="cols-2-1_3 gap-thin pd-thin">
|
2
|
+
<div class="cols-2-1_3 bg-grey radius-big gap-thin pd-thin">
|
3
3
|
<FilterProducts
|
4
4
|
|
5
5
|
/>
|
6
|
-
|
7
6
|
<Feed
|
8
7
|
:states="{
|
9
8
|
empty: {
|
@@ -18,11 +17,15 @@
|
|
18
17
|
:options="{
|
19
18
|
limit: 15,
|
20
19
|
organization: route.params._id,
|
20
|
+
categories: route.query.categories,
|
21
|
+
prices: route.query.prices,
|
22
|
+
delivery: route.query.delivery,
|
21
23
|
// user: user
|
22
24
|
}"
|
23
25
|
v-slot="{
|
24
26
|
items
|
25
27
|
}"
|
28
|
+
class="cols-3 gap-thin"
|
26
29
|
>
|
27
30
|
<CardProduct
|
28
31
|
v-for="product in items"
|
@@ -51,7 +54,7 @@
|
|
51
54
|
// Import components
|
52
55
|
import FilterProducts from '@pf/src/modules/products/components/sections/FilterProducts.vue'
|
53
56
|
|
54
|
-
import Feed from '@pf/src/
|
57
|
+
import Feed from '@pf/src/components/Feed/Feed.vue'
|
55
58
|
import CardProduct from '@pf/src/modules/products/components/blocks/CardProduct.vue'
|
56
59
|
|
57
60
|
// Accessing router and store
|
@@ -5,7 +5,7 @@
|
|
5
5
|
@click="$router.push({
|
6
6
|
name: 'AddProduct'
|
7
7
|
})"
|
8
|
-
class="radius-
|
8
|
+
class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second">
|
9
9
|
+
|
10
10
|
</button>
|
11
11
|
</header>
|
@@ -47,10 +47,8 @@
|
|
47
47
|
:key="product._id"
|
48
48
|
:product="product"
|
49
49
|
@click="$router.push({
|
50
|
-
name: '
|
50
|
+
name: 'ProductEdit',
|
51
51
|
params: {
|
52
|
-
_id:
|
53
|
-
route.params._id,
|
54
52
|
product: product._id
|
55
53
|
}
|
56
54
|
})"
|
@@ -66,7 +64,7 @@ import { useRoute, useRouter } from 'vue-router'
|
|
66
64
|
import * as products from '@pf/src/modules/products/store/products' // Путь к вашему стору
|
67
65
|
|
68
66
|
// Import components
|
69
|
-
import Feed from '@pf/src/
|
67
|
+
import Feed from '@pf/src/components/Feed/Feed.vue'
|
70
68
|
import CardProduct from '@pf/src/modules/products/components/blocks/CardProduct.vue'
|
71
69
|
import Tab from '@pf/src/components/Tab/Tab.vue'
|
72
70
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
|
3
|
+
<p v-if="product.modifications.length == 0" class="mn-b-small w-100">У продукта еще не заданы модификации.</p>
|
4
4
|
|
5
5
|
<!-- Modification Info -->
|
6
6
|
<div class="mn-b-small flex-column flex-wrap block" v-for="(modification, index) in product.modifications" :key="index">
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<button @click="deleteModification(index)" class="mn-l-small i-normal pd-regular button-delete button">
|
21
21
|
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
22
22
|
<rect width="24" height="24" transform="translate(1 1)" />
|
23
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="white"/>
|
23
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="rgb(var(--white))"/>
|
24
24
|
</svg>
|
25
25
|
|
26
26
|
</button>
|
@@ -41,7 +41,7 @@
|
|
41
41
|
<button @click="deleteCharacteristic(index, index2)" class="mn-l-small i-normal pd-regular button-delete button">
|
42
42
|
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
43
43
|
<rect width="24" height="24" transform="translate(1 1)" />
|
44
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="white"/>
|
44
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="rgb(var(--white))"/>
|
45
45
|
</svg>
|
46
46
|
|
47
47
|
</button>
|
@@ -1,70 +1,60 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
<Select
|
3
|
+
v-model:select="product.status"
|
4
|
+
label="Status"
|
5
|
+
:options="[
|
6
|
+
'unpublished',
|
7
|
+
'published',
|
8
|
+
'archivied'
|
9
|
+
]"
|
10
|
+
|
11
|
+
placeholder="Display product"
|
12
|
+
class="pos-relative w-100 mn-b-small bg-white radius-small pd-medium"
|
13
|
+
/>
|
14
|
+
|
15
|
+
<Field
|
16
|
+
v-model:field="product.name"
|
17
|
+
label="Name"
|
18
|
+
placeholder="Введите название"
|
19
|
+
class="w-100 mn-b-small bg-white radius-small pd-medium"
|
20
|
+
/>
|
21
|
+
<Field
|
22
|
+
v-model:field="product.price"
|
23
|
+
label="Price"
|
24
|
+
placeholder="Введите цену"
|
25
|
+
class="w-100 mn-b-small bg-white radius-small pd-medium"
|
26
|
+
type="number"
|
27
|
+
>
|
6
28
|
<Select
|
29
|
+
v-model:select="product.price.currency"
|
30
|
+
placeholder="฿"
|
7
31
|
:options="[
|
8
|
-
|
9
|
-
'published',
|
10
|
-
'archivied'
|
32
|
+
'฿'
|
11
33
|
]"
|
12
|
-
|
13
|
-
placeholder="Display product"
|
14
|
-
class="w-100 mn-b-small bg-white radius-small pd-medium"
|
34
|
+
class="pos-relative bg-grey pd-thin radius-thin"
|
15
35
|
/>
|
36
|
+
</Field>
|
16
37
|
|
17
|
-
<Field
|
18
|
-
v-model:field="store.products.state.current.name"
|
19
|
-
placeholder="Введите название"
|
20
|
-
class="w-100 mn-b-small bg-white radius-small pd-medium"
|
21
|
-
/>
|
22
|
-
<Field
|
23
|
-
v-model:field="store.products.state.current.price"
|
24
|
-
placeholder="Введите цену"
|
25
|
-
class="w-100 mn-b-small bg-white radius-small pd-medium"
|
26
|
-
type="number"
|
27
|
-
/>
|
28
38
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
39
|
+
<Field
|
40
|
+
v-model:field="product.description"
|
41
|
+
label="Description"
|
42
|
+
placeholder="Введите описание"
|
43
|
+
class="w-100 bg-white radius-small pd-medium"
|
44
|
+
type="textarea"
|
45
|
+
/>
|
36
46
|
</template>
|
37
47
|
|
38
|
-
<script setup
|
39
|
-
import Button from '@pf/src/components/Button/Button.vue'
|
48
|
+
<script setup>
|
40
49
|
|
50
|
+
import Button from '@pf/src/components/Button/Button.vue'
|
41
51
|
import Field from "@pf/src/components/Field/Field.vue";
|
42
52
|
import Select from "@pf/src/components/Select/Select.vue";
|
43
53
|
|
44
|
-
/////////////////////////////
|
45
|
-
// COMPONENT DEPENDENCIES
|
46
|
-
/////////////////////////////
|
47
|
-
import { toRefs } from 'vue';
|
48
|
-
// import { useStore } from "vuex";
|
49
|
-
/////////////////////////////
|
50
|
-
// HELPERS
|
51
|
-
/////////////////////////////
|
52
|
-
function functionReload () {
|
53
|
-
location.reload()
|
54
|
-
}
|
55
54
|
|
56
|
-
/////////////////////////////
|
57
|
-
// CREATED
|
58
|
-
/////////////////////////////
|
59
55
|
const props = defineProps({
|
60
56
|
product: Object,
|
61
57
|
});
|
62
|
-
|
63
|
-
const { product } = toRefs(props);
|
64
|
-
|
65
|
-
/////////////////////////////
|
66
|
-
// MOUNTED
|
67
|
-
/////////////////////////////
|
68
58
|
</script>
|
69
59
|
|
70
60
|
<style lang="scss">
|