@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,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="product-images">
|
3
|
-
<div class="no-responsive cols-4
|
3
|
+
<div class="no-responsive cols-4 gap-thin">
|
4
4
|
<img
|
5
5
|
v-for="(image, index) in images"
|
6
6
|
:key="index"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
</div>
|
12
12
|
<Popup @close-popup="closePopup" :isPopupOpen="isPopupVisible" class="radius-medium o-hidden">
|
13
13
|
<Magnifier
|
14
|
-
:imageSrc="
|
14
|
+
:imageSrc="(FILE_SERVER_URL || '') + images[selectedimageIndex]"
|
15
15
|
class="magnifier z-index-4"
|
16
16
|
/>
|
17
17
|
</Popup>
|
@@ -53,11 +53,6 @@ const closePopup = () => {
|
|
53
53
|
flex-direction: column;
|
54
54
|
}
|
55
55
|
|
56
|
-
.thumbnails {
|
57
|
-
display: flex;
|
58
|
-
gap: 10px;
|
59
|
-
}
|
60
|
-
|
61
56
|
.thumbnail {
|
62
57
|
width: 100%;
|
63
58
|
max-width: 8rem;
|
@@ -0,0 +1,74 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<ul
|
4
|
+
class="flex-column flex-wrap"
|
5
|
+
>
|
6
|
+
<span
|
7
|
+
v-if="order.positions.length === 0"
|
8
|
+
class="w-100"
|
9
|
+
>
|
10
|
+
No positions added yet
|
11
|
+
</span>
|
12
|
+
|
13
|
+
<li
|
14
|
+
v-for="(product, index) in order.positions"
|
15
|
+
:key="product._id"
|
16
|
+
class="w-100 gap-small flex-stretch flex-center flex-nowrap flex"
|
17
|
+
>
|
18
|
+
<span
|
19
|
+
class="flex-v-center flex radius-medium pd-small bg-white w-100"
|
20
|
+
>
|
21
|
+
{{ product.name }}
|
22
|
+
</span>
|
23
|
+
|
24
|
+
<CardPosition
|
25
|
+
:products='[]'
|
26
|
+
:product='product'
|
27
|
+
@add="deleteProduct(index)"
|
28
|
+
/>
|
29
|
+
</li>
|
30
|
+
</ul>
|
31
|
+
</div>
|
32
|
+
</template>
|
33
|
+
|
34
|
+
<script setup>
|
35
|
+
import { ref, computed } from 'vue';
|
36
|
+
import { useRouter, useRoute } from 'vue-router';
|
37
|
+
|
38
|
+
import Field from '@pf/src/components/Field/Field.vue';
|
39
|
+
import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';
|
40
|
+
|
41
|
+
import * as leftovers from '@pf/src/modules/products/store/leftovers';
|
42
|
+
|
43
|
+
const router = useRouter();
|
44
|
+
const route = useRoute();
|
45
|
+
|
46
|
+
const props = defineProps({
|
47
|
+
order: Object
|
48
|
+
});
|
49
|
+
|
50
|
+
function deleteProduct(index) {
|
51
|
+
leftovers.actions.deleteItemFromLeftover(props.order.positions[index]);
|
52
|
+
}
|
53
|
+
</script>
|
54
|
+
|
55
|
+
|
56
|
+
<style lang="scss" >
|
57
|
+
.vue-select {
|
58
|
+
background: #f7f7f7;
|
59
|
+
border-radius: 0.5rem;
|
60
|
+
border: 0;
|
61
|
+
height: 3rem;
|
62
|
+
padding-left: 1rem;
|
63
|
+
|
64
|
+
z-index: 4;
|
65
|
+
.vue-input {
|
66
|
+
input {
|
67
|
+
font-size: 1.125rem;
|
68
|
+
font-weight: 300;
|
69
|
+
background: #f7f7f7; }
|
70
|
+
}
|
71
|
+
}
|
72
|
+
</style>
|
73
|
+
|
74
|
+
|
@@ -1,9 +1,16 @@
|
|
1
1
|
<template>
|
2
|
-
<div
|
2
|
+
<div
|
3
|
+
class="price-tag radius-small"
|
4
|
+
:class="
|
5
|
+
{
|
6
|
+
'bg-main': !product.sale,
|
7
|
+
'bg-third-small': product.sale,
|
8
|
+
}
|
9
|
+
"
|
10
|
+
>
|
3
11
|
<p
|
4
12
|
:class="
|
5
|
-
{
|
6
|
-
't-main': product.sale,
|
13
|
+
{
|
7
14
|
'h4': !size,
|
8
15
|
'h5 t-semi pd-thin': size === 'small',
|
9
16
|
'h3 t-semi pd-small': size === 'big'
|
@@ -12,7 +19,7 @@
|
|
12
19
|
>
|
13
20
|
{{product.price }} {{returnCurrency()}}
|
14
21
|
</p>
|
15
|
-
<p v-if="product.sale" class="t-transp t-
|
22
|
+
<p v-if="product.sale" class="pd-r-small t-transp t-transp p-medium line-through price">{{(product.price / 100) * (100 + product.sale) }} {{returnCurrency()}} </p>
|
16
23
|
</div>
|
17
24
|
</template>
|
18
25
|
|
@@ -51,7 +58,6 @@ const props = defineProps({
|
|
51
58
|
display: flex;
|
52
59
|
align-items: center;
|
53
60
|
width: fit-content;
|
54
|
-
background: #00ff88;
|
55
61
|
color: black;
|
56
62
|
}
|
57
63
|
|
@@ -4,16 +4,16 @@
|
|
4
4
|
<p class="t-white h6">THC</p>
|
5
5
|
<!-- Polygon bg -->
|
6
6
|
<svg v-if="Number(product.information[1].value) >= 18" width="60" height="66" viewBox="0 0 60 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
7
|
-
<path fill="#FF0000" stroke="white" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
7
|
+
<path fill="#FF0000" stroke="rgb(var(--white))" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
8
8
|
</svg>
|
9
9
|
<svg v-if="Number(product.information[1].value) <= 18 && Number(product.information[1].value) >= 14" width="60" height="66" viewBox="0 0 60 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
10
|
-
<path fill="#FF0099" stroke="white" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
10
|
+
<path fill="#FF0099" stroke="rgb(var(--white))" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
11
11
|
</svg>
|
12
12
|
<svg v-if="Number(product.information[1].value) <= 14 && Number(product.information[1].value) >= 10" width="60" height="66" viewBox="0 0 60 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
13
|
-
<path fill="#EB00FF" stroke="white" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
13
|
+
<path fill="#EB00FF" stroke="rgb(var(--white))" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
14
14
|
</svg>
|
15
15
|
<svg v-if="Number(product.information[1].value) <= 10" width="60" height="66" viewBox="0 0 60 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
16
|
-
<path fill="#00FF29" stroke="white" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
16
|
+
<path fill="#00FF29" stroke="rgb(var(--white))" stroke-width="3" d="M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z" />
|
17
17
|
</svg>
|
18
18
|
</div>
|
19
19
|
</template>
|
@@ -49,8 +49,8 @@ const props = defineProps({
|
|
49
49
|
.thc {
|
50
50
|
position: absolute;
|
51
51
|
|
52
|
-
right:
|
53
|
-
top:
|
52
|
+
right: 1rem;
|
53
|
+
top: 1rem;
|
54
54
|
|
55
55
|
display: flex;
|
56
56
|
flex-direction: column;
|
@@ -1,90 +1,106 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
<h2 class="
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
<header class="mn-b-medium gap-small flex-v-center flex-nowrap flex">
|
3
|
+
<h2 class="">{{route.params.leftover ? 'Edit ' : 'Add ' }} Inventory</h2>
|
4
|
+
|
5
|
+
<Select
|
6
|
+
v-model:select="leftovers.state.current.type"
|
7
|
+
:options="[
|
8
|
+
'stock-in',
|
9
|
+
'stock-out',
|
10
|
+
'write-off'
|
11
|
+
]"
|
12
|
+
:placeholder="'Select type'"
|
13
|
+
class="bg-main t-black w-max pd-small t-semi p-big uppercase radius-small"
|
14
|
+
/>
|
11
15
|
</header>
|
12
|
-
|
13
|
-
<h5 class="mn-b-small">Select Type</h5>
|
14
|
-
|
15
|
-
<Select
|
16
|
-
v-model:select="leftovers.state.current.type"
|
17
|
-
:options="[
|
18
|
-
'stock-in',
|
19
|
-
'stock-out',
|
20
|
-
'write-off'
|
21
|
-
]"
|
22
|
-
:placeholder="'Select type'"
|
23
|
-
class="mn-b-semi bg-grey pd-medium radius-small"
|
24
|
-
/>
|
25
16
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
17
|
+
<Block
|
18
|
+
title="Add Position"
|
19
|
+
class="mn-b-semi"
|
20
|
+
>
|
30
21
|
<CardPosition
|
31
|
-
@add="
|
22
|
+
@add="(item) => globals.actions.add(
|
23
|
+
leftovers.state.current.positions,
|
24
|
+
item
|
25
|
+
)"
|
32
26
|
:products="Products"
|
33
27
|
/>
|
34
|
-
</
|
35
|
-
|
36
|
-
|
37
|
-
<h5
|
38
|
-
class="mn-b-small"
|
39
|
-
>
|
40
|
-
Invetory Sheet
|
41
|
-
<a
|
42
|
-
class="mn-l-thin t-main"
|
43
|
-
@click="resetOrderList"
|
44
|
-
>
|
45
|
-
Reset
|
46
|
-
</a>
|
47
|
-
</h5>
|
48
|
-
|
28
|
+
</Block>
|
49
29
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
:products="Products"
|
30
|
+
<Block
|
31
|
+
title="Invetory Sheet"
|
32
|
+
placeholder="No positions added yet"
|
54
33
|
class="mn-b-semi"
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
@
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
34
|
+
>
|
35
|
+
<CardPosition
|
36
|
+
v-for="(product, index) in leftovers.state.current.positions"
|
37
|
+
:key="product._id"
|
38
|
+
:product="product"
|
39
|
+
:array="leftovers.state.current.positions"
|
40
|
+
:products="Products"
|
41
|
+
@add="(item) => globals.actions.add(
|
42
|
+
leftovers.state.current.positions,
|
43
|
+
item
|
44
|
+
)"
|
45
|
+
@update="(item) => globals.actions.update(
|
46
|
+
leftovers.state.current.positions,
|
47
|
+
item,
|
48
|
+
index
|
49
|
+
)"
|
50
|
+
@delete="(item) => globals.actions.delete(
|
51
|
+
leftovers.state.current.positions,
|
52
|
+
item,
|
53
|
+
index
|
54
|
+
)"
|
55
|
+
/>
|
56
|
+
</Block>
|
57
|
+
|
58
|
+
<Block class="">
|
59
|
+
<section class="gap-thin flex-v-center flex-nojustify flex">
|
60
|
+
|
61
|
+
<h3 class="mn-r-auto">
|
62
|
+
In total: {{formatPrice(totalPrice)}}
|
63
|
+
</h3>
|
64
|
+
|
65
|
+
<a
|
66
|
+
@click="onSubmit()"
|
67
|
+
class="bg-main button"
|
68
|
+
>
|
69
|
+
Save
|
70
|
+
</a>
|
71
|
+
|
72
|
+
<a
|
73
|
+
class="t-white bg-second button"
|
74
|
+
@click="onReset()"
|
75
|
+
>
|
76
|
+
Reset
|
77
|
+
</a>
|
78
|
+
|
79
|
+
<a
|
80
|
+
v-if="route.params.leftover"
|
81
|
+
@click="onDelete()"
|
82
|
+
class="t-white bg-red button"
|
83
|
+
>
|
84
|
+
Delete
|
85
|
+
</a>
|
86
|
+
</section>
|
87
|
+
</Block>
|
75
88
|
</template>
|
76
89
|
|
77
90
|
|
78
91
|
<script setup>
|
92
|
+
import Block from '@pf/src/components/Block/Block.vue';
|
93
|
+
|
79
94
|
import Field from '@pf/src/components/Field/Field.vue';
|
80
95
|
import Select from '@pf/src/components/Select/Select.vue';
|
81
96
|
import SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';
|
82
97
|
|
83
|
-
import LeftoverPositions from '@pf/src/modules/products/components/blocks/LeftoverPositions.vue'
|
84
98
|
import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';
|
99
|
+
|
85
100
|
import { computed, onMounted, ref, reactive } from 'vue';
|
86
101
|
import { useRoute, useRouter } from 'vue-router';
|
87
102
|
|
103
|
+
import * as globals from '@pf/src/modules/globals/store/globals';
|
88
104
|
import * as leftovers from '@pf/src/modules/products/store/leftovers';
|
89
105
|
import * as products from '@pf/src/modules/products/store/products';
|
90
106
|
|
@@ -92,6 +108,7 @@
|
|
92
108
|
const router = useRouter();
|
93
109
|
|
94
110
|
const Products = ref(products.state.all); // Обновите это значение соответствующим образом
|
111
|
+
const productNew = ref(null);
|
95
112
|
|
96
113
|
const totalPrice = computed(() => {
|
97
114
|
return leftovers.state.current.positions.reduce((sum, position) => {
|
@@ -100,9 +117,9 @@
|
|
100
117
|
});
|
101
118
|
|
102
119
|
onMounted(async () => {
|
103
|
-
if (route.params.
|
120
|
+
if (route.params.leftover) {
|
104
121
|
try {
|
105
|
-
await leftovers.actions.fetch(route.params.
|
122
|
+
await leftovers.actions.fetch(route.params.leftover);
|
106
123
|
} catch (error) {
|
107
124
|
console.error('error');
|
108
125
|
}
|
@@ -112,7 +129,8 @@
|
|
112
129
|
|
113
130
|
try {
|
114
131
|
const productsResponse = await products.actions.read({
|
115
|
-
organization:
|
132
|
+
organization: route.params._id,
|
133
|
+
limit: 100
|
116
134
|
});
|
117
135
|
Products.value = productsResponse;
|
118
136
|
} catch (error) {
|
@@ -120,20 +138,16 @@
|
|
120
138
|
}
|
121
139
|
});
|
122
140
|
|
123
|
-
function
|
124
|
-
if (route.params.
|
125
|
-
leftovers.actions.fetch(route.params.
|
141
|
+
function onReset() {
|
142
|
+
if (route.params.leftover) {
|
143
|
+
leftovers.actions.fetch(route.params.leftover);
|
126
144
|
} else {
|
127
145
|
leftovers.state.current = { type: "", order: "", positions: [] };
|
128
146
|
}
|
129
147
|
}
|
130
148
|
|
131
|
-
function addProduct(product) {
|
132
|
-
leftovers.actions.addProductToLeftover(product);
|
133
|
-
}
|
134
|
-
|
135
149
|
function onSubmit() {
|
136
|
-
if (route.params.
|
150
|
+
if (route.params.leftover) {
|
137
151
|
leftovers.actions.update(leftovers.state.current).then(
|
138
152
|
() => router.push({ name: 'Backoffice Leftovers' }),
|
139
153
|
(error) => console.error('error')
|
@@ -147,7 +161,7 @@
|
|
147
161
|
}
|
148
162
|
|
149
163
|
function onDelete() {
|
150
|
-
leftovers.actions.delete(route.params.
|
164
|
+
leftovers.actions.delete(route.params.leftover).then(
|
151
165
|
() => router.push({ name: 'Backoffice Leftovers' }),
|
152
166
|
(error) => console.error('error')
|
153
167
|
);
|
@@ -1,74 +1,78 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<Feed
|
50
|
-
:states="{
|
51
|
-
empty: {
|
52
|
-
title: 'No Leftovers Found',
|
53
|
-
description: 'Currently, there are no leftovers available.'
|
54
|
-
}
|
55
|
-
}"
|
56
|
-
:store="{
|
57
|
-
read: (options) => leftovers.actions.read(options)
|
58
|
-
}"
|
59
|
-
:options="{
|
60
|
-
limit: 15,
|
61
|
-
// user: user
|
62
|
-
}"
|
63
|
-
v-slot="{
|
64
|
-
items
|
65
|
-
}"
|
66
|
-
>
|
67
|
-
<CardLeftover
|
68
|
-
v-for="leftover in items"
|
69
|
-
:leftover="leftover"
|
2
|
+
<div class="pd-thin">
|
3
|
+
<header class="mn-b-medium flex-v-center flex-nowrap flex">
|
4
|
+
<h2 class="mn-r-medium">Inventory</h2>
|
5
|
+
<button
|
6
|
+
@click="$router.push({
|
7
|
+
name: 'LeftoverAdd'
|
8
|
+
})"
|
9
|
+
class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second">
|
10
|
+
+
|
11
|
+
</button>
|
12
|
+
</header>
|
13
|
+
|
14
|
+
<section class="mn-b-semi pd-medium bg-grey radius-big">
|
15
|
+
<p class="mn-b-thin">Spended:</p>
|
16
|
+
<h3>{{formatPrice(totalPrice)}}</h3>
|
17
|
+
</section>
|
18
|
+
|
19
|
+
<!-- <h3>Low Stock</h3>
|
20
|
+
|
21
|
+
<section class="mn-b-semi pd-medium bg-grey radius-big">
|
22
|
+
<div>
|
23
|
+
Name: Code Red
|
24
|
+
Left: 3
|
25
|
+
<button>add</button>
|
26
|
+
</div>
|
27
|
+
<div>
|
28
|
+
Name: Code Red
|
29
|
+
Left: 3
|
30
|
+
<button>add</button>
|
31
|
+
</div>
|
32
|
+
<div>
|
33
|
+
Name: Code Red
|
34
|
+
Left: 3
|
35
|
+
<button>add</button>
|
36
|
+
</div>
|
37
|
+
</section> -->
|
38
|
+
|
39
|
+
<Tab
|
40
|
+
v-model:selected="tab"
|
41
|
+
:tabs="[
|
42
|
+
{ name: 'All', value: 'all' },
|
43
|
+
{ name: 'Stock-In', value: 'stock-in' },
|
44
|
+
{ name: 'Stock-Out', value: 'stock-out' },
|
45
|
+
{ name: 'Write-Off', value: 'write-off' },
|
46
|
+
]"
|
47
|
+
class="mn-b-small o-hidden h5 radius-big bg-grey"
|
70
48
|
/>
|
71
|
-
|
49
|
+
|
50
|
+
<Feed
|
51
|
+
:states="{
|
52
|
+
empty: {
|
53
|
+
title: 'No Leftovers Found',
|
54
|
+
description: 'Currently, there are no leftovers available.'
|
55
|
+
}
|
56
|
+
}"
|
57
|
+
:store="{
|
58
|
+
read: (options) => leftovers.actions.read(options)
|
59
|
+
}"
|
60
|
+
:options="{
|
61
|
+
limit: 15,
|
62
|
+
organization: route.params._id
|
63
|
+
// user: user
|
64
|
+
}"
|
65
|
+
v-slot="{
|
66
|
+
items
|
67
|
+
}"
|
68
|
+
>
|
69
|
+
<CardLeftover
|
70
|
+
v-for="leftover in items"
|
71
|
+
:leftover="leftover"
|
72
|
+
class="bg-grey pd-small radius-big"
|
73
|
+
/>
|
74
|
+
</Feed>
|
75
|
+
</div>
|
72
76
|
</template>
|
73
77
|
|
74
78
|
|
@@ -77,7 +81,7 @@
|
|
77
81
|
import { useRoute, useRouter } from 'vue-router'
|
78
82
|
|
79
83
|
import Tab from '@pf/src/components/Tab/Tab.vue'
|
80
|
-
import Feed from '@pf/src/
|
84
|
+
import Feed from '@pf/src/components/Feed/Feed.vue'
|
81
85
|
import CardLeftover from '../blocks/CardLeftover.vue'
|
82
86
|
|
83
87
|
import * as leftovers from '@pf/src/modules/products/store/leftovers' // Убедитесь, что путь к вашему файлу стора верный
|
@@ -1,12 +1,9 @@
|
|
1
1
|
<template>
|
2
|
-
<div>
|
3
|
-
<Breadcrumbs class="
|
4
|
-
|
5
|
-
<SectionProduct :product="product" class="section"/>
|
2
|
+
<div class="flex flex-column w-100 o-hidden gap-thin pd-thin">
|
3
|
+
<!-- <Breadcrumbs class="bg-grey radius-big pd-small"/> -->
|
4
|
+
<SectionProduct v-if="product" :product="product" class="pos-relative"/>
|
6
5
|
|
7
6
|
<PopularProducts />
|
8
|
-
<!-- Partials (need to remove) -->
|
9
|
-
<Footer/>
|
10
7
|
</div>
|
11
8
|
</template>
|
12
9
|
|
@@ -32,7 +29,7 @@
|
|
32
29
|
const route = useRoute()
|
33
30
|
const router = useRouter()
|
34
31
|
|
35
|
-
await products.actions.
|
32
|
+
await products.actions.fetchProduct(route.params.product);
|
36
33
|
|
37
34
|
route.meta.title.en = products.state.current.name
|
38
35
|
route.meta.title.ru = products.state.current.name
|