@ozdao/martyrs 0.2.425 → 0.2.427
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/martyrs/src/components/Chips/{Chips.vue.cjs → Chips.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue.js → Chips.vue2.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs +87 -5
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +88 -6
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js.map +1 -1
- package/dist/martyrs/src/components/Popup/{Popup.vue2.cjs → Popup.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Popup/{Popup.vue2.js.map → Popup.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Popup/{Popup.vue2.js → Popup.vue.js} +2 -2
- package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -0
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue.cjs → SelectMulti.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue.js → SelectMulti.vue2.js} +2 -2
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue.cjs.map → SelectMulti.vue2.js.map} +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +53 -15
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.js +54 -16
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +38 -66
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +39 -67
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/style.css +39 -61
- package/package.json +1 -1
- package/src/components/PhotoViewer/PhotoViewer.vue +140 -12
- package/src/modules/products/components/blocks/ImagesThumbnails.vue +48 -37
- package/src/modules/products/components/pages/Product.vue +5 -29
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { state as state$2, actions } from "../../store/categories.js";
|
|
|
6
6
|
import _sfc_main$3 from "../../../../components/Button/Button.vue.js";
|
|
7
7
|
import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
/* empty css
|
|
9
|
+
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
import _sfc_main$4 from "../../../../components/Tree/Tree.vue.js";
|
|
@@ -8,7 +8,7 @@ const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
|
8
8
|
const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
|
|
9
9
|
const Field = require("../../../../components/Field/Field.vue.cjs");
|
|
10
10
|
;/* empty css */
|
|
11
|
-
;/* empty css
|
|
11
|
+
;/* empty css */
|
|
12
12
|
;/* empty css */
|
|
13
13
|
;/* empty css */
|
|
14
14
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
@@ -6,7 +6,7 @@ import Select from "../../../../components/Select/Select.vue.js";
|
|
|
6
6
|
import _sfc_main$4 from "../../../../components/UploadImage/UploadImage.vue.js";
|
|
7
7
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
/* empty css
|
|
9
|
+
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
|
|
@@ -5,8 +5,8 @@ const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
|
5
5
|
const Field = require("../../../../components/Field/Field.vue.cjs");
|
|
6
6
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
7
7
|
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
8
|
-
const Popup = require("../../../../components/Popup/Popup.
|
|
9
|
-
;/* empty css
|
|
8
|
+
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
9
|
+
;/* empty css */
|
|
10
10
|
const CardPosition = require("../blocks/CardPosition.vue.cjs");
|
|
11
11
|
const CardOrderItem = require("../../../orders/components/blocks/CardOrderItem.vue.cjs");
|
|
12
12
|
const vueRouter = require("vue-router");
|
|
@@ -3,8 +3,8 @@ import _sfc_main$4 from "../../../../components/Block/Block.vue.js";
|
|
|
3
3
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
4
4
|
import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
|
|
5
5
|
import Select from "../../../../components/Select/Select.vue.js";
|
|
6
|
-
import _sfc_main$1 from "../../../../components/Popup/Popup.
|
|
7
|
-
/* empty css
|
|
6
|
+
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
|
7
|
+
/* empty css */
|
|
8
8
|
import _sfc_main$5 from "../blocks/CardPosition.vue.js";
|
|
9
9
|
import _sfc_main$3 from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
|
10
10
|
import { useRoute, useRouter } from "vue-router";
|
|
@@ -9,13 +9,11 @@ const products = require("../../store/products.cjs");
|
|
|
9
9
|
require("../../store/categories.cjs");
|
|
10
10
|
const shopcart = require("../../../orders/store/shopcart.cjs");
|
|
11
11
|
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
12
|
-
;/* empty css
|
|
12
|
+
;/* empty css */
|
|
13
13
|
const Tab = require("../../../../components/Tab/Tab.vue.cjs");
|
|
14
14
|
const PopupDateSelector = require("../../../globals/views/components/blocks/PopupDateSelector.vue.cjs");
|
|
15
15
|
const IconEdit = require("../../../icons/navigation/IconEdit.vue.cjs");
|
|
16
16
|
const IconShopcartAdd = require("../../../icons/actions/IconShopcartAdd.vue.cjs");
|
|
17
|
-
const PlaceholderImage = require("../../../icons/placeholders/PlaceholderImage.vue.cjs");
|
|
18
|
-
const Images360 = require("../blocks/Images360.vue.cjs");
|
|
19
17
|
const ImagesThumbnails = require("../blocks/ImagesThumbnails.vue.cjs");
|
|
20
18
|
const Price = require("../elements/Price.vue.cjs");
|
|
21
19
|
const PopularProducts = require("../sections/PopularProducts.vue.cjs");
|
|
@@ -24,44 +22,41 @@ const _hoisted_1 = {
|
|
|
24
22
|
class: "h-100 w-100 mobile:pd-thin pd-big bg-white"
|
|
25
23
|
};
|
|
26
24
|
const _hoisted_2 = { class: "cols-2-1_2 w-100 gap-medium" };
|
|
27
|
-
const _hoisted_3 = { class: "w-100
|
|
28
|
-
const _hoisted_4 = { class: "
|
|
29
|
-
const _hoisted_5 =
|
|
30
|
-
const _hoisted_6 = { class: "pos-relative w-100 h-100 flex-column flex-h-center flex" };
|
|
31
|
-
const _hoisted_7 = { class: "w-100 h1-product mn-b-small" };
|
|
32
|
-
const _hoisted_8 = {
|
|
25
|
+
const _hoisted_3 = { class: "pos-relative w-100 h-100 flex-column flex-h-center flex" };
|
|
26
|
+
const _hoisted_4 = { class: "w-100 h1-product mn-b-small" };
|
|
27
|
+
const _hoisted_5 = {
|
|
33
28
|
key: 1,
|
|
34
29
|
class: "h-min-5r o-hidden radius-small bg-light mn-b-medium pos-relative"
|
|
35
30
|
};
|
|
36
|
-
const
|
|
31
|
+
const _hoisted_6 = {
|
|
37
32
|
key: 0,
|
|
38
33
|
class: "pd-medium"
|
|
39
34
|
};
|
|
40
|
-
const
|
|
35
|
+
const _hoisted_7 = {
|
|
41
36
|
key: 0,
|
|
42
37
|
class: "w-100 t-transp"
|
|
43
38
|
};
|
|
44
|
-
const
|
|
39
|
+
const _hoisted_8 = {
|
|
45
40
|
key: 1,
|
|
46
41
|
class: "w-100 t-transp"
|
|
47
42
|
};
|
|
48
|
-
const
|
|
43
|
+
const _hoisted_9 = {
|
|
49
44
|
key: 1,
|
|
50
45
|
class: "cols-2 pd-medium w-100 gap-small"
|
|
51
46
|
};
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
47
|
+
const _hoisted_10 = { class: "w-100 pd-small radius-small bg-white product-information" };
|
|
48
|
+
const _hoisted_11 = { class: "t-demi" };
|
|
49
|
+
const _hoisted_12 = { class: "w-max-33r" };
|
|
50
|
+
const _hoisted_13 = { class: "w-max-33r" };
|
|
51
|
+
const _hoisted_14 = { key: 0 };
|
|
52
|
+
const _hoisted_15 = { class: "gap-thin flex flex-center flex-nowrap" };
|
|
53
|
+
const _hoisted_16 = { key: 1 };
|
|
54
|
+
const _hoisted_17 = { class: "gap-thin flex flex-center flex-nowrap" };
|
|
55
|
+
const _hoisted_18 = {
|
|
61
56
|
key: 1,
|
|
62
57
|
class: "flex-center flex uppercase radius-big t-black w-max pd-small t-medium bg-grey h-3r w-100 mn-r-smallbutton"
|
|
63
58
|
};
|
|
64
|
-
const
|
|
59
|
+
const _hoisted_19 = { class: "h-max pos-relative" };
|
|
65
60
|
const _sfc_main = {
|
|
66
61
|
__name: "Product",
|
|
67
62
|
emits: ["page-loading", "page-loaded"],
|
|
@@ -106,46 +101,23 @@ const _sfc_main = {
|
|
|
106
101
|
var _a, _b, _c, _d;
|
|
107
102
|
return products.state.current._id ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
108
103
|
vue.createElementVNode("div", _hoisted_2, [
|
|
104
|
+
vue.createVNode(ImagesThumbnails.default, {
|
|
105
|
+
images: images.value,
|
|
106
|
+
product: product.value
|
|
107
|
+
}, null, 8, ["images", "product"]),
|
|
109
108
|
vue.createElementVNode("div", _hoisted_3, [
|
|
110
|
-
vue.createElementVNode("div", _hoisted_4, [
|
|
111
|
-
product.value && product.value.image3d ? (vue.openBlock(), vue.createBlock(Images360.default, {
|
|
112
|
-
key: 0,
|
|
113
|
-
class: "h-100 w-100",
|
|
114
|
-
imagePath: `/assets/images/products/${product.value.image3d}`,
|
|
115
|
-
imageCount: 36
|
|
116
|
-
}, null, 8, ["imagePath"])) : vue.createCommentVNode("", true),
|
|
117
|
-
images.value[0] && !product.value.image3d ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
118
|
-
key: 1,
|
|
119
|
-
loading: "lazy",
|
|
120
|
-
class: "h-max h-max-15r bg-white radius-semi w-100",
|
|
121
|
-
style: { "object-fit": "contain" },
|
|
122
|
-
src: (_ctx.FILE_SERVER_URL || "") + images.value[0]
|
|
123
|
-
}, null, 8, _hoisted_5)) : vue.createCommentVNode("", true),
|
|
124
|
-
!images.value[0] && !product.value.image3d ? (vue.openBlock(), vue.createBlock(PlaceholderImage.default, {
|
|
125
|
-
key: 2,
|
|
126
|
-
class: "h-max-20r h-100 w-100",
|
|
127
|
-
style: { "object-fit": "cover" }
|
|
128
|
-
})) : vue.createCommentVNode("", true)
|
|
129
|
-
]),
|
|
130
|
-
images.value.length > 1 ? (vue.openBlock(), vue.createBlock(ImagesThumbnails.default, {
|
|
131
|
-
key: 0,
|
|
132
|
-
images: images.value,
|
|
133
|
-
class: "pd-semi pd-t-zero"
|
|
134
|
-
}, null, 8, ["images"])) : vue.createCommentVNode("", true)
|
|
135
|
-
]),
|
|
136
|
-
vue.createElementVNode("div", _hoisted_6, [
|
|
137
109
|
_ctx.accesses && _ctx.hasAccess(vue.unref(route).params._id, "products", "edit", _ctx.accesses) ? (vue.openBlock(), vue.createBlock(IconEdit.default, {
|
|
138
110
|
key: 0,
|
|
139
111
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.push({ name: "ProductEdit", params: { _id: product.value.owner.target, product: product.value._id } })),
|
|
140
112
|
class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
|
141
113
|
})) : vue.createCommentVNode("", true),
|
|
142
|
-
vue.createElementVNode("h2",
|
|
114
|
+
vue.createElementVNode("h2", _hoisted_4, vue.toDisplayString(product.value.name), 1),
|
|
143
115
|
vue.createVNode(Price.default, {
|
|
144
116
|
product: product.value,
|
|
145
117
|
size: "big",
|
|
146
118
|
class: "flex gap-micro flex-center pd-small br-solid br-1px br-black-transp-10 w-max mn-b-medium"
|
|
147
119
|
}, null, 8, ["product"]),
|
|
148
|
-
product.value.description || product.value.specification ? (vue.openBlock(), vue.createElementBlock("div",
|
|
120
|
+
product.value.description || product.value.specification ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
149
121
|
vue.createVNode(Tab.default, {
|
|
150
122
|
selected: tabProduct.value,
|
|
151
123
|
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => tabProduct.value = $event),
|
|
@@ -158,13 +130,13 @@ const _sfc_main = {
|
|
|
158
130
|
}, null, 8, ["selected"]),
|
|
159
131
|
vue.createVNode(vue.Transition, { name: "slide-fade" }, {
|
|
160
132
|
default: vue.withCtx(() => [
|
|
161
|
-
tabProduct.value === "description" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
162
|
-
product.value.description && !product.value.localization < 1 && !_ctx.recommendation ? (vue.openBlock(), vue.createElementBlock("p",
|
|
163
|
-
product.value.localization && product.value.localization.length > 1 && !_ctx.recommendation ? (vue.openBlock(), vue.createElementBlock("p",
|
|
164
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
133
|
+
tabProduct.value === "description" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
134
|
+
product.value.description && !product.value.localization < 1 && !_ctx.recommendation ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7, vue.toDisplayString(product.value.description), 1)) : vue.createCommentVNode("", true),
|
|
135
|
+
product.value.localization && product.value.localization.length > 1 && !_ctx.recommendation ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_8, vue.toDisplayString(vue.unref(t)("description")), 1)) : vue.createCommentVNode("", true)
|
|
136
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
165
137
|
product.value.information.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(product.value.information, (information) => {
|
|
166
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
167
|
-
vue.createElementVNode("p",
|
|
138
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
|
|
139
|
+
vue.createElementVNode("p", _hoisted_11, vue.toDisplayString(information.name), 1),
|
|
168
140
|
vue.createElementVNode("p", null, vue.toDisplayString(information.value), 1)
|
|
169
141
|
]);
|
|
170
142
|
}), 256)) : vue.createCommentVNode("", true)
|
|
@@ -173,14 +145,14 @@ const _sfc_main = {
|
|
|
173
145
|
_: 1
|
|
174
146
|
})
|
|
175
147
|
])) : vue.createCommentVNode("", true),
|
|
176
|
-
vue.createElementVNode("div",
|
|
177
|
-
vue.createElementVNode("div",
|
|
178
|
-
product.value.listing === "rent" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
148
|
+
vue.createElementVNode("div", _hoisted_12, [
|
|
149
|
+
vue.createElementVNode("div", _hoisted_13, [
|
|
150
|
+
product.value.listing === "rent" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
179
151
|
vue.createElementVNode("button", {
|
|
180
152
|
onClick: openPopup,
|
|
181
153
|
class: "cursor-pointer pd-small radius-big w-max mobile:w-100 bg-main button"
|
|
182
154
|
}, [
|
|
183
|
-
vue.createElementVNode("div",
|
|
155
|
+
vue.createElementVNode("div", _hoisted_15, [
|
|
184
156
|
vue.createVNode(IconShopcartAdd.default, { class: "i-semi" }),
|
|
185
157
|
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(t)("addtoorder")), 1)
|
|
186
158
|
])
|
|
@@ -195,26 +167,26 @@ const _sfc_main = {
|
|
|
195
167
|
onConfirm: (selectedDates) => addToCart(product.value, selectedDates),
|
|
196
168
|
onClose: closePopup
|
|
197
169
|
}, null, 8, ["product", "isOpen", "showFees", "feesRate", "showVat", "vatRate", "onConfirm"])
|
|
198
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
170
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
|
|
199
171
|
product.value.available > 0 ? (vue.openBlock(), vue.createBlock(Button.default, {
|
|
200
172
|
key: 0,
|
|
201
173
|
onClick: _cache[2] || (_cache[2] = ($event) => addToCart(product.value, null)),
|
|
202
174
|
class: "h-3r w-100 bg-main button"
|
|
203
175
|
}, {
|
|
204
176
|
default: vue.withCtx(() => [
|
|
205
|
-
vue.createElementVNode("div",
|
|
177
|
+
vue.createElementVNode("div", _hoisted_17, [
|
|
206
178
|
vue.createVNode(IconShopcartAdd.default, { class: "i-semi" }),
|
|
207
179
|
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(t)("addtoorder")), 1)
|
|
208
180
|
])
|
|
209
181
|
]),
|
|
210
182
|
_: 1
|
|
211
|
-
})) : (vue.openBlock(), vue.createElementBlock("div",
|
|
183
|
+
})) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, " Out of Stock "))
|
|
212
184
|
]))
|
|
213
185
|
])
|
|
214
186
|
])
|
|
215
187
|
])
|
|
216
188
|
]),
|
|
217
|
-
vue.createElementVNode("div",
|
|
189
|
+
vue.createElementVNode("div", _hoisted_19, [
|
|
218
190
|
_cache[3] || (_cache[3] = vue.createElementVNode("h3", { class: "pd-medium pd-b-small" }, "Most Popular", -1)),
|
|
219
191
|
vue.createVNode(PopularProducts.default)
|
|
220
192
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Product.vue"],"sourcesContent":["<template>\n <div v-if=\"products.state.current._id\" class=\"h-100 w-100 mobile:pd-thin pd-big bg-white\">\n <div class=\"cols-2-1_2 w-100 gap-medium\">\n <
|
|
1
|
+
{"version":3,"file":"Product.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Product.vue"],"sourcesContent":["<template>\n <div v-if=\"products.state.current._id\" class=\"h-100 w-100 mobile:pd-thin pd-big bg-white\">\n <div class=\"cols-2-1_2 w-100 gap-medium\">\n\n <ImagesThumbnails\n :images=\"images\"\n :product=\"product\"\n />\n\n <div class=\"pos-relative w-100 h-100 flex-column flex-h-center flex\">\n <IconEdit\n v-if=\"accesses && hasAccess(route.params._id, 'products', 'edit', accesses)\"\n @click=\"$router.push({ name: 'ProductEdit', params: { _id: product.owner.target, product: product._id } })\"\n class=\"pos-absolute pos-t-regular pos-r-regular i-regular t-transp\"\n />\n <h2 class=\"w-100 h1-product mn-b-small\">{{ product.name }}</h2>\n <Price :product=\"product\" size=\"big\" class=\"flex gap-micro flex-center pd-small br-solid br-1px br-black-transp-10 w-max mn-b-medium\" />\n\n <div v-if=\"product.description || product.specification\" class=\"h-min-5r o-hidden radius-small bg-light mn-b-medium pos-relative\">\n <Tab\n v-model:selected=\"tabProduct\"\n :tabs=\"[\n {name: 'Description', value: 'description'},\n {name: 'Specifications', value: 'specifications'}\n ]\"\n tabClass=\"pd-thin bg-white radius-thin p-small uppercase t-medium\"\n class=\"gap-micro bg-light pos-relative z-index-2 pd-thin br-solid br-b br-black-transp-10\"\n />\n <transition name=\"slide-fade\">\n <div v-if=\"tabProduct === 'description'\" class=\"pd-medium\">\n <p v-if=\"product.description && !product.localization < 1 && !recommendation\" class=\"w-100 t-transp\">\n {{ product.description }}\n </p>\n <p v-if=\"product.localization && product.localization.length > 1 && !recommendation\" class=\"w-100 t-transp\">\n {{ t('description') }}\n </p>\n </div>\n <div v-else class=\"cols-2 pd-medium w-100 gap-small\">\n <div\n v-if=\"product.information.length > 0\"\n v-for=\"information in product.information\"\n class=\"w-100 pd-small radius-small bg-white product-information\"\n >\n <p class=\"t-demi\">{{ information.name }}</p>\n <p>{{ information.value }}</p>\n </div>\n </div>\n </transition>\n </div>\n\n <div class=\"w-max-33r\">\n <div class=\"w-max-33r\">\n\t\t <div v-if=\"product.listing === 'rent'\">\n\t\t <button @click=\"openPopup\" class=\"cursor-pointer pd-small radius-big w-max mobile:w-100 bg-main button\">\n\t\t <div class=\"gap-thin flex flex-center flex-nowrap\">\n\t\t <IconShopcartAdd class=\"i-semi\" />\n\t\t <span>{{ t('addtoorder') }}</span>\n\t\t </div>\n\t\t </button>\n\t\t <PopupDateSelector\n\t\t :product=\"product\"\n\t\t :isOpen=\"isPopupOpen\"\n\t\t :showFees=\"globals.state.options?.showFees\"\n :feesRate=\"globals.state.options?.feesRate || 0.15\"\n :showVat=\"globals.state.options?.showVat\"\n :vatRate=\"globals.state.options?.vatRate || 0\"\n\t\t :onConfirm=\"selectedDates => addToCart(product, selectedDates)\"\n\t\t @close=\"closePopup\"\n\t\t />\n\t\t </div>\n\t <div v-else>\n\t <Button\n\t v-if=\"product.available > 0\"\n\t @click=\"addToCart(product, null)\"\n\t class=\"h-3r w-100 bg-main button\"\n\t >\n\t <div class=\"gap-thin flex flex-center flex-nowrap\">\n\t <IconShopcartAdd class=\"i-semi\" />\n\t <span>{{ t('addtoorder') }}</span>\n\t </div>\n\t </Button>\n\t <div\n\t v-else\n\t class=\"flex-center flex uppercase radius-big t-black w-max pd-small t-medium bg-grey h-3r w-100 mn-r-smallbutton\"\n\t >\n\t Out of Stock\n\t </div>\n\t </div>\n\t </div>\n </div>\n </div>\n </div>\n\n <div class=\"h-max pos-relative\">\n <h3 class=\"pd-medium pd-b-small\">Most Popular</h3>\n <PopularProducts />\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed, ref, onMounted } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as products from '@martyrs/src/modules/products/store/products'\nimport * as categories from '@martyrs/src/modules/products/store/categories'\nimport * as shopcart from '@martyrs/src/modules/orders/store/shopcart'\n\nimport Button from '@martyrs/src/components/Button/Button.vue'\nimport Popup from '@martyrs/src/components/Popup/Popup.vue'\nimport Tab from '@martyrs/src/components/Tab/Tab.vue'\nimport Calendar from '@martyrs/src/components/DatePicker/Calendar.vue'\nimport PopupDateSelector from '@martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue'\nimport IconEdit from '@martyrs/src/modules/icons/navigation/IconEdit.vue'\nimport IconShopcartAdd from '@martyrs/src/modules/icons/actions/IconShopcartAdd.vue'\nimport ImagesThumbnails from '@martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue'\nimport Price from '@martyrs/src/modules/products/components/elements/Price.vue'\nimport PopularProducts from '@martyrs/src/modules/products/components/sections/PopularProducts.vue'\n\nconst route = useRoute()\nconst router = useRouter()\n\nconst product = computed(() => products.state.current)\nconst images = computed(() => products.state.current.images)\n\nconst tabProduct = ref('description')\n\nconst text = {\n en: { addtoorder: 'Add to Cart', fastorder: 'Fast Order' },\n ru: { addtoorder: 'Добавить в корзину', fastorder: 'Быстрый заказ' }\n}\n\nconst { t } = useI18n({ messages: text })\n\nconst isPopupOpen = ref(false)\n\nfunction openPopup() {\n isPopupOpen.value = true\n}\n\nfunction closePopup() {\n isPopupOpen.value = false\n}\n\n\n const emit = defineEmits(['page-loading', 'page-loaded']);\n \n\n// products.mutations.resetProduct()\nonMounted(async () => {\n emit('page-loading');\n await products.actions.read({ _id: route.params.product })\n emit('page-loaded');\n\n\n // route.meta.title.en = product.value.name\n // route.meta.title.ru = roduct.value.name\n\n})\n\n// onBeforeMounted\n\nfunction validateToCard(product) {\n return !(product.available > 0)\n}\n\nasync function addToCart(product, selectedDates = null) {\n try {\n if (shopcart.state.organization !== product.owner.target) {\n shopcart.state.organization = product.owner.target\n shopcart.state.positions = []\n }\n await shopcart.actions.addProductToCart(product, product.owner.target, selectedDates)\n return true\n } catch (error) {\n console.error('Ошибка при добавлении товара в корзину:', error)\n throw error\n }\n}\n</script>\n\n<style lang=\"scss\">\n</style>"],"names":["useRoute","useRouter","computed","products.state","ref","useI18n","onMounted","products.actions","product","shopcart.state","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA,UAAM,QAAQA,UAAQ,SAAA;AACPC,cAAS,UAAA;AAExB,UAAM,UAAUC,IAAAA,SAAS,MAAMC,SAAAA,MAAe,OAAO;AACrD,UAAM,SAASD,IAAQ,SAAC,MAAMC,SAAc,MAAC,QAAQ,MAAM;AAE3D,UAAM,aAAaC,IAAG,IAAC,aAAa;AAEpC,UAAM,OAAO;AAAA,MACX,IAAI,EAAE,YAAY,eAAe,WAAW,aAAc;AAAA,MAC1D,IAAI,EAAE,YAAY,sBAAsB,WAAW,gBAAe;AAAA,IACpE;AAEA,UAAM,EAAE,EAAC,IAAKC,QAAAA,QAAQ,EAAE,UAAU,KAAM,CAAA;AAExC,UAAM,cAAcD,IAAG,IAAC,KAAK;AAE7B,aAAS,YAAY;AACnB,kBAAY,QAAQ;AAAA,IACtB;AAEA,aAAS,aAAa;AACpB,kBAAY,QAAQ;AAAA,IACtB;AAGC,UAAM,OAAO;AAIdE,QAAAA,UAAU,YAAY;AACnB,WAAK,cAAc;AACpB,YAAMC,SAAAA,QAAiB,KAAK,EAAE,KAAK,MAAM,OAAO,QAAS,CAAA;AACzD,WAAK,aAAa;AAAA,IAMpB,CAAC;AAQD,mBAAe,UAAUC,UAAS,gBAAgB,MAAM;AACtD,UAAI;AACF,YAAIC,SAAc,MAAC,iBAAiBD,SAAQ,MAAM,QAAQ;AACxDC,yBAAe,eAAeD,SAAQ,MAAM;AAC5CC,mBAAAA,MAAe,YAAY,CAAA;AAAA,QACjC;AACI,cAAMC,SAAAA,QAAiB,iBAAiBF,UAASA,SAAQ,MAAM,QAAQ,aAAa;AACpF,eAAO;AAAA,MACR,SAAQ,OAAO;AACd,gBAAQ,MAAM,2CAA2C,KAAK;AAC9D,cAAM;AAAA,MACV;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, ref, onMounted, createElementBlock, createCommentVNode, openBlock, createElementVNode,
|
|
1
|
+
import { computed, ref, onMounted, createElementBlock, createCommentVNode, openBlock, createElementVNode, createVNode, createBlock, unref, toDisplayString, Transition, withCtx, Fragment, renderList } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
import "../../../auth/views/store/auth.js";
|
|
@@ -7,13 +7,11 @@ import { state, actions } from "../../store/products.js";
|
|
|
7
7
|
import "../../store/categories.js";
|
|
8
8
|
import { state as state$2, actions as actions$1 } from "../../../orders/store/shopcart.js";
|
|
9
9
|
import _sfc_main$6 from "../../../../components/Button/Button.vue.js";
|
|
10
|
-
/* empty css
|
|
10
|
+
/* empty css */
|
|
11
11
|
import _sfc_main$3 from "../../../../components/Tab/Tab.vue.js";
|
|
12
12
|
import _sfc_main$5 from "../../../globals/views/components/blocks/PopupDateSelector.vue.js";
|
|
13
13
|
import _sfc_main$1 from "../../../icons/navigation/IconEdit.vue.js";
|
|
14
14
|
import _sfc_main$4 from "../../../icons/actions/IconShopcartAdd.vue.js";
|
|
15
|
-
import PlaceholderImage from "../../../icons/placeholders/PlaceholderImage.vue.js";
|
|
16
|
-
import Images360 from "../blocks/Images360.vue.js";
|
|
17
15
|
import ImagesThumbnails from "../blocks/ImagesThumbnails.vue.js";
|
|
18
16
|
import _sfc_main$2 from "../elements/Price.vue.js";
|
|
19
17
|
import _sfc_main$7 from "../sections/PopularProducts.vue.js";
|
|
@@ -22,44 +20,41 @@ const _hoisted_1 = {
|
|
|
22
20
|
class: "h-100 w-100 mobile:pd-thin pd-big bg-white"
|
|
23
21
|
};
|
|
24
22
|
const _hoisted_2 = { class: "cols-2-1_2 w-100 gap-medium" };
|
|
25
|
-
const _hoisted_3 = { class: "w-100
|
|
26
|
-
const _hoisted_4 = { class: "
|
|
27
|
-
const _hoisted_5 =
|
|
28
|
-
const _hoisted_6 = { class: "pos-relative w-100 h-100 flex-column flex-h-center flex" };
|
|
29
|
-
const _hoisted_7 = { class: "w-100 h1-product mn-b-small" };
|
|
30
|
-
const _hoisted_8 = {
|
|
23
|
+
const _hoisted_3 = { class: "pos-relative w-100 h-100 flex-column flex-h-center flex" };
|
|
24
|
+
const _hoisted_4 = { class: "w-100 h1-product mn-b-small" };
|
|
25
|
+
const _hoisted_5 = {
|
|
31
26
|
key: 1,
|
|
32
27
|
class: "h-min-5r o-hidden radius-small bg-light mn-b-medium pos-relative"
|
|
33
28
|
};
|
|
34
|
-
const
|
|
29
|
+
const _hoisted_6 = {
|
|
35
30
|
key: 0,
|
|
36
31
|
class: "pd-medium"
|
|
37
32
|
};
|
|
38
|
-
const
|
|
33
|
+
const _hoisted_7 = {
|
|
39
34
|
key: 0,
|
|
40
35
|
class: "w-100 t-transp"
|
|
41
36
|
};
|
|
42
|
-
const
|
|
37
|
+
const _hoisted_8 = {
|
|
43
38
|
key: 1,
|
|
44
39
|
class: "w-100 t-transp"
|
|
45
40
|
};
|
|
46
|
-
const
|
|
41
|
+
const _hoisted_9 = {
|
|
47
42
|
key: 1,
|
|
48
43
|
class: "cols-2 pd-medium w-100 gap-small"
|
|
49
44
|
};
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
45
|
+
const _hoisted_10 = { class: "w-100 pd-small radius-small bg-white product-information" };
|
|
46
|
+
const _hoisted_11 = { class: "t-demi" };
|
|
47
|
+
const _hoisted_12 = { class: "w-max-33r" };
|
|
48
|
+
const _hoisted_13 = { class: "w-max-33r" };
|
|
49
|
+
const _hoisted_14 = { key: 0 };
|
|
50
|
+
const _hoisted_15 = { class: "gap-thin flex flex-center flex-nowrap" };
|
|
51
|
+
const _hoisted_16 = { key: 1 };
|
|
52
|
+
const _hoisted_17 = { class: "gap-thin flex flex-center flex-nowrap" };
|
|
53
|
+
const _hoisted_18 = {
|
|
59
54
|
key: 1,
|
|
60
55
|
class: "flex-center flex uppercase radius-big t-black w-max pd-small t-medium bg-grey h-3r w-100 mn-r-smallbutton"
|
|
61
56
|
};
|
|
62
|
-
const
|
|
57
|
+
const _hoisted_19 = { class: "h-max pos-relative" };
|
|
63
58
|
const _sfc_main = {
|
|
64
59
|
__name: "Product",
|
|
65
60
|
emits: ["page-loading", "page-loaded"],
|
|
@@ -104,46 +99,23 @@ const _sfc_main = {
|
|
|
104
99
|
var _a, _b, _c, _d;
|
|
105
100
|
return state.current._id ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
106
101
|
createElementVNode("div", _hoisted_2, [
|
|
102
|
+
createVNode(ImagesThumbnails, {
|
|
103
|
+
images: images.value,
|
|
104
|
+
product: product.value
|
|
105
|
+
}, null, 8, ["images", "product"]),
|
|
107
106
|
createElementVNode("div", _hoisted_3, [
|
|
108
|
-
createElementVNode("div", _hoisted_4, [
|
|
109
|
-
product.value && product.value.image3d ? (openBlock(), createBlock(Images360, {
|
|
110
|
-
key: 0,
|
|
111
|
-
class: "h-100 w-100",
|
|
112
|
-
imagePath: `/assets/images/products/${product.value.image3d}`,
|
|
113
|
-
imageCount: 36
|
|
114
|
-
}, null, 8, ["imagePath"])) : createCommentVNode("", true),
|
|
115
|
-
images.value[0] && !product.value.image3d ? (openBlock(), createElementBlock("img", {
|
|
116
|
-
key: 1,
|
|
117
|
-
loading: "lazy",
|
|
118
|
-
class: "h-max h-max-15r bg-white radius-semi w-100",
|
|
119
|
-
style: { "object-fit": "contain" },
|
|
120
|
-
src: (_ctx.FILE_SERVER_URL || "") + images.value[0]
|
|
121
|
-
}, null, 8, _hoisted_5)) : createCommentVNode("", true),
|
|
122
|
-
!images.value[0] && !product.value.image3d ? (openBlock(), createBlock(PlaceholderImage, {
|
|
123
|
-
key: 2,
|
|
124
|
-
class: "h-max-20r h-100 w-100",
|
|
125
|
-
style: { "object-fit": "cover" }
|
|
126
|
-
})) : createCommentVNode("", true)
|
|
127
|
-
]),
|
|
128
|
-
images.value.length > 1 ? (openBlock(), createBlock(ImagesThumbnails, {
|
|
129
|
-
key: 0,
|
|
130
|
-
images: images.value,
|
|
131
|
-
class: "pd-semi pd-t-zero"
|
|
132
|
-
}, null, 8, ["images"])) : createCommentVNode("", true)
|
|
133
|
-
]),
|
|
134
|
-
createElementVNode("div", _hoisted_6, [
|
|
135
107
|
_ctx.accesses && _ctx.hasAccess(unref(route).params._id, "products", "edit", _ctx.accesses) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
136
108
|
key: 0,
|
|
137
109
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.push({ name: "ProductEdit", params: { _id: product.value.owner.target, product: product.value._id } })),
|
|
138
110
|
class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
|
139
111
|
})) : createCommentVNode("", true),
|
|
140
|
-
createElementVNode("h2",
|
|
112
|
+
createElementVNode("h2", _hoisted_4, toDisplayString(product.value.name), 1),
|
|
141
113
|
createVNode(_sfc_main$2, {
|
|
142
114
|
product: product.value,
|
|
143
115
|
size: "big",
|
|
144
116
|
class: "flex gap-micro flex-center pd-small br-solid br-1px br-black-transp-10 w-max mn-b-medium"
|
|
145
117
|
}, null, 8, ["product"]),
|
|
146
|
-
product.value.description || product.value.specification ? (openBlock(), createElementBlock("div",
|
|
118
|
+
product.value.description || product.value.specification ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
147
119
|
createVNode(_sfc_main$3, {
|
|
148
120
|
selected: tabProduct.value,
|
|
149
121
|
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => tabProduct.value = $event),
|
|
@@ -156,13 +128,13 @@ const _sfc_main = {
|
|
|
156
128
|
}, null, 8, ["selected"]),
|
|
157
129
|
createVNode(Transition, { name: "slide-fade" }, {
|
|
158
130
|
default: withCtx(() => [
|
|
159
|
-
tabProduct.value === "description" ? (openBlock(), createElementBlock("div",
|
|
160
|
-
product.value.description && !product.value.localization < 1 && !_ctx.recommendation ? (openBlock(), createElementBlock("p",
|
|
161
|
-
product.value.localization && product.value.localization.length > 1 && !_ctx.recommendation ? (openBlock(), createElementBlock("p",
|
|
162
|
-
])) : (openBlock(), createElementBlock("div",
|
|
131
|
+
tabProduct.value === "description" ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
132
|
+
product.value.description && !product.value.localization < 1 && !_ctx.recommendation ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(product.value.description), 1)) : createCommentVNode("", true),
|
|
133
|
+
product.value.localization && product.value.localization.length > 1 && !_ctx.recommendation ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(unref(t)("description")), 1)) : createCommentVNode("", true)
|
|
134
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
163
135
|
product.value.information.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(product.value.information, (information) => {
|
|
164
|
-
return openBlock(), createElementBlock("div",
|
|
165
|
-
createElementVNode("p",
|
|
136
|
+
return openBlock(), createElementBlock("div", _hoisted_10, [
|
|
137
|
+
createElementVNode("p", _hoisted_11, toDisplayString(information.name), 1),
|
|
166
138
|
createElementVNode("p", null, toDisplayString(information.value), 1)
|
|
167
139
|
]);
|
|
168
140
|
}), 256)) : createCommentVNode("", true)
|
|
@@ -171,14 +143,14 @@ const _sfc_main = {
|
|
|
171
143
|
_: 1
|
|
172
144
|
})
|
|
173
145
|
])) : createCommentVNode("", true),
|
|
174
|
-
createElementVNode("div",
|
|
175
|
-
createElementVNode("div",
|
|
176
|
-
product.value.listing === "rent" ? (openBlock(), createElementBlock("div",
|
|
146
|
+
createElementVNode("div", _hoisted_12, [
|
|
147
|
+
createElementVNode("div", _hoisted_13, [
|
|
148
|
+
product.value.listing === "rent" ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
177
149
|
createElementVNode("button", {
|
|
178
150
|
onClick: openPopup,
|
|
179
151
|
class: "cursor-pointer pd-small radius-big w-max mobile:w-100 bg-main button"
|
|
180
152
|
}, [
|
|
181
|
-
createElementVNode("div",
|
|
153
|
+
createElementVNode("div", _hoisted_15, [
|
|
182
154
|
createVNode(_sfc_main$4, { class: "i-semi" }),
|
|
183
155
|
createElementVNode("span", null, toDisplayString(unref(t)("addtoorder")), 1)
|
|
184
156
|
])
|
|
@@ -193,26 +165,26 @@ const _sfc_main = {
|
|
|
193
165
|
onConfirm: (selectedDates) => addToCart(product.value, selectedDates),
|
|
194
166
|
onClose: closePopup
|
|
195
167
|
}, null, 8, ["product", "isOpen", "showFees", "feesRate", "showVat", "vatRate", "onConfirm"])
|
|
196
|
-
])) : (openBlock(), createElementBlock("div",
|
|
168
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_16, [
|
|
197
169
|
product.value.available > 0 ? (openBlock(), createBlock(_sfc_main$6, {
|
|
198
170
|
key: 0,
|
|
199
171
|
onClick: _cache[2] || (_cache[2] = ($event) => addToCart(product.value, null)),
|
|
200
172
|
class: "h-3r w-100 bg-main button"
|
|
201
173
|
}, {
|
|
202
174
|
default: withCtx(() => [
|
|
203
|
-
createElementVNode("div",
|
|
175
|
+
createElementVNode("div", _hoisted_17, [
|
|
204
176
|
createVNode(_sfc_main$4, { class: "i-semi" }),
|
|
205
177
|
createElementVNode("span", null, toDisplayString(unref(t)("addtoorder")), 1)
|
|
206
178
|
])
|
|
207
179
|
]),
|
|
208
180
|
_: 1
|
|
209
|
-
})) : (openBlock(), createElementBlock("div",
|
|
181
|
+
})) : (openBlock(), createElementBlock("div", _hoisted_18, " Out of Stock "))
|
|
210
182
|
]))
|
|
211
183
|
])
|
|
212
184
|
])
|
|
213
185
|
])
|
|
214
186
|
]),
|
|
215
|
-
createElementVNode("div",
|
|
187
|
+
createElementVNode("div", _hoisted_19, [
|
|
216
188
|
_cache[3] || (_cache[3] = createElementVNode("h3", { class: "pd-medium pd-b-small" }, "Most Popular", -1)),
|
|
217
189
|
createVNode(_sfc_main$7)
|
|
218
190
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.vue.js","sources":["../../../../../../../src/modules/products/components/pages/Product.vue"],"sourcesContent":["<template>\n <div v-if=\"products.state.current._id\" class=\"h-100 w-100 mobile:pd-thin pd-big bg-white\">\n <div class=\"cols-2-1_2 w-100 gap-medium\">\n <
|
|
1
|
+
{"version":3,"file":"Product.vue.js","sources":["../../../../../../../src/modules/products/components/pages/Product.vue"],"sourcesContent":["<template>\n <div v-if=\"products.state.current._id\" class=\"h-100 w-100 mobile:pd-thin pd-big bg-white\">\n <div class=\"cols-2-1_2 w-100 gap-medium\">\n\n <ImagesThumbnails\n :images=\"images\"\n :product=\"product\"\n />\n\n <div class=\"pos-relative w-100 h-100 flex-column flex-h-center flex\">\n <IconEdit\n v-if=\"accesses && hasAccess(route.params._id, 'products', 'edit', accesses)\"\n @click=\"$router.push({ name: 'ProductEdit', params: { _id: product.owner.target, product: product._id } })\"\n class=\"pos-absolute pos-t-regular pos-r-regular i-regular t-transp\"\n />\n <h2 class=\"w-100 h1-product mn-b-small\">{{ product.name }}</h2>\n <Price :product=\"product\" size=\"big\" class=\"flex gap-micro flex-center pd-small br-solid br-1px br-black-transp-10 w-max mn-b-medium\" />\n\n <div v-if=\"product.description || product.specification\" class=\"h-min-5r o-hidden radius-small bg-light mn-b-medium pos-relative\">\n <Tab\n v-model:selected=\"tabProduct\"\n :tabs=\"[\n {name: 'Description', value: 'description'},\n {name: 'Specifications', value: 'specifications'}\n ]\"\n tabClass=\"pd-thin bg-white radius-thin p-small uppercase t-medium\"\n class=\"gap-micro bg-light pos-relative z-index-2 pd-thin br-solid br-b br-black-transp-10\"\n />\n <transition name=\"slide-fade\">\n <div v-if=\"tabProduct === 'description'\" class=\"pd-medium\">\n <p v-if=\"product.description && !product.localization < 1 && !recommendation\" class=\"w-100 t-transp\">\n {{ product.description }}\n </p>\n <p v-if=\"product.localization && product.localization.length > 1 && !recommendation\" class=\"w-100 t-transp\">\n {{ t('description') }}\n </p>\n </div>\n <div v-else class=\"cols-2 pd-medium w-100 gap-small\">\n <div\n v-if=\"product.information.length > 0\"\n v-for=\"information in product.information\"\n class=\"w-100 pd-small radius-small bg-white product-information\"\n >\n <p class=\"t-demi\">{{ information.name }}</p>\n <p>{{ information.value }}</p>\n </div>\n </div>\n </transition>\n </div>\n\n <div class=\"w-max-33r\">\n <div class=\"w-max-33r\">\n\t\t <div v-if=\"product.listing === 'rent'\">\n\t\t <button @click=\"openPopup\" class=\"cursor-pointer pd-small radius-big w-max mobile:w-100 bg-main button\">\n\t\t <div class=\"gap-thin flex flex-center flex-nowrap\">\n\t\t <IconShopcartAdd class=\"i-semi\" />\n\t\t <span>{{ t('addtoorder') }}</span>\n\t\t </div>\n\t\t </button>\n\t\t <PopupDateSelector\n\t\t :product=\"product\"\n\t\t :isOpen=\"isPopupOpen\"\n\t\t :showFees=\"globals.state.options?.showFees\"\n :feesRate=\"globals.state.options?.feesRate || 0.15\"\n :showVat=\"globals.state.options?.showVat\"\n :vatRate=\"globals.state.options?.vatRate || 0\"\n\t\t :onConfirm=\"selectedDates => addToCart(product, selectedDates)\"\n\t\t @close=\"closePopup\"\n\t\t />\n\t\t </div>\n\t <div v-else>\n\t <Button\n\t v-if=\"product.available > 0\"\n\t @click=\"addToCart(product, null)\"\n\t class=\"h-3r w-100 bg-main button\"\n\t >\n\t <div class=\"gap-thin flex flex-center flex-nowrap\">\n\t <IconShopcartAdd class=\"i-semi\" />\n\t <span>{{ t('addtoorder') }}</span>\n\t </div>\n\t </Button>\n\t <div\n\t v-else\n\t class=\"flex-center flex uppercase radius-big t-black w-max pd-small t-medium bg-grey h-3r w-100 mn-r-smallbutton\"\n\t >\n\t Out of Stock\n\t </div>\n\t </div>\n\t </div>\n </div>\n </div>\n </div>\n\n <div class=\"h-max pos-relative\">\n <h3 class=\"pd-medium pd-b-small\">Most Popular</h3>\n <PopularProducts />\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed, ref, onMounted } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as products from '@martyrs/src/modules/products/store/products'\nimport * as categories from '@martyrs/src/modules/products/store/categories'\nimport * as shopcart from '@martyrs/src/modules/orders/store/shopcart'\n\nimport Button from '@martyrs/src/components/Button/Button.vue'\nimport Popup from '@martyrs/src/components/Popup/Popup.vue'\nimport Tab from '@martyrs/src/components/Tab/Tab.vue'\nimport Calendar from '@martyrs/src/components/DatePicker/Calendar.vue'\nimport PopupDateSelector from '@martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue'\nimport IconEdit from '@martyrs/src/modules/icons/navigation/IconEdit.vue'\nimport IconShopcartAdd from '@martyrs/src/modules/icons/actions/IconShopcartAdd.vue'\nimport ImagesThumbnails from '@martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue'\nimport Price from '@martyrs/src/modules/products/components/elements/Price.vue'\nimport PopularProducts from '@martyrs/src/modules/products/components/sections/PopularProducts.vue'\n\nconst route = useRoute()\nconst router = useRouter()\n\nconst product = computed(() => products.state.current)\nconst images = computed(() => products.state.current.images)\n\nconst tabProduct = ref('description')\n\nconst text = {\n en: { addtoorder: 'Add to Cart', fastorder: 'Fast Order' },\n ru: { addtoorder: 'Добавить в корзину', fastorder: 'Быстрый заказ' }\n}\n\nconst { t } = useI18n({ messages: text })\n\nconst isPopupOpen = ref(false)\n\nfunction openPopup() {\n isPopupOpen.value = true\n}\n\nfunction closePopup() {\n isPopupOpen.value = false\n}\n\n\n const emit = defineEmits(['page-loading', 'page-loaded']);\n \n\n// products.mutations.resetProduct()\nonMounted(async () => {\n emit('page-loading');\n await products.actions.read({ _id: route.params.product })\n emit('page-loaded');\n\n\n // route.meta.title.en = product.value.name\n // route.meta.title.ru = roduct.value.name\n\n})\n\n// onBeforeMounted\n\nfunction validateToCard(product) {\n return !(product.available > 0)\n}\n\nasync function addToCart(product, selectedDates = null) {\n try {\n if (shopcart.state.organization !== product.owner.target) {\n shopcart.state.organization = product.owner.target\n shopcart.state.positions = []\n }\n await shopcart.actions.addProductToCart(product, product.owner.target, selectedDates)\n return true\n } catch (error) {\n console.error('Ошибка при добавлении товара в корзину:', error)\n throw error\n }\n}\n</script>\n\n<style lang=\"scss\">\n</style>"],"names":["products.state","products.actions","product","shopcart.state","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA,UAAM,QAAQ,SAAQ;AACP,cAAS;AAExB,UAAM,UAAU,SAAS,MAAMA,MAAe,OAAO;AACrD,UAAM,SAAS,SAAS,MAAMA,MAAe,QAAQ,MAAM;AAE3D,UAAM,aAAa,IAAI,aAAa;AAEpC,UAAM,OAAO;AAAA,MACX,IAAI,EAAE,YAAY,eAAe,WAAW,aAAc;AAAA,MAC1D,IAAI,EAAE,YAAY,sBAAsB,WAAW,gBAAe;AAAA,IACpE;AAEA,UAAM,EAAE,EAAC,IAAK,QAAQ,EAAE,UAAU,KAAM,CAAA;AAExC,UAAM,cAAc,IAAI,KAAK;AAE7B,aAAS,YAAY;AACnB,kBAAY,QAAQ;AAAA,IACtB;AAEA,aAAS,aAAa;AACpB,kBAAY,QAAQ;AAAA,IACtB;AAGC,UAAM,OAAO;AAId,cAAU,YAAY;AACnB,WAAK,cAAc;AACpB,YAAMC,QAAiB,KAAK,EAAE,KAAK,MAAM,OAAO,QAAS,CAAA;AACzD,WAAK,aAAa;AAAA,IAMpB,CAAC;AAQD,mBAAe,UAAUC,UAAS,gBAAgB,MAAM;AACtD,UAAI;AACF,YAAIC,QAAe,iBAAiBD,SAAQ,MAAM,QAAQ;AACxDC,kBAAe,eAAeD,SAAQ,MAAM;AAC5CC,kBAAe,YAAY,CAAA;AAAA,QACjC;AACI,cAAMC,UAAiB,iBAAiBF,UAASA,SAAQ,MAAM,QAAQ,aAAa;AACpF,eAAO;AAAA,MACR,SAAQ,OAAO;AACd,gBAAQ,MAAM,2CAA2C,KAAK;AAC9D,cAAM;AAAA,MACV;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,7 +9,7 @@ const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
|
9
9
|
const Field = require("../../../../components/Field/Field.vue.cjs");
|
|
10
10
|
const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
|
|
11
11
|
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
12
|
-
const Popup = require("../../../../components/Popup/Popup.
|
|
12
|
+
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
13
13
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
14
14
|
const Tree = require("../../../../components/Tree/Tree.vue.cjs");
|
|
15
15
|
const EditImages = require("../../../../components/EditImages/EditImages.vue2.cjs");
|
|
@@ -7,7 +7,7 @@ import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
|
7
7
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
8
8
|
import _sfc_main$6 from "../../../../components/Checkbox/Checkbox.vue.js";
|
|
9
9
|
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
|
10
|
-
import _sfc_main$9 from "../../../../components/Popup/Popup.
|
|
10
|
+
import _sfc_main$9 from "../../../../components/Popup/Popup.vue.js";
|
|
11
11
|
import _sfc_main$a from "../../../../components/Feed/Feed.vue.js";
|
|
12
12
|
import _sfc_main$5 from "../../../../components/Tree/Tree.vue.js";
|
|
13
13
|
import _sfc_main$3 from "../../../../components/EditImages/EditImages.vue2.js";
|
|
@@ -4,8 +4,8 @@ const vue = require("vue");
|
|
|
4
4
|
const Block = require("../../../../../components/Block/Block.vue.cjs");
|
|
5
5
|
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
|
6
6
|
const Feed = require("../../../../../components/Feed/Feed.vue.cjs");
|
|
7
|
-
const Popup = require("../../../../../components/Popup/Popup.
|
|
8
|
-
;/* empty css
|
|
7
|
+
const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
|
|
8
|
+
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const CardOrderItem = require("../../../../orders/components/blocks/CardOrderItem.vue.cjs");
|
|
11
11
|
const vueRouter = require("vue-router");
|