@ozdao/martyrs 0.2.428 → 0.2.429
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/Block/Block.vue.cjs +1 -1
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.cjs → Tooltip.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js.map → Tooltip.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.cjs +13 -3
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.js +14 -4
- package/dist/martyrs/src/modules/chats/components/pages/ChatPage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs +24 -6
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js +25 -7
- package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs +7 -8
- package/dist/martyrs/src/modules/chats/store/chat.store.cjs.map +1 -1
- package/dist/martyrs/src/modules/chats/store/chat.store.js +7 -8
- package/dist/martyrs/src/modules/chats/store/chat.store.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +6 -8
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +6 -8
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
- 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/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +7 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +7 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +200 -92
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +213 -105
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +8 -11
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +9 -12
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +99 -99
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +102 -102
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +14 -8
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +15 -9
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/orders.cjs +51 -0
- package/dist/martyrs/src/modules/orders/store/orders.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/orders.js +51 -0
- package/dist/martyrs/src/modules/orders/store/orders.js.map +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/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +15 -12
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +15 -12
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.cjs +11 -4
- package/dist/martyrs/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.js +11 -4
- package/dist/martyrs/src/modules/spots/store/spots.js.map +1 -1
- package/dist/orders.server.js +6 -0
- package/dist/orders.server.mjs +6 -0
- package/dist/spots.server.js +44 -3
- package/dist/spots.server.mjs +44 -3
- package/dist/style.css +17 -17
- package/package.json +1 -1
- package/src/modules/chats/components/pages/ChatPage.vue +18 -23
- package/src/modules/chats/components/sections/ChatWindow.vue +55 -38
- package/src/modules/chats/store/chat.store.js +20 -21
- package/src/modules/globals/views/classes/globals.websocket.js +10 -11
- package/src/modules/marketplace/views/components/sections/SectionMenu.vue +1 -1
- package/src/modules/notifications/components/elements/NotificationBadge.vue +7 -0
- package/src/modules/orders/components/blocks/CardOrderItem.vue +2 -2
- package/src/modules/orders/components/pages/OrderBackoffice.vue +146 -77
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -10
- package/src/modules/orders/components/sections/FormDelivery.vue +35 -43
- package/src/modules/orders/components/sections/FormPayment.vue +17 -7
- package/src/modules/orders/controllers/orders.controller.js +10 -0
- package/src/modules/orders/store/orders.js +65 -0
- package/src/modules/spots/components/blocks/CardSpot.vue +8 -7
- package/src/modules/spots/controllers/spots.controller.js +49 -2
- package/src/modules/spots/routes/spots.routes.js +3 -1
- package/src/modules/spots/store/spots.js +12 -4
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +0 -1
|
@@ -7,12 +7,13 @@ const Chips = require("../../../../components/Chips/Chips.vue.cjs");
|
|
|
7
7
|
const Map = require("../../../../components/Map/Map.vue.cjs");
|
|
8
8
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
9
9
|
const _hoisted_1 = { class: "pos-relative cols-2-1_3" };
|
|
10
|
-
const _hoisted_2 = { class: "pd-
|
|
11
|
-
const _hoisted_3 = { class: "
|
|
12
|
-
const _hoisted_4 =
|
|
13
|
-
const _hoisted_5 =
|
|
14
|
-
const _hoisted_6 = {
|
|
15
|
-
const _hoisted_7 = { key:
|
|
10
|
+
const _hoisted_2 = { class: "pd-small w-100" };
|
|
11
|
+
const _hoisted_3 = { class: "bg-light radius-small pd-thin mn-b-thin radius-small" };
|
|
12
|
+
const _hoisted_4 = { class: "p-small w-100 t-truncate" };
|
|
13
|
+
const _hoisted_5 = ["innerHTML"];
|
|
14
|
+
const _hoisted_6 = { class: "d-block p-big mn-b-semi" };
|
|
15
|
+
const _hoisted_7 = { key: 2 };
|
|
16
|
+
const _hoisted_8 = { key: 4 };
|
|
16
17
|
const _sfc_main = {
|
|
17
18
|
__name: "CardSpot",
|
|
18
19
|
props: {
|
|
@@ -53,18 +54,20 @@ const _sfc_main = {
|
|
|
53
54
|
fill: "rgb(var(--white))",
|
|
54
55
|
class: "z-index-2 pos-absolute pos-t-regular pos-r-regular radius-extra bg-second pd-thin i-semi"
|
|
55
56
|
})) : vue.createCommentVNode("", true),
|
|
56
|
-
vue.createElementVNode("
|
|
57
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
58
|
+
vue.createElementVNode("p", _hoisted_4, vue.toDisplayString(__props.spot.address), 1)
|
|
59
|
+
]),
|
|
57
60
|
vue.createElementVNode("h3", {
|
|
58
61
|
class: "mn-b-thin w-100",
|
|
59
62
|
innerHTML: __props.spot.profile.name
|
|
60
|
-
}, null, 8,
|
|
61
|
-
vue.createElementVNode("p",
|
|
62
|
-
__props.showDeliveryOptions ? (vue.openBlock(), vue.createElementBlock("h4",
|
|
63
|
+
}, null, 8, _hoisted_5),
|
|
64
|
+
vue.createElementVNode("p", _hoisted_6, vue.toDisplayString(__props.spot.profile.description), 1),
|
|
65
|
+
__props.showDeliveryOptions ? (vue.openBlock(), vue.createElementBlock("h4", _hoisted_7, "Delivery:")) : vue.createCommentVNode("", true),
|
|
63
66
|
__props.showDeliveryOptions && __props.spot.delivery.length > 0 ? (vue.openBlock(), vue.createBlock(Chips.default, {
|
|
64
67
|
key: 3,
|
|
65
68
|
chips: __props.spot.delivery
|
|
66
69
|
}, null, 8, ["chips"])) : vue.createCommentVNode("", true),
|
|
67
|
-
__props.showPaymentOptions ? (vue.openBlock(), vue.createElementBlock("h4",
|
|
70
|
+
__props.showPaymentOptions ? (vue.openBlock(), vue.createElementBlock("h4", _hoisted_8, "Accepted Payment:")) : vue.createCommentVNode("", true),
|
|
68
71
|
__props.showPaymentOptions && __props.spot.payment.length > 0 ? (vue.openBlock(), vue.createBlock(Chips.default, {
|
|
69
72
|
key: 5,
|
|
70
73
|
chips: __props.spot.payment
|
|
@@ -74,6 +77,6 @@ const _sfc_main = {
|
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
79
|
};
|
|
77
|
-
const CardSpot = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
80
|
+
const CardSpot = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-be40b3c0"]]);
|
|
78
81
|
exports.default = CardSpot;
|
|
79
82
|
//# sourceMappingURL=CardSpot.vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardSpot.vue.cjs","sources":["../../../../../../../src/modules/spots/components/blocks/CardSpot.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative cols-2-1_3\">\n <Map \n :apiKey=\"GOOGLE_MAPS_API_KEY\" \n :location=\"{\n lat: spot.location.coordinates[1],\n lng: spot.location.coordinates[0]\n }\" \n :locale=\"$i18n.locale\"\n class=\"aspect-1x1 h-100 w-auto\"\n />\n\n <div class=\"pd-
|
|
1
|
+
{"version":3,"file":"CardSpot.vue.cjs","sources":["../../../../../../../src/modules/spots/components/blocks/CardSpot.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative cols-2-1_3\">\n <Map \n :apiKey=\"GOOGLE_MAPS_API_KEY\" \n :location=\"{\n lat: spot.location.coordinates[1],\n lng: spot.location.coordinates[0]\n }\" \n :locale=\"$i18n.locale\"\n class=\"aspect-1x1 h-100 w-auto\"\n />\n\n <div class=\"pd-small w-100\">\n\n <!-- v-if=\"user === event.creator.target._id\" -->\n <IconEdit\n v-if=\"editAccess\"\n @click=\"$router.push({\n name: 'Spot Edit',\n params: {\n _id: props.organization._id,\n spot: spot._id\n }\n })\" \n class=\"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp\"\n />\n\n <IconCheckmark\n v-if=\"selected\"\n :fill=\"'rgb(var(--white))'\"\n class=\"z-index-2 pos-absolute pos-t-regular pos-r-regular radius-extra bg-second pd-thin i-semi\"\n />\n \n <div class=\"bg-light radius-small pd-thin mn-b-thin radius-small\">\n <p \n class=\" p-small w-100 t-truncate\"\n >\n {{spot.address}}\n </p>\n </div>\n\n <h3 \n class=\"mn-b-thin w-100\"\n v-html=\"spot.profile.name\"\n />\n\n \n\n <p class=\"d-block p-big mn-b-semi\">{{spot.profile.description}}</p>\n\n <h4 v-if=\"showDeliveryOptions\">Delivery:</h4>\n <Chips \n v-if=\"showDeliveryOptions && spot.delivery.length > 0\" \n :chips=\"spot.delivery\"\n />\n\n <h4 v-if=\"showPaymentOptions\">Accepted Payment:</h4>\n <Chips \n v-if=\"showPaymentOptions && spot.payment.length > 0\" \n :chips=\"spot.payment\"\n />\n\n\n\n </div>\n </div>\n\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport IconEdit from '@martyrs/src/modules/icons/navigation/IconEdit.vue';\n\nimport IconCheckmark from '@martyrs/src/modules/icons/navigation/IconCheckmark.vue';\n\n\nimport Chips from '@martyrs/src/components/Chips/Chips.vue';\nimport Map from '@martyrs/src/components/Map/Map.vue';\n\nconst props = defineProps({\n spot: Object,\n organization: Object,\n editAccess: Boolean,\n showDeliveryOptions: Boolean,\n showPaymentOptions: Boolean,\n selected: Boolean\n});\n</script>\n<style scoped>\n.subspotsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,12 +5,13 @@ import _sfc_main$3 from "../../../../components/Chips/Chips.vue.js";
|
|
|
5
5
|
import Map from "../../../../components/Map/Map.vue.js";
|
|
6
6
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
7
7
|
const _hoisted_1 = { class: "pos-relative cols-2-1_3" };
|
|
8
|
-
const _hoisted_2 = { class: "pd-
|
|
9
|
-
const _hoisted_3 = { class: "
|
|
10
|
-
const _hoisted_4 =
|
|
11
|
-
const _hoisted_5 =
|
|
12
|
-
const _hoisted_6 = {
|
|
13
|
-
const _hoisted_7 = { key:
|
|
8
|
+
const _hoisted_2 = { class: "pd-small w-100" };
|
|
9
|
+
const _hoisted_3 = { class: "bg-light radius-small pd-thin mn-b-thin radius-small" };
|
|
10
|
+
const _hoisted_4 = { class: "p-small w-100 t-truncate" };
|
|
11
|
+
const _hoisted_5 = ["innerHTML"];
|
|
12
|
+
const _hoisted_6 = { class: "d-block p-big mn-b-semi" };
|
|
13
|
+
const _hoisted_7 = { key: 2 };
|
|
14
|
+
const _hoisted_8 = { key: 4 };
|
|
14
15
|
const _sfc_main = {
|
|
15
16
|
__name: "CardSpot",
|
|
16
17
|
props: {
|
|
@@ -51,18 +52,20 @@ const _sfc_main = {
|
|
|
51
52
|
fill: "rgb(var(--white))",
|
|
52
53
|
class: "z-index-2 pos-absolute pos-t-regular pos-r-regular radius-extra bg-second pd-thin i-semi"
|
|
53
54
|
})) : createCommentVNode("", true),
|
|
54
|
-
createElementVNode("
|
|
55
|
+
createElementVNode("div", _hoisted_3, [
|
|
56
|
+
createElementVNode("p", _hoisted_4, toDisplayString(__props.spot.address), 1)
|
|
57
|
+
]),
|
|
55
58
|
createElementVNode("h3", {
|
|
56
59
|
class: "mn-b-thin w-100",
|
|
57
60
|
innerHTML: __props.spot.profile.name
|
|
58
|
-
}, null, 8,
|
|
59
|
-
createElementVNode("p",
|
|
60
|
-
__props.showDeliveryOptions ? (openBlock(), createElementBlock("h4",
|
|
61
|
+
}, null, 8, _hoisted_5),
|
|
62
|
+
createElementVNode("p", _hoisted_6, toDisplayString(__props.spot.profile.description), 1),
|
|
63
|
+
__props.showDeliveryOptions ? (openBlock(), createElementBlock("h4", _hoisted_7, "Delivery:")) : createCommentVNode("", true),
|
|
61
64
|
__props.showDeliveryOptions && __props.spot.delivery.length > 0 ? (openBlock(), createBlock(_sfc_main$3, {
|
|
62
65
|
key: 3,
|
|
63
66
|
chips: __props.spot.delivery
|
|
64
67
|
}, null, 8, ["chips"])) : createCommentVNode("", true),
|
|
65
|
-
__props.showPaymentOptions ? (openBlock(), createElementBlock("h4",
|
|
68
|
+
__props.showPaymentOptions ? (openBlock(), createElementBlock("h4", _hoisted_8, "Accepted Payment:")) : createCommentVNode("", true),
|
|
66
69
|
__props.showPaymentOptions && __props.spot.payment.length > 0 ? (openBlock(), createBlock(_sfc_main$3, {
|
|
67
70
|
key: 5,
|
|
68
71
|
chips: __props.spot.payment
|
|
@@ -72,7 +75,7 @@ const _sfc_main = {
|
|
|
72
75
|
};
|
|
73
76
|
}
|
|
74
77
|
};
|
|
75
|
-
const CardSpot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
78
|
+
const CardSpot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-be40b3c0"]]);
|
|
76
79
|
export {
|
|
77
80
|
CardSpot as default
|
|
78
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardSpot.vue.js","sources":["../../../../../../../src/modules/spots/components/blocks/CardSpot.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative cols-2-1_3\">\n <Map \n :apiKey=\"GOOGLE_MAPS_API_KEY\" \n :location=\"{\n lat: spot.location.coordinates[1],\n lng: spot.location.coordinates[0]\n }\" \n :locale=\"$i18n.locale\"\n class=\"aspect-1x1 h-100 w-auto\"\n />\n\n <div class=\"pd-
|
|
1
|
+
{"version":3,"file":"CardSpot.vue.js","sources":["../../../../../../../src/modules/spots/components/blocks/CardSpot.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative cols-2-1_3\">\n <Map \n :apiKey=\"GOOGLE_MAPS_API_KEY\" \n :location=\"{\n lat: spot.location.coordinates[1],\n lng: spot.location.coordinates[0]\n }\" \n :locale=\"$i18n.locale\"\n class=\"aspect-1x1 h-100 w-auto\"\n />\n\n <div class=\"pd-small w-100\">\n\n <!-- v-if=\"user === event.creator.target._id\" -->\n <IconEdit\n v-if=\"editAccess\"\n @click=\"$router.push({\n name: 'Spot Edit',\n params: {\n _id: props.organization._id,\n spot: spot._id\n }\n })\" \n class=\"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp\"\n />\n\n <IconCheckmark\n v-if=\"selected\"\n :fill=\"'rgb(var(--white))'\"\n class=\"z-index-2 pos-absolute pos-t-regular pos-r-regular radius-extra bg-second pd-thin i-semi\"\n />\n \n <div class=\"bg-light radius-small pd-thin mn-b-thin radius-small\">\n <p \n class=\" p-small w-100 t-truncate\"\n >\n {{spot.address}}\n </p>\n </div>\n\n <h3 \n class=\"mn-b-thin w-100\"\n v-html=\"spot.profile.name\"\n />\n\n \n\n <p class=\"d-block p-big mn-b-semi\">{{spot.profile.description}}</p>\n\n <h4 v-if=\"showDeliveryOptions\">Delivery:</h4>\n <Chips \n v-if=\"showDeliveryOptions && spot.delivery.length > 0\" \n :chips=\"spot.delivery\"\n />\n\n <h4 v-if=\"showPaymentOptions\">Accepted Payment:</h4>\n <Chips \n v-if=\"showPaymentOptions && spot.payment.length > 0\" \n :chips=\"spot.payment\"\n />\n\n\n\n </div>\n </div>\n\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport IconEdit from '@martyrs/src/modules/icons/navigation/IconEdit.vue';\n\nimport IconCheckmark from '@martyrs/src/modules/icons/navigation/IconCheckmark.vue';\n\n\nimport Chips from '@martyrs/src/components/Chips/Chips.vue';\nimport Map from '@martyrs/src/components/Map/Map.vue';\n\nconst props = defineProps({\n spot: Object,\n organization: Object,\n editAccess: Boolean,\n showDeliveryOptions: Boolean,\n showPaymentOptions: Boolean,\n selected: Boolean\n});\n</script>\n<style scoped>\n.subspotsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -38,11 +38,18 @@ const actions = {
|
|
|
38
38
|
globals.setError(error);
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
async read(
|
|
41
|
+
async read(organization) {
|
|
42
42
|
try {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
if (typeof arg === "string") {
|
|
44
|
+
const response = await axiosInstance.default.get(`/api/spots/${organization}`);
|
|
45
|
+
state.spots = response.data;
|
|
46
|
+
return response.data;
|
|
47
|
+
}
|
|
48
|
+
if (typeof organization === "object") {
|
|
49
|
+
const response = await axiosInstance.default.get(`/api/spots`, { organization });
|
|
50
|
+
state.spots = response.data;
|
|
51
|
+
return response.data;
|
|
52
|
+
}
|
|
46
53
|
} catch (error) {
|
|
47
54
|
globals.setError(error);
|
|
48
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spots.cjs","sources":["../../../../../../src/modules/spots/store/spots.js"],"sourcesContent":["// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// Setup Axios\nimport $axios from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n// State\nconst state = reactive({\n spots: [],\n spot: {\n status: 'unpublished',\n organization: '',\n\n profile: {\n photo: '',\n name: '',\n description: '',\n categories: [],\n },\n position: {\n address: undefined,\n location: undefined,\n hide: false\n },\n\n address: undefined,\n location: undefined,\n\n worktime: [],\n delivery: [],\n payment: [],\n members: [],\n subspots: [],\n },\n error: null,\n});\n\n// Methods\nconst actions = {\n async readOne(spotID) {\n try {\n const response = await $axios.get(`/api/spots/get/${spotID}`);\n\n state.spot = response.data;\n } catch (error) {\n setError(error);\n }\n },\n async read(
|
|
1
|
+
{"version":3,"file":"spots.cjs","sources":["../../../../../../src/modules/spots/store/spots.js"],"sourcesContent":["// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// Setup Axios\nimport $axios from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n// State\nconst state = reactive({\n spots: [],\n spot: {\n status: 'unpublished',\n organization: '',\n\n profile: {\n photo: '',\n name: '',\n description: '',\n categories: [],\n },\n position: {\n address: undefined,\n location: undefined,\n hide: false\n },\n\n address: undefined,\n location: undefined,\n\n worktime: [],\n delivery: [],\n payment: [],\n members: [],\n subspots: [],\n },\n error: null,\n});\n\n// Methods\nconst actions = {\n async readOne(spotID) {\n try {\n const response = await $axios.get(`/api/spots/get/${spotID}`);\n\n state.spot = response.data;\n } catch (error) {\n setError(error);\n }\n },\n async read(organization) {\n try {\n if (typeof arg === 'string') {\n const response = await $axios.get(`/api/spots/${organization}`);\n state.spots = response.data;\n return response.data;\n }\n\n if (typeof organization === 'object') {\n const response = await $axios.get(`/api/spots`, { organization });\n state.spots = response.data;\n return response.data;\n }\n } catch (error) {\n setError(error);\n }\n },\n\n async create(organizationId, spot) {\n try {\n const response = await $axios.post(`/api/spots/${organizationId}/create`, spot);\n \n state.spot = response.data;\n } catch (error) {\n setError(error);\n }\n },\n async update(organizationId, spot) {\n try {\n await $axios.post(`/api/spots/${organizationId}/update`, spot);\n } catch (error) {\n setError(error);\n }\n },\n async delete(organizationId, spotId) {\n try {\n await $axios.delete(`/api/spots/${organizationId}/delete`, { data: { _id: spotId } });\n } catch (error) {\n setError(error);\n }\n },\n};\n\n// History\nconst history = []\nhistory.push(state)\n\n// Watch\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\n// Module Export\nexport {\n state,\n actions,\n}"],"names":["reactive","$axios","setError","watch"],"mappings":";;;;;AAOK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,OAAO,CAAE;AAAA,EACT,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,cAAc;AAAA,IAEd,SAAS;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,YAAY,CAAE;AAAA,IACf;AAAA,IACD,UAAU;AAAA,MACR,SAAS;AAAA,MACT,UAAU;AAAA,MACV,MAAM;AAAA,IACP;AAAA,IAED,SAAS;AAAA,IACT,UAAU;AAAA,IAEV,UAAU,CAAE;AAAA,IACZ,UAAU,CAAE;AAAA,IACZ,SAAS,CAAE;AAAA,IACX,SAAS,CAAE;AAAA,IACX,UAAU,CAAE;AAAA,EACb;AAAA,EACD,OAAO;AACT,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,MAAM,QAAQ,QAAQ;AACpB,QAAI;AACF,YAAM,WAAW,MAAMC,sBAAO,IAAI,kBAAkB,MAAM,EAAE;AAE5D,YAAM,OAAO,SAAS;AAAA,IACvB,SAAQ,OAAO;AACdC,cAAAA,SAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EACD,MAAM,KAAK,cAAc;AACvB,QAAI;AACF,UAAI,OAAO,QAAQ,UAAU;AAC3B,cAAM,WAAW,MAAMD,sBAAO,IAAI,cAAc,YAAY,EAAE;AAC9D,cAAM,QAAQ,SAAS;AACvB,eAAO,SAAS;AAAA,MACxB;AAEM,UAAI,OAAO,iBAAiB,UAAU;AACpC,cAAM,WAAW,MAAMA,sBAAO,IAAI,cAAc,EAAE,cAAc;AAChE,cAAM,QAAQ,SAAS;AACvB,eAAO,SAAS;AAAA,MACxB;AAAA,IACK,SAAQ,OAAO;AACdC,cAAAA,SAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EAED,MAAM,OAAO,gBAAgB,MAAM;AACjC,QAAI;AACF,YAAM,WAAW,MAAMD,cAAAA,QAAO,KAAK,cAAc,cAAc,WAAW,IAAI;AAE9E,YAAM,OAAO,SAAS;AAAA,IACvB,SAAQ,OAAO;AACdC,cAAAA,SAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EACD,MAAM,OAAO,gBAAgB,MAAM;AACjC,QAAI;AACF,YAAMD,cAAAA,QAAO,KAAK,cAAc,cAAc,WAAW,IAAI;AAAA,IAC9D,SAAQ,OAAO;AACdC,cAAAA,SAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EACD,MAAM,OAAO,gBAAgB,QAAQ;AACnC,QAAI;AACF,YAAMD,sBAAO,OAAO,cAAc,cAAc,WAAW,EAAE,MAAM,EAAE,KAAK,OAAQ,EAAA,CAAE;AAAA,IACrF,SAAQ,OAAO;AACdC,cAAAA,SAAS,KAAK;AAAA,IACpB;AAAA,EACG;AACH;AAOAC,IAAAA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;;;"}
|
|
@@ -36,11 +36,18 @@ const actions = {
|
|
|
36
36
|
setError(error);
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
async read(
|
|
39
|
+
async read(organization) {
|
|
40
40
|
try {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
if (typeof arg === "string") {
|
|
42
|
+
const response = await $axios.get(`/api/spots/${organization}`);
|
|
43
|
+
state.spots = response.data;
|
|
44
|
+
return response.data;
|
|
45
|
+
}
|
|
46
|
+
if (typeof organization === "object") {
|
|
47
|
+
const response = await $axios.get(`/api/spots`, { organization });
|
|
48
|
+
state.spots = response.data;
|
|
49
|
+
return response.data;
|
|
50
|
+
}
|
|
44
51
|
} catch (error) {
|
|
45
52
|
setError(error);
|
|
46
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spots.js","sources":["../../../../../../src/modules/spots/store/spots.js"],"sourcesContent":["// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// Setup Axios\nimport $axios from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n// State\nconst state = reactive({\n spots: [],\n spot: {\n status: 'unpublished',\n organization: '',\n\n profile: {\n photo: '',\n name: '',\n description: '',\n categories: [],\n },\n position: {\n address: undefined,\n location: undefined,\n hide: false\n },\n\n address: undefined,\n location: undefined,\n\n worktime: [],\n delivery: [],\n payment: [],\n members: [],\n subspots: [],\n },\n error: null,\n});\n\n// Methods\nconst actions = {\n async readOne(spotID) {\n try {\n const response = await $axios.get(`/api/spots/get/${spotID}`);\n\n state.spot = response.data;\n } catch (error) {\n setError(error);\n }\n },\n async read(
|
|
1
|
+
{"version":3,"file":"spots.js","sources":["../../../../../../src/modules/spots/store/spots.js"],"sourcesContent":["// Vue modules\nimport { reactive, watch } from \"vue\";\n// Globals \nimport { setError } from '@martyrs/src/modules/globals/views/store/globals'\n// Setup Axios\nimport $axios from '@martyrs/src/modules/globals/views/utils/axios-instance.js';\n// State\nconst state = reactive({\n spots: [],\n spot: {\n status: 'unpublished',\n organization: '',\n\n profile: {\n photo: '',\n name: '',\n description: '',\n categories: [],\n },\n position: {\n address: undefined,\n location: undefined,\n hide: false\n },\n\n address: undefined,\n location: undefined,\n\n worktime: [],\n delivery: [],\n payment: [],\n members: [],\n subspots: [],\n },\n error: null,\n});\n\n// Methods\nconst actions = {\n async readOne(spotID) {\n try {\n const response = await $axios.get(`/api/spots/get/${spotID}`);\n\n state.spot = response.data;\n } catch (error) {\n setError(error);\n }\n },\n async read(organization) {\n try {\n if (typeof arg === 'string') {\n const response = await $axios.get(`/api/spots/${organization}`);\n state.spots = response.data;\n return response.data;\n }\n\n if (typeof organization === 'object') {\n const response = await $axios.get(`/api/spots`, { organization });\n state.spots = response.data;\n return response.data;\n }\n } catch (error) {\n setError(error);\n }\n },\n\n async create(organizationId, spot) {\n try {\n const response = await $axios.post(`/api/spots/${organizationId}/create`, spot);\n \n state.spot = response.data;\n } catch (error) {\n setError(error);\n }\n },\n async update(organizationId, spot) {\n try {\n await $axios.post(`/api/spots/${organizationId}/update`, spot);\n } catch (error) {\n setError(error);\n }\n },\n async delete(organizationId, spotId) {\n try {\n await $axios.delete(`/api/spots/${organizationId}/delete`, { data: { _id: spotId } });\n } catch (error) {\n setError(error);\n }\n },\n};\n\n// History\nconst history = []\nhistory.push(state)\n\n// Watch\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\n// Module Export\nexport {\n state,\n actions,\n}"],"names":[],"mappings":";;;AAOK,MAAC,QAAQ,SAAS;AAAA,EACrB,OAAO,CAAE;AAAA,EACT,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,cAAc;AAAA,IAEd,SAAS;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,YAAY,CAAE;AAAA,IACf;AAAA,IACD,UAAU;AAAA,MACR,SAAS;AAAA,MACT,UAAU;AAAA,MACV,MAAM;AAAA,IACP;AAAA,IAED,SAAS;AAAA,IACT,UAAU;AAAA,IAEV,UAAU,CAAE;AAAA,IACZ,UAAU,CAAE;AAAA,IACZ,SAAS,CAAE;AAAA,IACX,SAAS,CAAE;AAAA,IACX,UAAU,CAAE;AAAA,EACb;AAAA,EACD,OAAO;AACT,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,MAAM,QAAQ,QAAQ;AACpB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,IAAI,kBAAkB,MAAM,EAAE;AAE5D,YAAM,OAAO,SAAS;AAAA,IACvB,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EACD,MAAM,KAAK,cAAc;AACvB,QAAI;AACF,UAAI,OAAO,QAAQ,UAAU;AAC3B,cAAM,WAAW,MAAM,OAAO,IAAI,cAAc,YAAY,EAAE;AAC9D,cAAM,QAAQ,SAAS;AACvB,eAAO,SAAS;AAAA,MACxB;AAEM,UAAI,OAAO,iBAAiB,UAAU;AACpC,cAAM,WAAW,MAAM,OAAO,IAAI,cAAc,EAAE,cAAc;AAChE,cAAM,QAAQ,SAAS;AACvB,eAAO,SAAS;AAAA,MACxB;AAAA,IACK,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EAED,MAAM,OAAO,gBAAgB,MAAM;AACjC,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,cAAc,cAAc,WAAW,IAAI;AAE9E,YAAM,OAAO,SAAS;AAAA,IACvB,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EACD,MAAM,OAAO,gBAAgB,MAAM;AACjC,QAAI;AACF,YAAM,OAAO,KAAK,cAAc,cAAc,WAAW,IAAI;AAAA,IAC9D,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACpB;AAAA,EACG;AAAA,EACD,MAAM,OAAO,gBAAgB,QAAQ;AACnC,QAAI;AACF,YAAM,OAAO,OAAO,cAAc,cAAc,WAAW,EAAE,MAAM,EAAE,KAAK,OAAQ,EAAA,CAAE;AAAA,IACrF,SAAQ,OAAO;AACd,eAAS,KAAK;AAAA,IACpB;AAAA,EACG;AACH;AAOA,MAAM,OAAO,CAAC,UAAU,aAAa;AAErC,CAAC;"}
|
package/dist/orders.server.js
CHANGED
|
@@ -475,6 +475,12 @@ ${formatPositions(order.positions)}
|
|
|
475
475
|
comment: ""
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
|
+
if (req2.body.payment?.type && req2.body.payment.type !== order.payment?.type) {
|
|
479
|
+
order.payment.type = req2.body.payment.type;
|
|
480
|
+
}
|
|
481
|
+
if (req2.body.payment?.status && req2.body.payment.status !== order.payment?.status) {
|
|
482
|
+
order.payment.status = req2.body.payment.status;
|
|
483
|
+
}
|
|
478
484
|
await order.save();
|
|
479
485
|
if (statusChanged) {
|
|
480
486
|
try {
|
package/dist/orders.server.mjs
CHANGED
|
@@ -474,6 +474,12 @@ ${formatPositions(order.positions)}
|
|
|
474
474
|
comment: ""
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
|
+
if (req2.body.payment?.type && req2.body.payment.type !== order.payment?.type) {
|
|
478
|
+
order.payment.type = req2.body.payment.type;
|
|
479
|
+
}
|
|
480
|
+
if (req2.body.payment?.status && req2.body.payment.status !== order.payment?.status) {
|
|
481
|
+
order.payment.status = req2.body.payment.status;
|
|
482
|
+
}
|
|
477
483
|
await order.save();
|
|
478
484
|
if (statusChanged) {
|
|
479
485
|
try {
|
package/dist/spots.server.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
|
3
|
+
const queryProcessor = require("./queryProcessor-CwQakZkT.js");
|
|
3
4
|
var spot_model;
|
|
4
5
|
var hasRequiredSpot_model;
|
|
5
6
|
function requireSpot_model() {
|
|
@@ -81,8 +82,46 @@ var hasRequiredSpots_controller;
|
|
|
81
82
|
function requireSpots_controller() {
|
|
82
83
|
if (hasRequiredSpots_controller) return spots_controller;
|
|
83
84
|
hasRequiredSpots_controller = 1;
|
|
85
|
+
const queryProcessorGlobals = queryProcessor.requireQueryProcessor();
|
|
84
86
|
const controllerFactory = (db) => {
|
|
85
87
|
const Spot = db.spot;
|
|
88
|
+
const read = async (req, res) => {
|
|
89
|
+
let stages = [
|
|
90
|
+
...queryProcessorGlobals.getBasicOptions(
|
|
91
|
+
req.query
|
|
92
|
+
),
|
|
93
|
+
// Tags
|
|
94
|
+
...queryProcessorGlobals.getTagsOptions(req.query.tags),
|
|
95
|
+
// For creator
|
|
96
|
+
queryProcessorGlobals.getCreatorUserLookupStage(),
|
|
97
|
+
queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
|
98
|
+
queryProcessorGlobals.getCreatorCustomerLookupStage(),
|
|
99
|
+
// For owner
|
|
100
|
+
queryProcessorGlobals.getOwnerUserLookupStage(),
|
|
101
|
+
queryProcessorGlobals.getOwnerOrganizationLookupStage(),
|
|
102
|
+
queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
|
|
103
|
+
queryProcessorGlobals.removeTempPropeties(),
|
|
104
|
+
// Pagination
|
|
105
|
+
...queryProcessorGlobals.getSortingOptions(
|
|
106
|
+
req.query.sortParam,
|
|
107
|
+
req.query.sortOrder
|
|
108
|
+
),
|
|
109
|
+
...queryProcessorGlobals.getPaginationOptions(
|
|
110
|
+
req.query.skip,
|
|
111
|
+
req.query.limit
|
|
112
|
+
)
|
|
113
|
+
];
|
|
114
|
+
try {
|
|
115
|
+
const spots = await Spots.aggregate(stages);
|
|
116
|
+
if (!stpos) {
|
|
117
|
+
return res.status(404).send({ errorCode: "SPOTS_NOT_FOUND", message: "Spots not found." });
|
|
118
|
+
}
|
|
119
|
+
res.status(200).send(spos);
|
|
120
|
+
} catch (err) {
|
|
121
|
+
console.log(err);
|
|
122
|
+
res.status(500).send({ errorCode: "GET_SPOTS_FAILED", message: "Error occurred while fetching spots.", error: err });
|
|
123
|
+
}
|
|
124
|
+
};
|
|
86
125
|
const readOne = (req, res) => {
|
|
87
126
|
Spot.findOne({ _id: req.params._id }).then((spot) => {
|
|
88
127
|
if (!spot) {
|
|
@@ -93,7 +132,7 @@ function requireSpots_controller() {
|
|
|
93
132
|
res.status(500).send({ message: err.message });
|
|
94
133
|
});
|
|
95
134
|
};
|
|
96
|
-
const
|
|
135
|
+
const readOld = (req, res) => {
|
|
97
136
|
Spot.find({ organization: req.params._id }).then((spots) => {
|
|
98
137
|
if (!spots) {
|
|
99
138
|
return res.status(404).send({ message: "Spots not found" });
|
|
@@ -137,8 +176,9 @@ function requireSpots_controller() {
|
|
|
137
176
|
});
|
|
138
177
|
};
|
|
139
178
|
return {
|
|
140
|
-
readOne,
|
|
141
179
|
read,
|
|
180
|
+
readOne,
|
|
181
|
+
readOld,
|
|
142
182
|
create,
|
|
143
183
|
update,
|
|
144
184
|
delete: deleteSpot
|
|
@@ -155,7 +195,8 @@ function requireSpots_routes() {
|
|
|
155
195
|
const controllerFactory = requireSpots_controller();
|
|
156
196
|
spots_routes = function(app, db) {
|
|
157
197
|
const controller = controllerFactory(db);
|
|
158
|
-
app.get("/api/spots
|
|
198
|
+
app.get("/api/spots", controller.read);
|
|
199
|
+
app.get("/api/spots/:_id", controller.readOld);
|
|
159
200
|
app.get("/api/spots/get/:_id", controller.readOne);
|
|
160
201
|
app.post("/api/spots/:_id/create", controller.create);
|
|
161
202
|
app.post("/api/spots/:_id/update", controller.update);
|
package/dist/spots.server.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
|
2
|
+
import { r as requireQueryProcessor } from "./queryProcessor-CCmHM0yi.mjs";
|
|
2
3
|
var spot_model;
|
|
3
4
|
var hasRequiredSpot_model;
|
|
4
5
|
function requireSpot_model() {
|
|
@@ -80,8 +81,46 @@ var hasRequiredSpots_controller;
|
|
|
80
81
|
function requireSpots_controller() {
|
|
81
82
|
if (hasRequiredSpots_controller) return spots_controller;
|
|
82
83
|
hasRequiredSpots_controller = 1;
|
|
84
|
+
const queryProcessorGlobals = requireQueryProcessor();
|
|
83
85
|
const controllerFactory = (db) => {
|
|
84
86
|
const Spot = db.spot;
|
|
87
|
+
const read = async (req, res) => {
|
|
88
|
+
let stages = [
|
|
89
|
+
...queryProcessorGlobals.getBasicOptions(
|
|
90
|
+
req.query
|
|
91
|
+
),
|
|
92
|
+
// Tags
|
|
93
|
+
...queryProcessorGlobals.getTagsOptions(req.query.tags),
|
|
94
|
+
// For creator
|
|
95
|
+
queryProcessorGlobals.getCreatorUserLookupStage(),
|
|
96
|
+
queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
|
97
|
+
queryProcessorGlobals.getCreatorCustomerLookupStage(),
|
|
98
|
+
// For owner
|
|
99
|
+
queryProcessorGlobals.getOwnerUserLookupStage(),
|
|
100
|
+
queryProcessorGlobals.getOwnerOrganizationLookupStage(),
|
|
101
|
+
queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
|
|
102
|
+
queryProcessorGlobals.removeTempPropeties(),
|
|
103
|
+
// Pagination
|
|
104
|
+
...queryProcessorGlobals.getSortingOptions(
|
|
105
|
+
req.query.sortParam,
|
|
106
|
+
req.query.sortOrder
|
|
107
|
+
),
|
|
108
|
+
...queryProcessorGlobals.getPaginationOptions(
|
|
109
|
+
req.query.skip,
|
|
110
|
+
req.query.limit
|
|
111
|
+
)
|
|
112
|
+
];
|
|
113
|
+
try {
|
|
114
|
+
const spots = await Spots.aggregate(stages);
|
|
115
|
+
if (!stpos) {
|
|
116
|
+
return res.status(404).send({ errorCode: "SPOTS_NOT_FOUND", message: "Spots not found." });
|
|
117
|
+
}
|
|
118
|
+
res.status(200).send(spos);
|
|
119
|
+
} catch (err) {
|
|
120
|
+
console.log(err);
|
|
121
|
+
res.status(500).send({ errorCode: "GET_SPOTS_FAILED", message: "Error occurred while fetching spots.", error: err });
|
|
122
|
+
}
|
|
123
|
+
};
|
|
85
124
|
const readOne = (req, res) => {
|
|
86
125
|
Spot.findOne({ _id: req.params._id }).then((spot) => {
|
|
87
126
|
if (!spot) {
|
|
@@ -92,7 +131,7 @@ function requireSpots_controller() {
|
|
|
92
131
|
res.status(500).send({ message: err.message });
|
|
93
132
|
});
|
|
94
133
|
};
|
|
95
|
-
const
|
|
134
|
+
const readOld = (req, res) => {
|
|
96
135
|
Spot.find({ organization: req.params._id }).then((spots) => {
|
|
97
136
|
if (!spots) {
|
|
98
137
|
return res.status(404).send({ message: "Spots not found" });
|
|
@@ -136,8 +175,9 @@ function requireSpots_controller() {
|
|
|
136
175
|
});
|
|
137
176
|
};
|
|
138
177
|
return {
|
|
139
|
-
readOne,
|
|
140
178
|
read,
|
|
179
|
+
readOne,
|
|
180
|
+
readOld,
|
|
141
181
|
create,
|
|
142
182
|
update,
|
|
143
183
|
delete: deleteSpot
|
|
@@ -154,7 +194,8 @@ function requireSpots_routes() {
|
|
|
154
194
|
const controllerFactory = requireSpots_controller();
|
|
155
195
|
spots_routes = function(app, db) {
|
|
156
196
|
const controller = controllerFactory(db);
|
|
157
|
-
app.get("/api/spots
|
|
197
|
+
app.get("/api/spots", controller.read);
|
|
198
|
+
app.get("/api/spots/:_id", controller.readOld);
|
|
158
199
|
app.get("/api/spots/get/:_id", controller.readOne);
|
|
159
200
|
app.post("/api/spots/:_id/create", controller.create);
|
|
160
201
|
app.post("/api/spots/:_id/update", controller.update);
|
package/dist/style.css
CHANGED
|
@@ -1277,21 +1277,21 @@ div.vue-tags-input.disabled * {
|
|
|
1277
1277
|
margin-left: 0.5rem;
|
|
1278
1278
|
}
|
|
1279
1279
|
|
|
1280
|
-
.notification-badge-container[data-v-
|
|
1280
|
+
.notification-badge-container[data-v-73074f7a] {
|
|
1281
1281
|
position: relative;
|
|
1282
1282
|
display: inline-block;
|
|
1283
1283
|
}
|
|
1284
|
-
.notification-button[data-v-
|
|
1284
|
+
.notification-button[data-v-73074f7a] {
|
|
1285
1285
|
background: none;
|
|
1286
1286
|
border: none;
|
|
1287
1287
|
cursor: pointer;
|
|
1288
1288
|
position: relative;
|
|
1289
1289
|
font-size: 1.2rem;
|
|
1290
1290
|
}
|
|
1291
|
-
.notification-icon[data-v-
|
|
1291
|
+
.notification-icon[data-v-73074f7a] {
|
|
1292
1292
|
font-size: 1.4rem;
|
|
1293
1293
|
}
|
|
1294
|
-
.button-counter[data-v-
|
|
1294
|
+
.button-counter[data-v-73074f7a] {
|
|
1295
1295
|
position: absolute;
|
|
1296
1296
|
right: -8px;
|
|
1297
1297
|
bottom: -8px;
|
|
@@ -1305,7 +1305,7 @@ div.vue-tags-input.disabled * {
|
|
|
1305
1305
|
line-height: 16px;
|
|
1306
1306
|
font-size: 10px;
|
|
1307
1307
|
}
|
|
1308
|
-
.notifications-dropdown[data-v-
|
|
1308
|
+
.notifications-dropdown[data-v-73074f7a] {
|
|
1309
1309
|
position: absolute;
|
|
1310
1310
|
top: 100%;
|
|
1311
1311
|
right: 0;
|
|
@@ -1317,40 +1317,40 @@ div.vue-tags-input.disabled * {
|
|
|
1317
1317
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
1318
1318
|
z-index: 1000;
|
|
1319
1319
|
}
|
|
1320
|
-
.notifications-header[data-v-
|
|
1320
|
+
.notifications-header[data-v-73074f7a] {
|
|
1321
1321
|
display: flex;
|
|
1322
1322
|
justify-content: space-between;
|
|
1323
1323
|
align-items: center;
|
|
1324
1324
|
padding: 12px 16px;
|
|
1325
1325
|
border-bottom: 1px solid #eee;
|
|
1326
1326
|
}
|
|
1327
|
-
.notifications-header h3[data-v-
|
|
1327
|
+
.notifications-header h3[data-v-73074f7a] {
|
|
1328
1328
|
margin: 0;
|
|
1329
1329
|
font-size: 1rem;
|
|
1330
1330
|
}
|
|
1331
|
-
.mark-all-read-btn[data-v-
|
|
1331
|
+
.mark-all-read-btn[data-v-73074f7a] {
|
|
1332
1332
|
background: none;
|
|
1333
1333
|
border: none;
|
|
1334
1334
|
color: #2196f3;
|
|
1335
1335
|
font-size: 0.8rem;
|
|
1336
1336
|
cursor: pointer;
|
|
1337
1337
|
}
|
|
1338
|
-
.notifications-loading[data-v-
|
|
1339
|
-
.notifications-empty[data-v-
|
|
1338
|
+
.notifications-loading[data-v-73074f7a],
|
|
1339
|
+
.notifications-empty[data-v-73074f7a] {
|
|
1340
1340
|
padding: 24px;
|
|
1341
1341
|
text-align: center;
|
|
1342
1342
|
color: #666;
|
|
1343
1343
|
}
|
|
1344
|
-
.notifications-list[data-v-
|
|
1344
|
+
.notifications-list[data-v-73074f7a] {
|
|
1345
1345
|
max-height: 300px;
|
|
1346
1346
|
overflow-y: auto;
|
|
1347
1347
|
}
|
|
1348
|
-
.notifications-footer[data-v-
|
|
1348
|
+
.notifications-footer[data-v-73074f7a] {
|
|
1349
1349
|
padding: 12px 16px;
|
|
1350
1350
|
text-align: center;
|
|
1351
1351
|
border-top: 1px solid #eee;
|
|
1352
1352
|
}
|
|
1353
|
-
.notifications-footer a[data-v-
|
|
1353
|
+
.notifications-footer a[data-v-73074f7a] {
|
|
1354
1354
|
color: #2196f3;
|
|
1355
1355
|
text-decoration: none;
|
|
1356
1356
|
font-size: 0.9rem;
|
|
@@ -1603,7 +1603,7 @@ div.vue-tags-input.disabled * {
|
|
|
1603
1603
|
width: 100%;
|
|
1604
1604
|
}
|
|
1605
1605
|
|
|
1606
|
-
.subspotsartment[data-v-
|
|
1606
|
+
.subspotsartment[data-v-be40b3c0] {
|
|
1607
1607
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
1608
1608
|
margin-top: 1rem;
|
|
1609
1609
|
}
|
|
@@ -2508,10 +2508,10 @@ to {
|
|
|
2508
2508
|
}
|
|
2509
2509
|
.vue-select-header {
|
|
2510
2510
|
height: 3rem;
|
|
2511
|
-
}.blink[data-v-
|
|
2512
|
-
animation: blink-animation-
|
|
2511
|
+
}.blink[data-v-c30b339c] {
|
|
2512
|
+
animation: blink-animation-c30b339c 1s ease infinite;
|
|
2513
2513
|
}
|
|
2514
|
-
@keyframes blink-animation-
|
|
2514
|
+
@keyframes blink-animation-c30b339c {
|
|
2515
2515
|
0%, 100% {
|
|
2516
2516
|
opacity: 1;
|
|
2517
2517
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<!-- <div v-for="chat in chats" :key="chat.id" @click="selectChat(chat.id)">
|
|
6
|
-
Чат {{ chat.name }}
|
|
7
|
-
</div> -->
|
|
8
|
-
<!-- </aside> -->
|
|
9
|
-
<!-- <main class="chat-main"> -->
|
|
10
|
-
<ChatWindow />
|
|
11
|
-
<!-- </main> -->
|
|
12
|
-
<!-- </div> -->
|
|
2
|
+
<main class="chat-main">
|
|
3
|
+
<ChatWindow />
|
|
4
|
+
</main>
|
|
13
5
|
</template>
|
|
14
6
|
|
|
15
7
|
<script setup>
|
|
16
|
-
import { ref, onMounted } from 'vue';
|
|
8
|
+
import { ref, onMounted, onUnmounted } from 'vue';
|
|
17
9
|
import ChatWindow from '../sections/ChatWindow.vue';
|
|
18
10
|
import chatStore from '../../store/chat.store.js';
|
|
19
11
|
|
|
@@ -22,29 +14,32 @@ const props = defineProps({
|
|
|
22
14
|
type: String,
|
|
23
15
|
required: true
|
|
24
16
|
},
|
|
17
|
+
user: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
25
21
|
chatID: {
|
|
26
22
|
type: String,
|
|
27
23
|
required: true
|
|
28
24
|
},
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
// const chats = ref([
|
|
32
|
-
// // Примерный список. В реальном приложении, список чатов должен загружаться с сервера.
|
|
33
|
-
// { id: 'chat1', name: 'Чат 1' },
|
|
34
|
-
// { id: 'chat2', name: 'Чат 2' }
|
|
35
|
-
// ]);
|
|
25
|
+
});
|
|
36
26
|
|
|
37
27
|
const selectChat = (chatId) => {
|
|
38
28
|
chatStore.methods.setCurrentChat(chatId);
|
|
39
29
|
};
|
|
40
30
|
|
|
41
|
-
onMounted(async() => {
|
|
31
|
+
onMounted(async () => {
|
|
42
32
|
chatStore.methods.setUsername(props.username || 'user'); // Установка имени пользователя
|
|
43
|
-
await chatStore.methods.connectWebSocket(); // Подключение к WebSocket
|
|
44
|
-
chatStore.methods.setCurrentChat(props.chatID);
|
|
33
|
+
await chatStore.methods.connectWebSocket(props.user); // Подключение к WebSocket
|
|
34
|
+
await chatStore.methods.setCurrentChat(props.chatID);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
onUnmounted(() => {
|
|
38
|
+
// Clean up when the component is unmounted (e.g., navigating away)
|
|
39
|
+
chatStore.methods.disconnectChat();
|
|
45
40
|
});
|
|
46
41
|
</script>
|
|
47
42
|
|
|
48
43
|
<style>
|
|
49
44
|
/* Стили остаются без изменений */
|
|
50
|
-
</style>
|
|
45
|
+
</style>
|