@ozdao/martyrs 0.2.473 → 0.2.475
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/{Media-DW8RLbfM.js → Media-_vz04tII.js} +1 -1
- package/dist/{Media-y_TX6us_.mjs → Media-sGk7Bp9b.mjs} +1 -1
- package/dist/auth.server.js +6 -2
- package/dist/auth.server.mjs +6 -2
- package/dist/authJwt-CELQKF2s.js +82 -0
- package/dist/authJwt-DnXu3BFq.mjs +83 -0
- package/dist/builder.js +7 -4
- package/dist/builder.mjs +7 -4
- package/dist/chats.server.js +1 -1
- package/dist/chats.server.mjs +1 -1
- package/dist/community.server.js +4 -4
- package/dist/community.server.mjs +4 -4
- package/dist/events.server.js +4 -4
- package/dist/events.server.mjs +4 -4
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +3 -3
- package/dist/gallery.server.mjs +3 -3
- package/dist/{globals.abac-DT0VjfaZ.js → globals.abac-Bn-4tbX8.js} +110 -16
- package/dist/{globals.abac-CvmZM8XG.mjs → globals.abac-DZpTRxKR.mjs} +110 -16
- package/dist/globals.server.js +70 -10
- package/dist/globals.server.mjs +70 -10
- package/dist/{globals.verifier-C_VZYebB.mjs → globals.verifier-BdJxc8-8.mjs} +34 -0
- package/dist/{globals.verifier-ChDpCdy_.js → globals.verifier-CKYpYfQl.js} +34 -0
- package/dist/{index-CVXl1rB5.js → index-BOmxJQ5W.js} +7 -86
- package/dist/{index-Df8vtZx7.mjs → index-C_Fw0Umg.mjs} +7 -86
- package/dist/{main-CgmHzhq5.mjs → main-CqMtW7Hq.mjs} +274 -276
- package/dist/{main-CCfQH-Dd.js → main-CsGkbSyK.js} +2 -2
- 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/Button/Button.vue2.cjs +1 -1
- package/dist/martyrs/src/components/Button/Button.vue2.js +1 -1
- package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.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 +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue2.cjs → Loader.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js.map → Loader.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +2 -2
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
- package/dist/martyrs/src/components/Select/Select.vue.cjs +4 -4
- package/dist/martyrs/src/components/Select/Select.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Select/Select.vue.js +4 -4
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
- package/dist/martyrs/src/components/Slider/Slider.native.vue.cjs +1 -1
- package/dist/martyrs/src/components/Slider/Slider.native.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/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
- package/dist/martyrs/src/modules/community/community.client.js +27 -27
- package/dist/martyrs/src/modules/community/community.client.js.map +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/sections/HotPosts.vue.cjs +4 -5
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +4 -5
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js.map +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 +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
- 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/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +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 +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +88 -27
- 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 +89 -28
- 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 +2 -2
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/store/shopcart.cjs +1 -0
- package/dist/martyrs/src/modules/orders/store/shopcart.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.js +1 -0
- package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
- 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/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/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.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/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/Images360.vue.js +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 +21 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +21 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -0
- 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 +1 -0
- 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 +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/store/categories.cjs +2 -0
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +2 -0
- package/dist/martyrs/src/modules/products/store/categories.js.map +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 +31 -24
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +31 -24
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +807 -0
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +807 -0
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js.map +1 -0
- package/dist/martyrs/src/modules/spots/store/spots.cjs +4 -1
- package/dist/martyrs/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.js +4 -1
- package/dist/martyrs/src/modules/spots/store/spots.js.map +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/notifications.server.js +1 -1
- package/dist/notifications.server.mjs +1 -1
- package/dist/orders.server.js +5 -4
- package/dist/orders.server.mjs +5 -4
- package/dist/organizations.server.js +120 -47
- package/dist/organizations.server.mjs +120 -47
- package/dist/{ownership.schema-C0w02Vw1.mjs → ownership.schema-CNCotD3D.mjs} +10 -4
- package/dist/{ownership.schema-Ck2H9clB.js → ownership.schema-MxfJlPtq.js} +10 -4
- package/dist/products.server.js +415 -149
- package/dist/products.server.mjs +415 -149
- package/dist/{profile.schema-h61hhB2w.js → profile.schema-BLSuV_VC.js} +0 -4
- package/dist/{profile.schema-kP_zKXNt.mjs → profile.schema-BRuvQ7QV.mjs} +0 -4
- package/dist/{queryProcessor-CWnMIe2U.mjs → queryProcessor-CVKI651_.mjs} +62 -8
- package/dist/{queryProcessor-D6GuKfTV.js → queryProcessor-DSUqSk3I.js} +62 -8
- package/dist/rents.server.js +4 -4
- package/dist/rents.server.mjs +4 -4
- package/dist/spots.server.js +162 -8
- package/dist/spots.server.mjs +162 -8
- package/dist/style.css +27 -4
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/package.json +1 -1
- package/src/builder/rspack/rspack.config.base.js +1 -1
- package/src/builder/rspack/rspack.config.client.js +13 -5
- package/src/components/Select/Select.vue +4 -2
- package/src/modules/auth/models/user.model.js +4 -1
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/globals/controllers/classes/globals.abac.js +148 -23
- package/src/modules/globals/controllers/classes/globals.validator.js +37 -0
- package/src/modules/globals/controllers/classes/globals.verifier.js +2 -0
- package/src/modules/globals/controllers/policies/globals.policies.js +91 -74
- package/src/modules/globals/controllers/utils/queryProcessor.js +59 -11
- package/src/modules/globals/models/schemas/ownership.schema.js +11 -6
- package/src/modules/globals/models/schemas/profile.schema.js +0 -4
- package/src/modules/music/components/layouts/MusicLayout.vue +10 -58
- package/src/modules/music/components/pages/MusicHome.vue +5 -5
- package/src/modules/orders/components/pages/OrderCreate.vue +84 -12
- package/src/modules/orders/controllers/orders.controller.js +3 -0
- package/src/modules/orders/store/shopcart.js +1 -0
- package/src/modules/organizations/models/schemas/accesses.schema.js +18 -0
- package/src/modules/organizations/policies/organizations.policies.js +117 -61
- package/src/modules/products/components/pages/CategoryEdit.vue +27 -2
- package/src/modules/products/components/pages/Product.vue +1 -0
- package/src/modules/products/components/pages/ProductEdit.vue +2 -2
- package/src/modules/products/controllers/categories.controller.js +297 -133
- package/src/modules/products/middlewares/categories.verifier.js +177 -0
- package/src/modules/products/models/category.model.js +12 -14
- package/src/modules/products/routes/categories.routes.js +50 -11
- package/src/modules/products/store/categories.js +2 -0
- package/src/modules/spots/components/pages/SpotEdit.vue +21 -17
- package/src/modules/spots/components/sections/WorktimeEdit.vue +840 -0
- package/src/modules/spots/controllers/queries/getIsOpenNowStage.js +109 -0
- package/src/modules/spots/controllers/spots.controller.js +2 -1
- package/src/modules/spots/models/spot.model.js +59 -13
- package/src/modules/spots/store/spots.js +4 -1
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +0 -1
- package/src/modules/products/middlewares/index.js +0 -11
- package/src/modules/products/middlewares/verifyCategory.js +0 -25
|
@@ -0,0 +1,807 @@
|
|
|
1
|
+
import { mergeModels, useModel, ref, computed, onMounted, createElementBlock, openBlock, createElementVNode, createVNode, toDisplayString, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createCommentVNode, createBlock } from "vue";
|
|
2
|
+
import { useI18n } from "vue-i18n";
|
|
3
|
+
import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
|
|
4
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
|
5
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
6
|
+
import _sfc_main$3 from "../../../../components/Checkbox/Checkbox.vue.js";
|
|
7
|
+
import _sfc_main$2 from "../../../../components/Popup/Popup.vue.js";
|
|
8
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const _hoisted_1 = { class: "working-hours-editor w-100" };
|
|
10
|
+
const _hoisted_2 = { class: "mn-b-small flex flex-nowrap flex-v-center" };
|
|
11
|
+
const _hoisted_3 = { class: "mn-r-auto" };
|
|
12
|
+
const _hoisted_4 = { class: "bg-white radius-small pd-small mn-b-medium" };
|
|
13
|
+
const _hoisted_5 = { class: "mn-b-small" };
|
|
14
|
+
const _hoisted_6 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "regular-schedule mn-b-small"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_7 = { class: "day-info flex-child-1" };
|
|
19
|
+
const _hoisted_8 = { class: "day-name t-semi" };
|
|
20
|
+
const _hoisted_9 = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "day-hours"
|
|
23
|
+
};
|
|
24
|
+
const _hoisted_10 = { class: "period t-small t-transp" };
|
|
25
|
+
const _hoisted_11 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "t-small t-transp"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_12 = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "day-hours t-small t-transp t-red"
|
|
32
|
+
};
|
|
33
|
+
const _hoisted_13 = { class: "day-actions flex-nowrap flex gap-small" };
|
|
34
|
+
const _hoisted_14 = {
|
|
35
|
+
key: 1,
|
|
36
|
+
class: "empty-schedule bg-light pd-medium radius-small t-center mn-b-small"
|
|
37
|
+
};
|
|
38
|
+
const _hoisted_15 = { class: "bg-white radius-small pd-small mn-b-small" };
|
|
39
|
+
const _hoisted_16 = { class: "mn-b-small flex flex-nowrap flex-v-center" };
|
|
40
|
+
const _hoisted_17 = { class: "mn-r-auto" };
|
|
41
|
+
const _hoisted_18 = {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "special-schedule mn-b-small"
|
|
44
|
+
};
|
|
45
|
+
const _hoisted_19 = { class: "day-info flex-child-1" };
|
|
46
|
+
const _hoisted_20 = { class: "flex flex-nowrap flex-v-center" };
|
|
47
|
+
const _hoisted_21 = { class: "day-name t-semi" };
|
|
48
|
+
const _hoisted_22 = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "t-small t-transp mn-l-small"
|
|
51
|
+
};
|
|
52
|
+
const _hoisted_23 = {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: "day-hours"
|
|
55
|
+
};
|
|
56
|
+
const _hoisted_24 = { class: "period t-small t-transp" };
|
|
57
|
+
const _hoisted_25 = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "t-small t-transp"
|
|
60
|
+
};
|
|
61
|
+
const _hoisted_26 = {
|
|
62
|
+
key: 1,
|
|
63
|
+
class: "day-hours t-small t-transp t-red"
|
|
64
|
+
};
|
|
65
|
+
const _hoisted_27 = { class: "day-actions flex-nowrap flex gap-small" };
|
|
66
|
+
const _hoisted_28 = {
|
|
67
|
+
key: 1,
|
|
68
|
+
class: "empty-schedule bg-light pd-medium radius-small t-center"
|
|
69
|
+
};
|
|
70
|
+
const _hoisted_29 = { class: "schedule-editor" };
|
|
71
|
+
const _hoisted_30 = { key: 0 };
|
|
72
|
+
const _hoisted_31 = { class: "flex flex-nowrap flex-v-center mn-b-small" };
|
|
73
|
+
const _hoisted_32 = { class: "mn-r-auto" };
|
|
74
|
+
const _hoisted_33 = {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "error-message mn-b-small pd-small radius-small bg-fourth-nano"
|
|
77
|
+
};
|
|
78
|
+
const _hoisted_34 = { class: "flex-child-1 time-inputs cols-2 gap-small" };
|
|
79
|
+
const _hoisted_35 = { class: "button-group flex flex-nowrap gap-small mn-t-medium" };
|
|
80
|
+
const _hoisted_36 = { class: "schedule-editor" };
|
|
81
|
+
const _hoisted_37 = {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "error-message mn-b-small pd-small radius-small bg-fourth-nano"
|
|
84
|
+
};
|
|
85
|
+
const _hoisted_38 = { key: 1 };
|
|
86
|
+
const _hoisted_39 = { class: "flex flex-nowrap flex-v-center mn-b-small" };
|
|
87
|
+
const _hoisted_40 = { class: "mn-r-auto" };
|
|
88
|
+
const _hoisted_41 = {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: "error-message mn-b-small pd-small radius-small bg-fourth-nano"
|
|
91
|
+
};
|
|
92
|
+
const _hoisted_42 = { class: "flex-child-1 time-inputs cols-2 gap-small" };
|
|
93
|
+
const _hoisted_43 = { class: "button-group flex flex-nowrap gap-small mn-t-medium" };
|
|
94
|
+
const _sfc_main = {
|
|
95
|
+
__name: "WorktimeEdit",
|
|
96
|
+
props: {
|
|
97
|
+
"worktime": {},
|
|
98
|
+
"worktimeModifiers": {}
|
|
99
|
+
},
|
|
100
|
+
emits: /* @__PURE__ */ mergeModels(["update:worktime"], ["update:worktime"]),
|
|
101
|
+
setup(__props, { emit: __emit }) {
|
|
102
|
+
const worktime = useModel(__props, "worktime");
|
|
103
|
+
const emit = __emit;
|
|
104
|
+
const { t, locale } = useI18n({
|
|
105
|
+
messages: {
|
|
106
|
+
en: {
|
|
107
|
+
workingHours: {
|
|
108
|
+
title: "Working Hours",
|
|
109
|
+
regularSchedule: "Regular Schedule",
|
|
110
|
+
specialDays: "Special Days",
|
|
111
|
+
addRegularDay: "Add Day",
|
|
112
|
+
addSpecialDay: "Add Day",
|
|
113
|
+
editRegularDay: "Edit Regular Day",
|
|
114
|
+
editSpecialDay: "Edit Special Day",
|
|
115
|
+
save: "Save",
|
|
116
|
+
cancel: "Cancel",
|
|
117
|
+
edit: "Edit",
|
|
118
|
+
remove: "Remove",
|
|
119
|
+
weekday: "Weekday",
|
|
120
|
+
date: "Date",
|
|
121
|
+
isOpen: "Open on this day",
|
|
122
|
+
description: "Description",
|
|
123
|
+
descriptionPlaceholder: "Holiday, Special event, etc.",
|
|
124
|
+
periods: "Operating Hours",
|
|
125
|
+
addPeriod: "Add Period",
|
|
126
|
+
opens: "Opens at",
|
|
127
|
+
closes: "Closes at",
|
|
128
|
+
closed: "Closed",
|
|
129
|
+
noRegularSchedule: "No regular schedule set. Add working days to define your regular hours.",
|
|
130
|
+
noSpecialDays: "No special days set. Add special days for holidays or events.",
|
|
131
|
+
errorDuplicateDate: "This date already exists in special days.",
|
|
132
|
+
errorOverlappingPeriods: "Time periods cannot overlap.",
|
|
133
|
+
selectDate: "Please select a date.",
|
|
134
|
+
errorInvalidPeriod: "Invalid time period. Closing time must be after opening time."
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
ru: {
|
|
138
|
+
workingHours: {
|
|
139
|
+
title: "Часы работы",
|
|
140
|
+
regularSchedule: "Регулярное расписание",
|
|
141
|
+
specialDays: "Особые дни",
|
|
142
|
+
addRegularDay: "Добавить день",
|
|
143
|
+
addSpecialDay: "Добавить особый день",
|
|
144
|
+
editRegularDay: "Изменить рабочий день",
|
|
145
|
+
editSpecialDay: "Изменить особый день",
|
|
146
|
+
save: "Сохранить",
|
|
147
|
+
cancel: "Отмена",
|
|
148
|
+
edit: "Изменить",
|
|
149
|
+
remove: "Удалить",
|
|
150
|
+
weekday: "День недели",
|
|
151
|
+
date: "Дата",
|
|
152
|
+
isOpen: "Открыто в этот день",
|
|
153
|
+
description: "Описание",
|
|
154
|
+
descriptionPlaceholder: "Праздник, особое событие и т.д.",
|
|
155
|
+
periods: "Часы работы",
|
|
156
|
+
addPeriod: "Добавить период",
|
|
157
|
+
opens: "Открывается в",
|
|
158
|
+
closes: "Закрывается в",
|
|
159
|
+
closed: "Закрыто",
|
|
160
|
+
noRegularSchedule: "Регулярное расписание не установлено. Добавьте рабочие дни для определения регулярных часов.",
|
|
161
|
+
noSpecialDays: "Особые дни не установлены. Добавьте особые дни для праздников или событий.",
|
|
162
|
+
errorDuplicateDate: "Эта дата уже существует в особых днях.",
|
|
163
|
+
errorOverlappingPeriods: "Временные периоды не могут пересекаться.",
|
|
164
|
+
selectDate: "Пожалуйста, выберите дату.",
|
|
165
|
+
errorInvalidPeriod: "Недопустимый временной период. Время закрытия должно быть после времени открытия."
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
const formatDate = (date) => {
|
|
171
|
+
if (!date) return "";
|
|
172
|
+
const dateObj = new Date(date);
|
|
173
|
+
return new Intl.DateTimeFormat(locale.value, {
|
|
174
|
+
weekday: "long",
|
|
175
|
+
year: "numeric",
|
|
176
|
+
month: "long",
|
|
177
|
+
day: "numeric"
|
|
178
|
+
}).format(dateObj);
|
|
179
|
+
};
|
|
180
|
+
const getWeekdayName = (dayNumber) => {
|
|
181
|
+
if (dayNumber === void 0 || dayNumber === null) return "";
|
|
182
|
+
const date = new Date(2023, 0, 1 + dayNumber);
|
|
183
|
+
return new Intl.DateTimeFormat(locale.value, { weekday: "long" }).format(date);
|
|
184
|
+
};
|
|
185
|
+
const showRegularDayModal = ref(false);
|
|
186
|
+
const showSpecialDayModal = ref(false);
|
|
187
|
+
const editingRegularIndex = ref(null);
|
|
188
|
+
const editingSpecialIndex = ref(null);
|
|
189
|
+
const validationErrors = ref({
|
|
190
|
+
overlappingPeriods: false,
|
|
191
|
+
duplicateDate: false,
|
|
192
|
+
invalidPeriod: false
|
|
193
|
+
});
|
|
194
|
+
const currentRegularDay = ref({
|
|
195
|
+
dayOfWeek: 1,
|
|
196
|
+
// Понедельник по умолчанию
|
|
197
|
+
isOpen: true,
|
|
198
|
+
periods: [{
|
|
199
|
+
open: "09:00",
|
|
200
|
+
close: "18:00"
|
|
201
|
+
}]
|
|
202
|
+
});
|
|
203
|
+
const currentSpecialDay = ref({
|
|
204
|
+
dateInput: "",
|
|
205
|
+
// Для ввода даты в формате YYYY-MM-DD
|
|
206
|
+
date: null,
|
|
207
|
+
description: "",
|
|
208
|
+
isOpen: false,
|
|
209
|
+
periods: [{
|
|
210
|
+
open: "09:00",
|
|
211
|
+
close: "18:00"
|
|
212
|
+
}]
|
|
213
|
+
});
|
|
214
|
+
const weekdays = [0, 1, 2, 3, 4, 5, 6];
|
|
215
|
+
const availableWeekdays = computed(() => {
|
|
216
|
+
var _a;
|
|
217
|
+
const usedDays = new Set((((_a = worktime.value) == null ? void 0 : _a.regular) || []).map((d) => d.dayOfWeek));
|
|
218
|
+
return weekdays.filter(
|
|
219
|
+
(day) => {
|
|
220
|
+
var _a2, _b;
|
|
221
|
+
return !usedDays.has(day) || editingRegularIndex.value !== null && ((_b = (_a2 = worktime.value) == null ? void 0 : _a2.regular[editingRegularIndex.value]) == null ? void 0 : _b.dayOfWeek) === day;
|
|
222
|
+
}
|
|
223
|
+
).map((day) => ({
|
|
224
|
+
text: getWeekdayName(day),
|
|
225
|
+
value: day
|
|
226
|
+
}));
|
|
227
|
+
});
|
|
228
|
+
const isValidRegularDay = computed(() => {
|
|
229
|
+
return !validationErrors.value.overlappingPeriods && !validationErrors.value.invalidPeriod;
|
|
230
|
+
});
|
|
231
|
+
const isValidSpecialDay = computed(() => {
|
|
232
|
+
return !validationErrors.value.duplicateDate && !validationErrors.value.overlappingPeriods && !validationErrors.value.invalidPeriod && !!currentSpecialDay.value.dateInput;
|
|
233
|
+
});
|
|
234
|
+
const addRegularDay = () => {
|
|
235
|
+
var _a;
|
|
236
|
+
editingRegularIndex.value = null;
|
|
237
|
+
currentRegularDay.value = {
|
|
238
|
+
dayOfWeek: ((_a = availableWeekdays.value[0]) == null ? void 0 : _a.value) ?? 1,
|
|
239
|
+
isOpen: true,
|
|
240
|
+
periods: [{
|
|
241
|
+
open: "09:00",
|
|
242
|
+
close: "18:00"
|
|
243
|
+
}]
|
|
244
|
+
};
|
|
245
|
+
validationErrors.value = {
|
|
246
|
+
overlappingPeriods: false,
|
|
247
|
+
duplicateDate: false,
|
|
248
|
+
invalidPeriod: false
|
|
249
|
+
};
|
|
250
|
+
showRegularDayModal.value = true;
|
|
251
|
+
};
|
|
252
|
+
const addSpecialDay = () => {
|
|
253
|
+
editingSpecialIndex.value = null;
|
|
254
|
+
const today = /* @__PURE__ */ new Date();
|
|
255
|
+
const todayFormatted = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, "0")}-${String(today.getDate()).padStart(2, "0")}`;
|
|
256
|
+
currentSpecialDay.value = {
|
|
257
|
+
dateInput: todayFormatted,
|
|
258
|
+
date: today,
|
|
259
|
+
description: "",
|
|
260
|
+
isOpen: false,
|
|
261
|
+
periods: [{
|
|
262
|
+
open: "09:00",
|
|
263
|
+
close: "18:00"
|
|
264
|
+
}]
|
|
265
|
+
};
|
|
266
|
+
validationErrors.value = {
|
|
267
|
+
overlappingPeriods: false,
|
|
268
|
+
duplicateDate: false,
|
|
269
|
+
invalidPeriod: false
|
|
270
|
+
};
|
|
271
|
+
showSpecialDayModal.value = true;
|
|
272
|
+
validateSpecialDate();
|
|
273
|
+
};
|
|
274
|
+
const validatePeriods = () => {
|
|
275
|
+
const periods = showRegularDayModal.value ? currentRegularDay.value.periods : currentSpecialDay.value.periods;
|
|
276
|
+
if (!periods || periods.length <= 1) {
|
|
277
|
+
validationErrors.value.overlappingPeriods = false;
|
|
278
|
+
validationErrors.value.invalidPeriod = false;
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
validationErrors.value.invalidPeriod = periods.some(
|
|
282
|
+
(period) => period.open >= period.close
|
|
283
|
+
);
|
|
284
|
+
if (validationErrors.value.invalidPeriod) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const sortedPeriods = [...periods].sort((a, b) => a.open.localeCompare(b.open));
|
|
288
|
+
for (let i = 0; i < sortedPeriods.length - 1; i++) {
|
|
289
|
+
if (sortedPeriods[i].close > sortedPeriods[i + 1].open) {
|
|
290
|
+
validationErrors.value.overlappingPeriods = true;
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
validationErrors.value.overlappingPeriods = false;
|
|
295
|
+
};
|
|
296
|
+
const validateSpecialDate = () => {
|
|
297
|
+
if (!currentSpecialDay.value.dateInput) {
|
|
298
|
+
validationErrors.value.duplicateDate = false;
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const newDateObj = new Date(currentSpecialDay.value.dateInput);
|
|
302
|
+
newDateObj.setHours(0, 0, 0, 0);
|
|
303
|
+
const isDuplicate = worktime.value.special.some((specialDay, index) => {
|
|
304
|
+
if (editingSpecialIndex.value === index) return false;
|
|
305
|
+
const existingDate = new Date(specialDay.date);
|
|
306
|
+
existingDate.setHours(0, 0, 0, 0);
|
|
307
|
+
return existingDate.getTime() === newDateObj.getTime();
|
|
308
|
+
});
|
|
309
|
+
validationErrors.value.duplicateDate = isDuplicate;
|
|
310
|
+
};
|
|
311
|
+
const editRegularDay = (index) => {
|
|
312
|
+
editingRegularIndex.value = index;
|
|
313
|
+
const day = JSON.parse(JSON.stringify(worktime.value.regular[index]));
|
|
314
|
+
if (!day.periods || day.periods.length === 0) {
|
|
315
|
+
day.periods = [{
|
|
316
|
+
open: "09:00",
|
|
317
|
+
close: "18:00"
|
|
318
|
+
}];
|
|
319
|
+
}
|
|
320
|
+
currentRegularDay.value = day;
|
|
321
|
+
validationErrors.value = {
|
|
322
|
+
overlappingPeriods: false,
|
|
323
|
+
duplicateDate: false,
|
|
324
|
+
invalidPeriod: false
|
|
325
|
+
};
|
|
326
|
+
showRegularDayModal.value = true;
|
|
327
|
+
validatePeriods();
|
|
328
|
+
};
|
|
329
|
+
const removeRegularDay = (index) => {
|
|
330
|
+
const updatedWorktime = { ...worktime.value };
|
|
331
|
+
updatedWorktime.regular.splice(index, 1);
|
|
332
|
+
emit("update:worktime", updatedWorktime);
|
|
333
|
+
};
|
|
334
|
+
const saveRegularDay = () => {
|
|
335
|
+
validatePeriods();
|
|
336
|
+
if (!isValidRegularDay.value) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
const updatedWorktime = JSON.parse(JSON.stringify(worktime.value));
|
|
340
|
+
if (!updatedWorktime.regular) {
|
|
341
|
+
updatedWorktime.regular = [];
|
|
342
|
+
}
|
|
343
|
+
const dayToSave = { ...currentRegularDay.value };
|
|
344
|
+
if (!dayToSave.isOpen) {
|
|
345
|
+
dayToSave.periods = [];
|
|
346
|
+
}
|
|
347
|
+
if (editingRegularIndex.value !== null) {
|
|
348
|
+
updatedWorktime.regular[editingRegularIndex.value] = dayToSave;
|
|
349
|
+
} else {
|
|
350
|
+
updatedWorktime.regular.push(dayToSave);
|
|
351
|
+
}
|
|
352
|
+
updatedWorktime.regular.sort((a, b) => a.dayOfWeek - b.dayOfWeek);
|
|
353
|
+
worktime.value = updatedWorktime;
|
|
354
|
+
emit("update:worktime", updatedWorktime);
|
|
355
|
+
showRegularDayModal.value = false;
|
|
356
|
+
};
|
|
357
|
+
const addPeriodToRegular = () => {
|
|
358
|
+
currentRegularDay.value.periods.push({
|
|
359
|
+
open: "09:00",
|
|
360
|
+
close: "18:00"
|
|
361
|
+
});
|
|
362
|
+
validatePeriods();
|
|
363
|
+
};
|
|
364
|
+
const removeRegularPeriod = (index) => {
|
|
365
|
+
currentRegularDay.value.periods.splice(index, 1);
|
|
366
|
+
validatePeriods();
|
|
367
|
+
};
|
|
368
|
+
const editSpecialDay = (index) => {
|
|
369
|
+
editingSpecialIndex.value = index;
|
|
370
|
+
const day = JSON.parse(JSON.stringify(worktime.value.special[index]));
|
|
371
|
+
const date = new Date(day.date);
|
|
372
|
+
const dateForInput = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
373
|
+
if (!day.periods || day.periods.length === 0) {
|
|
374
|
+
day.periods = [{
|
|
375
|
+
open: "09:00",
|
|
376
|
+
close: "18:00"
|
|
377
|
+
}];
|
|
378
|
+
}
|
|
379
|
+
currentSpecialDay.value = {
|
|
380
|
+
...day,
|
|
381
|
+
dateInput: dateForInput
|
|
382
|
+
};
|
|
383
|
+
validationErrors.value = {
|
|
384
|
+
overlappingPeriods: false,
|
|
385
|
+
duplicateDate: false,
|
|
386
|
+
invalidPeriod: false
|
|
387
|
+
};
|
|
388
|
+
showSpecialDayModal.value = true;
|
|
389
|
+
validatePeriods();
|
|
390
|
+
};
|
|
391
|
+
const removeSpecialDay = (index) => {
|
|
392
|
+
const updatedWorktime = { ...worktime.value };
|
|
393
|
+
updatedWorktime.special.splice(index, 1);
|
|
394
|
+
emit("update:worktime", updatedWorktime);
|
|
395
|
+
};
|
|
396
|
+
const saveSpecialDay = () => {
|
|
397
|
+
validateSpecialDate();
|
|
398
|
+
validatePeriods();
|
|
399
|
+
if (!isValidSpecialDay.value) {
|
|
400
|
+
if (!currentSpecialDay.value.dateInput) {
|
|
401
|
+
alert(t("workingHours.selectDate"));
|
|
402
|
+
}
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
const updatedWorktime = JSON.parse(JSON.stringify(worktime.value));
|
|
406
|
+
if (!updatedWorktime.special) {
|
|
407
|
+
updatedWorktime.special = [];
|
|
408
|
+
}
|
|
409
|
+
const dateParts = currentSpecialDay.value.dateInput.split("-");
|
|
410
|
+
const specialDate = new Date(
|
|
411
|
+
parseInt(dateParts[0]),
|
|
412
|
+
parseInt(dateParts[1]) - 1,
|
|
413
|
+
parseInt(dateParts[2])
|
|
414
|
+
);
|
|
415
|
+
const dayToSave = {
|
|
416
|
+
...currentSpecialDay.value,
|
|
417
|
+
date: specialDate
|
|
418
|
+
};
|
|
419
|
+
delete dayToSave.dateInput;
|
|
420
|
+
if (!dayToSave.isOpen) {
|
|
421
|
+
dayToSave.periods = [];
|
|
422
|
+
}
|
|
423
|
+
if (editingSpecialIndex.value !== null) {
|
|
424
|
+
updatedWorktime.special[editingSpecialIndex.value] = dayToSave;
|
|
425
|
+
} else {
|
|
426
|
+
updatedWorktime.special.push(dayToSave);
|
|
427
|
+
}
|
|
428
|
+
updatedWorktime.special.sort((a, b) => new Date(a.date) - new Date(b.date));
|
|
429
|
+
emit("update:worktime", updatedWorktime);
|
|
430
|
+
showSpecialDayModal.value = false;
|
|
431
|
+
};
|
|
432
|
+
const addPeriodToSpecial = () => {
|
|
433
|
+
currentSpecialDay.value.periods.push({
|
|
434
|
+
open: "09:00",
|
|
435
|
+
close: "18:00"
|
|
436
|
+
});
|
|
437
|
+
validatePeriods();
|
|
438
|
+
};
|
|
439
|
+
const removeSpecialPeriod = (index) => {
|
|
440
|
+
currentSpecialDay.value.periods.splice(index, 1);
|
|
441
|
+
validatePeriods();
|
|
442
|
+
};
|
|
443
|
+
onMounted(() => {
|
|
444
|
+
if (!worktime.value.regular || !worktime.value.special) worktime.value = {
|
|
445
|
+
regular: [],
|
|
446
|
+
special: []
|
|
447
|
+
};
|
|
448
|
+
});
|
|
449
|
+
return (_ctx, _cache) => {
|
|
450
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
451
|
+
createElementVNode("div", _hoisted_2, [
|
|
452
|
+
createElementVNode("h4", _hoisted_3, toDisplayString(unref(t)("workingHours.title")), 1),
|
|
453
|
+
createVNode(_sfc_main$1, {
|
|
454
|
+
class: "bg-main",
|
|
455
|
+
submit: addRegularDay,
|
|
456
|
+
showSucces: false,
|
|
457
|
+
showLoader: false
|
|
458
|
+
}, {
|
|
459
|
+
default: withCtx(() => [
|
|
460
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.addRegularDay")), 1)
|
|
461
|
+
]),
|
|
462
|
+
_: 1
|
|
463
|
+
})
|
|
464
|
+
]),
|
|
465
|
+
createElementVNode("div", _hoisted_4, [
|
|
466
|
+
createElementVNode("h5", _hoisted_5, toDisplayString(unref(t)("workingHours.regularSchedule")), 1),
|
|
467
|
+
worktime.value.regular && worktime.value.regular.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
468
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(worktime.value.regular, (day, index) => {
|
|
469
|
+
return openBlock(), createElementBlock("div", {
|
|
470
|
+
key: `regular-${index}`,
|
|
471
|
+
class: normalizeClass(["schedule-item pd-small mn-b-small flex flex-v-center flex-nowrap", index % 2 === 0 ? "bg-light" : ""])
|
|
472
|
+
}, [
|
|
473
|
+
createElementVNode("div", _hoisted_7, [
|
|
474
|
+
createElementVNode("div", _hoisted_8, toDisplayString(getWeekdayName(day.dayOfWeek)), 1),
|
|
475
|
+
day.isOpen && day.periods && day.periods.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
476
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(day.periods, (period, pIndex) => {
|
|
477
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
478
|
+
key: `period-${pIndex}`
|
|
479
|
+
}, [
|
|
480
|
+
createElementVNode("span", _hoisted_10, toDisplayString(period.open) + " - " + toDisplayString(period.close), 1),
|
|
481
|
+
pIndex < day.periods.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_11, ", ")) : createCommentVNode("", true)
|
|
482
|
+
], 64);
|
|
483
|
+
}), 128))
|
|
484
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(unref(t)("workingHours.closed")), 1))
|
|
485
|
+
]),
|
|
486
|
+
createElementVNode("div", _hoisted_13, [
|
|
487
|
+
createVNode(_sfc_main$1, {
|
|
488
|
+
class: "pd-micro bg-light",
|
|
489
|
+
submit: () => editRegularDay(index),
|
|
490
|
+
showSucces: false,
|
|
491
|
+
showLoader: false
|
|
492
|
+
}, {
|
|
493
|
+
default: withCtx(() => [
|
|
494
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.edit")), 1)
|
|
495
|
+
]),
|
|
496
|
+
_: 2
|
|
497
|
+
}, 1032, ["submit"]),
|
|
498
|
+
createVNode(_sfc_main$1, {
|
|
499
|
+
class: "pd-micro bg-fourth-nano",
|
|
500
|
+
submit: () => removeRegularDay(index),
|
|
501
|
+
showSucces: false,
|
|
502
|
+
showLoader: false
|
|
503
|
+
}, {
|
|
504
|
+
default: withCtx(() => [
|
|
505
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.remove")), 1)
|
|
506
|
+
]),
|
|
507
|
+
_: 2
|
|
508
|
+
}, 1032, ["submit"])
|
|
509
|
+
])
|
|
510
|
+
], 2);
|
|
511
|
+
}), 128))
|
|
512
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_14, toDisplayString(unref(t)("workingHours.noRegularSchedule")), 1))
|
|
513
|
+
]),
|
|
514
|
+
createElementVNode("div", _hoisted_15, [
|
|
515
|
+
createElementVNode("div", _hoisted_16, [
|
|
516
|
+
createElementVNode("h5", _hoisted_17, toDisplayString(unref(t)("workingHours.specialDays")), 1),
|
|
517
|
+
createVNode(_sfc_main$1, {
|
|
518
|
+
class: "bg-light mn-l-small",
|
|
519
|
+
submit: addSpecialDay,
|
|
520
|
+
showSucces: false,
|
|
521
|
+
showLoader: false
|
|
522
|
+
}, {
|
|
523
|
+
default: withCtx(() => [
|
|
524
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.addSpecialDay")), 1)
|
|
525
|
+
]),
|
|
526
|
+
_: 1
|
|
527
|
+
})
|
|
528
|
+
]),
|
|
529
|
+
worktime.value.special && worktime.value.special.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_18, [
|
|
530
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(worktime.value.special, (day, index) => {
|
|
531
|
+
return openBlock(), createElementBlock("div", {
|
|
532
|
+
key: `special-${index}`,
|
|
533
|
+
class: normalizeClass(["schedule-item pd-small mn-b-small flex flex-v-center flex-nowrap", index % 2 === 0 ? "bg-light" : ""])
|
|
534
|
+
}, [
|
|
535
|
+
createElementVNode("div", _hoisted_19, [
|
|
536
|
+
createElementVNode("div", _hoisted_20, [
|
|
537
|
+
createElementVNode("div", _hoisted_21, toDisplayString(formatDate(day.date)), 1),
|
|
538
|
+
day.description ? (openBlock(), createElementBlock("div", _hoisted_22, "(" + toDisplayString(day.description) + ")", 1)) : createCommentVNode("", true)
|
|
539
|
+
]),
|
|
540
|
+
day.isOpen && day.periods && day.periods.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_23, [
|
|
541
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(day.periods, (period, pIndex) => {
|
|
542
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
543
|
+
key: `special-period-${pIndex}`
|
|
544
|
+
}, [
|
|
545
|
+
createElementVNode("span", _hoisted_24, toDisplayString(period.open) + " - " + toDisplayString(period.close), 1),
|
|
546
|
+
pIndex < day.periods.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_25, ", ")) : createCommentVNode("", true)
|
|
547
|
+
], 64);
|
|
548
|
+
}), 128))
|
|
549
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_26, toDisplayString(unref(t)("workingHours.closed")), 1))
|
|
550
|
+
]),
|
|
551
|
+
createElementVNode("div", _hoisted_27, [
|
|
552
|
+
createVNode(_sfc_main$1, {
|
|
553
|
+
class: "pd-micro bg-light",
|
|
554
|
+
submit: () => editSpecialDay(index),
|
|
555
|
+
showSucces: false,
|
|
556
|
+
showLoader: false
|
|
557
|
+
}, {
|
|
558
|
+
default: withCtx(() => [
|
|
559
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.edit")), 1)
|
|
560
|
+
]),
|
|
561
|
+
_: 2
|
|
562
|
+
}, 1032, ["submit"]),
|
|
563
|
+
createVNode(_sfc_main$1, {
|
|
564
|
+
class: "pd-micro bg-fourth-nano",
|
|
565
|
+
submit: () => removeSpecialDay(index),
|
|
566
|
+
showSucces: false,
|
|
567
|
+
showLoader: false
|
|
568
|
+
}, {
|
|
569
|
+
default: withCtx(() => [
|
|
570
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.remove")), 1)
|
|
571
|
+
]),
|
|
572
|
+
_: 2
|
|
573
|
+
}, 1032, ["submit"])
|
|
574
|
+
])
|
|
575
|
+
], 2);
|
|
576
|
+
}), 128))
|
|
577
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_28, toDisplayString(unref(t)("workingHours.noSpecialDays")), 1))
|
|
578
|
+
]),
|
|
579
|
+
createVNode(_sfc_main$2, {
|
|
580
|
+
isPopupOpen: showRegularDayModal.value,
|
|
581
|
+
onClosePopup: _cache[2] || (_cache[2] = ($event) => showRegularDayModal.value = false),
|
|
582
|
+
title: editingRegularIndex.value !== null ? unref(t)("workingHours.editRegularDay") : unref(t)("workingHours.addRegularDay"),
|
|
583
|
+
class: "bg-white pd-semi w-m-33r radius-big"
|
|
584
|
+
}, {
|
|
585
|
+
default: withCtx(() => [
|
|
586
|
+
createElementVNode("div", _hoisted_29, [
|
|
587
|
+
createVNode(Select, {
|
|
588
|
+
select: currentRegularDay.value.dayOfWeek,
|
|
589
|
+
"onUpdate:select": _cache[0] || (_cache[0] = ($event) => currentRegularDay.value.dayOfWeek = $event),
|
|
590
|
+
value: "text",
|
|
591
|
+
options: availableWeekdays.value,
|
|
592
|
+
property: "value",
|
|
593
|
+
class: "pos-relative w-100 mn-b-small bg-light radius-small pd-medium"
|
|
594
|
+
}, null, 8, ["select", "options"]),
|
|
595
|
+
createVNode(_sfc_main$3, {
|
|
596
|
+
label: unref(t)("workingHours.isOpen"),
|
|
597
|
+
name: "isOpenRegular",
|
|
598
|
+
value: true,
|
|
599
|
+
radio: currentRegularDay.value.isOpen,
|
|
600
|
+
"onUpdate:radio": _cache[1] || (_cache[1] = (val) => currentRegularDay.value.isOpen = val),
|
|
601
|
+
class: "w-100 mn-b-small bg-light radius-small pd-small"
|
|
602
|
+
}, null, 8, ["label", "radio"]),
|
|
603
|
+
currentRegularDay.value.isOpen ? (openBlock(), createElementBlock("div", _hoisted_30, [
|
|
604
|
+
createElementVNode("div", _hoisted_31, [
|
|
605
|
+
createElementVNode("h5", _hoisted_32, toDisplayString(unref(t)("workingHours.periods")), 1),
|
|
606
|
+
createVNode(_sfc_main$1, {
|
|
607
|
+
class: "pd-micro bg-light",
|
|
608
|
+
submit: addPeriodToRegular,
|
|
609
|
+
showSucces: false,
|
|
610
|
+
showLoader: false
|
|
611
|
+
}, {
|
|
612
|
+
default: withCtx(() => [
|
|
613
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.addPeriod")), 1)
|
|
614
|
+
]),
|
|
615
|
+
_: 1
|
|
616
|
+
})
|
|
617
|
+
]),
|
|
618
|
+
validationErrors.value.overlappingPeriods ? (openBlock(), createElementBlock("div", _hoisted_33, toDisplayString(unref(t)("workingHours.errorOverlappingPeriods")), 1)) : createCommentVNode("", true),
|
|
619
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(currentRegularDay.value.periods, (period, pIndex) => {
|
|
620
|
+
return openBlock(), createElementBlock("div", {
|
|
621
|
+
key: `edit-period-${pIndex}`,
|
|
622
|
+
class: "period-row mn-b-small flex flex-nowrap gap-small"
|
|
623
|
+
}, [
|
|
624
|
+
createElementVNode("div", _hoisted_34, [
|
|
625
|
+
createVNode(Field, {
|
|
626
|
+
field: period.open,
|
|
627
|
+
"onUpdate:field": ($event) => period.open = $event,
|
|
628
|
+
label: unref(t)("workingHours.opens"),
|
|
629
|
+
type: "time",
|
|
630
|
+
class: "bg-light radius-small pd-medium",
|
|
631
|
+
onBlur: validatePeriods
|
|
632
|
+
}, null, 8, ["field", "onUpdate:field", "label"]),
|
|
633
|
+
createVNode(Field, {
|
|
634
|
+
field: period.close,
|
|
635
|
+
"onUpdate:field": ($event) => period.close = $event,
|
|
636
|
+
label: unref(t)("workingHours.closes"),
|
|
637
|
+
type: "time",
|
|
638
|
+
class: "bg-light radius-small pd-medium",
|
|
639
|
+
onBlur: validatePeriods
|
|
640
|
+
}, null, 8, ["field", "onUpdate:field", "label"])
|
|
641
|
+
]),
|
|
642
|
+
currentRegularDay.value.periods.length > 1 ? (openBlock(), createBlock(_sfc_main$1, {
|
|
643
|
+
key: 0,
|
|
644
|
+
class: "pd-micro bg-fourth-nano",
|
|
645
|
+
submit: () => removeRegularPeriod(pIndex),
|
|
646
|
+
showSucces: false,
|
|
647
|
+
showLoader: false
|
|
648
|
+
}, {
|
|
649
|
+
default: withCtx(() => [
|
|
650
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.remove")), 1)
|
|
651
|
+
]),
|
|
652
|
+
_: 2
|
|
653
|
+
}, 1032, ["submit"])) : createCommentVNode("", true)
|
|
654
|
+
]);
|
|
655
|
+
}), 128))
|
|
656
|
+
])) : createCommentVNode("", true),
|
|
657
|
+
createElementVNode("div", _hoisted_35, [
|
|
658
|
+
createVNode(_sfc_main$1, {
|
|
659
|
+
class: "w-100 bg-light",
|
|
660
|
+
submit: () => showRegularDayModal.value = false,
|
|
661
|
+
showSucces: false,
|
|
662
|
+
showLoader: false
|
|
663
|
+
}, {
|
|
664
|
+
default: withCtx(() => [
|
|
665
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.cancel")), 1)
|
|
666
|
+
]),
|
|
667
|
+
_: 1
|
|
668
|
+
}, 8, ["submit"]),
|
|
669
|
+
createVNode(_sfc_main$1, {
|
|
670
|
+
class: "w-100 bg-main",
|
|
671
|
+
submit: saveRegularDay,
|
|
672
|
+
showSucces: false,
|
|
673
|
+
disabled: !isValidRegularDay.value
|
|
674
|
+
}, {
|
|
675
|
+
default: withCtx(() => [
|
|
676
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.save")), 1)
|
|
677
|
+
]),
|
|
678
|
+
_: 1
|
|
679
|
+
}, 8, ["disabled"])
|
|
680
|
+
])
|
|
681
|
+
])
|
|
682
|
+
]),
|
|
683
|
+
_: 1
|
|
684
|
+
}, 8, ["isPopupOpen", "title"]),
|
|
685
|
+
createVNode(_sfc_main$2, {
|
|
686
|
+
isPopupOpen: showSpecialDayModal.value,
|
|
687
|
+
onClosePopup: _cache[6] || (_cache[6] = ($event) => showSpecialDayModal.value = false),
|
|
688
|
+
title: editingSpecialIndex.value !== null ? unref(t)("workingHours.editSpecialDay") : unref(t)("workingHours.addSpecialDay"),
|
|
689
|
+
class: "bg-white pd-semi w-m-33r radius-big"
|
|
690
|
+
}, {
|
|
691
|
+
default: withCtx(() => [
|
|
692
|
+
createElementVNode("div", _hoisted_36, [
|
|
693
|
+
createVNode(Field, {
|
|
694
|
+
field: currentSpecialDay.value.dateInput,
|
|
695
|
+
"onUpdate:field": _cache[3] || (_cache[3] = ($event) => currentSpecialDay.value.dateInput = $event),
|
|
696
|
+
label: unref(t)("workingHours.date"),
|
|
697
|
+
type: "date",
|
|
698
|
+
class: "bg-light radius-small pd-medium mn-b-small",
|
|
699
|
+
onBlur: validateSpecialDate
|
|
700
|
+
}, null, 8, ["field", "label"]),
|
|
701
|
+
validationErrors.value.duplicateDate ? (openBlock(), createElementBlock("div", _hoisted_37, toDisplayString(unref(t)("workingHours.errorDuplicateDate")), 1)) : createCommentVNode("", true),
|
|
702
|
+
createVNode(Field, {
|
|
703
|
+
field: currentSpecialDay.value.description,
|
|
704
|
+
"onUpdate:field": _cache[4] || (_cache[4] = ($event) => currentSpecialDay.value.description = $event),
|
|
705
|
+
label: unref(t)("workingHours.description"),
|
|
706
|
+
placeholder: unref(t)("workingHours.descriptionPlaceholder"),
|
|
707
|
+
class: "bg-light radius-small pd-medium mn-b-small"
|
|
708
|
+
}, null, 8, ["field", "label", "placeholder"]),
|
|
709
|
+
createVNode(_sfc_main$3, {
|
|
710
|
+
label: unref(t)("workingHours.isOpen"),
|
|
711
|
+
name: "isOpenSpecial",
|
|
712
|
+
value: true,
|
|
713
|
+
radio: currentSpecialDay.value.isOpen,
|
|
714
|
+
"onUpdate:radio": _cache[5] || (_cache[5] = (val) => currentSpecialDay.value.isOpen = val),
|
|
715
|
+
class: "w-100 mn-b-small bg-white radius-small pd-small"
|
|
716
|
+
}, null, 8, ["label", "radio"]),
|
|
717
|
+
currentSpecialDay.value.isOpen ? (openBlock(), createElementBlock("div", _hoisted_38, [
|
|
718
|
+
createElementVNode("div", _hoisted_39, [
|
|
719
|
+
createElementVNode("h5", _hoisted_40, toDisplayString(unref(t)("workingHours.periods")), 1),
|
|
720
|
+
createVNode(_sfc_main$1, {
|
|
721
|
+
class: "pd-micro bg-light",
|
|
722
|
+
submit: addPeriodToSpecial,
|
|
723
|
+
showSucces: false,
|
|
724
|
+
showLoader: false
|
|
725
|
+
}, {
|
|
726
|
+
default: withCtx(() => [
|
|
727
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.addPeriod")), 1)
|
|
728
|
+
]),
|
|
729
|
+
_: 1
|
|
730
|
+
})
|
|
731
|
+
]),
|
|
732
|
+
validationErrors.value.overlappingPeriods ? (openBlock(), createElementBlock("div", _hoisted_41, toDisplayString(unref(t)("workingHours.errorOverlappingPeriods")), 1)) : createCommentVNode("", true),
|
|
733
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(currentSpecialDay.value.periods, (period, pIndex) => {
|
|
734
|
+
return openBlock(), createElementBlock("div", {
|
|
735
|
+
key: `edit-special-period-${pIndex}`,
|
|
736
|
+
class: "period-row mn-b-small flex flex-nowrap gap-small"
|
|
737
|
+
}, [
|
|
738
|
+
createElementVNode("div", _hoisted_42, [
|
|
739
|
+
createVNode(Field, {
|
|
740
|
+
field: period.open,
|
|
741
|
+
"onUpdate:field": ($event) => period.open = $event,
|
|
742
|
+
label: unref(t)("workingHours.opens"),
|
|
743
|
+
type: "time",
|
|
744
|
+
class: "bg-light radius-small pd-medium",
|
|
745
|
+
onBlur: validatePeriods
|
|
746
|
+
}, null, 8, ["field", "onUpdate:field", "label"]),
|
|
747
|
+
createVNode(Field, {
|
|
748
|
+
field: period.close,
|
|
749
|
+
"onUpdate:field": ($event) => period.close = $event,
|
|
750
|
+
label: unref(t)("workingHours.closes"),
|
|
751
|
+
type: "time",
|
|
752
|
+
class: "bg-light radius-small pd-medium",
|
|
753
|
+
onBlur: validatePeriods
|
|
754
|
+
}, null, 8, ["field", "onUpdate:field", "label"])
|
|
755
|
+
]),
|
|
756
|
+
currentSpecialDay.value.periods.length > 1 ? (openBlock(), createBlock(_sfc_main$1, {
|
|
757
|
+
key: 0,
|
|
758
|
+
class: "pd-micro bg-fourth-nano",
|
|
759
|
+
submit: () => removeSpecialPeriod(pIndex),
|
|
760
|
+
showSucces: false,
|
|
761
|
+
showLoader: false
|
|
762
|
+
}, {
|
|
763
|
+
default: withCtx(() => [
|
|
764
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.remove")), 1)
|
|
765
|
+
]),
|
|
766
|
+
_: 2
|
|
767
|
+
}, 1032, ["submit"])) : createCommentVNode("", true)
|
|
768
|
+
]);
|
|
769
|
+
}), 128))
|
|
770
|
+
])) : createCommentVNode("", true),
|
|
771
|
+
createElementVNode("div", _hoisted_43, [
|
|
772
|
+
createVNode(_sfc_main$1, {
|
|
773
|
+
class: "w-100 bg-light",
|
|
774
|
+
submit: () => showSpecialDayModal.value = false,
|
|
775
|
+
showSucces: false,
|
|
776
|
+
showLoader: false
|
|
777
|
+
}, {
|
|
778
|
+
default: withCtx(() => [
|
|
779
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.cancel")), 1)
|
|
780
|
+
]),
|
|
781
|
+
_: 1
|
|
782
|
+
}, 8, ["submit"]),
|
|
783
|
+
createVNode(_sfc_main$1, {
|
|
784
|
+
class: "w-100 bg-main",
|
|
785
|
+
submit: saveSpecialDay,
|
|
786
|
+
showSucces: false,
|
|
787
|
+
disabled: !isValidSpecialDay.value
|
|
788
|
+
}, {
|
|
789
|
+
default: withCtx(() => [
|
|
790
|
+
createTextVNode(toDisplayString(unref(t)("workingHours.save")), 1)
|
|
791
|
+
]),
|
|
792
|
+
_: 1
|
|
793
|
+
}, 8, ["disabled"])
|
|
794
|
+
])
|
|
795
|
+
])
|
|
796
|
+
]),
|
|
797
|
+
_: 1
|
|
798
|
+
}, 8, ["isPopupOpen", "title"])
|
|
799
|
+
]);
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
const WorktimeEdit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d25ccbfd"]]);
|
|
804
|
+
export {
|
|
805
|
+
WorktimeEdit as default
|
|
806
|
+
};
|
|
807
|
+
//# sourceMappingURL=WorktimeEdit.vue.js.map
|