@ozdao/prometheus-framework 0.2.53 → 0.2.55
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-180a9315.js +91 -0
- package/dist/main-3b7bd446.mjs +13631 -0
- package/dist/main-B7GT1EB5.js +91 -0
- package/dist/main-Im8ovDCi.mjs +13609 -0
- package/dist/main-MjvO1l5U.js +91 -0
- package/dist/main-N_5Jg8Gx.mjs +13693 -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 +1 -1
- package/dist/products.server.mjs +1 -1
- 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.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +28 -25
- 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/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 +2 -2
- 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/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 +98 -94
- 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 +2 -2
- 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 +1 -1
- 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 +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 +1 -1
- 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 +53 -77
- 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 +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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- 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/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- 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 +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 +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 +1 -1
- 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 +2 -2
- 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 +61 -75
- 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 +2 -2
- 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-8b404cc2.js +1 -0
- package/dist/web-e9b09dc6.mjs +55 -0
- package/dist/web-i-suCpLM.mjs +55 -0
- package/dist/web-ktBiiov5.js +1 -0
- package/dist/web-vB7UhMOt.js +1 -0
- package/dist/web-xvjLzsHu.mjs +55 -0
- package/package.json +1 -1
- package/src/components/EditImages/EditImages.vue +1 -1
- package/src/components/Feed/Feed.vue +26 -0
- package/src/components/Field/Field.vue +5 -0
- 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 +4 -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/gallery/models/photo.model.js +5 -1
- package/src/modules/globals/components/blocks/BlockSearch.vue +4 -3
- package/src/modules/globals/store/globals.js +33 -2
- package/src/modules/landing/components/sections/MobileApp.vue +2 -6
- package/src/modules/orders/components/blocks/CardOrderItem.vue +24 -3
- package/src/modules/orders/components/blocks/StatusHistory.vue +91 -31
- package/src/modules/orders/components/pages/EditOrder.vue +114 -125
- 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/components/pages/Organization.vue +1 -0
- 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/products/components/blocks/CardPosition.vue +7 -7
- package/src/modules/products/controllers/products.controller.js +3 -2
- package/src/modules/products/store/products.js +2 -0
- package/src/modules/users/components/pages/Profile.vue +2 -2
- package/src/modules/orders/components/sections/FormOrderDetails.vue +0 -220
@@ -1,16 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="">
|
3
|
-
<
|
4
|
-
v-model="selectedOrganization"
|
5
|
-
:options="publics"
|
6
|
-
:multiple="false"
|
7
|
-
:taggable="false"
|
8
|
-
placeholder="Select organization"
|
9
|
-
label="name"
|
10
|
-
track-by="_id"
|
11
|
-
class="mn-b-medium h1 bg-grey radius-medium pd-big"
|
12
|
-
/>
|
13
|
-
|
3
|
+
<h1>Welcome to Backoffice</h1>
|
14
4
|
|
15
5
|
<Menu
|
16
6
|
class="bg-grey mn-b-semi"
|
@@ -166,8 +156,11 @@ import SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue'
|
|
166
156
|
// HELPERS
|
167
157
|
/////////////////////////////
|
168
158
|
import { useRoute, useRouter } from 'vue-router'
|
159
|
+
|
169
160
|
import * as auth from '@pf/src/modules/auth/store/auth'
|
161
|
+
|
170
162
|
import * as organizations from '@pf/src/modules/organizations/store/organizations'
|
163
|
+
|
171
164
|
const route = useRoute()
|
172
165
|
const router = useRouter()
|
173
166
|
/////////////////////////////
|
@@ -183,20 +176,6 @@ const publics = ref([]);
|
|
183
176
|
// MOUNTED
|
184
177
|
/////////////////////////////
|
185
178
|
onMounted(async () =>{
|
186
|
-
const dataPublics = await organizations.actions.read({
|
187
|
-
user: auth.state.user._id,
|
188
|
-
postable: auth.state.user._id,
|
189
|
-
limit: 100
|
190
|
-
})
|
191
|
-
|
192
|
-
console.log(dataPublics)
|
193
|
-
|
194
|
-
publics.value = dataPublics.map(publicItem => ({
|
195
|
-
name: publicItem.profile.name,
|
196
|
-
_id: publicItem._id,
|
197
|
-
photo: publicItem.profile.photo
|
198
|
-
}));
|
199
|
-
|
200
179
|
})
|
201
180
|
</script>
|
202
181
|
|
@@ -6,20 +6,6 @@
|
|
6
6
|
// component: layoutAdmin,
|
7
7
|
// meta: { authorize: ["ROLE_MODERATOR"] },
|
8
8
|
// children: [{
|
9
|
-
// path: 'categories',
|
10
|
-
// name: 'Categories',
|
11
|
-
// component: () => import(/* webpackChunkName: 'Categories' */ '@/components/pages/admin/Categories.vue')
|
12
|
-
// },
|
13
|
-
// {
|
14
|
-
// path: 'categories/add',
|
15
|
-
// name: 'AddCategory',
|
16
|
-
// component: () => import(/* webpackChunkName: 'AddCategory' */ '@/components/pages/admin/CategoryEdit.vue')
|
17
|
-
// },
|
18
|
-
// {
|
19
|
-
// path: 'categories/:url/edit',
|
20
|
-
// name: 'EditCategory',
|
21
|
-
// component: () => import(/* webpackChunkName: 'EditCategory' */ '@/components/pages/admin/CategoryEdit.vue')
|
22
|
-
// },{
|
23
9
|
// path: 'backcalls',
|
24
10
|
// name: 'Backcalls',
|
25
11
|
// // meta: { authorize: ["ROLE_MODERATOR"] },
|
@@ -1,9 +1,12 @@
|
|
1
1
|
import layoutBackoffice from '../components/layouts/Backoffice.vue'
|
2
|
+
import layoutEmpty from '@pf/src/modules/globals/components/layouts/Empty.vue';
|
3
|
+
|
4
|
+
|
2
5
|
import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
|
3
6
|
|
4
7
|
const backofficeRoutes = [{
|
5
8
|
path: 'backoffice',
|
6
|
-
component:
|
9
|
+
component: layoutEmpty,
|
7
10
|
beforeEnter: [
|
8
11
|
validationAuth.requiresAdmin,
|
9
12
|
],
|
@@ -329,22 +329,26 @@
|
|
329
329
|
|
330
330
|
<Field
|
331
331
|
v-model:field="event.specialData.previousTitle"
|
332
|
-
placeholder="
|
332
|
+
placeholder="Title"
|
333
|
+
value="Explore our exclusive party archive"
|
333
334
|
class="w-100 bg-grey radius-small pd-medium"
|
334
335
|
/>
|
335
336
|
<Field
|
336
337
|
v-model:field="event.specialData.previousDescription"
|
337
|
-
|
338
|
+
label="Description"
|
339
|
+
value="Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special."
|
338
340
|
class="w-100 bg-grey radius-small pd-medium"
|
339
341
|
/>
|
340
342
|
<Field
|
341
|
-
v-model:field="event.specialData.
|
342
|
-
|
343
|
+
v-model:field="event.specialData.previousLinkText"
|
344
|
+
label="Button"
|
345
|
+
value="Check In Instagram"
|
343
346
|
class="w-100 bg-grey radius-small pd-medium"
|
344
347
|
/>
|
345
348
|
<Field
|
346
|
-
v-model:field="event.specialData.
|
347
|
-
|
349
|
+
v-model:field="event.specialData.previousLink"
|
350
|
+
label="Link"
|
351
|
+
value="https://www.instagram.com/thecommune.phuket/"
|
348
352
|
class="w-100 bg-grey radius-small pd-medium"
|
349
353
|
/>
|
350
354
|
|
@@ -22,10 +22,11 @@
|
|
22
22
|
style="object-fit: cover;"
|
23
23
|
ref="videoElement"
|
24
24
|
class="pos-absolute pos-t-0 pos-l-0 w-100 h-100"
|
25
|
-
preload autoplay muted loop playsinlineclass playsinline
|
25
|
+
preload autoplay muted loop playsinlineclass playsinline
|
26
26
|
itemprop="video"
|
27
27
|
type="video/webm"
|
28
28
|
>
|
29
|
+
<source :src="content.video" :type="getVideoType(content.video)" />
|
29
30
|
</video>
|
30
31
|
</div>
|
31
32
|
|
@@ -38,7 +39,7 @@
|
|
38
39
|
pd-big mn-r-auto mn-l-auto t-white flex-h-center flex-column o-hidden flex-v-start t-left flex w-100 h-100 gap-zero">
|
39
40
|
<!-- <img src="/logo/jungle-stereo-cosmonaut.png" class="h-8r mn-b-small z-index-1"/> -->
|
40
41
|
<div class="mn-b-big z-index-1 flex-nowrap flex gap-small">
|
41
|
-
<img v-for="logo in content.logos" class="radius-thin i-big" :src="logo">
|
42
|
+
<img v-for="logo in content.logos" class="radius-thin object-fit-contain i-big" :src="logo">
|
42
43
|
</div>
|
43
44
|
|
44
45
|
<h3 class="pd-thin z-index-1 w-max br-solid br-2px br-white radius-extra mn-b-thin">
|
@@ -128,6 +129,15 @@
|
|
128
129
|
};
|
129
130
|
}
|
130
131
|
|
132
|
+
function getVideoType(videoUrl) {
|
133
|
+
if (videoUrl.endsWith('.mp4')) {
|
134
|
+
return 'video/mp4';
|
135
|
+
} else if (videoUrl.endsWith('.webm')) {
|
136
|
+
return 'video/webm';
|
137
|
+
}
|
138
|
+
return '';
|
139
|
+
}
|
140
|
+
|
131
141
|
async function playVid() {
|
132
142
|
if (videoElement.value.paused && !isPlaying) {
|
133
143
|
return videoElement.value.play();
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="cols-2 gap-big pos-relative ">
|
4
4
|
<div class="cols-1 gap-small ">
|
5
5
|
<a v-if="options?.link" @click="clickBuyTicket()" href="#" class="bg-main flex-child-grow-1 flex-child-shrink-0 flex-child-basis-auto o-hidden radius-big pd-big flex-center flex-column flex w-100 gap-zero">
|
6
|
-
<img v-if="content?.ticket" class="w-
|
6
|
+
<img v-if="content?.ticket" class="w-80" :src="content?.ticket">
|
7
7
|
|
8
8
|
<a class="t-white bg-black pd-l-small pd-b-thin pd-t-thin pd-r-small h4 radius-extra uppercase t-nye204">
|
9
9
|
<!-- SOLD OUT -->
|
@@ -26,17 +26,18 @@ const updateSearch = (search) => {
|
|
26
26
|
<template>
|
27
27
|
<div class="flex-v-center flex-nowrap flex pd-small bg-grey w-100 radius-big">
|
28
28
|
<IconSearch class="i-medium t-transp mn-r-thin" />
|
29
|
+
|
29
30
|
<Field
|
30
31
|
:placeholder="placeholder"
|
31
|
-
@update:field="search =>
|
32
|
+
@update:field="search => updateSearch(search)"
|
32
33
|
class="w-100"
|
33
34
|
/>
|
34
35
|
|
35
|
-
<button
|
36
|
+
<!-- <button
|
36
37
|
class="pd-r-small pd-l-small pd-t-thin pd-b-thin p-medium uppercase p-small t-medium cursor-pointer radius-extra bg-main"
|
37
38
|
@click="updateSearch(stateSearch)"
|
38
39
|
>
|
39
40
|
{{ button }}
|
40
|
-
</button>
|
41
|
+
</button> -->
|
41
42
|
</div>
|
42
43
|
</template>
|
@@ -67,7 +67,7 @@ const actions = {
|
|
67
67
|
}
|
68
68
|
},
|
69
69
|
|
70
|
-
update(array, item
|
70
|
+
update(array, item) {
|
71
71
|
const existingItemIndex = array.findIndex(i => i._id === item._id);
|
72
72
|
|
73
73
|
if (existingItemIndex === -1) {
|
@@ -77,13 +77,44 @@ const actions = {
|
|
77
77
|
}
|
78
78
|
},
|
79
79
|
|
80
|
-
delete(array, item
|
80
|
+
delete(array, item) {
|
81
81
|
const existingItemIndex = array.findIndex(c => c._id === item._id);
|
82
82
|
|
83
83
|
if (existingItemIndex !== -1) {
|
84
84
|
array.splice(existingItemIndex, 1);
|
85
85
|
}
|
86
86
|
},
|
87
|
+
|
88
|
+
|
89
|
+
increment(array, item) {
|
90
|
+
console.log(array)
|
91
|
+
console.log(item)
|
92
|
+
const arrayItem = array.find(
|
93
|
+
(i) => i._id === item._id
|
94
|
+
);
|
95
|
+
|
96
|
+
if (arrayItem) {
|
97
|
+
arrayItem.quantity++;
|
98
|
+
}
|
99
|
+
},
|
100
|
+
|
101
|
+
decrement(array, item) {
|
102
|
+
const arrayItem = array.find(
|
103
|
+
(i) => i._id === item._id
|
104
|
+
);
|
105
|
+
|
106
|
+
const arrayItemIndex = array.indexOf(arrayItem);
|
107
|
+
|
108
|
+
if (arrayItemIndex > -1) {
|
109
|
+
arrayItem.quantity--;
|
110
|
+
|
111
|
+
if (arrayItem.quantity < 1) array.splice(arrayItemIndex, 1);
|
112
|
+
}
|
113
|
+
},
|
114
|
+
|
115
|
+
reset(array) {
|
116
|
+
array = [];
|
117
|
+
},
|
87
118
|
}
|
88
119
|
|
89
120
|
const errorMessages = {
|
@@ -76,15 +76,11 @@ import LabelGooglePlay from '@pf/src/modules/icons/labels/LabelGooglePlay.vue'
|
|
76
76
|
const props = defineProps({
|
77
77
|
mockupImage: {
|
78
78
|
type: String,
|
79
|
-
default: "/landing/mockup.
|
80
|
-
},
|
81
|
-
mockupMobile: {
|
82
|
-
type: String,
|
83
|
-
default: "/landing/mockup-mobile.png"
|
79
|
+
default: "/landing/mockup.jpg"
|
84
80
|
},
|
85
81
|
bgImage: {
|
86
82
|
type: String,
|
87
|
-
default: ""
|
83
|
+
default: ""
|
88
84
|
},
|
89
85
|
textData: {
|
90
86
|
type: Object,
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div
|
3
3
|
class="gap-small pos-relative cols-1"
|
4
|
-
style="box-sizing: content-box;"
|
5
4
|
>
|
6
5
|
|
7
6
|
<div class="pos-relative w-100 gap-thin flex-stretch flex-nowrap flex">
|
@@ -39,7 +38,7 @@
|
|
39
38
|
<!-- Quantity -->
|
40
39
|
<div v-if="editable" class="mn-t-thin gap-thin flex-nojustify flex">
|
41
40
|
<IconAdd
|
42
|
-
@click="
|
41
|
+
@click="increase_(product)"
|
43
42
|
class="hover-scale-1 cursor-pointer bg-grey i-big pd-thin radius-small"
|
44
43
|
/>
|
45
44
|
<IconMinus
|
@@ -72,15 +71,37 @@
|
|
72
71
|
|
73
72
|
const router = useRouter()
|
74
73
|
|
74
|
+
const emits = defineEmits(['increase', 'decrease', 'remove'])
|
75
|
+
|
75
76
|
const props = defineProps({
|
76
77
|
product: Object,
|
77
78
|
editable: String,
|
78
79
|
increase: Function,
|
79
80
|
decrease: Function,
|
80
81
|
remove: Function
|
81
|
-
|
82
82
|
})
|
83
83
|
|
84
|
+
function increase_ (product) {
|
85
|
+
if (props.increase) {
|
86
|
+
props.increase(product)
|
87
|
+
}
|
88
|
+
emits('increase', product)
|
89
|
+
}
|
90
|
+
|
91
|
+
function decrease (product) {
|
92
|
+
if (props.decrease) {
|
93
|
+
props.decrease(product)
|
94
|
+
}
|
95
|
+
emits('decrease', product)
|
96
|
+
}
|
97
|
+
|
98
|
+
function remove (product) {
|
99
|
+
if (props.remove) {
|
100
|
+
props.remove(product)
|
101
|
+
}
|
102
|
+
emits('remove', product)
|
103
|
+
}
|
104
|
+
|
84
105
|
</script>
|
85
106
|
|
86
107
|
<style lang="scss">
|
@@ -10,6 +10,7 @@
|
|
10
10
|
/>
|
11
11
|
</div>
|
12
12
|
<p class="h4 w-8r">{{status.name}}</p>
|
13
|
+
<!-- <button v-if="status.value === 'delivered'" @click="printReceipt()" class="mn-l-auto bg-main button radius-big">Print</button> -->
|
13
14
|
<button v-if="edit" :disabled="!isNextPossibleStatus(status.value)" @click="setStatus(status)" class="mn-l-auto bg-main button radius-big">Set status</button>
|
14
15
|
</div>
|
15
16
|
</div>
|
@@ -20,6 +21,8 @@ import { ref, computed } from 'vue';
|
|
20
21
|
|
21
22
|
import IconCheckmark from '@pf/src/modules/icons/navigation/IconCheckmark.vue'
|
22
23
|
|
24
|
+
// import Socket from '@vendus/sockets-for-cordova';
|
25
|
+
|
23
26
|
const props = defineProps({
|
24
27
|
statusHistory: {
|
25
28
|
type: Array
|
@@ -33,40 +36,42 @@ const props = defineProps({
|
|
33
36
|
})
|
34
37
|
|
35
38
|
// Инициализация состояния компонента
|
36
|
-
const statuses = ref([
|
39
|
+
const statuses = ref([
|
40
|
+
{
|
37
41
|
value: 'created',
|
38
42
|
name: 'Received',
|
39
43
|
nextstatus: 'Confirming order...',
|
40
44
|
description: 'Your order has been successfully created. Our manager will contact you within five minutes to confirm your order.'
|
41
|
-
},{
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
},{
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
},{
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
},{
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
},{
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
},{
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
45
|
+
},{
|
46
|
+
value: 'confirming',
|
47
|
+
name: 'Confirming',
|
48
|
+
nextstatus: 'Confirming order...',
|
49
|
+
description: 'Your order has been confirmed. We are now processing your items and preparing them for shipment.'
|
50
|
+
},{
|
51
|
+
value: 'confirmed',
|
52
|
+
name: 'Confirmed',
|
53
|
+
nextstatus: 'Order is confirmed. Packing order...',
|
54
|
+
description: 'Your order has been confirmed. We are now processing your items and preparing them for shipment.'
|
55
|
+
},{
|
56
|
+
value: 'packing',
|
57
|
+
name: 'Packing',
|
58
|
+
nextstatus: 'Packing order...',
|
59
|
+
description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'
|
60
|
+
},{
|
61
|
+
value: 'packed',
|
62
|
+
name: 'Packed',
|
63
|
+
nextstatus: 'Delivering order...',
|
64
|
+
description: 'Your order is now awaiting shipment. Once shipped, you will receive a notification with tracking information.'
|
65
|
+
},{
|
66
|
+
value: 'in delivery',
|
67
|
+
name: 'Delivering',
|
68
|
+
description: 'Your order is currently in transit. Our delivery team is working hard to get your items to you as soon as possible.'
|
69
|
+
},{
|
70
|
+
value: 'delivered',
|
71
|
+
name: 'Delivered',
|
72
|
+
description: 'Congratulations! Your order has been successfully delivered. If you have any concerns or feedback, feel free to contact us.'
|
73
|
+
}
|
74
|
+
]);
|
70
75
|
|
71
76
|
const statusCurrent = ref(props.statusCurrent);
|
72
77
|
const statusHistory = ref(props.statusHistory);
|
@@ -91,5 +96,60 @@ const setStatus = async (newStatus) => {
|
|
91
96
|
// console.log(status)
|
92
97
|
// orders.state.current.status = status.value
|
93
98
|
// await orders.actions.update(orders.state.current)
|
94
|
-
}
|
99
|
+
}
|
100
|
+
|
101
|
+
const printerIP = ref('192.168.1.197');
|
102
|
+
const printerPort = ref(9100);
|
103
|
+
const textToPrint = ref('This is some text to print\n\n');
|
104
|
+
|
105
|
+
// const printReceipt = async () => {
|
106
|
+
// try {
|
107
|
+
// const initPrinter = new Uint8Array([0x1b, 0x40]); // Команда инициализации принтера
|
108
|
+
// const lineFeed = new Uint8Array([0x0a]); // Перевод строки
|
109
|
+
// const cutPaper = new Uint8Array([0x1d, 0x56, 0x01]); // Резка бумаги
|
110
|
+
|
111
|
+
// const encoder = new TextEncoder();
|
112
|
+
// const textData = encoder.encode(textToPrint.value);
|
113
|
+
|
114
|
+
// const dataToSend = new Uint8Array([
|
115
|
+
// ...initPrinter,
|
116
|
+
// ...textData,
|
117
|
+
// ...lineFeed,
|
118
|
+
// ...cutPaper
|
119
|
+
// ]);
|
120
|
+
|
121
|
+
// const socket = new Socket();
|
122
|
+
|
123
|
+
// socket.onError = function (errorMessage) {
|
124
|
+
// console.error('Ошибка при подключении к принтеру:', errorMessage);
|
125
|
+
// };
|
126
|
+
|
127
|
+
// socket.onClose = function (hasError) {
|
128
|
+
// console.log('Соединение с принтером закрыто');
|
129
|
+
// };
|
130
|
+
|
131
|
+
// await new Promise((resolve, reject) => {
|
132
|
+
// socket.open(
|
133
|
+
// printerIP.value,
|
134
|
+
// printerPort.value,
|
135
|
+
// function () {
|
136
|
+
// console.log('Подключено к принтеру');
|
137
|
+
// resolve();
|
138
|
+
// },
|
139
|
+
// function (errorMessage) {
|
140
|
+
// console.error('Не удалось подключиться к принтеру:', errorMessage);
|
141
|
+
// reject(errorMessage);
|
142
|
+
// }
|
143
|
+
// );
|
144
|
+
// });
|
145
|
+
|
146
|
+
// socket.write(dataToSend);
|
147
|
+
|
148
|
+
// socket.shutdownWrite();
|
149
|
+
|
150
|
+
// console.log('Чек успешно напечатан');
|
151
|
+
// } catch (error) {
|
152
|
+
// console.error('Ошибка при печати чека:', error);
|
153
|
+
// }
|
154
|
+
// };
|
95
155
|
</script>
|