@ozdao/prometheus-framework 0.2.52 → 0.2.54
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-0a2437f4.js +91 -0
- package/dist/main-180a9315.js +91 -0
- package/dist/main-3b7bd446.mjs +13631 -0
- package/dist/main-4fnApBsF.js +91 -0
- package/dist/main-Im8ovDCi.mjs +13609 -0
- package/dist/main-MjvO1l5U.js +91 -0
- package/dist/main-cdd0be68.mjs +13628 -0
- package/dist/main-kjbLXQEa.mjs +13606 -0
- package/dist/main.css +1 -1
- package/dist/organizations.server.js +17 -3
- package/dist/organizations.server.mjs +17 -3
- package/dist/products.server.js +62 -50
- package/dist/products.server.mjs +62 -50
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -223
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +223 -2
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +20 -20
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +81 -2
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +95 -2
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -95
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +57 -77
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +65 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -65
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +100 -96
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +59 -52
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +8 -13
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +54 -78
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +42 -32
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +5 -3
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.js +20 -5
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/products.router.js +22 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +45 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +79 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +193 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +68 -58
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +21 -18
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js +2 -2
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +39 -27
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +63 -77
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +3 -3
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-0066fd51.mjs +55 -0
- package/dist/web-6b9fa713.js +1 -0
- package/dist/web-8b404cc2.js +1 -0
- package/dist/web-e9b09dc6.mjs +55 -0
- package/dist/web-i-suCpLM.mjs +55 -0
- package/dist/web-ngl7bNhF.js +1 -0
- package/dist/web-t91TrxXa.mjs +55 -0
- package/dist/web-vB7UhMOt.js +1 -0
- package/package.json +1 -1
- package/src/components/Button/Button.vue +1 -3
- package/src/components/EditImages/EditImages.vue +1 -1
- package/src/components/Field/Field.vue +8 -1
- package/src/components/LocationSelection/LocationSelection.vue +2 -2
- package/src/modules/backoffice/components/pages/Dashboard.vue +4 -25
- package/src/modules/backoffice/router/admin.js +0 -14
- package/src/modules/backoffice/router/backoffice.js +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +10 -6
- package/src/modules/events/components/sections/HeroEvent.vue +12 -2
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +1 -1
- package/src/modules/landing/components/sections/MobileApp.vue +2 -6
- package/src/modules/marketplace/components/sections/Filters.vue +7 -1
- package/src/modules/orders/components/blocks/StatusHistory.vue +91 -31
- package/src/modules/orders/components/pages/EditOrder.vue +4 -21
- package/src/modules/orders/components/pages/FormOrder.vue +53 -15
- package/src/modules/orders/components/pages/Order.vue +2 -2
- package/src/modules/orders/components/sections/FormClientDetails.vue +63 -0
- package/src/modules/orders/components/sections/FormDelivery.vue +72 -0
- package/src/modules/orders/components/sections/FormPayment.vue +27 -0
- package/src/modules/orders/controllers/orders.controller.js +63 -49
- package/src/modules/orders/models/order.model.js +9 -13
- package/src/modules/orders/routes/orders.routes.js +6 -20
- package/src/modules/orders/store/orders.js +24 -12
- package/src/modules/organizations/controllers/organizations.controller.js +28 -9
- package/src/modules/organizations/router/organizations.js +4 -1
- package/src/modules/organizations/router/organizations.router.js +18 -2
- package/src/modules/organizations/router/products.router.js +24 -4
- package/src/modules/products/components/blocks/CardCategory.vue +53 -0
- package/src/modules/products/components/pages/Categories.vue +90 -0
- package/src/modules/products/components/pages/CategoryEdit.vue +214 -0
- package/src/modules/products/components/pages/ProductEdit.vue +9 -1
- package/src/modules/products/components/sections/FilterProducts.vue +4 -1
- package/src/modules/products/controllers/categories.controller.js +30 -13
- package/src/modules/products/controllers/products.controller.js +3 -2
- package/src/modules/products/models/category.model.js +42 -32
- package/src/modules/products/products.client.js +4 -2
- package/src/modules/products/store/categories.js +17 -3
- package/src/modules/users/components/pages/Profile.vue +2 -2
- package/src/modules/backoffice/components/admin/Categories.vue +0 -53
- package/src/modules/backoffice/components/admin/CategoryEdit.vue +0 -98
- package/src/modules/orders/components/sections/FormOrderDetails.vue +0 -220
- package/src/modules/products/components/blocks/CategoryCard.vue +0 -42
- package/src/modules/products/router/products.router.js +0 -48
- /package/src/modules/{products → organizations}/components/pages/OrganizationCreate.vue +0 -0
- /package/src/modules/{products → organizations}/components/pages/OrganizationDetails.vue +0 -0
- /package/src/modules/{products → organizations}/components/pages/OrganizationDocuments.vue +0 -0
- /package/src/modules/{products → organizations}/components/pages/OrganizationPeople.vue +0 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
<template>
|
2
|
+
<Block title="Delivery" class="mn-b-thin" :tooltip="'Delivery by mail takes 3-5 days.'">
|
3
|
+
<div class="mn-b-small flex-nowrap flex">
|
4
|
+
<Radio
|
5
|
+
v-model="order.delivery.type"
|
6
|
+
label="Courier"
|
7
|
+
value="courier"
|
8
|
+
class="bg-white pd-medium radius-small w-100 mn-r-small"
|
9
|
+
/>
|
10
|
+
<Radio
|
11
|
+
v-model="order.delivery.type"
|
12
|
+
label="Post"
|
13
|
+
value="Post"
|
14
|
+
class="bg-white pd-medium radius-small w-100 mn-r-small"
|
15
|
+
/>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<Address
|
19
|
+
label="Address"
|
20
|
+
:apiKey="GOOGLE_MAPS_API_KEY"
|
21
|
+
:address="order.delivery.address"
|
22
|
+
:location="order.delivery.location"
|
23
|
+
placeholder="Enter your address"
|
24
|
+
class="bg-white radius-tl-medium radius-tr-medium t-black br-grey br-solid br-2px pd-medium"
|
25
|
+
@update:location="newLocation => {
|
26
|
+
order.delivery.location = newLocation;
|
27
|
+
}"
|
28
|
+
@update:address="newAddress => {
|
29
|
+
order.delivery.address = newAddress;
|
30
|
+
}"
|
31
|
+
/>
|
32
|
+
|
33
|
+
<LocationMarker
|
34
|
+
:apiKey="GOOGLE_MAPS_API_KEY"
|
35
|
+
:address="order.delivery.address"
|
36
|
+
:location="order.delivery.location"
|
37
|
+
class="mn-b-thin radius-bl-medium radius-br-medium h-15r o-hidden"
|
38
|
+
@update:location="newLocation => {
|
39
|
+
order.delivery.location = newLocation;
|
40
|
+
}"
|
41
|
+
@update:address="newAddress => {
|
42
|
+
order.delivery.address = newAddress;
|
43
|
+
}"
|
44
|
+
/>
|
45
|
+
|
46
|
+
<Field
|
47
|
+
v-model="order.comment"
|
48
|
+
placeholder="Comments regarding the address (apartment unit, floor level, building section)"
|
49
|
+
type="textarea"
|
50
|
+
class="bg-white pd-medium radius-small"
|
51
|
+
/>
|
52
|
+
</Block>
|
53
|
+
</template>
|
54
|
+
|
55
|
+
<script setup>
|
56
|
+
import { onMounted } from 'vue'
|
57
|
+
import * as globals from '@pf/src/modules/globals/store/globals';
|
58
|
+
import Block from '@pf/src/components/Block/Block.vue'
|
59
|
+
import Address from '@pf/src/components/Address/Address.vue'
|
60
|
+
import LocationMarker from "@pf/src/components/LocationMarker/LocationMarker.vue";
|
61
|
+
import Radio from '@pf/src/components/Radio/Radio.vue'
|
62
|
+
import Field from '@pf/src/components/Field/Field.vue'
|
63
|
+
|
64
|
+
const props = defineProps({
|
65
|
+
order: Object,
|
66
|
+
});
|
67
|
+
|
68
|
+
onMounted(() => {
|
69
|
+
if (globals.state.position) props.order.delivery.address = globals.state.position.address
|
70
|
+
if (globals.state.position) props.order.delivery.location = globals.state.position.location
|
71
|
+
})
|
72
|
+
</script>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<template>
|
2
|
+
<Block title="Payment">
|
3
|
+
<div class="mn-b-small flex-nowrap flex">
|
4
|
+
<Select
|
5
|
+
v-model="order.payment.type"
|
6
|
+
:property="'value'"
|
7
|
+
:options="[
|
8
|
+
{name: 'Cash On Delivery', value: 'cash'},
|
9
|
+
{name: 'Bank Transfer', value: 'bank'},
|
10
|
+
{name: 'Crypto', value: 'crypto'},
|
11
|
+
]"
|
12
|
+
placeholder="Select type of payment"
|
13
|
+
size="small"
|
14
|
+
class="bg-white pd-medium radius-small w-100"
|
15
|
+
/>
|
16
|
+
</div>
|
17
|
+
</Block>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script setup>
|
21
|
+
import Block from '@pf/src/components/Block/Block.vue'
|
22
|
+
import Select from '@pf/src/components/Select/Select.vue'
|
23
|
+
|
24
|
+
defineProps({
|
25
|
+
order: Object,
|
26
|
+
});
|
27
|
+
</script>
|
@@ -1,55 +1,29 @@
|
|
1
1
|
const { sendChatMessageTelegram } = require('@pf/src/modules/globals/utils/mailing');
|
2
|
-
|
2
|
+
const queryProcessorGlobals = require('@pf/src/modules/globals/controllers/utils/queryProcessor');
|
3
|
+
|
4
|
+
function formatPositions(positions) {
|
5
|
+
return positions.map(pos => `🔹 ${pos.name} - Price: $${pos.price}, Quantity: ${pos.quantity}`).join('\n');
|
6
|
+
}
|
7
|
+
|
8
|
+
// Функция для форматирования сообщения об ордере
|
9
|
+
function formatOrderMessage(order) {
|
10
|
+
return `
|
11
|
+
🆕 New Order Received!
|
12
|
+
👤 Client: ${order.user.name} (${order.user.phone.number ? order.user.phone.number : 'No phone'})
|
13
|
+
💬 Messenger: ${order.user.messenger ? order.user.messenger.type + ' ' + order.user.messenger.value : 'None'}
|
14
|
+
🏢 Organization: ${order.organization}
|
15
|
+
📦 Positions:\n${formatPositions(order.positions)}
|
16
|
+
📝 Comment: ${order.comment ? order.comment : 'No comment'}
|
17
|
+
💳 Payment: ${order.payment.type}
|
18
|
+
🚚 Delivery: ${order.delivery.type} to ${order.delivery.address}
|
19
|
+
📌 Status: ${order.status}
|
20
|
+
`;
|
21
|
+
}
|
3
22
|
|
4
23
|
const controllerFactory = (db) => {
|
5
24
|
const Order = db.order;
|
6
25
|
|
7
|
-
|
8
|
-
const read = async (req, res) => {
|
9
|
-
try {
|
10
|
-
const orders = await Order.find({}).exec();
|
11
|
-
if (!orders) {
|
12
|
-
return res.status(404).send({ errorCode: "ORDER_NOT_FOUND", message: "Orders not found." });
|
13
|
-
}
|
14
|
-
res.status(200).send(orders);
|
15
|
-
} catch (err) {
|
16
|
-
res.status(500).send({ errorCode: "GET_ORDERS_FAILED", message: "Error occurred while fetching orders.", error: err });
|
17
|
-
}
|
18
|
-
};
|
19
|
-
|
20
|
-
// Получение одного заказа
|
21
|
-
const getOrder = async (req, res) => {
|
22
|
-
try {
|
23
|
-
const order = await Order.findOne({ _id: req.params._id }).exec();
|
24
|
-
if (!order) {
|
25
|
-
return res.status(404).send({ errorCode: "SINGLE_ORDER_NOT_FOUND", message: "Order not found." });
|
26
|
-
}
|
27
|
-
res.status(200).send(order);
|
28
|
-
} catch (err) {
|
29
|
-
res.status(500).send({ errorCode: "GET_ORDER_FAILED", message: "Error occurred while fetching the order.", error: err });
|
30
|
-
}
|
31
|
-
};
|
32
|
-
|
33
|
-
function formatPositions(positions) {
|
34
|
-
return positions.map(pos => `🔹 ${pos.name} - Price: $${pos.price}, Quantity: ${pos.quantity}`).join('\n');
|
35
|
-
}
|
36
|
-
|
37
|
-
// Функция для форматирования сообщения об ордере
|
38
|
-
function formatOrderMessage(order) {
|
39
|
-
return `
|
40
|
-
🆕 New Order Received!
|
41
|
-
👤 Client: ${order.user.name} (${order.user.phone.number ? order.user.phone.number : 'No phone'})
|
42
|
-
💬 Messenger: ${order.user.messenger ? order.user.messenger.type + ' ' + order.user.messenger.value : 'None'}
|
43
|
-
🏢 Organization: ${order.organization}
|
44
|
-
📦 Positions:\n${formatPositions(order.positions)}
|
45
|
-
📝 Comment: ${order.comment ? order.comment : 'No comment'}
|
46
|
-
💳 Payment: ${order.payment.type}
|
47
|
-
🚚 Delivery: ${order.delivery.type} to ${order.delivery.address}
|
48
|
-
📌 Status: ${order.status}
|
49
|
-
`;
|
50
|
-
}
|
51
|
-
|
52
|
-
// Создание заказа
|
26
|
+
// Создание заказа
|
53
27
|
const create = async (req, res) => {
|
54
28
|
delete req.body._id;
|
55
29
|
|
@@ -81,9 +55,50 @@ const controllerFactory = (db) => {
|
|
81
55
|
}
|
82
56
|
};
|
83
57
|
|
58
|
+
const read = async (req, res) => {
|
59
|
+
|
60
|
+
let stages = [];
|
61
|
+
|
62
|
+
stages = [
|
63
|
+
...queryProcessorGlobals.getBasicOptions(
|
64
|
+
req.query
|
65
|
+
),
|
66
|
+
// For creator
|
67
|
+
queryProcessorGlobals.getCreatorUserLookupStage(),
|
68
|
+
queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
69
|
+
// For owner
|
70
|
+
queryProcessorGlobals.getOwnerUserLookupStage(),
|
71
|
+
queryProcessorGlobals.getOwnerOrganizationLookupStage(),
|
72
|
+
queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
|
73
|
+
// Pagination
|
74
|
+
...queryProcessorGlobals.getSortingOptions(
|
75
|
+
req.query.sortParam,
|
76
|
+
req.query.sortOrder,
|
77
|
+
),
|
78
|
+
...queryProcessorGlobals.getPaginationOptions(
|
79
|
+
req.query.skip,
|
80
|
+
req.query.limit
|
81
|
+
)
|
82
|
+
];
|
83
|
+
|
84
|
+
try {
|
85
|
+
const orders = await Order.aggregate(stages);
|
86
|
+
|
87
|
+
if (!orders) {
|
88
|
+
return res.status(404).send({ errorCode: "ORDER_NOT_FOUND", message: "Orders not found." });
|
89
|
+
}
|
90
|
+
|
91
|
+
res.status(200).send(orders);
|
92
|
+
|
93
|
+
} catch (err) {
|
94
|
+
console.log(err);
|
95
|
+
res.status(500).send({ errorCode: "GET_ORDERS_FAILED", message: "Error occurred while fetching orders.", error: err });
|
96
|
+
}
|
97
|
+
};
|
98
|
+
|
84
99
|
// Обновление заказа
|
85
100
|
const update = async (req, res) => {
|
86
|
-
const order = await Order.findById(req.body._id);
|
101
|
+
const order = await Order.findById(new db.mongoose.Schema.Types.ObjectId(req.body._id));
|
87
102
|
|
88
103
|
if (!order) {
|
89
104
|
return res.status(404).send({ errorCode: "ORDER_NOT_FOUND", message: "Order not found." });
|
@@ -141,7 +156,6 @@ const controllerFactory = (db) => {
|
|
141
156
|
return {
|
142
157
|
create,
|
143
158
|
read,
|
144
|
-
getOrder,
|
145
159
|
update,
|
146
160
|
changePaymentStatus,
|
147
161
|
deleteOrder
|
@@ -1,30 +1,24 @@
|
|
1
|
+
const applyOwnershipSchema = require('@pf/src/modules/globals/models/ownership.schema.js');
|
2
|
+
|
1
3
|
module.exports = (db) => {
|
2
|
-
|
4
|
+
|
3
5
|
const OrderSchema = new db.mongoose.Schema({
|
4
|
-
|
5
|
-
type: db.mongoose.Schema.Types.ObjectId,
|
6
|
-
ref: 'User',
|
7
|
-
},
|
8
|
-
user: {
|
9
|
-
_id: { type: Boolean },
|
6
|
+
client: {
|
10
7
|
name: { type: String, trim: true },
|
11
8
|
phone: { type: Object, trim: true },
|
12
|
-
|
9
|
+
email: { type: String, trim: true },
|
13
10
|
messenger: {
|
14
11
|
type: { type: String, trim: true },
|
15
12
|
value: { type: String, trim: true }
|
16
13
|
}
|
17
14
|
},
|
18
|
-
organization: {
|
19
|
-
type: db.mongoose.Schema.Types.ObjectId,
|
20
|
-
ref: 'Organization',
|
21
|
-
},
|
22
15
|
positions: {
|
23
16
|
type: Array
|
24
17
|
},
|
25
18
|
status: {
|
26
19
|
type: String
|
27
20
|
},
|
21
|
+
|
28
22
|
status_history: [{
|
29
23
|
status: {
|
30
24
|
type: String,
|
@@ -42,8 +36,8 @@ module.exports = (db) => {
|
|
42
36
|
type: String,
|
43
37
|
trim: true
|
44
38
|
}
|
45
|
-
// Здесь вы можете добавить любые другие поля, которые считаете нужными
|
46
39
|
}],
|
40
|
+
|
47
41
|
comment: {
|
48
42
|
type: String,
|
49
43
|
trim: true
|
@@ -78,6 +72,8 @@ module.exports = (db) => {
|
|
78
72
|
}
|
79
73
|
});
|
80
74
|
|
75
|
+
applyOwnershipSchema(OrderSchema,db);
|
76
|
+
|
81
77
|
const Order = db.mongoose.model("Order", OrderSchema);
|
82
78
|
|
83
79
|
return Order;
|
@@ -5,6 +5,7 @@ const middlewareFactory = require('@pf/src/modules/middlewares/server');
|
|
5
5
|
// Routes
|
6
6
|
module.exports = function(app, db) {
|
7
7
|
const controller = controllerFactory(db);
|
8
|
+
|
8
9
|
const { authJwt } = middlewareFactory(db);
|
9
10
|
|
10
11
|
app.use(function(req, res, next) {
|
@@ -20,11 +21,6 @@ module.exports = function(app, db) {
|
|
20
21
|
app.post(
|
21
22
|
"/api/orders/create",
|
22
23
|
controller.create
|
23
|
-
);
|
24
|
-
// Get order
|
25
|
-
app.get(
|
26
|
-
"/api/orders/:_id",
|
27
|
-
controller.getOrder
|
28
24
|
);
|
29
25
|
// Get orders
|
30
26
|
app.get(
|
@@ -37,27 +33,17 @@ module.exports = function(app, db) {
|
|
37
33
|
authJwt.verifyToken
|
38
34
|
],
|
39
35
|
controller.update
|
40
|
-
);
|
41
|
-
// Update order
|
42
|
-
app.post(
|
43
|
-
"/api/orders/:_id",
|
44
|
-
controller.update
|
45
|
-
);
|
46
|
-
// Get orders
|
47
|
-
app.post(
|
48
|
-
"/api/orders/payment/:_id",
|
49
|
-
controller.changePaymentStatus
|
50
|
-
);
|
51
|
-
// Delete product
|
52
|
-
app.delete(
|
53
|
-
"/api/orders/:_id",
|
54
|
-
controller.deleteOrder
|
55
36
|
);
|
56
37
|
app.post(
|
57
38
|
"/api/orders/delete",
|
58
39
|
controller.deleteOrder
|
59
40
|
);
|
60
41
|
|
42
|
+
// Change Payment status
|
43
|
+
// app.post(
|
44
|
+
// "/api/orders/payment/:_id",
|
45
|
+
// controller.changePaymentStatus
|
46
|
+
// );
|
61
47
|
|
62
48
|
};
|
63
49
|
|
@@ -10,22 +10,32 @@ import { setError } from '@pf/src/modules/globals/store/globals'
|
|
10
10
|
const state = reactive({
|
11
11
|
all: [],
|
12
12
|
current: {
|
13
|
-
_id:
|
14
|
-
|
13
|
+
_id: null,
|
14
|
+
|
15
15
|
positions: [],
|
16
16
|
status: null,
|
17
17
|
comment: '',
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
owner: {
|
20
|
+
type: 'organization',
|
21
|
+
target: null,
|
22
|
+
},
|
23
|
+
|
24
|
+
creator: {
|
25
|
+
type: 'client',
|
26
|
+
target: null,
|
27
|
+
},
|
28
|
+
|
29
|
+
client: {
|
30
|
+
name: null,
|
22
31
|
phone: null,
|
23
32
|
messenger: {
|
24
|
-
type:
|
25
|
-
value:
|
33
|
+
type: null,
|
34
|
+
value: null
|
26
35
|
},
|
27
36
|
},
|
28
37
|
|
38
|
+
|
29
39
|
payment: {
|
30
40
|
type: '',
|
31
41
|
status: '',
|
@@ -40,12 +50,14 @@ const state = reactive({
|
|
40
50
|
});
|
41
51
|
|
42
52
|
const actions = {
|
43
|
-
async create(
|
53
|
+
async create(positions, owner, creator) {
|
44
54
|
try {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
55
|
+
let order = {
|
56
|
+
positions: positions,
|
57
|
+
owner: owner,
|
58
|
+
creator: creator
|
59
|
+
}
|
60
|
+
const response = await $axios.post('/api/orders/create', order);
|
49
61
|
|
50
62
|
state.all.push(response.data);
|
51
63
|
|
@@ -168,16 +168,35 @@ const controllerFactory = (db) => {
|
|
168
168
|
userLocation.coordinates = [lng,lat]
|
169
169
|
}
|
170
170
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
171
|
+
// Determine the search radius based on the level of specificity
|
172
|
+
const earthRadiusKm = 6378.1;
|
173
|
+
|
174
|
+
let radius = null;
|
175
|
+
|
176
|
+
if (locationRadius) {
|
177
|
+
radius = parseFloat(locationRadius) / earthRadiusKm;
|
178
|
+
} else if (city) {
|
179
|
+
radius = 500 / earthRadiusKm;
|
180
|
+
} else if (state) {
|
181
|
+
radius = 1000 / earthRadiusKm;
|
182
|
+
} else {
|
183
|
+
radius = null
|
184
|
+
}
|
185
|
+
|
186
|
+
const geoWithinCondition = {
|
187
|
+
"spots.location.coordinates": {
|
188
|
+
$geoWithin: {
|
189
|
+
$centerSphere: [
|
190
|
+
[parseFloat(lng), parseFloat(lat)],
|
191
|
+
radius
|
192
|
+
]
|
193
|
+
}
|
178
194
|
}
|
179
|
-
|
180
|
-
|
195
|
+
};
|
196
|
+
|
197
|
+
if (radius !== null) {
|
198
|
+
matchConditions.push(geoWithinCondition);
|
199
|
+
}
|
181
200
|
}
|
182
201
|
|
183
202
|
const matchStage = matchConditions.length > 0 ? { $match: { $and: matchConditions } } : null;
|
@@ -6,6 +6,8 @@ import { membersRoutes } from './members.router.js';
|
|
6
6
|
import departmentRoutes from './departments.router.js'
|
7
7
|
import productRoutes from './products.router.js';
|
8
8
|
|
9
|
+
import backofficeRoutes from '@pf/src/modules/backoffice/router/backoffice.js'
|
10
|
+
|
9
11
|
const organizations = [{
|
10
12
|
path: 'organizations',
|
11
13
|
component: layoutEmpty,
|
@@ -19,7 +21,8 @@ const organizations = [{
|
|
19
21
|
...organizationRoutes,
|
20
22
|
...membersRoutes,
|
21
23
|
...departmentRoutes,
|
22
|
-
...productRoutes
|
24
|
+
...productRoutes,
|
25
|
+
...backofficeRoutes
|
23
26
|
|
24
27
|
]
|
25
28
|
}];
|
@@ -1,16 +1,32 @@
|
|
1
1
|
import layoutEmpty from '@pf/src/modules/globals/components/layouts/Empty.vue';
|
2
2
|
import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
|
3
3
|
|
4
|
+
import backofficeRoutes from '@pf/src/modules/backoffice/router/backoffice.js'
|
5
|
+
|
4
6
|
const organizationRoutes = [{
|
5
7
|
path: ':_id',
|
6
|
-
name: '
|
8
|
+
name: 'OrganizationRoot',
|
7
9
|
meta: {
|
8
10
|
title: {
|
9
11
|
en: 'Organization',
|
10
12
|
ru: 'Организация'
|
11
13
|
}
|
12
14
|
},
|
13
|
-
component: () =>
|
15
|
+
component: () => layoutEmpty,
|
16
|
+
children: [
|
17
|
+
{
|
18
|
+
path: '',
|
19
|
+
name: 'Organization',
|
20
|
+
meta: {
|
21
|
+
title: {
|
22
|
+
en: 'Organization',
|
23
|
+
ru: 'Организация'
|
24
|
+
}
|
25
|
+
},
|
26
|
+
component: () => import('@pf/src/modules/organizations/components/pages/Organization.vue'),
|
27
|
+
},
|
28
|
+
...backofficeRoutes
|
29
|
+
],
|
14
30
|
}, {
|
15
31
|
path: 'create',
|
16
32
|
name: 'Create Organization',
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
|
2
2
|
|
3
|
-
const productRoutes = [
|
3
|
+
const productRoutes = [
|
4
|
+
{
|
4
5
|
path: ':_id/products/:product',
|
5
6
|
name: 'Product Organization',
|
6
7
|
meta: {
|
@@ -20,6 +21,25 @@ const productRoutes = [{
|
|
20
21
|
name: 'ProductAdd',
|
21
22
|
component: () => import('@pf/src/modules/products/components/pages/ProductEdit.vue')
|
22
23
|
},{
|
24
|
+
path: ':_id/categories',
|
25
|
+
name: 'Categories Organization',
|
26
|
+
meta: {
|
27
|
+
title: {
|
28
|
+
en: 'Category',
|
29
|
+
ru: 'Категория'
|
30
|
+
}
|
31
|
+
},
|
32
|
+
component: () => import('@pf/src/modules/products/components/pages/Categories.vue')
|
33
|
+
}, {
|
34
|
+
path: ':_id/categories/add',
|
35
|
+
name: 'CategoryAdd',
|
36
|
+
component: () => import('@pf/src/modules/products/components/pages/CategoryEdit.vue')
|
37
|
+
},{
|
38
|
+
path: ':_id/categories/:category/edit',
|
39
|
+
name: 'CategoryEdit',
|
40
|
+
beforeEnter: [validationAuth.requiresAuth],
|
41
|
+
component: () => import('@pf/src/modules/products/components/pages/CategoryEdit.vue')
|
42
|
+
}, {
|
23
43
|
path: ':_id/leftovers',
|
24
44
|
name: 'Leftovers',
|
25
45
|
meta: {
|
@@ -41,8 +61,7 @@ const productRoutes = [{
|
|
41
61
|
authorize: []
|
42
62
|
},
|
43
63
|
component: () => import(/* webpackChunkName: 'LeftoverEdit' */ '@pf/src/modules/products/components/pages/EditLeftover.vue')
|
44
|
-
},
|
45
|
-
{
|
64
|
+
},{
|
46
65
|
path: ':_id/leftovers/:leftover',
|
47
66
|
name: 'LeftoverEdit',
|
48
67
|
meta: {
|
@@ -53,6 +72,7 @@ const productRoutes = [{
|
|
53
72
|
authorize: []
|
54
73
|
},
|
55
74
|
component: () => import(/* webpackChunkName: 'LeftoverEdit' */ '@pf/src/modules/products/components/pages/EditLeftover.vue')
|
56
|
-
}
|
75
|
+
}
|
76
|
+
];
|
57
77
|
|
58
78
|
export default productRoutes;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="flex-v-center flex">
|
3
|
+
<h4 class="mn-r-auto">{{category.name}}</h4>
|
4
|
+
|
5
|
+
<router-link
|
6
|
+
:to="{
|
7
|
+
name: 'CategoryEdit',
|
8
|
+
params: {
|
9
|
+
_id: route.params._id,
|
10
|
+
category: category.url
|
11
|
+
}
|
12
|
+
}"
|
13
|
+
class="mn-r-medium nav-link"
|
14
|
+
>
|
15
|
+
Edit
|
16
|
+
</router-link>
|
17
|
+
<a
|
18
|
+
class="nav-link"
|
19
|
+
@click="deleteCategory(category)"
|
20
|
+
>
|
21
|
+
Delete
|
22
|
+
</a>
|
23
|
+
</div>
|
24
|
+
</template>
|
25
|
+
|
26
|
+
|
27
|
+
<script setup>
|
28
|
+
import { toRef, onMounted, defineEmits } from 'vue';
|
29
|
+
import { useRoute, useRouter } from 'vue-router';
|
30
|
+
|
31
|
+
const props = defineProps({
|
32
|
+
category: Object,
|
33
|
+
});
|
34
|
+
|
35
|
+
const emits = defineEmits(['delete']);
|
36
|
+
|
37
|
+
const route = useRoute();
|
38
|
+
const router = useRouter();
|
39
|
+
|
40
|
+
const deleteCategory = (category) => {
|
41
|
+
emits('delete', category);
|
42
|
+
};
|
43
|
+
|
44
|
+
</script>
|
45
|
+
|
46
|
+
|
47
|
+
<style lang="scss">
|
48
|
+
.categories-card {
|
49
|
+
|
50
|
+
}
|
51
|
+
</style>
|
52
|
+
|
53
|
+
|