@studio-west/employees 0.7.6 → 0.7.7

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.
@@ -1,20 +1,20 @@
1
- import { defineAsyncComponent as Ae, createElementBlock as $, unref as n, openBlock as m, mergeProps as fe, createElementVNode as Y, ref as C, onMounted as je, onUnmounted as ze, computed as re, createBlock as D, Transition as Fe, withCtx as s, createCommentVNode as N, normalizeClass as Ge, renderSlot as W, createTextVNode as k, toDisplayString as w, watch as Ue, resolveComponent as he, resolveDirective as Ye, Fragment as G, withDirectives as Pe, createVNode as p, renderList as U } from "vue";
2
- import { useI18n as Oe } from "vue-i18n";
3
- import { p as R, b as qe, h as Re } from "./index-DaZTfcYO.js";
4
- import { saveAs as He } from "file-saver";
5
- import * as Le from "exceljs";
6
- import { ElSelect as ne, ElOption as oe, ElButton as I, ElSwitch as ye, ElTable as Se, ElTableColumn as _, ElInput as Je, ElDialog as be, ElForm as Ce, ElFormItem as We } from "element-plus";
7
- import { ContextMenu as Ke, ContextMenuItem as ue, ContextMenuSeparator as Xe } from "@imengyu/vue3-context-menu";
8
- function Ze(u) {
1
+ import { defineAsyncComponent as Be, createElementBlock as x, unref as n, openBlock as m, mergeProps as ge, createElementVNode as P, ref as S, onMounted as Ae, onUnmounted as je, computed as ue, createBlock as k, Transition as ze, withCtx as s, createCommentVNode as M, normalizeClass as Fe, renderSlot as W, createTextVNode as w, toDisplayString as b, watch as Ge, resolveComponent as fe, resolveDirective as Ue, Fragment as U, withDirectives as Ye, createVNode as p, renderList as Y } from "vue";
2
+ import { useI18n as Pe } from "vue-i18n";
3
+ import { p as R, b as Oe, h as qe } from "./index-DaZTfcYO.js";
4
+ import { saveAs as Re } from "file-saver";
5
+ import * as He from "exceljs";
6
+ import { ElSelect as ae, ElOption as ne, ElButton as B, ElSwitch as he, ElTable as ye, ElTableColumn as N, ElInput as Le, ElDialog as Se, ElForm as be, ElFormItem as Je } from "element-plus";
7
+ import { ContextMenu as We, ContextMenuItem as oe, ContextMenuSeparator as Ke } from "@imengyu/vue3-context-menu";
8
+ function Xe(u) {
9
9
  return /^(https?:|mailto:|tel:)/.test(u);
10
10
  }
11
- function ft(u, h) {
11
+ function gt(u, h) {
12
12
  if (arguments.length === 0 || !u)
13
13
  return null;
14
14
  const c = h || "{Y}-{m}-{d} {G}:{i}:{s}";
15
15
  let a;
16
16
  typeof u == "object" ? a = u : (typeof u == "string" && (/^[0-9]+$/.test(u) ? u = parseInt(u) : u = u.replace(new RegExp(/-/gm), "/")), typeof u == "number" && u.toString().length === 10 && (u = u * 1e3), a = new Date(u));
17
- const B = "ru-RU", g = {
17
+ const g = "ru-RU", r = {
18
18
  Y: a.getFullYear(),
19
19
  m: (a.getMonth() + 1).toString().padStart(2, "0"),
20
20
  d: a.getDate(),
@@ -23,35 +23,35 @@ function ft(u, h) {
23
23
  H: a.getHours().toString().padStart(2, "0"),
24
24
  i: a.getMinutes().toString().padStart(2, "0"),
25
25
  s: a.getSeconds().toString().padStart(2, "0"),
26
- D: new Intl.DateTimeFormat(B, { weekday: "short" }).format(a),
27
- F: new Intl.DateTimeFormat(B, { month: "long" }).format(a),
28
- M: new Intl.DateTimeFormat(B, { month: "short" }).format(a)
26
+ D: new Intl.DateTimeFormat(g, { weekday: "short" }).format(a),
27
+ F: new Intl.DateTimeFormat(g, { month: "long" }).format(a),
28
+ M: new Intl.DateTimeFormat(g, { month: "short" }).format(a)
29
29
  };
30
- return c.replace(/{(dd|[YmdGHisDFM])+}/g, (i, j) => g[j]);
30
+ return c.replace(/{(dd|[YmdGHisDFM])+}/g, (A, $) => r[$]);
31
31
  }
32
- function ht(u) {
32
+ function ft(u) {
33
33
  let h = u.split(u.match(/\D.*?\D?/));
34
34
  return h[0].length > 2 ? h.join("-") + "T00:00:01" : h.reverse().join("-") + "T00:00:01";
35
35
  }
36
- function yt(u, h) {
36
+ function ht(u, h) {
37
37
  if (/^\+[0-9]\s/.test(h) && u.length === 2 || /^\+0\s/.test(u)) return "";
38
38
  if (typeof u > "u" || u.length === 0) return u;
39
39
  const c = "+0 (___) ___-__-__";
40
40
  let a = 0;
41
- const B = c.replace(/\D/g, ""), g = u.replace(/\D/g, "");
42
- let i = c.replace(/[_\d]/g, (M) => a < g.length ? g.charAt(a++) || B.charAt(a) : M);
43
- a = i.indexOf("_"), a !== -1 && (a = a < 5 ? 3 : a, i = i.slice(0, a));
44
- let j = c.slice(0, u.length).replace(
41
+ const g = c.replace(/\D/g, ""), r = u.replace(/\D/g, "");
42
+ let A = c.replace(/[_\d]/g, (F) => a < r.length ? r.charAt(a++) || g.charAt(a) : F);
43
+ a = A.indexOf("_"), a !== -1 && (a = a < 5 ? 3 : a, A = A.slice(0, a));
44
+ let $ = c.slice(0, u.length).replace(
45
45
  /_+/g,
46
- (M) => `\\d{1,${M.length}}`
46
+ (F) => `\\d{1,${F.length}}`
47
47
  ).replace(/[+()]/g, "\\$&");
48
- return j = new RegExp(`^${j}$`), i = i.replace(/[-—]$|(\) )$/g, ""), !j.test(u) || u.length < 5 ? i : u;
48
+ return $ = new RegExp(`^${$}$`), A = A.replace(/[-—]$|(\) )$/g, ""), !$.test(u) || u.length < 5 ? A : u;
49
49
  }
50
- function St(u, h = !1) {
50
+ function yt(u, h = !1) {
51
51
  const c = u.getBoundingClientRect();
52
52
  return h ? c.left > 50 ? { right: "100%", marginRight: "10px" } : { left: "100%", marginLeft: "10px" } : { bottom: "100%", marginBottom: "10px" };
53
53
  }
54
- const Qe = ["href"], de = {
54
+ const Ze = ["href"], re = {
55
55
  __name: "SwIcon",
56
56
  props: {
57
57
  prefix: { type: String, default: "icon" },
@@ -59,25 +59,25 @@ const Qe = ["href"], de = {
59
59
  className: { type: String, default: "" }
60
60
  },
61
61
  setup(u) {
62
- const h = u, c = Ze(h.iconClass);
63
- return (a, B) => n(c) ? (m(), $("div", fe({
62
+ const h = u, c = Xe(h.iconClass);
63
+ return (a, g) => n(c) ? (m(), x("div", ge({
64
64
  key: 0,
65
65
  style: "mask: url(" + h.iconClass + ") no-repeat 50% 50%;",
66
66
  class: "sw-external-icon svg-icon"
67
- }, a.$attrs), null, 16)) : (m(), $("svg", fe({
67
+ }, a.$attrs), null, 16)) : (m(), x("svg", ge({
68
68
  key: 1,
69
69
  class: "sw-icon icon-" + (h.className || h.iconClass),
70
70
  "aria-hidden": "true"
71
71
  }, a.$attrs), [
72
- Y("use", {
72
+ P("use", {
73
73
  href: "#" + h.prefix + "-" + h.iconClass
74
- }, null, 8, Qe)
74
+ }, null, 8, Ze)
75
75
  ], 16));
76
76
  }
77
- }, et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
77
+ }, Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
78
78
  __proto__: null,
79
- default: de
80
- }, Symbol.toStringTag, { value: "Module" })), tt = {
79
+ default: re
80
+ }, Symbol.toStringTag, { value: "Module" })), et = {
81
81
  __name: "SwAlert",
82
82
  props: {
83
83
  message: { type: String, default: "Default message" },
@@ -90,74 +90,74 @@ const Qe = ["href"], de = {
90
90
  },
91
91
  emits: ["closed"],
92
92
  setup(u, { emit: h }) {
93
- const c = u, a = h, B = C(!1);
94
- let g = null;
95
- const i = () => {
96
- document.querySelector(".sw-alert-wrapper").togglePopover(), B.value = !0, document.querySelector(".sw-alert-wrapper").showPopover(), S();
97
- }, j = () => {
98
- B.value = !1, a("closed");
99
- }, M = () => {
100
- g && (clearTimeout(g), g = null);
101
- }, P = () => {
102
- S();
103
- }, S = () => {
104
- g = setTimeout(j, c.duration);
93
+ const c = u, a = h, g = S(!1);
94
+ let r = null;
95
+ const A = () => {
96
+ document.querySelector(".sw-alert-wrapper").togglePopover(), g.value = !0, document.querySelector(".sw-alert-wrapper").showPopover(), G();
97
+ }, $ = () => {
98
+ g.value = !1, a("closed");
99
+ }, F = () => {
100
+ r && (clearTimeout(r), r = null);
101
+ }, C = () => {
102
+ G();
103
+ }, G = () => {
104
+ r = setTimeout($, c.duration);
105
105
  };
106
- je(() => {
107
- i();
108
- }), ze(() => {
109
- g && clearTimeout(g);
106
+ Ae(() => {
107
+ A();
108
+ }), je(() => {
109
+ r && clearTimeout(r);
110
110
  });
111
- const F = re(() => {
112
- const y = ["sw-alert"];
113
- return c.size.length > 0 && y.push(`sw-${c.size}`), c.type.length > 0 && y.push(`sw-${c.type}`), c.class.length > 0 && y.push(c.class), y;
111
+ const V = ue(() => {
112
+ const I = ["sw-alert"];
113
+ return c.size.length > 0 && I.push(`sw-${c.size}`), c.type.length > 0 && I.push(`sw-${c.type}`), c.class.length > 0 && I.push(c.class), I;
114
114
  });
115
- return (y, K) => (m(), D(Fe, { name: "fade" }, {
115
+ return (I, z) => (m(), k(ze, { name: "fade" }, {
116
116
  default: s(() => [
117
- B.value ? (m(), $("div", {
117
+ g.value ? (m(), x("div", {
118
118
  key: 0,
119
- class: Ge(F.value),
120
- onMouseenter: M,
121
- onMouseleave: P
119
+ class: Fe(V.value),
120
+ onMouseenter: F,
121
+ onMouseleave: C
122
122
  }, [
123
- c.before.length > 0 ? (m(), D(de, {
123
+ c.before.length > 0 ? (m(), k(re, {
124
124
  key: 0,
125
125
  "icon-class": c.before
126
- }, null, 8, ["icon-class"])) : W(y.$slots, "prefix", { key: 1 }),
127
- W(y.$slots, "default", {}, () => [
128
- k(w(c.message), 1)
126
+ }, null, 8, ["icon-class"])) : W(I.$slots, "prefix", { key: 1 }),
127
+ W(I.$slots, "default", {}, () => [
128
+ w(b(c.message), 1)
129
129
  ]),
130
- c.after.length > 0 ? (m(), D(de, {
130
+ c.after.length > 0 ? (m(), k(re, {
131
131
  key: 2,
132
132
  "icon-class": c.after,
133
- onClick: j
134
- }, null, 8, ["icon-class"])) : W(y.$slots, "suffix", { key: 3 }),
135
- Y("footer", null, [
136
- W(y.$slots, "footer")
133
+ onClick: $
134
+ }, null, 8, ["icon-class"])) : W(I.$slots, "suffix", { key: 3 }),
135
+ P("footer", null, [
136
+ W(I.$slots, "footer")
137
137
  ])
138
- ], 34)) : N("", !0)
138
+ ], 34)) : M("", !0)
139
139
  ]),
140
140
  _: 3
141
141
  }));
142
142
  }
143
- }, lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
143
+ }, tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
144
144
  __proto__: null,
145
- default: tt
145
+ default: et
146
146
  }, Symbol.toStringTag, { value: "Module" }));
147
147
  document.querySelector("div.sw-alert-wrapper");
148
- const we = /* @__PURE__ */ Object.assign({ "./components/SwAlert.vue": () => Promise.resolve().then(() => lt), "./components/SwButton.vue": () => import("./SwButton-jKDKwFV9-CXc8MFE5.js"), "./components/SwButtonGroup.vue": () => import("./SwButtonGroup-D9HH5POO-ImB2afuu.js"), "./components/SwCollapse.vue": () => import("./SwCollapse-CuN3EbT6-Bp57Ya_9.js"), "./components/SwDatePicker.vue": () => import("./SwDatePicker-CJjKSM8k-MaDENLOD.js"), "./components/SwDropdown.vue": () => import("./SwDropdown-DQGTnnKw-CJPDuCfV.js"), "./components/SwDropdownItem.vue": () => import("./SwDropdownItem-CtlMVgsX-B0y_klNq.js"), "./components/SwDropdownNew.vue": () => import("./SwDropdownNew-CYfjZFd2-nlDq08DL.js"), "./components/SwFormItem.vue": () => import("./SwFormItem-CaA4jsoa-6C3zw4iZ.js"), "./components/SwGide.vue": () => import("./SwGide-DbSSyZ-y-CdqOXtTf.js"), "./components/SwIcon.vue": () => Promise.resolve().then(() => et), "./components/SwInput.vue": () => import("./SwInput-DCV1rrWa-RwwuH45g.js"), "./components/SwMessage.vue": () => import("./SwMessage-CovKkpf6-DgzuTa6f.js"), "./components/SwSection.vue": () => import("./SwSection-D8ooQ21I-DkmOwvIl.js"), "./components/SwSelect.vue": () => import("./SwSelect-C2RKinez-BD70YvFF.js"), "./components/SwSkeleton.vue": () => import("./SwSkeleton-B7ysp8L9-DnocmEnE.js"), "./components/SwSkeletonItem.vue": () => import("./SwSkeletonItem-CU7LvihY-DdKyY6kY.js"), "./components/SwSlider.vue": () => import("./SwSlider-YncjYKPw-DWb3SdAc.js"), "./components/SwSwitch.vue": () => import("./SwSwitch-6rl1IT4p-Cq2vi3fZ.js"), "./components/SwTable.vue": () => import("./SwTable-BKZ5idCi-DEX2rFo2.js"), "./components/SwTableColumn.vue": () => import("./SwTableColumn-BLF5bPuJ-CHI10OyO.js"), "./components/SwTabs.vue": () => import("./SwTabs-DkSI4oAh-VaIFmFrU.js"), "./components/SwTabsPane.vue": () => import("./SwTabsPane-Dwtj8g7T-Dpg9j8nR.js") }), ke = {};
149
- for (const u in we) {
148
+ const Ce = /* @__PURE__ */ Object.assign({ "./components/SwAlert.vue": () => Promise.resolve().then(() => tt), "./components/SwButton.vue": () => import("./SwButton-jKDKwFV9-CXc8MFE5.js"), "./components/SwButtonGroup.vue": () => import("./SwButtonGroup-D9HH5POO-ImB2afuu.js"), "./components/SwCollapse.vue": () => import("./SwCollapse-CuN3EbT6-Bp57Ya_9.js"), "./components/SwDatePicker.vue": () => import("./SwDatePicker-CJjKSM8k-DNmg0aWx.js"), "./components/SwDropdown.vue": () => import("./SwDropdown-DQGTnnKw-CJPDuCfV.js"), "./components/SwDropdownItem.vue": () => import("./SwDropdownItem-CtlMVgsX-CusP_bDd.js"), "./components/SwDropdownNew.vue": () => import("./SwDropdownNew-CYfjZFd2-nlDq08DL.js"), "./components/SwFormItem.vue": () => import("./SwFormItem-CaA4jsoa-6C3zw4iZ.js"), "./components/SwGide.vue": () => import("./SwGide-DbSSyZ-y-CH5hJbsP.js"), "./components/SwIcon.vue": () => Promise.resolve().then(() => Qe), "./components/SwInput.vue": () => import("./SwInput-DCV1rrWa-alCLu1yQ.js"), "./components/SwMessage.vue": () => import("./SwMessage-CovKkpf6-BDgVLZft.js"), "./components/SwSection.vue": () => import("./SwSection-D8ooQ21I-DkmOwvIl.js"), "./components/SwSelect.vue": () => import("./SwSelect-C2RKinez-BD70YvFF.js"), "./components/SwSkeleton.vue": () => import("./SwSkeleton-B7ysp8L9-DnocmEnE.js"), "./components/SwSkeletonItem.vue": () => import("./SwSkeletonItem-CU7LvihY-DdKyY6kY.js"), "./components/SwSlider.vue": () => import("./SwSlider-YncjYKPw-BqQedHzC.js"), "./components/SwSwitch.vue": () => import("./SwSwitch-6rl1IT4p-Cq2vi3fZ.js"), "./components/SwTable.vue": () => import("./SwTable-BKZ5idCi-DEX2rFo2.js"), "./components/SwTableColumn.vue": () => import("./SwTableColumn-BLF5bPuJ-CHI10OyO.js"), "./components/SwTabs.vue": () => import("./SwTabs-DkSI4oAh-VaIFmFrU.js"), "./components/SwTabsPane.vue": () => import("./SwTabsPane-Dwtj8g7T-Dpg9j8nR.js") }), we = {};
149
+ for (const u in Ce) {
150
150
  const h = u.split("/").pop().replace(".vue", "").replace(/-(\w)/g, (c, a) => a.toUpperCase());
151
- ke[h] = Ae(() => we[u]());
151
+ we[h] = Be(() => Ce[u]());
152
152
  }
153
- const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0 }, ut = {
153
+ const lt = { class: "nav" }, at = { class: "vacation-calendar" }, nt = { key: 0 }, ot = {
154
154
  key: 0,
155
155
  class: "controls-container",
156
156
  style: { "margin-top": ".5rem" }
157
- }, rt = { key: 0 }, dt = {
157
+ }, ut = { key: 0 }, rt = {
158
158
  key: 1,
159
159
  style: { padding: "0 1rem .5rem" }
160
- }, it = { style: { padding: ".5rem 0 0" } }, bt = {
160
+ }, dt = { style: { padding: ".5rem 0 0" } }, St = {
161
161
  __name: "VacationTable",
162
162
  props: {
163
163
  odata: Object,
@@ -167,7 +167,7 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
167
167
  checkEdit: { type: Boolean, default: !1 }
168
168
  },
169
169
  setup(u) {
170
- const { SwDatePicker: h } = ke, c = u, { t: a, d: B } = Oe(), g = C([
170
+ const { SwDatePicker: h } = we, c = u, { t: a } = Pe(), g = S([
171
171
  // { name: 'Иванов Петр Михалыч',
172
172
  // jobTitle: '(Ведущий работник месяца)',
173
173
  // days: [{dateStart: "03.05.2024", dateEnd: "06.06.2024", note: 'забил - сказал он ослик', count: 14 },
@@ -185,41 +185,41 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
185
185
  // days: [{note:''}],
186
186
  // code: '0000-00053'
187
187
  // }
188
- ]), i = C((/* @__PURE__ */ new Date()).getFullYear()), j = (/* @__PURE__ */ new Date()).getMonth() > 10 ? [{ value: i.value, label: i.value }, {
189
- value: i.value + 1,
190
- label: i.value + 1
191
- }] : [{ value: i.value - 1, label: i.value - 1 }, { value: i.value, label: i.value }], M = C([]), P = C("100%"), S = C(1), F = C(!1), y = C(1), K = C(!1), z = C(!1), X = C({
188
+ ]), r = S((/* @__PURE__ */ new Date()).getFullYear()), A = (/* @__PURE__ */ new Date()).getMonth() > 10 ? [{ value: r.value, label: r.value }, {
189
+ value: r.value + 1,
190
+ label: r.value + 1
191
+ }] : [{ value: r.value - 1, label: r.value - 1 }, { value: r.value, label: r.value }], $ = S([]), F = S("100%"), C = S(1), G = S(!1), V = S(1), I = S(!1), z = S(!1), K = S({
192
192
  zIndex: 3,
193
193
  minWidth: 230,
194
194
  x: 500,
195
195
  y: 200
196
- }), O = C(!1), H = C({ participants: [] }), ie = C([]), se = C([]), E = C([]), Z = C([{ value: "all", label: a("vacationSchedule.all"), key: "all" }]), L = C(!1), Q = C(!1), d = C({ name: "", length: 0, code: "" }), ee = async () => {
197
- c.odata.getEmployee(i.value - 1 + "-12-17T23:59:00").then((l) => {
198
- var e, r;
199
- return E.value.length === 0 ? E.value = [(e = l.find((o) => o.employeeName === c.fullName)) == null ? void 0 : e.divisionName] : E.value = E.value.includes("all") || l.some((o) => E.value.includes(o.divisionName)) ? E.value : [(r = l.find((o) => o.employeeName === c.fullName)) == null ? void 0 : r.divisionName], l.forEach((o) => {
200
- Z.value.some((v) => (v == null ? void 0 : v.value) === o.divisionName) || Z.value.push({ value: o.divisionName, label: o.divisionName, key: o.divisionName });
201
- }), te(), !0;
196
+ }), O = S(!1), H = S({ participants: [] }), de = S([]), ie = S([]), E = S([]), X = S([{ value: "all", label: a("vacationSchedule.all"), key: "all" }]), L = S(!1), Z = S(!1), i = S({ name: "", length: 0, code: "" }), Q = async () => {
197
+ c.odata.getEmployee(r.value - 1 + "-12-17T23:59:00").then((l) => {
198
+ var e, d;
199
+ return E.value.length === 0 ? E.value = [(e = l.find((o) => o.employeeName === c.fullName)) == null ? void 0 : e.divisionName] : E.value = E.value.includes("all") || l.some((o) => E.value.includes(o.divisionName)) ? E.value : [(d = l.find((o) => o.employeeName === c.fullName)) == null ? void 0 : d.divisionName], l.forEach((o) => {
200
+ X.value.some((v) => (v == null ? void 0 : v.value) === o.divisionName) || X.value.push({ value: o.divisionName, label: o.divisionName, key: o.divisionName });
201
+ }), ee(), !0;
202
202
  });
203
203
  };
204
- Ue(E, async (l, e) => {
205
- l !== e && (M.value = [], K.value = !1, c.odata.employee.forEach((r) => {
206
- (l.includes(r.divisionName) || l.includes("all")) && (M.value.some((o) => (o == null ? void 0 : o.activeText) === r.roleName) || M.value.push({ val: !0, activeText: r.roleName }));
207
- }), te());
204
+ Ge(E, async (l, e) => {
205
+ l !== e && ($.value = [], I.value = !1, c.odata.employee.forEach((d) => {
206
+ (l.includes(d.divisionName) || l.includes("all")) && ($.value.some((o) => (o == null ? void 0 : o.activeText) === d.roleName) || $.value.push({ val: !0, activeText: d.roleName }));
207
+ }), ee());
208
208
  });
209
- const De = (l, e) => {
210
- console.log("event", e), console.log("column", l), l.level === 2 && l.no > 0 && S.value === 2 && (S.value = 3, y.value = l.no);
211
- }, te = () => {
209
+ const ke = (l, e) => {
210
+ console.log("event", e), console.log("column", l), l.level === 2 && l.no > 0 && C.value === 2 && (C.value = 3, V.value = l.no);
211
+ }, ee = () => {
212
212
  g.value = [];
213
213
  let l = [];
214
214
  c.odata.employee.forEach((e) => {
215
- (E.value.includes(e.divisionName) || E.value.includes("all")) && M.value.some((r) => r.val && r.activeText === e.roleName) && (l.push(e.employeeKey), g.value.push({ name: e.employeeName, days: [{ note: "" }], jobTitle: e.roleName, code: e.employeeKey }));
216
- }), xe(l), F.value = !1;
217
- }, xe = (l) => {
218
- c.workSchedule.getAllVacations({ year: i.value }).then(
215
+ (E.value.includes(e.divisionName) || E.value.includes("all")) && $.value.some((d) => d.val && d.activeText === e.roleName) && (l.push(e.employeeKey), g.value.push({ name: e.employeeName, days: [{ note: "" }], jobTitle: e.roleName, code: e.employeeKey }));
216
+ }), De(l), G.value = !1;
217
+ }, De = (l) => {
218
+ c.workSchedule.getAllVacations({ year: r.value }).then(
219
219
  (e) => {
220
- l.forEach((r, o) => {
220
+ l.forEach((d, o) => {
221
221
  g.value[o].days = [{ note: "" }], e.forEach((v) => {
222
- r === v.code && (typeof g.value[o].days[0].dateStart > "u" ? g.value[o].days[0] = {
222
+ d === v.code && (typeof g.value[o].days[0].dateStart > "u" ? g.value[o].days[0] = {
223
223
  dateStart: R(v.dateStart, "{dd}.{m}.{Y}"),
224
224
  dateEnd: R(v.dateEnd, "{dd}.{m}.{Y}"),
225
225
  note: v.note,
@@ -234,85 +234,85 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
234
234
  });
235
235
  }
236
236
  );
237
- }, $e = (l) => {
238
- if (l.columnIndex < 3 && x.value[l.rowIndex].key < x.value[l.rowIndex].days.length)
239
- return x.value[l.rowIndex].key === 0 ? {
240
- rowspan: x.value[l.rowIndex].days.length,
237
+ }, xe = (l) => {
238
+ if (l.columnIndex < 3 && D.value[l.rowIndex].key < D.value[l.rowIndex].days.length)
239
+ return D.value[l.rowIndex].key === 0 ? {
240
+ rowspan: D.value[l.rowIndex].days.length,
241
241
  colspan: 1
242
242
  } : {
243
243
  rowspan: 0,
244
244
  colspan: 0
245
245
  };
246
- }, ce = (l, e, r, o) => {
246
+ }, se = (l, e, d, o) => {
247
247
  var v;
248
- if (console.log("coMenu", l, e, r, o), d.value.ids = l.ids, d.value.key = typeof l.key > "u" ? g.value[l.ids].days.length : l.key, d.value.startDate = l.dateStart, d.value.endDate = l.dateEnd, d.value.name = S.value > 1 ? l.employee : l.name, d.value.count = l.count, d.value.length = ((v = l.days) == null ? void 0 : v.length) || 0, d.value.allCount = () => l.days.length === 0 ? 0 : l.days.reduce((t, f, T) => T !== l.key ? t + parseInt(f.count) : t, 0), d.value.add = d.value.length > 0 && l.days[l.days.length - 1].count, d.value.level = e.level, d.value.holiday = se.value, X.value.y = o.clientY, X.value.x = o.clientX, S.value === 1 && e.level === 2 && e.no < 4 && (d.value.add || l.days.length > 1) && (z.value = !0), e.level === 3 && (z.value = !0), S.value > 1 && e.level === 2 && e.no > 0)
249
- if (S.value > 2) {
250
- d.value.firstDate = `${e.no.toString().length === 1 ? "0" + e.no : e.no}-${y.value.toString().length === 1 ? "0" + y.value : y.value}-${i.value}`, console.log("firstDate", d.value.firstDate);
251
- const t = new Date(i.value, y.value - 1, e.no), f = g.value[d.value.ids];
248
+ if (console.log("coMenu", l, e, d, o), i.value.ids = l.ids, i.value.key = typeof l.key > "u" ? g.value[l.ids].days.length : l.key, i.value.startDate = l.dateStart, i.value.endDate = l.dateEnd, i.value.name = C.value > 1 ? l.employee : l.name, i.value.count = l.count, i.value.length = ((v = l.days) == null ? void 0 : v.length) || 0, i.value.allCount = () => l.days.length === 0 ? 0 : l.days.reduce((t, f, T) => T !== l.key ? t + parseInt(f.count) : t, 0), i.value.add = i.value.length > 0 && l.days[l.days.length - 1].count, i.value.level = e.level, i.value.holiday = ie.value, K.value.y = o.clientY, K.value.x = o.clientX, C.value === 1 && e.level === 2 && e.no < 4 && (i.value.add || l.days.length > 1) && (z.value = !0), e.level === 3 && (z.value = !0), C.value > 1 && e.level === 2 && e.no > 0)
249
+ if (C.value > 2) {
250
+ i.value.firstDate = `${e.no.toString().length === 1 ? "0" + e.no : e.no}-${V.value.toString().length === 1 ? "0" + V.value : V.value}-${r.value}`, console.log("firstDate", i.value.firstDate);
251
+ const t = new Date(r.value, V.value - 1, e.no), f = g.value[i.value.ids];
252
252
  if (f && f.days)
253
253
  for (let T = 0; T < f.days.length; T++) {
254
- const V = f.days[T];
255
- if (V.dateStart && V.dateEnd) {
256
- const b = J(V.dateStart), A = J(V.dateEnd);
257
- if (b && A && t >= b && t <= A) {
258
- d.value.startDate = V.dateStart, d.value.endDate = V.dateEnd, d.value.key = T;
254
+ const _ = f.days[T];
255
+ if (_.dateStart && _.dateEnd) {
256
+ const y = J(_.dateStart), j = J(_.dateEnd);
257
+ if (y && j && t >= y && t <= j) {
258
+ i.value.startDate = _.dateStart, i.value.endDate = _.dateEnd, i.value.key = T;
259
259
  break;
260
260
  }
261
261
  }
262
262
  }
263
263
  z.value = !0;
264
- } else S.value === 2 && l[`m${e.no}`].length > 0 ? (y.value = e.no, S.value = 3) : (d.value.firstDate = `01-${e.no.toString().length === 1 ? "0" + e.no : e.no}-${i.value}`, z.value = !0);
264
+ } else C.value === 2 && l[`m${e.no}`].length > 0 ? (V.value = e.no, C.value = 3) : (i.value.firstDate = `01-${e.no.toString().length === 1 ? "0" + e.no : e.no}-${r.value}`, z.value = !0);
265
265
  };
266
266
  function J(l) {
267
267
  if (!l) return null;
268
268
  const e = l.split(".");
269
269
  if (e.length !== 3) return null;
270
- const [r, o, v] = e.map(Number);
271
- return new Date(v, o - 1, r);
270
+ const [d, o, v] = e.map(Number);
271
+ return new Date(v, o - 1, d);
272
272
  }
273
- function ve(l) {
274
- const e = String(l.getDate()).padStart(2, "0"), r = String(l.getMonth() + 1).padStart(2, "0");
275
- return `${e}.${r}`;
273
+ function ce(l) {
274
+ const e = String(l.getDate()).padStart(2, "0"), d = String(l.getMonth() + 1).padStart(2, "0");
275
+ return `${e}.${d}`;
276
276
  }
277
- const me = ({ row: l, columnIndex: e }) => {
277
+ const ve = ({ row: l, columnIndex: e }) => {
278
278
  var o;
279
- if (S.value !== 3 || e === 0 || ((o = l[`m${y.value}`]) == null ? void 0 : o.length) === 0) return "";
280
- const r = new Date(i.value, y.value, e).getTime() + 1e3;
281
- for (let v of l[`m${y.value}`]) {
282
- const t = new Date(i.value, v.text.split("-")[0].split(".")[1], v.text.split("-")[0].split(".")[0]).getTime(), f = new Date(i.value, v.text.split("-")[1].split(".")[1], v.text.split("-")[1].split(".")[0], 23, 59, 59).getTime();
283
- if (r >= t && r <= f) return "vacation";
279
+ if (C.value !== 3 || e === 0 || ((o = l[`m${V.value}`]) == null ? void 0 : o.length) === 0) return "";
280
+ const d = new Date(r.value, V.value, e).getTime() + 1e3;
281
+ for (let v of l[`m${V.value}`]) {
282
+ const t = new Date(r.value, v.text.split("-")[0].split(".")[1], v.text.split("-")[0].split(".")[0]).getTime(), f = new Date(r.value, v.text.split("-")[1].split(".")[1], v.text.split("-")[1].split(".")[0], 23, 59, 59).getTime();
283
+ if (d >= t && d <= f) return "vacation";
284
284
  }
285
285
  return "";
286
286
  };
287
- function Ee(l, e) {
288
- const r = J(l), o = J(e);
289
- if (!r || !o || o < r) return [];
287
+ function $e(l, e) {
288
+ const d = J(l), o = J(e);
289
+ if (!d || !o || o < d) return [];
290
290
  const v = [];
291
- let t = new Date(r);
291
+ let t = new Date(d);
292
292
  for (; t <= o; ) {
293
- const f = t.getMonth() + 1, T = t.getFullYear(), V = new Date(T, t.getMonth() + 1, 0), b = t < r ? r : t, A = V > o ? o : V, q = `${ve(b)}-${ve(A)}`;
293
+ const f = t.getMonth() + 1, T = t.getFullYear(), _ = new Date(T, t.getMonth() + 1, 0), y = t < d ? d : t, j = _ > o ? o : _, q = `${ce(y)}-${ce(j)}`;
294
294
  v.push({ month: f, text: q }), t = new Date(T, t.getMonth() + 1, 1);
295
295
  }
296
296
  return v;
297
297
  }
298
- const le = (l, e = !1) => {
299
- let r = g.value[d.value.ids];
298
+ const te = (l, e = !1) => {
299
+ let d = g.value[i.value.ids];
300
300
  switch (l) {
301
301
  case "add":
302
- r.days.push({ note: "" }), console.log(r.days.length);
302
+ d.days.push({ note: "" }), console.log(d.days.length);
303
303
  break;
304
304
  case "delete":
305
- e ? delete r.days[e] : r.days.pop(), ae(d.value.ids);
305
+ e ? delete d.days[e] : d.days.pop(), le(i.value.ids);
306
306
  break;
307
307
  }
308
308
  z.value = !1;
309
- }, Te = (l) => {
310
- Q.value = l, d.value.count = l.count;
311
- }, Ve = () => {
312
- Q.value && (g.value[d.value.ids].days[d.value.key] = { ...Q.value, note: "" }, ae(d.value.ids)), z.value = !1;
313
- }, ae = (l) => {
309
+ }, Ee = (l) => {
310
+ Z.value = l, i.value.count = l.count;
311
+ }, Te = () => {
312
+ Z.value && (g.value[i.value.ids].days[i.value.key] = { ...Z.value, note: "" }, le(i.value.ids)), z.value = !1;
313
+ }, le = (l) => {
314
314
  c.workSchedule.rewriteFull({
315
- year: i.value,
315
+ year: r.value,
316
316
  code: g.value[l].code,
317
317
  data: g.value[l].days.map((e) => ({
318
318
  dateStart: e.dateStart.split(".").reverse().join("-"),
@@ -321,70 +321,70 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
321
321
  count: e.count
322
322
  }))
323
323
  });
324
- }, pe = (l) => {
324
+ }, me = (l) => {
325
325
  c.workSchedule.sendConfirmMessage({ fullname: c.fullName, confirm: l }), c.query = "";
326
326
  };
327
- function ge(l) {
327
+ function pe(l) {
328
328
  return new Date(2025, l - 1, 1).toLocaleString("ru", { month: "long" });
329
329
  }
330
- const x = re(() => g.value.flatMap((l, e) => !l.days || l.days.length === 0 ? [{ ...l, key: 0, ids: e }] : l.days.map((r, o) => ({
330
+ const D = ue(() => g.value.flatMap((l, e) => !l.days || l.days.length === 0 ? [{ ...l, key: 0, ids: e }] : l.days.map((d, o) => ({
331
331
  ids: e,
332
332
  key: o,
333
333
  ...l,
334
- ...r
335
- })))), _e = re(() => g.value.map((l, e) => {
336
- const r = {
337
- employee: qe(l.name),
334
+ ...d
335
+ })))), Ve = ue(() => g.value.map((l, e) => {
336
+ const d = {
337
+ employee: Oe(l.name),
338
338
  code: l.code,
339
339
  ids: e
340
340
  };
341
341
  for (let o = 1; o <= 12; o++)
342
- r[`m${o}`] = [];
342
+ d[`m${o}`] = [];
343
343
  return l.days.forEach((o) => {
344
344
  if (!o.dateStart || !o.dateEnd) return;
345
- Ee(o.dateStart, o.dateEnd).forEach((t) => {
346
- t.month >= 1 && t.month <= 12 && r[`m${t.month}`].push({ text: t.text, count: o.count, dateStart: o.dateStart, dateEnd: o.dateEnd });
345
+ $e(o.dateStart, o.dateEnd).forEach((t) => {
346
+ t.month >= 1 && t.month <= 12 && d[`m${t.month}`].push({ text: t.text, count: o.count, dateStart: o.dateStart, dateEnd: o.dateEnd });
347
347
  });
348
- }), r;
349
- })), Ne = () => {
348
+ }), d;
349
+ })), _e = () => {
350
350
  c.workSchedule.sendAgreementMessage({ users: H.value.participants }), O.value = !1;
351
351
  };
352
352
  c.workSchedule.getBoss().then((l) => {
353
- ie.value = l[0].users;
354
- }), Re().then((l) => {
355
- se.value = l, ee();
353
+ de.value = l[0].users;
354
+ }), qe().then((l) => {
355
+ ie.value = l, Q();
356
356
  });
357
- const Me = () => d.value.length < 2 ? [{ dateStart: "01.01." + i.value, dateEnd: "31.12." + i.value }] : [{ dateStart: "01.01." + i.value, dateEnd: "31.12." + i.value }], Ie = async () => {
357
+ const Ne = () => i.value.length < 2 ? [{ dateStart: "01.01." + r.value, dateEnd: "31.12." + r.value }] : [{ dateStart: "01.01." + r.value, dateEnd: "31.12." + r.value }], Me = async () => {
358
358
  L.value = !0;
359
- const l = new Le.Workbook(), e = l.addWorksheet(i.value.toString(), {
359
+ const l = new He.Workbook(), e = l.addWorksheet(r.value.toString(), {
360
360
  pageSetup: {
361
361
  paperSize: 9,
362
362
  orientation: "landscape",
363
363
  fitToPage: !0
364
364
  }
365
- }), r = { vertical: "middle", horizontal: "center" }, o = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, v = { vertical: "middle", horizontal: "center", wrapText: !0 }, t = { vertical: "middle", horizontal: "right", wrapText: !0 };
366
- e.mergeCells("D1:G1"), e.mergeCells("D2:G2"), e.mergeCells("D3:G3"), e.mergeCells("D4:G4"), e.mergeCells("A5:G5"), e.mergeCells("A6:G6"), e.mergeCells("A9:G9"), e.mergeCells("A10:A11"), e.mergeCells("B10:B11"), e.mergeCells("C10:C11"), e.mergeCells("D10:F10"), e.mergeCells("G10:G11"), e.getCell("D1").value = a("vacationSchedule.approve"), e.getCell("D2").value = a("vacationSchedule.dateApprove", { year: i.value - 1 }), e.getCell("D3").value = a("workSchedule.printPlace"), e.getCell("D4").value = a("vacationSchedule.dateApprove", { year: i.value - 1 }), e.getCell("A5").value = a("workSchedule.firm"), e.getCell("B7").value = a("vacationSchedule.vacationSchedule"), e.getCell("C7").value = a("vacationSchedule.numberDocs"), e.getCell("D7").value = a("vacationSchedule.compilation"), e.getCell("E7").value = a("vacationSchedule.year"), e.getCell("C8").value = "", e.getCell("D8").value = "", e.getCell("E8").value = i.value, e.getCell("E7").value = a("vacationSchedule.year"), e.getCell("A10").value = a("vacationSchedule.jobTitle"), e.getCell("B10").value = a("vacationSchedule.fullName"), e.getCell("C10").value = a("vacationSchedule.personnelNumber"), e.getCell("D10").value = a("vacationSchedule.vacation"), e.getCell("D11").value = a("vacationSchedule.days"), e.getCell("E11").value = a("vacationSchedule.date"), e.getCell("F11").value = a("vacationSchedule.endDate"), e.getCell("G11").value = a("vacationSchedule.note"), e.getRow(1).height = 80, e.getColumn(1).width = 28, e.getColumn(2).width = 28, e.getColumn(3).width = 18, e.getColumn(4).width = 18, e.getColumn(5).width = 14, e.getColumn(6).width = 14, e.getColumn(7).width = 14, e.getColumn(1).alignment = v, e.getColumn(2).alignment = v, e.getColumn(3).alignment = v, e.getColumn(4).alignment = v, e.getColumn(5).alignment = v, e.getColumn(6).alignment = v, e.getColumn(7).alignment = v, e.getCell("D1").alignment = t, e.getCell("D2").alignment = t, e.getCell("D4").alignment = t, e.getCell("A5").alignment = r, e.getCell("C7").border = o, e.getCell("D7").border = o, e.getCell("E7").border = o, e.getCell("C8").border = o, e.getCell("D8").border = o, e.getCell("E8").border = o, e.getCell("A10").border = o, e.getCell("B10").border = o, e.getCell("C10").border = o, e.getCell("D10").border = o, e.getCell("G10").border = o, e.getCell("D11").border = o, e.getCell("E11").border = o, e.getCell("F11").border = o;
365
+ }), d = { vertical: "middle", horizontal: "center" }, o = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, v = { vertical: "middle", horizontal: "center", wrapText: !0 }, t = { vertical: "middle", horizontal: "right", wrapText: !0 };
366
+ e.mergeCells("D1:G1"), e.mergeCells("D2:G2"), e.mergeCells("D3:G3"), e.mergeCells("D4:G4"), e.mergeCells("A5:G5"), e.mergeCells("A6:G6"), e.mergeCells("A9:G9"), e.mergeCells("A10:A11"), e.mergeCells("B10:B11"), e.mergeCells("C10:C11"), e.mergeCells("D10:F10"), e.mergeCells("G10:G11"), e.getCell("D1").value = a("vacationSchedule.approve"), e.getCell("D2").value = a("vacationSchedule.dateApprove", { year: r.value - 1 }), e.getCell("D3").value = a("workSchedule.printPlace"), e.getCell("D4").value = a("vacationSchedule.dateApprove", { year: r.value - 1 }), e.getCell("A5").value = a("workSchedule.firm"), e.getCell("B7").value = a("vacationSchedule.vacationSchedule"), e.getCell("C7").value = a("vacationSchedule.numberDocs"), e.getCell("D7").value = a("vacationSchedule.compilation"), e.getCell("E7").value = a("vacationSchedule.year"), e.getCell("C8").value = "", e.getCell("D8").value = "", e.getCell("E8").value = r.value, e.getCell("E7").value = a("vacationSchedule.year"), e.getCell("A10").value = a("vacationSchedule.jobTitle"), e.getCell("B10").value = a("vacationSchedule.fullName"), e.getCell("C10").value = a("vacationSchedule.personnelNumber"), e.getCell("D10").value = a("vacationSchedule.vacation"), e.getCell("D11").value = a("vacationSchedule.days"), e.getCell("E11").value = a("vacationSchedule.date"), e.getCell("F11").value = a("vacationSchedule.endDate"), e.getCell("G11").value = a("vacationSchedule.note"), e.getRow(1).height = 80, e.getColumn(1).width = 28, e.getColumn(2).width = 28, e.getColumn(3).width = 18, e.getColumn(4).width = 18, e.getColumn(5).width = 14, e.getColumn(6).width = 14, e.getColumn(7).width = 14, e.getColumn(1).alignment = v, e.getColumn(2).alignment = v, e.getColumn(3).alignment = v, e.getColumn(4).alignment = v, e.getColumn(5).alignment = v, e.getColumn(6).alignment = v, e.getColumn(7).alignment = v, e.getCell("D1").alignment = t, e.getCell("D2").alignment = t, e.getCell("D4").alignment = t, e.getCell("A5").alignment = d, e.getCell("C7").border = o, e.getCell("D7").border = o, e.getCell("E7").border = o, e.getCell("C8").border = o, e.getCell("D8").border = o, e.getCell("E8").border = o, e.getCell("A10").border = o, e.getCell("B10").border = o, e.getCell("C10").border = o, e.getCell("D10").border = o, e.getCell("G10").border = o, e.getCell("D11").border = o, e.getCell("E11").border = o, e.getCell("F11").border = o;
367
367
  let f = 11;
368
- for (const b of g.value)
369
- if (b.days.length > 1)
370
- b.days.forEach((A) => {
371
- let q = [b.jobTitle, b.name, b.code, A.count, A.dateStart, A.dateEnd, A.note];
372
- const Be = e.addRow(q);
373
- Be.border = o, f++;
374
- }), e.mergeCells(`A${f - b.days.length + 1}:A${f}`), e.mergeCells(`B${f - b.days.length + 1}:B${f}`), e.mergeCells(`C${f - b.days.length + 1}:C${f}`);
368
+ for (const y of g.value)
369
+ if (y.days.length > 1)
370
+ y.days.forEach((j) => {
371
+ let q = [y.jobTitle, y.name, y.code, j.count, j.dateStart, j.dateEnd, j.note];
372
+ const Ie = e.addRow(q);
373
+ Ie.border = o, f++;
374
+ }), e.mergeCells(`A${f - y.days.length + 1}:A${f}`), e.mergeCells(`B${f - y.days.length + 1}:B${f}`), e.mergeCells(`C${f - y.days.length + 1}:C${f}`);
375
375
  else {
376
- let A = [b.jobTitle, b.name, b.code, b.days[0].count, b.days[0].dateStart, b.days[0].dateEnd, b.days[0].note];
377
- const q = e.addRow(A);
376
+ let j = [y.jobTitle, y.name, y.code, y.days[0].count, y.days[0].dateStart, y.days[0].dateEnd, y.days[0].note];
377
+ const q = e.addRow(j);
378
378
  q.border = o, f++;
379
379
  }
380
- const T = "export_" + R(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", V = await l.xlsx.writeBuffer();
381
- He(new Blob([V]), T), L.value = !1;
380
+ const T = "export_" + R(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", _ = await l.xlsx.writeBuffer();
381
+ Re(new Blob([_]), T), L.value = !1;
382
382
  };
383
- return c.group && (E.value[0] = c.group), ee(), (l, e) => {
384
- const r = he("el-radio-button"), o = he("el-radio-group"), v = Ye("loading");
385
- return m(), $(G, null, [
386
- Y("div", at, [
387
- u.checkEdit ? (m(), D(n(ne), {
383
+ return c.group && (E.value[0] = c.group), Q(), (l, e) => {
384
+ const d = fe("el-radio-button"), o = fe("el-radio-group"), v = Ue("loading");
385
+ return m(), x(U, null, [
386
+ P("div", lt, [
387
+ u.checkEdit ? (m(), k(n(ae), {
388
388
  key: 0,
389
389
  modelValue: E.value,
390
390
  "onUpdate:modelValue": e[0] || (e[0] = (t) => E.value = t),
@@ -395,33 +395,33 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
395
395
  style: { width: "240px" }
396
396
  }, {
397
397
  default: s(() => [
398
- (m(!0), $(G, null, U(Z.value, (t) => (m(), D(n(oe), {
398
+ (m(!0), x(U, null, Y(X.value, (t) => (m(), k(n(ne), {
399
399
  key: t.value,
400
400
  label: t.label,
401
401
  value: t.value
402
402
  }, null, 8, ["label", "value"]))), 128))
403
403
  ]),
404
404
  _: 1
405
- }, 8, ["modelValue"])) : N("", !0),
406
- u.checkEdit ? (m(), D(n(I), {
405
+ }, 8, ["modelValue"])) : M("", !0),
406
+ u.checkEdit ? (m(), k(n(B), {
407
407
  key: 1,
408
408
  plain: "",
409
- onClick: e[1] || (e[1] = (t) => F.value = !0)
409
+ onClick: e[1] || (e[1] = (t) => G.value = !0)
410
410
  }, {
411
411
  default: s(() => [
412
- k(w(n(a)("workSchedule.jobTitle")), 1)
412
+ w(b(n(a)("workSchedule.jobTitle")), 1)
413
413
  ]),
414
414
  _: 1
415
- })) : N("", !0),
416
- p(n(ne), {
417
- modelValue: i.value,
418
- "onUpdate:modelValue": e[2] || (e[2] = (t) => i.value = t),
419
- onChange: ee,
415
+ })) : M("", !0),
416
+ p(n(ae), {
417
+ modelValue: r.value,
418
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => r.value = t),
419
+ onChange: Q,
420
420
  placeholder: "Year",
421
421
  style: { width: "80px" }
422
422
  }, {
423
423
  default: s(() => [
424
- (m(!0), $(G, null, U(n(j), (t) => (m(), D(n(oe), {
424
+ (m(!0), x(U, null, Y(n(A), (t) => (m(), k(n(ne), {
425
425
  key: t.value,
426
426
  label: t.label,
427
427
  value: t.value
@@ -430,125 +430,125 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
430
430
  _: 1
431
431
  }, 8, ["modelValue"]),
432
432
  p(o, {
433
- modelValue: S.value,
434
- "onUpdate:modelValue": e[3] || (e[3] = (t) => S.value = t)
433
+ modelValue: C.value,
434
+ "onUpdate:modelValue": e[3] || (e[3] = (t) => C.value = t)
435
435
  }, {
436
436
  default: s(() => [
437
- p(r, {
437
+ p(d, {
438
438
  label: n(a)("vacationSchedule.currentTable.1"),
439
439
  value: 1
440
440
  }, null, 8, ["label"]),
441
- p(r, {
441
+ p(d, {
442
442
  label: n(a)("vacationSchedule.currentTable.2"),
443
443
  value: 2
444
444
  }, null, 8, ["label"])
445
445
  ]),
446
446
  _: 1
447
447
  }, 8, ["modelValue"]),
448
- e[19] || (e[19] = Y("div", { class: "expander" }, null, -1)),
449
- p(n(ye), {
450
- modelValue: P.value,
451
- "onUpdate:modelValue": e[4] || (e[4] = (t) => P.value = t),
448
+ e[19] || (e[19] = P("div", { class: "expander" }, null, -1)),
449
+ p(n(he), {
450
+ modelValue: F.value,
451
+ "onUpdate:modelValue": e[4] || (e[4] = (t) => F.value = t),
452
452
  "active-text": l.$t("vacationSchedule.currentHeight"),
453
453
  "active-value": "100%",
454
454
  "inactive-value": "calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"
455
455
  }, null, 8, ["modelValue", "active-text"])
456
456
  ]),
457
- Y("div", nt, [
458
- S.value === 1 ? (m(), D(n(Se), {
457
+ P("div", at, [
458
+ C.value === 1 ? (m(), k(n(ye), {
459
459
  key: 0,
460
460
  id: "printTable",
461
- data: x.value,
462
- "span-method": $e,
463
- onCellClick: ce,
461
+ data: D.value,
462
+ "span-method": xe,
463
+ onCellClick: se,
464
464
  border: "",
465
465
  style: { width: "100%" },
466
466
  size: "small",
467
467
  "empty-text": n(a)("vacationSchedule.emptyText")
468
468
  }, {
469
469
  default: s(() => [
470
- p(n(_), {
471
- label: E.value !== "all" ? n(a)("vacationSchedule.title", { name: E.value[0] }) : n(a)("vacationSchedule.enterprise") + ` ${i.value}`,
470
+ p(n(N), {
471
+ label: E.value !== "all" ? n(a)("vacationSchedule.title", { name: E.value[0] }) : n(a)("vacationSchedule.enterprise") + ` ${r.value}`,
472
472
  align: "center",
473
473
  height: "34"
474
474
  }, {
475
475
  default: s(() => [
476
- p(n(_), {
476
+ p(n(N), {
477
477
  label: n(a)("vacationSchedule.jobTitle"),
478
478
  width: "180",
479
479
  align: "center"
480
480
  }, {
481
481
  default: s((t) => [
482
- k(w(x.value[t.$index].jobTitle), 1)
482
+ w(b(D.value[t.$index].jobTitle), 1)
483
483
  ]),
484
484
  _: 1
485
485
  }, 8, ["label"]),
486
- p(n(_), {
486
+ p(n(N), {
487
487
  label: n(a)("vacationSchedule.fullName"),
488
488
  width: "180",
489
489
  align: "center"
490
490
  }, {
491
491
  default: s((t) => [
492
- k(w(x.value[t.$index].name), 1)
492
+ w(b(D.value[t.$index].name), 1)
493
493
  ]),
494
494
  _: 1
495
495
  }, 8, ["label"]),
496
- p(n(_), {
496
+ p(n(N), {
497
497
  label: n(a)("vacationSchedule.personnelNumber"),
498
498
  align: "center"
499
499
  }, {
500
500
  default: s((t) => [
501
- k(w(x.value[t.$index].code), 1)
501
+ w(b(D.value[t.$index].code), 1)
502
502
  ]),
503
503
  _: 1
504
504
  }, 8, ["label"]),
505
- p(n(_), {
505
+ p(n(N), {
506
506
  label: n(a)("vacationSchedule.vacation"),
507
507
  align: "center"
508
508
  }, {
509
509
  default: s(() => [
510
- p(n(_), {
510
+ p(n(N), {
511
511
  label: n(a)("vacationSchedule.days"),
512
512
  align: "center"
513
513
  }, {
514
514
  default: s((t) => [
515
- k(w(x.value[t.$index].count), 1)
515
+ w(b(D.value[t.$index].count), 1)
516
516
  ]),
517
517
  _: 1
518
518
  }, 8, ["label"]),
519
- p(n(_), {
519
+ p(n(N), {
520
520
  label: n(a)("vacationSchedule.date"),
521
521
  align: "center"
522
522
  }, {
523
523
  default: s((t) => [
524
- k(w(x.value[t.$index].dateStart), 1)
524
+ w(b(D.value[t.$index].dateStart), 1)
525
525
  ]),
526
526
  _: 1
527
527
  }, 8, ["label"]),
528
- p(n(_), {
528
+ p(n(N), {
529
529
  label: n(a)("vacationSchedule.endDate"),
530
530
  align: "center"
531
531
  }, {
532
532
  default: s((t) => [
533
- k(w(x.value[t.$index].dateEnd), 1)
533
+ w(b(D.value[t.$index].dateEnd), 1)
534
534
  ]),
535
535
  _: 1
536
536
  }, 8, ["label"])
537
537
  ]),
538
538
  _: 1
539
539
  }, 8, ["label"]),
540
- p(n(_), {
540
+ p(n(N), {
541
541
  label: n(a)("vacationSchedule.note"),
542
542
  align: "center"
543
543
  }, {
544
544
  default: s((t) => [
545
- p(n(Je), {
546
- modelValue: g.value[x.value[t.$index].ids].days[x.value[t.$index].key].note,
547
- "onUpdate:modelValue": (f) => g.value[x.value[t.$index].ids].days[x.value[t.$index].key].note = f,
545
+ p(n(Le), {
546
+ modelValue: g.value[D.value[t.$index].ids].days[D.value[t.$index].key].note,
547
+ "onUpdate:modelValue": (f) => g.value[D.value[t.$index].ids].days[D.value[t.$index].key].note = f,
548
548
  style: { width: "100%" },
549
549
  placeholder: " ",
550
550
  class: "noBorder",
551
- onBlur: (f) => ae(x.value[t.$index].ids)
551
+ onBlur: (f) => le(D.value[t.$index].ids)
552
552
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onBlur"])
553
553
  ]),
554
554
  _: 1
@@ -558,55 +558,55 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
558
558
  }, 8, ["label"])
559
559
  ]),
560
560
  _: 1
561
- }, 8, ["data", "empty-text"])) : (m(), D(n(Se), {
561
+ }, 8, ["data", "empty-text"])) : (m(), k(n(ye), {
562
562
  key: 1,
563
- data: _e.value,
563
+ data: Ve.value,
564
564
  style: { width: "100%" },
565
- "max-height": P.value,
566
- onHeaderClick: De,
567
- onCellClick: ce,
565
+ "max-height": F.value,
566
+ onHeaderClick: ke,
567
+ onCellClick: se,
568
568
  size: "small",
569
569
  "empty-text": n(a)("sheet.emptyText"),
570
- "cell-class-name": me,
570
+ "cell-class-name": ve,
571
571
  align: "center"
572
572
  }, {
573
573
  default: s(() => [
574
- p(n(_), {
575
- label: "Календарь отпусков " + E.value.toString() + " за " + (S.value === 3 ? ge(y.value) + " " : "") + i.value + "г.",
574
+ p(n(N), {
575
+ label: "Календарь отпусков " + E.value.toString() + " за " + (C.value === 3 ? pe(V.value) + " " : "") + r.value + "г.",
576
576
  align: "center"
577
577
  }, {
578
578
  default: s(() => [
579
- p(n(_), {
579
+ p(n(N), {
580
580
  prop: "employee",
581
581
  label: "Сотрудник",
582
582
  fixed: ""
583
583
  }),
584
- S.value === 2 ? (m(), $(G, { key: 0 }, U(12, (t) => p(n(_), {
584
+ C.value === 2 ? (m(), x(U, { key: 0 }, Y(12, (t) => p(n(N), {
585
585
  key: t,
586
- label: ge(t),
586
+ label: pe(t),
587
587
  prop: `m${t}`
588
588
  }, {
589
589
  default: s(({ row: f }) => [
590
- (m(!0), $(G, null, U(f[`m${t}`], (T, V) => (m(), $("div", {
591
- key: V,
590
+ (m(!0), x(U, null, Y(f[`m${t}`], (T, _) => (m(), x("div", {
591
+ key: _,
592
592
  class: "vacation-item"
593
- }, w(T.text), 1))), 128))
593
+ }, b(T.text), 1))), 128))
594
594
  ]),
595
595
  _: 2
596
- }, 1032, ["label", "prop"])), 64)) : N("", !0),
597
- S.value === 3 ? (m(!0), $(G, { key: 1 }, U(new Date(i.value, y.value, 0).getDate(), (t) => (m(), D(n(_), {
596
+ }, 1032, ["label", "prop"])), 64)) : M("", !0),
597
+ C.value === 3 ? (m(!0), x(U, { key: 1 }, Y(new Date(r.value, V.value, 0).getDate(), (t) => (m(), k(n(N), {
598
598
  key: t,
599
599
  label: t.toString(),
600
600
  align: "center",
601
601
  width: "40"
602
602
  }, {
603
603
  default: s(({ row: f, columnIndex: T }) => [
604
- Y("div", null, [
605
- me({ row: f, columnIndex: t }) !== "" ? (m(), $("span", ot, "ОТ")) : N("", !0)
604
+ P("div", null, [
605
+ ve({ row: f, columnIndex: t }) !== "" ? (m(), x("span", nt, "ОТ")) : M("", !0)
606
606
  ])
607
607
  ]),
608
608
  _: 2
609
- }, 1032, ["label"]))), 128)) : N("", !0)
609
+ }, 1032, ["label"]))), 128)) : M("", !0)
610
610
  ]),
611
611
  _: 1
612
612
  }, 8, ["label"])
@@ -614,89 +614,89 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
614
614
  _: 1
615
615
  }, 8, ["data", "max-height", "empty-text"]))
616
616
  ]),
617
- u.checkEdit ? (m(), $("div", ut, [
618
- K.value ? N("", !0) : (m(), D(n(I), {
617
+ u.checkEdit ? (m(), x("div", ot, [
618
+ I.value ? M("", !0) : (m(), k(n(B), {
619
619
  key: 0,
620
620
  type: "primary",
621
621
  onClick: e[5] || (e[5] = (t) => O.value = !0)
622
622
  }, {
623
623
  default: s(() => [
624
- k(w(n(a)("vacationSchedule.sendInformation")), 1)
624
+ w(b(n(a)("vacationSchedule.sendInformation")), 1)
625
625
  ]),
626
626
  _: 1
627
627
  })),
628
- u.query === "confirm" ? (m(), D(n(I), {
628
+ u.query === "confirm" ? (m(), k(n(B), {
629
629
  key: 1,
630
630
  type: "primary",
631
- onClick: e[6] || (e[6] = (t) => pe(!0))
631
+ onClick: e[6] || (e[6] = (t) => me(!0))
632
632
  }, {
633
633
  default: s(() => [
634
- k(w(n(a)("vacationSchedule.agreeOn")), 1)
634
+ w(b(n(a)("vacationSchedule.agreeOn")), 1)
635
635
  ]),
636
636
  _: 1
637
- })) : N("", !0),
638
- u.query === "confirm" ? (m(), D(n(I), {
637
+ })) : M("", !0),
638
+ u.query === "confirm" ? (m(), k(n(B), {
639
639
  key: 2,
640
640
  type: "primary",
641
- onClick: e[7] || (e[7] = (t) => pe(!1))
641
+ onClick: e[7] || (e[7] = (t) => me(!1))
642
642
  }, {
643
643
  default: s(() => [
644
- k(w(n(a)("vacationSchedule.reject")), 1)
644
+ w(b(n(a)("vacationSchedule.reject")), 1)
645
645
  ]),
646
646
  _: 1
647
- })) : N("", !0)
648
- ])) : N("", !0),
649
- Pe((m(), D(n(I), {
647
+ })) : M("", !0)
648
+ ])) : M("", !0),
649
+ Ye((m(), k(n(B), {
650
650
  disabled: L.value,
651
651
  plain: "",
652
- onClick: Ie,
652
+ onClick: Me,
653
653
  style: { "margin-top": ".5rem" }
654
654
  }, {
655
655
  default: s(() => [
656
- k(w(n(a)("workSchedule.exportExcel")), 1)
656
+ w(b(n(a)("workSchedule.exportExcel")), 1)
657
657
  ]),
658
658
  _: 1
659
659
  }, 8, ["disabled"])), [
660
660
  [v, L.value]
661
661
  ]),
662
- p(n(be), {
662
+ p(n(Se), {
663
663
  title: n(a)("workSchedule.jobTitle"),
664
- modelValue: F.value,
665
- "onUpdate:modelValue": e[10] || (e[10] = (t) => F.value = t),
664
+ modelValue: G.value,
665
+ "onUpdate:modelValue": e[10] || (e[10] = (t) => G.value = t),
666
666
  width: "400px"
667
667
  }, {
668
668
  footer: s(() => [
669
- p(n(I), {
670
- onClick: e[8] || (e[8] = (t) => F.value = !1),
669
+ p(n(B), {
670
+ onClick: e[8] || (e[8] = (t) => G.value = !1),
671
671
  size: "default"
672
672
  }, {
673
673
  default: s(() => [
674
- k(w(l.$t("workSchedule.cancel")), 1)
674
+ w(b(l.$t("workSchedule.cancel")), 1)
675
675
  ]),
676
676
  _: 1
677
677
  }),
678
- p(n(I), {
678
+ p(n(B), {
679
679
  size: "default",
680
680
  type: "primary",
681
681
  onClick: e[9] || (e[9] = (t) => {
682
- te(), F.value = !1;
682
+ ee(), G.value = !1;
683
683
  })
684
684
  }, {
685
685
  default: s(() => [
686
- k(w(l.$t("workSchedule.select")), 1)
686
+ w(b(l.$t("workSchedule.select")), 1)
687
687
  ]),
688
688
  _: 1
689
689
  })
690
690
  ]),
691
691
  default: s(() => [
692
- p(n(Ce), {
693
- model: M.value,
692
+ p(n(be), {
693
+ model: $.value,
694
694
  autocomplete: "on"
695
695
  }, {
696
696
  default: s(() => [
697
- (m(!0), $(G, null, U(M.value, (t) => (m(), D(n(We), null, {
697
+ (m(!0), x(U, null, Y($.value, (t) => (m(), k(n(Je), null, {
698
698
  default: s(() => [
699
- p(n(ye), {
699
+ p(n(he), {
700
700
  modelValue: t.val,
701
701
  "onUpdate:modelValue": (f) => t.val = f,
702
702
  "active-text": t.activeText
@@ -710,40 +710,40 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
710
710
  ]),
711
711
  _: 1
712
712
  }, 8, ["title", "modelValue"]),
713
- p(n(be), {
713
+ p(n(Se), {
714
714
  title: n(a)("vacationSchedule.pleaseCoordinate"),
715
715
  modelValue: O.value,
716
716
  "onUpdate:modelValue": e[13] || (e[13] = (t) => O.value = t),
717
717
  width: "500px"
718
718
  }, {
719
719
  footer: s(() => [
720
- p(n(I), {
720
+ p(n(B), {
721
721
  onClick: e[12] || (e[12] = (t) => O.value = !1),
722
722
  size: "default"
723
723
  }, {
724
724
  default: s(() => [
725
- k(w(n(a)("workSchedule.cancel")), 1)
725
+ w(b(n(a)("workSchedule.cancel")), 1)
726
726
  ]),
727
727
  _: 1
728
728
  }),
729
- p(n(I), {
729
+ p(n(B), {
730
730
  size: "default",
731
731
  type: "primary",
732
- onClick: Ne
732
+ onClick: _e
733
733
  }, {
734
734
  default: s(() => [
735
- k(w(n(a)("vacationSchedule.send")), 1)
735
+ w(b(n(a)("vacationSchedule.send")), 1)
736
736
  ]),
737
737
  _: 1
738
738
  })
739
739
  ]),
740
740
  default: s(() => [
741
- p(n(Ce), {
741
+ p(n(be), {
742
742
  model: H.value,
743
743
  autocomplete: "on"
744
744
  }, {
745
745
  default: s(() => [
746
- p(n(ne), {
746
+ p(n(ae), {
747
747
  modelValue: H.value.participants,
748
748
  "onUpdate:modelValue": e[11] || (e[11] = (t) => H.value.participants = t),
749
749
  placeholder: n(a)("vacationSchedule.fullName"),
@@ -751,7 +751,7 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
751
751
  size: "default"
752
752
  }, {
753
753
  default: s(() => [
754
- (m(!0), $(G, null, U(ie.value, (t) => (m(), D(n(oe), {
754
+ (m(!0), x(U, null, Y(de.value, (t) => (m(), k(n(ne), {
755
755
  key: t,
756
756
  label: t,
757
757
  value: t
@@ -765,56 +765,56 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
765
765
  ]),
766
766
  _: 1
767
767
  }, 8, ["title", "modelValue"]),
768
- p(n(Ke), {
768
+ p(n(We), {
769
769
  show: z.value,
770
770
  "onUpdate:show": e[18] || (e[18] = (t) => z.value = t),
771
- options: X.value
771
+ options: K.value
772
772
  }, {
773
773
  default: s(() => [
774
- p(n(ue), {
775
- label: S.value.value > 1 || d.value.level === 3 && typeof d.value.count < "u" ? d.value.name + " " + d.value.count + " " + n(a)("vacationSchedule.day", d.value.count) + ` ${n(a)("vacationSchedule.from")}: ${d.value.allCount() + parseInt(d.value.count)}` : d.value.name,
774
+ p(n(oe), {
775
+ label: C.value.value > 1 || i.value.level === 3 && typeof i.value.count < "u" ? i.value.name + " " + i.value.count + " " + n(a)("vacationSchedule.day", i.value.count) + ` ${n(a)("vacationSchedule.from")}: ${i.value.allCount() + parseInt(i.value.count)}` : i.value.name,
776
776
  disabled: ""
777
777
  }, null, 8, ["label"]),
778
- p(n(Xe)),
779
- d.value.level === 2 && S.value === 1 ? (m(), $("div", rt, [
780
- d.value.length > 1 ? (m(), D(n(ue), {
778
+ p(n(Ke)),
779
+ i.value.level === 2 && C.value === 1 ? (m(), x("div", ut, [
780
+ i.value.length > 1 ? (m(), k(n(oe), {
781
781
  key: 0,
782
782
  label: n(a)("vacationSchedule.deleteLast"),
783
- onClick: e[14] || (e[14] = (t) => le("delete", d.value.key))
784
- }, null, 8, ["label"])) : N("", !0),
785
- d.value.add ? (m(), D(n(ue), {
783
+ onClick: e[14] || (e[14] = (t) => te("delete", i.value.key))
784
+ }, null, 8, ["label"])) : M("", !0),
785
+ i.value.add ? (m(), k(n(oe), {
786
786
  key: 1,
787
787
  label: n(a)("vacationSchedule.addVacation"),
788
- onClick: e[15] || (e[15] = (t) => le("add"))
789
- }, null, 8, ["label"])) : N("", !0)
790
- ])) : (m(), $("div", dt, [
788
+ onClick: e[15] || (e[15] = (t) => te("add"))
789
+ }, null, 8, ["label"])) : M("", !0)
790
+ ])) : (m(), x("div", rt, [
791
791
  p(n(h), {
792
- data: d.value,
792
+ data: i.value,
793
793
  range: "range",
794
- limitation: Me(),
795
- onInput: Te
794
+ limitation: Ne(),
795
+ onInput: Ee
796
796
  }, null, 8, ["data", "limitation"]),
797
- Y("div", it, [
798
- d.value.startDate ? (m(), D(n(I), {
797
+ P("div", dt, [
798
+ i.value.startDate ? (m(), k(n(B), {
799
799
  key: 0,
800
- onClick: e[16] || (e[16] = (t) => le("delete"))
800
+ onClick: e[16] || (e[16] = (t) => te("delete"))
801
801
  }, {
802
802
  default: s(() => [
803
- k(w(n(a)("vacationSchedule.delete")), 1)
803
+ w(b(n(a)("vacationSchedule.delete")), 1)
804
804
  ]),
805
805
  _: 1
806
- })) : N("", !0),
807
- p(n(I), {
806
+ })) : M("", !0),
807
+ p(n(B), {
808
808
  onClick: e[17] || (e[17] = (t) => z.value = !1)
809
809
  }, {
810
810
  default: s(() => [
811
- k(w(n(a)("vacationSchedule.cancel")), 1)
811
+ w(b(n(a)("vacationSchedule.cancel")), 1)
812
812
  ]),
813
813
  _: 1
814
814
  }),
815
- p(n(I), { onClick: Ve }, {
815
+ p(n(B), { onClick: Te }, {
816
816
  default: s(() => [
817
- k(w(n(a)("vacationSchedule.save")), 1)
817
+ w(b(n(a)("vacationSchedule.save")), 1)
818
818
  ]),
819
819
  _: 1
820
820
  })
@@ -828,10 +828,10 @@ const at = { class: "nav" }, nt = { class: "vacation-calendar" }, ot = { key: 0
828
828
  }
829
829
  };
830
830
  export {
831
- St as J,
832
- ft as L,
833
- ht as U,
834
- yt as V,
835
- bt as _,
836
- de as g
831
+ yt as J,
832
+ gt as L,
833
+ ft as U,
834
+ ht as V,
835
+ St as _,
836
+ re as g
837
837
  };